PageSourceSearch

https://polysharks.ai/_next/static/chunks/commons-07cb2aa641fd574d.js

js polysharks.ai collected 2026-10-05 14:20:26 UTC 701,637 bytes, 65 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9351],{38751:function(e,t,r){Promise.resolve().then(r.bind(r,75797)),Promise.resolve().then(r.t.bind(r,231,23))},70505:function(e,t,r){Promise.resolve().then(r.t.bind(r,231,23))},63521:function(){},59275:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return pZ}});var n,i,o,a,s,l,c,u,h,f,d,p,y,m,g,v,b,w,x,O,k,j,S,_,E={};r.r(E),r.d(E,{scaleBand:function(){return nQ},scaleDiverging:function(){return function e(){var t=o$(s1()(ox));return t.copy=function(){return sX(t,e())},nK.apply(t,arguments)}},scaleDivergingLog:function(){return function e(){var t=oG(s1()).domain([.1,1,10]);return t.copy=function(){return sX(t,e()).base(t.base())},nK.apply(t,arguments)}},scaleDivergingPow:function(){return s2},scaleDivergingSqrt:function(){return s3},scaleDivergingSymlog:function(){return function e(){var t=oY(s1());return t.copy=function(){return sX(t,e()).constant(t.constant())},nK.apply(t,arguments)}},scaleIdentity:function(){return function e(t){var r;function n(e){return null==e||isNaN(e=+e)?r:e}return n.invert=n,n.domain=n.range=function(e){return arguments.length?(t=Array.from(e,ob),n):t.slice()},n.unknown=function(e){return arguments.length?(r=e,n):r},n.copy=function(){return e(t).unknown(r)},t=arguments.length?Array.from(t,ob):[0,1],o$(n)}},scaleImplicit:function(){return nY},scaleLinear:function(){return oU},scaleLog:function(){return function e(){let t=oG(o_()).domain([1,10]);return t.copy=()=>oS(t,e()).base(t.base()),nV.apply(t,arguments),t}},scaleOrdinal:function(){return nX},scalePoint:function(){return n0},scalePow:function(){return o2},scaleQuantile:function(){return function e(){var t,r=[],n=[],i=[];function o(){var e=0,t=Math.max(1,n.length);for(i=Array(t-1);++e<t;)i[e-1]=function(e,t,r=iB){if(!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return+r(e[0],0,e);if(t>=1)return+r(e[n-1],n-1,e);var n,i=(n-1)*t,o=Math.floor(i),a=+r(e[o],o,e);return a+(+r(e[o+1],o+1,e)-a)*(i-o)}}(r,e/t);return a}function a(e){return null==e||isNaN(e=+e)?t:n[iU(i,e)]}return a.invertExtent=function(e){var t=n.indexOf(e);return t<0?[NaN,NaN]:[t>0?i[t-1]:r[0],t<i.length?i[t]:r[r.length-1]]},a.domain=function(e){if(!arguments.length)return r.slice();for(let t of(r=[],e))null==t||isNaN(t=+t)||r.push(t);return r.sort(iI),o()},a.range=function(e){return arguments.length?(n=Array.from(e),o()):n.slice()},a.unknown=function(e){return arguments.length?(t=e,a):t},a.quantiles=function(){return i.slice()},a.copy=function(){return e().domain(r).range(n).unknown(t)},nV.apply(a,arguments)}},scaleQuantize:function(){return function e(){var t,r=0,n=1,i=1,o=[.5],a=[0,1];function s(e){return null!=e&&e<=e?a[iU(o,e,0,i)]:t}function l(){var e=-1;for(o=Array(i);++e<i;)o[e]=((e+1)*n-(e-i)*r)/(i+1);return s}return s.domain=function(e){return arguments.length?([r,n]=e,r=+r,n=+n,l()):[r,n]},s.range=function(e){return arguments.length?(i=(a=Array.from(e)).length-1,l()):a.slice()},s.invertExtent=function(e){var t=a.indexOf(e);return t<0?[NaN,NaN]:t<1?[r,o[0]]:t>=i?[o[i-1],n]:[o[t-1],o[t]]},s.unknown=function(e){return arguments.length&&(t=e),s},s.thresholds=function(){return o.slice()},s.copy=function(){return e().domain([r,n]).range(a).unknown(t)},nV.apply(o$(s),arguments)}},scaleRadial:function(){return function e(){var t,r=oE(),n=[0,1],i=!1;function o(e){var n,o=Math.sign(n=r(e))*Math.sqrt(Math.abs(n));return isNaN(o)?t:i?Math.round(o):o}return o.invert=function(e){return r.invert(o5(e))},o.domain=function(e){return arguments.length?(r.domain(e),o):r.domain()},o.range=function(e){return arguments.length?(r.range((n=Array.from(e,ob)).map(o5)),o):n.slice()},o.rangeRound=function(e){return o.range(e).round(!0)},o.round=function(e){return arguments.length?(i=!!e,o):i},o.clamp=function(e){return arguments.length?(r.clamp(e),o):r.clamp()},o.unknown=function(e){return arguments.length?(t=e,o):t},o.copy=function(){return e(r.domain(),n).round(i).clamp(r.clamp()).unknown(t)},nV.apply(o,arguments),o$(o)}},scaleSequential:function(){return function e(){var t=o$(sY()(ox));return t.copy=function(){return sX(t,e())},nK.apply(t,arguments)}},scaleSequentialLog:function(){return function e(){var t=oG(sY()).domain([1,10]);return t.copy=function(){return sX(t,e()).base(t.base())},nK.apply(t,arguments)}},scaleSequentialPow:function(){return sQ},scaleSequentialQuantile:function(){return function e(){var t=[],r=ox;function n(e){if(null!=e&&!isNaN(e=+e))return r((iU(t,e,1)-1)/(t.length-1))}return n.domain=function(e){if(!arguments.length)return t.slice();for(let r of(t=[],e))null==r||isNaN(r=+r)||t.push(r);return t.sort(iI),n},n.interpolator=function(e){return arguments.length?(r=e,n):r},n.range=function(){return t.map((e,n)=>r(n/(t.length-1)))},n.quantiles=function(e){return Array.from({length:e+1},(r,n)=>(function(e,t,r){if(!(!(n=(e=Float64Array.from(function*(e,t){if(void 0===t)for(let t of e)null!=t&&(t=+t)>=t&&(yield t);else{let r=-1;for(let n of e)null!=(n=t(n,++r,e))&&(n=+n)>=n&&(yield n)}}(e,void 0))).length)||isNaN(t=+t))){if(t<=0||n<2)return o6(e);if(t>=1)return o4(e);var n,i=(n-1)*t,o=Math.floor(i),a=o4((function e(t,r,n=0,i=1/0,o){if(r=Math.floor(r),n=Math.floor(Math.max(0,n)),i=Math.floor(Math.min(t.length-1,i)),!(n<=r&&r<=i))return t;for(o=void 0===o?o8:function(e=iI){if(e===iI)return o8;if("function"!=typeof e)throw TypeError("compare is not a function");return(t,r)=>{let n=e(t,r);return n||0===n?n:(0===e(r,r))-(0===e(t,t))}}(o);i>n;){if(i-n>600){let a=i-n+1,s=r-n+1,l=Math.log(a),c=.5*Math.exp(2*l/3),u=.5*Math.sqrt(l*c*(a-c)/
1a)*(s-a/2<0?-1:1),h=Math.max(n,Math.floor(r-s*c/a+u)),f=Math.min(i,Math.floor(r+(a-s)*c/a+u));e(t,r,h,f,o)}let a=t[r],s=n,l=i;for(o7(t,n,r),o(t[i],a)>0&&o7(t,n,i);s<l;){for(o7(t,s,l),++s,--l;0>o(t[s],a);)++s;for(;o(t[l],a)>0;)--l}0===o(t[n],a)?o7(t,n,l):o7(t,++l,i),l<=r&&(n=l+1),r<=l&&(i=l-1)}return t})(e,o).subarray(0,o+1));return a+(o6(e.subarray(o+1))-a)*(i-o)}})(t,n/e))},n.copy=function(){return e(r).domain(t)},nK.apply(n,arguments)}},scaleSequentialSqrt:function(){return s0},scaleSequentialSymlog:function(){return function e(){var t=oY(sY());return t.copy=function(){return sX(t,e()).constant(t.constant())},nK.apply(t,arguments)}},scaleSqrt:function(){return o3},scaleSymlog:function(){return function e(){var t=oY(o_());return t.copy=function(){return oS(t,e()).constant(t.constant())},nV.apply(t,arguments)}},scaleThreshold:function(){return function e(){var t,r=[.5],n=[0,1],i=1;function o(e){return null!=e&&e<=e?n[iU(r,e,0,i)]:t}return o.domain=function(e){return arguments.length?(i=Math.min((r=Array.from(e)).length,n.length-1),o):r.slice()},o.range=function(e){return arguments.length?(n=Array.from(e),i=Math.min(r.length,n.length-1),o):n.slice()},o.invertExtent=function(e){var t=n.indexOf(e);return[r[t-1],r[t]]},o.unknown=function(e){return arguments.length?(t=e,o):t},o.copy=function(){return e().domain(r).range(n).unknown(t)},nV.apply(o,arguments)}},scaleTime:function(){return sZ},scaleUtc:function(){return sJ},tickFormat:function(){return oB}});var A=r(57437),P=r(2265),T=r(87138),N=r(53225),C=r(29162),M=r(88002),I=r(70518),R=r(40756),D=r(66706),L=r(30690),B=r(94207),$=r(36127),U=r(35931),q=r(6864),z=r(21902),F=r(23787),W=function(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=function e(t){var r,n,i="";if("string"==typeof t||"number"==typeof t)i+=t;else if("object"==typeof t){if(Array.isArray(t)){var o=t.length;for(r=0;r<o;r++)t[r]&&(n=e(t[r]))&&(i&&(i+=" "),i+=n)}else for(n in t)t[n]&&(i&&(i+=" "),i+=n)}return i}(e))&&(n&&(n+=" "),n+=t);return n},H=r(48527),V=r.n(H),K=r(71519),G=r.n(K),Z=r(50299),J=r.n(Z),Y=r(97019),X=r.n(Y),Q=r(60555),ee=r.n(Q),et=r(49972),er=r.n(et),en=function(e){return 0===e?0:e>0?1:-1},ei=function(e){return G()(e)&&e.indexOf("%")===e.length-1},eo=function(e){return ee()(e)&&!J()(e)},ea=function(e){return eo(e)||G()(e)},es=0,el=function(e){var t=++es;return"".concat(e||"").concat(t)},ec=function(e,t){var r,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(!eo(e)&&!G()(e))return n;if(ei(e)){var o=e.indexOf("%");r=t*parseFloat(e.slice(0,o))/100}else r=+e;return J()(r)&&(r=n),i&&r>t&&(r=t),r},eu=function(e){if(!e)return null;var t=Object.keys(e);return t&&t.length?e[t[0]]:null},eh=function(e){if(!Array.isArray(e))return!1;for(var t=e.length,r={},n=0;n<t;n++){if(r[e[n]])return!0;r[e[n]]=!0}return!1},ef=function(e,t){return eo(e)&&eo(t)?function(r){return e+r*(t-e)}:function(){return t}};function ed(e,t,r){return e&&e.length?e.find(function(e){return e&&("function"==typeof t?t(e):X()(e,t))===r}):null}var ep=function(e,t){return eo(e)&&eo(t)?e-t:G()(e)&&G()(t)?e.localeCompare(t):e instanceof Date&&t instanceof Date?e.getTime()-t.getTime():String(e).localeCompare(String(t))},ey=function(e,t){for(var r=arguments.length,n=Array(r>2?r-2:0),i=2;i<r;i++)n[i-2]=arguments[i]},em=r(14380),eg=r.n(em),ev=r(63117),eb=r.n(ev),ew=r(12659);function ex(e,t){for(var r in e)if(({}).hasOwnProperty.call(e,r)&&(!({}).hasOwnProperty.call(t,r)||e[r]!==t[r]))return!1;for(var n in t)if(({}).hasOwnProperty.call(t,n)&&!({}).hasOwnProperty.call(e,n))return!1;return!0}function eO(e){return(eO="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var ek=["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","colorRen
1dering","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"],ej=["points","pathLength"],eS={svg:["viewBox","children"],polygon:ej,polyline:ej},e_=["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","onDrag
1Capture","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"],eE=function(e,t){if(!e||"function"==typeof e||"boolean"==typeof e)return null;var r=e;if((0,P.isValidElement)(e)&&(r=e.props),!eb()(r))return null;var n={};return Object.keys(r).forEach(function(e){e_.includes(e)&&(n[e]=t||function(t){return r[e](r,t)})}),n},eA=function(e,t,r){if(!eb()(e)||"object"!==eO(e))return null;var n=null;return Object.keys(e).forEach(function(i){var o=e[i];e_.includes(i)&&"function"==typeof o&&(n||(n={}),n[i]=function(e){return o(t,r,e),null})}),n},eP=["children"],eT=["children"];function eN(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function eC(e){return(eC="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var eM={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart",contextmenu:"onContextMenu",dblclick:"onDoubleClick"},eI=function(e){return"string"==typeof e?e:e?e.displayName||e.name||"Component":""},eR=null,eD=null,eL=function e(t){if(t===eR&&Array.isArray(eD))return eD;var r=[];return P.Children.forEach(t,function(t){er()(t)||((0,ew.isFragment)(t)?r=r.concat(e(t.props.children)):r.push(t))}),eD=r,eR=t,r};function eB(e,t){var r=[],n=[];return n=Array.isArray(t)?t.map(function(e){return eI(e)}):[eI(t)],eL(e).forEach(function(e){var t=X()(e,"type.displayName")||X()(e,"type.name");-1!==n.indexOf(t)&&r.push(e)}),r}function e$(e,t){var r=eB(e,t);return r&&r[0]}var eU=function(e){if(!e||!e.props)return!1;var t=e.props,r=t.width,n=t.height;return!!eo(r)&&!(r<=0)&&!!eo(n)&&!(n<=0)},eq=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],ez=function(e,t,r,n){var i,o=null!==(i=null==eS?void 0:eS[n])&&void 0!==i?i:[];return t.startsWith("data-")||!eg()(e)&&(n&&o.includes(t)||ek.includes(t))||r&&e_.includes(t)},eF=function(e,t,r){if(!e||"function"==typeof e||"boolean"==typeof e)return null;var n=e;if((0,P.isValidElement)(e)&&(n=e.props),!eb()(n))return null;var i={};
1return Object.keys(n).forEach(function(e){var o;ez(null===(o=n)||void 0===o?void 0:o[e],e,t,r)&&(i[e]=n[e])}),i},eW=function e(t,r){if(t===r)return!0;var n=P.Children.count(t);if(n!==P.Children.count(r))return!1;if(0===n)return!0;if(1===n)return eH(Array.isArray(t)?t[0]:t,Array.isArray(r)?r[0]:r);for(var i=0;i<n;i++){var o=t[i],a=r[i];if(Array.isArray(o)||Array.isArray(a)){if(!e(o,a))return!1}else if(!eH(o,a))return!1}return!0},eH=function(e,t){if(er()(e)&&er()(t))return!0;if(!er()(e)&&!er()(t)){var r=e.props||{},n=r.children,i=eN(r,eP),o=t.props||{},a=o.children,s=eN(o,eT);if(n&&a)return ex(i,s)&&eW(n,a);if(!n&&!a)return ex(i,s)}return!1},eV=function(e,t){var r=[],n={};return eL(e).forEach(function(e,i){if(e&&e.type&&G()(e.type)&&eq.indexOf(e.type)>=0)r.push(e);else if(e){var o=eI(e.type),a=t[o]||{},s=a.handler,l=a.once;if(s&&(!l||!n[o])){var c=s(e,o,i);r.push(c),n[o]=!0}}}),r},eK=function(e){var t=e&&e.type;return t&&eM[t]?eM[t]:null};function eG(e){return(eG="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function eZ(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function eJ(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?eZ(Object(r),!0).forEach(function(t){var n,i;n=t,i=r[t],(n=function(e){var t=function(e,t){if("object"!=eG(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=eG(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==eG(t)?t:t+""}(n))in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):eZ(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function eY(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var eX=(0,P.forwardRef)(function(e,t){var r,n=e.aspect,i=e.initialDimension,o=void 0===i?{width:-1,height:-1}:i,a=e.width,s=void 0===a?"100%":a,l=e.height,c=void 0===l?"100%":l,u=e.minWidth,h=void 0===u?0:u,f=e.minHeight,d=e.maxHeight,p=e.children,y=e.debounce,m=void 0===y?0:y,g=e.id,v=e.className,b=e.onResize,w=e.style,x=(0,P.useRef)(null),O=(0,P.useRef)();O.current=b,(0,P.useImperativeHandle)(t,function(){return Object.defineProperty(x.current,"current",{get:function(){return x.current},configurable:!0})});var k=function(e){if(Array.isArray(e))return e}(r=(0,P.useState)({containerWidth:o.width,containerHeight:o.height}))||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,s=[],l=!0,c=!1;try{for(o=(r=r.call(e)).next;!(l=(n=o.call(r)).done)&&(s.push(n.value),2!==s.length);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(r,2)||function(e,t){if(e){if("string"==typeof e)return eY(e,2);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return eY(e,2)}}(r,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),j=k[0],S=k[1],_=(0,P.useCallback)(function(e,t){S(function(r){var n=Math.round(e),i=Math.round(t);return r.containerWidth===n&&r.containerHeight===i?r:{containerWidth:n,containerHeight:i}})},[]);(0,P.useEffect)(function(){var e=function(e){var t,r=e[0].contentRect,n=r.width,i=r.height;_(n,i),null===(t=O.current)||void 0===t||t.call(O,n,i)};m>0&&(e=V()(e,m,{trailing:!0,leading:!1}));var t=new ResizeObserver(e),r=x.current.getBoundingClientRect();return _(r.width,r.height),t.observe(x.current),function(){t.disconnect()}},[_,m]);var E=(0,P.useMemo)(function(){var e=j.containerWidth,t=j.containerHeight;if(e<0||t<0)return null;ey(ei(s)||ei(c),"The width(%s) and height(%s) are both fixed numbers,\n       maybe you don't need to use a ResponsiveContainer.",s,c),ey(!n||n>0,"The aspect(%s) must be greater than zero.",n);var r=ei(s)?e:s,i=ei(c)?t:c;n&&n>0&&(r?i=r/n:i&&(r=i*n),d&&i>d&&(i=d)),ey(r>0||i>0,"The width(%s) and height(%s) of chart should be greater than 0,\n       please check the style of container, or the props width(%s) and height(%s),\n       or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the\n       height and width.",r,i,s,c,h,f,n);var o=!Array.isArray(p)&&eI(p.type).endsWith("Chart");return P.Children.map(p,function(e){return P.isValidElement(e)?(0,P.cloneElement)(e,eJ({width:r,height:i},o?{style:eJ({height:"100%",width:"100%",maxHeight:i,maxWidth:r},e.props.style)}:{})):e})},[n,p,c,d,f,h,j,s]);return P.createElement("div",{id:g?"".concat(g):void 0,className:W("recharts-responsive-container",v),style:eJ(eJ({},void 0===w?{}:w),{},{width:s,height:c,minWidth:h,minHeight:f,maxHeight:d}),ref:x},E)}),eQ=r(37105),e0=r.n(eQ),e1=r(60229),e2=r.n(e1);function e3(e,t){if(!e)throw Error("Invariant failed")}var e5=["children","width","height","viewBox","className","style","title","desc"];function e4(){return(e4=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];
1for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function e6(e){var t=e.children,r=e.width,n=e.height,i=e.viewBox,o=e.className,a=e.style,s=e.title,l=e.desc,c=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,e5),u=i||{width:r,height:n,x:0,y:0},h=W("recharts-surface",o);return P.createElement("svg",e4({},eF(c,!0,"svg"),{className:h,width:r,height:n,style:a,viewBox:"".concat(u.x," ").concat(u.y," ").concat(u.width," ").concat(u.height)}),P.createElement("title",null,s),P.createElement("desc",null,l),t)}var e8=["children","className"];function e7(){return(e7=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}var e9=P.forwardRef(function(e,t){var r=e.children,n=e.className,i=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,e8),o=W("recharts-layer",n);return P.createElement("g",e7({className:o},eF(i,!0),{ref:t}),r)});function te(e){return(te="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function tt(){return(tt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function tr(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function tn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function ti(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?tn(Object(r),!0).forEach(function(t){var n,i;n=t,i=r[t],(n=function(e){var t=function(e,t){if("object"!=te(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=te(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==te(t)?t:t+""}(n))in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tn(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function to(e){return Array.isArray(e)&&ea(e[0])&&ea(e[1])?e.join(" ~ "):e}var ta=function(e){var t=e.separator,r=void 0===t?" : ":t,n=e.contentStyle,i=e.itemStyle,o=void 0===i?{}:i,a=e.labelStyle,s=e.payload,l=e.formatter,c=e.itemSorter,u=e.wrapperClassName,h=e.labelClassName,f=e.label,d=e.labelFormatter,p=e.accessibilityLayer,y=ti({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},void 0===n?{}:n),m=ti({margin:0},void 0===a?{}:a),g=!er()(f),v=g?f:"",b=W("recharts-default-tooltip",u),w=W("recharts-tooltip-label",h);return g&&d&&null!=s&&(v=d(f,s)),P.createElement("div",tt({className:b,style:y},void 0!==p&&p?{role:"status","aria-live":"assertive"}:{}),P.createElement("p",{className:w,style:m},P.isValidElement(v)?v:"".concat(v)),function(){if(s&&s.length){var e=(c?e2()(s,c):s).map(function(e,t){if("none"===e.type)return null;var n=ti({display:"block",paddingTop:4,paddingBottom:4,color:e.color||"#000"},o),i=e.formatter||l||to,a=e.value,c=e.name,u=a,h=c;if(i&&null!=u&&null!=h){var f=i(a,c,e,t,s);if(Array.isArray(f)){var d=function(e){if(Array.isArray(e))return e}(f)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,s=[],l=!0,c=!1;try{for(o=(r=r.call(e)).next;!(l=(n=o.call(r)).done)&&(s.push(n.value),2!==s.length);l=!0);}catch(e){c=!0,i=e}
1finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(f,2)||function(e,t){if(e){if("string"==typeof e)return tr(e,2);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return tr(e,2)}}(f,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();u=d[0],h=d[1]}else u=f}return P.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(t),style:n},ea(h)?P.createElement("span",{className:"recharts-tooltip-item-name"},h):null,ea(h)?P.createElement("span",{className:"recharts-tooltip-item-separator"},r):null,P.createElement("span",{className:"recharts-tooltip-item-value"},u),P.createElement("span",{className:"recharts-tooltip-item-unit"},e.unit||""))});return P.createElement("ul",{className:"recharts-tooltip-item-list",style:{padding:0,margin:0}},e)}return null}())};function ts(e){return(ts="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function tl(e,t,r){var n;return(n=function(e,t){if("object"!=ts(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=ts(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"),(t="symbol"==ts(n)?n:n+"")in e)?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var tc="recharts-tooltip-wrapper",tu={visibility:"hidden"};function th(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.key,i=e.offsetTopLeft,o=e.position,a=e.reverseDirection,s=e.tooltipDimension,l=e.viewBox,c=e.viewBoxDimension;if(o&&eo(o[n]))return o[n];var u=r[n]-s-i,h=r[n]+i;return t[n]?a[n]?u:h:a[n]?u<l[n]?Math.max(h,l[n]):Math.max(u,l[n]):h+s>l[n]+c?Math.max(u,l[n]):Math.max(h,l[n])}function tf(e){return(tf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function td(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function tp(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?td(Object(r),!0).forEach(function(t){tv(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):td(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function ty(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ty=function(){return!!e})()}function tm(e){return(tm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function tg(e,t){return(tg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function tv(e,t,r){return(t=tb(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function tb(e){var t=function(e,t){if("object"!=tf(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=tf(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==tf(t)?t:t+""}var tw=function(e){var t;function r(){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,r);for(var e,t,n,i=arguments.length,o=Array(i),a=0;a<i;a++)o[a]=arguments[a];return t=r,n=[].concat(o),t=tm(t),tv(e=function(e,t){if(t&&("object"===tf(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,ty()?Reflect.construct(t,n||[],tm(this).constructor):t.apply(this,n)),"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),tv(e,"handleKeyDown",function(t){if("Escape"===t.key){var r,n,i,o;e.setState({dismissed:!0,dismissedAtCoordinate:{x:null!==(r=null===(n=e.props.coordinate)||void 0===n?void 0:n.x)&&void 0!==r?r:0,y:null!==(i=null===(o=e.props.coordinate)||void 0===o?void 0:o.y)&&void 0!==i?i:0}})}}),e}return!function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&tg(e,t)}(r,e),t=[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var e=this.wrapperNode.getBoundingClientRect();(Math.abs(e.width-this.state.lastBoundingBox.width)>1||Math.abs(e.height-this.state.lastBoundingBox.height)>1)&&this.setState({lastBoundingBox:{width:e.width,height:e.height}})}else(-1!==this.state.lastBoundingBox.width||-1!==this.state.lastBoundingBox.height)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var e,t;this.props.active&&this.updateBBox(),this.state.dismissed&&((null===(e=this.props.coordinate)||void 0===e?void 0:e.x)!==this.state.dismissedAtCoordinate.x||(null===(t=this.props.coordinate)||void 0===t?void 0:t.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var e,t,r,n,i,o,a,s,l,c,u,h,f,d,p,y,m,g,v,b=this,w=this.props,x=w.active,O=w.allowEscapeViewBox,k=w.animationDuration,j=w.animationEasing,S=w.children,_=w.coordinate,E=w.hasPayload,A=w.isAnimationActive,T=w.offset,N=w.position,C=w.reverseDirection,M=w.useTranslate3d,I=w.viewBox,R=w.wrapperStyle,D=(h=(e={allowEscapeViewBox:O,coordinate:_,offsetTopLeft:T,position:N,reverseDirection:C,tooltipBox:this.state.lastBoundingBox,useTranslate3d:M,viewB
1ox:I}).allowEscapeViewBox,f=e.coordinate,d=e.offsetTopLeft,p=e.position,y=e.reverseDirection,m=e.tooltipBox,g=e.useTranslate3d,v=e.viewBox,m.height>0&&m.width>0&&f?(r=(t={translateX:c=th({allowEscapeViewBox:h,coordinate:f,key:"x",offsetTopLeft:d,position:p,reverseDirection:y,tooltipDimension:m.width,viewBox:v,viewBoxDimension:v.width}),translateY:u=th({allowEscapeViewBox:h,coordinate:f,key:"y",offsetTopLeft:d,position:p,reverseDirection:y,tooltipDimension:m.height,viewBox:v,viewBoxDimension:v.height}),useTranslate3d:g}).translateX,n=t.translateY,l={transform:t.useTranslate3d?"translate3d(".concat(r,"px, ").concat(n,"px, 0)"):"translate(".concat(r,"px, ").concat(n,"px)")}):l=tu,{cssProperties:l,cssClasses:(o=(i={translateX:c,translateY:u,coordinate:f}).coordinate,a=i.translateX,s=i.translateY,W(tc,tl(tl(tl(tl({},"".concat(tc,"-right"),eo(a)&&o&&eo(o.x)&&a>=o.x),"".concat(tc,"-left"),eo(a)&&o&&eo(o.x)&&a<o.x),"".concat(tc,"-bottom"),eo(s)&&o&&eo(o.y)&&s>=o.y),"".concat(tc,"-top"),eo(s)&&o&&eo(o.y)&&s<o.y)))}),L=D.cssClasse
1s,B=D.cssProperties,$=tp(tp({transition:A&&x?"transform ".concat(k,"ms ").concat(j):void 0},B),{},{pointerEvents:"none",visibility:!this.state.dismissed&&x&&E?"visible":"hidden",position:"absolute",top:0,left:0},R);return P.createElement("div",{tabIndex:-1,className:L,style:$,ref:function(e){b.wrapperNode=e}},S)}}],function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,tb(n.key),n)}}(r.prototype,t),Object.defineProperty(r,"prototype",{writable:!1}),r}(P.PureComponent),tx={isSsr:!("undefined"!=typeof window&&window.document&&window.document.createElement&&window.setTimeout),get:function(e){return tx[e]},set:function(e,t){if("string"==typeof e)tx[e]=t;else{var r=Object.keys(e);r&&r.length&&r.forEach(function(t){tx[t]=e[t]})}}},tO=r(90374),tk=r.n(tO);function tj(e,t,r){return!0===t?tk()(e,r):eg()(t)?tk()(e,t):e}function tS(e){return(tS="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function t_(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function tE(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?t_(Object(r),!0).forEach(function(t){tN(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):t_(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function tA(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(tA=function(){return!!e})()}function tP(e){return(tP=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function tT(e,t){return(tT=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function tN(e,t,r){return(t=tC(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function tC(e){var t=function(e,t){if("object"!=tS(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=tS(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==tS(t)?t:t+""}function tM(e){return e.dataKey}var tI=function(e){var t;function r(){var e,t;return!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,r),e=r,t=arguments,e=tP(e),function(e,t){if(t&&("object"===tS(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,tA()?Reflect.construct(e,t||[],tP(this).constructor):e.apply(this,t))}return!function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&tT(e,t)}(r,e),t=[{key:"render",value:function(){var e,t=this,r=this.props,n=r.active,i=r.allowEscapeViewBox,o=r.animationDuration,a=r.animationEasing,s=r.content,l=r.coordinate,c=r.filterNull,u=r.isAnimationActive,h=r.offset,f=r.payload,d=r.payloadUniqBy,p=r.position,y=r.reverseDirection,m=r.useTranslate3d,g=r.viewBox,v=r.wrapperStyle,b=null!=f?f:[];c&&b.length&&(b=tj(f.filter(function(e){return null!=e.value&&(!0!==e.hide||t.props.includeHidden)}),d,tM));var w=b.length>0;return P.createElement(tw,{allowEscapeViewBox:i,animationDuration:o,animationEasing:a,isAnimationActive:u,active:n,coordinate:l,hasPayload:w,offset:h,position:p,reverseDirection:y,useTranslate3d:m,viewBox:g,wrapperStyle:v},(e=tE(tE({},this.props),{},{payload:b}),P.isValidElement(s)?P.cloneElement(s,e):"function"==typeof s?P.createElement(s,e):P.createElement(ta,e)))}}],function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,tC(n.key),n)}}(r.prototype,t),Object.defineProperty(r,"prototype",{writable:!1}),r}(P.PureComponent);tN(tI,"displayName","Tooltip"),tN(tI,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!tx.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var tR=r(62637),tD=r.n(tR);let tL=Math.cos,tB=Math.sin,t$=Math.sqrt,tU=Math.PI,tq=2*tU;var tz={draw(e,t){let r=t$(t/tU);e.moveTo(r,0),e.arc(0,0,r,0,tq)}};let tF=t$(1/3),tW=2*tF,tH=tB(tU/10)/tB(7*tU/10),tV=tB(tq/10)*tH,tK=-tL(tq/10)*tH,tG=t$(3),tZ=t$(3)/2,tJ=1/t$(12),tY=(tJ/2+1)*3;function tX(e){return function(){return e}}let tQ=Math.PI,t0=2*tQ,t1=t0-1e-6;function t2(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}class t3{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==e?t2:function(e){let t=Math.floor(e);if(!(t>=0))throw Error(`invalid digits: ${e}`);if(t>15)return t2;let r=10**t;return function(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=Math.round(arguments[t]*r)/r+e[t]}}(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){null!==this._x1&&(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,r,n){this._append`Q${+e},${+t},${this._x1=+r},${this._y1=+n}`}bezierCurveTo(e,t,r,n,i,o){this._append`C${+e},${+t},${+r},${+n}
1,${this._x1=+i},${this._y1=+o}`}arcTo(e,t,r,n,i){if(e=+e,t=+t,r=+r,n=+n,(i=+i)<0)throw Error(`negative radius: ${i}`);let o=this._x1,a=this._y1,s=r-e,l=n-t,c=o-e,u=a-t,h=c*c+u*u;if(null===this._x1)this._append`M${this._x1=e},${this._y1=t}`;else if(h>1e-6){if(Math.abs(u*s-l*c)>1e-6&&i){let f=r-o,d=n-a,p=s*s+l*l,y=Math.sqrt(p),m=Math.sqrt(h),g=i*Math.tan((tQ-Math.acos((p+h-(f*f+d*d))/(2*y*m)))/2),v=g/m,b=g/y;Math.abs(v-1)>1e-6&&this._append`L${e+v*c},${t+v*u}`,this._append`A${i},${i},0,0,${+(u*f>c*d)},${this._x1=e+b*s},${this._y1=t+b*l}`}else this._append`L${this._x1=e},${this._y1=t}`}}arc(e,t,r,n,i,o){if(e=+e,t=+t,o=!!o,(r=+r)<0)throw Error(`negative radius: ${r}`);let a=r*Math.cos(n),s=r*Math.sin(n),l=e+a,c=t+s,u=1^o,h=o?n-i:i-n;null===this._x1?this._append`M${l},${c}`:(Math.abs(this._x1-l)>1e-6||Math.abs(this._y1-c)>1e-6)&&this._append`L${l},${c}`,r&&(h<0&&(h=h%t0+t0),h>t1?this._append`A${r},${r},0,1,${u},${e-a},${t-s}A${r},${r},0,1,${u},${this._x1=l},${this._y1=c}`:h>1e-6&&this._append`A${r},${r},0,${+(h>=tQ)},${u},${this._x1=e+r*Math.cos(i)},${this._y1=t+r*Math.sin(i)}`)}rect(e,t,r,n){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${r=+r}v${+n}h${-r}Z`}toString(){return this._}}function t5(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(null==r)t=null;else{let e=Math.floor(r);if(!(e>=0))throw RangeError(`invalid digits: ${r}`);t=e}return e},()=>new t3(t)}function t4(e){return(t4="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}t3.prototype,t$(3),t$(3);var t6=["type","size","sizeType"];function t8(){return(t8=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function t7(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function t9(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?t7(Object(r),!0).forEach(function(t){var n,i;n=t,i=r[t],(n=function(e){var t=function(e,t){if("object"!=t4(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=t4(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==t4(t)?t:t+""}(n))in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):t7(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var re={symbolCircle:tz,symbolCross:{draw(e,t){let r=t$(t/5)/2;e.moveTo(-3*r,-r),e.lineTo(-r,-r),e.lineTo(-r,-3*r),e.lineTo(r,-3*r),e.lineTo(r,-r),e.lineTo(3*r,-r),e.lineTo(3*r,r),e.lineTo(r,r),e.lineTo(r,3*r),e.lineTo(-r,3*r),e.lineTo(-r,r),e.lineTo(-3*r,r),e.closePath()}},symbolDiamond:{draw(e,t){let r=t$(t/tW),n=r*tF;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},symbolSquare:{draw(e,t){let r=t$(t),n=-r/2;e.rect(n,n,r,r)}},symbolStar:{draw(e,t){let r=t$(.8908130915292852*t),n=tV*r,i=tK*r;e.moveTo(0,-r),e.lineTo(n,i);for(let t=1;t<5;++t){let o=tq*t/5,a=tL(o),s=tB(o);e.lineTo(s*r,-a*r),e.lineTo(a*n-s*i,s*n+a*i)}e.closePath()}},symbolTriangle:{draw(e,t){let r=-t$(t/(3*tG));e.moveTo(0,2*r),e.lineTo(-tG*r,-r),e.lineTo(tG*r,-r),e.closePath()}},symbolWye:{draw(e,t){let r=t$(t/tY),n=r/2,i=r*tJ,o=r*tJ+r,a=-n;e.moveTo(n,i),e.lineTo(n,o),e.lineTo(a,o),e.lineTo(-.5*n-tZ*i,tZ*n+-.5*i),e.lineTo(-.5*n-tZ*o,tZ*n+-.5*o),e.lineTo(-.5*a-tZ*o,tZ*a+-.5*o),e.lineTo(-.5*n+tZ*i,-.5*i-tZ*n),e.lineTo(-.5*n+tZ*o,-.5*o-tZ*n),e.lineTo(-.5*a+tZ*o,-.5*o-tZ*a),e.closePath()}}},rt=Math.PI/180,rr=function(e,t,r){if("area"===t)return e;switch(r){case"cross":return 5*e*e/9;case"diamond":return .5*e*e/Math.sqrt(3);case"square":return e*e;case"star":var n=18*rt;return 1.25*e*e*(Math.tan(n)-Math.tan(2*n)*Math.pow(Math.tan(n),2));case"triangle":return Math.sqrt(3)*e*e/4;case"wye":return(21-10*Math.sqrt(3))*e*e/8;default:return Math.PI*e*e/4}},rn=function(e){var t,r=e.type,n=void 0===r?"circle":r,i=e.size,o=void 0===i?64:i,a=e.sizeType,s=void 0===a?"area":a,l=t9(t9({},function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,t6)),{},{type:n,size:o,sizeType:s}),c=l.className,u=l.cx,h=l.cy,f=eF(l,!0);return u===+u&&h===+h&&o===+o?P.createElement("path",t8({}
1,f,{className:W("recharts-symbols",c),transform:"translate(".concat(u,", ").concat(h,")"),d:(t=re["symbol".concat(tD()(n))]||tz,(function(e,t){let r=null,n=t5(i);function i(){let i;if(r||(r=i=n()),e.apply(this,arguments).draw(r,+t.apply(this,arguments)),i)return r=null,i+""||null}return e="function"==typeof e?e:tX(e||tz),t="function"==typeof t?t:tX(void 0===t?64:+t),i.type=function(t){return arguments.length?(e="function"==typeof t?t:tX(t),i):e},i.size=function(e){return arguments.length?(t="function"==typeof e?e:tX(+e),i):t},i.context=function(e){return arguments.length?(r=null==e?null:e,i):r},i})().type(t).size(rr(o,s,n))())})):null};function ri(e){return(ri="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ro(){return(ro=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function ra(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function rs(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(rs=function(){return!!e})()}function rl(e){return(rl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function rc(e,t){return(rc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ru(e,t,r){return(t=rh(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function rh(e){var t=function(e,t){if("object"!=ri(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=ri(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==ri(t)?t:t+""}rn.registerSymbol=function(e,t){re["symbol".concat(tD()(e))]=t};var rf=function(e){var t;function r(){var e,t;return!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,r),e=r,t=arguments,e=rl(e),function(e,t){if(t&&("object"===ri(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,rs()?Reflect.construct(e,t||[],rl(this).constructor):e.apply(this,t))}return!function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&rc(e,t)}(r,e),t=[{key:"renderIcon",value:function(e){var t=this.props.inactiveColor,r=32/6,n=32/3,i=e.inactive?t:e.color;if("plainline"===e.type)return P.createElement("line",{strokeWidth:4,fill:"none",stroke:i,strokeDasharray:e.payload.strokeDasharray,x1:0,y1:16,x2:32,y2:16,className:"recharts-legend-icon"});if("line"===e.type)return P.createElement("path",{strokeWidth:4,fill:"none",stroke:i,d:"M0,".concat(16,"h").concat(n,"\n            A").concat(r,",").concat(r,",0,1,1,").concat(2*n,",").concat(16,"\n            H").concat(32,"M").concat(2*n,",").concat(16,"\n            A").concat(r,",").concat(r,",0,1,1,").concat(n,",").concat(16),className:"recharts-legend-icon"});if("rect"===e.type)return P.createElement("path",{stroke:"none",fill:i,d:"M0,".concat(4,"h").concat(32,"v").concat(24,"h").concat(-32,"z"),className:"recharts-legend-icon"});if(P.isValidElement(e.legendIcon)){var o=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ra(Object(r),!0).forEach(function(t){ru(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ra(Object(r)).forEac
1h(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({},e);return delete o.legendIcon,P.cloneElement(e.legendIcon,o)}return P.createElement(rn,{fill:i,cx:16,cy:16,size:32,sizeType:"diameter",type:e.type})}},{key:"renderItems",value:function(){var e=this,t=this.props,r=t.payload,n=t.iconSize,i=t.layout,o=t.formatter,a=t.inactiveColor,s={x:0,y:0,width:32,height:32},l={display:"horizontal"===i?"inline-block":"block",marginRight:10},c={display:"inline-block",verticalAlign:"middle",marginRight:4};return r.map(function(t,r){var i=t.formatter||o,u=W(ru(ru({"recharts-legend-item":!0},"legend-item-".concat(r),!0),"inactive",t.inactive));if("none"===t.type)return null;var h=eg()(t.value)?null:t.value;ey(!eg()(t.value),'The name property is also required when using a function for the dataKey of a chart\'s cartesian components. Ex: <Bar name="Name of my Data"/>');var f=t.inactive?a:t.color;return P.createElement("li",ro({className:u,style:l,key:"legend-item-".concat(r)},eA(e.props,t,r)),P.createElement(e6,{width:n,height:n,viewBox:s,style:c},e.renderIcon(t)),P.createElement("span",{className:"recharts-legend-item-text",style:{color:f}},i?i(h,t,r):h))})}},{key:"render",value:function(){var e=this.props,t=e.payload,r=e.layout,n=e.align;return t&&t.length?P.createElement("ul",{className:"recharts-default-legend",style:{padding:0,margin:0,textAlign:"horizontal"===r?n:"left"}},this.renderItems()):null}}],function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,rh(n.key),n)}}(r.prototype,t),Object.defineProperty(r,"prototype",{writable:!1}),r}(P.PureComponent);function rd(e){return(rd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}ru(rf,"displayName","Legend"),ru(rf,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var rp=["ref"];function ry(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function rm(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ry(Object(r),!0).forEach(function(t){rx(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ry(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function rg(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,rO(n.key),n)}}function rv(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(rv=function(){return!!e})()}function rb(e){return(rb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function rw(e,t){return(rw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function rx(e,t,r){return(t=rO(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function rO(e){var t=function(e,t){if("object"!=rd(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=rd(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==rd(t)?t:t+""}function rk(e){return e.value}var rj=function(e){var t,r;function n(){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,n);for(var e,t,r,i=arguments.length,o=Array(i),a=0;a<i;a++)o[a]=arguments[a];return t=n,r=[].concat(o),t=rb(t),rx(e=function(e,t){if(t&&("object"===rd(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,rv()?Reflect.construct(t,r||[],rb(this).constructor):t.apply(this,r)),"lastBoundingBox",{width:-1,height:-1}),e}return!function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&rw(e,t)}(n,e),t=[{key:"componentDidMount",value:function(){this.updateBBox()}},{key:"componentDidUpdate",value:function(){this.updateBBox()}},{key:"getBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var e=this.wrapperNode.getBoundingClientRect();return e.height=this.wrapperNode.offsetHeight,e.width=this.wrapperNode.offsetWidth,e}return null}},{key:"updateBBox",value:function(){var e=this.props.onBBoxUpdate,t=this.getBBox();
1t?(Math.abs(t.width-this.lastBoundingBox.width)>1||Math.abs(t.height-this.lastBoundingBox.height)>1)&&(this.lastBoundingBox.width=t.width,this.lastBoundingBox.height=t.height,e&&e(t)):(-1!==this.lastBoundingBox.width||-1!==this.lastBoundingBox.height)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,e&&e(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?rm({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(e){var t,r,n=this.props,i=n.layout,o=n.align,a=n.verticalAlign,s=n.margin,l=n.chartWidth,c=n.chartHeight;return e&&(void 0!==e.left&&null!==e.left||void 0!==e.right&&null!==e.right)||(t="center"===o&&"vertical"===i?{left:((l||0)-this.getBBoxSnapshot().width)/2}:"right"===o?{right:s&&s.right||0}:{left:s&&s.left||0}),e&&(void 0!==e.top&&null!==e.top||void 0!==e.bottom&&null!==e.bottom)||(r="middle"===a?{top:((c||0)-this.getBBoxSnapshot().height)/2}:"bottom"===a?{bottom:s&&s.bottom||0}:{top:s&&s.top||0}),rm(rm({},t),r)}},{key:"render",value:function(){var e=this,t=this.props,r=t.content,n=t.width,i=t.height,o=t.wrapperStyle,a=t.payloadUniqBy,s=t.payload,l=rm(rm({position:"absolute",width:n||"auto",height:i||"auto"},this.getDefaultPosition(o)),o);return P.createElement("div",{className:"recharts-legend-wrapper",style:l,ref:function(t){e.wrapperNode=t}},function(e,t){if(P.isValidElement(e))return P.cloneElement(e,t);if("function"==typeof e)return P.createElement(e,t);t.ref;var r=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(t,rp);return P.createElement(rf,r)}(r,rm(rm({},this.props),{},{payload:tj(s,a,rk)})))}}],r=[{key:"getWithHeight",value:function(e,t){var r=rm(rm({},this.defaultProps),e.props).layout;return"vertical"===r&&eo(e.props.height)?{height:e.props.height}:"horizontal"===r?{width:e.props.width||t}:null}}],t&&rg(n.prototype,t),r&&rg(n,r),Object.defineProperty(n,"prototype",{writable:!1}),n}(P.PureComponent);function rS(){return(rS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}rx(rj,"displayName","Legend"),rx(rj,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var r_=function(e){var t=e.cx,r=e.cy,n=e.r,i=W("recharts-dot",e.className);return t===+t&&r===+r&&n===+n?P.createElement("circle",rS({},eF(e,!1),eE(e),{className:i,cx:t,cy:r,r:n})):null},rE=r(41448),rA=r.n(rE),rP=Object.getOwnPropertyNames,rT=Object.getOwnPropertySymbols,rN=Object.prototype.hasOwnProperty;function rC(e,t){return function(r,n,i){return e(r,n,i)&&t(r,n,i)}}function rM(e){return function(t,r,n){if(!t||!r||"object"!=typeof t||"object"!=typeof r)return e(t,r,n);var i=n.cache,o=i.get(t),a=i.get(r);if(o&&a)return o===r&&a===t;i.set(t,r),i.set(r,t);var s=e(t,r,n);return i.delete(t),i.delete(r),s}}function rI(e){return rP(e).concat(rT(e))}var rR=Object.hasOwn||function(e,t){return rN.call(e,t)};function rD(e,t){return e===t||!e&&!t&&e!=e&&t!=t}var rL=Object.getOwnPropertyDescriptor,rB=Object.keys;function r$(e,t,r){var n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(!r.equals(e[n],t[n],n,n,e,t,r))return!1;return!0}function rU(e,t){return rD(e.getTime(),t.getTime())}function rq(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function rz(e,t){return e===t}function rF(e,t,r){var n,i,o=e.size;if(o!==t.size)return!1;if(!o)return!0;for(var a=Array(o),s=e.entries(),l=0;(n=s.next())&&!n.done;){for(var c=t.entries(),u=!1,h=0;(i=c.next())&&!i.done;){if(a[h]){h++;continue}var f=n.value,d=i.value;if(r.equals(f[0],d[0],l,h,e,t,r)&&r.equals(f[1],d[1],f[0],d[0],e,t,r)){u=a[h]=!0;break}h++}if(!u)return!1;l++}return!0}function rW(e,t,r){var n=rB(e),i=n.length;if(rB(t).length!==i)return!1;for(;i-- >0;)if(!rY(e,t,r,n[i]))return!1;return!0}function rH(e,t,r){var n,i,o,a=rI(e),s=a.length;if(rI(t).length!==s)return!1;for(;s-- >0;)if(!rY(e,t,r,n=a[s])||(i=rL(e,n),o=rL(t,n),(i||o)&&(!i||!o||i.c
1onfigurable!==o.configurable||i.enumerable!==o.enumerable||i.writable!==o.writable)))return!1;return!0}function rV(e,t){return rD(e.valueOf(),t.valueOf())}function rK(e,t){return e.source===t.source&&e.flags===t.flags}function rG(e,t,r){var n,i,o=e.size;if(o!==t.size)return!1;if(!o)return!0;for(var a=Array(o),s=e.values();(n=s.next())&&!n.done;){for(var l=t.values(),c=!1,u=0;(i=l.next())&&!i.done;){if(!a[u]&&r.equals(n.value,i.value,n.value,i.value,e,t,r)){c=a[u]=!0;break}u++}if(!c)return!1}return!0}function rZ(e,t){var r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(e[r]!==t[r])return!1;return!0}function rJ(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function rY(e,t,r,n){return("_owner"===n||"__o"===n||"__v"===n)&&(!!e.$$typeof||!!t.$$typeof)||rR(t,n)&&r.equals(e[n],t[n],n,n,e,t,r)}var rX=Array.isArray,rQ="function"==typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView:null,r0=Object.assign,r1=Object.prototype.toString.call.bind(Object.prototype.toString),r2=r3();function r3(e){void 0===e&&(e={});var t,r,n,i,o,a,s,l,c,u,h,f,d,p=e.circular,y=e.createInternalComparator,m=e.createState,g=e.strict,v=(r=(t=function(e){var t=e.circular,r=e.createCustomConfig,n=e.strict,i={areArraysEqual:n?rH:r$,areDatesEqual:rU,areErrorsEqual:rq,areFunctionsEqual:rz,areMapsEqual:n?rC(rF,rH):rF,areNumbersEqual:rD,areObjectsEqual:n?rH:rW,arePrimitiveWrappersEqual:rV,areRegExpsEqual:rK,areSetsEqual:n?rC(rG,rH):rG,areTypedArraysEqual:n?rH:rZ,areUrlsEqual:rJ};if(r&&(i=r0({},i,r(i))),t){var o=rM(i.areArraysEqual),a=rM(i.areMapsEqual),s=rM(i.areObjectsEqual),l=rM(i.areSetsEqual);i=r0({},i,{areArraysEqual:o,areMapsEqual:a,areObjectsEqual:s,areSetsEqual:l})}return i}(e)).areArraysEqual,n=t.areDatesEqual,i=t.areErrorsEqual,o=t.areFunctionsEqual,a=t.areMapsEqual,s=t.areNumbersEqual,l=t.areObjectsEqual,c=t.arePrimitiveWrappersEqual,u=t.areRegExpsEqual,h=t.areSetsEqual,f=t.areTypedArraysEqual,d=t.areUrlsEqual,function(e,t,p){if(e===t)return!0;if(null==e||null==t)return!1;var y=typeof e;if(y!==typeof t)return!1;if("object"!==y)return"number"===y?s(e,t,p):"function"===y&&o(e,t,p);var m=e.constructor;if(m!==t.constructor)return!1;if(m===Object)return l(e,t,p);if(rX(e))return r(e,t,p);if(null!=rQ&&rQ(e))return f(e,t,p);if(m===Date)return n(e,t,p);if(m===RegExp)return u(e,t,p);if(m===Map)return a(e,t,p);if(m===Set)return h(e,t,p);var g=r1(e);return"[object Date]"===g?n(e,t,p):"[object RegExp]"===g?u(e,t,p):"[object Map]"===g?a(e,t,p):"[object Set]"===g?h(e,t,p):"[object Object]"===g?"function"!=typeof e.then&&"function"!=typeof t.then&&l(e,t,p):"[object URL]"===g?d(e,t,p):"[object Error]"===g?i(e,t,p):"[object Arguments]"===g?l(e,t,p):("[object Boolean]"===g||"[object Number]"===g||"[object String]"===g)&&c(e,t,p)}),b=y?y(v):function(e,t,r,n,i,o,a){return v(e,t,a)};return function(e){var t=e.circular,r=e.comparator,n=e.createState,i=e.equals,o=e.strict;if(n)return function(e,a){var s=n(),l=s.cache;return r(e,a,{cache:void 0===l?t?new WeakMap:void 0:l,equals:i,meta:s.meta,strict:o})};if(t)return function(e,t){return r(e,t,{cache:new WeakMap,equals:i,meta:void 0,strict:o})};var a={cache:void 0,equals:i,meta:void 0,strict:o};return function(e,t){return r(e,t,a)}}({circular:void 0!==p&&p,comparator:v,createState:m,equals:b,strict:void 0!==g&&g})}function r5(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=-1;requestAnimationFrame(function n(i){if(r<0&&(r=i),i-r>t)e(i),r=-1;else{var o;o=n,"undefined"!=typeof requestAnimationFrame&&requestAnimationFrame(o)}})}function r4(e){return(r4="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r6(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function r8(e){return(r8="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r7(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function r9(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
1t%2?r7(Object(r),!0).forEach(function(t){ne(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):r7(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function ne(e,t,r){var n;return(n=function(e,t){if("object"!==r8(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==r8(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"),(t="symbol"===r8(n)?n:String(n))in e)?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}r3({strict:!0}),r3({circular:!0}),r3({circular:!0,strict:!0}),r3({createInternalComparator:function(){return rD}}),r3({strict:!0,createInternalComparator:function(){return rD}}),r3({circular:!0,createInternalComparator:function(){return rD}}),r3({circular:!0,createInternalComparator:function(){return rD},strict:!0});var nt=function(e){return e},nr=function(e,t){return Object.keys(t).reduce(function(r,n){return r9(r9({},r),{},ne({},n,e(n,t[n])))},{})},nn=function(e,t,r){return e.map(function(e){return"".concat(e.replace(/([A-Z])/g,function(e){return"-".concat(e.toLowerCase())})," ").concat(t,"ms ").concat(r)}).join(",")},ni=function(e,t,r,n,i,o,a,s){};function no(e,t){if(e){if("string"==typeof e)return na(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return na(e,t)}}function na(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var ns=function(e,t){return[0,3*e,3*t-6*e,3*e-3*t+1]},nl=function(e,t){return e.map(function(e,r){return e*Math.pow(t,r)}).reduce(function(e,t){return e+t})},nc=function(e,t){return function(r){return nl(ns(e,t),r)}},nu=function(){for(var e,t,r=arguments.length,n=Array(r),i=0;i<r;i++)n[i]=arguments[i];var o=n[0],a=n[1],s=n[2],l=n[3];if(1===n.length)switch(n[0]){case"linear":o=0,a=0,s=1,l=1;break;case"ease":o=.25,a=.1,s=.25,l=1;break;case"ease-in":o=.42,a=0,s=1,l=1;break;case"ease-out":o=.42,a=0,s=.58,l=1;break;case"ease-in-out":o=0,a=0,s=.58,l=1;break;default:var c=n[0].split("(");if("cubic-bezier"===c[0]&&4===c[1].split(")")[0].split(",").length){var u,h=function(e){if(Array.isArray(e))return e}(u=c[1].split(")")[0].split(",").map(function(e){return parseFloat(e)}))||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,s=[],l=!0,c=!1;try{for(o=(r=r.call(e)).next;!(l=(n=o.call(r)).done)&&(s.push(n.value),4!==s.length);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(u,4)||no(u,4)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();o=h[0],a=h[1],s=h[2],l=h[3]}else ni(!1,"[configBezier]: arguments should be one of oneOf 'linear', 'ease', 'ease-in', 'ease-out', 'ease-in-out','cubic-bezier(x1,y1,x2,y2)', instead received %s",n)}ni([o,s,a,l].every(function(e){return"number"==typeof e&&e>=0&&e<=1}),"[configBezier]: arguments should be x1, y1, x2, y2 of [0, 1] instead received %s",n);var f=nc(o,s),d=nc(a,l),p=(e=o,t=s,function(r){var n;return nl([].concat(function(e){if(Array.isArray(e))return na(e)}(n=ns(e,t).map(function(e,t){return e*t}).slice(1))||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||no(n)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),[0]),r)}),y=function(e){for(var t=e>1?1:e,r=t,n=0;n<8;++n){var i,o=f(r)-t,a=p(r);if(1e-4>Math.abs(o-t)||a<1e-4)break;r=(i=r-o/a)>1?1:i<0?0:i}return d(r)};return y.isStepper=!1,y},nh=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.stiff,r=void 0===t?100:t,n=e.damping,i=void 0===n?8:n,o=e.dt,a=void 0===o?17:o,s=function(e,t,n){var o=n+(-(e-t)*r-n*i)*a/1e3,s=n*a/1e3+e;return 1e-4>Math.abs(s-t)&&1e-4>Math.abs(o)?[t,0]:[s,o]};return s.isStepper=!0,s.dt=a,s},nf=function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=t[0];if("string"==typeof n)switch(n){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return nu(n);case"spring":return nh();
1default:if("cubic-bezier"===n.split("(")[0])return nu(n);ni(!1,"[configEasing]: first argument should be one of 'ease', 'ease-in', 'ease-out', 'ease-in-out','cubic-bezier(x1,y1,x2,y2)', 'linear' and 'spring', instead  received %s",t)}return"function"==typeof n?n:(ni(!1,"[configEasing]: first argument type should be function or string, instead received %s",t),null)};function nd(e){return(nd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function np(e){return function(e){if(Array.isArray(e))return nb(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||nv(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ny(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function nm(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ny(Object(r),!0).forEach(function(t){ng(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ny(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function ng(e,t,r){var n;return(n=function(e,t){if("object"!==nd(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==nd(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"),(t="symbol"===nd(n)?n:String(n))in e)?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function nv(e,t){if(e){if("string"==typeof e)return nb(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return nb(e,t)}}function nb(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var nw=function(e,t,r){return e+(t-e)*r},nx=function(e){return e.from!==e.to},nO=function e(t,r,n){var i=nr(function(e,r){if(nx(r)){var n,i=function(e){if(Array.isArray(e))return e}(n=t(r.from,r.to,r.velocity))||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,s=[],l=!0,c=!1;try{for(o=(r=r.call(e)).next;!(l=(n=o.call(r)).done)&&(s.push(n.value),2!==s.length);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(n,2)||nv(n,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),o=i[0],a=i[1];return nm(nm({},r),{},{from:o,velocity:a})}return r},r);return n<1?nr(function(e,t){return nx(t)?nm(nm({},t),{},{velocity:nw(t.velocity,i[e].velocity,n),from:nw(t.from,i[e].from,n)}):t},r):e(t,i,n-1)},nk=function(e,t,r,n,i){var o,a,s=[Object.keys(e),Object.keys(t)].reduce(function(e,t){return e.filter(function(e){return t.includes(e)})}),l=s.reduce(function(r,n){return nm(nm({},r),{},ng({},n,[e[n],t[n]]))},{}),c=s.reduce(function(r,n){return nm(nm({},r),{},ng({},n,{from:e[n],velocity:0,to:t[n]}))},{}),u=-1,h=function(){return null};return h=r.isStepper?function(n){o||(o=n);var a=(n-o)/r.dt;c=nO(r,c,a),i(nm(nm(nm({},e),t),nr(function(e,t){return t.from},c))),o=n,Object.values(c).filter(nx).length&&(u=requestAnimationFrame(h))}:function(o){a||(a=o);var s=(o-a)/n,c=nr(function(e,t){return nw.apply(void 0,np(t).concat([r(s)]))},l);if(i(nm(nm(nm({},e),t),c)),s<1)u=requestAnimationFrame(h);else{var f=nr(function(e,t){return nw.apply(void 0,np(t).concat([r(1)]))},l);i(nm(nm(nm({},e),t),f))}},function(){return requestAnimationFrame(h),function(){cancelAnimationFrame(u)}}};function nj(e){return(nj="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var nS=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function n_(e){return function(e){if(Array.isArray(e))return nE(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return nE(e,void 0);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return nE(e,void 0)}}(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function nE(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function nA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function nP(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
1t%2?nA(Object(r),!0).forEach(function(t){nT(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):nA(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function nT(e,t,r){return(t=nN(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function nN(e){var t=function(e,t){if("object"!==nj(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==nj(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===nj(t)?t:String(t)}function nC(e,t){return(nC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function nM(e,t){if(t&&("object"===nj(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return nI(e)}function nI(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function nR(e){return(nR=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var nD=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&nC(e,t)}(i,e);var t,r,n=(t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,r=nR(i);return e=t?Reflect.construct(r,arguments,nR(this).constructor):r.apply(this,arguments),nM(this,e)});function i(e,t){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,i);var r,o=(r=n.call(this,e,t)).props,a=o.isActive,s=o.attributeName,l=o.from,c=o.to,u=o.steps,h=o.children,f=o.duration;if(r.handleStyleChange=r.handleStyleChange.bind(nI(r)),r.changeStyle=r.changeStyle.bind(nI(r)),!a||f<=0)return r.state={style:{}},"function"==typeof h&&(r.state={style:c}),nM(r);if(u&&u.length)r.state={style:u[0].style};else if(l){if("function"==typeof h)return r.state={style:l},nM(r);r.state={style:s?nT({},s,l):l}}else r.state={style:{}};return r}return r=[{key:"componentDidMount",value:function(){var e=this.props,t=e.isActive,r=e.canBegin;this.mounted=!0,t&&r&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(e){var t=this.props,r=t.isActive,n=t.canBegin,i=t.attributeName,o=t.shouldReAnimate,a=t.to,s=t.from,l=this.state.style;if(n){if(!r){var c={style:i?nT({},i,a):a};this.state&&l&&(i&&l[i]!==a||!i&&l!==a)&&this.setState(c);return}if(!r2(e.to,a)||!e.canBegin||!e.isActive){var u=!e.canBegin||!e.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var h=u||o?s:e.to;if(this.state&&l){var f={style:i?nT({},i,h):h};(i&&l[i]!==h||!i&&l!==h)&&this.setState(f)}this.runAnimation(nP(nP({},this.props),{},{from:h,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var e=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),e&&e()}},{key:"handleStyleChange",value:function(e){this.changeStyle(e)}},{key:"changeStyle",value:function(e){this.mounted&&this.setState({style:e})}},{key:"runJSAnimation",value:function(e){var t=this,r=e.from,n=e.to,i=e.duration,o=e.easing,a=e.begin,s=e.onAnimationEnd,l=e.onAnimationStart,c=nk(r,n,nf(o),i,this.changeStyle);this.manager.start([l,a,function(){t.stopJSAnimation=c()},i,s])}},{key:"runStepAnimation",value:function(e){var t=this,r=e.steps,n=e.begin,i=e.onAnimationStart,o=r[0],a=o.style,s=o.duration;return this.manager.start([i].concat(n_(r.reduce(function(e,n,i){if(0===i)return e;var o=n.duration,a=n.easing,s=void 0===a?"ease":a,l=n.style,c=n.properties,u=n.onAnimationEnd,h=i>0?r[i-1]:n,f=c||Object.keys(l);if("function"==typeof s||"spring"===s)return[].concat(n_(e),[t.runJSAnimation.bind(t,{from:h.style,to:l,duration:o,easing:s}),o]);var d=nn(f,o,s),p=nP(nP(nP({},h.style),l),{},{transition:d});return[].concat(n_(e),[p,o,u]).filter(nt)},[a,Math.max(void 0===s?0:s,n)])),[e.onAnimationEnd]))}},{key:"runAnimation",value:function(e){if(!this.manager){var t,r,n;this.manager=(t=function(){return null},r=!1,n=function e(n){if(!r){if(Array.isArray(n)){if(!n.length)return;var i=function(e){if(Array.isArray(e))return e}(n)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||function(e,t){if(e){if("string"==typeof e)return r6(e,void 0);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return r6(e,void 0)}}
1(n)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),o=i[0],a=i.slice(1);if("number"==typeof o){r5(e.bind(null,a),o);return}e(o),r5(e.bind(null,a));return}"object"===r4(n)&&t(n),"function"==typeof n&&n()}},{stop:function(){r=!0},start:function(e){r=!1,n(e)},subscribe:function(e){return t=e,function(){t=function(){return null}}}})}var i=e.begin,o=e.duration,a=e.attributeName,s=e.to,l=e.easing,c=e.onAnimationStart,u=e.onAnimationEnd,h=e.steps,f=e.children,d=this.manager;if(this.unSubscribe=d.subscribe(this.handleStyleChange),"function"==typeof l||"function"==typeof f||"spring"===l){this.runJSAnimation(e);return}if(h.length>1){this.runStepAnimation(e);return}var p=a?nT({},a,s):s,y=nn(Object.keys(p),o,l);d.start([c,i,nP(nP({},p),{},{transition:y}),o,u])}},{key:"render",value:function(){var e=this.props,t=e.children,r=(e.begin,e.duration),n=(e.attributeName,e.easing,e.isActive),i=(e.steps,e.from,e.to,e.canBegin,e.onAnimationEnd,e.shouldReAnimate,e.onAnimationReStart,function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,nS)),o=P.Children.count(t),a=this.state.style;if("function"==typeof t)return t(a);if(!n||0===o||r<=0)return t;var s=function(e){var t=e.props,r=t.style,n=t.className;return(0,P.cloneElement)(e,nP(nP({},i),{},{style:nP(nP({},void 0===r?{}:r),a),className:n}))};return 1===o?s(P.Children.only(t)):P.createElement("div",null,P.Children.map(t,function(e){return s(e)}))}}],function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,nN(n.key),n)}}(i.prototype,r),Object.defineProperty(i,"prototype",{writable:!1}),i}(P.PureComponent);function nL(e){return(nL="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function nB(){return(nB=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function n$(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function nU(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function nq(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?nU(Object(r),!0).forEach(function(t){var n,i;n=t,i=r[t],(n=function(e){var t=function(e,t){if("object"!=nL(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=nL(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==nL(t)?t:t+""}(n))in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):nU(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}nD.displayName="Animate",nD.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}},nD.propTypes={from:rA().oneOfType([rA().object,rA().string]),to:rA().oneOfType([rA().object,rA().string]),attributeName:rA().string,duration:rA().number,begin:rA().number,easing:rA().oneOfType([rA().string,rA().func]),steps:rA().arrayOf(rA().shape({duration:rA().number.isRequired,style:rA().object.isRequired,easing:rA().oneOfType([rA().oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),rA().func]),properties:rA().arrayOf("string"),onAnimationEnd:rA().func})),children:rA().oneOfType([rA().node,rA().func]),isActive:rA().bool,canBegin:rA().bool,onAnimationEnd:rA().func,shouldReAnimate:rA().bool,onAnimationStart:rA().func,onAnimationReStart:rA().func};var nz=function(e,t,r,n,i){var o,a=Math.min(Math.abs(r)/2,Math.abs(n)/2),s=n>=0?1:-1,l=r>=0?1:-1,c=n>=0&&r>=0||n<0&&r<0?1:0;if(a>0&&i instanceof Array){for(var u=[0,0,0,0],h=0;h<4;h++)u[h]=i[h]>a?a:i[h];o="M".concat(e,",").concat(t+s*u[0]),u[0]>0&&(o+="A ".concat(u[0],",").concat(u[0],",0,0,").concat(c,",").concat(e+l*u[0],",").concat(t)),o+="L ".concat(e+r-l*u[1],",").concat(t),u[1]>0&&(o+="A ".concat(u[1],",").concat(u[1],",0,0,").concat(c,",\n        ").concat(e+r,",").concat(t+s*u[1])),o+="L ".concat(e+r,",").concat(t+n-s*u[2]),u[2]>0&&(o+="A ".concat(u[2],",").concat(u[2],",0,0,").concat(c,",\n        ").concat(e+r-l*u[2],",").concat(t+n)),o+="L ".concat(e+l*u[3],",").concat(t+n),u[3]>0&&(o+="A ".concat(u[3],",").concat(u[3],",0,0,").concat(c,",\n        ").concat(e,",").concat(t+n-s*u[3])),o+="Z"}else if(a>0&&i===+i&&i>0){var f=Math.min(a,i);o="M ".concat(e,",").concat(t+s*f,"\n            A ").concat(f,",").concat(f,",0,0,").concat(c,",").concat(e+l*f,",").concat(t,"\n            L ").concat(e+r-l*f,",").concat(t,"\n            A ").concat(f,",").concat(f,",0,0,").concat(c,",").concat(e+r,",").concat(t+s*f,"\n            L ").concat(e+r,",").concat(t+n-s*f,"\n            A ").concat(f,",").concat(f,",0,0,").concat(c,",").concat(e+r-l*f,",").concat(t+n,"\n            L ").concat(e+l*f,",").concat(t+n,"\n            A ").concat(f,",").concat(f,",0,0,").concat(c,",").concat(e,",").concat(t+n-s*f," Z")}else o="M ".concat(e,",").concat(t," h ").concat(r," v ").concat(n," h ").concat(-r," Z");return o},nF=function(e,t){if(!e||!t)return!1;var r=e.x,n=e.y,i=t.x,o=t.y,a=t.width,s=t.height;return!!(Math.abs(a)>0&&Math.abs(s)>0)&&r>=Math.min(i,i+a)&&r<=Math.max(i,i+a)&&n>=Math.min(o,o+s)&&n<=Math.max(o,o+s)},nW={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},nH=function(e){var t,r=nq(nq({},nW),e),n=(0,P.useRef)(),i=function(e){if(Array.isArray(e))return e}(t=(0,P.useState)(-1))||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,s=[],l=!0,c=!1;try{for(o=(r=r.call(e)).next;!(l=(n=o.call(r)).done)&&(s.push(n.value),2!==s.length);l=!0);}catch(e){c=!0,i=e}
1finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(t,2)||function(e,t){if(e){if("string"==typeof e)return n$(e,2);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return n$(e,2)}}(t,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),o=i[0],a=i[1];(0,P.useEffect)(function(){if(n.current&&n.current.getTotalLength)try{var e=n.current.getTotalLength();e&&a(e)}catch(e){}},[]);var s=r.x,l=r.y,c=r.width,u=r.height,h=r.radius,f=r.className,d=r.animationEasing,p=r.animationDuration,y=r.animationBegin,m=r.isAnimationActive,g=r.isUpdateAnimationActive;if(s!==+s||l!==+l||c!==+c||u!==+u||0===c||0===u)return null;var v=W("recharts-rectangle",f);return g?P.createElement(nD,{canBegin:o>0,from:{width:c,height:u,x:s,y:l},to:{width:c,height:u,x:s,y:l},duration:p,animationEasing:d,isActive:g},function(e){var t=e.width,i=e.height,a=e.x,s=e.y;return P.createElement(nD,{canBegin:o>0,from:"0px ".concat(-1===o?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:y,duration:p,isActive:m,easing:d},P.createElement("path",nB({},eF(r,!0),{className:v,d:nz(a,s,t,i,h),ref:n})))}):P.createElement("path",nB({},eF(r,!0),{className:v,d:nz(s,l,c,u,h)}))};function nV(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function nK(e,t){switch(arguments.length){case 0:break;case 1:"function"==typeof e?this.interpolator(e):this.range(e);break;default:this.domain(e),"function"==typeof t?this.interpolator(t):this.range(t)}return this}class nG extends Map{constructor(e,t=nJ){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),null!=e)for(let[t,r]of e)this.set(t,r)}get(e){return super.get(nZ(this,e))}has(e){return super.has(nZ(this,e))}set(e,t){return super.set(function({_intern:e,_key:t},r){let n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}(this,e),t)}delete(e){return super.delete(function({_intern:e,_key:t},r){let n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}(this,e))}}function nZ({_intern:e,_key:t},r){let n=t(r);return e.has(n)?e.get(n):r}function nJ(e){return null!==e&&"object"==typeof e?e.valueOf():e}let nY=Symbol("implicit");function nX(){var e=new nG,t=[],r=[],n=nY;function i(i){let o=e.get(i);if(void 0===o){if(n!==nY)return n;e.set(i,o=t.push(i)-1)}return r[o%r.length]}return i.domain=function(r){if(!arguments.length)return t.slice();for(let n of(t=[],e=new nG,r))e.has(n)||e.set(n,t.push(n)-1);return i},i.range=function(e){return arguments.length?(r=Array.from(e),i):r.slice()},i.unknown=function(e){return arguments.length?(n=e,i):n},i.copy=function(){return nX(t,r).unknown(n)},nV.apply(i,arguments),i}function nQ(){var e,t,r=nX().unknown(void 0),n=r.domain,i=r.range,o=0,a=1,s=!1,l=0,c=0,u=.5;function h(){var r=n().length,h=a<o,f=h?a:o,d=h?o:a;e=(d-f)/Math.max(1,r-l+2*c),s&&(e=Math.floor(e)),f+=(d-f-e*(r-l))*u,t=e*(1-l),s&&(f=Math.round(f),t=Math.round(t));var p=(function(e,t,r){e=+e,t=+t,r=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+r;for(var n=-1,i=0|Math.max(0,Math.ceil((t-e)/r)),o=Array(i);++n<i;)o[n]=e+n*r;return o})(r).map(function(t){return f+e*t});return i(h?p.reverse():p)}return delete r.unknown,r.domain=function(e){return arguments.length?(n(e),h()):n()},r.range=function(e){return arguments.length?([o,a]=e,o=+o,a=+a,h()):[o,a]},r.rangeRound=function(e){return[o,a]=e,o=+o,a=+a,s=!0,h()},r.bandwidth=function(){return t},r.step=function(){return e},r.round=function(e){return arguments.length?(s=!!e,h()):s},r.padding=function(e){return arguments.length?(l=Math.min(1,c=+e),h()):l},r.paddingInner=function(e){return arguments.length?(l=Math.min(1,e),h()):l},r.paddingOuter=function(e){return arguments.length?(c=+e,h()):c},r.align=function(e){return arguments.length?(u=Math.max(0,Math.min(1,e)),h()):u},r.copy=function(){return nQ(n(),[o,a]).round(s).paddingInner(l).paddingOuter(c).align(u)},nV.apply(h(),arguments)}function n0(){return function e(t){var r=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return e(r())},t}(nQ.apply(null,arguments).paddingInner(1))}function n1(e){return(n1="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function n2(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function n3(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
1t%2?n2(Object(r),!0).forEach(function(t){var n,i;n=t,i=r[t],(n=function(e){var t=function(e,t){if("object"!=n1(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=n1(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==n1(t)?t:t+""}(n))in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n2(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var n5={widthCache:{},cacheCount:0},n4={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},n6="recharts_measurement_span",n8=function(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(null==e||tx.isSsr)return{width:0,height:0};var n=(Object.keys(t=n3({},r)).forEach(function(e){t[e]||delete t[e]}),t),i=JSON.stringify({text:e,copyStyle:n});if(n5.widthCache[i])return n5.widthCache[i];try{var o=document.getElementById(n6);o||((o=document.createElement("span")).setAttribute("id",n6),o.setAttribute("aria-hidden","true"),document.body.appendChild(o));var a=n3(n3({},n4),n);Object.assign(o.style,a),o.textContent="".concat(e);var s=o.getBoundingClientRect(),l={width:s.width,height:s.height};return n5.widthCache[i]=l,++n5.cacheCount>2e3&&(n5.cacheCount=0,n5.widthCache={}),l}catch(e){return{width:0,height:0}}};function n7(e){return(n7="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function n9(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,s=[],l=!0,c=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return ie(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ie(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ie(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function it(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,function(e){var t=function(e,t){if("object"!=n7(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=n7(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==n7(t)?t:t+""}(n.key),n)}}var ir=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,ii=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,io=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,ia=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,is={cm:96/2.54,mm:96/25.4,pt:96/72,pc:16,in:96,Q:96/101.6,px:1},il=Object.keys(is),ic=function(){var e,t;function r(e,t){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,r),this.num=e,this.unit=t,this.num=e,this.unit=t,Number.isNaN(e)&&(this.unit=""),""===t||io.test(t)||(this.num=NaN,this.unit=""),il.includes(t)&&(this.num=e*is[t],this.unit="px")}return e=[{key:"add",value:function(e){return this.unit!==e.unit?new r(NaN,""):new r(this.num+e.num,this.unit)}},{key:"subtract",value:function(e){return this.unit!==e.unit?new r(NaN,""):new r(this.num-e.num,this.unit)}},{key:"multiply",value:function(e){return""!==this.unit&&""!==e.unit&&this.unit!==e.unit?new r(NaN,""):new r(this.num*e.num,this.unit||e.unit)}},{key:"divide",value:function(e){return""!==this.unit&&""!==e.unit&&this.unit!==e.unit?new r(NaN,""):new r(this.num/e.num,this.unit||e.unit)}},{key:"toString",value:function(){return"".concat(this.num).concat(this.unit)}},{key:"isNaN",value:function(){return Number.isNaN(this.num)}}],t=[{key:"parse",value:function(e){var t,n=n9(null!==(t=ia.exec(e))&&void 0!==t?t:[],3),i=n[1],o=n[2];return new r(parseFloat(i),null!=o?o:"")}}],e&&it(r.prototype,e),t&&it(r,t),Object.defineProperty(r,"prototype",{writable:!1}),r}();function iu(e){if(e.includes("NaN"))return"NaN";for(var t=e;t.includes("*")||t.includes("/");){var r,n=n9(null!==(r=ir.exec(t))&&void 0!==r?r:[],4),i=n[1],o=n[2],a=n[3],s=ic.parse(null!=i?i:""),l=ic.parse(null!=a?a:""),c="*"===o?s.multiply(l):s.divide(l);if(c.isNaN())return"NaN";t=t.replace(ir,c.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var u,h=n9(null!==(u=ii.exec(t))&&void 0!==u?u:[],4),f=h[1],d=h[2],p=h[3],y=ic.parse(null!=f?f:""),m=ic.parse(null!=p?p:""),g="+"===d?y.add(m):y.subtract(m);if(g.isNaN())return"NaN";t=t.replace(ii,g.toString())}return t}var ih=/\(([^()]*)\)/;function id(e){var t=function(e){try{var t;return t=e.replace(/\s+/g,""),t=function(e){for(var t=e;t.includes("(");){var r=n9(ih.exec(t),2)[1];t=t.replace(ih,iu(r))}return t}(t),t=iu(t)}catch(e){return"NaN"}}(e.slice(5,-1));return"NaN"===t?"":t}var ip=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],iy=["dx","dy","angle","className","breakAll"];function im(){return(im=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];
1for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function ig(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function iv(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,s=[],l=!0,c=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return ib(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ib(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ib(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var iw=/[ \f\n\r\t\v\u2028\u2029]+/,ix=function(e){var t=e.children,r=e.breakAll,n=e.style;try{var i=[];er()(t)||(i=r?t.toString().split(""):t.toString().split(iw));var o=i.map(function(e){return{word:e,width:n8(e,n).width}}),a=r?0:n8("\xa0",n).width;return{wordsWithComputedWidth:o,spaceWidth:a}}catch(e){return null}},iO=function(e,t,r,n,i){var o,a=e.maxLines,s=e.children,l=e.style,c=e.breakAll,u=eo(a),h=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.reduce(function(e,t){var o=t.word,a=t.width,s=e[e.length-1];return s&&(null==n||i||s.width+a+r<Number(n))?(s.words.push(o),s.width+=a+r):e.push({words:[o],width:a}),e},[])},f=h(t);if(!u)return f;for(var d=function(e){var t=h(ix({breakAll:c,style:l,children:s.slice(0,e)+"…"}).wordsWithComputedWidth);return[t.length>a||t.reduce(function(e,t){return e.width>t.width?e:t}).width>Number(n),t]},p=0,y=s.length-1,m=0;p<=y&&m<=s.length-1;){var g=Math.floor((p+y)/2),v=iv(d(g-1),2),b=v[0],w=v[1],x=iv(d(g),1)[0];if(b||x||(p=g+1),b&&x&&(y=g-1),!b&&x){o=w;break}m++}return o||f},ik=function(e){return[{words:er()(e)?[]:e.toString().split(iw)}]},ij=function(e){var t=e.width,r=e.scaleToFit,n=e.children,i=e.style,o=e.breakAll,a=e.maxLines;if((t||r)&&!tx.isSsr){var s=ix({breakAll:o,children:n,style:i});return s?iO({breakAll:o,children:n,maxLines:a,style:i},s.wordsWithComputedWidth,s.spaceWidth,t,r):ik(n)}return ik(n)},iS="#808080",i_=function(e){var t,r=e.x,n=void 0===r?0:r,i=e.y,o=void 0===i?0:i,a=e.lineHeight,s=void 0===a?"1em":a,l=e.capHeight,c=void 0===l?"0.71em":l,u=e.scaleToFit,h=void 0!==u&&u,f=e.textAnchor,d=e.verticalAnchor,p=e.fill,y=void 0===p?iS:p,m=ig(e,ip),g=(0,P.useMemo)(function(){return ij({breakAll:m.breakAll,children:m.children,maxLines:m.maxLines,scaleToFit:h,style:m.style,width:m.width})},[m.breakAll,m.children,m.maxLines,h,m.style,m.width]),v=m.dx,b=m.dy,w=m.angle,x=m.className,O=m.breakAll,k=ig(m,iy);if(!ea(n)||!ea(o))return null;var j=n+(eo(v)?v:0),S=o+(eo(b)?b:0);switch(void 0===d?"end":d){case"start":t=id("calc(".concat(c,")"));break;case"middle":t=id("calc(".concat((g.length-1)/2," * -").concat(s," + (").concat(c," / 2))"));break;default:t=id("calc(".concat(g.length-1," * -").concat(s,")"))}var _=[];if(h){var E=g[0].width,A=m.width;_.push("scale(".concat((eo(A)?A/E:1)/E,")"))}return w&&_.push("rotate(".concat(w,", ").concat(j,", ").concat(S,")")),_.length&&(k.transform=_.join(" ")),P.createElement("text",im({},eF(k,!0),{x:j,y:S,className:W("recharts-text",x),textAnchor:void 0===f?"start":f,fill:y.includes("url")?iS:y}),g.map(function(e,r){var n=e.words.join(O?"":" ");return P.createElement("tspan",{x:j,dy:0===r?t:s,key:"".concat(n,"-").concat(r)},n)}))};let iE=Math.sqrt(50),iA=Math.sqrt(10),iP=Math.sqrt(2);function iT(e,t,r){let n,i,o;let a=(t-e)/Math.max(0,r),s=Math.floor(Math.log10(a)),l=a/Math.pow(10,s),c=l>=iE?10:l>=iA?5:l>=iP?2:1;return(s<0?(n=Math.round(e*(o=Math.pow(10,-s)/c)),i=Math.round(t*o),n/o<e&&++n,i/o>t&&--i,o=-o):(n=Math.round(e/(o=Math.pow(10,s)*c)),i=Math.round(t/o),n*o<e&&++n,i*o>t&&--i),i<n&&.5<=r&&r<2)?iT(e,t,2*r):[n,i,o]}function iN(e,t,r){if(t=+t,e=+e,!((r=+r)>0))return[];if(e===t)return[e];let n=t<e,[i,o,a]=n?iT(t,e,r):iT(e,t,r);if(!(o>=i))return[];let s=o-i+1,l=Array(s);if(n){if(a<0)for(let e=0;e<s;++e)l[e]=-((o-e)/a);else for(let e=0;e<s;++e)l[e]=(o-e)*a}else if(a<0)for(let e=0;e<s;++e)l[e]=-((i+e)/a);else for(let e=0;e<s;++e)l[e]=(i+e)*a;return l}function iC(e,t,r){return iT(e=+e,t=+t,r=+r)[2]}function iM(e,t,r){t=+t,e=+e,r=+r;let n=t<e,i=n?iC(t,e,r):iC(e,t,r);return(n?-1:1)*(i<0?-(1/i):i)}function iI(e,t){return null==e||null==t?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function iR(e,t){return null==e||null==t?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function iD(e){let t,r,n;
1function i(e,n,i=0,o=e.length){if(i<o){if(0!==t(n,n))return o;do{let t=i+o>>>1;0>r(e[t],n)?i=t+1:o=t}while(i<o)}return i}return 2!==e.length?(t=iI,r=(t,r)=>iI(e(t),r),n=(t,r)=>e(t)-r):(t=e===iI||e===iR?e:iL,r=e,n=e),{left:i,center:function(e,t,r=0,o=e.length){let a=i(e,t,r,o-1);return a>r&&n(e[a-1],t)>-n(e[a],t)?a-1:a},right:function(e,n,i=0,o=e.length){if(i<o){if(0!==t(n,n))return o;do{let t=i+o>>>1;0>=r(e[t],n)?i=t+1:o=t}while(i<o)}return i}}}function iL(){return 0}function iB(e){return null===e?NaN:+e}let i$=iD(iI),iU=i$.right;function iq(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function iz(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function iF(){}i$.left,iD(iB).center;var iW="\\s*([+-]?\\d+)\\s*",iH="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",iV="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",iK=/^#([0-9a-f]{3,8})$/,iG=RegExp(`^rgb\\(${iW},${iW},${iW}\\)$`),iZ=RegExp(`^rgb\\(${iV},${iV},${iV}\\)$`),iJ=RegExp(`^rgba\\(${iW},${iW},${iW},${iH}\\)$`),iY=RegExp(`^rgba\\(${iV},${iV},${iV},${iH}\\)$`),iX=RegExp(`^hsl\\(${iH},${iV},${iV}\\)$`),iQ=RegExp(`^hsla\\(${iH},${iV},${iV},${iH}\\)$`),i0={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function i1(){return this.rgb().formatHex()}function i2(){return this.rgb().formatRgb()}function i3(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=iK.exec(e))?(r=t[1].length,t=parseInt(t[1],16),6===r?i5(t):3===r?new i8(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===r?i4(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===r?i4(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=iG.exec(e))?new i8(t[1],t[2],t[3],1):(t=iZ.exec(e))?new i8(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=iJ.exec(e))?i4(t[1],t[2],t[3],t[4]):(t=iY.exec(e))?i4(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=iX.exec(e))?on(t[1],t[2]/100,t[3]/100,1):(t=iQ.exec(e))?on(t[1],t[2]/100,t[3]/100,t[4]):i0.hasOwnProperty(e)?i5(i0[e]):"transparent"===e?new i8(NaN,NaN,NaN,0):null}function i5(e){return new i8(e>>16&255,e>>8&255,255&e,1)}function i4(e,t,r,n){return n<=0&&(e=t=r=NaN),new i8(e,t,r,n)}function i6(e,t,r,n){var i;return 1==arguments.length?((i=e)instanceof iF||(i=i3(i)),i)?new i8((i=i.rgb()).r,i.g,i.b,i.opacity):new i8:new i8(e,t,r,null==n?1:n)}function i8(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function i7(){return`#${or(this.r)}${or(this.g)}${or(this.b)}`}function i9(){let e=oe(this.opacity);return`${1===e?"rgb(":"rgba("}${ot(this.r)}, ${ot(this.g)}, ${ot(this.b)}${1===e?")":`, ${e})`}`}function oe(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function ot(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function or(e){return((e=ot(e))<16?"0":"")+e.toString(16)}function on(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new oo(e,t,r,n)}function oi(e){if(e instanceof oo)return new oo(e.h,e.s,e.l,e.opacity);if(e instanceof iF||(e=i3(e)),!e)return new oo;if(e instanceof oo)return e;var t=(e=e.rgb()).r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),o=Math.max(t,r,n),a=NaN,s=o-i,l=(o+i)/2;return s?(a=t===o?(r-n)/s+(r<n)*6:r===o?(n-t)/s+2:(t-r)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new oo(a,s,l,e.opacity)}function oo(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function oa(e){return(e=(e||0)%360)<0?e+360:e}function os(e){return Math.max(0,Math.min(1,e||0))}function ol(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}function oc(e,t,r,n,i){var o=e*e,a=o*e;return((1-3*e+3*o-a)*t+(4-6*o+3*a)*r+(1+3*e+3*o-3*a)*n+a*i)/6}iq(iF,i3,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:i1,formatHex:i1,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return oi(this).formatHsl()},formatRgb:i2,toString:i2}),iq(i8,i6,iz(iF,{brighter(e){return e=null==e?1.428571428571428
16:Math.pow(1.4285714285714286,e),new i8(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new i8(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new i8(ot(this.r),ot(this.g),ot(this.b),oe(this.opacity))},displayable(){return -.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:i7,formatHex:i7,formatHex8:function(){return`#${or(this.r)}${or(this.g)}${or(this.b)}${or((isNaN(this.opacity)?1:this.opacity)*255)}`},formatRgb:i9,toString:i9})),iq(oo,function(e,t,r,n){return 1==arguments.length?oi(e):new oo(e,t,r,null==n?1:n)},iz(iF,{brighter(e){return e=null==e?1.4285714285714286:Math.pow(1.4285714285714286,e),new oo(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new oo(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new i8(ol(e>=240?e-240:e+120,i,n),ol(e,i,n),ol(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new oo(oa(this.h),os(this.s),os(this.l),oe(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let e=oe(this.opacity);return`${1===e?"hsl(":"hsla("}${oa(this.h)}, ${100*os(this.s)}%, ${100*os(this.l)}%${1===e?")":`, ${e})`}`}}));var ou=e=>()=>e;function oh(e,t){var r=t-e;return r?function(t){return e+t*r}:ou(isNaN(e)?t:e)}var of=function e(t){var r,n=1==(r=+(r=t))?oh:function(e,t){var n,i,o;return t-e?(n=e,i=t,n=Math.pow(n,o=r),i=Math.pow(i,o)-n,o=1/o,function(e){return Math.pow(n+e*i,o)}):ou(isNaN(e)?t:e)};function i(e,t){var r=n((e=i6(e)).r,(t=i6(t)).r),i=n(e.g,t.g),o=n(e.b,t.b),a=oh(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=o(t),e.opacity=a(t),e+""}}return i.gamma=e,i}(1);function od(e){return function(t){var r,n,i=t.length,o=Array(i),a=Array(i),s=Array(i);for(r=0;r<i;++r)n=i6(t[r]),o[r]=n.r||0,a[r]=n.g||0,s[r]=n.b||0;return o=e(o),a=e(a),s=e(s),n.opacity=1,function(e){return n.r=o(e),n.g=a(e),n.b=s(e),n+""}}}function op(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}od(function(e){var t=e.length-1;return function(r){var n=r<=0?r=0:r>=1?(r=1,t-1):Math.floor(r*t),i=e[n],o=e[n+1],a=n>0?e[n-1]:2*i-o,s=n<t-1?e[n+2]:2*o-i;return oc((r-n/t)*t,a,i,o,s)}}),od(function(e){var t=e.length;return function(r){var n=Math.floor(((r%=1)<0?++r:r)*t),i=e[(n+t-1)%t],o=e[n%t],a=e[(n+1)%t],s=e[(n+2)%t];return oc((r-n/t)*t,i,o,a,s)}});var oy=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,om=RegExp(oy.source,"g");function og(e,t){var r,n,i=typeof t;return null==t||"boolean"===i?ou(t):("number"===i?op:"string"===i?(n=i3(t))?(t=n,of):function(e,t){var r,n,i,o,a,s=oy.lastIndex=om.lastIndex=0,l=-1,c=[],u=[];for(e+="",t+="";(i=oy.exec(e))&&(o=om.exec(t));)(a=o.index)>s&&(a=t.slice(s,a),c[l]?c[l]+=a:c[++l]=a),(i=i[0])===(o=o[0])?c[l]?c[l]+=o:c[++l]=o:(c[++l]=null,u.push({i:l,x:op(i,o)})),s=om.lastIndex;return s<t.length&&(a=t.slice(s),c[l]?c[l]+=a:c[++l]=a),c.length<2?u[0]?(r=u[0].x,function(e){return r(e)+""}):(n=t,function(){return n}):(t=u.length,function(e){for(var r,n=0;n<t;++n)c[(r=u[n]).i]=r.x(e);return c.join("")})}:t instanceof i3?of:t instanceof Date?function(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}:!ArrayBuffer.isView(r=t)||r instanceof DataView?Array.isArray(t)?function(e,t){var r,n=t?t.length:0,i=e?Math.min(n,e.length):0,o=Array(i),a=Array(n);for(r=0;r<i;++r)o[r]=og(e[r],t[r]);for(;r<n;++r)a[r]=t[r];return function(e){for(r=0;r<i;++r)a[r]=o[r](e);return a}}:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?function(e,t){var r,n={},i={};for(r in(null===e||"object"!=typeof e)&&(e={}),(null===t||"object"!=typeof t)&&(t={}),t)r in e?n[r]=og(e[r],t[r]):i[r]=t[r];return function(e){for(r in n)i[r]=n[r](e);return i}}:op:function(e,t){t||(t=[]);var r,n=e?Math.min(t.length,e.length):0,i=t.slice();return function(o){for(r=0;r<n;++r)i[r]=e[r]*(1-o)+t[r]*o;return i}})(e,t)}function ov(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function ob(e){return+e}var ow=[0,1];function ox(e){return e}function oO(e,t){var r;return(t-=e=+e)?function(r){return(r-e)/t}:(r=isNaN(t)?NaN:.5,function(){return r})}function ok(e,t,r){var n=e[0],i=e[1],o=t[0],a=t[1];return i<n?(n=oO(i,n),o=r(a,o)):(n=oO(n,i),o=r(o,a)),function(e){return o(n(e))}}function oj(e,t,r){var n=Math.min(e.length,t.length)-1,i=Array(n),o=Array(n),a=-1;for(e[n]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<n;)i[a]=oO(e[a],e[a+1]),o[a]=r(t[a],t[a+1]);return function(t){var r=iU(e,t,1,n)-1;return o[r](i[r](t))}}function oS(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function o_(){var e,t,r,n,i,o,a=ow,s=ow,l=og,c=ox;function u(){var e,t,r,l=Math.min(a.length,s.length);return c!==ox&&(e=a[0],t=a[l-1],e>t&&(r=e,e=t,t=r),c=function(r){return Math.max(e,Math.min(t,r))}),n=l>2?oj:ok,i=o=null,h}function h(t){return null==t||isNaN(t=+t)?r:(i||(i=n(a.map(e),s,l)))(e(c(t)))}return h.invert=function(r){return c(t((o||(o=n(s,a.map(e),op)))(r)))},h.domain=function(e){return arguments.length?(a=Array.from(e,ob),u()):a.slice()},h.range=function(e){return arguments.length?(s=Array.from(e),u()):s.slice()},h.rangeRound=function(e){return s=Array.from(e),l=ov,u()},h.clamp=function(e){return arguments.length?(c=!!e||ox,u()):c!==ox},h.interpolate=function(e){return arguments.length?(l=e,u()):l},h.unknown=function(e){return arguments.length?(r=e,h):r},function(r,n){return e=r,t=n,u()}}function oE(){return o_()(ox,ox)}
1var oA=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function oP(e){var t;if(!(t=oA.exec(e)))throw Error("invalid format: "+e);return new oT({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function oT(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function oN(e,t){if((r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var r,n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function oC(e){return(e=oN(Math.abs(e)))?e[1]:NaN}function oM(e,t){var r=oN(e,t);if(!r)return e+"";var n=r[0],i=r[1];return i<0?"0."+Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+Array(i-n.length+2).join("0")}oP.prototype=oT.prototype,oT.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var oI={"%":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>oM(100*e,t),r:oM,s:function(e,t){var r=oN(e,t);if(!r)return e+"";var n=r[0],i=r[1],o=i-(w=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=n.length;return o===a?n:o>a?n+Array(o-a+1).join("0"):o>0?n.slice(0,o)+"."+n.slice(o):"0."+Array(1-o).join("0")+oN(e,Math.max(0,t+o-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function oR(e){return e}var oD=Array.prototype.map,oL=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"];function oB(e,t,r,n){var i,o,a=iM(e,t,r);switch((n=oP(null==n?",f":n)).type){case"s":var s=Math.max(Math.abs(e),Math.abs(t));return null!=n.precision||isNaN(o=Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(oC(s)/3)))-oC(Math.abs(a))))||(n.precision=o),k(n,s);case"":case"e":case"g":case"p":case"r":null!=n.precision||isNaN(o=Math.max(0,oC(Math.abs(Math.max(Math.abs(e),Math.abs(t)))-(i=Math.abs(i=a)))-oC(i))+1)||(n.precision=o-("e"===n.type));break;case"f":case"%":null!=n.precision||isNaN(o=Math.max(0,-oC(Math.abs(a))))||(n.precision=o-("%"===n.type)*2)}return O(n)}function o$(e){var t=e.domain;return e.ticks=function(e){var r=t();return iN(r[0],r[r.length-1],null==e?10:e)},e.tickFormat=function(e,r){var n=t();return oB(n[0],n[n.length-1],null==e?10:e,r)},e.nice=function(r){null==r&&(r=10);var n,i,o=t(),a=0,s=o.length-1,l=o[a],c=o[s],u=10;for(c<l&&(i=l,l=c,c=i,i=a,a=s,s=i);u-- >0;){if((i=iC(l,c,r))===n)return o[a]=l,o[s]=c,t(o);if(i>0)l=Math.floor(l/i)*i,c=Math.ceil(c/i)*i;else if(i<0)l=Math.ceil(l*i)/i,c=Math.floor(c*i)/i;else break;n=i}return e},e}function oU(){var e=oE();return e.copy=function(){return oS(e,oU())},nV.apply(e,arguments),o$(e)}function oq(e,t){e=e.slice();var r,n=0,i=e.length-1,o=e[n],a=e[i];return a<o&&(r=n,n=i,i=r,r=o,o=a,a=r),e[n]=t.floor(o),e[i]=t.ceil(a),e}function oz(e){return Math.log(e)}function oF(e){return Math.exp(e)}function oW(e){return-Math.log(-e)}function oH(e){return-Math.exp(-e)}function oV(e){return isFinite(e)?+("1e"+e):e<0?0:e}function oK(e){return(t,r)=>-e(-t,r)}function oG(e){let t,r;let n=e(oz,oF),i=n.domain,o=10;function a(){var a,s;return t=(a=o)===Math.E?Math.log:10===a&&Math.log10||2===a&&Math.log2||(a=Math.log(a),e=>Math.log(e)/a),r=10===(s=o)?oV:s===Math.E?Math.exp:e=>Math.pow(s,e),i()[0]<0?(t=oK(t),r=oK(r),e(oW,oH)):e(oz,oF),n}return n.base=function(e){return arguments.length?(o=+e,a()):o},n.domain=function(e){return arguments.length?(i(e),a()):i()},n.ticks=e=>{let n,a;let s=i(),l=s[0],c=s[s.length-1],u=c<l;u&&([l,c]=[c,l]);let h=t(l),f=t(c),d=null==e?10:+e,p=[];if(!(o%1)&&f-h<d){if(h=Math.floor(h),f=Math.ceil(f),l>0){for(;h<=f;++h)for(n=1;n<o;++n)if(!((a=h<0?n/r(-h):n*r(h))<l)){if(a>c)break;p.push(a)}}else for(;h<=f;++h)for(n=o-1;n>=1;--n)if(!((a=h>0?n/r(-h):n*r(h))<l)){if(a>c)break;p.push(a)}2*p.length<d&&(p=iN(l,c,d))}else p=iN(h,f,Math.min(f-h,d)).map(r);return u?p.reverse():p}
1,n.tickFormat=(e,i)=>{if(null==e&&(e=10),null==i&&(i=10===o?"s":","),"function"!=typeof i&&(o%1||null!=(i=oP(i)).precision||(i.trim=!0),i=O(i)),e===1/0)return i;let a=Math.max(1,o*e/n.ticks().length);return e=>{let n=e/r(Math.round(t(e)));return n*o<o-.5&&(n*=o),n<=a?i(e):""}},n.nice=()=>i(oq(i(),{floor:e=>r(Math.floor(t(e))),ceil:e=>r(Math.ceil(t(e)))})),n}function oZ(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function oJ(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function oY(e){var t=1,r=e(oZ(1),oJ(t));return r.constant=function(r){return arguments.length?e(oZ(t=+r),oJ(t)):t},o$(r)}function oX(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function oQ(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function o0(e){return e<0?-e*e:e*e}function o1(e){var t=e(ox,ox),r=1;return t.exponent=function(t){return arguments.length?1==(r=+t)?e(ox,ox):.5===r?e(oQ,o0):e(oX(r),oX(1/r)):r},o$(t)}function o2(){var e=o1(o_());return e.copy=function(){return oS(e,o2()).exponent(e.exponent())},nV.apply(e,arguments),e}function o3(){return o2.apply(null,arguments).exponent(.5)}function o5(e){return Math.sign(e)*e*e}function o4(e,t){let r;if(void 0===t)for(let t of e)null!=t&&(r<t||void 0===r&&t>=t)&&(r=t);else{let n=-1;for(let i of e)null!=(i=t(i,++n,e))&&(r<i||void 0===r&&i>=i)&&(r=i)}return r}function o6(e,t){let r;if(void 0===t)for(let t of e)null!=t&&(r>t||void 0===r&&t>=t)&&(r=t);else{let n=-1;for(let i of e)null!=(i=t(i,++n,e))&&(r>i||void 0===r&&i>=i)&&(r=i)}return r}function o8(e,t){return(null==e||!(e>=e))-(null==t||!(t>=t))||(e<t?-1:e>t?1:0)}function o7(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}O=(x=function(e){var t,r,n,i=void 0===e.grouping||void 0===e.thousands?oR:(t=oD.call(e.grouping,Number),r=e.thousands+"",function(e,n){for(var i=e.length,o=[],a=0,s=t[0],l=0;i>0&&s>0&&(l+s+1>n&&(s=Math.max(1,n-l)),o.push(e.substring(i-=s,i+s)),!((l+=s+1)>n));)s=t[a=(a+1)%t.length];return o.reverse().join(r)}),o=void 0===e.currency?"":e.currency[0]+"",a=void 0===e.currency?"":e.currency[1]+"",s=void 0===e.decimal?".":e.decimal+"",l=void 0===e.numerals?oR:(n=oD.call(e.numerals,String),function(e){return e.replace(/[0-9]/g,function(e){return n[+e]})}),c=void 0===e.percent?"%":e.percent+"",u=void 0===e.minus?"−":e.minus+"",h=void 0===e.nan?"NaN":e.nan+"";function f(e){var t=(e=oP(e)).fill,r=e.align,n=e.sign,f=e.symbol,d=e.zero,p=e.width,y=e.comma,m=e.precision,g=e.trim,v=e.type;"n"===v?(y=!0,v="g"):oI[v]||(void 0===m&&(m=12),g=!0,v="g"),(d||"0"===t&&"="===r)&&(d=!0,t="0",r="=");var b="$"===f?o:"#"===f&&/[boxX]/.test(v)?"0"+v.toLowerCase():"",x="$"===f?a:/[%p]/.test(v)?c:"",O=oI[v],k=/[defgprs%]/.test(v);function j(e){var o,a,c,f=b,j=x;
1if("c"===v)j=O(e)+j,e="";else{var S=(e=+e)<0||1/e<0;if(e=isNaN(e)?h:O(Math.abs(e),m),g&&(e=function(e){e:for(var t,r=e.length,n=1,i=-1;n<r;++n)switch(e[n]){case".":i=t=n;break;case"0":0===i&&(i=n),t=n;break;default:if(!+e[n])break e;i>0&&(i=0)}return i>0?e.slice(0,i)+e.slice(t+1):e}(e)),S&&0==+e&&"+"!==n&&(S=!1),f=(S?"("===n?n:u:"-"===n||"("===n?"":n)+f,j=("s"===v?oL[8+w/3]:"")+j+(S&&"("===n?")":""),k){for(o=-1,a=e.length;++o<a;)if(48>(c=e.charCodeAt(o))||c>57){j=(46===c?s+e.slice(o+1):e.slice(o))+j,e=e.slice(0,o);break}}}y&&!d&&(e=i(e,1/0));var _=f.length+e.length+j.length,E=_<p?Array(p-_+1).join(t):"";switch(y&&d&&(e=i(E+e,E.length?p-j.length:1/0),E=""),r){case"<":e=f+e+j+E;break;case"=":e=f+E+e+j;break;case"^":e=E.slice(0,_=E.length>>1)+f+e+j+E.slice(_);break;default:e=E+f+e+j}return l(e)}return m=void 0===m?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,m)):Math.max(0,Math.min(20,m)),j.toString=function(){return e+""},j}return{format:f,formatPrefix:function(e,t){var r=f(((e=oP(e)).type="f",e)),n=3*Math.max(-8,Math.min(8,Math.floor(oC(t)/3))),i=Math.pow(10,-n),o=oL[8+n/3];return function(e){return r(i*e)+o}}}}({thousands:",",grouping:[3],currency:["$",""]})).format,k=x.formatPrefix;let o9=new Date,ae=new Date;function at(e,t,r,n){function i(t){return e(t=0==arguments.length?new Date:new Date(+t)),t}return i.floor=t=>(e(t=new Date(+t)),t),i.ceil=r=>(e(r=new Date(r-1)),t(r,1),e(r),r),i.round=e=>{let t=i(e),r=i.ceil(e);return e-t<r-e?t:r},i.offset=(e,r)=>(t(e=new Date(+e),null==r?1:Math.floor(r)),e),i.range=(r,n,o)=>{let a;let s=[];if(r=i.ceil(r),o=null==o?1:Math.floor(o),!(r<n)||!(o>0))return s;do s.push(a=new Date(+r)),t(r,o),e(r);while(a<r&&r<n);return s},i.filter=r=>at(t=>{if(t>=t)for(;e(t),!r(t);)t.setTime(t-1)},(e,n)=>{if(e>=e){if(n<0)for(;++n<=0;)for(;t(e,-1),!r(e););else for(;--n>=0;)for(;t(e,1),!r(e););}}),r&&(i.count=(t,n)=>(o9.setTime(+t),ae.setTime(+n),e(o9),e(ae),Math.floor(r(o9,ae))),i.every=e=>isFinite(e=Math.floor(e))&&e>0?e>1?i.filter(n?t=>n(t)%e==0:t=>i.count(0,t)%e==0):i:null),i}let ar=at(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);ar.every=e=>isFinite(e=Math.floor(e))&&e>0?e>1?at(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):ar:null,ar.range;let an=at(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+1e3*t)},(e,t)=>(t-e)/1e3,e=>e.getUTCSeconds());an.range;let ai=at(e=>{e.setTime(e-e.getMilliseconds()-1e3*e.getSeconds())},(e,t)=>{e.setTime(+e+6e4*t)},(e,t)=>(t-e)/6e4,e=>e.getMinutes());ai.range;let ao=at(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+6e4*t)},(e,t)=>(t-e)/6e4,e=>e.getUTCMinutes());ao.range;let aa=at(e=>{e.setTime(e-e.getMilliseconds()-1e3*e.getSeconds()-6e4*e.getMinutes())},(e,t)=>{e.setTime(+e+36e5*t)},(e,t)=>(t-e)/36e5,e=>e.getHours());aa.range;let as=at(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+36e5*t)},(e,t)=>(t-e)/36e5,e=>e.getUTCHours());as.range;let al=at(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*6e4)/864e5,e=>e.getDate()-1);al.range;let ac=at(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/864e5,e=>e.getUTCDate()-1);ac.range;let au=at(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/864e5,e=>Math.floor(e/864e5));function ah(e){return at(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(e,t)=>{e.setDate(e.getDate()+7*t)},(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*6e4)/6048e5)}au.range;let af=ah(0),ad=ah(1),ap=ah(2),ay=ah(3),am=ah(4),ag=ah(5),av=ah(6);function ab(e){return at(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+7*t)},(e,t)=>(t-e)/6048e5)}af.range,ad.range,ap.range,ay.range,am.range,ag.range,av.range;let aw=ab(0),ax=ab(1),aO=ab(2),ak=ab(3),aj=ab(4),aS=ab(5),a_=ab(6);aw.range,ax.range,aO.range,ak.range,aj.range,aS.range,a_.range;let aE=at(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());aE.range;let aA=at(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());aA.range;let aP=at(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());aP.every=e=>isFinite(e=Math.floor(e))&&e>0?at(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)}):null,aP.range;let aT=at(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());function aN(e,t,r,n,i,o){let a=[[an,1,1e3],[an,5,5e3],[an,15,15e3],[an,30,3e4],[o,1,6e4],[o,5,3e5],[o,15,9e5],[o,30,18e5],[i,1,36e5],[i,3,108e5],[i,6,216e5],[i,12,432e5],[n,1,864e5],[n,2,1728e5],[r,1,6048e5],[t,1,2592e6],[t,3,7776e6],[e,1,31536e6]];function s(t,r,n){let i=Math.abs(r-t)/n,o=iD(([,,e])=>e).right(a,i);if(o===a.length)return e.every(iM(t/31536e6,r/31536e6,n));if(0===o)return ar.every(Math.max(iM(t,r,n),1));let[s,l]=a[i/a[o-1][2]<a[o][2]/i?o-1:o];return s.every(l)}return[function(e,t,r){let n=t<e;n&&([e,t]=[t,e]);let i=r&&"function"==typeof r.range?r:s(e,t,r),o=i?i.range(e,+t+1):[];return n?o.reverse():o},s]}aT.every=e=>isFinite(e=Math.floor(e))&&e>0?at(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)}):null,aT.range;let[aC,aM]=aN(aT,aA,aw,au,as,ao),[aI,aR]=aN(aP,aE,af,al,aa,ai);function aD(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function aL(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function aB(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}var a$={"-":"",_:" ",0:"0"},aU=/^\s*\d+/,aq=/^%/,az=/[\\^$*+?|[\]().{}]/g;function aF(e,t,r){var n=e<0?"-":"",i=(n?-e:e)+"",o=i.length;return n+(o<r?Array(r-o+1).join(t)+i:i)}function aW(e){return e.replace(az,"\\$&")}function aH(e){return RegExp("^(?:"+e.map(aW).join("|")+")","i")}function aV(e){return new Map(e.map((e,t)=>[e.toLowerCase(),t]))}function aK(e,t,r){var n=aU.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function aG(e,t,r){var n=aU.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function aZ(e,t,r){var n=aU.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function aJ(e,t,r){var n=aU.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function aY(e,t,r){var n=aU.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function aX(e,t,r){var n=aU.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function aQ(e,t,r){var n=aU.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function a0(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function a1(e,t,r){var n=aU.exec(t.slice(r,r+1));return n?(e.q=3*n[0]-3,r+n[0].length):-1}function a2(e,t,r){var n=aU.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function a3(e,t,r){var n=aU.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function a5(e,t,r){var n=aU.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function a4(e,t,r){var n=aU.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function a6(e,t,r){var n=aU.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function a8(e,t,r){var n=aU.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function a7(e,t,r){var n=aU.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function a9(e,t,r){var n=aU.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function se(e,t,r){var n=aq.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function st(e,t,r){var n=aU.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function sr(e,t,r){var n=aU.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function sn(e,t){return aF(e.getDate(),t,2)}function si(e,t){return aF(e.getHours(),t,2)}function so(e,t){return aF(e.getHours()%12||12,t,2)}function sa(e,t){return aF(1+al.count(aP(e),e),t,3)}function ss(e,t){return aF(e.getMilliseconds(),t,3)}function sl(e,t){return ss(e,t)+"000"}function sc(e,t){return aF(e.getMonth()+1,t,2)}function su(e,t){return aF(e.getMinutes(),t,2)}function sh(e,t){return aF(e.getSeconds(),t,2)}function sf(e){var t=e.getDay();return 0===t?7:t}function sd(e,t){return aF(af.count(aP(e)-1,e),t,2)}function sp(e){var t=e.getDay();return t>=4||0===t?am(e):am.ceil(e)}function sy(e,t){return e=sp(e),aF(am.count(aP(e),e)+(4===aP(e).getDay()),t,2)}function sm(e){return e.getDay()}function sg(e,t){return aF(ad.count(aP(e)-1,e),t,2)}function sv(e,t){return aF(e.getFullYear()%100,t,2)}
vendor: 6,861 bytes, line 1
1function sb(e,t){return aF((e=sp(e)).getFullYear()%100,t,2)}function sw(e,t){return aF(e.getFullYear()%1e4,t,4)}function sx(e,t){var r=e.getDay();return aF((e=r>=4||0===r?am(e):am.ceil(e)).getFullYear()%1e4,t,4)}function sO(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+aF(t/60|0,"0",2)+aF(t%60,"0",2)}function sk(e,t){return aF(e.getUTCDate(),t,2)}function sj(e,t){return aF(e.getUTCHours(),t,2)}function sS(e,t){return aF(e.getUTCHours()%12||12,t,2)}function s_(e,t){return aF(1+ac.count(aT(e),e),t,3)}function sE(e,t){return aF(e.getUTCMilliseconds(),t,3)}function sA(e,t){return sE(e,t)+"000"}function sP(e,t){return aF(e.getUTCMonth()+1,t,2)}function sT(e,t){return aF(e.getUTCMinutes(),t,2)}function sN(e,t){return aF(e.getUTCSeconds(),t,2)}function sC(e){var t=e.getUTCDay();return 0===t?7:t}function sM(e,t){return aF(aw.count(aT(e)-1,e),t,2)}function sI(e){var t=e.getUTCDay();return t>=4||0===t?aj(e):aj.ceil(e)}function sR(e,t){return e=sI(e),aF(aj.count(aT(e),e)+(4===aT(e).getUTCDay()),t,2)}function sD(e){return e.getUTCDay()}function sL(e,t){return aF(ax.count(aT(e)-1,e),t,2)}function sB(e,t){return aF(e.getUTCFullYear()%100,t,2)}function s$(e,t){return aF((e=sI(e)).getUTCFullYear()%100,t,2)}function sU(e,t){return aF(e.getUTCFullYear()%1e4,t,4)}function sq(e,t){var r=e.getUTCDay();return aF((e=r>=4||0===r?aj(e):aj.ceil(e)).getUTCFullYear()%1e4,t,4)}function sz(){return"+0000"}function sF(){return"%"}function sW(e){return+e}function sH(e){return Math.floor(+e/1e3)}function sV(e){return new Date(e)}function sK(e){return e instanceof Date?+e:+new Date(+e)}function sG(e,t,r,n,i,o,a,s,l,c){var u=oE(),h=u.invert,f=u.domain,d=c(".%L"),p=c(":%S"),y=c("%I:%M"),m=c("%I %p"),g=c("%a %d"),v=c("%b %d"),b=c("%B"),w=c("%Y");function x(e){return(l(e)<e?d:s(e)<e?p:a(e)<e?y:o(e)<e?m:n(e)<e?i(e)<e?g:v:r(e)<e?b:w)(e)}return u.invert=function(e){return new Date(h(e))},u.domain=function(e){return arguments.length?f(Array.from(e,sK)):f().map(sV)},u.ticks=function(t){var r=f();return e(r[0],r[r.length-1],null==t?10:t)},u.tickFormat=function(e,t){return null==t?x:c(t)},u.nice=function(e){var r=f();return e&&"function"==typeof e.range||(e=t(r[0],r[r.length-1],null==e?10:e)),e?f(oq(r,e)):u},u.copy=function(){return oS(u,sG(e,t,r,n,i,o,a,s,l,c))},u}function sZ(){return nV.apply(sG(aI,aR,aP,aE,af,al,aa,ai,an,S).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function sJ(){return nV.apply(sG(aC,aM,aT,aA,aw,ac,as,ao,an,_).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function sY(){var e,t,r,n,i,o=0,a=1,s=ox,l=!1;function c(t){return null==t||isNaN(t=+t)?i:s(0===r?.5:(t=(n(t)-e)*r,l?Math.max(0,Math.min(1,t)):t))}function u(e){return function(t){var r,n;return arguments.length?([r,n]=t,s=e(r,n),c):[s(0),s(1)]}}return c.domain=function(i){return arguments.length?([o,a]=i,e=n(o=+o),t=n(a=+a),r=e===t?0:1/(t-e),c):[o,a]},c.clamp=function(e){return arguments.length?(l=!!e,c):l},c.interpolator=function(e){return arguments.length?(s=e,c):s},c.range=u(og),c.rangeRound=u(ov),c.unknown=function(e){return arguments.length?(i=e,c):i},function(i){return n=i,e=i(o),t=i(a),r=e===t?0:1/(t-e),c}}function sX(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function sQ(){var e=o1(sY());return e.copy=function(){return sX(e,sQ()).exponent(e.exponent())},nK.apply(e,arguments)}function s0(){return sQ.apply(null,arguments).exponent(.5)}function s1(){var e,t,r,n,i,o,a,s=0,l=.5,c=1,u=1,h=ox,f=!1;function d(e){return isNaN(e=+e)?a:(e=.5+((e=+o(e))-t)*(u*e<u*t?n:i),h(f?Math.max(0,Math.min(1,e)):e))}function p(e){return function(t){var r,n,i;return arguments.length?([r,n,i]=t,h=function(e,t){void 0===t&&(t=e,e=og);for(var r=0,n=t.length-1,i=t[0],o=Array(n<0?0:n);r<n;)o[r]=e(i,i=t[++r]);return function(e){var t=Math.max(0,Math.min(n-1,Math.floor(e*=n)));return o[t](e-t)}}(e,[r,n,i]),d):[h(0),h(.5),h(1)]}}return d.domain=function(a){return arguments.length?([s,l,c]=a,e=o(s=+s),t=o(l=+l),r=o(c=+c),n=e===t?0:.5/(t-e),i=t===r?0:.5/(r-t),u=t<e?-1:1,d):[s,l,c]},d.clamp=function(e){return arguments.length?(f=!!e,d):f},d.interpolator=function(e){return arguments.length?(h=e,d):h},d.range=p(og),d.rangeRound=p(ov),d.unknown=function(e){return arguments.length?(a=e,d):a},function(a){return o=a,e=a(s),t=a(l),r=a(c),n=e===t?0:.5/(t-e),i=t===r?0:.5/(r-t),u=t<e?-1:1,d}}function s2(){var e=o1(s1());return e.copy=function(){return sX(e,s2()).exponent(e.exponent())},nK.apply(e,arguments)}function s3(){return s2.apply(null,arguments).exponent(.5)}function s5(e,t){if((i=e.length)>1)for(var r,n,i,o=1,a=e[t[0]],s=a.length;o<i;++o)for(n=a,a=e[t[o]],r=0;r<s;++r)a[r][1]+=a[r][0]=isNaN(n[r][1])?n[r][0]:n[r][1]}function s4(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}function s6(e){for(var t=e.length,r=Array(t);--t>=0;)r[t]=t;return r}function s8(e,t){return e[t]}function s7(e){let t=[];return t.key=e,t}S=(j=function(e){var t=e.dateTime,r=e.date,n=e.time,i=e.periods,o=e.days,a=e.shortDays,s=e.months,l=e.shortMonths,c=aH(i),u=aV(i),h=aH(o),f=aV(o),d=aH(a),p=aV(a),y=aH(s),m=aV(s),g=aH(l),v=aV(l),b={a:function(e){return a[e.getDay()]},A:function(e){return o[e.getDay()]},b:function(e){return l[e.getMonth()]},B:function(e){return s[e.getMonth()]},c:null,d:sn,e:sn,f:sl,g:sb,G:sx,H:si,I:so,j:sa,L:ss,m:sc,M:su,p:function(e){return i[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:sW,s:sH,S:sh,u:sf,U:sd,V:sy,w:sm,W:sg,x:null,X:null,y:sv,Y:sw,Z:sO,"%":sF},w={a:function(e){return a[e.getUTCDay()]},A:function(e){return o[e.getUTCDay()]},b:function(e){return l[e.getUTCMonth()]},B:function(e){return s[e.getUTCMonth()]},c:null,d:sk,e:sk,f:sA,g:s$,G:sq,H:sj,I:sS,j:s_,L:sE,m:sP,M:sT,p:function(e){return i[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:sW,s:sH,S:sN,u:sC,U:sM,V:sR,w:sD,W:sL,x:null,X:null,y:sB,Y:sU,Z:sz,"%":sF},x={a:function(e,t,r){var n=d.exec(t.slice(r));return n?(e.w=p.get(n[0].toLowerCase()),r+n[0].length):-1},A:function(e,t,r){var n=h.exec(t.slice(r));return n?(e.w=f.get(n[0].toLowerCase()),r+n[0].length):-1},b:function(e,t,r){var n=g.exec(t.slice(r));return n?(e.m=v.get(n[0].toLowerCase()),r+n[0].length):-1},B:function(e,t,r){var n=y.exec(t.slice(r));return n?(e.m=m.get(n[0].toLowerCase()),r+n[0].length):-1},c:function(e,r,n){return j(e,t,r,n)},d:a3,e:a3,f:a9,g:aQ,G:aX,H:a4,I:a4,j:a5,L:a7,m:a2,M:a6,p:function(e,t,r){var n=c.exec(t.slice(r));return n?(e.p=u.get(n[0].toLowerCase()),r+n[0].length):-1},q:a1,Q:st,s:sr,S:a8,u:aG,U:aZ,V:aJ,w:aK,W:aY,x:function(e,t,n){return j(e,r,t,n)},X:function(e,t,r){return j(e,n,t,r)},y:aQ,Y:aX,Z:a0,"%":se};function O(e,t){return function(r){var n,i,o,a=[],s=-1,l=0,c=e.length;for(r instanceof Date||(r=new Date(+r));++s<c;)37===e.charCodeAt(s)&&(a.push(e.slice(l,s)),null!=(i=a$[n=e.charAt(++s)])?n=e.charAt(++s):i="e"===n?" ":"0",(o=t[n])&&(n=o(r,
1i)),a.push(n),l=s+1);return a.push(e.slice(l,s)),a.join("")}}function k(e,t){return function(r){var n,i,o=aB(1900,void 0,1);if(j(o,e,r+="",0)!=r.length)return null;if("Q"in o)return new Date(o.Q);if("s"in o)return new Date(1e3*o.s+("L"in o?o.L:0));if(!t||"Z"in o||(o.Z=0),"p"in o&&(o.H=o.H%12+12*o.p),void 0===o.m&&(o.m="q"in o?o.q:0),"V"in o){if(o.V<1||o.V>53)return null;"w"in o||(o.w=1),"Z"in o?(n=(i=(n=aL(aB(o.y,0,1))).getUTCDay())>4||0===i?ax.ceil(n):ax(n),n=ac.offset(n,(o.V-1)*7),o.y=n.getUTCFullYear(),o.m=n.getUTCMonth(),o.d=n.getUTCDate()+(o.w+6)%7):(n=(i=(n=aD(aB(o.y,0,1))).getDay())>4||0===i?ad.ceil(n):ad(n),n=al.offset(n,(o.V-1)*7),o.y=n.getFullYear(),o.m=n.getMonth(),o.d=n.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),i="Z"in o?aL(aB(o.y,0,1)).getUTCDay():aD(aB(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(i+5)%7:o.w+7*o.U-(i+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,aL(o)):aD(o)}}function j(e,t,r,n){for(var i,o,a=0,s=t.length,l=r.length;a<s;){if(n>=l)return -1;if(37===(i=t.charCodeAt(a++))){if(!(o=x[(i=t.charAt(a++))in a$?t.charAt(a++):i])||(n=o(e,r,n))<0)return -1}else if(i!=r.charCodeAt(n++))return -1}return n}return b.x=O(r,b),b.X=O(n,b),b.c=O(t,b),w.x=O(r,w),w.X=O(n,w),w.c=O(t,w),{format:function(e){var t=O(e+="",b);return t.toString=function(){return e},t},parse:function(e){var t=k(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=O(e+="",w);return t.toString=function(){return e},t},utcParse:function(e){var t=k(e+="",!0);return t.toString=function(){return e},t}}}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]})).format,j.parse,_=j.utcFormat,j.utcParse,Array.prototype.slice;var s9=r(47766),le=r.n(s9),lt=r(89770),lr=r.n(lt),ln=r(73720),li=r.n(ln),lo=r(12916),la=r.n(lo),ls=r(11431),ll=r.n(ls);function lc(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var lu=function(e){return e},lh={},lf=function(e){return e===lh},ld=function(e){return function t(){return 0==arguments.length||1==arguments.length&&lf(arguments.length<=0?void 0:arguments[0])?t:e.apply(void 0,arguments)}},lp=function(e){return function e(t,r){return 1===t?r:ld(function(){for(var n=arguments.length,i=Array(n),o=0;o<n;o++)i[o]=arguments[o];var a=i.filter(function(e){return e!==lh}).length;return a>=t?r.apply(void 0,i):e(t-a,ld(function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];var o=i.map(function(e){return lf(e)?t.shift():e});return r.apply(void 0,((function(e){if(Array.isArray(e))return lc(e)})(o)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(o)||function(e,t){if(e){if("string"==typeof e)return lc(e,void 0);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return lc(e,void 0)}}(o)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).concat(t))}))})}(e.length,e)},ly=function(e,t){for(var r=[],n=e;n<t;++n)r[n-e]=n;return r},lm=lp(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(e){return t[e]}).map(e)}),lg=function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];if(!t.length)return lu;var n=t.reverse(),i=n[0],o=n.slice(1);return function(){return o.reduce(function(e,t){return t(e)},i.apply(void 0,arguments))}},lv=function(e){return Array.isArray(e)?e.reverse():e.split("").reverse.join("")},lb=function(e){var t=null,r=null;return function(){for(var n=arguments.length,i=Array(n),o=0;o<n;o++)i[o]=arguments[o];return t&&i.every(function(e,r){return e===t[r]})?r:(t=i,r=e.apply(void 0,i))}},lw=(lp(function(e,t,r){var n=+e;return n+r*(+t-n)}),lp(function(e,t,r){var n=t-+e;return(r-e)/(n=n||1/0)}),lp(function(e,t,r){var n=t-+e;return Math.max(0,Math.min(1,(r-e)/(n=n||1/0)))}),{rangeStep:function(e,t,r){for(var n=new(ll())(e),i=0,o=[];n.lt(t)&&i<1e5;)o.push(n.toNumber()),n=n.add(r),i++;return o},getDigitCount:function(e){return 0===e?1:Math.floor(new(ll())(e).abs().log(10).toNumber())+1}});function lx(e){return function(e){if(Array.isArray(e))return lj(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||lk(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function lO(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var r=[],n=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{n||null==s.return||s.return()}finally{if(i)throw o}}return r}}(e,t)||lk(e,t)||function(){throw TypeError("Invalid attempt to de
1structure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function lk(e,t){if(e){if("string"==typeof e)return lj(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return lj(e,t)}}function lj(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function lS(e){var t=lO(e,2),r=t[0],n=t[1],i=r,o=n;return r>n&&(i=n,o=r),[i,o]}function l_(e,t,r){if(e.lte(0))return new(ll())(0);var n=lw.getDigitCount(e.toNumber()),i=new(ll())(10).pow(n),o=e.div(i),a=1!==n?.05:.1,s=new(ll())(Math.ceil(o.div(a).toNumber())).add(r).mul(a).mul(i);return t?s:new(ll())(Math.ceil(s))}function lE(e,t,r){var n=1,i=new(ll())(e);if(!i.isint()&&r){var o=Math.abs(e);o<1?(n=new(ll())(10).pow(lw.getDigitCount(e)-1),i=new(ll())(Math.floor(i.div(n).toNumber())).mul(n)):o>1&&(i=new(ll())(Math.floor(e)))}else 0===e?i=new(ll())(Math.floor((t-1)/2)):r||(i=new(ll())(Math.floor(e)));var a=Math.floor((t-1)/2);return lg(lm(function(e){return i.add(new(ll())(e-a).mul(n)).toNumber()}),ly)(0,t)}var lA=lb(function(e){var t=lO(e,2),r=t[0],n=t[1],i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:6,o=!(arguments.length>2)||void 0===arguments[2]||arguments[2],a=Math.max(i,2),s=lO(lS([r,n]),2),l=s[0],c=s[1];if(l===-1/0||c===1/0){var u=c===1/0?[l].concat(lx(ly(0,i-1).map(function(){return 1/0}))):[].concat(lx(ly(0,i-1).map(function(){return-1/0})),[c]);return r>n?lv(u):u}if(l===c)return lE(l,i,o);var h=function e(t,r,n,i){var o,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;if(!Number.isFinite((r-t)/(n-1)))return{step:new(ll())(0),tickMin:new(ll())(0),tickMax:new(ll())(0)};var s=l_(new(ll())(r).sub(t).div(n-1),i,a),l=Math.ceil((o=t<=0&&r>=0?new(ll())(0):(o=new(ll())(t).add(r).div(2)).sub(new(ll())(o).mod(s))).sub(t).div(s).toNumber()),c=Math.ceil(new(ll())(r).sub(o).div(s).toNumber()),u=l+c+1;return u>n?e(t,r,n,i,a+1):(u<n&&(c=r>0?c+(n-u):c,l=r>0?l:l+(n-u)),{step:s,tickMin:o.sub(new(ll())(l).mul(s)),tickMax:o.add(new(ll())(c).mul(s))})}(l,c,a,o),f=h.step,d=h.tickMin,p=h.tickMax,y=lw.rangeStep(d,p.add(new(ll())(.1).mul(f)),f);return r>n?lv(y):y});lb(function(e){var t=lO(e,2),r=t[0],n=t[1],i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:6,o=!(arguments.length>2)||void 0===arguments[2]||arguments[2],a=Math.max(i,2),s=lO(lS([r,n]),2),l=s[0],c=s[1];if(l===-1/0||c===1/0)return[r,n];if(l===c)return lE(l,i,o);var u=l_(new(ll())(c).sub(l).div(a-1),o,0),h=lg(lm(function(e){return new(ll())(l).add(new(ll())(e).mul(u)).toNumber()}),ly)(0,a).filter(function(e){return e>=l&&e<=c});return r>n?lv(h):h});var lP=lb(function(e,t){var r=lO(e,2),n=r[0],i=r[1],o=!(arguments.length>2)||void 0===arguments[2]||arguments[2],a=lO(lS([n,i]),2),s=a[0],l=a[1];if(s===-1/0||l===1/0)return[n,i];if(s===l)return[s];var c=l_(new(ll())(l).sub(s).div(Math.max(t,2)-1),o,0),u=[].concat(lx(lw.rangeStep(new(ll())(s),new(ll())(l).sub(new(ll())(.99).mul(c)),c)),[l]);return n>i?lv(u):u}),lT=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function lN(e){return(lN="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function lC(){return(lC=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function lM(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function lI(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(lI=function(){return!!e})()}function lR(e){return(lR=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}
1function lD(e,t){return(lD=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function lL(e,t,r){return(t=lB(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function lB(e){var t=function(e,t){if("object"!=lN(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=lN(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==lN(t)?t:t+""}var l$=function(e){var t;function r(){var e,t;return!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,r),e=r,t=arguments,e=lR(e),function(e,t){if(t&&("object"===lN(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,lI()?Reflect.construct(e,t||[],lR(this).constructor):e.apply(this,t))}return!function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&lD(e,t)}(r,e),t=[{key:"render",value:function(){var e=this.props,t=e.offset,r=e.layout,n=e.width,i=e.dataKey,o=e.data,a=e.dataPointFormatter,s=e.xAxis,l=e.yAxis,c=eF(function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,lT),!1);"x"===this.props.direction&&"number"!==s.type&&e3(!1);var u=o.map(function(e){var o,u,h=a(e,i),f=h.x,d=h.y,p=h.value,y=h.errorVal;if(!y)return null;var m=[];if(Array.isArray(y)){var g=function(e){if(Array.isArray(e))return e}(y)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,s=[],l=!0,c=!1;try{for(o=(r=r.call(e)).next;!(l=(n=o.call(r)).done)&&(s.push(n.value),2!==s.length);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(y,2)||function(e,t){if(e){if("string"==typeof e)return lM(e,2);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return lM(e,2)}}(y,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();o=g[0],u=g[1]}else o=u=y;if("vertical"===r){var v=s.scale,b=d+t,w=b+n,x=b-n,O=v(p-o),k=v(p+u);m.push({x1:k,y1:w,x2:k,y2:x}),m.push({x1:O,y1:b,x2:k,y2:b}),m.push({x1:O,y1:w,x2:O,y2:x})}else if("horizontal"===r){var j=l.scale,S=f+t,_=S-n,E=S+n,A=j(p-o),T=j(p+u);m.push({x1:_,y1:T,x2:E,y2:T}),m.push({x1:S,y1:A,x2:S,y2:T}),m.push({x1:_,y1:A,x2:E,y2:A})}return P.createElement(e9,lC({className:"recharts-errorBar",key:"bar-".concat(m.map(function(e){return"".concat(e.x1,"-").concat(e.x2,"-").concat(e.y1,"-").concat(e.y2)}))},c),m.map(function(e){return P.createElement("line",lC({},e,{key:"line-".concat(e.x1,"-").concat(e.x2,"-").concat(e.y1,"-").concat(e.y2)}))}))});return P.createElement(e9,{className:"recharts-errorBars"},u)}}],function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,lB(n.key),n)}}(r.prototype,t),Object.defineProperty(r,"prototype",{writable:!1}),r}(P.Component);function lU(e){return(lU="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function lq(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function lz(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
1t%2?lq(Object(r),!0).forEach(function(t){var n,i;n=t,i=r[t],(n=function(e){var t=function(e,t){if("object"!=lU(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=lU(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==lU(t)?t:t+""}(n))in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):lq(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}lL(l$,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"}),lL(l$,"displayName","ErrorBar");var lF=function(e){var t,r=e.children,n=e.formattedGraphicalItems,i=e.legendWidth,o=e.legendContent,a=e$(r,rj);if(!a)return null;var s=rj.defaultProps,l=void 0!==s?lz(lz({},s),a.props):{};return t=a.props&&a.props.payload?a.props&&a.props.payload:"children"===o?(n||[]).reduce(function(e,t){var r=t.item,n=t.props,i=n.sectors||n.data||[];return e.concat(i.map(function(e){return{type:a.props.iconType||r.props.legendType,value:e.name,color:e.fill,payload:e}}))},[]):(n||[]).map(function(e){var t=e.item,r=t.type.defaultProps,n=void 0!==r?lz(lz({},r),t.props):{},i=n.dataKey,o=n.name,a=n.legendType;return{inactive:n.hide,dataKey:i,type:l.iconType||a||"square",color:lQ(t),value:o||i,payload:n}}),lz(lz(lz({},l),rj.getWithHeight(a,i)),{},{payload:t,item:a})};function lW(e){return(lW="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function lH(e){return function(e){if(Array.isArray(e))return lV(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return lV(e,void 0);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return lV(e,void 0)}}(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function lV(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function lK(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function lG(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?lK(Object(r),!0).forEach(function(t){lZ(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):lK(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function lZ(e,t,r){var n;return(n=function(e,t){if("object"!=lW(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=lW(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"),(t="symbol"==lW(n)?n:n+"")in e)?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function lJ(e,t,r){return er()(e)||er()(t)?r:ea(t)?X()(e,t,r):eg()(t)?t(e):r}function lY(e,t,r,n){var i=li()(e,function(e){return lJ(e,t)});if("number"===r){var o=i.filter(function(e){return eo(e)||parseFloat(e)});return o.length?[lr()(o),le()(o)]:[1/0,-1/0]}return(n?i.filter(function(e){return!er()(e)}):i).map(function(e){return ea(e)||e instanceof Date?e:""})}var lX=function(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,o=-1,a=null!==(t=null==r?void 0:r.length)&&void 0!==t?t:0;if(a<=1)return 0;if(i&&"angleAxis"===i.axisType&&1e-6>=Math.abs(Math.abs(i.range[1]-i.range[0])-360))for(var s=i.range,l=0;l<a;l++){var c=l>0?n[l-1].coordinate:n[a-1].coordinate,u=n[l].coordinate,h=l>=a-1?n[0].coordinate:n[l+1].coordinate,f=void 0;if(en(u-c)!==en(h-u)){var d=[];if(en(h-u)===en(s[1]-s[0])){f=h;var p=u+s[1]-s[0];d[0]=Math.min(p,(p+c)/2),d[1]=Math.max(p,(p+c)/2)}else{f=c;var y=h+s[1]-s[0];d[0]=Math.min(u,(y+u)/2),d[1]=Math.max(u,(y+u)/2)}var m=[Math.min(u,(f+u)/2),Math.max(u,(f+u)/2)];if(e>m[0]&&e<=m[1]||e>=d[0]&&e<=d[1]){o=n[l].index;break}}else{var g=Math.min(c,h),v=Math.max(c,h);if(e>(g+u)/2&&e<=(v+u)/2){o=n[l].index;break}}}else for(var b=0;b<a;b++)if(0===b&&e<=(r[b].coordinate+r[b+1].coordinate)/2||b>0&&b<a-1&&e>(r[b].coordinate+r[b-1].coordinate)/2&&e<=(r[b].coordinate+r[b+1].coordinate)/2||b===a-1&&e>(r[b].coordinate+r[b-1].coordinate)/2){o=r[b].index;break}return o},lQ=function(e){var t,r,n=e.type.displayName,i=null!==(t=e.type)&&void 0!==t&&t.defaultProps?lG(lG({},e.type.defaultProps),e.props):e.props,o=i.stroke,a=i.fill;switch(n){case"Line":r=o;break;case"Area":case"Radar":r=o&&"none"!==o?o:a;break;default:r=a}return r},l0=function(e){var t=e.barSize,r=e.totalSize,n=e.stackGroups,i=void 0===n?{}:n;if(!i)return{};for(var o={},a=Object.keys(i),s=0,l=a.length;s<l;s++)for(var c=i[a[s]].stackGroups,u=Object.keys(c),h=0,f=u.length;h<f;h++){var d=c[u[h]],p=d.items,y=d.cateAxisId,m=p.filter(function(e){return eI(e.type).indexOf("Bar")>=0});if(m&&m.length){var g=m[0].type.defaultProps,v=void 0!==g?lG(lG({},g),m[0].props):m[0].props,b=v.barSize,w=v[y];o[w]||(o[w]=[]);var x=er()(b)?t:b;o[w].push({item:m[0],stackList:m.slice(1),barSize:er()(x)?void 0:ec(x,r,0)})}}return o},l1=function(e){var t,r=e.barGap,n=e.barCategoryGap,i=e.bandSize,o=e.sizeList,a=void 0===o?[]:o,s=e.maxBarSize,l=a.length;if(l<1)return null;var c=ec(r,i,0,!0),u=[];
1if(a[0].barSize===+a[0].barSize){var h=!1,f=i/l,d=a.reduce(function(e,t){return e+t.barSize||0},0);(d+=(l-1)*c)>=i&&(d-=(l-1)*c,c=0),d>=i&&f>0&&(h=!0,f*=.9,d=l*f);var p={offset:((i-d)/2>>0)-c,size:0};t=a.reduce(function(e,t){var r={item:t.item,position:{offset:p.offset+p.size+c,size:h?f:t.barSize}},n=[].concat(lH(e),[r]);return p=n[n.length-1].position,t.stackList&&t.stackList.length&&t.stackList.forEach(function(e){n.push({item:e,position:p})}),n},u)}else{var y=ec(n,i,0,!0);i-2*y-(l-1)*c<=0&&(c=0);var m=(i-2*y-(l-1)*c)/l;m>1&&(m>>=0);var g=s===+s?Math.min(m,s):m;t=a.reduce(function(e,t,r){var n=[].concat(lH(e),[{item:t.item,position:{offset:y+(m+c)*r+(m-g)/2,size:g}}]);return t.stackList&&t.stackList.length&&t.stackList.forEach(function(e){n.push({item:e,position:n[n.length-1].position})}),n},u)}return t},l2=function(e,t,r,n){var i=r.children,o=r.width,a=r.margin,s=lF({children:i,legendWidth:o-(a.left||0)-(a.right||0)});if(s){var l=n||{},c=l.width,u=l.height,h=s.align,f=s.verticalAlign,d=s.layout;if(("vertical"===d||"horizontal"===d&&"middle"===f)&&"center"!==h&&eo(e[h]))return lG(lG({},e),{},lZ({},h,e[h]+(c||0)));if(("horizontal"===d||"vertical"===d&&"center"===h)&&"middle"!==f&&eo(e[f]))return lG(lG({},e),{},lZ({},f,e[f]+(u||0)))}return e},l3=function(e,t,r,n,i){var o=eB(t.props.children,l$).filter(function(e){var t;return t=e.props.direction,!!er()(i)||("horizontal"===n?"yAxis"===i:"vertical"===n||"x"===t?"xAxis"===i:"y"!==t||"yAxis"===i)});if(o&&o.length){var a=o.map(function(e){return e.props.dataKey});return e.reduce(function(e,t){var n=lJ(t,r);
1if(er()(n))return e;var i=Array.isArray(n)?[lr()(n),le()(n)]:[n,n],o=a.reduce(function(e,r){var n=lJ(t,r,0),o=i[0]-Math.abs(Array.isArray(n)?n[0]:n),a=i[1]+Math.abs(Array.isArray(n)?n[1]:n);return[Math.min(o,e[0]),Math.max(a,e[1])]},[1/0,-1/0]);return[Math.min(o[0],e[0]),Math.max(o[1],e[1])]},[1/0,-1/0])}return null},l5=function(e,t,r,n,i){var o=t.map(function(t){return l3(e,t,r,i,n)}).filter(function(e){return!er()(e)});return o&&o.length?o.reduce(function(e,t){return[Math.min(e[0],t[0]),Math.max(e[1],t[1])]},[1/0,-1/0]):null},l4=function(e,t,r,n,i){var o=t.map(function(t){var o=t.props.dataKey;return"number"===r&&o&&l3(e,t,o,n)||lY(e,o,r,i)});if("number"===r)return o.reduce(function(e,t){return[Math.min(e[0],t[0]),Math.max(e[1],t[1])]},[1/0,-1/0]);var a={};return o.reduce(function(e,t){for(var r=0,n=t.length;r<n;r++)a[t[r]]||(a[t[r]]=!0,e.push(t[r]));return e},[])},l6=function(e,t){return"horizontal"===e&&"xAxis"===t||"vertical"===e&&"yAxis"===t||"centric"===e&&"angleAxis"===t||"radial"===e&&"radiusAxis"===t},l8=function(e,t,r,n){if(n)return e.map(function(e){return e.coordinate});var i,o,a=e.map(function(e){return e.coordinate===t&&(i=!0),e.coordinate===r&&(o=!0),e.coordinate});return i||a.push(t),o||a.push(r),a},l7=function(e,t,r){if(!e)return null;var n=e.scale,i=e.duplicateDomain,o=e.type,a=e.range,s="scaleBand"===e.realScaleType?n.bandwidth()/2:2,l=(t||r)&&"category"===o&&n.bandwidth?n.bandwidth()/s:0;return(l="angleAxis"===e.axisType&&(null==a?void 0:a.length)>=2?2*en(a[0]-a[1])*l:l,t&&(e.ticks||e.niceTicks))?(e.ticks||e.niceTicks).map(function(e){return{coordinate:n(i?i.indexOf(e):e)+l,value:e,offset:l}}).filter(function(e){return!J()(e.coordinate)}):e.isCategorical&&e.categoricalDomain?e.categoricalDomain.map(function(e,t){return{coordinate:n(e)+l,value:e,index:t,offset:l}}):n.ticks&&!r?n.ticks(e.tickCount).map(function(e){return{coordinate:n(e)+l,value:e,offset:l}}):n.domain().map(function(e,t){return{coordinate:n(e)+l,value:i?i[e]:e,index:t,offset:l}})},l9=new WeakMap,ce=function(e,t){if("function"!=typeof t)return e;l9.has(e)||l9.set(e,new WeakMap);var r=l9.get(e);if(r.has(t))return r.get(t);var n=function(){e.apply(void 0,arguments),t.apply(void 0,arguments)};return r.set(t,n),n},ct=function(e,t,r){var n=e.scale,i=e.type,o=e.layout,a=e.axisType;if("auto"===n)return"radial"===o&&"radiusAxis"===a?{scale:nQ(),realScaleType:"band"}:"radial"===o&&"angleAxis"===a?{scale:oU(),realScaleType:"linear"}:"category"===i&&t&&(t.indexOf("LineChart")>=0||t.indexOf("AreaChart")>
1=0||t.indexOf("ComposedChart")>=0&&!r)?{scale:n0(),realScaleType:"point"}:"category"===i?{scale:nQ(),realScaleType:"band"}:{scale:oU(),realScaleType:"linear"};if(G()(n)){var s="scale".concat(tD()(n));return{scale:(E[s]||n0)(),realScaleType:E[s]?s:"point"}}return eg()(n)?{scale:n}:{scale:n0(),realScaleType:"point"}},cr=function(e){var t=e.domain();if(t&&!(t.length<=2)){var r=t.length,n=e.range(),i=Math.min(n[0],n[1])-1e-4,o=Math.max(n[0],n[1])+1e-4,a=e(t[0]),s=e(t[r-1]);(a<i||a>o||s<i||s>o)&&e.domain([t[0],t[r-1]])}},cn=function(e,t){if(!e)return null;for(var r=0,n=e.length;r<n;r++)if(e[r].item===t)return e[r].position;return null},ci=function(e,t){if(!t||2!==t.length||!eo(t[0])||!eo(t[1]))return e;var r=Math.min(t[0],t[1]),n=Math.max(t[0],t[1]),i=[e[0],e[1]];return(!eo(e[0])||e[0]<r)&&(i[0]=r),(!eo(e[1])||e[1]>n)&&(i[1]=n),i[0]>n&&(i[0]=n),i[1]<r&&(i[1]=r),i},co={sign:function(e){var t=e.length;if(!(t<=0))for(var r=0,n=e[0].length;r<n;++r)for(var i=0,o=0,a=0;a<t;++a){var s=J()(e[a][r][1])?e[a][r][0]:e[a][r][1];s>=0?(e[a][r][0]=i,e[a][r][1]=i+s,i=e[a][r][1]):(e[a][r][0]=o,e[a][r][1]=o+s,o=e[a][r][1])}},expand:function(e,t){if((n=e.length)>0){for(var r,n,i,o=0,a=e[0].length;o<a;++o){for(i=r=0;r<n;++r)i+=e[r][o][1]||0;if(i)for(r=0;r<n;++r)e[r][o][1]/=i}s5(e,t)}},none:s5,silhouette:function(e,t){if((r=e.length)>0){for(var r,n=0,i=e[t[0]],o=i.length;n<o;++n){for(var a=0,s=0;a<r;++a)s+=e[a][n][1]||0;i[n][1]+=i[n][0]=-s/2}s5(e,t)}},wiggle:function(e,t){if((i=e.length)>0&&(n=(r=e[t[0]]).length)>0){for(var r,n,i,o=0,a=1;a<n;++a){for(var s=0,l=0,c=0;s<i;++s){for(var u=e[t[s]],h=u[a][1]||0,f=(h-(u[a-1][1]||0))/2,d=0;d<s;++d){var p=e[t[d]];f+=(p[a][1]||0)-(p[a-1][1]||0)}l+=h,c+=f*h}r[a-1][1]+=r[a-1][0]=o,l&&(o-=c/l)}r[a-1][1]+=r[a-1][0]=o,s5(e,t)}},positive:function(e){var t=e.length;if(!(t<=0))for(var r=0,n=e[0].length;r<n;++r)for(var i=0,o=0;o<t;++o){var a=J()(e[o][r][1])?e[o][r][0]:e[o][r][1];a>=0?(e[o][r][0]=i,e[o][r][1]=i+a,i=e[o][r][1]):(e[o][r][0]=0,e[o][r][1]=0)}}},ca=function(e,t,r){var n=t.map(function(e){return e.props.dataKey}),i=co[r];return(function(){var e=tX([]),t=s6,r=s5,n=s8;function i(i){var o,a,s=Array.from(e.apply(this,arguments),s7),l=s.length,c=-1;for(let e of i)for(o=0,++c;o<l;++o)(s[o][c]=[0,+n(e,s[o].key,c,i)]).data=e;for(o=0,a=s4(t(s));o<l;++o)s[a[o]].index=o;return r(s,a),s}return i.keys=function(t){return arguments.length?(e="function"==typeof t?t:tX(Array.from(t)),i):e},i.value=function(e){return arguments.length?(n="function"==typeof e?e:tX(+e),i):n},i.order=function(e){return arguments.length?(t=null==e?s6:"function"==typeof e?e:tX(Array.from(e)),i):t},i.offset=function(e){return arguments.length?(r=null==e?s5:e,i):r},i})().keys(n).value(function(e,t){return+lJ(e,t,0)}).order(s6).offset(i)(e)},cs=function(e,t,r,n,i,o){if(!e)return null;var a=(o?t.reverse():t).reduce(function(e,t){var i,o=null!==(i=t.type)&&void 0!==i&&i.defaultProps?lG(lG({},t.type.defaultProps),t.props):t.props,a=o.stackId;if(o.hide)return e;var s=o[r],l=e[s]||{hasStack:!1,stackGroups:{}};if(ea(a)){var c=l.stackGroups[a]||{numericAxisId:r,cateAxisId:n,items:[]};c.items.push(t),l.hasStack=!0,l.stackGroups[a]=c}else l.stackGroups[el("_stackId_")]={numericAxisId:r,cateAxisId:n,items:[t]};return lG(lG({},e),{},lZ({},s,l))},{});return Object.keys(a).reduce(function(t,o){var s=a[o];return s.hasStack&&(s.stackGroups=Object.keys(s.stackGroups).reduce(function(t,o){var a=s.stackGroups[o];return lG(lG({},t),{},lZ({},o,{numericAxisId:r,cateAxisId:n,items:a.items,stackedData:ca(e,a.items,i)}))},{})),lG(lG({},t),{},lZ({},o,s))},{})},cl=function(e,t){var r=t.realScaleType,n=t.type,i=t.tickCount,o=t.originalDomain,a=t.allowDecimals,s=r||t.scale;if("auto"!==s&&"linear"!==s)return null;if(i&&"number"===n&&o&&("auto"===o[0]||"auto"===o[1])){var l=e.domain();if(!l.length)return null;var c=lA(l,i,a);return e.domain([lr()(c),le()(c)]),{niceTicks:c}}return i&&"number"===n?{niceTicks:lP(e.domain(),i,a)}:null};function cc(e){var t=e.axis,r=e.ticks,n=e.bandSize,i=e.entry,o=e.index,a=e.dataKey;if("category"===t.type){if(!t.allowDuplicatedCategory&&t.dataKey&&!er()(i[t.dataKey])){var s=ed(r,"value",i[t.dataKey]);if(s)return s.coordinate+n/2}return r[o]?r[o].coordinate+n/2:null}var l=lJ(i,er()(a)?t.dataKey:a);return er()(l)?null:t.scale(l)}var cu=function(e){var t=e.axis,r=e.ticks,n=e.offset,i=e.bandSize,o=e.entry,a=e.index;if("category"===t.type)return r[a]?r[a].coordinate+n:null;var s=lJ(o,t.dataKey,t.domain[a]);return er()(s)?null:t.scale(s)-i/2+n},ch=function(e){var t=e.numericAxis,r=t.scale.domain();if("number"===t.type){var n=Math.min(r[0],r[1]),i=Math.max(r[0],r[1]);return n<=0&&i>=0?0:i<0?i:n}return r[0]},cf=function(e,t){var r,n=(null!==(r=e.type)&&void 0!==r&&r.defaultProps?lG(lG({},e.type.defaultProps),e.props):e.props).stackId;if(ea(n)){var i=t[n];if(i){var o=i.items.indexOf(e);return o>=0?i.stackedData[o]:null}}return null},cd=function(e,t,r){return Object.keys(e).reduce(function(n,i){var o=e[i].stackedData.reduce(function(e,n){var i=n.slice(t,r+1).reduce(function(e,t){return[lr()(t.concat([e[0]]).filter(eo)),le()(t.concat([e[1]]).filter(eo))]},[1/0,-1/0]);return[Math.min(e[0],i[0]),Math.max(e[1],i[1])]},[1/0,-1/0]);return[Math.min(o[0],n[0]),Math.max(o[1],n[1])]},[1/0,-1/0]).map(function(e){return e===1/0||e===-1/0?0:e})},cp=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,cy=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,cm=function(e,t,r){if(eg()(e))return e(t,r);
1if(!Array.isArray(e))return t;var n=[];if(eo(e[0]))n[0]=r?e[0]:Math.min(e[0],t[0]);else if(cp.test(e[0])){var i=+cp.exec(e[0])[1];n[0]=t[0]-i}else eg()(e[0])?n[0]=e[0](t[0]):n[0]=t[0];if(eo(e[1]))n[1]=r?e[1]:Math.max(e[1],t[1]);else if(cy.test(e[1])){var o=+cy.exec(e[1])[1];n[1]=t[1]+o}else eg()(e[1])?n[1]=e[1](t[1]):n[1]=t[1];return n},cg=function(e,t,r){if(e&&e.scale&&e.scale.bandwidth){var n=e.scale.bandwidth();if(!r||n>0)return n}if(e&&t&&t.length>=2){for(var i=e2()(t,function(e){return e.coordinate}),o=1/0,a=1,s=i.length;a<s;a++){var l=i[a],c=i[a-1];o=Math.min((l.coordinate||0)-(c.coordinate||0),o)}return o===1/0?0:o}return r?void 0:0},cv=function(e,t,r){return!e||!e.length||la()(e,X()(r,"type.defaultProps.domain"))?t:e},cb=function(e,t){var r=e.type.defaultProps?lG(lG({},e.type.defaultProps),e.props):e.props,n=r.dataKey,i=r.name,o=r.unit,a=r.formatter,s=r.tooltipType,l=r.chartType,c=r.hide;return lG(lG({},eF(e,!1)),{},{dataKey:n,unit:o,formatter:a,name:i||n,color:lQ(e),value:lJ(t,n),type:s,payload:t,chartType:l,hide:c})};function cw(e){return(cw="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function cx(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function cO(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?cx(Object(r),!0).forEach(function(t){ck(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):cx(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function ck(e,t,r){var n;return(n=function(e,t){if("object"!=cw(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=cw(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"),(t="symbol"==cw(n)?n:n+"")in e)?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var cj=["Webkit","Moz","O","ms"],cS=function(e,t){if(!e)return null;var r=e.replace(/(\w)/,function(e){return e.toUpperCase()}),n=cj.reduce(function(e,n){return cO(cO({},e),{},ck({},n+r,t))},{});return n[e]=t,n};function c_(e){return(c_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function cE(){return(cE=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function cA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function cP(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?cA(Object(r),!0).forEach(function(t){cI(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):cA(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function cT(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,cR(n.key),n)}}function cN(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(cN=function(){return!!e})()}function cC(e){return(cC=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function cM(e,t){return(cM=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function cI(e,t,r){return(t=cR(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function cR(e){var t=function(e,t){if("object"!=c_(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=c_(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==c_(t)?t:t+""}var cD=function(e){var t=e.data,r=e.startIndex,n=e.endIndex,i=e.x,o=e.width,a=e.travellerWidth;if(!t||!t.length)return{};var s=t.length,l=n0().domain(e0()(0,s)).range([i,i+o-a]),c=l.domain().map(function(e){return l(e)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:l(r),endX:l(n),scale:l,scaleValues:c}},cL=function(e){return e.changedTouches&&!!e.changedTouches.length},cB=function(e){var t,r;function n(e){var t,r,i;return!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,n),r=n,i=[e],r=cC(r),cI(t=function(e,t){if(t&&("object"===c_(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,cN()?Reflect.construct(r,i||[],cC(this).constructor):r.apply(this,i)),"handleDrag",function(e){t.leaveTimer&&(clearTimeout(t.leaveTimer),t.leaveTimer=null),t.state.isTravellerMoving?t.handleTravellerMove(e):t.state.isSlideMoving&&t.handleSlideDrag(e)}),cI(t,"handleTouchMove",function(e){null!=e.changedTouches&&e.changedTouches.length>0&&t.handleDrag(e.changedTouches[0])}),cI(t,"handleDragEnd",function(){t.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var e=t.props,r=e.endIndex,n=e.onDragEnd,i=e.startIndex;null==n||n({endIndex:r,startIndex:i})}),t.detachDragEndListener()}),cI(t,"handleLeaveWrapper",function(){(t.state.isTravellerMoving||t.state.isSlideMoving)&&(t.leaveTimer=window.setTimeout(t.handleDragEnd,t.props.leaveTimeOut))}),cI(t,"handleEnterSlideOrTraveller",function(){t.setState({isTextActive:!0})}),cI(t,"handleLeaveSlideOrTraveller",function(){t.setState({isTextActive:!1})}),cI(t,"handleSlideDragStart",function(e){var r=cL(e)?e.changedTouches[0]:e;t.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:r.pageX}),t.attachDragEndListener()}),t.travellerDragStartHandlers={startX:t.handleTravellerDragStart.bind(t,"startX"),endX:t.handleTravellerDragStart.bind(t,"endX")},t.state={},t}return!function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&cM(e,t)}(n,e),t=[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(e){var t=e.startX,r=e.endX,i=this.state.scaleValues,o=this.props,a=o.gap,s=o.data.length-1,l=n.getIndexInRange(i,Math.min(t,r)),c=n.getIndexInRange(i,Math.max(t,r));return{startIndex:l-l%a,endIndex:c===s?s:c-c%a}}},{key:"getTextOfTick",value:function(e){var t=this.props,r=t.data,n=t.tickFormatter,i=t.dataKey,o=lJ(r[e],i,e);return eg()(n)?n(o,e):o}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(e){var t=this.state,r=t.slideMoveStartX,n=t.startX,i=t.endX,o=this.props,a=o.x,s=o.width,l=o.travellerWidth,c=o.startIndex,u=o.endIndex,h=o.onChange,f
1=e.pageX-r;f>0?f=Math.min(f,a+s-l-i,a+s-l-n):f<0&&(f=Math.max(f,a-n,a-i));var d=this.getIndex({startX:n+f,endX:i+f});(d.startIndex!==c||d.endIndex!==u)&&h&&h(d),this.setState({startX:n+f,endX:i+f,slideMoveStartX:e.pageX})}},{key:"handleTravellerDragStart",value:function(e,t){var r=cL(t)?t.changedTouches[0]:t;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:e,brushMoveStartX:r.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(e){var t=this.state,r=t.brushMoveStartX,n=t.movingTravellerId,i=t.endX,o=t.startX,a=this.state[n],s=this.props,l=s.x,c=s.width,u=s.travellerWidth,h=s.onChange,f=s.gap,d=s.data,p={startX:this.state.startX,endX:this.state.endX},y=e.pageX-r;y>0?y=Math.min(y,l+c-u-a):y<0&&(y=Math.max(y,l-a)),p[n]=a+y;var m=this.getIndex(p),g=m.startIndex,v=m.endIndex,b=function(){var e=d.length-1;return"startX"===n&&(i>o?g%f==0:v%f==0)||i<o&&v===e||"endX"===n&&(i>o?v%f==0:g%f==0)||i>o&&v===e};this.setState(cI(cI({},n,a+y),"brushMoveStartX",e.pageX),function(){h&&b()&&h(m)})}},{key:"handleTravellerMoveKeyboard",value:function(e,t){var r=this,n=this.state,i=n.scaleValues,o=n.startX,a=n.endX,s=this.state[t],l=i.indexOf(s);if(-1!==l){var c=l+e;if(-1!==c&&!(c>=i.length)){var u=i[c];"startX"===t&&u>=a||"endX"===t&&u<=o||this.setState(cI({},t,u),function(){r.props.onChange(r.getIndex({startX:r.state.startX,endX:r.state.endX}))})}}}},{key:"renderBackground",value:function(){var e=this.props,t=e.x,r=e.y,n=e.width,i=e.height,o=e.fill,a=e.stroke;return P.createElement("rect",{stroke:a,fill:o,x:t,y:r,width:n,height:i})}},{key:"renderPanorama",value:function(){var e=this.props,t=e.x,r=e.y,n=e.width,i=e.height,o=e.data,a=e.children,s=e.padding,l=P.Children.only(a);return l?P.cloneElement(l,{x:t,y:r,width:n,height:i,margin:s,compact:!0,data:o}):null}},{key:"renderTravellerLayer",value:function(e,t){var r,i,o=this,a=this.props,s=a.y,l=a.travellerWidth,c=a.height,u=a.traveller,h=a.ariaLabel,f=a.data,d=a.startIndex,p=a.endIndex,y=Math.max(e,this.props.x),m=cP(cP({},eF(this.props,!1)),{},{x:y,y:s,width:l,height:c}),g=h||"Min value: ".concat(null===(r=f[d])||void 0===r?void 0:r.name,", Max value: ").concat(null===(i=f[p])||void 0===i?void 0:i.name);return P.createElement(e9,{tabIndex:0,role:"slider","aria-label":g,"aria-valuenow":e,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[t],onTouchStart:this.travellerDragStartHandlers[t],onKeyDown:function(e){["ArrowLeft","ArrowRight"].includes(e.key)&&(e.preventDefault(),e.stopPropagation(),o.handleTravellerMoveKeyboard("ArrowRight"===e.key?1:-1,t))},onFocus:function(){o.setState({isTravellerFocused:!0})},onBlur:function(){o.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},n.renderTraveller(u,m))}},{key:"renderSlide",value:function(e,t){var r=this.props,n=r.y,i=r.height,o=r.stroke,a=r.travellerWidth;return P.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:o,fillOpacity:.2,x:Math.min(e,t)+a,y:n,width:Math.max(Math.abs(t-e)-a,0),height:i})}},{key:"renderText",value:function(){var e=this.props,t=e.startIndex,r=e.endIndex,n=e.y,i=e.height,o=e.travellerWidth,a=e.stroke,s=this.state,l=s.startX,c=s.endX,u={pointerEvents:"none",fill:a};return P.createElement(e9,{className:"recharts-brush-texts"},P.createElement(i_,cE({textAnchor:"end",verticalAnchor:"middle",x:Math.min(l,c)-5,y:n+i/2},u),this.getTextOfTick(t)),P.createElement(i_,cE({textAnchor:"start",verticalAnchor:"middle",x:Math.max(l,c)+o+5,y:n+i/2},u),this.getTextOfTick(r)))}},{key:"render",value:function(){var e=this.props,t=e.data,r=e.className,n=e.children,i=e.x,o=e.y,a=e.width,s=e.height,l=e.alwaysShowText,c=this.state,u=c.startX,h=c.endX,f=c.isTextActive,d=c.isSlideMoving,p=c.isTravellerMoving,y=c.isTravellerFocused;if(!t||!t.length||!eo(i)||!eo(o)||!eo(a)||!eo(s)||a<=0||s<=0)return null;var m=W("recharts-brush",r),g=1===P.Children.count(n),v=cS("userSelect","none");return P.createElement(e9,{className:m,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:v}
1,this.renderBackground(),g&&this.renderPanorama(),this.renderSlide(u,h),this.renderTravellerLayer(u,"startX"),this.renderTravellerLayer(h,"endX"),(f||d||p||y||l)&&this.renderText())}}],r=[{key:"renderDefaultTraveller",value:function(e){var t=e.x,r=e.y,n=e.width,i=e.height,o=e.stroke,a=Math.floor(r+i/2)-1;return P.createElement(P.Fragment,null,P.createElement("rect",{x:t,y:r,width:n,height:i,fill:o,stroke:"none"}),P.createElement("line",{x1:t+1,y1:a,x2:t+n-1,y2:a,fill:"none",stroke:"#fff"}),P.createElement("line",{x1:t+1,y1:a+2,x2:t+n-1,y2:a+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(e,t){return P.isValidElement(e)?P.cloneElement(e,t):eg()(e)?e(t):n.renderDefaultTraveller(t)}},{key:"getDerivedStateFromProps",value:function(e,t){var r=e.data,n=e.width,i=e.x,o=e.travellerWidth,a=e.updateId,s=e.startIndex,l=e.endIndex;if(r!==t.prevData||a!==t.prevUpdateId)return cP({prevData:r,prevTravellerWidth:o,prevUpdateId:a,prevX:i,prevWidth:n},r&&r.length?cD({data:r,width:n,x:i,travellerWidth:o,startIndex:s,endIndex:l}):{scale:null,scaleValues:null});if(t.scale&&(n!==t.prevWidth||i!==t.prevX||o!==t.prevTravellerWidth)){t.scale.range([i,i+n-o]);var c=t.scale.domain().map(function(e){return t.scale(e)});return{prevData:r,prevTravellerWidth:o,prevUpdateId:a,prevX:i,prevWidth:n,startX:t.scale(e.startIndex),endX:t.scale(e.endIndex),scaleValues:c}}return null}},{key:"getIndexInRange",value:function(e,t){for(var r=e.length,n=0,i=r-1;i-n>1;){var o=Math.floor((n+i)/2);e[o]>t?i=o:n=o}return t>=e[i]?i:n}}],t&&cT(n.prototype,t),r&&cT(n,r),Object.defineProperty(n,"prototype",{writable:!1}),n}(P.PureComponent);function c$(e){return(c$="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function cU(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function cq(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?cU(Object(r),!0).forEach(function(t){var n,i;n=t,i=r[t],(n=function(e){var t=function(e,t){if("object"!=c$(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=c$(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==c$(t)?t:t+""}(n))in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):cU(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}cI(cB,"displayName","Brush"),cI(cB,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var cz=Math.PI/180,cF=function(e,t,r,n){return{x:e+Math.cos(-cz*n)*r,y:t+Math.sin(-cz*n)*r}},cW=function(e,t){var r=e.x,n=e.y;return Math.sqrt(Math.pow(r-t.x,2)+Math.pow(n-t.y,2))},cH=function(e,t){var r=e.x,n=e.y,i=t.cx,o=t.cy,a=cW({x:r,y:n},{x:i,y:o});if(a<=0)return{radius:a};var s=Math.acos((r-i)/a);return n>o&&(s=2*Math.PI-s),{radius:a,angle:180*s/Math.PI,angleInRadian:s}},cV=function(e){var t=e.startAngle,r=e.endAngle,n=Math.min(Math.floor(t/360),Math.floor(r/360));return{startAngle:t-360*n,endAngle:r-360*n}},cK=function(e,t){var r,n=cH({x:e.x,y:e.y},t),i=n.radius,o=n.angle,a=t.innerRadius,s=t.outerRadius;if(i<a||i>s)return!1;if(0===i)return!0;var l=cV(t),c=l.startAngle,u=l.endAngle,h=o;if(c<=u){for(;h>u;)h-=360;for(;h<c;)h+=360;r=h>=c&&h<=u}else{for(;h>c;)h-=360;for(;h<u;)h+=360;r=h>=u&&h<=c}return r?cq(cq({},t),{},{radius:i,angle:h+360*Math.min(Math.floor(t.startAngle/360),Math.floor(t.endAngle/360))}):null};function cG(e){return(cG="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var cZ=["offset"];function cJ(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function cY(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function cX(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
1t%2?cY(Object(r),!0).forEach(function(t){var n,i;n=t,i=r[t],(n=function(e){var t=function(e,t){if("object"!=cG(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=cG(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==cG(t)?t:t+""}(n))in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):cY(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function cQ(){return(cQ=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}var c0=function(e){var t=e.value,r=e.formatter,n=er()(e.children)?t:e.children;return eg()(r)?r(n):n},c1=function(e,t,r){var n,i,o=e.position,a=e.viewBox,s=e.offset,l=e.className,c=a.cx,u=a.cy,h=a.innerRadius,f=a.outerRadius,d=a.startAngle,p=a.endAngle,y=a.clockWise,m=(h+f)/2,g=en(p-d)*Math.min(Math.abs(p-d),360),v=g>=0?1:-1;"insideStart"===o?(n=d+v*s,i=y):"insideEnd"===o?(n=p-v*s,i=!y):"end"===o&&(n=p+v*s,i=y),i=g<=0?i:!i;var b=cF(c,u,m,n),w=cF(c,u,m,n+(i?1:-1)*359),x="M".concat(b.x,",").concat(b.y,"\n    A").concat(m,",").concat(m,",0,1,").concat(i?0:1,",\n    ").concat(w.x,",").concat(w.y),O=er()(e.id)?el("recharts-radial-line-"):e.id;return P.createElement("text",cQ({},r,{dominantBaseline:"central",className:W("recharts-radial-bar-label",l)}),P.createElement("defs",null,P.createElement("path",{id:O,d:x})),P.createElement("textPath",{xlinkHref:"#".concat(O)},t))},c2=function(e){var t=e.viewBox,r=e.offset,n=e.position,i=t.cx,o=t.cy,a=t.innerRadius,s=t.outerRadius,l=(t.startAngle+t.endAngle)/2;if("outside"===n){var c=cF(i,o,s+r,l),u=c.x;return{x:u,y:c.y,textAnchor:u>=i?"start":"end",verticalAnchor:"middle"}}if("center"===n)return{x:i,y:o,textAnchor:"middle",verticalAnchor:"middle"};if("centerTop"===n)return{x:i,y:o,textAnchor:"middle",verticalAnchor:"start"};if("centerBottom"===n)return{x:i,y:o,textAnchor:"middle",verticalAnchor:"end"};var h=cF(i,o,(a+s)/2,l);return{x:h.x,y:h.y,textAnchor:"middle",verticalAnchor:"middle"}},c3=function(e){var t=e.viewBox,r=e.parentViewBox,n=e.offset,i=e.position,o=t.x,a=t.y,s=t.width,l=t.height,c=l>=0?1:-1,u=c*n,h=c>0?"end":"start",f=c>0?"start":"end",d=s>=0?1:-1,p=d*n,y=d>0?"end":"start",m=d>0?"start":"end";if("top"===i)return cX(cX({},{x:o+s/2,y:a-c*n,textAnchor:"middle",verticalAnchor:h}),r?{height:Math.max(a-r.y,0),width:s}:{});if("bottom"===i)return cX(cX({},{x:o+s/2,y:a+l+u,textAnchor:"middle",verticalAnchor:f}),r?{height:Math.max(r.y+r.height-(a+l),0),width:s}:{});if("left"===i){var g={x:o-p,y:a+l/2,textAnchor:y,verticalAnchor:"middle"};return cX(cX({},g),r?{width:Math.max(g.x-r.x,0),height:l}:{})}if("right"===i){var v={x:o+s+p,y:a+l/2,textAnchor:m,verticalAnchor:"middle"};return cX(cX({},v),r?{width:Math.max(r.x+r.width-v.x,0),height:l}:{})}var b=r?{width:s,height:l}:{};return"insideLeft"===i?cX({x:o+p,y:a+l/2,textAnchor:m,verticalAnchor:"middle"},b):"insideRight"===i?cX({x:o+s-p,y:a+l/2,textAnchor:y,verticalAnchor:"middle"},b):"insideTop"===i?cX({x:o+s/2,y:a+u,textAnchor:"middle",verticalAnchor:f},b):"insideBottom"===i?cX({x:o+s/2,y:a+l-u,textAnchor:"middle",verticalAnchor:h},b):"insideTopLeft"===i?cX({x:o+p,y:a+u,textAnchor:m,verticalAnchor:f},b):"insideTopRight"===i?cX({x:o+s-p,y:a+u,textAnchor:y,verticalAnchor:f},b):"insideBottomLeft"===i?cX({x:o+p,y:a+l-u,textAnchor:m,verticalAnchor:h},b):"insideBottomRight"===i?cX({x:o+s-p,y:a+l-u,textAnchor:y,verticalAnchor:h},b):eb()(i)&&(eo(i.x)||ei(i.x))&&(eo(i.y)||ei(i.y))?cX({x:o+ec(i.x,s),y:a+ec(i.y,l),textAnchor:"end",verticalAnchor:"end"},b):cX({x:o+s/2,y:a+l/2,textAnchor:"middle",verticalAnchor:"middle"},b)};function c5(e){var t,r=e.offset,n=cX({offset:void 0===r?5:r},function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,cZ)),i=n.viewBox,o=n.position,a=n.value,s=n.children,l=n.content,c=n.className,u=n.textBreakAll;if(!i||er()(a)&&er()(s)&&!(0,P.isValidElement)(l)&&!eg()(l))return null;if((0,P.isValidElement)(l))return(0,P.cloneElement)(l,n);if(eg()(l)){if(t=(0,P.createElement)(l,n),(0,P.isValidElement)(t))return t}else t=c0(n);var h="cx"in i&&eo(i.cx),f=eF(n,!0);if(h&&("insideStart"===o||"insideEnd"===o||"end"===o))return c1(n,t,f);var d=h?c2(n):c3(n);return P.createElement(i_,cQ({className:W("recharts-label",void 0===c?"":c)},f,d,{breakAll:u}),t)}c5.displayName="Label";var c4=function(e){var t=e.cx,r=e.cy,n=e.angle,i=e.startAngle,o=e.endAngle,a=e.r,s=e.radius,l=e.innerRadius,c=e.outerRadius,u=e.x,h=e.y,f=e.top,d=e.left,p=e.width,y=e.height,m=e.clockWise,g=e.labelViewBox;if(g)return g;if(eo(p)&&eo(y)){if(eo(u)&&eo(h))return{x:u,y:h,width:p,height:y};if(eo(f)&&eo(d))return{x:f,y:d,width:p,height:y}}return eo(u)&&eo(h)?{x:u,y:h,width:0,height:0}:eo(t)&&eo(r)?{cx:t,cy:r,startAngle:i||n||0,endAngle:o||n||0,innerRadius:l||0,outerRadius:c||s||a||0,clockWise:m}:e.viewBox?e.viewBox:{}};c5.parseViewBox=c4,c5.renderCallByParent=function(e,t){var r,n,i=!(arguments.length>2)||void 0===arguments[2]||arguments[2];
1if(!e||!e.children&&i&&!e.label)return null;var o=e.children,a=c4(e),s=eB(o,c5).map(function(e,r){return(0,P.cloneElement)(e,{viewBox:t||a,key:"label-".concat(r)})});return i?[(r=e.label,n=t||a,r?!0===r?P.createElement(c5,{key:"label-implicit",viewBox:n}):ea(r)?P.createElement(c5,{key:"label-implicit",viewBox:n,value:r}):(0,P.isValidElement)(r)?r.type===c5?(0,P.cloneElement)(r,{key:"label-implicit",viewBox:n}):P.createElement(c5,{key:"label-implicit",content:r,viewBox:n}):eg()(r)?P.createElement(c5,{key:"label-implicit",content:r,viewBox:n}):eb()(r)?P.createElement(c5,cQ({viewBox:n},r,{key:"label-implicit"})):null:null)].concat(function(e){if(Array.isArray(e))return cJ(e)}(s)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(s)||function(e,t){if(e){if("string"==typeof e)return cJ(e,void 0);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return cJ(e,void 0)}}(s)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()):s};var c6=function(e,t){var r=e.alwaysShow,n=e.ifOverflow;return r&&(n="extendDomain"),n===t},c8=r(47759),c7=r.n(c8),c9=r(55118),ue=r.n(c9),ut=function(e){return null};ut.displayName="Cell";var ur=r(96579),un=r.n(ur);function ui(e){return(ui="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var uo=["valueAccessor"],ua=["data","dataKey","clockWise","id","textBreakAll"];function us(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function ul(){return(ul=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function uc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function uu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?uc(Object(r),!0).forEach(function(t){var n,i;n=t,i=r[t],(n=function(e){var t=function(e,t){if("object"!=ui(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=ui(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==ui(t)?t:t+""}(n))in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):uc(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function uh(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var uf=function(e){return Array.isArray(e.value)?un()(e.value):e.value};function ud(e){var t=e.valueAccessor,r=void 0===t?uf:t,n=uh(e,uo),i=n.data,o=n.dataKey,a=n.clockWise,s=n.id,l=n.textBreakAll,c=uh(n,ua);return i&&i.length?P.createElement(e9,{className:"recharts-label-list"},i.map(function(e,t){var n=er()(o)?r(e,t):lJ(e&&e.payload,o),i=er()(s)?{}:{id:"".concat(s,"-").concat(t)};return P.createElement(c5,ul({},eF(e,!0),c,i,{parentViewBox:e.parentViewBox,value:n,textBreakAll:l,viewBox:c5.parseViewBox(er()(a)?e:uu(uu({},e),{},{clockWise:a})),key:"label-".concat(t),index:t}))})):null}ud.displayName="LabelList",ud.renderCallByParent=function(e,t){var r,n=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(!e||!e.children&&n&&!e.label)return null;var i=eB(e.children,ud).map(function(e,r){return(0,P.cloneElement)(e,{data:t,key:"labelList-".concat(r)})});return n?[(r=e.label)?!0===r?P.createElement(ud,{key:"labelList-implicit",data:t}):P.isValidElement(r)||eg()(r)?P.createElement(ud,{key:"labelList-implicit",data:t,content:r}):eb()(r)?P.createElement(ud,ul({data:t},r,{key:"labelList-implicit"})):null:null].concat(function(e){if(Array.isArray(e))return us(e)}(i)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(i)||function(e,t){if(e){if("string"==typeof e)return us(e,void 0);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return us(e,void 0)}}(i)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()):i};var up=r(32999),uy=r.n(up),um=r(64337),ug=r.n(um);function uv(e){return(uv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ub(){return(ub=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];
1for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function uw(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function ux(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function uO(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ux(Object(r),!0).forEach(function(t){var n,i;n=t,i=r[t],(n=function(e){var t=function(e,t){if("object"!=uv(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=uv(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==uv(t)?t:t+""}(n))in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ux(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var uk=function(e,t,r,n,i){var o=r-n;return"M ".concat(e,",").concat(t)+"L ".concat(e+r,",").concat(t)+"L ".concat(e+r-o/2,",").concat(t+i)+"L ".concat(e+r-o/2-n,",").concat(t+i)+"L ".concat(e,",").concat(t," Z")},uj={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},uS=function(e){var t,r=uO(uO({},uj),e),n=(0,P.useRef)(),i=function(e){if(Array.isArray(e))return e}(t=(0,P.useState)(-1))||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,s=[],l=!0,c=!1;try{for(o=(r=r.call(e)).next;!(l=(n=o.call(r)).done)&&(s.push(n.value),2!==s.length);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(t,2)||function(e,t){if(e){if("string"==typeof e)return uw(e,2);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return uw(e,2)}}(t,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),o=i[0],a=i[1];(0,P.useEffect)(function(){if(n.current&&n.current.getTotalLength)try{var e=n.current.getTotalLength();e&&a(e)}catch(e){}},[]);var s=r.x,l=r.y,c=r.upperWidth,u=r.lowerWidth,h=r.height,f=r.className,d=r.animationEasing,p=r.animationDuration,y=r.animationBegin,m=r.isUpdateAnimationActive;if(s!==+s||l!==+l||c!==+c||u!==+u||h!==+h||0===c&&0===u||0===h)return null;var g=W("recharts-trapezoid",f);return m?P.createElement(nD,{canBegin:o>0,from:{upperWidth:0,lowerWidth:0,height:h,x:s,y:l},to:{upperWidth:c,lowerWidth:u,height:h,x:s,y:l},duration:p,animationEasing:d,isActive:m},function(e){var t=e.upperWidth,i=e.lowerWidth,a=e.height,s=e.x,l=e.y;return P.createElement(nD,{canBegin:o>0,from:"0px ".concat(-1===o?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:y,duration:p,easing:d},P.createElement("path",ub({},eF(r,!0),{className:g,d:uk(s,l,t,i,a),ref:n})))}):P.createElement("g",null,P.createElement("path",ub({},eF(r,!0),{className:g,d:uk(s,l,c,u,h)})))};function u_(e){return(u_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function uE(){return(uE=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function uA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function uP(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
1t%2?uA(Object(r),!0).forEach(function(t){var n,i;n=t,i=r[t],(n=function(e){var t=function(e,t){if("object"!=u_(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=u_(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==u_(t)?t:t+""}(n))in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):uA(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var uT=function(e){var t=e.cx,r=e.cy,n=e.radius,i=e.angle,o=e.sign,a=e.isExternal,s=e.cornerRadius,l=e.cornerIsExternal,c=s*(a?1:-1)+n,u=Math.asin(s/c)/cz,h=l?i:i+o*u;return{center:cF(t,r,c,h),circleTangency:cF(t,r,n,h),lineTangency:cF(t,r,c*Math.cos(u*cz),l?i-o*u:i),theta:u}},uN=function(e){var t,r=e.cx,n=e.cy,i=e.innerRadius,o=e.outerRadius,a=e.startAngle,s=en((t=e.endAngle)-a)*Math.min(Math.abs(t-a),359.999),l=a+s,c=cF(r,n,o,a),u=cF(r,n,o,l),h="M ".concat(c.x,",").concat(c.y,"\n    A ").concat(o,",").concat(o,",0,\n    ").concat(+(Math.abs(s)>180),",").concat(+(a>l),",\n    ").concat(u.x,",").concat(u.y,"\n  ");if(i>0){var f=cF(r,n,i,a),d=cF(r,n,i,l);h+="L ".concat(d.x,",").concat(d.y,"\n            A ").concat(i,",").concat(i,",0,\n            ").concat(+(Math.abs(s)>180),",").concat(+(a<=l),",\n            ").concat(f.x,",").concat(f.y," Z")}else h+="L ".concat(r,",").concat(n," Z");return h},uC=function(e){var t=e.cx,r=e.cy,n=e.innerRadius,i=e.outerRadius,o=e.cornerRadius,a=e.forceCornerRadius,s=e.cornerIsExternal,l=e.startAngle,c=e.endAngle,u=en(c-l),h=uT({cx:t,cy:r,radius:i,angle:l,sign:u,cornerRadius:o,cornerIsExternal:s}),f=h.circleTangency,d=h.lineTangency,p=h.theta,y=uT({cx:t,cy:r,radius:i,angle:c,sign:-u,cornerRadius:o,cornerIsExternal:s}),m=y.circleTangency,g=y.lineTangency,v=y.theta,b=s?Math.abs(l-c):Math.abs(l-c)-p-v;if(b<0)return a?"M ".concat(d.x,",").concat(d.y,"\n        a").concat(o,",").concat(o,",0,0,1,").concat(2*o,",0\n        a").concat(o,",").concat(o,",0,0,1,").concat(-(2*o),",0\n      "):uN({cx:t,cy:r,innerRadius:n,outerRadius:i,startAngle:l,endAngle:c});var w="M ".concat(d.x,",").concat(d.y,"\n    A").concat(o,",").concat(o,",0,0,").concat(+(u<0),",").concat(f.x,",").concat(f.y,"\n    A").concat(i,",").concat(i,",0,").concat(+(b>180),",").concat(+(u<0),",").concat(m.x,",").concat(m.y,"\n    A").concat(o,",").concat(o,",0,0,").concat(+(u<0),",").concat(g.x,",").concat(g.y,"\n  ");if(n>0){var x=uT({cx:t,cy:r,radius:n,angle:l,sign:u,isExternal:!0,cornerRadius:o,cornerIsExternal:s}),O=x.circleTangency,k=x.lineTangency,j=x.theta,S=uT({cx:t,cy:r,radius:n,angle:c,sign:-u,isExternal:!0,cornerRadius:o,cornerIsExternal:s}),_=S.circleTangency,E=S.lineTangency,A=S.theta,P=s?Math.abs(l-c):Math.abs(l-c)-j-A;if(P<0&&0===o)return"".concat(w,"L").concat(t,",").concat(r,"Z");w+="L".concat(E.x,",").concat(E.y,"\n      A").concat(o,",").concat(o,",0,0,").concat(+(u<0),",").concat(_.x,",").concat(_.y,"\n      A").concat(n,",").concat(n,",0,").concat(+(P>180),",").concat(+(u>0),",").concat(O.x,",").concat(O.y,"\n      A").concat(o,",").concat(o,",0,0,").concat(+(u<0),",").concat(k.x,",").concat(k.y,"Z")}else w+="L".concat(t,",").concat(r,"Z");return w},uM={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},uI=function(e){var t,r=uP(uP({},uM),e),n=r.cx,i=r.cy,o=r.innerRadius,a=r.outerRadius,s=r.cornerRadius,l=r.forceCornerRadius,c=r.cornerIsExternal,u=r.startAngle,h=r.endAngle,f=r.className;if(a<o||u===h)return null;var d=W("recharts-sector",f),p=a-o,y=ec(s,p,0,!0);return t=y>0&&360>Math.abs(u-h)?uC({cx:n,cy:i,innerRadius:o,outerRadius:a,cornerRadius:Math.min(y,p/2),forceCornerRadius:l,cornerIsExternal:c,startAngle:u,endAngle:h}):uN({cx:n,cy:i,innerRadius:o,outerRadius:a,startAngle:u,endAngle:h}),P.createElement("path",uE({},eF(r,!0),{className:d,d:t,role:"img"}))},uR=["option","shapeType","propTransformer","activeClassName","isActive"];function uD(e){return(uD="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function uL(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function uB(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
1t%2?uL(Object(r),!0).forEach(function(t){var n,i;n=t,i=r[t],(n=function(e){var t=function(e,t){if("object"!=uD(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=uD(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==uD(t)?t:t+""}(n))in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):uL(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function u$(e){var t=e.shapeType,r=e.elementProps;switch(t){case"rectangle":return P.createElement(nH,r);case"trapezoid":return P.createElement(uS,r);case"sector":return P.createElement(uI,r);case"symbols":if("symbols"===t)return P.createElement(rn,r);break;default:return null}}function uU(e){var t,r=e.option,n=e.shapeType,i=e.propTransformer,o=e.activeClassName,a=e.isActive,s=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,uR);if((0,P.isValidElement)(r))t=(0,P.cloneElement)(r,uB(uB({},s),(0,P.isValidElement)(r)?r.props:r));else if(eg()(r))t=r(s);else if(uy()(r)&&!ug()(r)){var l=(void 0===i?function(e,t){return uB(uB({},t),e)}:i)(r,s);t=P.createElement(u$,{shapeType:n,elementProps:l})}else t=P.createElement(u$,{shapeType:n,elementProps:s});return a?P.createElement(e9,{className:void 0===o?"recharts-active-shape":o},t):t}function uq(e,t){return null!=t&&"trapezoids"in e.props}function uz(e,t){return null!=t&&"sectors"in e.props}function uF(e,t){return null!=t&&"points"in e.props}function uW(e,t){var r,n,i=e.x===(null==t||null===(r=t.labelViewBox)||void 0===r?void 0:r.x)||e.x===t.x,o=e.y===(null==t||null===(n=t.labelViewBox)||void 0===n?void 0:n.y)||e.y===t.y;return i&&o}function uH(e,t){var r=e.endAngle===t.endAngle,n=e.startAngle===t.startAngle;return r&&n}function uV(e,t){var r=e.x===t.x,n=e.y===t.y,i=e.z===t.z;return r&&n&&i}var uK=["x","y"];function uG(e){return(uG="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function uZ(){return(uZ=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function uJ(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function uY(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?uJ(Object(r),!0).forEach(function(t){var n,i;n=t,i=r[t],(n=function(e){var t=function(e,t){if("object"!=uG(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=uG(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==uG(t)?t:t+""}(n))in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):uJ(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function uX(e,t){var r=e.x,n=e.y,i=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,uK),o=parseInt("".concat(r),10),a=parseInt("".concat(n),10),s=parseInt("".concat(t.height||i.height),10),l=parseInt("".concat(t.width||i.width),10);return uY(uY(uY(uY(uY({},t),i),o?{x:o}:{}),a?{y:a}:{}),{}
1,{height:s,width:l,name:t.name,radius:t.radius})}function uQ(e){return P.createElement(uU,uZ({shapeType:"rectangle",propTransformer:uX,activeClassName:"recharts-active-bar"},e))}var u0=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return function(r,n){if("number"==typeof e)return e;var i=eo(r)||er()(r);return i?e(r,n):(i||e3(!1),t)}},u1=["value","background"];function u2(e){return(u2="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u3(){return(u3=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function u5(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function u4(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?u5(Object(r),!0).forEach(function(t){he(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u5(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function u6(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,ht(n.key),n)}}function u8(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(u8=function(){return!!e})()}function u7(e){return(u7=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function u9(e,t){return(u9=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function he(e,t,r){return(t=ht(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ht(e){var t=function(e,t){if("object"!=u2(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=u2(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==u2(t)?t:t+""}var hr=function(e){var t,r;function n(){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,n);for(var e,t,r,i=arguments.length,o=Array(i),a=0;a<i;a++)o[a]=arguments[a];return t=n,r=[].concat(o),t=u7(t),he(e=function(e,t){if(t&&("object"===u2(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,u8()?Reflect.construct(t,r||[],u7(this).constructor):t.apply(this,r)),"state",{isAnimationFinished:!1}),he(e,"id",el("recharts-bar-")),he(e,"handleAnimationEnd",function(){var t=e.props.onAnimationEnd;e.setState({isAnimationFinished:!0}),t&&t()}),he(e,"handleAnimationStart",function(){var t=e.props.onAnimationStart;e.setState({isAnimationFinished:!1}),t&&t()}),e}return!function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&u9(e,t)}(n,e),t=[{key:"renderRectanglesStatically",value:function(e){var t=this,r=this.props,n=r.shape,i=r.dataKey,o=r.activeIndex,a=r.activeBar,s=eF(this.props,!1);return e&&e.map(function(e,r){var l=r===o,c=u4(u4(u4({},s),e),{},{isActive:l,option:l?a:n,index:r,dataKey:i,onAnimationStart:t.handleAnimationStart,onAnimationEnd:t.handleAnimationEnd});return P.createElement(e9,u3({className:"recharts-bar-rectangle"},eA(t.props,e,r),{key:"rectangle-".concat(null==e?void 0:e.x,"-").concat(null==e?void 0:e.y,"-").concat(null==e?void 0:e.value,"-").concat(r)}),P.createElement(uQ,c))})}},{key:"renderRectanglesWithAnimation",value:function(){var e=this,t=this.props,r=t.data,n=t.layout,i=t.isAnimationActive,o=t.animationBegin,a=t.animationDuration,s=t.animationEasing,l=t.animationId,c=this.state.prevData;return P.createElement(nD,{begin:o,duration:a,isActive:i,easing:s,from:{t:0},to:{t:1},key:"bar-".concat(l),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(t){var i=t.t,o=r.map(function(e,t){var r=c&&c[t];if(r){var o=ef(r.x,e.x),a=ef(r.y,e.y),s=ef(r.width,e.width),l=ef(r.height,e.height);return u4(u4({},e),{},{x:o(i),y:a(i),width:s(i),height:l(i)})}if("horizontal"===n){var u=ef(0,e.height)(i);return u4(u4({},e),{},{y:e.y+e.height-u,height:u})}var h=ef(0,e.width)(i);return u4(u4({},e),{},{width:h})});return P.createElement(e9,null,e.renderRectanglesStatically(o))})}},{key:"renderRectangles",value:function(){var e=this.props,t=e.data,r=e.isAnimationActive,n=this.state.prevData;return r&&t&&t.length&&(!n||!la()(n,t))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(t)}}
1,{key:"renderBackground",value:function(){var e=this,t=this.props,r=t.data,n=t.dataKey,i=t.activeIndex,o=eF(this.props.background,!1);return r.map(function(t,r){t.value;var a=t.background,s=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(t,u1);if(!a)return null;var l=u4(u4(u4(u4(u4({},s),{},{fill:"#eee"},a),o),eA(e.props,t,r)),{},{onAnimationStart:e.handleAnimationStart,onAnimationEnd:e.handleAnimationEnd,dataKey:n,index:r,className:"recharts-bar-background-rectangle"});return P.createElement(uQ,u3({key:"background-bar-".concat(r),option:e.props.background,isActive:r===i},l))})}},{key:"renderErrorBar",value:function(e,t){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var r=this.props,n=r.data,i=r.xAxis,o=r.yAxis,a=r.layout,s=eB(r.children,l$);if(!s)return null;var l="vertical"===a?n[0].height/2:n[0].width/2,c=function(e,t){var r=Array.isArray(e.value)?e.value[1]:e.value;return{x:e.x,y:e.y,value:r,errorVal:lJ(e,t)}};return P.createElement(e9,{clipPath:e?"url(#clipPath-".concat(t,")"):null},s.map(function(e){return P.cloneElement(e,{key:"error-bar-".concat(t,"-").concat(e.props.dataKey),data:n,xAxis:i,yAxis:o,layout:a,offset:l,dataPointFormatter:c})}))}},{key:"render",value:function(){var e=this.props,t=e.hide,r=e.data,n=e.className,i=e.xAxis,o=e.yAxis,a=e.left,s=e.top,l=e.width,c=e.height,u=e.isAnimationActive,h=e.background,f=e.id;if(t||!r||!r.length)return null;var d=this.state.isAnimationFinished,p=W("recharts-bar",n),y=i&&i.allowDataOverflow,m=o&&o.allowDataOverflow,g=y||m,v=er()(f)?this.id:f;return P.createElement(e9,{className:p},y||m?P.createElement("defs",null,P.createElement("clipPath",{id:"clipPath-".concat(v)},P.createElement("rect",{x:y?a:a-l/2,y:m?s:s-c/2,width:y?l:2*l,height:m?c:2*c}))):null,P.createElement(e9,{className:"recharts-bar-rectangles",clipPath:g?"url(#clipPath-".concat(v,")"):null},h?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(g,v),(!u||d)&&ud.renderCallByParent(this.props,r))}}],r=[{key:"getDerivedStateFromProps",value:function(e,t){return e.animationId!==t.prevAnimationId?{prevAnimationId:e.animationId,curData:e.data,prevData:t.curData}:e.data!==t.curData?{curData:e.data}:null}}],t&&u6(n.prototype,t),r&&u6(n,r),Object.defineProperty(n,"prototype",{writable:!1}),n}(P.PureComponent);function hn(e){return(hn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function hi(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,hl(n.key),n)}}function ho(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function ha(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ho(Object(r),!0).forEach(function(t){hs(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ho(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function hs(e,t,r){return(t=hl(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function hl(e){var t=function(e,t){if("object"!=hn(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=hn(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==hn(t)?t:t+""}he(hr,"displayName","Bar"),he(hr,"defaultProps",{xAxisId:0,yAxisId:0,legendT
1ype:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!tx.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"}),he(hr,"getComposedData",function(e){var t=e.props,r=e.item,n=e.barPosition,i=e.bandSize,o=e.xAxis,a=e.yAxis,s=e.xAxisTicks,l=e.yAxisTicks,c=e.stackedData,u=e.dataStartIndex,h=e.displayedData,f=e.offset,d=cn(n,r);if(!d)return null;var p=t.layout,y=r.type.defaultProps,m=void 0!==y?u4(u4({},y),r.props):r.props,g=m.dataKey,v=m.children,b=m.minPointSize,w="horizontal"===p?a:o,x=c?w.scale.domain():null,O=ch({numericAxis:w}),k=eB(v,ut),j=h.map(function(e,t){c?h=ci(c[u+t],x):Array.isArray(h=lJ(e,g))||(h=[O,h]);var n=u0(b,hr.defaultProps.minPointSize)(h[1],t);if("horizontal"===p){var h,f,y,m,v,w,j,S=[a.scale(h[0]),a.scale(h[1])],_=S[0],E=S[1];f=cu({axis:o,ticks:s,bandSize:i,offset:d.offset,entry:e,index:t}),y=null!==(j=null!=E?E:_)&&void 0!==j?j:void 0,m=d.size;var A=_-E;if(v=Number.isNaN(A)?0:A,w={x:f,y:a.y,width:m,height:a.height},Math.abs(n)>0&&Math.abs(v)<Math.abs(n)){var P=en(v||n)*(Math.abs(n)-Math.abs(v));y-=P,v+=P}}else{var T=[o.scale(h[0]),o.scale(h[1])],N=T[0],C=T[1];if(f=N,y=cu({axis:a,ticks:l,bandSize:i,offset:d.offset,entry:e,index:t}),m=C-N,v=d.size,w={x:o.x,y:y,width:o.width,height:v},Math.abs(n)>0&&Math.abs(m)<Math.abs(n)){var M=en(m||n)*(Math.abs(n)-Math.abs(m));m+=M}}return u4(u4(u4({},e),{},{x:f,y:y,width:m,height:v,value:c?h:h[1],payload:e,background:w},k&&k[t]&&k[t].props),{},{tooltipPayload:[cb(r,e)],tooltipPosition:{x:f+m/2,y:y+v/2}})});return u4({data:j,layout:p},f)});var hc=function(e,t){var r=e.x,n=e.y,i=t.x,o=t.y;return{x:Math.min(r,i),y:Math.min(n,o),width:Math.abs(i-r),height:Math.abs(o-n)}},hu=function(){var e,t;function r(e){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,r),this.scale=e}return e=[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.bandAware,n=t.position;if(void 0!==e){if(n)switch(n){case"start":default:return this.scale(e);case"middle":var i=this.bandwidth?this.bandwidth()/2:0;return this.scale(e)+i;case"end":var o=this.bandwidth?this.bandwidth():0;return this.scale(e)+o}if(r){var a=this.bandwidth?this.bandwidth()/2:0;return this.scale(e)+a}return this.scale(e)}}},{key:"isInRange",value:function(e){var t=this.range(),r=t[0],n=t[t.length-1];return r<=n?e>=r&&e<=n:e>=n&&e<=r}}],t=[{key:"create",value:function(e){return new r(e)}}],e&&hi(r.prototype,e),t&&hi(r,t),Object.defineProperty(r,"prototype",{writable:!1}),r}();hs(hu,"EPS",1e-4);var hh=function(e){var t=Object.keys(e).reduce(function(t,r){return ha(ha({},t),{},hs({},r,hu.create(e[r])))},{});return ha(ha({},t),{},{apply:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.bandAware,i=r.position;return c7()(e,function(e,r){return t[r].apply(e,{bandAware:n,position:i})})},isInRange:function(e){return ue()(e,function(e,r){return t[r].isInRange(e)})}})},hf=function(e){var t=e.width,r=e.height,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=(n%180+180)%180*Math.PI/180,o=Math.atan(r/t);return Math.abs(i>o&&i<Math.PI-o?r/Math.sin(i):t/Math.cos(i))};function hd(){return(hd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function hp(e){return(hp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function hy(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function hm(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
1t%2?hy(Object(r),!0).forEach(function(t){hw(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):hy(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function hg(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(hg=function(){return!!e})()}function hv(e){return(hv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function hb(e,t){return(hb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function hw(e,t,r){return(t=hx(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function hx(e){var t=function(e,t){if("object"!=hp(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=hp(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==hp(t)?t:t+""}var hO=function(e){var t=e.x,r=e.y,n=e.xAxis,i=e.yAxis,o=hh({x:n.scale,y:i.scale}),a=o.apply({x:t,y:r},{bandAware:!0});return c6(e,"discard")&&!o.isInRange(a)?null:a},hk=function(e){var t;function r(){var e,t;return!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,r),e=r,t=arguments,e=hv(e),function(e,t){if(t&&("object"===hp(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,hg()?Reflect.construct(e,t||[],hv(this).constructor):e.apply(this,t))}return!function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&hb(e,t)}(r,e),t=[{key:"render",value:function(){var e=this.props,t=e.x,n=e.y,i=e.r,o=e.alwaysShow,a=e.clipPathId,s=ea(t),l=ea(n);if(ey(void 0===o,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!s||!l)return null;var c=hO(this.props);if(!c)return null;var u=c.x,h=c.y,f=this.props,d=f.shape,p=f.className,y=hm(hm({clipPath:c6(this.props,"hidden")?"url(#".concat(a,")"):void 0},eF(this.props,!0)),{},{cx:u,cy:h});return P.createElement(e9,{className:W("recharts-reference-dot",p)},r.renderDot(d,y),c5.renderCallByParent(this.props,{x:u-i,y:h-i,width:2*i,height:2*i}))}}],function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,hx(n.key),n)}}(r.prototype,t),Object.defineProperty(r,"prototype",{writable:!1}),r}(P.Component);hw(hk,"displayName","ReferenceDot"),hw(hk,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1}),hw(hk,"renderDot",function(e,t){return P.isValidElement(e)?P.cloneElement(e,t):eg()(e)?e(t):P.createElement(r_,hd({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"}))});var hj=r(13632),hS=r.n(hj),h_=r(80203),hE=r.n(h_),hA=r(89830),hP=r.n(hA)()(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return["l",e.left,"t",e.top,"w",e.width,"h",e.height].join("")}),hT=(0,P.createContext)(void 0),hN=(0,P.createContext)(void 0),hC=(0,P.createContext)(void 0),hM=(0,P.createContext)({}),hI=(0,P.createContext)(void 0),hR=(0,P.createContext)(0),hD=(0,P.createContext)(0),hL=function(e){var t=e.state,r=t.xAxisMap,n=t.yAxisMap,i=t.offset,o=e.clipPathId,a=e.children,s=e.width,l=e.height,c=hP(i);return P.createElement(hT.Provider,{value:r},P.createElement(hN.Provider,{value:n},P.createElement(hM.Provider,{value:i},P.createElement(hC.Provider,{value:c},P.createElement(hI.Provider,{value:o},P.createElement(hR.Provider,{value:l},P.createElement(hD.Provider,{value:s},a)))))))},hB=function(e){var t=(0,P.useContext)(hT);null!=t||e3(!1);var r=t[e];return null!=r||e3(!1),r},h$=function(){var e=(0,P.useContext)(hN);return hE()(e,function(e){return ue()(e.domain,Number.isFinite)})||eu(e)},hU=function(e){var t=(0,P.useContext)(hN);null!=t||e3(!1);var r=t[e];return null!=r||e3(!1),r},hq=function(){return(0,P.useContext)(hD)},hz=function(){return(0,P.useContext)(hR)};
1function hF(e){return(hF="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function hW(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(hW=function(){return!!e})()}function hH(e){return(hH=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function hV(e,t){return(hV=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function hK(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function hG(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?hK(Object(r),!0).forEach(function(t){hZ(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):hK(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function hZ(e,t,r){return(t=hJ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function hJ(e){var t=function(e,t){if("object"!=hF(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=hF(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==hF(t)?t:t+""}function hY(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function hX(){return(hX=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}var hQ=function(e,t,r,n,i,o,a,s,l){var c=i.x,u=i.y,h=i.width,f=i.height;if(r){var d=l.y,p=e.y.apply(d,{position:o});if(c6(l,"discard")&&!e.y.isInRange(p))return null;var y=[{x:c+h,y:p},{x:c,y:p}];return"left"===s?y.reverse():y}if(t){var m=l.x,g=e.x.apply(m,{position:o});if(c6(l,"discard")&&!e.x.isInRange(g))return null;var v=[{x:g,y:u+f},{x:g,y:u}];return"top"===a?v.reverse():v}if(n){var b=l.segment.map(function(t){return e.apply(t,{position:o})});return c6(l,"discard")&&hS()(b,function(t){return!e.isInRange(t)})?null:b}return null};function h0(e){var t,r,n,i=e.x,o=e.y,a=e.segment,s=e.xAxisId,l=e.yAxisId,c=e.shape,u=e.className,h=e.alwaysShow,f=(0,P.useContext)(hI),d=hB(s),p=hU(l),y=(0,P.useContext)(hC);if(!f||!y)return null;ey(void 0===h,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var m=hQ(hh({x:d.scale,y:p.scale}),ea(i),ea(o),a&&2===a.length,y,e.position,d.orientation,p.orientation,e);if(!m)return null;var g=function(e){if(Array.isArray(e))return e}(m)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,s=[],l=!0,c=!1;try{for(o=(r=r.call(e)).next;!(l=(n=o.call(r)).done)&&(s.push(n.value),2!==s.length);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(m,2)||function(e,t){if(e){if("string"==typeof e)return hY(e,2);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return hY(e,2)}}(m,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),v=g[0],b=v.x,w=v.y,x=g[1],O=x.x,k=x.y,j=hG(hG({clipPath:c6(e,"hidden")?"url(#".concat(f,")"):void 0},eF(e,!0)),{},{x1:b,y1:w,x2:O,y2:k});return P.createElement(e9,{className:W("recharts-reference-line",u)},(t=c,r=j,P.isValidElement(t)?P.cloneElement(t,r):eg()(t)?t(r):P.createElement("line",hX({},r,{className:"recharts-reference-line-line"}))),c5.renderCallByParent(e,hc({x:(n={x1:b,y1:w,x2:O,y2:k}).x1,y:n.y1},{x:n.x2,y:n.y2})))}var h1=function(e){var t;function r(){var e,t;return!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,r),e=r,t=arguments,e=hH(e),function(e,t){if(t&&("object"===hF(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,hW()?Reflect.construct(e,t||[],hH(this).constructor):e.apply(this,t))}return!function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&hV(e,t)}(r,e),t=[{key:"render",value:function(){return P.createElement(h0,this.props)}}],function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,hJ(n.key),n)}}(r.prototype,t),Object.defineProperty(r,"prototype",{writable:!1}),r}(P.Component);
1function h2(){return(h2=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function h3(e){return(h3="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function h5(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function h4(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?h5(Object(r),!0).forEach(function(t){h9(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):h5(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function h6(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(h6=function(){return!!e})()}function h8(e){return(h8=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function h7(e,t){return(h7=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function h9(e,t,r){return(t=fe(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function fe(e){var t=function(e,t){if("object"!=h3(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=h3(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==h3(t)?t:t+""}hZ(h1,"displayName","ReferenceLine"),hZ(h1,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});var ft=function(e,t,r,n,i){var o=i.x1,a=i.x2,s=i.y1,l=i.y2,c=i.xAxis,u=i.yAxis;if(!c||!u)return null;var h=hh({x:c.scale,y:u.scale}),f={x:e?h.x.apply(o,{position:"start"}):h.x.rangeMin,y:r?h.y.apply(s,{position:"start"}):h.y.rangeMin},d={x:t?h.x.apply(a,{position:"end"}):h.x.rangeMax,y:n?h.y.apply(l,{position:"end"}):h.y.rangeMax};return!c6(i,"discard")||h.isInRange(f)&&h.isInRange(d)?hc(f,d):null},fr=function(e){var t;function r(){var e,t;return!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,r),e=r,t=arguments,e=h8(e),function(e,t){if(t&&("object"===h3(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,h6()?Reflect.construct(e,t||[],h8(this).constructor):e.apply(this,t))}return!function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&h7(e,t)}(r,e),t=[{key:"render",value:function(){var e=this.props,t=e.x1,n=e.x2,i=e.y1,o=e.y2,a=e.className,s=e.alwaysShow,l=e.clipPathId;ey(void 0===s,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var c=ea(t),u=ea(n),h=ea(i),f=ea(o),d=this.props.shape;if(!c&&!u&&!h&&!f&&!d)return null;var p=ft(c,u,h,f,this.props);if(!p&&!d)return null;var y=c6(this.props,"hidden")?"url(#".concat(l,")"):void 0;return P.createElement(e9,{className:W("recharts-reference-area",a)},r.renderRect(d,h4(h4({clipPath:y},eF(this.props,!0)),p)),c5.renderCallByParent(this.props,p))}}],function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,fe(n.key),n)}}(r.prototype,t),Object.defineProperty(r,"prototype",{writable:!1}),r}(P.Component);function fn(e){return function(e){if(Array.isArray(e))return fi(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return fi(e,void 0);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return fi(e,void 0)}}(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function fi(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}h9(fr,"displayName","ReferenceArea"),h9(fr,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1}),h9(fr,"renderRect",function(e,t){return P.isValidElement(e)?P.cloneElement(e,t):eg()(e)?e(t):P.createElement(nH,h2({},t,{className:"recharts-reference-area-rect"}))});var fo=function(e,t,r,n,i){var o=eB(e,h1),a=eB(e,hk),s=[].concat(fn(o),fn(a)),l=eB(e,fr),c="".concat(n,"Id"),u=n[0],h=t;if(s.length&&(h=s.reduce(function(e,t){if(t.props[c]===r&&c6(t.props,"extendDomain")&&eo(t.props[u])){var n=t.props[u];return[Math.min(e[0],n),Math.max(e[1],n)]}return e},h)),l.length){var f="".concat(u,"1"),d="".concat(u,"2");h=l.reduce(function(e,t){if(t.props[c]===r&&c6(t.props,"extendDomain")&&eo(t.props[f])&&eo(t.props[d])){var n=t.props[f],i=t.props[d];return[Math.min(e[0],n,i),Math.max(e[1],n,i)]}return e},h)}return i&&i.length&&(h=i.reduce(function(e,t){return eo(t)?[Math.min(e[0],t),Math.max(e[1],t)]:e},h)),h},fa=r(37836),fs=new(r.n(fa)()),fl="recharts.syncMouseEvents";function fc(e){return(fc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function fu(e,t,r){return(t=fh(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function fh(e){var t=function(e,t){if("object"!=fc(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=fc(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==fc(t)?t:t+""}var ff=(n=function e(){(function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")})(this,e),fu(this,"activeIndex",0),fu(this,"coordinateList",[]),fu(this,"layout","horizontal")},i=[{key:"setDetails",value:function(e){var t,r=e.coordinateList,
vendor: 6,042 bytes, line 1
1n=void 0===r?null:r,i=e.container,o=void 0===i?null:i,a=e.layout,s=void 0===a?null:a,l=e.offset,c=void 0===l?null:l,u=e.mouseHandlerCallback,h=void 0===u?null:u;this.coordinateList=null!==(t=null!=n?n:this.coordinateList)&&void 0!==t?t:[],this.container=null!=o?o:this.container,this.layout=null!=s?s:this.layout,this.offset=null!=c?c:this.offset,this.mouseHandlerCallback=null!=h?h:this.mouseHandlerCallback,this.activeIndex=Math.min(Math.max(this.activeIndex,0),this.coordinateList.length-1)}},{key:"focus",value:function(){this.spoofMouse()}},{key:"keyboardEvent",value:function(e){if(0!==this.coordinateList.length)switch(e.key){case"ArrowRight":if("horizontal"!==this.layout)return;this.activeIndex=Math.min(this.activeIndex+1,this.coordinateList.length-1),this.spoofMouse();break;case"ArrowLeft":if("horizontal"!==this.layout)return;this.activeIndex=Math.max(this.activeIndex-1,0),this.spoofMouse()}}},{key:"setIndex",value:function(e){this.activeIndex=e}},{key:"spoofMouse",value:function(){if("horizontal"===this.layout&&0!==this.coordinateList.length){var e,t,r=this.container.getBoundingClientRect(),n=r.x,i=r.y,o=r.height,a=this.coordinateList[this.activeIndex].coordinate,s=(null===(e=window)||void 0===e?void 0:e.scrollX)||0,l=(null===(t=window)||void 0===t?void 0:t.scrollY)||0,c=i+this.offset.top+o/2+l;this.mouseHandlerCallback({pageX:n+a+s,pageY:c})}}}],function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,fh(n.key),n)}}(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n);function fd(){}function fp(e,t,r){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+r)/6)}function fy(e){this._context=e}function fm(e){this._context=e}function fg(e){this._context=e}fy.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:fp(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(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:fp(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},fm.prototype={areaStart:fd,areaEnd:fd,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(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:fp(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},fg.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(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 r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:fp(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};class fv{constructor(e,t){this._context=e,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(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)}this._x0=e,this._y0=t}}function fb(e){this._context=e}function fw(e){this._context=e}function fx(e){return new fw(e)}function fO(e,t,r){var n=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(n||i<0&&-0),a=(r-e._y1)/(i||n<0&&-0);return((o<0?-1:1)+(a<0?-1:1))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs((o*i+a*n)/(n+i)))||0}function fk(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function fj(e,t,r){var n=e._x0,i=e._y0,o=e._x1,a=e._y1,s=(o-n)/3;e._context.bezierCurveTo(n+s,i+s*t,o-s,a-s*r,o,a)}function fS(e){this._context=e}function f_(e){this._context=new fE(e)}function fE(e){this._context=e}function fA(e){this._context=e}function fP(e){var t,r,n=e.length-1,i=Array(n),o=Array(n),a=Array(n);for(i[0]=0,o[0]=2,a[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,o[t]=4,a[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,o[n-1]=7,a[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/o[t-1],o[t]-=r,a[t]-=r*a[t-1];for(i[n-1]=a[n-1]/o[n-1],t=n-2;t>=0;--t)i[t]=(a[t]-i[t+1])/o[t];for(t=0,o[n-1]=(e[n]+i[n-1])/2;t<n-1;++t)o[t]=2*e[t+1]-i[t+1];return[i,o]}function fT(e,t){this._context=e,this._t=t}function fN(e){return e[0]}function fC(e){return e[1]}function fM(e,t){var r=tX(!0),n=null,i=fx,o=null,a=t5(s);function s(s){var l,c,u,h=(s=s4(s)).length,f=!1;for(null==n&&(o=i(u=a())),l=0;l<=h;++l)!(l<h&&r(c=s[l],l,s))===f&&((f=!f)?o.lineStart():o.lineEnd()),f&&o.point(+e(c,l,s),+t(c,l,
1s));if(u)return o=null,u+""||null}return e="function"==typeof e?e:void 0===e?fN:tX(e),t="function"==typeof t?t:void 0===t?fC:tX(t),s.x=function(t){return arguments.length?(e="function"==typeof t?t:tX(+t),s):e},s.y=function(e){return arguments.length?(t="function"==typeof e?e:tX(+e),s):t},s.defined=function(e){return arguments.length?(r="function"==typeof e?e:tX(!!e),s):r},s.curve=function(e){return arguments.length?(i=e,null!=n&&(o=i(n)),s):i},s.context=function(e){return arguments.length?(null==e?n=o=null:o=i(n=e),s):n},s}function fI(e,t,r){var n=null,i=tX(!0),o=null,a=fx,s=null,l=t5(c);function c(c){var u,h,f,d,p,y=(c=s4(c)).length,m=!1,g=Array(y),v=Array(y);for(null==o&&(s=a(p=l())),u=0;u<=y;++u){if(!(u<y&&i(d=c[u],u,c))===m){if(m=!m)h=u,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),f=u-1;f>=h;--f)s.point(g[f],v[f]);s.lineEnd(),s.areaEnd()}}m&&(g[u]=+e(d,u,c),v[u]=+t(d,u,c),s.point(n?+n(d,u,c):g[u],r?+r(d,u,c):v[u]))}if(p)return s=null,p+""||null}function u(){return fM().defined(i).curve(a).context(o)}return e="function"==typeof e?e:void 0===e?fN:tX(+e),t="function"==typeof t?t:void 0===t?tX(0):tX(+t),r="function"==typeof r?r:void 0===r?fC:tX(+r),c.x=function(t){return arguments.length?(e="function"==typeof t?t:tX(+t),n=null,c):e},c.x0=function(t){return arguments.length?(e="function"==typeof t?t:tX(+t),c):e},c.x1=function(e){return arguments.length?(n=null==e?null:"function"==typeof e?e:tX(+e),c):n},c.y=function(e){return arguments.length?(t="function"==typeof e?e:tX(+e),r=null,c):t},c.y0=function(e){return arguments.length?(t="function"==typeof e?e:tX(+e),c):t},c.y1=function(e){return arguments.length?(r=null==e?null:"function"==typeof e?e:tX(+e),c):r},c.lineX0=c.lineY0=function(){return u().x(e).y(t)},c.lineY1=function(){return u().x(e).y(r)},c.lineX1=function(){return u().x(n).y(t)},c.defined=function(e){return arguments.length?(i="function"==typeof e?e:tX(!!e),c):i},c.curve=function(e){return arguments.length?(a=e,null!=o&&(s=a(o)),c):a},c.context=function(e){return arguments.length?(null==e?o=s=null:s=a(o=e),c):o},c}function fR(e){return(fR="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function fD(){return(fD=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function fL(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function fB(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?fL(Object(r),!0).forEach(function(t){var n,i;n=t,i=r[t],(n=function(e){var t=function(e,t){if("object"!=fR(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=fR(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==fR(t)?t:t+""}(n))in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):fL(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}fb.prototype={areaStart:fd,areaEnd:fd,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))}},fw.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(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)}}},fS.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:fj(this,this._t0,fk(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(t=+t,(e=+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,fj(this,fk(this,r=fO(this,e,t)),r);break;default:fj(this,this._t0,r=fO(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}},(f_.prototype=Object.create(fS.prototype)).point=function(e,t){fS.prototype.point.call(this,t,e)},fE.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,r,n,i,o){this._context.bezierCurveTo(t,e,n,r,o,i)}},fA.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,r=e.length;if(r){if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),2===r)this._context.lineTo(e[1],t[1]);else for(var n=fP(e),i=fP(t),o=0,a=1;a<r;++o,++a)this._context.bezierCurveTo(n[0][o],i[0][o],n[1][o],i[1][o],e[a],t[a])}(this._line||0!==this._line&&1===r)&&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)}},fT.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&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&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 r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}}this._x=e,this._y=t}};var f$={curveBasisClosed:function(e){return new fm(e)},curveBasisOpen:function(e){return new fg(e)},curveBasis:function(e){return new fy(e)},curveBumpX:function(e){return new fv(e,!0)},curveBumpY:function(e){return new fv(e,!1)},curveLinearClosed:function(e){return new fb(e)},curveLinear:fx,curveMonotoneX:function(e){return new fS(e)},curveMonotoneY:function(e){return new f_(e)},curveNatural:function(e){return new fA(e)},curveStep:function(e){return new fT(e,.5)},curveStepAfter:function(e){return new fT(e,1)},curveStepBefore:function(e){return new fT(e,0)}},fU=function(e){return e.x===+e.x&&e.y===+e.y},fq=function(e){return e.x},fz=function(e){return e.y},fF=function(e,t){if(eg()(e))return e;var r="curve".concat(tD()(e));return("curveMonotone"===r||"curveBump"===r)&&t?f$["".concat(r).concat("vertical"===t?"Y":"X")]:f$[r]||fx},fW=function(e){var t,r=e.type,n=e.points,i=void 0===n?[]:n,o=e.baseLine,a=e.layout,s=e.connectNulls,l=void 0!==s&&s,c=fF(void 0===r?"linear":r,a),u=l?i.filter(function(e){return fU(e)}):i;if(Array.isArray(o)){var h=l?o.filter(function(e){return fU(e)}):o,f=u.map(function(e,t){return fB(fB({},e),{},{base:h[t]})});return(t="vertical"===a?fI().y(fz).x1(fq).x0(function(e){return e.base.x}):fI().x(fq).y1(fz).y0(function(e){return e.base.y})).defined(fU).curve(c),t(f)}return(t="vertical"===a&&eo(o)?fI().y(fz).x1(fq).x0(o):eo(o)?fI().x(fq).y1(fz).y0(o):fM().x(fq).y(fz)).defined(fU).curve(c),t(u)},fH=function(e){var t=e.className,r=e.points,n=e.path,i=e.pathRef;if((!r||!r.length)&&!n)return null;var o=r&&r.length?fW(e):n;return P.createElement("path",fD({},eF(e,!1),eE(e),{className:W("recharts-curve",t),d:o,ref:i}))};function fV(e){return(fV="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var fK=["x","y","top","left","width","height","className"];function fG(){return(fG=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];
1for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function fZ(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}var fJ=function(e){var t=e.x,r=void 0===t?0:t,n=e.y,i=void 0===n?0:n,o=e.top,a=void 0===o?0:o,s=e.left,l=void 0===s?0:s,c=e.width,u=void 0===c?0:c,h=e.height,f=void 0===h?0:h,d=e.className,p=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?fZ(Object(r),!0).forEach(function(t){var n,i;n=t,i=r[t],(n=function(e){var t=function(e,t){if("object"!=fV(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=fV(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==fV(t)?t:t+""}(n))in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):fZ(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({x:r,y:i,top:a,left:l,width:u,height:f},function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,fK));return eo(r)&&eo(i)&&eo(u)&&eo(f)&&eo(a)&&eo(l)?P.createElement("path",fG({},eF(p,!0),{className:W("recharts-cross",d),d:"M".concat(r,",").concat(a,"v").concat(f,"M").concat(l,",").concat(i,"h").concat(u)})):null};function fY(e){var t=e.cx,r=e.cy,n=e.radius,i=e.startAngle,o=e.endAngle;return{points:[cF(t,r,n,i),cF(t,r,n,o)],cx:t,cy:r,radius:n,startAngle:i,endAngle:o}}function fX(e){return(fX="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function fQ(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function f0(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?fQ(Object(r),!0).forEach(function(t){var n,i;n=t,i=r[t],(n=function(e){var t=function(e,t){if("object"!=fX(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=fX(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==fX(t)?t:t+""}(n))in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):fQ(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function f1(e){var t,r,n,i,o=e.element,a=e.tooltipEventType,s=e.isActive,l=e.activeCoordinate,c=e.activePayload,u=e.offset,h=e.activeTooltipIndex,f=e.tooltipAxisBandSize,d=e.layout,p=e.chartName,y=null!==(r=o.props.cursor)&&void 0!==r?r:null===(n=o.type.defaultProps)||void 0===n?void 0:n.cursor;if(!o||!y||!s||!l||"ScatterChart"!==p&&"axis"!==a)return null;var m=fH;if("ScatterChart"===p)i=l,m=fJ;else if("BarChart"===p)t=f/2,i={stroke:"none",fill:"#ccc",x:"horizontal"===d?l.x-t:u.left+.5,y:"horizontal"===d?u.top+.5:l.y-t,width:"horizontal"===d?f:u.width-1,height:"horizontal"===d?u.height-1:f},m=nH;else if("radial"===d){var g=fY(l),v=g.cx,b=g.cy,w=g.radius;i={cx:v,cy:b,startAngle:g.startAngle,endAngle:g.endAngle,innerRadius:w,outerRadius:w},m=uI}else i={points:function(e,t,r){var n,i,o,a;if("horizontal"===e)o=n=t.x,i=r.top,a=r.top+r.height;
1else if("vertical"===e)a=i=t.y,n=r.left,o=r.left+r.width;else if(null!=t.cx&&null!=t.cy){if("centric"!==e)return fY(t);var s=t.cx,l=t.cy,c=t.innerRadius,u=t.outerRadius,h=t.angle,f=cF(s,l,c,h),d=cF(s,l,u,h);n=f.x,i=f.y,o=d.x,a=d.y}return[{x:n,y:i},{x:o,y:a}]}(d,l,u)},m=fH;var x=f0(f0(f0(f0({stroke:"#ccc",pointerEvents:"none"},u),i),eF(y,!1)),{},{payload:c,payloadIndex:h,className:W("recharts-tooltip-cursor",y.className)});return(0,P.isValidElement)(y)?(0,P.cloneElement)(y,x):(0,P.createElement)(m,x)}var f2=["item"],f3=["children","className","width","height","style","compact","title","desc"];function f5(e){return(f5="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function f4(){return(f4=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function f6(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,s=[],l=!0,c=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||dr(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f8(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function f7(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(f7=function(){return!!e})()}function f9(e){return(f9=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function de(e,t){return(de=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function dt(e){return function(e){if(Array.isArray(e))return dn(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||dr(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function dr(e,t){if(e){if("string"==typeof e)return dn(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return dn(e,t)}}function dn(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function di(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function da(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?di(Object(r),!0).forEach(function(t){ds(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):di(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function ds(e,t,r){return(t=dl(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function dl(e){var t=function(e,t){if("object"!=f5(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=f5(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==f5(t)?t:t+""}var dc={xAxis:["bottom","top"],yAxis:["left","right"]},du={width:"100%",height:"100%"},dh={x:0,y:0};function df(e){return e}var dd=function(e,t,r,n){var i=t.find(function(e){return e&&e.index===r});if(i){if("horizontal"===e)return{x:i.coordinate,y:n.y};
1if("vertical"===e)return{x:n.x,y:i.coordinate};if("centric"===e){var o=i.coordinate,a=n.radius;return da(da(da({},n),cF(n.cx,n.cy,a,o)),{},{angle:o,radius:a})}var s=i.coordinate,l=n.angle;return da(da(da({},n),cF(n.cx,n.cy,s,l)),{},{angle:l,radius:s})}return dh},dp=function(e,t){var r=t.graphicalItems,n=t.dataStartIndex,i=t.dataEndIndex,o=(null!=r?r:[]).reduce(function(e,t){var r=t.props.data;return r&&r.length?[].concat(dt(e),dt(r)):e},[]);return o.length>0?o:e&&e.length&&eo(n)&&eo(i)?e.slice(n,i+1):[]};function dy(e){return"number"===e?[0,"auto"]:void 0}var dm=function(e,t,r,n){var i=e.graphicalItems,o=e.tooltipAxis,a=dp(t,e);return r<0||!i||!i.length||r>=a.length?null:i.reduce(function(i,s){var l,c,u=null!==(l=s.props.data)&&void 0!==l?l:t;return(u&&e.dataStartIndex+e.dataEndIndex!==0&&e.dataEndIndex-e.dataStartIndex>=r&&(u=u.slice(e.dataStartIndex,e.dataEndIndex+1)),c=o.dataKey&&!o.allowDuplicatedCategory?ed(void 0===u?a:u,o.dataKey,n):u&&u[r]||a[r])?[].concat(dt(i),[cb(s,c)]):i},[])},dg=function(e,t,r,n){var i=n||{x:e.chartX,y:e.chartY},o="horizontal"===r?i.x:"vertical"===r?i.y:"centric"===r?i.angle:i.radius,a=e.orderedTooltipTicks,s=e.tooltipAxis,l=e.tooltipTicks,c=lX(o,a,l,s);if(c>=0&&l){var u=l[c]&&l[c].value,h=dm(e,t,c,u),f=dd(r,a,c,i);return{activeTooltipIndex:c,activeLabel:u,activePayload:h,activeCoordinate:f}}return null},dv=function(e,t){var r=t.axes,n=t.graphicalItems,i=t.axisType,o=t.axisIdKey,a=t.stackGroups,s=t.dataStartIndex,l=t.dataEndIndex,c=e.layout,u=e.children,h=e.stackOffset,f=l6(c,i);return r.reduce(function(t,r){var d=void 0!==r.type.defaultProps?da(da({},r.type.defaultProps),r.props):r.props,p=d.type,y=d.dataKey,m=d.allowDataOverflow,g=d.allowDuplicatedCategory,v=d.scale,b=d.ticks,w=d.includeHidden,x=d[o];if(t[x])return t;var O=dp(e.data,{graphicalItems:n.filter(function(e){var t;return(o in e.props?e.props[o]:null===(t=e.type.defaultProps)||void 0===t?void 0:t[o])===x}),dataStartIndex:s,dataEndIndex:l}),k=O.length;(function(e,t,r){if("number"===r&&!0===t&&Array.isArray(e)){var n=null==e?void 0:e[0],i=null==e?void 0:e[1];if(n&&i&&eo(n)&&eo(i))return!0}return!1})(d.domain,m,p)&&(_=cm(d.domain,null,m),f&&("number"===p||"auto"!==v)&&(A=lY(O,y,"category")));var j=dy(p);if(!_||0===_.length){var S,_,E,A,P,T=null!==(P=d.domain)&&void 0!==P?P:j;if(y){if(_=lY(O,y,p),"category"===p&&f){var N=eh(_);g&&N?(E=_,_=e0()(0,k)):g||(_=cv(T,_,r).reduce(function(e,t){return e.indexOf(t)>=0?e:[].concat(dt(e),[t])},[]))}else if("category"===p)_=g?_.filter(function(e){return""!==e&&!er()(e)}):cv(T,_,r).reduce(function(e,t){return e.indexOf(t)>=0||""===t||er()(t)?e:[].concat(dt(e),[t])},[]);else if("number"===p){var C=l5(O,n.filter(function(e){var t,r,n=o in e.props?e.props[o]:null===(t=e.type.defaultProps)||void 0===t?void 0:t[o],i="hide"in e.props?e.props.hide:null===(r=e.type.defaultProps)||void 0===r?void 0:r.hide;return n===x&&(w||!i)}),y,i,c);C&&(_=C)}f&&("number"===p||"auto"!==v)&&(A=lY(O,y,"category"))}else _=f?e0()(0,k):a&&a[x]&&a[x].hasStack&&"number"===p?"expand"===h?[0,1]:cd(a[x].stackGroups,s,l):l4(O,n.filter(function(e){var t=o in e.props?e.props[o]:e.type.defaultProps[o],r="hide"in e.props?e.props.hide:e.type.defaultProps.hide;return t===x&&(w||!r)}),p,c,!0);"number"===p?(_=fo(u,_,x,i,b),T&&(_=cm(T,_,m))):"category"===p&&T&&_.every(function(e){return T.indexOf(e)>=0})&&(_=T)}return da(da({},t),{},ds({},x,da(da({},d),{},{axisType:i,domain:_,categoricalDomain:A,duplicateDomain:E,originalDomain:null!==(S=d.domain)&&void 0!==S?S:j,isCategorical:f,layout:c})))},{})},db=function(e,t){var r=t.graphicalItems,n=t.Axis,i=t.axisType,o=t.axisIdKey,a=t.stackGroups,s=t.dataStartIndex,l=t.dataEndIndex,c=e.layout,u=e.children,h=dp(e.data,{graphicalItems:r,dataStartIndex:s,dataEndIndex:l}),f=h.length,d=l6(c,i),p=-1;return r.reduce(function(e,t){var y,m=(void 0!==t.type.defaultProps?da(da({},t.type.defaultProps),t.props):t.props)[o],g=dy("number");return e[m]?e:(p++,y=d?e0()(0,f):a&&a[m]&&a[m].hasStack?fo(u,y=cd(a[m].stackGroups,s,l),m,i):fo(u,y=cm(g,l4(h,r.filter(function(e){var t,r,n=o in e.props?e.props[o]:null===(t=e.type.defaultProps)||void 0===t?void 0:t[o],i="hide"in e.props?e.props.hide:null===(r=e.type.defaultProps)||void 0===r?void 0:r.hide;return n===m&&!i}),"number",c),n.defaultProps.allowDataOverflow),m,i),da(da({},e),{},ds({},m,da(da({axisType:i},n.defaultProps),{},{hide:!0,orientation:X()(dc,"".concat(i,".").concat(p%2),null),domain:y,originalDomain:g,isCategorical:d,layout:c}))))},{})},dw=function(e,t){var r=t.axisType,n=void 0===r?"xAxis":r,i=t.AxisComp,o=t.graphicalItems,a=t.stackGroups,s=t.dataStartIndex,l=t.dataEndIndex,c=e.children,u="".concat(n,"Id"),h=eB(c,i),f={};return h&&h.length?f=dv(e,{axes:h,graphicalItems:o,axisType:n,axisIdKey:u,stackGroups:a,dataStartIndex:s,dataEndIndex:l}):o&&o.length&&(f=db(e,{Axis:i,graphicalItems:o,axisType:n,axisIdKey:u,stackGroups:a,dataStartIndex:s,dataEndIndex:l})),f},dx=function(e){var t=eu(e),r=l7(t,!1,!0);return{tooltipTicks:r,orderedTooltipTicks:e2()(r,function(e){return e.coordinate}),tooltipAxis:t,tooltipAxisBandSize:cg(t,r)}},dO=function(e){var t=e.children,r=e.defaultShowTooltip,n=e$(t,cB),i=0,o=0;return e.data&&0!==e.data.length&&(o=e.data.length-1),n&&n.props&&(n.props.startIndex>=0&&(i=n.props.startIndex),n.props.endIndex>=0&&(o=n.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:i,dataEndIndex:o,activeTooltipIndex:-1,isTooltipActive:!!r}},dk=function(e){return"horizontal"===e?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:"vertical"===e?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:"centric"===e?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},dj=function(e,t){var r=e.props,n=e.graphicalItems,i=e.xAxisMap,o=void 0===i?{}
1:i,a=e.yAxisMap,s=void 0===a?{}:a,l=r.width,c=r.height,u=r.children,h=r.margin||{},f=e$(u,cB),d=e$(u,rj),p=Object.keys(s).reduce(function(e,t){var r=s[t],n=r.orientation;return r.mirror||r.hide?e:da(da({},e),{},ds({},n,e[n]+r.width))},{left:h.left||0,right:h.right||0}),y=Object.keys(o).reduce(function(e,t){var r=o[t],n=r.orientation;return r.mirror||r.hide?e:da(da({},e),{},ds({},n,X()(e,"".concat(n))+r.height))},{top:h.top||0,bottom:h.bottom||0}),m=da(da({},y),p),g=m.bottom;f&&(m.bottom+=f.props.height||cB.defaultProps.height),d&&t&&(m=l2(m,n,r,t));var v=l-m.left-m.right,b=c-m.top-m.bottom;return da(da({brushBottom:g},m),{},{width:Math.max(v,0),height:Math.max(b,0)})},dS=["type","layout","connectNulls","ref"],d_=["key"];function dE(e){return(dE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function dA(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function dP(){return(dP=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function dT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function dN(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?dT(Object(r),!0).forEach(function(t){dB(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dT(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function dC(e){return function(e){if(Array.isArray(e))return dM(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return dM(e,void 0);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return dM(e,void 0)}}(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function dM(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function dI(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,d$(n.key),n)}}function dR(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(dR=function(){return!!e})()}function dD(e){return(dD=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function dL(e,t){return(dL=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function dB(e,t,r){return(t=d$(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function d$(e){var t=function(e,t){if("object"!=dE(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=dE(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==dE(t)?t:t+""}var dU=function(e){var t,r;function n(){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,n);for(var e,t,r,i=arguments.length,o=Array(i),a=0;a<i;a++)o[a]=arguments[a];return t=n,r=[].concat(o),t=dD(t),dB(e=function(e,t){if(t&&("object"===dE(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,dR()?Reflect.construct(t,r||[],dD(this).constructor):t.apply(this,r)),"state",{isAnimationFinished:!0,totalLength:0}),dB(e,"generateSimpleStrokeDasharray",function(e,t){return"".concat(t,"px ").concat(e-t,"px")}),dB(e,"getStrokeDasharray",function(t,r,i){var o=i.reduce(function(e,t){return e+t});if(!o)return e.generateSimpleStrokeDasharray(r,t);for(var a=t%o,s=r-t,l=[],c=0,u=0;c<i.length;u+=i[c],++c)if(u+i[c]>a){l=[].concat(dC(i.slice(0,c)),[a-u]);break}var h=l.length%2==0?[0,s]:[s];return[].concat(dC(n.repeat(i,Math.floor(t/o))),dC(l),h).map(function(e){return"".concat(e,"px")}).join(", ")}),dB(e,"id",el("recharts-line-")),dB(e,"pathRef",function(t){e.mainCurve=t}),dB(e,"handleAnimationEnd",function(){e.setState({isAnimationFinished:!0}),e.props.onAnimationEnd&&e.props.onAnimationEnd()}),dB(e,"handleAnimationStart",function(){e.setState({isAnimationFinished:!1}),e.props.onAnimationStart&&e.props.onAnimationStart()}),e}return!function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&dL(e,t)}(n,e),t=[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var e=this.getTotalLength();this.setState({totalLength:e})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var e=this.getTotalLength();e!==this.state.totalLength&&this.setState({totalLength:e})}}},{key:"getTotalLength",value:function(){var e=this.mainCurve;try{return e&&e.getTotalLength&&e.getTotalLength()||0}catch(e){return 0}}},{key:"renderErrorBar",value:function(e,t){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var r=this.props,n=r.points,i=r.xAxis,o=r.yAxis,a=r.layout,s=eB(r.children,l$);
1if(!s)return null;var l=function(e,t){return{x:e.x,y:e.y,value:e.value,errorVal:lJ(e.payload,t)}};return P.createElement(e9,{clipPath:e?"url(#clipPath-".concat(t,")"):null},s.map(function(e){return P.cloneElement(e,{key:"bar-".concat(e.props.dataKey),data:n,xAxis:i,yAxis:o,layout:a,dataPointFormatter:l})}))}},{key:"renderDots",value:function(e,t,r){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var i=this.props,o=i.dot,a=i.points,s=i.dataKey,l=eF(this.props,!1),c=eF(o,!0),u=a.map(function(e,t){var r=dN(dN(dN({key:"dot-".concat(t),r:3},l),c),{},{index:t,cx:e.x,cy:e.y,value:e.value,dataKey:s,payload:e.payload,points:a});return n.renderDotItem(o,r)}),h={clipPath:e?"url(#clipPath-".concat(t?"":"dots-").concat(r,")"):null};return P.createElement(e9,dP({className:"recharts-line-dots",key:"dots"},h),u)}},{key:"renderCurveStatically",value:function(e,t,r,n){var i=this.props,o=i.type,a=i.layout,s=i.connectNulls,l=dN(dN(dN({},eF((i.ref,dA(i,dS)),!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:t?"url(#clipPath-".concat(r,")"):null,points:e},n),{},{type:o,layout:a,connectNulls:s});return P.createElement(fH,dP({},l,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(e,t){var r=this,n=this.props,i=n.points,o=n.strokeDasharray,a=n.isAnimationActive,s=n.animationBegin,l=n.animationDuration,c=n.animationEasing,u=n.animationId,h=n.animateNewValues,f=n.width,d=n.height,p=this.state,y=p.prevPoints,m=p.totalLength;return P.createElement(nD,{begin:s,duration:l,isActive:a,easing:c,from:{t:0},to:{t:1},key:"line-".concat(u),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(n){var a,s=n.t;if(y){var l=y.length/i.length,c=i.map(function(e,t){var r=Math.floor(t*l);if(y[r]){var n=y[r],i=ef(n.x,e.x),o=ef(n.y,e.y);return dN(dN({},e),{},{x:i(s),y:o(s)})}if(h){var a=ef(2*f,e.x),c=ef(d/2,e.y);return dN(dN({},e),{},{x:a(s),y:c(s)})}return dN(dN({},e),{},{x:e.x,y:e.y})});return r.renderCurveStatically(c,e,t)}var u=ef(0,m)(s);if(o){var p="".concat(o).split(/[,\s]+/gim).map(function(e){return parseFloat(e)});a=r.getStrokeDasharray(u,m,p)}else a=r.generateSimpleStrokeDasharray(m,u);return r.renderCurveStatically(i,e,t,{strokeDasharray:a})})}},{key:"renderCurve",value:function(e,t){var r=this.props,n=r.points,i=r.isAnimationActive,o=this.state,a=o.prevPoints,s=o.totalLength;return i&&n&&n.length&&(!a&&s>0||!la()(a,n))?this.renderCurveWithAnimation(e,t):this.renderCurveStatically(n,e,t)}},{key:"render",value:function(){var e,t=this.props,r=t.hide,n=t.dot,i=t.points,o=t.className,a=t.xAxis,s=t.yAxis,l=t.top,c=t.left,u=t.width,h=t.height,f=t.isAnimationActive,d=t.id;if(r||!i||!i.length)return null;var p=this.state.isAnimationFinished,y=1===i.length,m=W("recharts-line",o),g=a&&a.allowDataOverflow,v=s&&s.allowDataOverflow,b=g||v,w=er()(d)?this.id:d,x=null!==(e=eF(n,!1))&&void 0!==e?e:{r:3,strokeWidth:2},O=x.r,k=x.strokeWidth,j=(n&&"object"===eC(n)&&"clipDot"in n?n:{}).clipDot,S=void 0===j||j,_=2*(void 0===O?3:O)+(void 0===k?2:k);return P.createElement(e9,{className:m},g||v?P.createElement("defs",null,P.createElement("clipPath",{id:"clipPath-".concat(w)},P.createElement("rect",{x:g?c:c-u/2,y:v?l:l-h/2,width:g?u:2*u,height:v?h:2*h})),!S&&P.createElement("clipPath",{id:"clipPath-dots-".concat(w)},P.createElement("rect",{x:c-_/2,y:l-_/2,width:u+_,height:h+_}))):null,!y&&this.renderCurve(b,w),this.renderErrorBar(b,w),(y||n)&&this.renderDots(b,S,w),(!f||p)&&ud.renderCallByParent(this.props,i))}}],r=[{key:"getDerivedStateFromProps",value:function(e,t){return e.animationId!==t.prevAnimationId?{prevAnimationId:e.animationId,curPoints:e.points,prevPoints:t.curPoints}:e.points!==t.curPoints?{curPoints:e.points}:null}},{key:"repeat",value:function(e,t){for(var r=e.length%2!=0?[].concat(dC(e),[0]):e,n=[],i=0;i<t;++i)n=[].concat(dC(n),dC(r));return n}},{key:"renderDotItem",value:function(e,t){var r;if(P.isValidElement(e))r=P.cloneElement(e,t);else if(eg()(e))r=e(t);else{var n=t.key,i=dA(t,d_),o=W("recharts-line-dot","boolean"!=typeof e?e.className:"");r=P.createElement(r_,dP({key:n},i,{className:o}))}return r}}],t&&dI(n.prototype,t),r&&dI(n,r),Object.defineProperty(n,"prototype",{writable:!1}),n}(P.PureComponent);function dq(e,t,r){if(t<1)return[];if(1===t&&void 0===r)return e;for(var n=[],i=0;i<e.length;i+=t){if(void 0!==r&&!0!==r(e[i]))return;n.push(e[i])}return n}function dz(e,t,r,n,i){if(e*t<e*n||e*t>e*i)return!1;var o=r();return e*(t-e*o/2-n)>=0&&e*(t+e*o/2-i)<=0}function dF(e){return(dF="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function dW(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function dH(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
1t%2?dW(Object(r),!0).forEach(function(t){var n,i;n=t,i=r[t],(n=function(e){var t=function(e,t){if("object"!=dF(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=dF(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==dF(t)?t:t+""}(n))in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dW(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function dV(e,t,r){var n,i,o,a,s,l=e.tick,c=e.ticks,u=e.viewBox,h=e.minTickGap,f=e.orientation,d=e.interval,p=e.tickFormatter,y=e.unit,m=e.angle;if(!c||!c.length||!l)return[];if(eo(d)||tx.isSsr)return dq(c,("number"==typeof d&&eo(d)?d:0)+1);var g="top"===f||"bottom"===f?"width":"height",v=y&&"width"===g?n8(y,{fontSize:t,letterSpacing:r}):{width:0,height:0},b=function(e,n){var i,o=eg()(p)?p(e.value,n):e.value;return"width"===g?hf({width:(i=n8(o,{fontSize:t,letterSpacing:r})).width+v.width,height:i.height+v.height},m):n8(o,{fontSize:t,letterSpacing:r})[g]},w=c.length>=2?en(c[1].coordinate-c[0].coordinate):1,x=(n="width"===g,i=u.x,o=u.y,a=u.width,s=u.height,1===w?{start:n?i:o,end:n?i+a:o+s}:{start:n?i+a:o+s,end:n?i:o});return"equidistantPreserveStart"===d?function(e,t,r,n,i){for(var o,a=(n||[]).slice(),s=t.start,l=t.end,c=0,u=1,h=s;u<=a.length;)if(o=function(){var t,o=null==n?void 0:n[c];if(void 0===o)return{v:dq(n,u)};var a=c,f=function(){return void 0===t&&(t=r(o,a)),t},d=o.coordinate,p=0===c||dz(e,d,f,h,l);p||(c=0,h=s,u+=1),p&&(h=d+e*(f()/2+i),c+=u)}())return o.v;return[]}(w,x,b,c,h):("preserveStart"===d||"preserveStartEnd"===d?function(e,t,r,n,i,o){var a=(n||[]).slice(),s=a.length,l=t.start,c=t.end;if(o){var u=n[s-1],h=r(u,s-1),f=e*(u.coordinate+e*h/2-c);a[s-1]=u=dH(dH({},u),{},{tickCoord:f>0?u.coordinate-f*e:u.coordinate}),dz(e,u.tickCoord,function(){return h},l,c)&&(c=u.tickCoord-e*(h/2+i),a[s-1]=dH(dH({},u),{},{isShow:!0}))}for(var d=o?s-1:s,p=function(t){var n,o=a[t],s=function(){return void 0===n&&(n=r(o,t)),n};if(0===t){var u=e*(o.coordinate-e*s()/2-l);a[t]=o=dH(dH({},o),{},{tickCoord:u<0?o.coordinate-u*e:o.coordinate})}else a[t]=o=dH(dH({},o),{},{tickCoord:o.coordinate});dz(e,o.tickCoord,s,l,c)&&(l=o.tickCoord+e*(s()/2+i),a[t]=dH(dH({},o),{},{isShow:!0}))},y=0;y<d;y++)p(y);return a}(w,x,b,c,h,"preserveStartEnd"===d):function(e,t,r,n,i){for(var o=(n||[]).slice(),a=o.length,s=t.start,l=t.end,c=function(t){var n,c=o[t],u=function(){return void 0===n&&(n=r(c,t)),n};if(t===a-1){var h=e*(c.coordinate+e*u()/2-l);o[t]=c=dH(dH({},c),{},{tickCoord:h>0?c.coordinate-h*e:c.coordinate})}else o[t]=c=dH(dH({},c),{},{tickCoord:c.coordinate});dz(e,c.tickCoord,u,s,l)&&(l=c.tickCoord-e*(u()/2+i),o[t]=dH(dH({},c),{},{isShow:!0}))},u=a-1;u>=0;u--)c(u);return o}(w,x,b,c,h)).filter(function(e){return e.isShow})}dB(dU,"displayName","Line"),dB(dU,"defaultProps",{xAxisId:0,yAxisId:0,connectNulls:!1,activeDot:!0,dot:!0,legendType:"line",stroke:"#3182bd",strokeWidth:1,fill:"#fff",points:[],isAnimationActive:!tx.isSsr,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",hide:!1,label:!1}),dB(dU,"getComposedData",function(e){var t=e.props,r=e.xAxis,n=e.yAxis,i=e.xAxisTicks,o=e.yAxisTicks,a=e.dataKey,s=e.bandSize,l=e.displayedData,c=e.offset,u=t.layout;return dN({points:l.map(function(e,t){var l=lJ(e,a);return"horizontal"===u?{x:cc({axis:r,ticks:i,bandSize:s,entry:e,index:t}),y:er()(l)?null:n.scale(l),value:l,payload:e}:{x:er()(l)?null:r.scale(l),y:cc({axis:n,ticks:o,bandSize:s,entry:e,index:t}),value:l,payload:e}}),layout:u},c)});var dK=["viewBox"],dG=["viewBox"],dZ=["ticks"];function dJ(e){return(dJ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function dY(){return(dY=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];
1for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function dX(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function dQ(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?dX(Object(r),!0).forEach(function(t){d4(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dX(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function d0(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function d1(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,d6(n.key),n)}}function d2(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(d2=function(){return!!e})()}function d3(e){return(d3=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function d5(e,t){return(d5=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function d4(e,t,r){return(t=d6(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function d6(e){var t=function(e,t){if("object"!=dJ(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=dJ(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==dJ(t)?t:t+""}var d8=function(e){var t,r;function n(e){var t,r,i;return!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,n),r=n,i=[e],r=d3(r),(t=function(e,t){if(t&&("object"===dJ(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,d2()?Reflect.construct(r,i||[],d3(this).constructor):r.apply(this,i))).state={fontSize:"",letterSpacing:""},t}return!function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&d5(e,t)}(n,e),t=[{key:"shouldComponentUpdate",value:function(e,t){var r=e.viewBox,n=d0(e,dK),i=this.props,o=i.viewBox,a=d0(i,dG);return!ex(r,o)||!ex(n,a)||!ex(t,this.state)}},{key:"componentDidMount",value:function(){var e=this.layerReference;if(e){var t=e.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];t&&this.setState({fontSize:window.getComputedStyle(t).fontSize,letterSpacing:window.getComputedStyle(t).letterSpacing})}}},{key:"getTickLineCoord",value:function(e){var t,r,n,i,o,a,s=this.props,l=s.x,c=s.y,u=s.width,h=s.height,f=s.orientation,d=s.tickSize,p=s.mirror,y=s.tickMargin,m=p?-1:1,g=e.tickSize||d,v=eo(e.tickCoord)?e.tickCoord:e.coordinate;switch(f){case"top":t=r=e.coordinate,a=(n=(i=c+ +!p*h)-m*g)-m*y,o=v;break;case"left":n=i=e.coordinate,o=(t=(r=l+ +!p*u)-m*g)-m*y,a=v;break;case"right":n=i=e.coordinate,o=(t=(r=l+ +p*u)+m*g)+m*y,a=v;break;default:t=r=e.coordinate,a=(n=(i=c+ +p*h)+m*g)+m*y,o=v}return{line:{x1:t,y1:n,x2:r,y2:i},tick:{x:o,y:a}}}},{key:"getTickTextAnchor",value:function(){var e,t=this.props,r=t.orientation,n=t.mirror;switch(r){case"left":e=n?"start":"end";break;case"right":e=n?"end":"start";break;default:e="middle"}return e}},{key:"getTickVerticalAnchor",value:function(){var e=this.props,t=e.orientation,r=e.mirror,n="end";switch(t){case"left":case"right":n="middle";break;case"top":n=r?"start":"end";break;default:n=r?"end":"start"}return n}},{key:"renderAxisLine",value:function(){var e=this.props,t=e.x,r=e.y,n=e.width,i=e.he
1ight,o=e.orientation,a=e.mirror,s=e.axisLine,l=dQ(dQ(dQ({},eF(this.props,!1)),eF(s,!1)),{},{fill:"none"});if("top"===o||"bottom"===o){var c=+("top"===o&&!a||"bottom"===o&&a);l=dQ(dQ({},l),{},{x1:t,y1:r+c*i,x2:t+n,y2:r+c*i})}else{var u=+("left"===o&&!a||"right"===o&&a);l=dQ(dQ({},l),{},{x1:t+u*n,y1:r,x2:t+u*n,y2:r+i})}return P.createElement("line",dY({},l,{className:W("recharts-cartesian-axis-line",X()(s,"className"))}))}},{key:"renderTicks",value:function(e,t,r){var i=this,o=this.props,a=o.tickLine,s=o.stroke,l=o.tick,c=o.tickFormatter,u=o.unit,h=dV(dQ(dQ({},this.props),{},{ticks:e}),t,r),f=this.getTickTextAnchor(),d=this.getTickVerticalAnchor(),p=eF(this.props,!1),y=eF(l,!1),m=dQ(dQ({},p),{},{fill:"none"},eF(a,!1)),g=h.map(function(e,t){var r=i.getTickLineCoord(e),o=r.line,g=r.tick,v=dQ(dQ(dQ(dQ({textAnchor:f,verticalAnchor:d},p),{},{stroke:"none",fill:s},y),g),{},{index:t,payload:e,visibleTicksCount:h.length,tickFormatter:c});return P.createElement(e9,dY({className:"recharts-cartesian-axis-tick",key:"tick-".concat(e.value,"-").concat(e.coordinate,"-").concat(e.tickCoord)},eA(i.props,e,t)),a&&P.createElement("line",dY({},m,o,{className:W("recharts-cartesian-axis-tick-line",X()(a,"className"))})),l&&n.renderTickItem(l,v,"".concat(eg()(c)?c(e.value,t):e.value).concat(u||"")))});return P.createElement("g",{className:"recharts-cartesian-axis-ticks"},g)}},{key:"render",value:function(){var e=this,t=this.props,r=t.axisLine,n=t.width,i=t.height,o=t.ticksGenerator,a=t.className;if(t.hide)return null;var s=this.props,l=s.ticks,c=d0(s,dZ),u=l;return(eg()(o)&&(u=o(l&&l.length>0?this.props:c)),n<=0||i<=0||!u||!u.length)?null:P.createElement(e9,{className:W("recharts-cartesian-axis",a),ref:function(t){e.layerReference=t}},r&&this.renderAxisLine(),this.renderTicks(u,this.state.fontSize,this.state.letterSpacing),c5.renderCallByParent(this.props))}}],r=[{key:"renderTickItem",value:function(e,t,r){var n=W(t.className,"recharts-cartesian-axis-tick-value");return P.isValidElement(e)?P.cloneElement(e,dQ(dQ({},t),{},{className:n})):eg()(e)?e(dQ(dQ({},t),{},{className:n})):P.createElement(i_,dY({},t,{className:"recharts-cartesian-axis-tick-value"}),r)}}],t&&d1(n.prototype,t),r&&d1(n,r),Object.defineProperty(n,"prototype",{writable:!1}),n}(P.Component);function d7(e){return(d7="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function d9(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(d9=function(){return!!e})()}function pe(e){return(pe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function pt(e,t){return(pt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function pr(e,t,r){return(t=pn(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function pn(e){var t=function(e,t){if("object"!=d7(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=d7(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==d7(t)?t:t+""}function pi(){return(pi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function po(e){var t=e.xAxisId,r=hq(),n=hz(),i=hB(t);return null==i?null:P.createElement(d8,pi({},i,{className:W("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:r,height:n},ticksGenerator:function(e){return l7(e,!0)}}))}d4(d8,"displayName","CartesianAxis"),d4(d8,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var pa=function(e){var t;function r(){var e,t;return!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,r),e=r,t=arguments,e=pe(e),function(e,t){if(t&&("object"===d7(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,d9()?Reflect.construct(e,t||[],pe(this).constructor):e.apply(this,t))}return!function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&pt(e,t)}(r,e),t=[{key:"render",value:function(){return P.createElement(po,this.props)}}],function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,pn(n.key),n)}}(r.prototype,t),Object.defineProperty(r,"prototype",{writable:!1}),r}(P.Component);function ps(e){return(ps="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function pl(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(pl=function(){return!!e})()}
1function pc(e){return(pc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function pu(e,t){return(pu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ph(e,t,r){return(t=pf(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function pf(e){var t=function(e,t){if("object"!=ps(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=ps(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==ps(t)?t:t+""}function pd(){return(pd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}pr(pa,"displayName","XAxis"),pr(pa,"defaultProps",{allowDecimals:!0,hide:!1,orientation:"bottom",width:0,height:30,mirror:!1,xAxisId:0,tickCount:5,type:"category",padding:{left:0,right:0},allowDataOverflow:!1,scale:"auto",reversed:!1,allowDuplicatedCategory:!0});var pp=function(e){var t=e.yAxisId,r=hq(),n=hz(),i=hU(t);return null==i?null:P.createElement(d8,pd({},i,{className:W("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:r,height:n},ticksGenerator:function(e){return l7(e,!0)}}))},py=function(e){var t;function r(){var e,t;return!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,r),e=r,t=arguments,e=pc(e),function(e,t){if(t&&("object"===ps(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,pl()?Reflect.construct(e,t||[],pc(this).constructor):e.apply(this,t))}return!function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&pu(e,t)}(r,e),t=[{key:"render",value:function(){return P.createElement(pp,this.props)}}],function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,pf(n.key),n)}}(r.prototype,t),Object.defineProperty(r,"prototype",{writable:!1}),r}(P.Component);ph(py,"displayName","YAxis"),ph(py,"defaultProps",{allowDuplicatedCategory:!0,allowDecimals:!0,hide:!1,orientation:"left",width:60,height:0,mirror:!1,yAxisId:0,tickCount:5,type:"number",padding:{top:0,bottom:0},allowDataOverflow:!1,scale:"auto",reversed:!1});var pm=(a=(o={chartName:"LineChart",GraphicalChild:dU,axisComponents:[{axisType:"xAxis",AxisComp:pa},{axisType:"yAxis",AxisComp:py}],formatAxisMap:function(e,t,r,n,i){var o=e.width,a=e.height,s=e.layout,l=e.children,c=Object.keys(t),u={left:r.left,leftMirror:r.left,right:o-r.right,rightMirror:o-r.right,top:r.top,topMirror:r.top,bottom:a-r.bottom,bottomMirror:a-r.bottom},h=!!e$(l,hr);return c.reduce(function(o,a){var l,c,f,d,p,y=t[a],m=y.orientation,g=y.domain,v=y.padding,b=void 0===v?{}:v,w=y.mirror,x=y.reversed,O="".concat(m).concat(w?"Mirror":"");if("number"===y.type&&("gap"===y.padding||"no-gap"===y.padding)){var k=g[1]-g[0],j=1/0,S=y.categoricalDomain.sort(ep);if(S.forEach(function(e,t){t>0&&(j=Math.min((e||0)-(S[t-1]||0),j))}),Number.isFinite(j)){var _=j/k,E="vertical"===y.layout?r.height:r.width;if("gap"===y.padding&&(l=_*E/2),"no-gap"===y.padding){var A=ec(e.barCategoryGap,_*E),P=_*E/2;l=P-A-(P-A)/E*A}}}c="xAxis"===n?[r.left+(b.left||0)+(l||0),r.left+r.width-(b.right||0)-(l||0)]:"yAxis"===n?"horizontal"===s?[r.top+r.height-(b.bottom||0),r.top+(b.top||0)]:[r.top+(b.top||0)+(l||0),r.top+r.height-(b.bottom||0)-(l||0)]:y.range,x&&(c=[c[1],c[0]]);var T=ct(y,i,h),N=T.scale,C=T.realScaleType;N.domain(g).range(c),cr(N);var M=cl(N,ha(ha({},y),{},{realScaleType:C}));"xAxis"===n?(p="top"===m&&!w||"bottom"===m&&w,f=r.left,d=u[O]-p*y.height):"yAxis"===n&&(p="left"===m&&!w||"right"===m&&w,f=u[O]-p*y.width,d=r.top);var I=ha(ha(ha({},y),M),{},{realScaleType:C,x:f,y:d,scale:N,width:"xAxis"===n?r.width:y.width,height:"yAxis"===n?r.height:y.height});return I.bandSize=cg(I,M),y.hide||"xAxis"!==n?y.hide||(u[O]+=(p?-1:1)*I.width):u[O]+=(p?-1:1)*I.height,ha(ha({},o),{},hs({},a,I))},{})}}).chartName,s=o.GraphicalChild,c=void 0===(l=o.defaultTooltipEventType)?"axis":l,h=void 0===(u=o.validateTooltipEventTypes)?["axis"]:u,f=o.axisComponents,d=o.legendContent,p=o.formatAxisMap,y=o.defaultProps,m=function(e,t){var r=t.graphicalItems,n=t.stackGroups,i=t.offset,o=t.updateId,a=t.dataStartIndex,s=t.dataEndIndex,l=e.barSize,c=e.layout,u=e.barGap,h=e.barCategoryGap,d=e.maxBarSize,p=dk(c),y=p.numericAxisName,m=p.cateAxisName,g=!!r&&!!r.length&&r.some(function(e){var t=eI(e&&e.type);return t&&t.indexOf("Bar")>=0}),v=[];return r.forEach(function(r,p){var b=dp(e.data,{graphicalItems:[r],dataStartIndex:a,dataEndIndex:s}),w=void 0!==r.type.defaultProps?da(da({},r.type.defaultProps),r.props):r.props,x=w.dataKey,O=w.maxBarSize,k=w["".concat(y,"Id")],j=w["".concat(m,"Id")],S=f.reduce(function(e,r){var n=t["".concat(r.axisType,"Map")],i=w["".concat(r.axisType,"Id")];n&&n[i]||"zAxis"===r.axisType||e3(!1);var o=n[i];return da(da({},e),{},ds(ds({},r.axisType,o),"".concat(r.axisType,"Ticks"),l7(o)))},{}),_=S[m],E=S["".concat(m,"Ticks")],A=n&&n[k]&&n[k].hasStack&&cf(r,n[k].stackGroups),P=eI(r.type).indexOf("Bar")>=0,T=cg(_,E),N=[],C=g&&l0({barSize:l,stackGroups:n,totalSize:"xAxis"===m?S[m].width:"yAxis"===m?S[m].height:void 0});if(P){var M,I,R=er()(O)?d:O,D=null!==(M=null!==(I=cg(_,E,!0))&&void 0!==I?I:R)&&void 0!==M?M:0;N=l1({barGap:u,barCategoryGap:h,bandSize:D!==T?D:T,sizeList:C[j],maxBarSize:R}),D!==T&&(N=N.map(function(e){return da(da({},e),{},{position:da(da({},e.position),{},{offset:e.position.offset-D/2})})}))}var L=r&&r.type&&r.type.getComposedData;L&&v.push({props:da(da({},L(da(da({},S),{},{displayedData:b,props:e,dataKey:x,item:r,bandSize:T,barPosition:N,offset:i,stackedData:A,layout:c,dataStartIndex:a,dataEndIndex:s}))),{},ds(ds(ds({key:r.key||"item-".concat(p)}
1,y,S[y]),m,S[m]),"animationId",o)),childIndex:eL(e.children).indexOf(r),item:r})}),v},g=function(e,t){var r=e.props,n=e.dataStartIndex,i=e.dataEndIndex,o=e.updateId;if(!eU({props:r}))return null;var l=r.children,c=r.layout,u=r.stackOffset,h=r.data,d=r.reverseStackOrder,y=dk(c),g=y.numericAxisName,v=y.cateAxisName,b=eB(l,s),w=cs(h,b,"".concat(g,"Id"),"".concat(v,"Id"),u,d),x=f.reduce(function(e,t){var o="".concat(t.axisType,"Map");return da(da({},e),{},ds({},o,dw(r,da(da({},t),{},{graphicalItems:b,stackGroups:t.axisType===g&&w,dataStartIndex:n,dataEndIndex:i}))))},{}),O=dj(da(da({},x),{},{props:r,graphicalItems:b}),null==t?void 0:t.legendBBox);Object.keys(x).forEach(function(e){x[e]=p(r,x[e],O,e.replace("Map",""),a)});var k=dx(x["".concat(v,"Map")]),j=m(r,da(da({},x),{},{dataStartIndex:n,dataEndIndex:i,updateId:o,graphicalItems:b,stackGroups:w,offset:O}));return da(da({formattedGraphicalItems:j,graphicalItems:b,offset:O,stackGroups:w},k),x)},v=function(e){var t;function r(e){var t,n,i,o,s;return function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,r),o=r,s=[e],o=f9(o),ds(i=function(e,t){if(t&&("object"===f5(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,f7()?Reflect.construct(o,s||[],f9(this).constructor):o.apply(this,s)),"eventEmitterSymbol",Symbol("rechartsEventEmitter")),ds(i,"accessibilityManager",new ff),ds(i,"handleLegendBBoxUpdate",function(e){if(e){var t=i.state,r=t.dataStartIndex,n=t.dataEndIndex,o=t.updateId;i.setState(da({legendBBox:e},g({props:i.props,dataStartIndex:r,dataEndIndex:n,updateId:o},da(da({},i.state),{},{legendBBox:e}))))}}),ds(i,"handleReceiveSyncEvent",function(e,t,r){i.props.syncId===e&&(r!==i.eventEmitterSymbol||"function"==typeof i.props.syncMethod)&&i.applySyncEvent(t)}),ds(i,"handleBrushChange",function(e){var t=e.startIndex,r=e.endIndex;if(t!==i.state.dataStartIndex||r!==i.state.dataEndIndex){var n=i.state.updateId;i.setState(function(){return da({dataStartIndex:t,dataEndIndex:r},g({props:i.props,dataStartIndex:t,dataEndIndex:r,updateId:n},i.state))}),i.triggerSyncEvent({dataStartIndex:t,dataEndIndex:r})}}),ds(i,"handleMouseEnter",function(e){var t=i.getMouseInfo(e);if(t){var r=da(da({},t),{},{isTooltipActive:!0});i.setState(r),i.triggerSyncEvent(r);var n=i.props.onMouseEnter;eg()(n)&&n(r,e)}}),ds(i,"triggeredAfterMouseMove",function(e){var t=i.getMouseInfo(e),r=t?da(da({},t),{},{isTooltipActive:!0}):{isTooltipActive:!1};i.setState(r),i.triggerSyncEvent(r);var n=i.props.onMouseMove;eg()(n)&&n(r,e)}),ds(i,"handleItemMouseEnter",function(e){i.setState(function(){return{isTooltipActive:!0,activeItem:e,activePayload:e.tooltipPayload,activeCoordinate:e.tooltipPosition||{x:e.cx,y:e.cy}}})}),ds(i,"handleItemMouseLeave",function(){i.setState(function(){return{isTooltipActive:!1}})}),ds(i,"handleMouseMove",function(e){e.persist(),i.throttleTriggeredAfterMouseMove(e)}),ds(i,"handleMouseLeave",function(e){i.throttleTriggeredAfterMouseMove.cancel();var t={isTooltipActive:!1};i.setState(t),i.triggerSyncEvent(t);var r=i.props.onMouseLeave;eg()(r)&&r(t,e)}),ds(i,"handleOuterEvent",function(e){var t,r=eK(e),n=X()(i.props,"".concat(r));r&&eg()(n)&&n(null!==(t=/.*touch.*/i.test(r)?i.getMouseInfo(e.changedTouches[0]):i.getMouseInfo(e))&&void 0!==t?t:{},e)}),ds(i,"handleClick",function(e){var t=i.getMouseInfo(e);if(t){var r=da(da({},t),{},{isTooltipActive:!0});i.setState(r),i.triggerSyncEvent(r);var n=i.props.onClick;eg()(n)&&n(r,e)}}),ds(i,"handleMouseDown",function(e){var t=i.props.onMouseDown;eg()(t)&&t(i.getMouseInfo(e),e)}),ds(i,"handleMouseUp",function(e){var t=i.props.onMouseUp;eg()(t)&&t(i.getMouseInfo(e),e)}),ds(i,"handleTouchMove",function(e){null!=e.changedTouches&&e.changedTouches.length>0&&i.throttleTriggeredAfterMouseMove(e.changedTouches[0])}),ds(i,"handleTouchStart",function(e){null!=e.changedTouches&&e.changedTouches.length>0&&i.handleMouseDown(e.changedTouches[0])}),ds(i,"handleTouchEnd",function(e){null!=e.changedTouches&&e.changedTouches.length>0&&i.handleMouseUp(e.changedTouches[0])}),ds(i,"handleDoubleClick",function(e){var t=i.props.onDoubleClick;eg()(t)&&t(i.getMouseInfo(e),e)}),ds(i,"handleContextMenu",function(e){var t=i.props.onContextMenu;eg()(t)&&t(i.getMouseInfo(e),e)}),ds(i,"triggerSyncEvent",function(e){void 0!==i.props.syncId&&fs.emit(fl,i.props.syncId,e,i.eventEmitterSymbol)}),ds(i,"applySyncEvent",function(e){var t=i.props,r=t.layout,n=t.syncMethod,o=i.state.updateId,a=e.dataStartIndex,s=e.dataEndIndex;if(void 0!==e.dataStartIndex||void 0!==e.dataEndIndex)i.setState(da({dataStartIndex:a,dataEndIndex:s},g({props:i.props,dataStartIndex:a,dataEndIndex:s,updateId:o},i.state)));else if(void 0!==e.activeTooltipIndex){var l=e.chartX,c=e.chartY,u=e.activeTooltipIndex,h=i.state,f=h.offset,d=h.tooltipTicks;if(!f)return;if("function"==typeof n)u=n(d,e);else if("value"===n){u=-1;for(var p=0;p<d.length;p++)if(d[p].value===e.activeLabel){u=p;break}}var y=da(da({},f),{},{x:f.left,y:f.top}),m=Math.min(l,y.x+y.width),v=Math.min(c,y.y+y.height),b=d[u]&&d[u].value,w=dm(i.state,i.props.data,u),x=d[u]?{x:"horizontal"===r?d[u].coordinate:m,y:"horizontal"===r?v:d[u].coordinate}:dh;i.setState(da(da({},e),{},{activeLabel:b,activeCoordinate:x,activePayload:w,activeTooltipIndex:u}))}else i.setState(e)}),ds(i,"renderCursor",function(e){var t,r=i.state,n=r.isTooltipActive,o=r.activeCoordinate,
1s=r.activePayload,l=r.offset,c=r.activeTooltipIndex,u=r.tooltipAxisBandSize,h=i.getTooltipEventType(),f=null!==(t=e.props.active)&&void 0!==t?t:n,d=i.props.layout,p=e.key||"_recharts-cursor";return P.createElement(f1,{key:p,activeCoordinate:o,activePayload:s,activeTooltipIndex:c,chartName:a,element:e,isActive:f,layout:d,offset:l,tooltipAxisBandSize:u,tooltipEventType:h})}),ds(i,"renderPolarAxis",function(e,t,r){var n=X()(e,"type.axisType"),o=X()(i.state,"".concat(n,"Map")),a=e.type.defaultProps,s=void 0!==a?da(da({},a),e.props):e.props,l=o&&o[s["".concat(n,"Id")]];return(0,P.cloneElement)(e,da(da({},l),{},{className:W(n,l.className),key:e.key||"".concat(t,"-").concat(r),ticks:l7(l,!0)}))}),ds(i,"renderPolarGrid",function(e){var t=e.props,r=t.radialLines,n=t.polarAngles,o=t.polarRadius,a=i.state,s=a.radiusAxisMap,l=a.angleAxisMap,c=eu(s),u=eu(l),h=u.cx,f=u.cy,d=u.innerRadius,p=u.outerRadius;return(0,P.cloneElement)(e,{polarAngles:Array.isArray(n)?n:l7(u,!0).map(function(e){return e.coordinate}),polarRadius:Array.isArray(o)?o:l7(c,!0).map(function(e){return e.coordinate}),cx:h,cy:f,innerRadius:d,outerRadius:p,key:e.key||"polar-grid",radialLines:r})}),ds(i,"renderLegend",function(){var e=i.state.formattedGraphicalItems,t=i.props,r=t.children,n=t.width,o=t.height,a=i.props.margin||{},s=lF({children:r,formattedGraphicalItems:e,legendWidth:n-(a.left||0)-(a.right||0),legendContent:d});if(!s)return null;var l=s.item,c=f8(s,f2);return(0,P.cloneElement)(l,da(da({},c),{},{chartWidth:n,chartHeight:o,margin:a,onBBoxUpdate:i.handleLegendBBoxUpdate}))}),ds(i,"renderTooltip",function(){var e,t=i.props,r=t.children,n=t.accessibilityLayer,o=e$(r,tI);if(!o)return null;var a=i.state,s=a.isTooltipActive,l=a.activeCoordinate,c=a.activePayload,u=a.activeLabel,h=a.offset,f=null!==(e=o.props.active)&&void 0!==e?e:s;return(0,P.cloneElement)(o,{viewBox:da(da({},h),{},{x:h.left,y:h.top}),active:f,label:u,payload:f?c:[],coordinate:l,accessibilityLayer:n})}),ds(i,"renderBrush",function(e){var t=i.props,r=t.margin,n=t.data,o=i.state,a=o.offset,s=o.dataStartIndex,l=o.dataEndIndex,c=o.updateId;return(0,P.cloneElement)(e,{key:e.key||"_recharts-brush",onChange:ce(i.handleBrushChange,e.props.onChange),data:n,x:eo(e.props.x)?e.props.x:a.left,y:eo(e.props.y)?e.props.y:a.top+a.height+a.brushBottom-(r.bottom||0),width:eo(e.props.width)?e.props.width:a.width,startIndex:s,endIndex:l,updateId:"brush-".concat(c)})}),ds(i,"renderReferenceElement",function(e,t,r){if(!e)return null;var n=i.clipPathId,o=i.state,a=o.xAxisMap,s=o.yAxisMap,l=o.offset,c=e.type.defaultProps||{},u=e.props,h=u.xAxisId,f=void 0===h?c.xAxisId:h,d=u.yAxisId,p=void 0===d?c.yAxisId:d;return(0,P.cloneElement)(e,{key:e.key||"".concat(t,"-").concat(r),xAxis:a[f],yAxis:s[p],viewBox:{x:l.left,y:l.top,width:l.width,height:l.height},clipPathId:n})}),ds(i,"renderActivePoints",function(e){var t=e.item,n=e.activePoint,i=e.basePoint,o=e.childIndex,a=e.isRange,s=[],l=t.props.key,c=void 0!==t.item.type.defaultProps?da(da({},t.item.type.defaultProps),t.item.props):t.item.props,u=c.activeDot,h=da(da({index:o,dataKey:c.dataKey,cx:n.x,cy:n.y,r:4,fill:lQ(t.item),strokeWidth:2,stroke:"#fff",payload:n.payload,value:n.value},eF(u,!1)),eE(u));return s.push(r.renderActiveDot(u,h,"".concat(l,"-activePoint-").concat(o))),i?s.push(r.renderActiveDot(u,da(da({},h),{},{cx:i.x,cy:i.y}),"".concat(l,"-basePoint-").concat(o))):a&&s.push(null),s}),ds(i,"renderGraphicChild",function(e,t,r){var n=i.filterFormatItem(e,t,r);if(!n)return null;var o=i.getTooltipEventType(),a=i.state,s=a.isTooltipActive,l=a.tooltipAxis,c=a.activeTooltipIndex,u=a.activeLabel,h=e$(i.props.children,tI),f=n.props,d=f.points,p=f.isRange,y=f.baseLine,m=void 0!==n.item.type.defaultProps?da(da({},n.item.type.defaultProps),n.item.props):n.item.props,g=m.activeDot,v=m.hide,b=m.activeBar,w=m.activeShape,x={};"axis"!==o&&h&&"click"===h.props.trigger?x={onClick:ce(i.handleItemMouseEnter,e.props.onClick)}:"axis"!==o&&(x={onMouseLeave:ce(i.handleItemMouseLeave,e.props.onMouseLeave),onMouseEnter:ce(i.handleItemMouseEnter,e.props.onMouseEnter)});var O=(0,P.cloneElement)(e,da(da({},n.props),x));if(!v&&s&&h&&(g||b||w)){if(c>=0){if(l.dataKey&&!l.allowDuplicatedCategory){var k="function"==typeof l.dataKey?function(e){return"function"==typeof l.dataKey?l.dataKey(e.payload):null}:"payload.".concat(l.dataKey.toString());S=ed(d,k,u),_=p&&y&&ed(y,k,u)}else S=null==d?void 0:d[c],_=p&&y&&y[c];if(w||b){var j=void 0!==e.props.activeIndex?e.props.activeIndex:c;return[(0,P.cloneElement)(e,da(da(da({},n.props),x),{},{activeIndex:j})),null,null]}if(!er()(S))return[O].concat(dt(i.renderActivePoints({item:n,activePoint:S,basePoint:_,childIndex:c,isRange:p})))}else{var S,_,E,A=(null!==(E=i.getItemByXY(i.state.activeCoordinate))&&void 0!==E?E:{graphicalItem:O}).graphicalItem,T=A.item,N=void 0===T?e:T,C=A.childIndex,M=da(da(da({},n.props),x),{},{activeIndex:C});return[(0,P.cloneElement)(N,M),null,null]}}return p?[O,null,null]:[O,null]}),ds(i,"renderCustomized",function(e,t,r){return(0,P.cloneElement)(e,da(da({key:"recharts-customized-".concat(r)},i.props),i.state))}),ds(i,"renderMap",{CartesianGrid:{handler:df,once:!0},ReferenceArea:{handler:i.renderReferenceElement},ReferenceLine:{handler:df},ReferenceDot:{handler:i.renderReferenceElement},XAxis:{handler:df},YAxis:{handler:df},Brush:{handler:i.renderBrush,once:!0},Bar:{handler:i.renderGraphicChild},Line:{handler:i.renderGraphicChild},Area:{handler:i.renderGraphicChild},Radar:{handler:i.renderGraphicChild},RadialBar:{handler:i.renderGraphicChild},Scatter:{handler:i.renderGraphicChild},Pie:{handler:i.renderGraphicChild},Funnel:{handler:i.renderGraphicChild},Tooltip:{handler:i.renderCursor,once:!0},PolarGrid:{handler:i.renderPolarGrid,once:!0},PolarAngleAxis:{handler:i.renderPolarAxis},PolarRadiusAxis:{handler:i.renderPolarAxis},Customized:{handler:i.renderCustomized}}),i.clipPathId="".concat(null!==(t=e.id)&&void 0!==t?t:el("recharts"),"-clip"),i.throttleTriggeredAfterMouseMove=V()(i.triggeredAfterMouseMove,null!==(n=e.throttleDelay)&&void 0!==n?n:1e3/60),i.state={},i}return function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&de(e,t)}(r,e),t=[{key:"componentDidMount",value:function(){var e,t;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:null!==(e=this.props.margin.left)&&void 0!==e?e:0,top:null!==(t=this.props.margin.top)&&void 0!==t?t:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var e=this.props,t=e.children,r=e.data,n=e.he
1ight,i=e.layout,o=e$(t,tI);if(o){var a=o.props.defaultIndex;if("number"==typeof a&&!(a<0)&&!(a>this.state.tooltipTicks.length-1)){var s=this.state.tooltipTicks[a]&&this.state.tooltipTicks[a].value,l=dm(this.state,r,a,s),c=this.state.tooltipTicks[a].coordinate,u=(this.state.offset.top+n)/2,h="horizontal"===i?{x:c,y:u}:{y:c,x:u},f=this.state.formattedGraphicalItems.find(function(e){return"Scatter"===e.item.type.name});f&&(h=da(da({},h),f.props.points[a].tooltipPosition),l=f.props.points[a].tooltipPayload);var d={activeTooltipIndex:a,isTooltipActive:!0,activeLabel:s,activePayload:l,activeCoordinate:h};this.setState(d),this.renderCursor(o),this.accessibilityManager.setIndex(a)}}}},{key:"getSnapshotBeforeUpdate",value:function(e,t){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==t.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==e.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==e.margin){var r,n;this.accessibilityManager.setDetails({offset:{left:null!==(r=this.props.margin.left)&&void 0!==r?r:0,top:null!==(n=this.props.margin.top)&&void 0!==n?n:0}})}return null}},{key:"componentDidUpdate",value:function(e){eW([e$(e.children,tI)],[e$(this.props.children,tI)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var e=e$(this.props.children,tI);if(e&&"boolean"==typeof e.props.shared){var t=e.props.shared?"axis":"item";return h.indexOf(t)>=0?t:c}return c}},{key:"getMouseInfo",value:function(e){if(!this.container)return null;var t=this.container,r=t.getBoundingClientRect(),n={top:r.top+window.scrollY-document.documentElement.clientTop,left:r.left+window.scrollX-document.documentElement.clientLeft},i={chartX:Math.round(e.pageX-n.left),chartY:Math.round(e.pageY-n.top)},o=r.width/t.offsetWidth||1,a=this.inRange(i.chartX,i.chartY,o);if(!a)return null;var s=this.state,l=s.xAxisMap,c=s.yAxisMap,u=this.getTooltipEventType(),h=dg(this.state,this.props.data,this.props.layout,a);if("axis"!==u&&l&&c){var f=eu(l).scale,d=eu(c).scale,p=f&&f.invert?f.invert(i.chartX):null,y=d&&d.invert?d.invert(i.chartY):null;return da(da({},i),{},{xValue:p,yValue:y},h)}return h?da(da({},i),h):null}},{key:"inRange",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,n=this.props.layout,i=e/r,o=t/r;if("horizontal"===n||"vertical"===n){var a=this.state.offset;return i>=a.left&&i<=a.left+a.width&&o>=a.top&&o<=a.top+a.height?{x:i,y:o}:null}var s=this.state,l=s.angleAxisMap,c=s.radiusAxisMap;return l&&c?cK({x:i,y:o},eu(l)):null}},{key:"parseEventsOfWrapper",value:function(){var e=this.props.children,t=this.getTooltipEventType(),r=e$(e,tI),n={};return r&&"axis"===t&&(n="click"===r.props.trigger?{onClick:this.handleClick}:{onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu}),da(da({},eE(this.props,this.handleOuterEvent)),n)}},{key:"addListener",value:function(){fs.on(fl,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){fs.removeListener(fl,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(e,t,r){for(var n=this.state.formattedGraphicalItems,i=0,o=n.length;i<o;i++){var a=n[i];if(a.item===e||a.props.key===e.key||t===eI(a.item.type)&&r===a.childIndex)return a}return null}},{key:"renderClipPath",value:function(){var e=this.clipPathId,t=this.state.offset,r=t.left,n=t.top,i=t.height,o=t.width;return P.createElement("defs",null,P.createElement("clipPath",{id:e},P.createElement("rect",{x:r,y:n,height:i,width:o})))}},{key:"getXScales",value:function(){var e=this.state.xAxisMap;return e?Object.entries(e).reduce(function(e,t){var r=f6(t,2),n=r[0],i=r[1];return da(da({},e),{},ds({},n,i.scale))},{}):null}},{key:"getYScales",value:function(){var e=this.state.yAxisMap;return e?Object.entries(e).reduce(function(e,t){var r=f6(t,2),n=r[0],i=r[1];return da(da({},e),{},ds({},n,i.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(e){var t;return null===(t=this.state.xAxisMap)||void 0===t||null===(t=t[e])||void 0===t?void 0:t.scale}},{key:"getYScaleByAxisId",value:function(e){var t;return null===(t=this.state.yAxisMap)||void 0===t||null===(t=t[e])||void 0===t?void 0:t.scale}},{key:"getItemByXY",value:function(e){var t=this.state,r=t.formattedGraphicalItems,n=t.activeItem;if(r&&r.length)for(var i=0,o=r.length;i<o;i++){var a=r[i],s=a.props,l=a.item,c=void 0!==l.type.defaultProps?da(da({},l.type.defaultProps),l.props):l.props,u=eI(l.type);if("Bar"===u){var h=(s.data||[]).find(function(t){return nF(e,t)});if(h)return{graphicalItem:a,payload:h}}else if("RadialBar"===u){var f=(s.data||[]).find(function(t){return cK(e,t)});if(f)return{graphicalItem:a,payload:f}}else if(uq(a,n)||uz(a,n)||uF(a,n)){var d=function(e){var t,r,n,i=e.activeTooltipItem,o=e.graphicalItem,a=e.itemData,s=(uq(o,i)?t="trapezoids":uz(o,i)?t="sectors":uF(o,i)&&(t="points"),t),l=uq(o,i)?null===(r=i.tooltipPayload)||void 0===r||null===(r=r[0])||void 0===r||null===(r=r.payload)||void 0===r?void 0:r.payload:uz(o,i)?null===(n=i.tooltipPayload)||void 0===n||null===(n=n[0])||void 0===n||null===(n=n.payload)||void 0===n?void 0:n.payload:uF(o,i)?i.payload:{},c=a.filter(function(e,t){var r=la()(l,e),n=o.props[s].filter(function(e){var t;return(uq(o,i)?t=uW:uz(o,i)?t=uH:uF(o,i)&&(t=uV),t)(e,i)}),a=o.props[s].indexOf(n[n.length-1]);return r&&t===a});return a.indexOf(c[c.length-1])}({graphicalItem:a,activeTooltipItem:n,itemData:c.data}),p=void 0===c.activeIndex?d:c.activeIndex;return{graphicalItem:da(da({},a),{},{childIndex:p}),payload:uF(a,n)?c.data[d]:a.props.data[d]}}}return null}},{key:"render",value:function(){var e,t,r=this;if(!eU(this))return null;var n=this.props,i=n.children,o=n.className,a=n.width,s=n.height,l=n.style,c=n.compact,u=n.title,h=n.desc,f=eF(f8(n,f3),!1);if(c)return P.createElement(hL,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},P.createElement(e6,f4({},f,{width:a,height:s,title:u,desc:h}),this.renderClipPath(),eV(i,this.renderMap)));this.props.accessibilityLayer&&(f.tabIndex=null!==(e=this.props.tabIndex)&&void 0!==e?e:0,f.role=null!==(t=this.props.role)&&void 0!==t?t:"application",f.onKeyDown=function(e){r.accessibilityManager.keyboardEvent(e)},f.onFocus=function(){r.accessibilityManager.focus()});var d=this.parseEventsOfWrapper();return P.createElement(hL,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},P.createElement("div",f4({className:W("recharts-wrapper",o),style:da({position:"relative",curs
1or:"default",width:a,height:s},l)},d,{ref:function(e){r.container=e}}),P.createElement(e6,f4({},f,{width:a,height:s,title:u,desc:h,style:du}),this.renderClipPath(),eV(i,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}],function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,dl(n.key),n)}}(r.prototype,t),Object.defineProperty(r,"prototype",{writable:!1}),r}(P.Component),ds(v,"displayName",a),ds(v,"defaultProps",da({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},y)),ds(v,"getDerivedStateFromProps",function(e,t){var r=e.dataKey,n=e.data,i=e.children,o=e.width,a=e.height,s=e.layout,l=e.stackOffset,c=e.margin,u=t.dataStartIndex,h=t.dataEndIndex;if(void 0===t.updateId){var f=dO(e);return da(da(da({},f),{},{updateId:0},g(da(da({props:e},f),{},{updateId:0}),t)),{},{prevDataKey:r,prevData:n,prevWidth:o,prevHeight:a,prevLayout:s,prevStackOffset:l,prevMargin:c,prevChildren:i})}if(r!==t.prevDataKey||n!==t.prevData||o!==t.prevWidth||a!==t.prevHeight||s!==t.prevLayout||l!==t.prevStackOffset||!ex(c,t.prevMargin)){var d=dO(e),p={chartX:t.chartX,chartY:t.chartY,isTooltipActive:t.isTooltipActive},y=da(da({},dg(t,n,s)),{},{updateId:t.updateId+1}),m=da(da(da({},d),p),y);return da(da(da({},m),g(da({props:e},m),t)),{},{prevDataKey:r,prevData:n,prevWidth:o,prevHeight:a,prevLayout:s,prevStackOffset:l,prevMargin:c,prevChildren:i})}if(!eW(i,t.prevChildren)){var v,b,w,x,O=e$(i,cB),k=O&&null!==(v=null===(b=O.props)||void 0===b?void 0:b.startIndex)&&void 0!==v?v:u,j=O&&null!==(w=null===(x=O.props)||void 0===x?void 0:x.endIndex)&&void 0!==w?w:h,S=er()(n)||k!==u||j!==h?t.updateId+1:t.updateId;return da(da({updateId:S},g(da(da({props:e},t),{},{updateId:S,dataStartIndex:k,dataEndIndex:j}),t)),{},{prevChildren:i,dataStartIndex:k,dataEndIndex:j})}return null}),ds(v,"renderActiveDot",function(e,t,r){var n;return n=(0,P.isValidElement)(e)?(0,P.cloneElement)(e,t):eg()(e)?e(t):P.createElement(r_,t),P.createElement(e9,{className:"recharts-active-dot",key:r},n)}),(b=(0,P.forwardRef)(function(e,t){return P.createElement(v,f4({},e,{ref:t}))})).displayName=v.displayName,b),pg=["x1","y1","x2","y2","key"],pv=["offset"];function pb(e){return(pb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function pw(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function px(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?pw(Object(r),!0).forEach(function(t){var n,i;n=t,i=r[t],(n=function(e){var t=function(e,t){if("object"!=pb(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=pb(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==pb(t)?t:t+""}(n))in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):pw(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function pO(){return(pO=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function pk(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var pj=function(e){var t=e.fill;if(!t||"none"===t)return null;var r=e.fillOpacity,n=e.x,i=e.y,o=e.width,a=e.height,s=e.ry;return P.createElement("rect",{x:n,y:i,ry:s,width:o,height:a,stroke:"none",fill:t,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function pS(e,t){var r;if(P.isValidElement(e))r=P.cloneElement(e,t);else if(eg()(e))r=e(t);else{var n=t.x1,i=t.y1,o=t.x2,a=t.y2,s=t.key,l=eF(pk(t,pg),!1),c=(l.offset,pk(l,pv));r=P.createElement("line",pO({},c,{x1:n,y1:i,x2:o,y2:a,fill:"none",key:s}))}return r}function p_(e){var t=e.x,r=e.width,n=e.horizontal,i=void 0===n||n,o=e.horizontalPoints;if(!i||!o||!o.length)return null;var a=o.map(function(n,o){return pS(i,px(px({},e),{},{x1:t,y1:n,x2:t+r,y2:n,key:"line-".concat(o),index:o}))});return P.createElement("g",{className:"recharts-cartesian-grid-horizontal"},a)}function pE(e){var t=e.y,r=e.height,n=e.vertical,i=void 0===n||n,o=e.verticalPoints;if(!i||!o||!o.length)return null;var a=o.map(function(n,o){return pS(i,px(px({},e),{},{x1:n,y1:t,x2:n,y2:t+r,key:"line-".concat(o),index:o}))});return P.createElement("g",{className:"recharts-cartesian-grid-vertical"},a)}function pA(e){var t=e.horizontalFill,r=e.fillOpacity,n=e.x,i=e.y,o=e.width,a=e.height,s=e.horizontalPoints,l=e.horizontal;if(!(void 0===l||l)||!t||!t.length)return null;var c=s.map(function(e){return Math.round(e+i-i)}).sort(function(e,t){return e-t});i!==c[0]&&c.unshift(0);var u=c.map(function(e,s){var l=c[s+1]?c[s+1]-e:i+a-e;if(l<=0)return null;var u=s%t.length;return P.createElement("rect",{key:"react-".concat(s),y:e,x:n,height:l,width:o,stroke:"none",fill:t[u],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return P.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},u)}function pP(e){var t=e.vertical,r=e.verticalFill,n=e.fillOpacity,i=e.x,o=e.y,a=e.width,s=e.he
1ight,l=e.verticalPoints;if(!(void 0===t||t)||!r||!r.length)return null;var c=l.map(function(e){return Math.round(e+i-i)}).sort(function(e,t){return e-t});i!==c[0]&&c.unshift(0);var u=c.map(function(e,t){var l=c[t+1]?c[t+1]-e:i+a-e;if(l<=0)return null;var u=t%r.length;return P.createElement("rect",{key:"react-".concat(t),x:e,y:o,width:l,height:s,stroke:"none",fill:r[u],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return P.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},u)}var pT=function(e,t){var r=e.xAxis,n=e.width,i=e.height,o=e.offset;return l8(dV(px(px(px({},d8.defaultProps),r),{},{ticks:l7(r,!0),viewBox:{x:0,y:0,width:n,height:i}})),o.left,o.left+o.width,t)},pN=function(e,t){var r=e.yAxis,n=e.width,i=e.height,o=e.offset;return l8(dV(px(px(px({},d8.defaultProps),r),{},{ticks:l7(r,!0),viewBox:{x:0,y:0,width:n,height:i}})),o.top,o.top+o.height,t)},pC={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function pM(e){var t,r,n,i,o,a,s=hq(),l=hz(),c=(0,P.useContext)(hM),u=px(px({},e),{},{stroke:null!==(t=e.stroke)&&void 0!==t?t:pC.stroke,fill:null!==(r=e.fill)&&void 0!==r?r:pC.fill,horizontal:null!==(n=e.horizontal)&&void 0!==n?n:pC.horizontal,horizontalFill:null!==(i=e.horizontalFill)&&void 0!==i?i:pC.horizontalFill,vertical:null!==(o=e.vertical)&&void 0!==o?o:pC.vertical,verticalFill:null!==(a=e.verticalFill)&&void 0!==a?a:pC.verticalFill,x:eo(e.x)?e.x:c.left,y:eo(e.y)?e.y:c.top,width:eo(e.width)?e.width:c.width,height:eo(e.height)?e.height:c.height}),h=u.x,f=u.y,d=u.width,p=u.height,y=u.syncWithTicks,m=u.horizontalValues,g=u.verticalValues,v=eu((0,P.useContext)(hT)),b=h$();if(!eo(d)||d<=0||!eo(p)||p<=0||!eo(h)||h!==+h||!eo(f)||f!==+f)return null;var w=u.verticalCoordinatesGenerator||pT,x=u.horizontalCoordinatesGenerator||pN,O=u.horizontalPoints,k=u.verticalPoints;if((!O||!O.length)&&eg()(x)){var j=m&&m.length,S=x({yAxis:b?px(px({},b),{},{ticks:j?m:b.ticks}):void 0,width:s,height:l,offset:c},!!j||y);ey(Array.isArray(S),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(pb(S),"]")),Array.isArray(S)&&(O=S)}if((!k||!k.length)&&eg()(w)){var _=g&&g.length,E=w({xAxis:v?px(px({},v),{},{ticks:_?g:v.ticks}):void 0,width:s,height:l,offset:c},!!_||y);ey(Array.isArray(E),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(pb(E),"]")),Array.isArray(E)&&(k=E)}return P.createElement("g",{className:"recharts-cartesian-grid"},P.createElement(pj,{fill:u.fill,fillOpacity:u.fillOpacity,x:u.x,y:u.y,width:u.width,height:u.height,ry:u.ry}),P.createElement(p_,pO({},u,{offset:c,horizontalPoints:O,xAxis:v,yAxis:b})),P.createElement(pE,pO({},u,{offset:c,verticalPoints:k,xAxis:v,yAxis:b})),P.createElement(pA,pO({},u,{horizontalPoints:O})),P.createElement(pP,pO({},u,{verticalPoints:k})))}pM.displayName="CartesianGrid";var pI=r(97589);let pR=[{key:"final_edge_score",label:"Final Edge",color:"#fbbf24"},{key:"macro_stress_score",label:"Macro Stress",color:"#f87171"},{key:"news_velocity_score",label:"News Velocity",color:"#fb923c"},{key:"dislocation_score",label:"Dislocation",color:"#22d3ee"}];function pD(e){let{days:t=30}=e,[r,n]=(0,P.useState)(null),[i,o]=(0,P.useState)(!0);if((0,P.useEffect)(()=>{let e=!1;return fetch("/api/signal-radar/history?days=".concat(t),{cache:"no-store"}).then(e=>e.json()).then(t=>{e||n(t)}).catch(()=>{}).finally(()=>!e&&o(!1)),()=>{e=!0}},[t]),i)return(0,A.jsxs)("div",{className:"rounded-xl border border-[#1a1a26] bg-[#0a0a14] p-6 text-center text-sm text-gray-500",children:[(0,A.jsx)(B.Z,{className:"w-4 h-4 inline animate-pulse mr-2"})," Loading trend…"]});if(null==r?void 0:r.table_missing)return(0,A.jsx)("div",{className:"rounded-xl border border-amber-500/30 bg-amber-500/5 p-5",children:(0,A.jsxs)("div",{className:"flex items-start gap-3",children:[(0,A.jsx)(pI.Z,{className:"w-5 h-5 text-amber-400 flex-shrink-0 mt-0.5"}),(0,A.jsxs)("div",{className:"text-sm",children:[(0,A.jsx)("div",{className:"font-bold text-amber-200 mb-1",children:"Trend chart not yet enabled"}),(0,A.jsxs)("p",{className:"text-amber-200/80 leading-relaxed",children:["Historical scoring requires the ",(0,A.jsx)("code",{className:"text-amber-100 bg-amber-500/15 px-1.5 py-0.5 rounded text-[11px]",children:"signal_radar_daily"})," table. Run ",(0,A.jsx)("code",{className:"text-amber-100 bg-amber-500/15 px-1.5 py-0.5 rounded text-[11px]",children:"/app/SIGNAL_RADAR_SCHEMA.sql"})," in your Supabase SQL editor, then configure a daily cron to hit ",(0,A.jsx)("code",{className:"text-amber-100 bg-amber-500/15 px-1.5 py-0.5 rounded text-[11px]",children:"/api/cron/signal-radar-snapsh
1ot?secret=..."}),". Trend data will start populating from the next daily run."]})]})]})});let a=(null==r?void 0:r.history)||[];return 0===a.length?(0,A.jsxs)("div",{className:"rounded-xl border border-[#1a1a26] bg-[#0a0a14] p-6 text-center text-sm text-gray-500",children:[(0,A.jsx)(N.Z,{className:"w-4 h-4 inline mr-2"}),"No snapshots recorded yet. Trend chart will appear once the daily cron runs."]}):a.length<2?(0,A.jsxs)("div",{className:"rounded-xl border border-[#1a1a26] bg-[#0a0a14] p-6 text-center text-sm text-gray-500",children:[(0,A.jsx)(N.Z,{className:"w-4 h-4 inline mr-2"}),"Only ",a.length," snapshot recorded. Need at least 2 days of history for a trend line — check back tomorrow."]}):(0,A.jsxs)("div",{className:"rounded-xl border border-[#1a1a26] bg-[#0a0a14] p-3 sm:p-4",children:[(0,A.jsxs)("div",{className:"flex items-center justify-between mb-2 px-1",children:[(0,A.jsxs)("div",{className:"text-[10px] font-bold tracking-[0.18em] text-gray-500 uppercase",children:[a.length,"-day score trend"]}),(0,A.jsxs)("div",{className:"text-[10px] text-gray-500 font-mono",children:[a[0].trade_date," → ",a[a.length-1].trade_date]})]}),(0,A.jsx)("div",{className:"w-full",style:{height:240},children:(0,A.jsx)(eX,{width:"100%",height:"100%",children:(0,A.jsxs)(pm,{data:a,margin:{top:8,right:12,bottom:0,left:-16},children:[(0,A.jsx)(pM,{stroke:"#1a1a26",strokeDasharray:"2 4"}),(0,A.jsx)(pa,{dataKey:"trade_date",tick:{fill:"#6b7280",fontSize:10},tickFormatter:e=>e?e.slice(5):"",stroke:"#2a2a36"}),(0,A.jsx)(py,{domain:[0,100],tick:{fill:"#6b7280",fontSize:10},stroke:"#2a2a36"}),(0,A.jsx)(tI,{contentStyle:{background:"#0c0c14",border:"1px solid #1a1a26",borderRadius:6,fontSize:11},labelStyle:{color:"#9ca3af",fontSize:10},itemStyle:{padding:0}}),(0,A.jsx)(rj,{wrapperStyle:{fontSize:10,paddingTop:4},iconType:"line"}),pR.map(e=>(0,A.jsx)(dU,{type:"monotone",dataKey:e.key,name:e.label,stroke:e.color,strokeWidth:"final_edge_score"===e.key?2.2:1.5,dot:!1,isAnimationActive:!1,connectNulls:!0},e.key))]})})})]})}var pL=r(78030);let pB=(0,pL.Z)("droplet",[["path",{d:"M12 22a7 7 0 0 0 7-7c0-2-1-3.9-3-5.5s-3.5-4-4-6.5c-.5 2.5-2 4.9-4 6.5C6 11.1 5 13 5 15a7 7 0 0 0 7 7z",key:"c7niix"}]]),p$=(0,pL.Z)("gem",[["path",{d:"M6 3h12l4 6-10 13L2 9Z",key:"1pcd5k"}],["path",{d:"M11 3 8 9l4 13 4-13-3-6",key:"1fcu3u"}],["path",{d:"M2 9h20",key:"16fsjt"}]]);function pU(e){let t=Math.abs(Number(e)||0);return t>=3?"big":t>=1?"meaningful":t>=.25?"small":"flat"}function pq(e){let t=Number(e)||0;return t>=.25?"up":t<=-.25?"down":"flat"}let pz={oil:{up_big:'Sharp oil spikes (>3%) historically coincide with war-escalation and supply-shock markets pricing HIGHER risk — think "Iran-Israel conflict by X", "Strait of Hormuz disruption", or "OPEC supply cut" event markets. They also tend to push inflation-CPI and Fed-hawkish event markets higher.',up_meaningful:"Moderate oil strength (+1% to +3%) historically aligns with geopolitical-tension and inflation-CPI markets ticking modestly higher. Watch for supply-disruption narratives gaining attention.",up_small:"Small oil uptick — historically a weak signal on its own, but worth watching if it persists alongside other macro stress (DXY up, VIX up).",up_flat:"Oil is little changed today — limited historical signal for war or inflation markets at this magnitude.",down_big:"Sharp oil drops (>3%) historically coincide with war-fear markets COOLING — the market is pricing less supply-shock risk and less geopolitical disruption ahead. Inflation-CPI markets typically soften, Fed-cut probability ticks up. Recession-fear markets occasionally rise on demand-destruction concerns.",down_meaningful:"Moderate oil weakness (-1% to -3%) historically aligns with war-narrative cooling and lighter inflation pressure. Watch ceasefire / de-escalation event markets for upward repricing.",down_small:"Small oil softness — historically a weak signal on its own. Direction matters more when paired with falling DXY or rising bond prices.",down_flat:"Oil is little changed today — limited historical signal at this magnitude.",flat_flat:"Oil is flat — no notable historical correlation to flag."},gold:{up_big:"Sharp gold strength (>3%) historically tracks alongside recession-fear, geopolitical-tension, and dollar-weakness event markets repricing HIGHER. Often pairs with falling real yields and risk-off positioning.",up_meaningful:"Moderate gold strength (+1% to +3%) historically aligns with safe-haven, recession-risk, and dollar-weakness event markets ticking higher.",up_small:"Light gold strength — historically tracks alongside slow safe-haven accumulation. Worth watching alongside real-yield direction and DXY.",up_flat:"Gold is little changed today — limited historical signal at this magnitude.",down_big:"Sharp gold weakness (>
13%) historically tracks alongside risk-ON regimes and softer recession-fear event markets. Often pairs with rising real yields and dollar strength.",down_meaningful:"Moderate gold weakness (-1% to -3%) historically aligns with recession-fear and dollar-weakness markets pricing lower.",down_small:"Light gold softness — historically a quiet risk-on tilt. Real-yield direction tends to drive the signal more than the gold move itself.",down_flat:"Gold is little changed today — limited historical signal at this magnitude.",flat_flat:"Gold is flat — no notable historical correlation to flag."}};function pF(e,t){let r=pq(t),n=pU(t),i="flat"===r?"flat_flat":"".concat(r,"_").concat(n);return pz[e][i]||pz[e].flat_flat}function pW(e){let{marketData:t}=e;if(!t)return null;let r=t.wtiChangePct,n=t.goldChangePct;if(!Number.isFinite(Number(r))&&!Number.isFinite(Number(n)))return null;let i=function(e){let{wti:t,gold:r}=e,n=pq(t),i=pU(t),o=pq(r),a="big"===pU(r)||"meaningful"===pU(r),s="big"===i||"meaningful"===i;return Number.isFinite(Number(t))||Number.isFinite(Number(r))?"down"===n&&s?'Oil dropping today — historically a tailwind for "ceasefire" / "war ends by X" markets and a headwind for supply-shock and inflation-CPI markets.':"up"===n&&s?'Oil rallying today — historically a tailwind for "war escalation" / "supply disruption" markets and inflation-CPI prints.':"up"===o&&a&&"flat"===n?"Gold rallying with oil quiet — historically a risk-off / recession-fear tilt. Safe-haven event markets sometimes repriced higher in similar setups.":"down"===o&&a&&"flat"===n?"Gold weakening with oil quiet — historically a risk-on signal. Recession-fear event markets sometimes softened in similar setups.":"Both oil and gold are relatively quiet right now — limited macro signal for war / inflation / recession event markets at this magnitude.":null}({wti:r,gold:n});return(0,A.jsxs)("section",{className:"rounded-xl border border-[#1e1e2e] bg-[#0c0c14] p-5 mb-6",children:[(0,A.jsxs)("div",{className:"flex items-start justify-between mb-1 gap-3",children:[(0,A.jsxs)("h3",{className:"text-sm font-bold text-white inline-flex items-center gap-2",children:[(0,A.jsx)(pB,{className:"w-4 h-4 text-orange-400"})," Oil & Gold Macro Context"]}),(0,A.jsx)("span",{className:"text-[10px] text-gray-500 tracking-wider uppercase mt-1",children:"Historical correlation"})]}),(0,A.jsxs)("p",{className:"text-[11px] text-gray-500 mb-3 leading-relaxed",children:["How recent moves in oil and gold have ",(0,A.jsx)("em",{className:"text-gray-400 not-italic",children:"historically"})," related to event-market repricing. Descriptive — not a recommendation, not a prediction."]}),i?(0,A.jsxs)("div",{className:"mb-4 rounded-lg border border-cyan-500/20 bg-cyan-500/[0.04] px-3 py-2.5",children:[(0,A.jsxs)("div",{className:"text-[9px] uppercase tracking-[0.18em] font-mono text-cyan-300 mb-1 inline-flex items-center gap-1",children:[(0,A.jsx)(L.Z,{className:"w-3 h-3"})," At a glance"]}),(0,A.jsx)("p",{className:"text-[12.5px] text-gray-200 leading-snug",children:i})]}):null,(0,A.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:[(0,A.jsx)(pH,{icon:pB,accent:"orange",label:"WTI Crude Oil",pct:r,phrase:pF("oil",r)}),(0,A.jsx)(pH,{icon:p$,accent:"amber",label:"Gold",pct:n,phrase:pF("gold",n)})]}),(0,A.jsxs)("div",{className:"mt-4 text-[10px] text-gray-500 leading-relaxed border-t border-[#1a1a2e] pt-3 inline-flex items-start gap-1.5",children:[(0,A.jsx)(L.Z,{className:"w-3 h-3 mt-0.5 flex-shrink-0"}),(0,A.jsxs)("span",{children:["Statements describe ",(0,A.jsx)("strong",{className:"text-gray-400",children:"past observed correlations"})," between commodity moves and event-market repricing — they are ",(0,A.jsx)("strong",{className:"text-gray-400",children:"not predictions"})," of future outcomes, and not advice to wager or trade. Markets can move independently of macro signals."]})]})]})}function pH(e){let{icon:t,accent:r,label:n,pct:i,phrase:o}=e,a=pq(i),s="up"===a?N.Z:"down"===a?C.Z:M.Z;return(0,A.jsxs)("div",{className:"rounded-lg border ".concat("orange"===r?"border-orange-500/20":"border-amber-500/20"," bg-[#0a0a14] p-4"),children:[(0,A.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,A.jsxs)("div",{className:"inline-flex items-center gap-1.5 text-[11px] font-bold tracking-wider up
1percase ".concat("orange"===r?"text-orange-300":"text-amber-300"),children:[(0,A.jsx)(t,{className:"w-3.5 h-3.5"})," ",n]}),(0,A.jsxs)("div",{className:"inline-flex items-center gap-1 font-mono font-bold text-sm ".concat("up"===a?"text-emerald-400":"down"===a?"text-rose-400":"text-gray-400"),children:[(0,A.jsx)(s,{className:"w-3.5 h-3.5"}),function(e){if(!Number.isFinite(Number(e)))return"—";let t=Number(e);return"".concat(t>0?"+":"").concat(t.toFixed(2),"%")}(i)]})]}),(0,A.jsx)("p",{className:"text-[11.5px] text-gray-300 leading-relaxed",children:o})]})}function pV(e){return"HIGH DISLOCATION"===e?"text-rose-300 bg-rose-500/15 border-rose-500/40":"MODERATE DISLOCATION"===e?"text-orange-300 bg-orange-500/15 border-orange-500/40":"ALIGNED"===e?"text-emerald-300 bg-emerald-500/15 border-emerald-500/40":"text-gray-400 bg-gray-500/10 border-gray-500/30"}function pK(e){return null==e||Number.isNaN(e)?"—":"".concat(e>0?"+":"").concat(e.toFixed(2),"%")}function pG(e){return null==e||Number.isNaN(e)?"—":"".concat(e>0?"+":"").concat(e.toFixed(1)," bps")}function pZ(){var e,t,r,n,i,o,a,s,l,c,u,h;let[f,d]=(0,P.useState)(null),[p,y]=(0,P.useState)(!0),[m,g]=(0,P.useState)(!1),[v,b]=(0,P.useState)(null),w=(0,P.useCallback)(async function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];e?g(!0):y(!0),b(null);try{let t=await fetch("/api/signal-radar".concat(e?"?refresh=1":""),{cache:"no-store"});if(!t.ok)throw Error("HTTP ".concat(t.status));let r=await t.json();d(r)}catch(e){b(e.message||"Failed to load Signal Radar")}finally{y(!1),g(!1)}},[]);(0,P.useEffect)(()=>{w(!1)},[w]),(0,P.useEffect)(()=>{let e=setInterval(()=>w(!1),6e5);return()=>clearInterval(e)},[w]);let x=null==f?void 0:f.radar,O=null==f?void 0:f.marketData,k=null==f?void 0:f.predictionMarkets,j=null==f?void 0:f.news,S=(null==x?void 0:x.marketRead)||"MIXED",_="ESCALATION"===S?{color:"text-rose-400",bg:"bg-rose-500/10",border:"border-rose-500/40"}:"DE-ESCALATION"===S?{color:"text-emerald-400",bg:"bg-emerald-500/10",border:"border-emerald-500/40"}:{color:"text-amber-300",bg:"bg-amber-500/10",border:"border-amber-500/30"},E=O?[{label:"WTI Crude (CL=F)",value:pK(O.wtiChangePct),spot:(null===(e=O.spot)||void 0===e?void 0:e.wti)&&"$".concat(O.spot.wti.toFixed(2)),n:O.wtiChangePct},{label:"Brent Crude (BZ=F)",value:pK(O.brentChangePct),spot:(null===(t=O.spot)||void 0===t?void 0:t.brent)&&"$".concat(O.spot.brent.toFixed(2)),n:O.brentChangePct},{label:"Gold Futures (GC=F)",value:pK(O.goldChangePct),spot:(null===(r=O.spot)||void 0===r?void 0:r.gold)&&"$".concat(O.spot.gold.toFixed(2)),n:O.goldChangePct}
1,{label:"30Y Treasury Yield",value:pG(O.thirtyYearYieldBps),spot:null,n:O.thirtyYearYieldBps},{label:"10Y Treasury Yield",value:pG(O.tenYearYieldBps),spot:null,n:O.tenYearYieldBps},{label:"US Dollar Index (DXY)",value:pK(O.dxyChangePct),spot:(null===(n=O.spot)||void 0===n?void 0:n.dxy)&&O.spot.dxy.toFixed(2),n:O.dxyChangePct},{label:"VIX (Volatility)",value:pK(O.vixChangePct),spot:(null===(i=O.spot)||void 0===i?void 0:i.vix)&&O.spot.vix.toFixed(2),n:O.vixChangePct},{label:"Bitcoin (BTC)",value:pK(O.btcChangePct),spot:null,n:O.btcChangePct},{label:"Ethereum (ETH)",value:pK(O.ethChangePct),spot:null,n:O.ethChangePct}]:[],F=x?[{label:"Crypto / BTC",bias:x.biases.crypto},{label:"Oil",bias:x.biases.oil},{label:"Gold",bias:x.biases.gold},{label:"Long-Dated Bonds",bias:x.biases.bond},{label:"US Equities",bias:x.biases.stock}]:[];return(0,A.jsxs)("div",{className:"min-h-screen bg-[#08080c]",children:[(0,A.jsx)("div",{className:"border-b border-[#1a1a2e] bg-gradient-to-b from-[#0c0c14] to-[#08080c]",children:(0,A.jsx)("div",{className:"max-w-[1400px] mx-auto px-4 sm:px-6 py-6",children:(0,A.jsxs)("div",{className:"flex items-center justify-between gap-4 flex-wrap",children:[(0,A.jsxs)("div",{className:"flex items-center gap-3",children:[(0,A.jsxs)(T.default,{href:"/",className:"flex items-center gap-1 px-3 py-1.5 rounded-lg bg-[#12121a] hover:bg-[#1a1a2e] text-gray-400 hover:text-gray-200 text-xs font-medium transition-colors",children:[(0,A.jsx)(I.Z,{className:"w-3.5 h-3.5"})," Dashboard"]}),(0,A.jsxs)("div",{children:[(0,A.jsxs)("div",{className:"flex items-center gap-2",children:[(0,A.jsx)(R.Z,{className:"w-5 h-5 text-cyan-400"}),(0,A.jsxs)("h1",{className:"text-2xl sm:text-3xl font-bold text-white tracking-tight",children:["Signal ",(0,A.jsx)("span",{className:"text-cyan-400",children:"Radar"})]})]}),(0,A.jsx)("p",{className:"text-xs sm:text-sm text-gray-500 mt-1",children:"Macro flows \xd7 Polymarket \xd7 Kalshi \xd7 News velocity — calibrated dislocation engine"})]})]}),(0,A.jsxs)("button",{onClick:()=>w(!0),disabled:m,className:"px-4 py-2 rounded-lg bg-cyan-600 hover:bg-cyan-500 disabled:opacity-50 text-white text-xs font-bold inline-flex items-center gap-2",children:[(0,A.jsx)(D.Z,{className:"w-3.5 h-3.5 ".concat(m?"animate-spin":"")}),m?"Refreshing…":"Refresh"]})]})})}),(0,A.jsx)("div",{className:"border-b border-amber-500/20 bg-amber-500/5",children:(0,A.jsxs)("div",{className:"max-w-[1400px] mx-auto px-4 sm:px-6 py-2 text-[11px] text-amber-300/90 flex items-center justify-center gap-2 text-center",children:[(0,A.jsx)(L.Z,{className:"w-3.5 h-3.5 flex-shrink-0"}),(0,A.jsx)("span",{children:"Market-implied research signal — informational only. Not a buy/sell recommendation. Mispricings can persist or reverse."})]})}),(0,A.jsxs)("div",{className:"max-w-[1400px] mx-auto px-4 sm:px-6 py-8",children:[p&&(0,A.jsxs)("div",{className:"text-center py-16 text-gray-500 text-sm",children:[(0,A.jsx)(B.Z,{className:"w-6 h-6 inline animate-pulse mr-2"}),"Computing Signal Radar…"]}),v&&(0,A.jsxs)("div",{className:"rounded-lg border border-rose-500/30 bg-rose-500/10 p-4 text-sm text-rose-300 mb-6",children:[(0,A.jsx)($.Z,{className:"w-4 h-4 inline mr-2"})," ",v]}),!p&&x&&(0,A.jsxs)(A.Fragment,{children:[(0,A.jsxs)("section",{className:"grid grid-cols-1 lg:grid-cols-3 gap-4 mb-6",children:[(0,A.jsxs)("div",{className:"rounded-xl border-2 ".concat(pV(x.radarLabel).split(" ").slice(2).join(" ")," ").concat(pV(x.radarLabel).split(" ").slice(1,2).join(" ")," p-5"),children:[(0,A.jsx)("p",{className:"text-[10px] font-bold tracking-[0.2em] text-gray-400 uppercase mb-3",children:"Radar Status"}),(0,A.jsx)("h2",{className:"text-2xl sm:text-3xl font-black ".concat(pV(x.radarLabel).split(" ")[0]),children:x.radarLabel}),(0,A.jsxs)("p",{className:"text-xs text-gray-400 mt-3 leading-snug",children:["HIGH DISLOCATION"===x.radarLabel&&"Macro implied range and prediction-market odds are far apart — strong divergence detected.","MODERATE DISLOCATION"===x.radarLabel&&"Some divergence between macro and prediction-market pricing — worth monitoring.","ALIGNED"===x.radarLabel&&"Macro flows and prediction-market odds are in agreement.","NO SIGNAL"===x.radarLabel&&"Insufficient cross-asset confirmation or no clear regime today."]})]}),(0,A.jsxs)("div",{className:"rounded-xl border border-cyan-500/30 bg-cyan-500/5 p-5",children:[(0,A.jsx)("p",{className:"text-[10px] font-bold tracking-[0.2em] text-cyan-300 uppercase mb-3",children:"Final Edge Score"}),(0,A.jsxs)("div",{className:"flex items-end gap-2",children:[(0,A.jsx)("span",{className:"text-5xl sm:text-6xl font-black text-white",children:x.finalEdgeScore}),(0,A.jsx)("span",{className:"text-gray-500 mb-2 text-sm",children:"/ 100"})]}),(0,A.jsx)("div",{className:"w-full h-2.5 bg-[#1a1a2e] rounded-full mt-5 overflow-hidden",children:(0,A.jsx)("div",{className:"h-full rounded-full transition-all duration-700 ".concat(x.finalEdgeScore>=65?"bg-rose-400":x.finalEdgeScore>
1=50?"bg-orange-400":x.finalEdgeScore>=35?"bg-amber-300":"bg-cyan-400"),style:{width:"".concat(x.finalEdgeScore,"%")}})}),(0,A.jsxs)("div",{className:"mt-3 flex items-center justify-between text-[11px] text-gray-500",children:[(0,A.jsx)("span",{children:"Confidence"}),(0,A.jsxs)("span",{className:"text-gray-300 font-bold",children:[x.confidence,"%"]})]})]}),(0,A.jsxs)("div",{className:"rounded-xl border ".concat(_.border," ").concat(_.bg," p-5"),children:[(0,A.jsx)("p",{className:"text-[10px] font-bold tracking-[0.2em] uppercase mb-3 text-gray-400",children:"Macro Read"}),(0,A.jsx)("h2",{className:"text-2xl sm:text-3xl font-black ".concat(_.color),children:S}),(0,A.jsx)("p",{className:"text-xs text-gray-300 mt-3 leading-relaxed",children:x.synopsis})]})]}),(0,A.jsxs)("section",{className:"grid grid-cols-2 md:grid-cols-4 gap-3 mb-6",children:[(0,A.jsx)(pJ,{icon:U.Z,label:"Macro Stress",score:x.macroStressScore}),(0,A.jsx)(pJ,{icon:B.Z,label:"Liquidity",score:x.liquidityScore}),(0,A.jsx)(pJ,{icon:q.Z,label:"News Velocity",score:x.newsVelocityScore,muted:!j}),(0,A.jsx)(pJ,{icon:z.Z,label:"Dislocation",score:x.dislocationScore})]}),(0,A.jsxs)("section",{className:"rounded-xl border border-cyan-500/20 bg-[#0c0c14] p-5 mb-6",children:[(0,A.jsxs)("h3",{className:"text-sm font-bold text-white mb-1 inline-flex items-center gap-2",children:[(0,A.jsx)(z.Z,{className:"w-4 h-4 text-cyan-400"})," Prediction-Market Dislocation"]}),(0,A.jsx)("p",{className:"text-[11px] text-gray-500 mb-4",children:"Compares the implied probability band derived from macro flows against actual Polymarket + Kalshi pricing on conflict markets."}),(0,A.jsx)("p",{className:"text-sm text-white leading-relaxed mb-4",children:x.predictionMarketAngle}),(0,A.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3 mb-2",children:[(0,A.jsx)(pY,{title:"Escalation Markets",venue:"polymarket",data:null==k?void 0:null===(o=k.escalation)||void 0===o?void 0:o.polymarket}),(0,A.jsx)(pY,{title:"Escalation Markets",venue:"kalshi",data:null==k?void 0:null===(a=k.escalation)||void 0===a?void 0:a.kalshi}),(0,A.jsx)(pY,{title:"Ceasefire Markets",venue:"polymarket",data:null==k?void 0:null===(s=k.ceasefire)||void 0===s?void 0:s.polymarket}),(0,A.jsx)(pY,{title:"Ceasefire Markets",venue:"kalshi",data:null==k?void 0:null===(l=k.ceasefire)||void 0===l?void 0:l.kalshi})]}),(0,A.jsxs)("div",{className:"text-[11px] text-gray-500 mt-3",children:["Macro-implied band: ",(0,A.jsxs)("span",{className:"text-cyan-300 font-mono",children:[x.dislocation.impliedBand.lo,"–",x.dislocation.impliedBand.hi,"%"]}),x.dislocation.gap>0&&(0,A.jsxs)(A.Fragment,{children:[" \xb7 ","Gap: ",(0,A.jsxs)("span",{className:"text-rose-300 font-mono",children:[x.dislocation.gap,"pts"]})," \xb7 ","Direction: ",(0,A.jsx)("span",{className:"text-gray-300 font-mono",children:"UNDER"===x.dislocation.direction?"market under-pricing":"OVER"===x.dislocation.direction?"market over-pricing":"within band"})]})]})]}),(0,A.jsxs)("section",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4 mb-6",children:[(0,A.jsxs)("div",{className:"rounded-xl border border-[#1e1e2e] bg-[#0c0c14] p-5",children:[(0,A.jsxs)("h3",{className:"text-sm font-bold text-white mb-4 inline-flex items-center gap-2",children:[(0,A.jsx)(B.Z,{className:"w-4 h-4 text-cyan-400"})," Macro Market Inputs"]}),(0,A.jsx)("div",{className:"space-y-2",children:E.map(e=>{var t;return(0,A.jsxs)("div",{className:"flex items-center justify-between border-b border-[#1a1a2e] pb-2 last:border-b-0",children:[(0,A.jsxs)("div",{className:"text-xs text-gray-300",children:[e.label,e.spot&&(0,A.jsxs)("span",{className:"text-gray-600 ml-2",children:["(",e.spot,")"]})]}),(0,A.jsx)("div",{className:"text-xs font-mono font-bold ".concat(null==(t=e.n)?"text-gray-500":t>0?"text-emerald-400":t<0?"text-rose-400":"text-gray-400"),children:e.value})]},e.label)})})]}),(0,A.jsxs)("div",{className:"rounded-xl border border-[#1e1e2e] bg-[#0c0c14] p-5",children:[(0,A.jsxs)("h3",{className:"text-sm font-bold text-white mb-1 inline-flex items-center gap-2",children:[(0,A.jsx)(R.Z,{className:"w-4 h-4 text-cyan-400"})," Cross-Asset Bias Matrix"]}),(0,A.jsx)("p",{className:"text-[11px] text-gray-500 mb-4",children:"Descriptive — how flows are positioning each asset. Not a recommendation."}),(0,A.jsx)("div",{className:"space-y-3",children:F.map(e=>{let{label:t,bias:r}
1=e,n="BIAS_UP"===r?{label:"BIAS ▲",cls:"text-emerald-300 border-emerald-500/40 bg-emerald-500/10",icon:N.Z}:"BIAS_DOWN"===r?{label:"BIAS ▼",cls:"text-rose-300 border-rose-500/40 bg-rose-500/10",icon:C.Z}:{label:"NEUTRAL",cls:"text-amber-200 border-amber-500/30 bg-amber-500/10",icon:M.Z},i=n.icon;return(0,A.jsxs)("div",{className:"flex items-center justify-between border-b border-[#1a1a2e] pb-3 last:border-b-0",children:[(0,A.jsx)("div",{className:"text-xs font-semibold text-gray-200",children:t}),(0,A.jsxs)("span",{className:"px-3 py-1 rounded-full border text-[11px] font-bold inline-flex items-center gap-1.5 ".concat(n.cls),children:[(0,A.jsx)(i,{className:"w-3 h-3"})," ",n.label]})]},t)})})]})]}),j&&(0,A.jsxs)("section",{className:"rounded-xl border border-[#1e1e2e] bg-[#0c0c14] p-5 mb-6",children:[(0,A.jsxs)("h3",{className:"text-sm font-bold text-white mb-3 inline-flex items-center gap-2",children:[(0,A.jsx)(q.Z,{className:"w-4 h-4 text-blue-400"})," News Velocity (GDELT)"]}),(0,A.jsxs)("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3 text-xs",children:[(0,A.jsx)(pX,{label:"Velocity Score",value:"".concat(j.score,"/100")}),(0,A.jsx)(pX,{label:"Last 24h Articles",value:null===(c=j.last24hCount)||void 0===c?void 0:c.toLocaleString()}),(0,A.jsx)(pX,{label:"7-day Median",value:null===(u=j.baselineMedian)||void 0===u?void 0:u.toLocaleString()}),(0,A.jsx)(pX,{label:"Ratio vs Baseline",value:"".concat(j.ratio,"\xd7")})]})]}),(0,A.jsx)(pW,{marketData:null==f?void 0:f.marketData}),(0,A.jsxs)("section",{className:"rounded-xl border border-[#1e1e2e] bg-[#0c0c14] p-5",children:[(0,A.jsxs)("h3",{className:"text-sm font-bold text-white mb-3 inline-flex items-center gap-2",children:[(0,A.jsx)(N.Z,{className:"w-4 h-4 text-amber-400"})," Historical Score Trend"]}),(0,A.jsx)("p",{className:"text-[11px] text-gray-500 mb-4",children:"Daily snapshots of every Signal Radar layer. Watch the Final Edge line cross 60 to spot regime shifts before consensus does."}),(0,A.jsx)(pD,{days:30})]}),(0,A.jsxs)("section",{className:"rounded-xl border border-[#1e1e2e] bg-[#0c0c14] p-5",children:[(0,A.jsxs)("h3",{className:"text-sm font-bold text-white mb-4 inline-flex items-center gap-2",children:[(0,A.jsx)(L.Z,{className:"w-4 h-4 text-blue-400"})," How to Read Signal Radar"]}),(0,A.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-3 text-xs text-gray-400",children:[(0,A.jsxs)("div",{className:"rounded-lg bg-[#08080c] p-3 border border-[#1a1a2e]",children:[(0,A.jsx)("strong",{className:"text-rose-300 block mb-1.5",children:"HIGH DISLOCATION"}),"Macro flows imply a probability band well outside what Polymarket/Kalshi are pricing. Worth a closer look at the underlying markets."]}),(0,A.jsxs)("div",{className:"rounded-lg bg-[#08080c] p-3 border border-[#1a1a2e]",children:[(0,A.jsx)("strong",{className:"text-orange-300 block mb-1.5",children:"MODERATE DISLOCATION"}),"Some divergence between macro signal and prediction-market odds, but not extreme. Monitor."]}),(0,A.jsxs)("div",{className:"rounded-lg bg-[#08080c] p-3 border border-[#1a1a2e]",children:[(0,A.jsx)("strong",{className:"text-emerald-300 block mb-1.5",children:"ALIGNED"}),"Macro flows and prediction markets agree. No mispricing detected — markets are reading the situation similarly."]}),(0,A.jsxs)("div",{className:"rounded-lg bg-[#08080c] p-3 border border-[#1a1a2e]",children:[(0,A.jsx)("strong",{className:"text-gray-300 block mb-1.5",children:"NO SIGNAL"}),"Mixed regime or insufficient confirmation. Engine refuses to force a call."]})]})]}),(null==f?void 0:null===(h=f.sources)||void 0===h?void 0:h.length)>0&&(0,A.jsxs)("div",{className:"mt-6 text-[10px] text-gray-600 text-center",children:["Sources: ",f.sources.join(" \xb7 ")]}),(0,A.jsxs)("div",{className:"mt-3 text-center text-[11px] text-gray-600",children:["Engine logic, calibration, and weights are documented at"," ",(0,A.jsx)(T.default,{href:"/methodology",className:"text-blue-400 hover:underline",children:"/methodology"}),"."," ","Not financial advice. Cross-asset signals can be wrong."]})]})]})]})}function pJ(e){let{icon:t,label:r,score:n,muted:i}=e,o=n>=65?"text-rose-300":n>=50?"text-orange-300":n>=35?"text-amber-300":"text-cyan-300";return(0,A.jsxs)("div",{className:"rounded-xl border border-[#1e1e2e] bg-[#0c0c14] p-4 ".concat(i?"opacity-60":""),children:[(0,A.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,A.jsx)(t,{className:"w-3.5 h-3.5 text-gray-500"}),(0,A.jsx)("span",{className:"text-[10px] font-bold tracking-[0.15em] text-gray-500 uppercase",children:r})]}),(0,A.jsx)("div",{className:"text-3xl font-black ".concat(o),children:n}),(0,A.jsx)("div",{className:"w-full h-1 bg-[#1a1a2e] rounded-full mt-2 overflow-hidden",children:(0,A.jsx)("div",{className:"h-full bg-cyan-400/70",style:{width:"".concat(n,"%")}})})]})}function pY(e){var t;let{title:r,venue:n,data:i}=e;return i?(0,A.jsxs)("a",{href:i.url,target:"_blank",rel:"noopener noreferrer",className:"rounded-lg border border-[#1a1a2e] bg-[#08080c] p-3 hover:bg-[#0c0c14] hover:border-cyan-500/30 transition-colors block",children:[(0,A.jsxs)("div",{className:"flex items-center justify-between mb-1",children:[(0,A.jsxs)("div",{className:"text-[10px] uppercase tracking-wider text-gray-500",children:[r," \xb7 ",(0,A.jsx)("span",{className:"text-gray-400",children:n})]}),(0,A.jsx)(F.Z,{className:"w-3 h-3 text-gray-600"})]}),(0,A.jsx)("div",{className:"text-xs text-gray-300 truncate mb-1",children:i.title}),(0,A.jsxs)("div",{className:"flex items-center gap-3",children:[(0,A.jsxs)("div",{className:"text-base font-bold text-white",children:[null===(t=i.yesProb)||void 0===t?void 0:t.toFixed(0),"%"]}),(0,A.jsxs)("div",{className:"text-[10px] text-gray-500",children:["YES \xb7 24h vol $",(i.volume24h||0).toLocaleStr
1ing(void 0,{maximumFractionDigits:0})]})]})]}):(0,A.jsxs)("div",{className:"rounded-lg border border-[#1a1a2e] bg-[#08080c] p-3",children:[(0,A.jsxs)("div",{className:"text-[10px] uppercase tracking-wider text-gray-600 mb-1",children:[r," \xb7 ",n]}),(0,A.jsx)("div",{className:"text-xs text-gray-600",children:"No matching market today."})]})}function pX(e){let{label:t,value:r}=e;return(0,A.jsxs)("div",{className:"rounded-lg bg-[#08080c] p-2.5 border border-[#1a1a2e]",children:[(0,A.jsx)("div",{className:"text-[10px] uppercase tracking-wider text-gray-500",children:t}),(0,A.jsx)("div",{className:"text-sm text-white font-bold mt-0.5 font-mono",children:r||"—"})]})}},30357:function(e,t,r){"use strict";r.d(t,{Z:function(){return g}});var n=r(57437),i=r(2265),o=r(87138),a=r(55430),s=r(55066),l=r(33907),c=r(94207),u=r(88002),h=r(53225),f=r(29162),d=r(23787);function p(e){let{delta:t}=e;return null==t?null:0===t?(0,n.jsxs)("span",{className:"inline-flex items-center gap-1 text-[10px] font-semibold text-gray-400",children:[(0,n.jsx)(u.Z,{className:"w-3 h-3"}),"flat vs yesterday"]}):t>0?(0,n.jsxs)("span",{className:"inline-flex items-center gap-1 text-[10px] font-semibold text-emerald-300",children:[(0,n.jsx)(h.Z,{className:"w-3 h-3"}),"+",t," vs yesterday"]}):(0,n.jsxs)("span",{className:"inline-flex items-center gap-1 text-[10px] font-semibold text-rose-300",children:[(0,n.jsx)(f.Z,{className:"w-3 h-3"}),t," vs yesterday"]})}function y(e){let{compact:t=!1}=e,[r,o]=(0,i.useState)(null),[a,s]=(0,i.useState)(!0),[l,u]=(0,i.useState)(!1);if((0,i.useEffect)(()=>{let e=!1;async function t(){try{let t=await fetch("/api/index",{cache:"no-store"});if(!t.ok)throw Error("HTTP ".concat(t.status));let r=await t.json();e||(o(r),s(!1))}catch(t){e||(u(!0),s(!1))}}t();let r=setInterval(t,3e5);return()=>{e=!0,clearInterval(r)}},[]),a)return(0,n.jsxs)("div",{className:"inline-flex items-center gap-2 rounded-xl border border-[#1e1e2e] bg-[#0a0a14] px-3 py-2 animate-pulse",children:[(0,n.jsx)("div",{className:"w-2 h-2 rounded-full bg-orange-400/60"}),(0,n.jsx)("span",{className:"text-[10px] font-black tracking-[0.22em] uppercase text-gray-500",children:"PolySharks Index"}),(0,n.jsx)("span",{className:"text-2xl font-black text-gray-600 tabular-nums",children:"\xb7\xb7"})]});if(l||!r||r.degraded||null==r.index)return(0,n.jsxs)("div",{className:"inline-flex items-center gap-2 rounded-xl border border-[#1e1e2e] bg-[#0a0a14] px-3 py-2",children:[(0,n.jsx)("span",{className:"text-[10px] font-black tracking-[0.22em] uppercase text-gray-500",children:"PolySharks Index"}),(0,n.jsx)("span",{className:"text-sm font-bold text-gray-500",children:"Computing…"})]});let{index:h,delta24h:f,band:y,sampleSize:m,dominantSide:g,dominantMarket:v,breadth:b}=r,w=function(e){switch(e){case"extreme":return{ring:"ring-rose-500/40",text:"text-rose-300",glow:"shadow-[0_0_40px_-15px_rgba(244,63,94,0.6)]"};case"high":return{ring:"ring-orange-500/50",text:"text-orange-300",glow:"shadow-[0_0_40px_-15px_rgba(249,115,22,0.7)]"};case"moderate":return{ring:"ring-amber-500/40",text:"text-amber-300",glow:"shadow-[0_0_40px_-15px_rgba(245,158,11,0.5)]"};case"low":return{ring:"ring-slate-500/40",text:"text-slate-300",glow:""};case"flat":return{ring:"ring-gray-500/30",text:"text-gray-400",glow:""};default:return{ring:"ring-gray-500/20",text:"text-gray-400",glow:""}}}(null==y?void 0:y.key),x=(null==v?void 0:v.market_question)||"",O=x.length>70?x.slice(0,70)+"…":x;return t?(0,n.jsxs)("div",{className:"inline-flex items-center gap-2.5 rounded-xl border border-[#1e1e2e] ".concat(w.ring," ring-1 bg-[#0a0a14] px-3 py-1.5 ").concat(w.glow),title:r.headline,children:[(0,n.jsx)("span",{className:"text-[9px] font-black tracking-[0.22em] uppercase text-gray-400",children:"Index"}),(0,n.jsx)("span",{className:"text-xl font-black ".concat(w.text," tabular-nums leading-none"),children:h}),(0,n.jsx)(p,{delta:f})]}):(0,n.jsxs)("div",{className:"relative rounded-2xl border border-[#1e1e2e] ".concat(w.ring," ring-1 bg-[#0a0a14] p-3 sm:p-4 ").concat(w.glow," max-w-2xl"),"aria-label":"PolySharks Index",children:[(0,n.jsxs)("div",{className:"flex items-center gap-3 flex-wrap",children:[(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)("span",{className:"inline-flex w-2 h-2 rounded-full bg-orange-400 animate-pulse"}),(0,n.jsx)("span",{className:"text-[10px] font-black tracking-[0.22em] uppercase text-orange-300",children:"PolySharks Index"})]}),(0,n.jsxs)("div",{className:"flex items-baseline gap-3",children:[(0,n.jsx)("span",{className:"text-4xl sm:text-5xl font-black ".concat(w.text," tabular-nums leading-none"),children:h}),(0,n.jsx)("span",{className:"text-[11px] font-semibold ".concat(w.text),children:"/ 100"})]}),(0,n.jsxs)("div",{className:"flex items-center gap-3 ml-auto",children:[(0,n.jsx)(p,{delta:f}),(0,n.jsxs)("span",{className:"hidden sm:inline-flex items-center gap-1 text-[10px] text-gray-500",children:[(0,n.jsx)(c.Z,{className:"w-3 h-3 text-emerald-400"}
1),m," whales \xb7 ",b," clusters"]})]})]}),(0,n.jsxs)("p",{className:"text-[12px] sm:text-[13px] text-gray-300 mt-2 leading-snug",children:[(0,n.jsx)("span",{className:"font-bold ".concat(w.text),children:(null==y?void 0:y.label)||"Concentration"}),(0,n.jsx)("span",{className:"text-gray-500",children:" \xb7 "}),(0,n.jsx)("span",{className:"tabular-nums text-white font-semibold",children:(null==v?void 0:v.whale_count)||0})," ","of the top ",m," traders inspected aligned on"," ",(0,n.jsx)("span",{className:"text-white font-semibold",children:g})," ","for"," ",(0,n.jsxs)("span",{className:"text-white",children:["“",O,"”"]}),"."]}),(0,n.jsxs)("div",{className:"mt-2 flex items-center gap-3 flex-wrap text-[10px] text-gray-500",children:[(null==v?void 0:v.event_url)&&(0,n.jsxs)("a",{href:v.event_url,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-gray-400 hover:text-orange-300",children:["View market on Polymarket ",(0,n.jsx)(d.Z,{className:"w-3 h-3"})]}),(0,n.jsx)("span",{children:"Updated continuously \xb7 Informational only"})]})]})}function m(){return(0,n.jsxs)("ol",{className:"flex flex-wrap items-center justify-center gap-x-3 gap-y-2 mt-5 text-[11px] sm:text-[12px] text-gray-300","aria-label":"How PolySharks works in 3 steps",children:[(0,n.jsxs)("li",{className:"inline-flex items-center gap-1.5 rounded-full border border-[#22222e] bg-[#0a0a14] px-3 py-1.5",children:[(0,n.jsx)("span",{className:"inline-flex w-4 h-4 items-center justify-center rounded-full bg-orange-500/20 text-orange-300 text-[10px] font-black",children:"1"}),(0,n.jsxs)("span",{children:[(0,n.jsx)("span",{"aria-hidden":"true",children:"\uD83E\uDD88"})," A top-ranked trader takes a position on Polymarket"]})]}),(0,n.jsx)("span",{className:"text-gray-700",children:"→"}),(0,n.jsxs)("li",{className:"inline-flex items-center gap-1.5 rounded-full border border-[#22222e] bg-[#0a0a14] px-3 py-1.5",children:[(0,n.jsx)("span",{className:"inline-flex w-4 h-4 items-center justify-center rounded-full bg-orange-500/20 text-orange-300 text-[10px] font-black",children:"2"}),(0,n.jsxs)("span",{children:[(0,n.jsx)(a.Z,{className:"w-3 h-3 inline -mt-0.5 text-orange-300"})," We surface it with full context in < 60s"]})]}),(0,n.jsx)("span",{className:"text-gray-700",children:"→"}),(0,n.jsxs)("li",{className:"inline-flex items-center gap-1.5 rounded-full border border-[#22222e] bg-[#0a0a14] px-3 py-1.5",children:[(0,n.jsx)("span",{className:"inline-flex w-4 h-4 items-center justify-center rounded-full bg-orange-500/20 text-orange-300 text-[10px] font-black",children:"3"}),(0,n.jsx)("span",{children:"You research the same market on Polymarket"})]})]})}function g(e){let{variant:t="homepage"}=e,[r,a]=(0,i.useState)(null);(0,i.useEffect)(()=>{let e=!1;return async function(){try{if("crypto"===t){let t=await fetch("/api/leaderboard?period=ALL&category=CRYPTO&limit=10",{cache:"no-store"});if(!t.ok)return;let r=await t.json(),n=[];for(let e of r.traders||[])for(let t of e.recent_bets||[]){let e=t.timestamp?new Date(t.timestamp).getTime():0;if(e&&Date.now()-e>6048e5)continue;let r=Number(t.size)||Number(t.notional)||0;r&&t.market_question&&n.push({size:r,question:t.market_question,outcome:t.outcome||t.side})}n.sort((e,t)=>t.size-e.size),!e&&n[0]&&a({size_usd:n[0].size,market_question:n[0].question,outcome:n[0].outcome})}else{let t=await fetch("/api/tailable-whales?window=60",{cache:"no-store"});if(!t.ok)return;let r=await t.json(),n=(Array.isArray(null==r?void 0:r.rows)?r.rows:[]).slice().sort((e,t)=>(Number(t.size_usd)||0)-(Number(e.size_usd)||0))[0];!e&&n&&a({size_usd:n.size_usd,market_question:n.market_question,outcome:n.outcome||n.side,polymarket_url:n.polymarket_url})}}catch(e){}}(),()=>{e=!0}},[t]);let u=!!((null==r?void 0:r.size_usd)&&(null==r?void 0:r.market_question));return(0,n.jsxs)("section",{className:"relative border-b border-[#1a1a26] bg-gradient-to-b from-[#0a0a14] via-[#08080c] to-[#06060a] overflow-hidden",children:[(0,n.jsx)("div",{"aria-hidden":"true",className:"absolute inset-0 opacity-[0.04] pointer-events-none",style:{backgroundImage:"linear-gradient(rgba(255,255,255,0.6) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.6) 1px, transparent 1px)",backgroundSize:"40px 40px"}}),(0,n.jsxs)("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 py-7 sm:py-10 relative",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between gap-3 mb-3 flex-wrap",children:[(0,n.jsxs)("div",{className:"inline-flex items-center gap-2",children:[(0,n.jsx)("span",{className:"inline-flex w-2 h-2 rounded-full bg-orange-400 animate-pulse"}),(0,n.jsx)("span",{className:"text-[10px] sm:text-[11px] font-black tracking-[0.22em] text-orange-300 uppercase",children:"crypto"===t?"Live \xb7 Crypto whale feed":"Live \xb7 Whale feed"})]}),(0,n.jsx)(y,{compact:!0})]}),(0,n.jsx)("h1",{className:"font-display text-[24px] sm:text-[32px] md:text-[40px] leading-[1.1] tracking-tight text-white max-w-4xl",children:u?(0,n.jsxs)(n.Fragment,{children:["A top-ranked trader just placed"," ",(0,n.jsx)("span",{className:"text-orange-300 font-extrabold tabular-nums",children:function(e){let t=Number(e)||0;return t>=1e6?"$".concat((t/1e6).toFixed(1),"M"):t>=1e3?"$".concat((t/1e3).toFixed(0),"K"):"$".concat(Math.round(t))}(r.size_usd)})," ","on"," ",(0,n.jsxs)("span",{className:"text-white font-bold",children:["“",r.market_question.length>70?r.market_question.slice(0,70)+"…":r.market_question,"”"]}
1),"."]}):(0,n.jsxs)(n.Fragment,{children:["See what top-ranked Polymarket traders are"," ",(0,n.jsx)("span",{className:"text-orange-300 font-extrabold",children:"researching"})," ","right now."]})}),(0,n.jsx)("p",{className:"text-[14px] sm:text-[16px] text-gray-400 mt-3 max-w-3xl",children:"crypto"===t?"PolySharks ranks the top-winning Polymarket traders on crypto markets by their actual recent win rate — wins divided by losses on settled positions. We surface their current open positions so you can research the same markets on Polymarket yourself. 100% public on-chain data. Informational only — not financial advice.":"PolySharks ranks the top-winning Polymarket traders by their actual recent win rate — wins divided by losses on settled positions. We surface their current open positions so you can research the same markets on Polymarket yourself. 100% public on-chain data. Informational only — not financial advice."}),(0,n.jsx)(m,{}),(0,n.jsxs)("div",{className:"mt-6 flex flex-wrap items-center gap-3",children:[(0,n.jsxs)("button",{type:"button",onClick:()=>{let e=document.getElementById("crypto"===t?"crypto-feed":"tailable-feed");e&&e.scrollIntoView({behavior:"smooth",block:"start"})},className:"inline-flex items-center gap-2 rounded-xl bg-orange-500 hover:bg-orange-400 text-black font-extrabold text-[14px] sm:text-[15px] px-5 py-3 shadow-[0_0_40px_-10px_rgba(249,115,22,0.6)] transition-colors",children:["See live picks ",(0,n.jsx)(s.Z,{className:"w-4 h-4"})]}),(0,n.jsxs)(o.default,{href:"/how-it-works",className:"inline-flex items-center gap-1.5 text-[12px] sm:text-[13px] text-gray-400 hover:text-white px-3 py-2 rounded-lg hover:bg-white/5 transition-colors",children:[(0,n.jsx)(l.Z,{className:"w-3.5 h-3.5"}),"How it works"]}),(0,n.jsxs)("span",{className:"text-[11px] text-gray-600 ml-auto sm:ml-2 inline-flex items-center gap-1",children:[(0,n.jsx)(c.Z,{className:"w-3 h-3 text-emerald-400"}),"Updated continuously \xb7 Free tier available"]})]})]})]})}},75797:function(e,t,r){"use strict";r.d(t,{default:function(){return c}});var n=r(57437),i=r(2265),o=r(4086),a=r(3274),s=r(13231),l=r(80102);function c(e){let{variant:t="default",source:r="inline",title:c="Get the Sunday Whale Report",subtitle:u="Top whale moves of the week. Free. Unsubscribe in 1 click.",cta:h="Get the Report",className:f=""}=e,[d,p]=(0,i.useState)(""),[y,m]=(0,i.useState)(""),[g,v]=(0,i.useState)("idle"),[b,w]=(0,i.useState)("");async function x(e){if(e.preventDefault(),"loading"!==g){v("loading"),w("");try{let e=await fetch("/api/email/subscribe",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:d.trim(),source:r,[l.j]:y})}),t=await e.json().catch(()=>({}));if(!e.ok||!1===t.ok){v("error"),w(t.error||"Something went wrong. Try again.");return}v("done"),w(t.already_subscribed?"You're already on the list — see you Sunday.":"Check your inbox — confirmation on its way.")}catch(e){v("error"),w("Network error. Try again.")}}}return"compact"===t?(0,n.jsxs)("form",{onSubmit:x,className:"flex items-center gap-2 ".concat(f),children:[(0,n.jsx)(l.Z,{value:y,onChange:m}),(0,n.jsxs)("div",{className:"relative flex-1",children:[(0,n.jsx)(o.Z,{className:"w-3.5 h-3.5 text-gray-500 absolute left-3 top-1/2 -translate-y-1/2"}),(0,n.jsx)("input",{type:"email",required:!0,value:d,disabled:"loading"===g||"done"===g,onChange:e=>p(e.target.value),placeholder:"[email protected]",className:"w-full pl-8 pr-2 py-1.5 rounded-md bg-[#0a0a14] border border-[#2a2a3e] text-xs text-white placeholder:text-gray-600 focus:outline-none focus:border-emerald-500/60","aria-label":"Email address"})]}),(0,n.jsxs)("button",{type:"submit",disabled:"loading"===g||"done"===g,className:"px-3 py-1.5 rounded-md bg-emerald-500 hover:bg-emerald-400 text-black text-xs font-bold disabled:opacity-50 inline-flex items-center gap-1.5",children:["loading"===g&&(0,n.jsx)(a.Z,{className:"w-3 h-3 animate-spin"}),"done"===g&&(0,n.jsx)(s.Z,{className:"w-3 h-3"}),"idle"===g||"error"===g?h:"done"===g?"Subscribed":"Sending"]}),b&&"idle"!==g&&(0,n.jsx)("span",{className:"text-[10px] ".concat("error"===g?"text-red-400":"text-emerald-400"),children:b})]}):(0,n.jsxs)("div",{className:"rounded-2xl border border-emerald-500/30 bg-gradient-to-br from-emerald-500/10 via-trans
1parent to-blue-500/10 p-6 md:p-8 ".concat(f),children:[(0,n.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,n.jsx)(o.Z,{className:"w-4 h-4 text-emerald-400"}),(0,n.jsx)("span",{className:"text-[10px] font-bold tracking-[0.2em] text-emerald-400 uppercase",children:"Free Weekly Email"})]}),(0,n.jsx)("h3",{className:"font-display text-2xl md:text-3xl text-white mb-2 leading-tight",children:c}),(0,n.jsx)("p",{className:"text-sm text-gray-400 mb-5 max-w-xl",children:u}),(0,n.jsxs)("form",{onSubmit:x,className:"flex flex-col sm:flex-row gap-2 max-w-xl",children:[(0,n.jsx)(l.Z,{value:y,onChange:m}),(0,n.jsx)("input",{type:"email",required:!0,value:d,disabled:"loading"===g||"done"===g,onChange:e=>p(e.target.value),placeholder:"[email protected]",className:"flex-1 px-4 py-3 rounded-lg bg-[#0a0a14] border border-[#2a2a3e] text-sm text-white placeholder:text-gray-600 focus:outline-none focus:border-emerald-500/60","aria-label":"Email address"}),(0,n.jsxs)("button",{type:"submit",disabled:"loading"===g||"done"===g,className:"px-6 py-3 rounded-lg bg-emerald-500 hover:bg-emerald-400 text-black text-sm font-bold disabled:opacity-50 inline-flex items-center justify-center gap-2 whitespace-nowrap",children:["loading"===g&&(0,n.jsx)(a.Z,{className:"w-4 h-4 animate-spin"}),"done"===g&&(0,n.jsx)(s.Z,{className:"w-4 h-4"}),"idle"===g||"error"===g?h:"done"===g?"Subscribed":"Sending"]})]}),b&&"idle"!==g&&(0,n.jsx)("div",{className:"mt-3 text-xs ".concat("error"===g?"text-red-400":"text-emerald-400"),children:b}),(0,n.jsx)("p",{className:"text-[10px] text-gray-600 mt-4",children:"We email once a week, Sunday morning. Unsubscribe instantly. We never sell your address. Information only — not financial advice."})]})}},80102:function(e,t,r){"use strict";r.d(t,{Z:function(){return o},j:function(){return i}});var n=r(57437);let i="company_website";function o(e){let{value:t="",onChange:r}=e;return(0,n.jsxs)("div",{"aria-hidden":"true",style:{position:"absolute",left:"-10000px",top:"auto",width:"1px",height:"1px",overflow:"hidden",opacity:0,pointerEvents:"none"},children:[(0,n.jsx)("label",{htmlFor:i,children:"Company website (leave this blank)"}),(0,n.jsx)("input",{id:i,name:i,type:"text",autoComplete:"off",tabIndex:-1,value:t,onChange:e=>null==r?void 0:r(e.target.value)})]})}},28674:function(e,t,r){"use strict";r.d(t,{default:function(){return g}});var n=r(57437),i=r(2265),o=r(87138),a=r(84080),s=r.n(a),l=r(13231),c=r(23787),u=r(78030);let h=(0,u.Z)("heart",[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]]),f=(0,u.Z)("repeat-2",[["path",{d:"m2 9 3-3 3 3",key:"1ltn5i"}],["path",{d:"M13 18H7a2 2 0 0 1-2-2V6",key:"1r6tfw"}],["path",{d:"m22 15-3 3-3-3",key:"4rnwn2"}],["path",{d:"M11 6h6a2 2 0 0 1 2 2v10",key:"2f72bc"}]]),d=(0,u.Z)("message-circle",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]]),p="PolySharksAI";function y(e){let{text:t}=e;if(!t)return null;let r=t.split(/(https?:\/\/\S+|@\w+|#\w+)/g);return(0,n.jsx)("p",{className:"text-sm text-gray-200 leading-relaxed whitespace-pre-wrap",children:r.map((e,t)=>/^https?:\/\//.test(e)?(0,n.jsx)("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:"text-blue-400 hover:text-blue-300 underline",children:e.length>40?e.slice(0,40)+"…":e},t):/^@\w+/.test(e)?(0,n.jsx)("a",{href:"https://x.com/".concat(e.slice(1)),target:"_blank",rel:"noopener noreferrer",className:"text-blue-400 hover:text-blue-300",children:e},t):/^#\w+/.test(e)?(0,n.jsx)("a",{href:"https://x.com/hashtag/".concat(e.slice(1)),target:"_blank",rel:"noopener noreferrer",className:"text-blue-400 hover:text-blue-300",children:e},t):(0,n.jsx)(i.Fragment,{children:e},t))})}function m(){let e=(0,i.useRef)(null);return(0,i.useEffect)(()=>{if(window.twttr&&window.twttr.widgets)try{window.twttr.widgets.load(e.current)}catch(e){}},[]),(0,n.jsxs)("div",{ref:e,className:"rounded-2xl border border-[#1a1a2e] bg-[#0c0c14] overflow-hidden",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between gap-3 px-5 py-4 border-b border-[#1a1a2e] bg-gradient-to-r from-blue-500/5 to-cyan-500/5",children:[(0,n.jsxs)("div",{className:"flex items-center gap-3 min-w-0",children:[(0,n.jsx)("div",{className:"w-10 h-10 rounded-full bg-gradient-to-br from-blue-500 to-cyan-500 flex items-center justify-center flex-shrink-0",children:(0,n.jsx)("span",{className:"text-white font-bold text-sm",children:"PS"})}),(0,n.jsxs)("div",{className:"min-w-0",children:[(0,n.jsxs)("div",{className:"flex items-center gap-1 text-white font-bold text-sm truncate",children:["PolySharks ",(0,n.jsx)(l.Z,{className:"w-4 h-4 text-blue-400 flex-shrink-0"})]}),(0,n.jsxs)("div",{className:"text-xs text-gray-500 truncate",children:["@",p]})]})]}),(0,n.jsx)(o.default,{href:"https://x.com/".concat(p),target:"_blank",rel:"noopener noreferrer",className:"px-3 py-1.5 rounded-full bg-white text-black text-xs font-semibold hover:bg-gray-200 transition-colors flex-shrink-0",children:"Follow"})]}),(0,n.jsxs)("div",{className:"p-2",children:[(0,n.jsxs)("a",{className:"twitter-timeline","data-theme":"dark","data-chrome":"noheader nofooter noborders transparent","data-tweet-limit":"4","data-height":"500",href:"https://twitter.com/".concat(p,"?ref_src=twsrc%5Etfw"),children:["Loading tweets from @",p,"…"]}),(0,n.jsx)(s(),{src:"https://platform.twitter.com/widgets.js",strategy:"lazyOnload",async:!0})]}),(0,n.jsx)("div",{className:"px-5 py-3 text-center border-t border-[#1a1a2e] bg-[#080810
1]",children:(0,n.jsxs)(o.default,{href:"https://x.com/".concat(p),target:"_blank",rel:"noopener noreferrer",className:"text-xs text-gray-400 hover:text-blue-400 inline-flex items-center gap-1",children:["See more on X ",(0,n.jsx)(c.Z,{className:"w-3 h-3"})]})})]})}function g(e){let{max:t=5,compact:r=!1}=e,[a,s]=(0,i.useState)({loading:!0,ok:!1,tweets:[],user:null,reason:null});if((0,i.useEffect)(()=>{let e=!1;async function t(){try{let t=await fetch("/api/tweets/recent",{cache:"no-store"}),r=await t.json();e||s({loading:!1,ok:!!r.ok,tweets:Array.isArray(r.tweets)?r.tweets:[],user:r.user||null,reason:r.reason||null})}catch(t){e||s({loading:!1,ok:!1,tweets:[],user:null,reason:"network"})}}t();let r=setInterval(t,3e5);return()=>{e=!0,clearInterval(r)}},[]),a.loading)return(0,n.jsxs)("div",{className:"rounded-2xl border border-[#1a1a2e] bg-[#0c0c14] p-6 animate-pulse",children:[(0,n.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,n.jsx)("div",{className:"w-10 h-10 rounded-full bg-[#1a1a2e]"}),(0,n.jsxs)("div",{className:"flex-1 space-y-2",children:[(0,n.jsx)("div",{className:"h-3 w-24 bg-[#1a1a2e] rounded"}),(0,n.jsx)("div",{className:"h-2 w-16 bg-[#1a1a2e] rounded"})]})]}),(0,n.jsxs)("div",{className:"space-y-3",children:[(0,n.jsx)("div",{className:"h-3 bg-[#1a1a2e] rounded w-full"}),(0,n.jsx)("div",{className:"h-3 bg-[#1a1a2e] rounded w-5/6"}),(0,n.jsx)("div",{className:"h-3 bg-[#1a1a2e] rounded w-3/4"})]})]});if(!a.ok&&"no_token"===a.reason)return null;if(a.ok&&a.tweets.length>0){let e=a.tweets.slice(0,t),i=a.user;return(0,n.jsxs)("div",{className:"rounded-2xl border border-[#1a1a2e] bg-[#0c0c14] overflow-hidden",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between gap-3 px-5 py-4 border-b border-[#1a1a2e] bg-gradient-to-r from-blue-500/5 to-cyan-500/5",children:[(0,n.jsxs)("div",{className:"flex items-center gap-3 min-w-0",children:[(null==i?void 0:i.profile_image_url)?(0,n.jsx)("img",{src:i.profile_image_url,alt:i.name||p,className:"w-10 h-10 rounded-full flex-shrink-0"}):(0,n.jsx)("div",{className:"w-10 h-10 rounded-full bg-gradient-to-br from-blue-500 to-cyan-500 flex-shrink-0"}),(0,n.jsxs)("div",{className:"min-w-0",children:[(0,n.jsxs)("div",{className:"flex items-center gap-1 text-white font-bold text-sm truncate",children:[(null==i?void 0:i.name)||"PolySharks",(null==i?void 0:i.verified)&&(0,n.jsx)(l.Z,{className:"w-4 h-4 text-blue-400 flex-shrink-0"})]}),(0,n.jsxs)("div",{className:"text-xs text-gray-500 truncate",children:["@",(null==i?void 0:i.username)||p,(null==i?void 0:i.followers)!=null&&(0,n.jsxs)("span",{className:"ml-2 text-gray-600",children:["\xb7 ",i.followers.toLocaleString()," followers"]})]})]})]}),(0,n.jsx)(o.default,{href:"https://x.com/".concat(p),target:"_blank",rel:"noopener noreferrer",className:"px-3 py-1.5 rounded-full bg-white text-black text-xs font-semibold hover:bg-gray-200 transition-colors flex-shrink-0",children:"Follow"})]}),(0,n.jsx)("div",{className:"divide-y divide-[#1a1a2e]",children:e.map(e=>(0,n.jsxs)("div",{className:"block px-5 py-4 hover:bg-[#111118] transition-colors",children:[(0,n.jsx)(y,{text:e.text}),(0,n.jsxs)("div",{className:"flex items-center justify-between mt-3 text-xs text-gray-500",children:[(0,n.jsxs)("div",{className:"flex items-center gap-4",children:[(0,n.jsx)("span",{children:function(e){if(!e)return"";let t=Math.floor((Date.now()-new Date(e).getTime())/1e3);return t<60?"".concat(t,"s"):t<3600?"".concat(Math.floor(t/60),"m"):t<86400?"".concat(Math.floor(t/3600),"h"):t<604800?"".concat(Math.floor(t/86400),"d"):new Date(e).toLocaleDateString()}(e.created_at)}),(0,n.jsxs)("span",{className:"flex items-center gap-1",children:[(0,n.jsx)(h,{className:"w-3 h-3"}),e.metrics.likes]}),(0,n.jsxs)("span",{className:"flex items-center gap-1",children:[(0,n.jsx)(f,{className:"w-3 h-3"}),e.metrics.retweets]}),(0,n.jsxs)("span",{className:"flex items-center gap-1",children:[(0,n.jsx)(d,{className:"w-3 h-3"}),e.metrics.replies]})]}),(0,n.jsxs)("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",className:"text-gray-500 hover:text-blue-400 inline-flex items-center gap-1","aria-label":"Open this tweet on X",children:["View on X ",(0,n.jsx)(c.Z,{className:"w-3 h-3"})]})]})]},e.id))}),!r&&(0,n.jsx)("div",{className:"px-5 py-3 text-center border-t border-[#1a1a2e] bg-[#080810
1]",children:(0,n.jsxs)(o.default,{href:"https://x.com/".concat(p),target:"_blank",rel:"noopener noreferrer",className:"text-xs text-gray-400 hover:text-blue-400 inline-flex items-center gap-1",children:["See more on X ",(0,n.jsx)(c.Z,{className:"w-3 h-3"})]})})]})}return(0,n.jsx)(m,{})}},55602:function(e,t,r){"use strict";r.d(t,{Z:function(){return a}});var n=r(57437),i=r(2265);let o=[{description:"BTC",proName:"COINBASE:BTCUSD"},{description:"ETH",proName:"COINBASE:ETHUSD"},{description:"SOL",proName:"COINBASE:SOLUSD"},{description:"S&P 500",proName:"FOREXCOM:SPXUSD"},{description:"NASDAQ",proName:"FOREXCOM:NSXUSD"},{description:"Gold",proName:"TVC:GOLD"},{description:"Oil (WTI)",proName:"TVC:USOIL"},{description:"DXY",proName:"TVC:DXY"},{description:"VIX",proName:"TVC:VIX"},{description:"10Y",proName:"TVC:US10Y"}];function a(e){let{symbols:t=o,height:r=46}=e,a=(0,i.useRef)(null),s=(0,i.useRef)(!1);return(0,i.useEffect)(()=>{if(s.current||!a.current)return;s.current=!0;let e=document.createElement("script");e.src="https://s3.tradingview.com/external-embedding/embed-widget-ticker-tape.js",e.async=!0,e.type="text/javascript",e.innerHTML=JSON.stringify({symbols:t,showSymbolLogo:!0,isTransparent:!0,displayMode:"adaptive",colorTheme:"dark",locale:"en"}),a.current.appendChild(e)},[t]),(0,n.jsx)("div",{ref:a,className:"tradingview-widget-container w-full bg-[#08080c] border-b border-[#1a1a26]",style:{height:r},children:(0,n.jsx)("div",{className:"tradingview-widget-container__widget"})})}},46886:function(e,t,r){"use strict";r.d(t,{H:function(){return l},a:function(){return s}});var n=r(57437),i=r(2265),o=r(91233);let a=(0,i.createContext)({}),s=()=>{let e=(0,i.useContext)(a);if(!e)throw Error("useAuth must be used within AuthProvider");return e},l=e=>{let{children:t}=e,[r,s]=(0,i.useState)(null),[l,c]=(0,i.useState)(null),[u,h]=(0,i.useState)(!0);(0,i.useEffect)(()=>{o.supabase.auth.getSession().then(e=>{var t;let{data:{session:r}}=e;s(null!==(t=null==r?void 0:r.user)&&void 0!==t?t:null),(null==r?void 0:r.user)?f(r.user.id):h(!1)});let{data:{subscription:e}}=o.supabase.auth.onAuthStateChange((e,t)=>{var r;s(null!==(r=null==t?void 0:t.user)&&void 0!==r?r:null),(null==t?void 0:t.user)?f(t.user.id):(c(null),h(!1))});return()=>e.unsubscribe()},[]);let f=async e=>{try{let{data:t,error:r}=await o.supabase.from("user_subscriptions").select("*").eq("user_id",e).maybeSingle();t?c({id:e,email:t.email,subscription_tier:t.subscription_tier||"free",subscription_status:t.subscription_status||"free",trial_ends_at:t.trial_end_date,stripe_customer_id:t.stripe_customer_id,stripe_subscription_id:t.stripe_subscription_id}):c({id:e,subscription_tier:"free",subscription_status:"free"})}catch(t){console.error("Error fetching profile:",t),c({id:e,subscription_tier:"free",subscription_status:"free"})}finally{h(!1)}},d=async(e,t,r)=>{try{let n="".concat(window.location.origin,"/auth/callback"),{data:i,error:a}=await o.supabase.auth.signUp({email:e,password:t,options:{emailRedirectTo:n,data:{full_name:r}}});if(a)throw a;if(i.user){let e=new Date;e.setDate(e.getDate()+3),await o.supabase.from("user_subscriptions").upsert({user_id:i.user.id,email:i.user.email,subscription_tier:"free",subscription_status:"trial",trial_start_date:new Date().toISOString(),trial_end_date:e.toISOString()},{onConflict:"user_id"})}return{data:i,error:null}}catch(e){return{data:null,error:e}}},p=async(e,t)=>{try{let{data:r,error:n}=await o.supabase.auth.signInWithPassword({email:e,password:t});if(n)throw n;return{data:r,error:null}}catch(e){return{data:null,error:e}}},y=async()=>{await o.supabase.auth.signOut()},m=!!((null==r?void 0:r.email)&&["[email protected]"].includes(String(r.email).trim().toLowerCase()));return(0,n.jsx)(a.Provider,{value:{user:r,profile:l,loading:u,signUp:d,signIn:p,signOut:y,hasProAccess:()=>{if(m)return!0;if(!l)return!1;if("pro"===l.subscription_tier&&"active"===l.subscription_status)return!0;if("trial"===l.subscription_status&&l.trial_ends_at){let e=new Date(l.trial_ends_at);return new Date<e}return!1},isFounder:m,refreshProfile:()=>r&&f(r.id)},children:t})}},91233:function(e,t,r){"use strict";let n;function i(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)0>t.indexOf(n[i])&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}r.d(t,{supabase:function(){return rQ}}),"function"==typeof SuppressedError&&SuppressedError;let o=e=>e?(...t)=>e(...t):(...e)=>fetch(...e);
1class a extends Error{constructor(e,t="FunctionsError",r){super(e),this.name=t,this.context=r}toJSON(){return{name:this.name,message:this.message,context:this.context}}}class s extends a{constructor(e){super("Failed to send a request to the Edge Function","FunctionsFetchError",e)}}class l extends a{constructor(e){super("Relay Error invoking the Edge Function","FunctionsRelayError",e)}}class c extends a{constructor(e){super("Edge Function returned a non-2xx status code","FunctionsHttpError",e)}}(w=p||(p={})).Any="any",w.ApNortheast1="ap-northeast-1",w.ApNortheast2="ap-northeast-2",w.ApSouth1="ap-south-1",w.ApSoutheast1="ap-southeast-1",w.ApSoutheast2="ap-southeast-2",w.CaCentral1="ca-central-1",w.EuCentral1="eu-central-1",w.EuWest1="eu-west-1",w.EuWest2="eu-west-2",w.EuWest3="eu-west-3",w.SaEast1="sa-east-1",w.UsEast1="us-east-1",w.UsWest1="us-west-1",w.UsWest2="us-west-2";class u{constructor(e,{headers:t={},customFetch:r,region:n=p.Any}={}){this.url=e,this.headers=t,this.region=n,this.fetch=o(r)}setAuth(e){this.headers.Authorization=`Bearer ${e}`}invoke(e){var t,r,n,i;return t=this,r=arguments,n=void 0,i=function*(e,t={}){var r;let n,i;try{let o;let{headers:a,method:u,body:h,signal:f,timeout:d}=t,p={},{region:y}=t;y||(y=this.region);let m=new URL(`${this.url}/${e}`);y&&"any"!==y&&(p["x-region"]=y,m.searchParams.set("forceFunctionRegion",y)),h&&(a&&!Object.prototype.hasOwnProperty.call(a,"Content-Type")||!a)?"undefined"!=typeof Blob&&h instanceof Blob||h instanceof ArrayBuffer?(p["Content-Type"]="application/octet-stream",o=h):"string"==typeof h?(p["Content-Type"]="text/plain",o=h):"undefined"!=typeof FormData&&h instanceof FormData?o=h:(p["Content-Type"]="application/json",o=JSON.stringify(h)):!h||"string"==typeof h||"undefined"!=typeof Blob&&h instanceof Blob||h instanceof ArrayBuffer||"undefined"!=typeof FormData&&h instanceof FormData?o=h:o=JSON.stringify(h);let g=f;d&&(i=new AbortController,n=setTimeout(()=>i.abort(),d),f?(g=i.signal,f.addEventListener("abort",()=>i.abort())):g=i.signal);let v=yield this.fetch(m.toString(),{method:u||"POST",headers:Object.assign(Object.assign(Object.assign({},p),this.headers),a),body:o,signal:g}).catch(e=>{throw new s(e)}),b=v.headers.get("x-relay-error");if(b&&"true"===b)throw new l(v);if(!v.ok)throw new c(v);let w=(null!==(r=v.headers.get("Content-Type"))&&void 0!==r?r:"text/plain").split(";")[0].trim();return{data:"application/json"===w?yield v.json():"application/octet-stream"===w||"application/pdf"===w?yield v.blob():"text/event-stream"===w?v:"multipart/form-data"===w?yield v.formData():yield v.text(),error:null,response:v}}catch(e){return{data:null,error:e,response:e instanceof c||e instanceof l?e.context:void 0}}finally{n&&clearTimeout(n)}},new(n||(n=Promise))(function(e,o){function a(e){try{l(i.next(e))}catch(e){o(e)}}function s(e){try{l(i.throw(e))}catch(e){o(e)}}function l(t){var r;t.done?e(t.value):((r=t.value)instanceof n?r:new n(function(e){e(r)})).then(a,s)}l((i=i.apply(t,r||[])).next())})}}let h=e=>Math.min(1e3*2**e,3e4),f=[520,503],d=["GET","HEAD","OPTIONS"];var p,y,m,g,v,b,w,x,O,k,j,S,_=class extends Error{constructor(e){super(e.message),this.name="PostgrestError",this.details=e.details,this.hint=e.hint,this.co
1de=e.code}toJSON(){return{name:this.name,message:this.message,details:this.details,hint:this.hint,code:this.code}}};function E(e,t){return new Promise(r=>{if(null==t?void 0:t.aborted){r();return}let n=setTimeout(()=>{null==t||t.removeEventListener("abort",i),r()},e);function i(){clearTimeout(n),r()}null==t||t.addEventListener("abort",i)})}var A=class{constructor(e){var t,r,n,i,o;this.shouldThrowOnError=!1,this.retryEnabled=!0,this.method=e.method,this.url=e.url,this.headers=new Headers(e.headers),this.schema=e.schema,this.body=e.body,this.shouldThrowOnError=null!==(t=e.shouldThrowOnError)&&void 0!==t&&t,this.signal=e.signal,this.isMaybeSingle=null!==(r=e.isMaybeSingle)&&void 0!==r&&r,this.shouldStripNulls=null!==(n=e.shouldStripNulls)&&void 0!==n&&n,this.urlLengthLimit=null!==(i=e.urlLengthLimit)&&void 0!==i?i:8e3,this.retryEnabled=null===(o=e.retry)||void 0===o||o,e.fetch?this.fetch=e.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}stripNulls(){if("text/csv"===this.headers.get("Accept"))throw Error("stripNulls() cannot be used with csv()");return this.shouldStripNulls=!0,this}setHeader(e,t){return this.headers=new Headers(this.headers),this.headers.set(e,t),this}retry(e){return this.retryEnabled=e,this}then(e,t){var r=this;if(void 0===this.schema||(["GET","HEAD"].includes(this.method)?this.headers.set("Accept-Profile",this.schema):this.headers.set("Content-Profile",this.schema)),"GET"!==this.method&&"HEAD"!==this.method&&this.headers.set("Content-Type","application/json"),this.shouldStripNulls){let e=this.headers.get("Accept");"application/vnd.pgrst.object+json"===e?this.headers.set("Accept","application/vnd.pgrst.object+json;nulls=stripped"):e&&"application/json"!==e||this.headers.set("Accept","application/vnd.pgrst.array+json;nulls=stripped")}let n=this.fetch,i=(async()=>{let e=0;for(;;){var t,i,o,a,s;let l;let c=new Headers(r.headers);e>0&&c.set("X-Retry-Count",String(e));try{l=await n(r.url.toString(),{method:r.method,headers:c,body:JSON.stringify(r.body),signal:r.signal})}catch(t){if((null==t?void 0:t.name)==="AbortError"||(null==t?void 0:t.code)==="ABORT_ERR"||!d.includes(r.method))throw t;if(r.retryEnabled&&e<3){let t=h(e);e++,await E(t,r.signal);continue}throw t}if(t=r.method,i=l.status,o=e,r.retryEnabled&&!(o>=3)&&d.includes(t)&&f.includes(i)){let t=null!==(a=null===(s=l.headers)||void 0===s?void 0:s.get("Retry-After"))&&void 0!==a?a:null,n=null!==t?1e3*Math.max(0,parseInt(t,10)||0):h(e);await l.text(),e++,await E(n,r.signal);continue}return await r.processResponse(l)}})();return this.shouldThrowOnError||(i=i.catch(e=>{var t,r,n,i,o,a;let s="",l="",c="",u=null==e?void 0:e.cause;if(u){let t=null!==(r=null==u?void 0:u.message)&&void 0!==r?r:"",a=null!==(n=null==u?void 0:u.code)&&void 0!==n?n:"";s=`${null!==(i=null==e?void 0:e.name)&&void 0!==i?i:"FetchError"}: ${null==e?void 0:e.message}
2
3Caused by: ${null!==(o=null==u?void 0:u.name)&&void 0!==o?o:"Error"}: ${t}`,a&&(s+=` (${a})`),(null==u?void 0:u.stack)&&(s+=`
4${u.stack}`)}else s=null!==(a=null==e?void 0:e.stack)&&void 0!==a?a:"";let h=this.url.toString().length;return(null==e?void 0:e.name)==="AbortError"||(null==e?void 0:e.code)==="ABORT_ERR"?(c="",l="Request was aborted (timeout or manual cancellation)",h>this.urlLengthLimit&&(l+=`. Note: Your request URL is ${h} characters, which may exceed server limits. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [many IDs])), consider using an RPC function to pass values server-side.`)):((null==u?void 0:u.name)==="HeadersOverflowError"||(null==u?void 0:u.code)==="UND_ERR_HEADERS_OVERFLOW")&&(c="",l="HTTP headers exceeded server limits (typically 16KB)",h>this.urlLengthLimit&&(l+=`. Your request URL is ${h} characters. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [200+ IDs])), consider using an RPC function instead.`)),{success:!1,error:{message:`${null!==(t=null==e?void 0:e.name)&&void 0!==t?t:"FetchError"}: ${null==e?void 0:e.message}`,details:s,hint:l,code:c},data:null,count:null,status:0,statusText:""}}
4)),i.then(e,t)}async processResponse(e){var t,r,n;let i=null,o=null,a=null,s=e.status,l=e.statusText;if(e.ok){if("HEAD"!==this.method){let t=await e.text();""===t||(o="text/csv"===this.headers.get("Accept")?t:this.headers.get("Accept")&&(null===(n=this.headers.get("Accept"))||void 0===n?void 0:n.includes("application/vnd.pgrst.plan+text"))?t:JSON.parse(t))}let c=null===(t=this.headers.get("Prefer"))||void 0===t?void 0:t.match(/count=(exact|planned|estimated)/),u=null===(r=e.headers.get("content-range"))||void 0===r?void 0:r.split("/");c&&u&&u.length>1&&(a=parseInt(u[1])),this.isMaybeSingle&&Array.isArray(o)&&(o.length>1?(i={code:"PGRST116",details:`Results contain ${o.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},o=null,a=null,s=406,l="Not Acceptable"):o=1===o.length?o[0]:null)}else{let t=await e.text();try{i=JSON.parse(t),Array.isArray(i)&&404===e.status&&(o=[],i=null,s=200,l="OK")}catch(r){404===e.status&&""===t?(s=204,l="No Content"):i={message:t}}if(i&&this.shouldThrowOnError)throw new _(i)}return{success:null===i,error:i,data:o,count:a,status:s,statusText:l}}returns(){return this}overrideTypes(){return this}},P=class extends A{select(e){let t=!1,r=(null!=e?e:"*").split("").map(e=>/\s/.test(e)&&!t?"":('"'===e&&(t=!t),e)).join("");return this.url.searchParams.set("select",r),this.headers.append("Prefer","return=representation"),this}order(e,{ascending:t=!0,nullsFirst:r,foreignTable:n,referencedTable:i=n}={}){let o=i?`${i}.order`:"order",a=this.url.searchParams.get(o);return this.url.searchParams.set(o,`${a?`${a},`:""}${e}.${t?"asc":"desc"}${void 0===r?"":r?".nullsfirst":".nullslast"}`),this}limit(e,{foreignTable:t,referencedTable:r=t}={}){let n=void 0===r?"limit":`${r}.limit`;return this.url.searchParams.set(n,`${e}`),this}range(e,t,{foreignTable:r,referencedTable:n=r}={}){let i=void 0===n?"offset":`${n}.offset`,o=void 0===n?"limit":`${n}.limit`;return this.url.searchParams.set(i,`${e}`),this.url.searchParams.set(o,`${t-e+1}`),this}abortSignal(e){return this.signal=e,this}single(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this}maybeSingle(){return this.isMaybeSingle=!0,this}csv(){return this.headers.set("Accept","text/csv"),this}geojson(){return this.headers.set("Accept","application/geo+json"),this}explain({analyze:e=!1,verbose:t=!1,settings:r=!1,buffers:n=!1,wal:i=!1,format:o="text"}={}){var a;let s=[e?"analyze":null,t?"verbose":null,r?"settings":null,n?"buffers":null,i?"wal":null].filter(Boolean).join("|"),l=null!==(a=this.headers.get("Accept"))&&void 0!==a?a:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${o}; for="${l}"; options=${s};`),this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(e){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${e}`),this}};let T=RegExp("[,()]");var N=class extends P{eq(e,t){return this.url.searchParams.append(e,`eq.${t}`),this}neq(e,t){return this.url.searchParams.append(e,`neq.${t}`),this}gt(e,t){return this.url.searchParams.append(e,`gt.${t}`),this}gte(e,t){return this.url.searchParams.append(e,`gte.${t}`),this}lt(e,t){return this.url.searchParams.append(e,`lt.${t}`),this}lte(e,t){return this.url.searchParams.append(e,`lte.${t}`),this}like(e,t){return this.url.searchParams.append(e,`like.${t}`),this}likeAllOf(e,t){return this.url.searchParams.append(e,`like(all).{${t.join(",")}}`),this}likeAnyOf(e,t){return this.url.searchParams.append(e,`like(any).{${t.join(",")}}`),this}ilike(e,t){return this.url.searchParams.append(e,`ilike.${t}`),this}ilikeAllOf(e,t){return this.url.searchParams.append(e,`ilike(all).{${t.join(",")}}`),this}ilikeAnyOf(e,t){return this.url.searchParams.append(e,`ilike(any).{${t.join(",")}}`),this}regexMatch(e,t){return this.url.searchParams.append(e,`match.${t}`),this}regexIMatch(e,t){return this.url.searchParams.append(e,`imatch.${t}`),this}is(e,t){return this.url.searchParams.append(e,`is.${t}`),this}isDistinct(e,t){return this.url.searchParams.append(e,`isdistinct.${t}`),this}in(e,t){let r=Array.from(new Set(t)).map(e=>"string"==typeof e&&T.test(e)?`"${e}"`:`${e}`).join(",");return this.url.searchParams.append(e,`in.(${r})`),this}notIn(e,t){let r=Array.from(new Set(t)).map(e=>"string"==typeof e&&T.test(e)?`"${e}"`:`${e}`).join(",");return this.url.searchParams.append(e,`not.in.(${r})`),this}contains(e,t){return"string"==typeof t?this.url.searchParams.append(e,`cs.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cs.{${t.join(",")}}`):this.url.searchParams.append(e,`cs.${JSON.stringify(t)}`),this}containedBy(e,t){return"string"==typeof t?this.url.searchParams.append(e,`cd.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cd.{${t.join(",")}}`):this.url.searchParams.append(e,`cd.${JSON.stringify(t)}`),this}rangeGt(e,t){return this.url.searchParams.append(e,`sr.${t}`),this}rangeGte(e,t){return this.url.searchParams.append(e,`nxl.${t}`),this}rangeLt(e,t){return this.url.searchParams.append(e,`sl.${t}`),this}rangeLte(e,t){return this.url.searchParams.append(e,`nxr.${t}`),this}rangeAdjacent(e,t){return this.url.searchParams.append(e,`adj.${t}`),this}overlaps(e,t){return"string"==typeof t?this.url.searchParams.append(e,`ov.${t}`):this.url.searchParams.append(e,`ov.{${t.join(",")}}`),this}textSearch(e,t,{config:r,type:n}={}){let i="";"plain"===n?i="pl":"phrase"===n?i="ph":"websearch"===n&&(i="w");let o=void 0===r?"":`(${r})`;return this.url.searchParams.append(e,`${i}fts${o}.${t}`),this}match(e){return Object.entries(e).filter(([e,t])=>void 0!==t).forEach(([e,t])=>{this.url.searchParams.append(e,`eq.${t}`)}),this}not(e,t,r){return this.url.searchParams.append(e,`not.${t}.${r}`),this}or(e,{foreignTable:t,referencedTable:r=t}={}){let n=r?`${r}.or`:"or";return this.url.searchParams.append(n,`(${e})`),this}filter(e,t,r){return this.url.searchParams.append(e,`${t}.${r}`),this}},C=class{constructor(e,{headers:t={},schema:r,fetch:n,urlLengthLimit:i=8e3,retry:o}){this.url=e,this.headers=new Headers(t),this.schema=r,this.fetch=n,this.urlLengthLimit=i,this.retry=o}
4cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(e,t){let{head:r=!1,count:n}=null!=t?t:{},i=!1,o=(null!=e?e:"*").split("").map(e=>/\s/.test(e)&&!i?"":('"'===e&&(i=!i),e)).join(""),{url:a,headers:s}=this.cloneRequestState();return a.searchParams.set("select",o),n&&s.append("Prefer",`count=${n}`),new N({method:r?"HEAD":"GET",url:a,headers:s,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}insert(e,{count:t,defaultToNull:r=!0}={}){var n;let{url:i,headers:o}=this.cloneRequestState();if(t&&o.append("Prefer",`count=${t}`),r||o.append("Prefer","missing=default"),Array.isArray(e)){let t=e.reduce((e,t)=>e.concat(Object.keys(t)),[]);if(t.length>0){let e=[...new Set(t)].map(e=>`"${e}"`);i.searchParams.set("columns",e.join(","))}}return new N({method:"POST",url:i,headers:o,schema:this.schema,body:e,fetch:null!==(n=this.fetch)&&void 0!==n?n:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}upsert(e,{onConflict:t,ignoreDuplicates:r=!1,count:n,defaultToNull:i=!0}={}){var o;let{url:a,headers:s}=this.cloneRequestState();if(s.append("Prefer",`resolution=${r?"ignore":"merge"}-duplicates`),void 0!==t&&a.searchParams.set("on_conflict",t),n&&s.append("Prefer",`count=${n}`),i||s.append("Prefer","missing=default"),Array.isArray(e)){let t=e.reduce((e,t)=>e.concat(Object.keys(t)),[]);if(t.length>0){let e=[...new Set(t)].map(e=>`"${e}"`);a.searchParams.set("columns",e.join(","))}}return new N({method:"POST",url:a,headers:s,schema:this.schema,body:e,fetch:null!==(o=this.fetch)&&void 0!==o?o:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}update(e,{count:t}={}){var r;let{url:n,headers:i}=this.cloneRequestState();return t&&i.append("Prefer",`count=${t}`),new N({method:"PATCH",url:n,headers:i,schema:this.schema,body:e,fetch:null!==(r=this.fetch)&&void 0!==r?r:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}delete({count:e}={}){var t;let{url:r,headers:n}=this.cloneRequestState();return e&&n.append("Prefer",`count=${e}`),new N({method:"DELETE",url:r,headers:n,schema:this.schema,fetch:null!==(t=this.fetch)&&void 0!==t?t:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};function M(e){return(M="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function I(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function R(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?I(Object(r),!0).forEach(function(t){!function(e,t,r){var n;(n=function(e,t){if("object"!=M(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=M(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"),(t="symbol"==M(n)?n:n+"")in e)?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):I(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var D=class e{constructor(e,{headers:t={},schema:r,fetch:n,timeout:i,urlLengthLimit:o=8e3,retry:a}={}){this.url=e,this.headers=new Headers(t),this.schemaName=r,this.urlLengthLimit=o;let s=null!=n?n:globalThis.fetch;void 0!==i&&i>0?this.fetch=(e,t)=>{let r=new AbortController,n=setTimeout(()=>r.abort(),i),o=null==t?void 0:t.signal;if(o){if(o.aborted)return clearTimeout(n),s(e,t);let i=()=>{clearTimeout(n),r.abort()};return o.addEventListener("abort",i,{once:!0}),s(e,R(R({},t),{},{signal:r.signal})).finally(()=>{clearTimeout(n),o.removeEventListener("abort",i)})}return s(e,R(R({},t),{},{signal:r.signal})).finally(()=>clearTimeout(n))}:this.fetch=s,this.retry=a}from(e){if(!e||"string"!=typeof e||""===e.trim())throw Error("Invalid relation name: relation must be a non-empty string.");return new C(new URL(`${this.url}/${e}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}schema(t){return new e(this.url,{headers:this.headers,schema:t,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}rpc(e,t={},{head:r=!1,get:n=!1,count:i}={}){var o;let a,s;let l=new URL(`${this.url}/rpc/${e}`),c=e=>null!==e&&"object"==typeof e&&(!Array.isArray(e)||e.some(c)),u=r&&Object.values(t).some(c);u?(a="POST",s=t):r||n?(a=r?"HEAD":"GET",Object.entries(t).filter(([e,t])=>void 0!==t).map(([e,t])=>[e,Array.isArray(t)?`{${t.join(",")}}`:`${t}
4`]).forEach(([e,t])=>{l.searchParams.append(e,t)})):(a="POST",s=t);let h=new Headers(this.headers);return u?h.set("Prefer",i?`count=${i},return=minimal`:"return=minimal"):i&&h.set("Prefer",`count=${i}`),new N({method:a,url:l,headers:h,schema:this.schemaName,body:s,fetch:null!==(o=this.fetch)&&void 0!==o?o:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};class L{constructor(){}static detectEnvironment(){var e;if("undefined"!=typeof WebSocket)return{type:"native",constructor:WebSocket};if("undefined"!=typeof globalThis&&void 0!==globalThis.WebSocket)return{type:"native",constructor:globalThis.WebSocket};if(void 0!==r.g&&void 0!==r.g.WebSocket)return{type:"native",constructor:r.g.WebSocket};if("undefined"!=typeof globalThis&&void 0!==globalThis.WebSocketPair&&void 0===globalThis.WebSocket)return{type:"cloudflare",error:"Cloudflare Workers detected. WebSocket clients are not supported in Cloudflare Workers.",workaround:"Use Cloudflare Workers WebSocket API for server-side WebSocket handling, or deploy to a different runtime."};if("undefined"!=typeof globalThis&&globalThis.EdgeRuntime||"undefined"!=typeof navigator&&(null===(e=navigator.userAgent)||void 0===e?void 0:e.includes("Vercel-Edge")))return{type:"unsupported",error:"Edge runtime detected (Vercel Edge/Netlify Edge). WebSockets are not supported in edge functions.",workaround:"Use serverless functions or a different deployment target for WebSocket functionality."};let t=globalThis.process;if(t){let e=t.versions;if(e&&e.node){let t=parseInt(e.node.replace(/^v/,"").split(".")[0]);return t>=22?void 0!==globalThis.WebSocket?{type:"native",constructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${t} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${t} detected without native WebSocket support.`,workaround:'For Node.js < 22, install "ws" package and provide it via the transport option:\nimport ws from "ws"\nnew RealtimeClient(url, { transport: ws })'}}}return{type:"unsupported",error:"Unknown JavaScript runtime without WebSocket support.",workaround:"Ensure you're running in a supported environment (browser, Node.js, Deno) or provide a custom WebSocket implementation."}}static getWebSocketConstructor(){let e=this.detectEnvironment();if(e.constructor)return e.constructor;let t=e.error||"WebSocket not supported in this environment.";throw e.workaround&&(t+=`
5
6Suggested solution: ${e.workaround}`),Error(t)}static isWebSocketSupported(){try{let e=this.detectEnvironment();return"native"===e.type||"ws"===e.type}catch(e){return!1}}}let B="2.0.0",$={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},U={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave",access_token:"access_token"},q={connecting:"connecting",closing:"closing",closed:"closed"};class z{constructor(e){this.HEADER_LENGTH=1,this.USER_BROADCAST_PUSH_META_LENGTH=6,this.KINDS={userBroadcastPush:3,userBroadcast:4},this.BINARY_ENCODING=0,this.JSON_ENCODING=1,this.BROADCAST_EVENT="broadcast",this.allowedMetadataKeys=[],this.allowedMetadataKeys=null!=e?e:[]}encode(e,t){return e.event!==this.BROADCAST_EVENT||e.payload instanceof ArrayBuffer||"string"!=typeof e.payload.event?t(JSON.stringify([e.join_ref,e.ref,e.topic,e.event,e.payload])):t(this._binaryEncodeUserBroadcastPush(e))}_binaryEncodeUserBroadcastPush(e){var t;return this._isArrayBuffer(null===(t=e.payload)||void 0===t?void 0:t.payload)?this._encodeBinaryUserBroadcastPush(e):this._encodeJsonUserBroadcastPush(e)}_encodeBinaryUserBroadcastPush(e){var t,r;let n=null!==(r=null===(t=e.payload)||void 0===t?void 0:t.payload)&&void 0!==r?r:new ArrayBuffer(0);return this._encodeUserBroadcastPush(e,this.BINARY_ENCODING,n)}_encodeJsonUserBroadcastPush(e){var t,r;let n=null!==(r=null===(t=e.payload)||void 0===t?void 0:t.payload)&&void 0!==r?r:{},i=new TextEncoder().encode(JSON.stringify(n)).buffer;return this._encodeUserBroadcastPush(e,this.JSON_ENCODING,i)}_encodeUserBroadcastPush(e,t,r){let n=e.topic,i=null!==(d=e.ref)&&void 0!==d?d:"",o=null!==(p=e.join_ref)&&void 0!==p?p:"",a=e.payload.event,s=this.allowedMetadataKeys?this._pick(e.payload,this.allowedMetadataKeys):{},l=0===Object.keys(s).length?"":JSON.stringify(s);if(o.length>255)throw Error(`joinRef length ${o.length} exceeds maximum of 255`);if(i.length>255)throw Error(`ref length ${i.length} exceeds maximum of 255`);if(n.length>255)throw Error(`topic length ${n.length} exceeds maximum of 255`);if(a.length>255)throw Error(`userEvent length ${a.length} exceeds maximum of 255`);if(l.length>255)throw Error(`metadata length ${l.length} exceeds maximum of 255`);let c=this.USER_BROADCAST_PUSH_META_LENGTH+o.length+i.length+n.length+a.length+l.length,u=new ArrayBuffer(this.HEADER_LENGTH+c),h=new DataView(u),f=0;h.setUint8(f++,this.KINDS.userBroadcastPush),h.setUint8(f++,o.length),h.setUint8(f++,i.length),h.setUint8(f++,n.length),h.setUint8(f++,a.length),h.setUint8(f++,l.length),h.setUint8(f++,t),Array.from(o,e=>h.setUint8(f++,e.charCodeAt(0))),Array.from(i,e=>h.setUint8(f++,e.charCodeAt(0))),Array.from(n,e=>h.setUint8(f++,e.charCodeAt(0))),Array.from(a,e=>h.setUint8(f++,e.charCodeAt(0))),Array.from(l,e=>h.setUint8(f++,e.charCodeAt(0)));var d,p,y=new Uint8Array(u.byteLength+r.byteLength);return y.set(new Uint8Array(u),0),y.set(new Uint8Array(r),u.byteLength),y.buffer}decode(e,t){if(this._isArrayBuffer(e))return t(this._binaryDecode(e));if("string"==typeof e){let[r,n,i,o,a]=JSON.parse(e);return t({join_ref:r,ref:n,topic:i,event:o,payload:a})}return t({})}_binaryDecode(e){let t=new DataView(e),r=t.getUint8(0),n=new TextDecoder;if(r===this.KINDS.userBroadcast)return this._decodeUserBroadcast(e,t,n)}_decodeUserBroadcast(e,t,r){let n=t.getUint8(1),i=t.getUint8(2),o=t.getUint8(3),a=t.getUint8(4),s=this.HEADER_LENGTH+4,l=r.decode(e.slice(s,s+n));s+=n;let c=r.decode(e.slice(s,s+i));s+=i;let u=r.decode(e.slice(s,s+o));s+=o;let h=e.slice(s,e.byteLength),f=a===this.JSON_ENCODING?JSON.parse(r.decode(h)):h,d={type:this.BROADCAST_EVENT,event:c,payload:f};return o>0&&(d.meta=JSON.parse(u)),{join_ref:null,ref:null,topic:l,event:this.BROADCAST_EVENT,payload:d}}_isArrayBuffer(e){var t;return e instanceof ArrayBuffer||(null===(t=null==e?void 0:e.constructor)||void 0===t?void 0:t.name)==="ArrayBuffer"}_pick(e,t){return e&&"object"==typeof e?Object.fromEntries(Object.entries(e).filter(([e])=>t.includes(e))):{}}}(x=y||(y={})).abstime="abstime",x.bool="bool",x.date="date",x.daterange="daterange",x.float4="float4",x.float8="float8",x.int2="int2",x.int4="int4",x.int4range="int4range",x.int8="int8",x.int8range="int8range",x.json="json",x.jsonb="jsonb",x.money="money",x.numeric="numeric",x.oid="oid",x.reltime="reltime",x.text="text",x.time="time",x.timestamp="timestamp",x.timestamptz="timestamptz",x.timetz="timetz",x.tsrange="tsrange",x.tstzrange="tstzrange";let F=(e,t,r={})=>{var n;let i=null!==(n=r.skipTypes)&&void 0!==n?n:[];return t?Object.keys(t).reduce((r,n)=>(r[n]=W(n,e,t,i),r),{}):{}},W=(e,t,r,n)=>{let i=t.find(t=>t.name===e),o=null==i?void 0:i.type,a=r[e];return o&&!n.includes(o)?H(o,a):V(a)},H=(e,t)=>{if("_"===e.charAt(0))return J(t,e.slice(1,e.length));switch(e){case y.bool:return K(t);case y.float4:case y.float8:case y.int2:case y.int4:case y.int8:case y.numeric:case y.oid:return G(t);case y.json:case y.jsonb:return Z(t);case y.timestamp:return Y(t);case y.abstime:case y.date:case y.daterange:case y.int4range:case y.int8range:case y.money:case y.reltime:case y.text:case y.time:case y.timestamptz:case y.timetz:case y.tsrange:case y.tstzrange:default:return V(t)}},V=e=>e,K=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},G=e=>{if("string"==typeof e){let t=parseFloat(e);
6if(!Number.isNaN(t))return t}return e},Z=e=>{if("string"==typeof e)try{return JSON.parse(e)}catch(e){}return e},J=(e,t)=>{if("string"!=typeof e)return e;let r=e.length-1,n=e[r];if("{"===e[0]&&"}"===n){let n;let i=e.slice(1,r);try{n=JSON.parse("["+i+"]")}catch(e){n=i?i.split(","):[]}return n.map(e=>H(t,e))}return e},Y=e=>"string"==typeof e?e.replace(" ","T"):e,X=e=>{let t=new URL(e);return t.protocol=t.protocol.replace(/^ws/i,"http"),t.pathname=t.pathname.replace(/\/+$/,"").replace(/\/socket\/websocket$/i,"").replace(/\/socket$/i,"").replace(/\/websocket$/i,""),""===t.pathname||"/"===t.pathname?t.pathname="/api/broadcast":t.pathname=t.pathname+"/api/broadcast",t.href};var Q=e=>"function"==typeof e?e:function(){return e},ee="undefined"!=typeof window?window:null,et=("undefined"!=typeof self?self:null)||ee||globalThis,er={connecting:0,open:1,closing:2,closed:3},en="closed",ei="errored",eo="joined",ea="joining",es="leaving",el={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},ec="websocket",eu="base64url.bearer.phx.",eh=class{constructor(e,t,r,n){this.channel=e,this.event=t,this.payload=r||function(){return{}},this.receivedResp=null,this.timeout=n,this.timeoutTimer=null,this.recHooks=[],this.sent=!1,this.ref=void 0}resend(e){this.timeout=e,this.reset(),this.send()}send(){this.hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload(),ref:this.ref,join_ref:this.channel.joinRef()}))}receive(e,t){return this.hasReceived(e)&&t(this.receivedResp.response),this.recHooks.push({status:e,callback:t}),this}reset(){this.cancelRefEvent(),this.ref=null,this.refEvent=null,this.receivedResp=null,this.sent=!1}destroy(){this.cancelRefEvent(),this.cancelTimeout()}matchReceive({status:e,response:t,_ref:r}){this.recHooks.filter(t=>t.status===e).forEach(e=>e.callback(t))}cancelRefEvent(){this.refEvent&&this.channel.off(this.refEvent)}cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=null}startTimeout(){this.timeoutTimer&&this.cancelTimeout(),this.ref=this.channel.socket.makeRef(),this.refEvent=this.channel.replyEventName(this.ref),this.channel.on(this.refEvent,e=>{this.cancelRefEvent(),this.cancelTimeout(),this.receivedResp=e,this.matchReceive(e)}),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}hasReceived(e){return this.receivedResp&&this.receivedResp.status===e}trigger(e,t){this.channel.trigger(this.refEvent,{status:e,response:t})}},ef=class{constructor(e,t){this.callback=e,this.timerCalc=t,this.timer=void 0,this.tries=0}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}},ed=class{constructor(e,t,r){this.state=en,this.topic=e,this.params=Q(t||{}),this.socket=r,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new eh(this,el.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new ef(()=>{this.socket.isConnected()&&this.rejoin()},this.socket.rejoinAfterMs),this.stateChangeRefs.push(this.socket.onError(()=>this.rejoinTimer.reset())),this.stateChangeRefs.push(this.socket.onOpen(()=>{this.rejoinTimer.reset(),this.isErrored()&&this.rejoin()})),this.joinPush.receive("ok",()=>{this.state=eo,this.rejoinTimer.reset(),this.pushBuffer.forEach(e=>e.send()),this.pushBuffer=[]}),this.joinPush.receive("error",e=>{this.state=ei,this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,e),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.onClose(()=>{this.rejoinTimer.reset(),this.socket.hasLogger()&&this.socket.log("channel",`close ${this.topic}`),this.state=en,this.socket.remove(this)}),this.onError(e=>{this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,e),this.isJoining()&&this.joinPush.reset(),this.state=ei,this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.joinPush.receive("timeout",()=>{this.socket.hasLogger()&&this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),new eh(this,el.leave,Q({}),this.timeout).send(),this.state=ei,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(el.reply,(e,t)=>{this.trigger(this.replyEventName(t),e)})}join(e=this.timeout){if(!this.joinedOnce)return this.timeout=e,this.joinedOnce=!0,this.rejoin(),this.joinPush;throw Error("tried to join multiple times. 'join' can only be called a single time per channel instance")}
6teardown(){this.pushBuffer.forEach(e=>e.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=en,this.bindings=[]}onClose(e){this.on(el.close,e)}onError(e){return this.on(el.error,t=>e(t))}on(e,t){let r=this.bindingRef++;return this.bindings.push({event:e,ref:r,callback:t}),r}off(e,t){this.bindings=this.bindings.filter(r=>!(r.event===e&&(void 0===t||t===r.ref)))}canPush(){return this.socket.isConnected()&&this.isJoined()}push(e,t,r=this.timeout){if(t=t||{},!this.joinedOnce)throw Error(`tried to push '${e}' to '${this.topic}' before joining. Use channel.join() before pushing events`);let n=new eh(this,e,function(){return t},r);return this.canPush()?n.send():(n.startTimeout(),this.pushBuffer.push(n)),n}leave(e=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=es;let t=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(el.close,"leave")},r=new eh(this,el.leave,Q({}),e);return r.receive("ok",()=>t()).receive("timeout",()=>t()),r.send(),this.canPush()||r.trigger("ok",{}),r}onMessage(e,t,r){return t}filterBindings(e,t,r){return!0}isMember(e,t,r,n){return this.topic===e&&(!n||n===this.joinRef()||(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:e,event:t,payload:r,joinRef:n}),!1))}joinRef(){return this.joinPush.ref}rejoin(e=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=ea,this.joinPush.resend(e))}trigger(e,t,r,n){let i=this.onMessage(e,t,r,n);if(t&&!i)throw Error("channel onMessage callbacks must return the payload, modified or unmodified");let o=this.bindings.filter(n=>n.event===e&&this.filterBindings(n,t,r));for(let e=0;e<o.length;e++)o[e].callback(i,r,n||this.joinRef())}replyEventName(e){return`chan_reply_${e}`}isClosed(){return this.state===en}isErrored(){return this.state===ei}isJoined(){return this.state===eo}isJoining(){return this.state===ea}isLeaving(){return this.state===es}},ep=class{static request(e,t,r,n,i,o,a){if(et.XDomainRequest){let r=new et.XDomainRequest;return this.xdomainRequest(r,e,t,n,i,o,a)}if(et.XMLHttpRequest){let s=new et.XMLHttpRequest;return this.xhrRequest(s,e,t,r,n,i,o,a)}if(et.fetch&&et.AbortController)return this.fetchRequest(e,t,r,n,i,o,a);throw Error("No suitable XMLHttpRequest implementation found")}static fetchRequest(e,t,r,n,i,o,a){let s={method:e,headers:r,body:n},l=null;return i&&(l=new AbortController,setTimeout(()=>l.abort(),i),s.signal=l.signal),et.fetch(t,s).then(e=>e.text()).then(e=>this.parseJSON(e)).then(e=>a&&a(e)).catch(e=>{"AbortError"===e.name&&o?o():a&&a(null)}),l}static xdomainRequest(e,t,r,n,i,o,a){return e.timeout=i,e.open(t,r),e.onload=()=>{let t=this.parseJSON(e.responseText);a&&a(t)},o&&(e.ontimeout=o),e.onprogress=()=>{},e.send(n),e}static xhrRequest(e,t,r,n,i,o,a,s){for(let[i,a]of(e.open(t,r,!0),e.timeout=o,Object.entries(n)))e.setRequestHeader(i,a);return e.onerror=()=>s&&s(null),e.onreadystatechange=()=>{4===e.readyState&&s&&s(this.parseJSON(e.responseText))},a&&(e.ontimeout=a),e.send(i),e}static parseJSON(e){if(!e||""===e)return null;try{return JSON.parse(e)}catch{return console&&console.log("failed to parse JSON response",e),null}}static serialize(e,t){let r=[];for(var n in e){if(!Object.prototype.hasOwnProperty.call(e,n))continue;let i=t?`${t}[${n}]`:n,o=e[n];"object"==typeof o?r.push(this.serialize(o,i)):r.push(encodeURIComponent(i)+"="+encodeURIComponent(o))}return r.join("&")}static appendParams(e,t){if(0===Object.keys(t).length)return e;let r=e.match(/\?/)?"&":"?";return`${e}${r}${this.serialize(t)}`}},ey=e=>{let t="",r=new Uint8Array(e),n=r.byteLength;for(let e=0;e<n;e++)t+=String.fromCharCode(r[e]);return btoa(t)},em=class{constructor(e,t){t&&2===t.length&&t[1].startsWith(eu)&&(this.authToken=atob(t[1].slice(eu.length))),this.endPoint=null,this.token=null,this.skipHeartbeat=!0,this.reqs=new Set,this.awaitingBatchAck=!1,this.currentBatch=null,this.currentBatchTimer=null,this.batchBuffer=[],this.onopen=function(){},this.onerror=function(){},this.onmessage=function(){},this.onclose=function(){},this.pollEndpoint=this.normalizeEndpoint(e),this.readyState=er.connecting,setTimeout(()=>this.poll(),0)}normalizeEndpoint(e){return e.replace("ws://","http://").replace("wss://","https://").replace(RegExp("(.*)/"+ec),"$1/longpoll")}endpointURL(){return ep.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(e,t,r){this.close(e,t,r),this.readyState=er.connecting}
6ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===er.open||this.readyState===er.connecting}poll(){let e={Accept:"application/json"};this.authToken&&(e["X-Phoenix-AuthToken"]=this.authToken),this.ajax("GET",e,null,()=>this.ontimeout(),e=>{if(e){var{status:t,token:r,messages:n}=e;if(410===t&&null!==this.token){this.onerror(410),this.closeAndRetry(3410,"session_gone",!1);return}this.token=r}else t=0;switch(t){case 200:n.forEach(e=>{setTimeout(()=>this.onmessage({data:e}),0)}),this.poll();break;case 204:this.poll();break;case 410:this.readyState=er.open,this.onopen({}),this.poll();break;case 403:this.onerror(403),this.close(1008,"forbidden",!1);break;case 0:case 500:this.onerror(500),this.closeAndRetry(1011,"internal server error",500);break;default:throw Error(`unhandled poll status ${t}`)}})}send(e){"string"!=typeof e&&(e=ey(e)),this.currentBatch?this.currentBatch.push(e):this.awaitingBatchAck?this.batchBuffer.push(e):(this.currentBatch=[e],this.currentBatchTimer=setTimeout(()=>{this.batchSend(this.currentBatch),this.currentBatch=null},0))}batchSend(e){this.awaitingBatchAck=!0,this.ajax("POST",{"Content-Type":"application/x-ndjson"},e.join("\n"),()=>
6this.onerror("timeout"),e=>{this.awaitingBatchAck=!1,e&&200===e.status?this.batchBuffer.length>0&&(this.batchSend(this.batchBuffer),this.batchBuffer=[]):(this.onerror(e&&e.status),this.closeAndRetry(1011,"internal server error",!1))})}close(e,t,r){for(let e of this.reqs)e.abort();this.readyState=er.closed;let n=Object.assign({code:1e3,reason:void 0,wasClean:!0},{code:e,reason:t,wasClean:r});this.batchBuffer=[],clearTimeout(this.currentBatchTimer),this.currentBatchTimer=null,"undefined"!=typeof CloseEvent?this.onclose(new CloseEvent("close",n)):this.onclose(n)}ajax(e,t,r,n,i){let o;o=ep.request(e,this.endpointURL(),t,r,this.timeout,()=>{this.reqs.delete(o),n()},e=>{this.reqs.delete(o),this.isActive()&&i(e)}),this.reqs.add(o)}},eg=class e{constructor(t,r={}){let n=r.events||{state:"presence_state",diff:"presence_diff"};this.state={},this.pendingDiffs=[],this.channel=t,this.joinRef=null,this.caller={onJoin:function(){},onLeave:function(){},onSync:function(){}},this.channel.on(n.state,t=>{let{onJoin:r,onLeave:n,onSync:i}=this.caller;this.joinRef=this.channel.joinRef(),this.state=e.syncState(this.state,t,r,n),this.pendingDiffs.forEach(t=>{this.state=e.syncDiff(this.state,t,r,n)}),this.pendingDiffs=[],i()}),this.channel.on(n.diff,t=>{let{onJoin:r,onLeave:n,onSync:i}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(t):(this.state=e.syncDiff(this.state,t,r,n),i())})}onJoin(e){this.caller.onJoin=e}onLeave(e){this.caller.onLeave=e}onSync(e){this.caller.onSync=e}list(t){return e.list(this.state,t)}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel.joinRef()}static syncState(e,t,r,n){let i=this.clone(e),o={},a={};return this.map(i,(e,r)=>{t[e]||(a[e]=r)}),this.map(t,(e,t)=>{let r=i[e];if(r){let n=t.metas.map(e=>e.phx_ref),i=r.metas.map(e=>e.phx_ref),s=t.metas.filter(e=>0>i.indexOf(e.phx_ref)),l=r.metas.filter(e=>0>n.indexOf(e.phx_ref));s.length>0&&(o[e]=t,o[e].metas=s),l.length>0&&(a[e]=this.clone(r),a[e].metas=l)}else o[e]=t}),this.syncDiff(i,{joins:o,leaves:a},r,n)}static syncDiff(e,t,r,n){let{joins:i,leaves:o}=this.clone(t);return r||(r=function(){}),n||(n=function(){}),this.map(i,(t,n)=>{let i=e[t];if(e[t]=this.clone(n),i){let r=e[t].metas.map(e=>e.phx_ref),n=i.metas.filter(e=>0>r.indexOf(e.phx_ref));e[t].metas.unshift(...n)}r(t,i,n)}),this.map(o,(t,r)=>{let i=e[t];if(!i)return;let o=r.metas.map(e=>e.phx_ref);i.metas=i.metas.filter(e=>0>o.indexOf(e.phx_ref)),n(t,i,r),0===i.metas.length&&delete e[t]}),e}static list(e,t){return t||(t=function(e,t){return t}),this.map(e,(e,r)=>t(e,r))}static map(e,t){return Object.getOwnPropertyNames(e).map(r=>t(r,e[r]))}static clone(e){return JSON.parse(JSON.stringify(e))}},ev={HEADER_LENGTH:1,META_LENGTH:4,KINDS:{push:0,reply:1,broadcast:2},encode(e,t){return e.payload.constructor===ArrayBuffer?t(this.binaryEncode(e)):t(JSON.stringify([e.join_ref,e.ref,e.topic,e.event,e.payload]))},decode(e,t){if(e.constructor===ArrayBuffer)return t(this.binaryDecode(e));{let[r,n,i,o,a]=JSON.parse(e);return t({join_ref:r,ref:n,topic:i,event:o,payload:a})}},binaryEncode(e){let{join_ref:t,ref:r,event:n,topic:i,payload:o}=e,a=this.META_LENGTH+t.length+r.length+i.length+n.length,s=new ArrayBuffer(this.HEADER_LENGTH+a),l=new DataView(s),c=0;l.setUint8(c++,this.KINDS.push),l.setUint8(c++,t.length),l.setUint8(c++,r.length),l.setUint8(c++,i.length),l.setUint8(c++,n.length),Array.from(t,e=>l.setUint8(c++,e.charCodeAt(0))),Array.from(r,e=>l.setUint8(c++,e.charCodeAt(0))),Array.from(i,e=>l.setUint8(c++,e.charCodeAt(0))),Array.from(n,e=>l.setUint8(c++,e.charCodeAt(0)));var u=new Uint8Array(s.byteLength+o.byteLength);return u.set(new Uint8Array(s),0),u.set(new Uint8Array(o),s.byteLength),u.buffer},binaryDecode(e){let t=new DataView(e),r=t.getUint8(0),n=new TextDecoder;switch(r){case this.KINDS.push:return this.decodePush(e,t,n);case this.KINDS.reply:return this.decodeReply(e,t,n);case this.KINDS.broadcast:return this.decodeBroadcast(e,t,n)}},decodePush(e,t,r){let n=t.getUint8(1),i=t.getUint8(2),o=t.getUint8(3),a=this.HEADER_LENGTH+this.META_LENGTH-1,s=r.decode(e.slice(a,a+n));a+=n;let l=r.decode(e.slice(a,a+i));a+=i;let c=r.decode(e.slice(a,a+o));return a+=o,{join_ref:s,ref:null,topic:l,event:c,payload:e.slice(a,e.byteLength)}},decodeReply(e,t,r){let n=t.getUint8(1),i=t.getUint8(2),o=t.getUint8(3),a=t.getUint8(4),s=this.HEADER_LENGTH+this.META_LENGTH,l=r.decode(e.slice(s,s+n));s+=n;let c=r.decode(e.slice(s,s+i));s+=i;let u=r.decode(e.slice(s,s+o));s+=o;let h=r.decode(e.slice(s,s+a));s+=a;let f=e.slice(s,e.byteLength);return{join_ref:l,ref:c,topic:u,event:el.reply,payload:{status:h,response:f}}},decodeBroadcast(e,t,r){let n=t.getUint8(1),i=t.getUint8(2),o=this.HEADER_LENGTH+2,a=r.decode(e.slice(o,o+n));o+=n;let s=r.decode(e.slice(o,o+i));return o+=i,{join_ref:null,ref:null,topic:a,event:s,payload:e.slice(o,e.byteLength)}}},eb=class{constructor(e,t={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.fallbackRef=null,this.timeout=t.timeout||1e4,this.transport=t.transport||et.WebSocket||em,this.conn=void 0,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=t.longPollFallbackMs,this.fallbackTimer=null,this.sessionStore=t.sessionStorage||et&&et.sessionStorage,this.establishedConnections=0,this.defaultEncoder=ev.encode.bind(ev),this.defaultDecoder=ev.decode.bind(ev),this.closeWasClean=!0,this.disconnecting=!1,this.binaryType=t.binaryType||"arraybuffer",this.connectClock=1,this.pageHidden=!1,this.encode=void 0,this.decode=void 0,this.transport!==em?(this.encode=t.encode||this.defaultEncoder,this.decode=t.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let r=null;ee&&ee.addEventListener&&(ee.addEventListener("pagehide",e=>{this.conn&&(this.disconnect(),r=this.connectClock)}),ee.addEventListener("pageshow",e=>{r===this.connectClock&&(r=null,this.connect())}),ee.addEventListener("visibilitychange",()=>{"hidden"===document.visibilityState?this.pageHidden=!0:(this.pageHidden=!1,this.isConnected()||this.closeWasClean||this.teardown(()=>this.connect()))})),this.heartbeatIntervalMs=t.heartbeatIntervalMs||3e4,this.autoSendHeartbeat=t.autoSendHeartbeat??!0,this.heartbeatCallback=t.heartbeatCallback??(()=>{}),this.rejoinAfterMs=e=>t.rejoinAfterMs?t.rejoinAfterMs(e):[1e3,2e3,5e3][e-1]||1e4,this.reconnectAfterMs=e=>t.reconnectAfterMs?t.reconnectAfterMs(e):[10,50,100,150,200,250,500,1e3,2e3][e-1]||5e3,this.logger=t.logger||null,!this.logger&&t.debug&&(this.logger=(e,t,r)=>{console.log(`${e}: ${t}`,r)}),this.longpollerTimeout=t.longpollerTimeout||2e4,this.params=Q(t.params||{}),this.endPoint=`${e}/${ec}`,this.vsn=t.vsn||"2.0.0",this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.heartbeatSentAt=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new ef(()=>{if(this.pageHidden){this.log("Not reconnecting as page is hidden!"),this.teardown();return}this.teardown(async()=>{t.beforeReconnect&&await t.beforeReconnect(),this.connect()})},this.reconnectAfterMs),this.authToken=t.authToken}getLongPollTransport(){return em}replaceTransport(e){this.connectClock++,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.conn&&(this.conn.
6close(),this.conn=null),this.transport=e}protocol(){return location.protocol.match(/^https/)?"wss":"ws"}endPointURL(){let e=ep.appendParams(ep.appendParams(this.endPoint,this.params()),{vsn:this.vsn});return"/"!==e.charAt(0)?e:"/"===e.charAt(1)?`${this.protocol()}:${e}`:`${this.protocol()}://${location.host}${e}`}disconnect(e,t,r){this.connectClock++,this.disconnecting=!0,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.teardown(()=>{this.disconnecting=!1,e&&e()},t,r)}connect(e){e&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=Q(e)),(!this.conn||this.disconnecting)&&(this.longPollFallbackMs&&this.transport!==em?this.connectWithFallback(em,this.longPollFallbackMs):this.transportConnect())}log(e,t,r){this.logger&&this.logger(e,t,r)}hasLogger(){return null!==this.logger}onOpen(e){let t=this.makeRef();return this.stateChangeCallbacks.open.push([t,e]),t}onClose(e){let t=this.makeRef();return this.stateChangeCallbacks.close.push([t,e]),t}onError(e){let t=this.makeRef();return this.stateChangeCallbacks.error.push([t,e]),t}onMessage(e){let t=this.makeRef();return this.stateChangeCallbacks.message.push([t,e]),t}onHeartbeat(e){this.heartbeatCallback=e}ping(e){if(!this.isConnected())return!1;let t=this.makeRef(),r=Date.now();this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:t});let n=this.onMessage(i=>{i.ref===t&&(this.off([n]),e(Date.now()-r))});return!0}transportName(e){return e===em?"LongPoll":e.name}transportConnect(){let e;this.connectClock++,this.closeWasClean=!1,this.authToken&&(e=["phoenix",`${eu}${btoa(this.authToken).replace(/=/g,"")}`]),this.conn=new this.transport(this.endPointURL(),e),this.conn.binaryType=this.binaryType,this.conn.timeout=this.longpollerTimeout,this.conn.onopen=()=>this.onConnOpen(),this.conn.onerror=e=>this.onConnError(e),this.conn.onmessage=e=>this.onConnMessage(e),this.conn.onclose=e=>this.onConnClose(e)}getSession(e){return this.sessionStore&&this.sessionStore.getItem(e)}storeSession(e,t){this.sessionStore&&this.sessionStore.setItem(e,t)}connectWithFallback(e,t=2500){let r,n;clearTimeout(this.fallbackTimer);let i=!1,o=!0,a=this.transportName(e),s=t=>{this.log("transport",`falling back to ${a}...`,t),this.off([r,n]),o=!1,this.replaceTransport(e),this.transportConnect()};if(this.getSession(`phx:fallback:${a}`))return s("memorized");this.fallbackTimer=setTimeout(s,t),n=this.onError(e=>{this.log("transport","error",e),o&&!i&&(clearTimeout(this.fallbackTimer),s(e))}),this.fallbackRef&&this.off([this.fallbackRef]),this.fallbackRef=this.onOpen(()=>{if(i=!0,!o){let t=this.transportName(e);return this.primaryPassedHealthCheck||this.storeSession(`phx:fallback:${t}`,"true"),this.log("transport",`established ${t} fallback`)}clearTimeout(this.fallbackTimer),this.fallbackTimer=setTimeout(s,t),this.ping(e=>{this.log("transport","connected to primary after",e),this.primaryPassedHealthCheck=!0,clearTimeout(this.fallbackTimer)})}),this.transportConnect()}clearHeartbeats(){clearTimeout(this.heartbeatTimer),clearTimeout(this.heartbeatTimeoutTimer)}onConnOpen(){this.hasLogger()&&this.log("transport",`connected to ${this.endPointURL()}`),this.closeWasClean=!1,this.disconnecting=!1,this.establishedConnections++,this.flushSendBuffer(),this.reconnectTimer.reset(),this.autoSendHeartbeat&&this.resetHeartbeat(),this.triggerStateCallbacks("open")}heartbeatTimeout(){if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.hasLogger()&&this.log("transport","heartbeat timeout. Attempting to re-establish connection");try{this.heartbeatCallback("timeout")}catch(e){this.log("error","error in heartbeat callback",e)}this.triggerChanError(),this.closeWasClean=!1,this.teardown(()=>this.reconnectTimer.scheduleTimeout(),1e3,"heartbeat timeout")}}resetHeartbeat(){this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,this.clearHeartbeats(),this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}teardown(e,t,r){if(!this.conn)return e&&e();let n=this.conn;this.waitForBufferDone(n,()=>{t?n.close(t,r||""):n.close(),this.waitForSocketClosed(n,()=>{this.conn===n&&(this.conn.onopen=function(){},this.conn.onerror=function(){},this.conn.onmessage=function(){}
6,this.conn.onclose=function(){},this.conn=null),e&&e()})})}waitForBufferDone(e,t,r=1){if(5===r||!e.bufferedAmount){t();return}setTimeout(()=>{this.waitForBufferDone(e,t,r+1)},150*r)}waitForSocketClosed(e,t,r=1){if(5===r||e.readyState===er.closed){t();return}setTimeout(()=>{this.waitForSocketClosed(e,t,r+1)},150*r)}onConnClose(e){this.conn&&(this.conn.onclose=()=>{}),this.hasLogger()&&this.log("transport","close",e),this.triggerChanError(),this.clearHeartbeats(),this.closeWasClean||this.reconnectTimer.scheduleTimeout(),this.triggerStateCallbacks("close",e)}onConnError(e){this.hasLogger()&&this.log("transport",e);let t=this.transport,r=this.establishedConnections;this.triggerStateCallbacks("error",e,t,r),(t===this.transport||r>0)&&this.triggerChanError()}triggerChanError(){this.channels.forEach(e=>{e.isErrored()||e.isLeaving()||e.isClosed()||e.trigger(el.error)})}connectionState(){switch(this.conn&&this.conn.readyState){case er.connecting:return"connecting";case er.open:return"open";case er.closing:return"closing";default:return"closed"}}isConnected(){return"open"===this.connectionState()}remove(e){this.off(e.stateChangeRefs),this.channels=this.channels.filter(t=>t!==e)}off(e){for(let t in this.stateChangeCallbacks)this.stateChangeCallbacks[t]=this.stateChangeCallbacks[t].filter(([t])=>-1===e.indexOf(t))}channel(e,t={}){let r=new ed(e,t,this);return this.channels.push(r),r}push(e){if(this.hasLogger()){let{topic:t,event:r,payload:n,ref:i,join_ref:o}=e;this.log("push",`${t} ${r} (${o}, ${i})`,n)}this.isConnected()?this.encode(e,e=>this.conn.send(e)):this.sendBuffer.push(()=>this.encode(e,e=>this.conn.send(e)))}makeRef(){let e=this.ref+1;return e===this.ref?this.ref=0:this.ref=e,this.ref.toString()}sendHeartbeat(){if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(e){this.log("error","error in heartbeat callback",e)}return}if(this.pendingHeartbeatRef){this.heartbeatTimeout();return}this.pendingHeartbeatRef=this.makeRef(),this.heartbeatSentAt=Date.now(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback("sent")}catch(e){this.log("error","error in heartbeat callback",e)}this.heartbeatTimeoutTimer=setTimeout(()=>this.heartbeatTimeout(),this.heartbeatIntervalMs)}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(e=>e()),this.sendBuffer=[])}onConnMessage(e){this.decode(e.data,e=>{let{topic:t,event:r,payload:n,ref:i,join_ref:o}=e;if(i&&i===this.pendingHeartbeatRef){let e=this.heartbeatSentAt?Date.now()-this.heartbeatSentAt:void 0;this.clearHeartbeats();try{this.heartbeatCallback("ok"===n.status?"ok":"error",e)}catch(e){this.log("error","error in heartbeat callback",e)}this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.autoSendHeartbeat&&(this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}this.hasLogger()&&this.log("receive",`${n.status||""} ${t} ${r} ${i&&"("+i+")"||""}`.trim(),n);for(let e=0;e<this.channels.length;e++){let a=this.channels[e];a.isMember(t,r,n,o)&&a.trigger(r,n,i,o)}this.triggerStateCallbacks("message",e)})}triggerStateCallbacks(e,...t){try{this.stateChangeCallbacks[e].forEach(([r,n])=>{try{n(...t)}catch(t){this.log("error",`error in ${e} callback`,t)}})}catch(t){this.log("error",`error triggering ${e} callbacks`,t)}}leaveOpenTopic(e){let t=this.channels.find(t=>t.topic===e&&(t.isJoined()||t.isJoining()));t&&(this.hasLogger()&&this.log("transport",`leaving duplicate topic "${e}"`),t.leave())}};class ew{constructor(e,t){let r=(null==t?void 0:t.events)&&{events:t.events};this.presence=new eg(e.getChannel(),r),this.presence.onJoin((t,r,n)=>{let i=ew.onJoinPayload(t,r,n);e.getChannel().trigger("presence",i)}),this.presence.onLeave((t,r,n)=>{let i=ew.onLeavePayload(t,r,n);e.getChannel().trigger("presence",i)}),this.presence.onSync(()=>{e.getChannel().trigger("presence",{event:"sync"})})}get state(){return ew.transformState(this.presence.state)}static transformState(e){return Object.getOwnPropertyNames(e=JSON.parse(JSON.stringify(e))).reduce((t,r)=>{let n=e[r];return t[r]=ex(n),t},{})}static onJoinPayload(e,t,r){return{event:"join",key:e,currentPresences:eO(t),newPresences:ex(r)}}static onLeavePayload(e,t,r){return{event:"leave",key:e,currentPresences:eO(t),leftPresences:ex(r)}}}function ex(e){return e.metas.map(e=>(e.presence_ref=e.phx_ref,delete e.phx_ref,delete e.phx_ref_prev,e))}function eO(e){return(null==e?void 0:e.metas)?ex(e):[]}(O=m||(m={})).SYNC="sync",O.JOIN="join",O.LEAVE="leave";class ek{get state(){return this.presenceAdapter.state}constructor(e,t){this.channel=e,this.presenceAdapter=new ew(this.channel.channelAdapter,t)}}class ej{constructor(e,t,r){let n={config:Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},r.config)};this.channel=e.getSocket().channel(t,n),this.socket=e}get state(){return this.channel.state}set state(e){this.channel.state=e}get joinedOnce(){return this.channel.joinedOnce}get joinPush(){return this.channel.joinPush}get rejoinTimer(){return this.channel.rejoinTimer}on(e,t){return this.channel.on(e,t)}off(e,t){this.channel.off(e,t)}subscribe(e){return this.channel.join(e)}unsubscribe(e){return this.channel.leave(e)}teardown(){this.channel.teardown()}onClose(e){this.channel.onClose(e)}onError(e){return this.channel.onError(e)}push(e,t,r){let n;try{n=this.channel.push(e,t,r)}catch(t){throw`tried to push '${e}' to '${this.channel.topic}' before joining. Use channel.subscribe() before pushing events`}if(this.channel.pushBuffer.length>100){let e=this.channel.pushBuffer.shift();e.cancelTimeout(),this.socket.log("channel",`discarded push due to buffer overflow: ${e.event}`,e.payload())}return n}updateJoinPayload(e){let t=this.channel.joinPush.payload();this.channel.joinPush.payload=()=>Object.assign(Object.assign({},t),e)}canPush(){return this.socket.isConnected()&&this.state===$.joined}isJoined(){return this.state===$.joined}isJoining(){return this.state===$.joining}isClosed(){return this.state===$.closed}isLeaving(){return this.state===$.leaving}updateFilterBindings(e){this.channel.filterBindings=e}updatePayloadTransform(e){this.channel.onMessage=e}getChannel(){return this.channel}}(k=g||(g={})).ALL="*",k.INSERT="INSERT",k.UPDATE="UPDATE",k.DELETE="DELETE",(j=v||(v={})).BROADCAST="broadcast",j.PRESENCE="presence",j.POSTGRES_CHANGES="postgres_changes",j.SYSTEM="system",(S=b||(b={})).SUBSCRIBED="SUBSCRIBED",S.TIMED_OUT="TIMED_OUT",S.CLOSED="CLOSED",S.CHANNEL_ERROR="CHANNEL_ERROR";class eS{get state(){return this.channelAdapter.state}set state(e){this.channelAdapter.state=e}get joinedOnce(){return this.channelAdapter.joinedOnce}get timeout(){return this.socket.timeout}get joinPush(){return this.channelAdapter.joinPush}get rejoinTimer(){return this.channelAdapter.rejoinTimer}constructor(e,t={config:{}},r){var n,i;if(this.topic=e,this.params=t,this.socket=r,this.bindings={},this.subTopic=e.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},t.config),this.channelAdapter=new ej(this.socket.socketAdapter,e,this.params),this.presence=new ek(this),this._onClose(()=>{this.socket._remove(this)}),this._updateFilterTransform(),this.broadcastEndpointURL=X(this.socket.socketAdapter.endPointURL()),this.private=this.params.config.private||!1,!this.private&&(null===(i=null===(n=this.params.config)||void 0===n?void 0:n.broadcast)||void 0===i?void 0:i.replay))throw`tried to use replay on public channel '${this.topic}'. It must be a private channel.`}subscribe(e,t=this.timeout){var r,n,i;if(this.socket.isConnected()||this.socket.connect(),this.channelAdapter.isClosed()){let{config:{broadcast:o,presence:a,private:s}}=this.params,l=null!==(n=null===(r=this.bindings.postgres_changes)||void 0===r?void 0:r.map(e=>e.filter))&&void 0!==n?n:[],c=!!this.bindings[v.PRESENCE]&&this.bindings[v.PRESENCE].length>0||(null===(i=this.params.config.presence)||void 0===i?void 0:i.enabled)===!0,u={},h={broadcast:o,presence:Object.assign(Object.assign({},a),{enabled:c}),postgres_changes:l,private:s};this.socket.accessTokenValue&&(u.access_token=this.socket.accessTokenValue),this._onError(t=>{null==e||e(b.CHANNEL_ERROR,t)}),this._onClose(()=>null==e?void 0:e(b.CLOSED)),this.updateJoinPayload(Object.assign({config:h},u)),this._updateFilterMessage(),this.channelAdapter.subscribe(t).receive("ok",async({postgres_changes:t})=>{if(this.socket._isManualToken()||this.socket.setAuth(),void 0===t){null==e||e(b.SUBSCRIBED);return}this._updatePostgresBindings(t,e)}).receive("error",t=>{this.state=$.errored,null==e||e(b.CHANNEL_ERROR,Error(JSON.stringify(Object.values(t).join(", ")||"error")))}).receive("timeout",()=>{null==e||e(b.TIMED_OUT)})}return this}_updatePostgresBindings(e,t){var r;let n=this.bindings.postgres_changes,i=null!==(r=null==n?void 0:n.length)&&void 0!==r?r:0,o=[];for(let r=0;r<i;r++){let i=n[r],{filter:{event:a,schema:s,table:l,filter:c}}=i,u=e&&e[r];
6if(u&&u.event===a&&eS.isFilterValueEqual(u.schema,s)&&eS.isFilterValueEqual(u.table,l)&&eS.isFilterValueEqual(u.filter,c))o.push(Object.assign(Object.assign({},i),{id:u.id}));else{this.unsubscribe(),this.state=$.errored,null==t||t(b.CHANNEL_ERROR,Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=o,this.state!=$.errored&&t&&t(b.SUBSCRIBED)}presenceState(){return this.presence.state}async track(e,t={}){return await this.send({type:"presence",event:"track",payload:e},t.timeout||this.timeout)}async untrack(e={}){return await this.send({type:"presence",event:"untrack"},e)}on(e,t,r){let n=this.channelAdapter.isJoined()||this.channelAdapter.isJoining(),i=e===v.PRESENCE||e===v.POSTGRES_CHANGES;if(n&&i)throw this.socket.log("channel",`cannot add \`${e}\` callbacks for ${this.topic} after \`subscribe()\`.`),Error(`cannot add \`${e}\` callbacks for ${this.topic} after \`subscribe()\`.`);return this._on(e,t,r)}async httpSend(e,t,r={}){var n;if(null==t)return Promise.reject("Payload is required for httpSend()");let i={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(i.Authorization=`Bearer ${this.socket.accessTokenValue}`);let o={method:"POST",headers:i,body:JSON.stringify({messages:[{topic:this.subTopic,event:e,payload:t,private:this.private}]})},a=await this._fetchWithTimeout(this.broadcastEndpointURL,o,null!==(n=r.timeout)&&void 0!==n?n:this.timeout);if(202===a.status)return{success:!0};let s=a.statusText;try{let e=await a.json();s=e.error||e.message||s}catch(e){}return Promise.reject(Error(s))}async send(e,t={}){var r,n;if(this.channelAdapter.canPush()||"broadcast"!==e.type)return new Promise(r=>{var n,i,o;let a=this.channelAdapter.push(e.type,e,t.timeout||this.timeout);"broadcast"!==e.type||(null===(o=null===(i=null===(n=this.params)||void 0===n?void 0:n.config)||void 0===i?void 0:i.broadcast)||void 0===o?void 0:o.ack)||r("ok"),a.receive("ok",()=>r("ok")),a.receive("error",()=>r("error")),a.receive("timeout",()=>r("timed out"))});{console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated 
6in the future. Please use httpSend() explicitly for REST delivery.");let{event:i,payload:o}=e,a={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(a.Authorization=`Bearer ${this.socket.accessTokenValue}`);let s={method:"POST",headers:a,body:JSON.stringify({messages:[{topic:this.subTopic,event:i,payload:o,private:this.private}]})};try{let e=await this._fetchWithTimeout(this.broadcastEndpointURL,s,null!==(r=t.timeout)&&void 0!==r?r:this.timeout);return await (null===(n=e.body)||void 0===n?void 0:n.cancel()),e.ok?"ok":"error"}catch(e){if("AbortError"===e.name)return"timed out";return"error"}}}updateJoinPayload(e){this.channelAdapter.updateJoinPayload(e)}async unsubscribe(e=this.timeout){return new Promise(t=>{this.channelAdapter.unsubscribe(e).receive("ok",()=>t("ok")).receive("timeout",()=>t("timed out")).receive("error",()=>t("error"))})}teardown(){this.channelAdapter.teardown()}async _fetchWithTimeout(e,t,r){let n=new AbortController,i=setTimeout(()=>n.abort(),r),o=await this.socket.fetch(e,Object.assign(Object.assign({},t),{signal:n.signal}));return clearTimeout(i),o}_on(e,t,r){let n=e.toLocaleLowerCase(),i=this.channelAdapter.on(e,r),o={type:n,filter:t,callback:r,ref:i};return this.bindings[n]?this.bindings[n].push(o):this.bindings[n]=[o],this._updateFilterMessage(),this}_onClose(e){this.channelAdapter.onClose(e)}_onError(e){this.channelAdapter.onError(e)}_updateFilterMessage(){this.channelAdapter.updateFilterBindings((e,t,r)=>{var n,i,o,a,s,l,c;let u=e.event.toLocaleLowerCase();if(this._notThisChannelEvent(u,r))return!1;let h=null===(n=this.bindings[u])||void 0===n?void 0:n.find(t=>t.ref===e.ref);if(!h)return!0;if(!["broadcast","presence","postgres_changes"].includes(u))return h.type.toLocaleLowerCase()===u;if("id"in h){let e=h.id,r=null===(i=h.filter)||void 0===i?void 0:i.event;return e&&(null===(o=t.ids)||void 0===o?void 0:o.includes(e))&&("*"===r||(null==r?void 0:r.toLocaleLowerCase())===(null===(a=t.data)||void 0===a?void 0:a.type.toLocaleLowerCase()))}{let e=null===(l=null===(s=null==h?void 0:h.filter)||void 0===s?void 0:s.event)||void 0===l?void 0:l.toLocaleLowerCase();return"*"===e||e===(null===(c=null==t?void 0:t.event)||void 0===c?void 0:c.toLocaleLowerCase())}})}_notThisChannelEvent(e,t){let{close:r,error:n,leave:i,join:o}=U;return t&&[r,n,i,o].includes(e)&&t!==this.joinPush.ref}_updateFilterTransform(){this.channelAdapter.updatePayloadTransform((e,t,r)=>{if("object"==typeof t&&"ids"in t){let e=t.data,{schema:r,table:n,commit_timestamp:i,type:o,errors:a}=e;return Object.assign(Object.assign({},{schema:r,table:n,commit_timestamp:i,eventType:o,new:{},old:{},errors:a}),this._getPayloadRecords(e))}return t})}copyBindings(e){if(this.joinedOnce)throw Error("cannot copy bindings into joined channel");for(let t in e.bindings)for(let r of e.bindings[t])this._on(r.type,r.filter,r.callback)}static isFilterValueEqual(e,t){return(null!=e?e:void 0)===(null!=t?t:void 0)}_getPayloadRecords(e){let t={new:{},old:{}};return("INSERT"===e.type||"UPDATE"===e.type)&&(t.new=F(e.columns,e.record)),("UPDATE"===e.type||"DELETE"===e.type)&&(t.old=F(e.columns,e.old_record)),t}}class e_{constructor(e,t){this.socket=new eb(e,t)}get timeout(){return this.socket.timeout}get endPoint(){return this.socket.endPoint}get transport(){return this.socket.transport}get heartbeatIntervalMs(){return this.socket.heartbeatIntervalMs}get heartbeatCallback(){return this.socket.heartbeatCallback}set heartbeatCallback(e){this.socket.heartbeatCallback=e}get heartbeatTimer(){return this.socket.heartbeatTimer}get pendingHeartbeatRef(){return this.socket.pendingHeartbeatRef}get reconnectTimer(){return this.socket.reconnectTimer}get vsn(){return this.socket.vsn}get encode(){return this.socket.encode}get decode(){return this.socket.decode}get reconnectAfterMs(){return this.socket.reconnectAfterMs}get sendBuffer(){return this.socket.sendBuffer}get stateChangeCallbacks(){return this.socket.stateChangeCallbacks}connect(){this.socket.connect()}disconnect(e,t,r,n=1e4){return new Promise(i=>{setTimeout(()=>i("timeout"),n),this.socket.disconnect(()=>{e(),i("ok")},t,r)})}push(e){this.socket.push(e)}log(e,t,r){this.socket.log(e,t,r)}makeRef(){return this.socket.makeRef()}onOpen(e){this.socket.onOpen(e)}onClose(e){this.socket.onClose(e)}onError(e){this.socket.onError(e)}onMessage(e){this.socket.onMessage(e)}isConnected(){return this.socket.isConnected()}isConnecting(){return this.socket.connectionState()==q.connecting}isDisconnecting(){return this.socket.connectionState()==q.closing}connectionState(){return this.socket.connectionState()}endPointURL(){return this.socket.endPointURL()}sendHeartbeat(){this.socket.sendHeartbeat()}getSocket(){return this.socket}}let eE={HEARTBEAT_INTERVAL:25e3},eA=[1e3,2e3,5e3,1e4],eP=`
7  addEventListener("message", (e) => {
8    if (e.data.event === "start") {
9      setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval);
10    }
11  });`;class eT{get endPoint(){return this.socketAdapter.endPoint}get timeout(){return this.socketAdapter.timeout}get transport(){return this.socketAdapter.transport}get heartbeatCallback(){return this.socketAdapter.heartbeatCallback}get heartbeatIntervalMs(){return this.socketAdapter.heartbeatIntervalMs}get heartbeatTimer(){return this.worker?this._workerHeartbeatTimer:this.socketAdapter.heartbeatTimer}get pendingHeartbeatRef(){return this.worker?this._pendingWorkerHeartbeatRef:this.socketAdapter.pendingHeartbeatRef}get reconnectTimer(){return this.socketAdapter.reconnectTimer}get vsn(){return this.socketAdapter.vsn}get encode(){return this.socketAdapter.encode}get decode(){return this.socketAdapter.decode}get reconnectAfterMs(){return this.socketAdapter.reconnectAfterMs}get sendBuffer(){return this.socketAdapter.sendBuffer}get stateChangeCallbacks(){return this.socketAdapter.stateChangeCallbacks}constructor(e,t){var r;if(this.channels=[],this.accessTokenValue=null,this.accessToken=null,this.apiKey=null,this.httpEndpoint="",this.headers={},this.params={}
11,this.ref=0,this.serializer=new z,this._manuallySetToken=!1,this._authPromise=null,this._workerHeartbeatTimer=void 0,this._pendingWorkerHeartbeatRef=null,this._resolveFetch=e=>e?(...t)=>e(...t):(...e)=>fetch(...e),!(null===(r=null==t?void 0:t.params)||void 0===r?void 0:r.apikey))throw Error("API key is required to connect to Realtime");this.apiKey=t.params.apikey;let n=this._initializeOptions(t);this.socketAdapter=new e_(e,n),this.httpEndpoint=X(e),this.fetch=this._resolveFetch(null==t?void 0:t.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.isConnected())){this.accessToken&&!this._authPromise&&this._setAuthSafely("connect"),this._setupConnectionHandlers();try{this.socketAdapter.connect()}catch(t){let e=t.message;if(e.includes("Node.js"))throw Error(`${e}
12
13To use Realtime in Node.js, you need to provide a WebSocket implementation:
14
15Option 1: Use Node.js 22+ which has native WebSocket support
16Option 2: Install and provide the "ws" package:
17
18  npm install ws
19
20  import ws from "ws"
21  const client = new RealtimeClient(url, {
22    ...options,
23    transport: ws
24  })`);throw Error(`WebSocket not available: ${e}`)}this._handleNodeJsRaceCondition()}}endpointURL(){return this.socketAdapter.endPointURL()}async disconnect(e,t){return this.isDisconnecting()?"ok":await this.socketAdapter.disconnect(()=>{clearInterval(this._workerHeartbeatTimer),this._terminateWorker()},e,t)}getChannels(){return this.channels}async removeChannel(e){let t=await e.unsubscribe();return"ok"===t&&e.teardown(),0===this.channels.length&&this.disconnect(),t}async removeAllChannels(){let e=this.channels.map(async e=>{let t=await e.unsubscribe();return e.teardown(),t}),t=await Promise.all(e);return this.disconnect(),t}log(e,t,r){this.socketAdapter.log(e,t,r)}connectionState(){return this.socketAdapter.connectionState()||q.closed}isConnected(){return this.socketAdapter.isConnected()}isConnecting(){return this.socketAdapter.isConnecting()}isDisconnecting(){return this.socketAdapter.isDisconnecting()}channel(e,t={config:{}}){let r=`realtime:${e}`,n=this.getChannels().find(e=>e.topic===r);if(n)return n;{let r=new eS(`realtime:${e}`,t,this);return this.channels.push(r),r}}push(e){this.socketAdapter.push(e)}async setAuth(e=null){this._authPromise=this._performAuth(e);try{await this._authPromise}finally{this._authPromise=null}}_isManualToken(){return this._manuallySetToken}async sendHeartbeat(){this.socketAdapter.sendHeartbeat()}onHeartbeat(e){this.socketAdapter.heartbeatCallback=this._wrapHeartbeatCallback(e)}_makeRef(){return this.socketAdapter.makeRef()}_remove(e){this.channels=this.channels.filter(t=>t.topic!==e.topic)}async _performAuth(e=null){let t;let r=!1;if(e)t=e,r=!0;else if(this.accessToken)try{t=await this.accessToken()}catch(e){this.log("error","Error fetching access token from callback",e),t=this.accessTokenValue}else t=this.accessTokenValue;r?this._manuallySetToken=!0:this.accessToken&&(this._manuallySetToken=!1),this.accessTokenValue!=t&&(this.accessTokenValue=t,this.channels.forEach(e=>{let r={access_token:t,version:"realtime-js/2.103.0"};t&&e.updateJoinPayload(r),e.joinedOnce&&e.channelAdapter.isJoined()&&e.channelAdapter.push(U.access_token,{access_token:t})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(e="general"){this._isManualToken()||this.setAuth().catch(t=>{this.log("error",`Error setting auth in ${e}`,t)})}_setupConnectionHandlers(){this.socketAdapter.onOpen(()=>{(this._authPromise||(this.accessToken&&!this.accessTokenValue?this.setAuth():Promise.resolve())).catch(e=>{this.log("error","error waiting for auth on connect",e)}),this.worker&&!this.workerRef&&this._startWorkerHeartbeat()}),this.socketAdapter.onClose(()=>{this.worker&&this.workerRef&&this._terminateWorker()}),this.socketAdapter.onMessage(e=>{e.ref&&e.ref===this._pendingWorkerHeartbeatRef&&(this._pendingWorkerHeartbeatRef=null)})}_handleNodeJsRaceCondition(){this.socketAdapter.isConnected()&&this.socketAdapter.getSocket().onConnOpen()}_wrapHeartbeatCallback(e){return(t,r)=>{"sent"==t&&this._setAuthSafely(),e&&e(t,r)}}_startWorkerHeartbeat(){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");let e=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(e),this.workerRef.onerror=e=>{this.log("worker","worker error",e.message),this._terminateWorker(),this.disconnect()},this.workerRef.onmessage=e=>{"keepAlive"===e.data.event&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}_terminateWorker(){this.workerRef&&(this.log("worker","terminating worker"),this.workerRef.terminate(),this.workerRef=void 0)}_workerObjectUrl(e){let t;if(e)t=e;else{let e=new Blob([eP],{type:"application/javascript"});t=URL.createObjectURL(e)}return t}_initializeOptions(e){var t,r,n,i,o,a,s,l,c;let u,h;this.worker=null!==(t=null==e?void 0:e.worker)&&void 0!==t&&t,this.accessToken=null!==(r=null==e?void 0:e.accessToken)&&void 0!==r?r:null;let f={};f.timeout=null!==(n=null==e?void 0:e.timeout)&&void 0!==n?n:1e4,f.heartbeatIntervalMs=null!==(i=null==e?void 0:e.heartbeatIntervalMs)&&void 0!==i?i:eE.HEARTBEAT_INTERVAL,f.transport=null!==(o=null==e?void 0:e.transport)&&void 0!==o?o:L.getWebSocketConstructor(),f.params=null==e?void 0:e.params,f.logger=null==e?void 0:e.logger,f.heartbeatCallback=this._wrapHeartbeatCallback(null==e?void 0:e.heartbeatCallback),f.reconnectAfterMs=null!==(a=null==e?void 0:e.reconnectAfterMs)&&void 0!==a?a:e=>eA[e-1]||1e4;let d=null!==(s=null==e?void 0:e.vsn)&&void 0!==s?s:B;switch(d){case"1.0.0":u=(e,t)=>t(JSON.stringify(e)),h=(e,t)=>t(JSON.parse(e));break;case B:u=this.serializer.encode.bind(this.serializer),h=this.serializer.decode.bind(this.serializer);break;default:throw Error(`Unsupported serializer version: ${f.vsn}`)}if(f.vsn=d,f.encode=null!==(l=null==e?void 0:e.encode)&&void 0!==l?l:u,f.decode=null!==(c=null==e?void 0:e.decode)&&void 0!==c?c:h,f.beforeReconnect=this._reconnectAuth.bind(this),((null==e?void 0:e.logLevel)||(null==e?void 0:e.log_level))&&(this.logLevel=e.logLevel||e.log_level,f.params=Object.assign(Object.assign({},f.params),{log_level:this.logLevel})),this.worker){if("undefined"!=typeof window&&!window.Worker)throw Error("Web Worker is not supported");this.workerUrl=null==e?void 0:e.workerUrl,f.autoSendHeartbeat=!this.worker}return f}async _reconnectAuth(){await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()}}
24var eN=class extends Error{constructor(e,t){super(e),this.name="IcebergError",this.status=t.status,this.icebergType=t.icebergType,this.icebergCode=t.icebergCode,this.details=t.details,this.isCommitStateUnknown="CommitStateUnknownException"===t.icebergType||[500,502,504].includes(t.status)&&t.icebergType?.includes("CommitState")===!0}isNotFound(){return 404===this.status}isConflict(){return 409===this.status}isAuthenticationTimeout(){return 419===this.status}};async function eC(e){return e&&"none"!==e.type?"bearer"===e.type?{Authorization:`Bearer ${e.token}`}:"header"===e.type?{[e.name]:e.value}:"custom"===e.type?await e.getHeaders():{}:{}}function eM(e){return e.join("\x1f")}var eI=class{constructor(e,t=""){this.client=e,this.prefix=t}async listNamespaces(e){let t=e?{parent:eM(e.namespace)}:void 0;return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces`,query:t})).data.namespaces.map(e=>({namespace:e}))}async createNamespace(e,t){let r={namespace:e.namespace,properties:t?.properties};return(await this.client.request({method:"POST",path:`${this.prefix}/namespaces`,body:r})).data}async dropNamespace(e){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${eM(e.namespace)}`})}async loadNamespaceMetadata(e){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${eM(e.namespace)}`})).data.properties}}async namespaceExists(e){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${eM(e.namespace)}`}),!0}catch(e){if(e instanceof eN&&404===e.status)return!1;throw e}}async createNamespaceIfNotExists(e,t){try{return await this.createNamespace(e,t)}catch(e){if(e instanceof eN&&409===e.status)return;throw e}}};function eR(e){return e.join("\x1f")}var eD=class{constructor(e,t="",r){this.client=e,this.prefix=t,this.accessDelegation=r}async listTables(e){return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${eR(e.namespace)}/tables`})).data.identifiers}async createTable(e,t){let r={};return this.accessDelegation&&(r["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${eR(e.namespace)}/tables`,body:t,headers:r})).data.metadata}async updateTable(e,t){let r=await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${eR(e.namespace)}/tables/${e.name}`,body:t});return{"metadata-location":r.data["metadata-location"],metadata:r.data.metadata}}async dropTable(e,t){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${eR(e.namespace)}/tables/${e.name}`,query:{purgeRequested:String(t?.purge??!1)}})}async loadTable(e){let t={};return this.accessDelegation&&(t["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${eR(e.namespace)}/tables/${e.name}`,headers:t})).data.metadata}async tableExists(e){let t={};this.accessDelegation&&(t["X-Iceberg-Access-Delegation"]=this.accessDelegation);try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${eR(e.namespace)}/tables/${e.name}`,headers:t}),!0}catch(e){if(e instanceof eN&&404===e.status)return!1;throw e}}async createTableIfNotExists(e,t){try{return await this.createTable(e,t)}catch(r){if(r instanceof eN&&409===r.status)return await this.loadTable({namespace:e.namespace,name:t.name});throw r}}},eL=class{constructor(e){let t="v1";e.catalogName&&(t+=`/${e.catalogName}`);let r=e.baseUrl.endsWith("/")?e.baseUrl:`${e.baseUrl}/`;this.client=function(e){let t=e.fetchImpl??globalThis.fetch;return{async request({method:r,path:n,query:i,body:o,headers:a}){let s=function(e,t,r){let n=new URL(t,e);if(r)for(let[e,t]of Object.entries(r))void 0!==t&&n.searchParams.set(e,t);return n.toString()}(e.baseUrl,n,i),l=await eC(e.auth),c=await t(s,{method:r,headers:{...o?{"Content-Type":"application/json"}:{},...l,...a},body:o?JSON.stringify(o):void 0}),u=await c.text(),h=(c.headers.get("content-type")||"").includes("application/json"),f=h&&u?JSON.parse(u):u;if(!c.ok){let e=h?f:void 0,t=e?.error;throw new eN(t?.message??`Request failed with status ${c.status}`,{status:c.status,icebergType:t?.type,icebergCode:t?.code,details:e})}return{status:c.status,headers:c.headers,data:f}}}}({baseUrl:r,auth:e.auth,fetchImpl:e.fetch}),this.accessDelegation=e.accessDelegation?.join(","),this.namespaceOps=new eI(this.client,t),this.tableOps=new eD(this.client,t,this.accessDelegation)}async listNamespaces(e){return this.namespaceOps.listNamespaces(e)}async createNamespace(e,t){return this.namespaceOps.createNamespace(e,t)}async dropNamespace(e){await this.namespaceOps.dropNamespace(e)}async loadNamespaceMetadata(e){return this.namespaceOps.loadNamespaceMetadata(e)}async listTables(e){return this.tableOps.listTables(e)}
24async createTable(e,t){return this.tableOps.createTable(e,t)}async updateTable(e,t){return this.tableOps.updateTable(e,t)}async dropTable(e,t){await this.tableOps.dropTable(e,t)}async loadTable(e){return this.tableOps.loadTable(e)}async namespaceExists(e){return this.namespaceOps.namespaceExists(e)}async tableExists(e){return this.tableOps.tableExists(e)}async createNamespaceIfNotExists(e,t){return this.namespaceOps.createNamespaceIfNotExists(e,t)}async createTableIfNotExists(e,t){return this.tableOps.createTableIfNotExists(e,t)}},eB=r(86300).Buffer,e$=class extends Error{constructor(e,t="storage",r,n){super(e),this.__isStorageError=!0,this.namespace=t,this.name="vectors"===t?"StorageVectorsError":"StorageError",this.status=r,this.statusCode=n}};function eU(e){return"object"==typeof e&&null!==e&&"__isStorageError"in e}var eq=class extends e${constructor(e,t,r,n="storage"){super(e,n,t,r),this.name="vectors"===n?"StorageVectorsApiError":"StorageApiError",this.status=t,this.statusCode=r}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}},ez=class extends e${constructor(e,t,r="storage"){super(e,r),this.name="vectors"===r?"StorageVectorsUnknownError":"StorageUnknownError",this.originalError=t}};let eF=e=>e?(...t)=>e(...t):(...e)=>fetch(...e),eW=e=>{if("object"!=typeof e||null===e)return!1;let t=Object.getPrototypeOf(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},eH=e=>{if(Array.isArray(e))return e.map(e=>eH(e));if("function"==typeof e||e!==Object(e))return e;let t={};return Object.entries(e).forEach(([e,r])=>{t[e.replace(/([-_][a-z])/gi,e=>e.toUpperCase().replace(/[-_]/g,""))]=eH(r)}),t},eV=e=>!(!e||"string"!=typeof e||0===e.length||e.length>100||e.trim()!==e||e.includes("/")||e.includes("\\"))&&/^[\w!.\*'() &$@=;:+,?-]+$/.test(e);function eK(e){return(eK="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function eG(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function eZ(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?eG(Object(r),!0).forEach(function(t){!function(e,t,r){var n;(n=function(e,t){if("object"!=eK(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=eK(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"),(t="symbol"==eK(n)?n:n+"")in e)?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):eG(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}let eJ=e=>{var t;return e.msg||e.message||e.error_description||("string"==typeof e.error?e.error:null===(t=e.error)||void 0===t?void 0:t.message)||JSON.stringify(e)},eY=async(e,t,r,n)=>{if(null!==e&&"object"==typeof e&&"function"==typeof e.json){let r=parseInt(e.status,10);Number.isFinite(r)||(r=500),e.json().then(e=>{let i=(null==e?void 0:e.statusCode)||(null==e?void 0:e.code)||r+"";t(new eq(eJ(e),r,i,n))}).catch(()=>{let i=r+"";t(new eq(e.statusText||`HTTP ${r} error`,r,i,n))})}else t(new ez(eJ(e),e,n))},eX=(e,t,r,n)=>{let i={method:e,headers:(null==t?void 0:t.headers)||{}};if("GET"===e||"HEAD"===e||!n)return eZ(eZ({},i),r);if(eW(n)){var o;let e;let r=(null==t?void 0:t.headers)||{};for(let[t,n]of Object.entries(r))"content-type"===t.toLowerCase()&&(e=n);i.headers=function(e,t,r){let n=eZ({},e);for(let e of Object.keys(n))e.toLowerCase()===t.toLowerCase()&&delete n[e];return n[t]=r,n}(r,"Content-Type",null!==(o=e)&&void 0!==o?o:"application/json"),i.body=JSON.stringify(n)}else i.body=n;return(null==t?void 0:t.duplex)&&(i.duplex=t.duplex),eZ(eZ({},i),r)};async function eQ(e,t,r,n,i,o,a){return new Promise((s,l)=>{e(r,eX(t,n,i,o)).then(e=>{if(!e.ok)throw e;if(null==n?void 0:n.noResolveJson)return e;if("vectors"===a){let t=e.headers.get("content-type");if("0"===e.headers.get("content-length")||204===e.status||!t||!t.includes("application/json"))return{}}return e.json()}).then(e=>s(e)).catch(e=>eY(e,l,n,a))})}function e0(e="storage"){return{get:async(t,r,n,i)=>eQ(t,"GET",r,n,i,void 0,e),post:async(t,r,n,i,o)=>eQ(t,"POST",r,i,o,n,e),put:async(t,r,n,i,o)=>eQ(t,"PUT",r,i,o,n,e),head:async(t,r,n,i)=>eQ(t,"HEAD",r,eZ(eZ({},n),{},{noResolveJson:!0}),i,void 0,e),remove:async(t,r,n,i,o)=>eQ(t,"DELETE",r,i,o,n,e)}}let{get:e1,post:e2,put:e3,head:e5,remove:e4}=e0("storage"),e6=e0("vectors");var e8=class{constructor(e,t={},r,n="storage"){this.shouldThrowOnError=!1,this.url=e,this.headers=Object.fromEntries(Object.entries(t).map(([e,t])=>[e.toLowerCase(),t])),this.fetch=eF(r),this.namespace=n}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,t){return this.headers=eZ(eZ({},this.headers),{},{[e.toLowerCase()]:t}),this}async handleOperation(e){try{return{data:await e(),error:null}}catch(e){if(this.shouldThrowOnError)throw e;if(eU(e))return{data:null,error:e};throw e}}},e7=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t}then(e,t){return this.execute().then(e,t)}async execute(){try{return{data:(await this.downloadFn()).body,error:null}}catch(e){if(this.shouldThrowOnError)throw e;if(eU(e))return{data:null,error:e};throw e}}};n=Symbol.toStringTag;var e9=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[n]="BlobDownloadBuilder",this.promise=null}asStream(){return new e7(this.downloadFn,this.shouldThrowOnError)}then(e,t){return this.getPromise().then(e,t)}catch(e){return this.getPromise().catch(e)}finally(e){return this.getPromise().finally(e)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){try{return{data:await (await this.downloadFn()).blob(),error:null}}catch(e){if(this.shouldThrowOnError)throw e;if(eU(e))return{data:null,error:e};throw e}}};let te={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},tt={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var tr=class extends e8{constructor(e,t={},r,n){super(e,t,n,"storage"),this.bucketId=r}async uploadOrUpdate(e,t,r,n){var i=this;return i.handleOperation(async()=>{let o;let a=eZ(eZ({},tt),n),s=eZ(eZ({},i.headers),"POST"===e&&{"x-upsert":String(a.upsert)}),l=a.metadata;"undefined"!=typeof Blob&&r instanceof Blob?((o=new FormData).append("cacheControl",a.cacheControl),l&&o.append("metadata",i.encodeMetadata(l)),o.append("",r)):"undefined"!=typeof FormData&&r instanceof FormData?((o=r).has("cacheControl")||o.append("cacheControl",a.cacheControl),l&&!o.has("metadata")&&o.append("metadata",i.encodeMetadata(l))):(o=r,s["cache-control"]=`max-age=${a.cacheControl}`,s["content-type"]=a.contentType,l&&(s["x-metadata"]=i.toBase64(i.encodeMetadata(l))),("undefined"!=typeof ReadableStream&&o 
24instanceof ReadableStream||o&&"object"==typeof o&&"pipe"in o&&"function"==typeof o.pipe)&&!a.duplex&&(a.duplex="half")),(null==n?void 0:n.headers)&&(s=eZ(eZ({},s),n.headers));let c=i._removeEmptyFolders(t),u=i._getFinalPath(c),h=await ("PUT"==e?e3:e2)(i.fetch,`${i.url}/object/${u}`,o,eZ({headers:s},(null==a?void 0:a.duplex)?{duplex:a.duplex}:{}));return{path:c,id:h.Id,fullPath:h.Key}})}async upload(e,t,r){return this.uploadOrUpdate("POST",e,t,r)}async uploadToSignedUrl(e,t,r,n){var i=this;let o=i._removeEmptyFolders(e),a=i._getFinalPath(o),s=new URL(i.url+`/object/upload/sign/${a}`);return s.searchParams.set("token",t),i.handleOperation(async()=>{let e;let t=eZ(eZ({},tt),n),a=eZ(eZ({},i.headers),{"x-upsert":String(t.upsert)});return"undefined"!=typeof Blob&&r instanceof Blob?((e=new FormData).append("cacheControl",t.cacheControl),e.append("",r)):"undefined"!=typeof FormData&&r instanceof FormData?(e=r).append("cacheControl",t.cacheControl):(e=r,a["cache-control"]=`max-age=${t.cacheControl}`,a["content-type"]=t.contentType),{path:o,fullPath:(await e3(i.fetch,s.toString(),e,{headers:a})).Key}})}async createSignedUploadUrl(e,t){var r=this;return r.handleOperation(async()=>{let n=r._getFinalPath(e),i=eZ({},r.headers);(null==t?void 0:t.upsert)&&(i["x-upsert"]="true");let o=await e2(r.fetch,`${r.url}/object/upload/sign/${n}`,{},{headers:i}),a=new URL(r.url+o.url),s=a.searchParams.get("token");if(!s)throw new e$("No token returned by API");return{signedUrl:a.toString(),path:e,token:s}})}async update(e,t,r){return this.uploadOrUpdate("PUT",e,t,r)}async move(e,t,r){var n=this;return n.handleOperation(async()=>await e2(n.fetch,`${n.url}/object/move`,{bucketId:n.bucketId,sourceKey:e,destinationKey:t,de
24stinationBucket:null==r?void 0:r.destinationBucket},{headers:n.headers}))}async copy(e,t,r){var n=this;return n.handleOperation(async()=>({path:(await e2(n.fetch,`${n.url}/object/copy`,{bucketId:n.bucketId,sourceKey:e,destinationKey:t,destinationBucket:null==r?void 0:r.destinationBucket},{headers:n.headers})).Key}))}async createSignedUrl(e,t,r){var n=this;return n.handleOperation(async()=>{let i=n._getFinalPath(e),o="object"==typeof(null==r?void 0:r.transform)&&null!==r.transform&&Object.keys(r.transform).length>0,a=await e2(n.fetch,`${n.url}/object/sign/${i}`,eZ({expiresIn:t},o?{transform:r.transform}:{}),{headers:n.headers}),s=new URLSearchParams;(null==r?void 0:r.download)&&s.set("download",!0===r.download?"":r.download),(null==r?void 0:r.cacheNonce)!=null&&s.set("cacheNonce",String(r.cacheNonce));let l=s.toString(),c=o&&a.signedURL.includes("/object/sign/")?a.signedURL.replace("/object/sign/","/render/image/sign/"):a.signedURL;return{signedUrl:encodeURI(`${n.url}${c}${l?`&${l}`:""}`)}})}async createSignedUrls(e,t,r){var n=this;return n.handleOperation(async()=>{let i=await e2(n.fetch,`${n.url}/object/sign/${n.bucketId}`,{expiresIn:t,paths:e},{headers:n.headers}),o=new URLSearchParams;(null==r?void 0:r.download)&&o.set("download",!0===r.download?"":r.download),(null==r?void 0:r.cacheNonce)!=null&&o.set("cacheNonce",String(r.cacheNonce));let a=o.toString();return i.map(e=>eZ(eZ({},e),{},{signedUrl:e.signedURL?encodeURI(`${n.url}${e.signedURL}${a?`&${a}`:""}`):null}))})}download(e,t,r){let n=void 0!==(null==t?void 0:t.transform)?"render/image/authenticated":"object",i=new URLSearchParams;(null==t?void 0:t.transform)&&this.applyTransformOptsToQuery(i,t.transform),(null==t?void 0:t.cacheNonce)!=null&&i.set("cacheNonce",String(t.cacheNonce));let o=i.toString(),a=this._getFinalPath(e);return new e9(()=>e1(this.fetch,`${this.url}/${n}/${a}${o?`?${o}`:""}`,{headers:this.headers,noResolveJson:!0},r),this.shouldThrowOnError)}async info(e){var t=this;let r=t._getFinalPath(e);return t.handleOperation(async()=>eH(await e1(t.fetch,`${t.url}/object/info/${r}`,{headers:t.headers})))}async exists(e){var t;let r=this._getFinalPath(e);try{return await e5(this.fetch,`${this.url}/object/${r}`,{headers:this.headers}),{data:!0,error:null}}catch(e){if(this.shouldThrowOnError)throw e;if(eU(e)){let r=e instanceof eq?e.status:e instanceof ez?null===(t=e.originalError)||void 0===t?void 0:t.status:void 0;if(void 0!==r&&[400,404].includes(r))return{data:!1,error:e}}throw e}}getPublicUrl(e,t){let r=this._getFinalPath(e),n=new URLSearchParams;(null==t?void 0:t.download)&&n.set("download",!0===t.download?"":t.download),(null==t?void 0:t.transform)&&this.applyTransformOptsToQuery(n,t.transform),(null==t?void 0:t.cacheNonce)!=null&&n.set("cacheNonce",String(t.cacheNonce));let i=n.toString(),o=void 0!==(null==t?void 0:t.transform)?"render/image":"object";return{data:{publicUrl:encodeURI(`${this.url}/${o}/public/${r}`)+(i?`?${i}`:"")}}}async remove(e){var t=this;return t.handleOperation(async()=>await e4(t.fetch,`${t.url}/object/${t.bucketId}`,{prefixes:e},{headers:t.headers}))}async list(e,t,r){var n=this;return n.handleOperation(async()=>{let i=eZ(eZ(eZ({},te),t),{},{prefix:e||""});return await e2(n.fetch,`${n.url}/object/list/${n.bucketId}`,i,{headers:n.headers},r)})}async listV2(e,t){var r=this;return r.handleOperation(async()=>{let n=eZ({},e);return await e2(r.fetch,`${r.url}/object/list-v2/${r.bucketId}`,n,{headers:r.headers},t)})}encodeMetadata(e){return JSON.stringify(e)}toBase64(e){return void 0!==eB?eB.from(e).toString("base64"):btoa(e)}_getFinalPath(e){return`${this.bucketId}/${e.replace(/^\/+/,"")}`}_removeEmptyFolders(e){return e.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}applyTransformOptsToQuery(e,t){return t.width&&e.set("width",t.width.toString()),t.height&&e.set("height",t.height.toString()),t.resize&&e.set("resize",t.resize),t.format&&e.set("format",t.format),t.quality&&e.set("quality",t.quality.toString()),e}};let tn={"X-Client-Info":"storage-js/2.103.0"};var ti=class extends e8{constructor(e,t={},r,n){let i=new URL(e);(null==n?void 0:n.useNewHostname)&&/supabase\.(co|in|red)$/.test(i.hostname)&&!i.hostname.includes("storage.supabase.")&&(i.hostname=i.hostname.replace("supabase.","storage.supabase.")),super(i.href.replace(/\/$/,""),eZ(eZ({},tn),t),r,"storage")}async listBuckets(e){var t=this;return t.handleOperation(async()=>{let r=t.listBucketOptionsToQueryString(e);return await e1(t.fetch,`${t.url}/bucket${r}`,{headers:t.headers})})}async getBucket(e){var t=this;return t.handleOperation(async()=>await e1(t.fetch,`${t.url}/bucket/${e}`,{headers:t.headers}))}async createBucket(e,t={public:!1}){var r=this;return r.handleOperation(async()=>await e2(r.fetch,`${r.url}/bucket`,{id:e,name:e,type:t.type,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:r.headers}))}async updateBucket(e,t){var r=this;return r.handleOperation(async()=>await e3(r.fetch,`${r.url}/bucket/${e}`,{id:e,name:e,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:r.headers}))}async emptyBucket(e){var t=this;return t.handleOperation(async()=>await e2(t.fetch,`${t.url}/bucket/${e}/empty`,{},{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await e4(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}listBucketOptionsToQueryString(e){let t={};return e&&("limit"in e&&(t.limit=String(e.limit)),"offset"in e&&(t.offset=String(e.offset)),e.search&&(t.search=e.search),e.sortColumn&&(t.sortColumn=e.sortColumn),e.sortOrder&&(t.sortOrder=e.sortOrder)),Object.keys(t).length>0?"?"+new URLSearchParams(t).toString():""}},to=class extends e8{constructor(e,t={},r){super(e.replace(/\/$/,""),eZ(eZ({},tn),t),r,"storage")}async createBucket(e){var t=this;return t.handleOperation(async()=>await e2(t.fetch,`${t.url}/bucket`,{name:e},{headers:t.headers}))}async listBuckets(e){var t=this;return t.handleOperation(async()=>{let r=new URLSearchParams;(null==e?void 0:e.limit)!==void 0&&r.set("limit",e.limit.toString()),(null==e?void 0:e.offset)!==void 0&&r.set("offset",e.offset.toString()),(null==e?void 0:e.sortColumn)&&r.set("sortColumn",e.sortColumn),(null==e?void 0:e.sortOrder)&&r.set("sortOrder",e.sortOrder),(null==e?void 0:e.search)&&r.set("search",e.search);let n=r.toString(),i=n?`${t.url}/bucket?${n}`:`${t.url}/bucket`;return await e1(t.fetch,i,{headers:t.headers})})}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await e4(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}from(e){var t=this;if(!eV(e))throw new e$("Invalid bucket name: File, folder, and bucket names must follow AWS object key naming guidelines and should avoid the use of any other characters.");let r=new eL({baseUrl:this.url,catalogName:e,auth:{type:"custom",getHeaders:async()=>t.headers},fetch:this.fetch}),n=this.shouldThrowOnError;return new Proxy(r,{get(e,t){let r=e[t];return"function"!=typeof r?r:async(...t)=>{try{return{data:await r.apply(e,t),error:null}}catch(e){if(n)throw e;return{data:null,error:e}}}}})}},ta=class extends e8{constructor(e,t={},r){super(e.replace(/\/$/,""),eZ(eZ({},tn),{},{"Content-Type":"application/json"},t),r,"vectors")}async createIndex(e){var t=this;return t.handleOperation(async()=>await e6.post(t.fetch,`${t.url}/CreateIndex`,e,{headers:t.headers})||{})}async getIndex(e,t){var r=this;return r.handleOperation(async()=>await e6.post(r.fetch,`${r.url}/GetIndex`,{vectorBucketName:e,indexName:t},{headers:r.headers}))}async listIndexes(e){var t=this;return t.handleOperation(async()=>await e6.post(t.fetch,`${t.url}/ListIndexes`,e,{headers:t.headers}))}async deleteIndex(e,t){var r=this;return r.handleOperation(async()=>await e6.post(r.fetch,`${r.url}/DeleteIndex`,{vectorBucketName:e,indexName:t},{headers:r.headers})||{})}},ts=class extends e8{constructor(e,t={},r){super(e.replace(/\/$/,""),eZ(eZ({},tn),{},{"Content-Type":"application/json"},t),r,"vectors")}async putVectors(e){var t=this;if(e.vectors.length<1||e.vectors.length>500)throw Error("Vector batch size must be between 1 and 500 items");return t.handleOperation(async()=>await e6.post(t.fetch,`${t.url}/PutVectors`,e,{headers:t.headers})||{})}async getVectors(e){var t=this;return t.handleOperation(async()=>await e6.post(t.fetch,`${t.url}/GetVectors`,e,{headers:t.headers}))}async listVectors(e){var t=this;if(void 0!==e.segmentCount){if(e.segmentCount<1||e.segmentCount>16)throw Error("segmentCount must be between 1 and 16");
24if(void 0!==e.segmentIndex&&(e.segmentIndex<0||e.segmentIndex>=e.segmentCount))throw Error(`segmentIndex must be between 0 and ${e.segmentCount-1}`)}return t.handleOperation(async()=>await e6.post(t.fetch,`${t.url}/ListVectors`,e,{headers:t.headers}))}async queryVectors(e){var t=this;return t.handleOperation(async()=>await e6.post(t.fetch,`${t.url}/QueryVectors`,e,{headers:t.headers}))}async deleteVectors(e){var t=this;if(e.keys.length<1||e.keys.length>500)throw Error("Keys batch size must be between 1 and 500 items");return t.handleOperation(async()=>await e6.post(t.fetch,`${t.url}/DeleteVectors`,e,{headers:t.headers})||{})}},tl=class extends e8{constructor(e,t={},r){super(e.replace(/\/$/,""),eZ(eZ({},tn),{},{"Content-Type":"application/json"},t),r,"vectors")}async createBucket(e){var t=this;return t.handleOperation(async()=>await e6.post(t.fetch,`${t.url}/CreateVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}async getBucket(e){var t=this;return t.handleOperation(async()=>await e6.post(t.fetch,`${t.url}/GetVectorBucket`,{vectorBucketName:e},{headers:t.headers}))}async listBuckets(e={}){var t=this;return t.handleOperation(async()=>await e6.post(t.fetch,`${t.url}/ListVectorBuckets`,e,{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await e6.post(t.fetch,`${t.url}/DeleteVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}},tc=class extends tl{constructor(e,t={}){super(e,t.headers||{},t.fetch)}from(e){return new tu(this.url,this.headers,e,this.fetch)}async createBucket(e){return super.createBucket.call(this,e)}async getBucket(e){return super.getBucket.call(this,e)}async listBuckets(e={}){return super.listBuckets.call(this,e)}async deleteBucket(e){return super.deleteBucket.call(this,e)}},tu=class extends ta{constructor(e,t,r,n){super(e,t,n),this.vectorBucketName=r}async createIndex(e){return super.createIndex.call(this,eZ(eZ({},e),{},{vectorBucketName:this.vectorBucketName}))}async listIndexes(e={}){return super.listIndexes.call(this,eZ(eZ({},e),{},{vectorBucketName:this.vectorBucketName}))}async getIndex(e){return super.getIndex.call(this,this.vectorBucketName,e)}async deleteIndex(e){return super.deleteIndex.call(this,this.vectorBucketName,e)}index(e){return new th(this.url,this.headers,this.vectorBucketName,e,this.fetch)}},th=class extends ts{constructor(e,t,r,n,i){super(e,t,i),this.vectorBucketName=r,this.indexName=n}async putVectors(e){return super.putVectors.call(this,eZ(eZ({},e),{},{vectorBucketName:this.vectorBucketName,indexName:this.indexName}))}async getVectors(e){return super.getVectors.call(this,eZ(eZ({},e),{},{vectorBucketName:this.vectorBucketName,indexName:this.indexName}))}async listVectors(e={}){return super.listVectors.call(this,eZ(eZ({},e),{},{vectorBucketName:this.vectorBucketName,indexName:this.indexName}))}async queryVectors(e){return super.queryVectors.call(this,eZ(eZ({},e),{},{vectorBucketName:this.vectorBucketName,indexName:this.indexName}))}async deleteVectors(e){return super.deleteVectors.call(this,eZ(eZ({},e),{},{vectorBucketName:this.vectorBucketName,indexName:this.indexName}))}},tf=class extends ti{constructor(e,t={},r,n){super(e,t,r,n)}from(e){return new tr(this.url,this.headers,e,this.fetch)}get vectors(){return new tc(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new to(this.url+"/iceberg",this.headers,this.fetch)}};let td="2.103.0",tp={"X-Client-Info":`gotrue-js/${td}`},ty="X-Supabase-Api-Version",tm={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},tg=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i;class tv extends Error{constructor(e,t,r){super(e),this.__isAuthError=!0,this.name="AuthError",this.status=t,this.code=r}}function tb(e){return"object"==typeof e&&null!==e&&"__isAuthError"in e}class tw extends tv{constructor(e,t,r){super(e,t,r),this.name="AuthApiError",this.status=t,this.code=r}}class tx extends tv{constructor(e,t){super(e),this.name="AuthUnknownError",this.originalError=t}}class tO extends tv{constructor(e,t,r,n){super(e,r,n),this.name=t,this.status=r}}
24class tk extends tO{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function tj(e){return tb(e)&&"AuthSessionMissingError"===e.name}class tS extends tO{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}}class t_ extends tO{constructor(e){super(e,"AuthInvalidCredentialsError",400,void 0)}}class tE extends tO{constructor(e,t=null){super(e,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=t}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class tA extends tO{constructor(e,t=null){super(e,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=t}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class tP extends tO{constructor(){super("PKCE code verifier not found in storage. This can happen if the auth flow was initiated in a different browser or device, or if the storage was cleared. For SSR frameworks (Next.js, SvelteKit, etc.), use @supabase/ssr on both the server and client to store the code verifier in cookies.","AuthPKCECodeVerifierMissingError",400,"pkce_code_verifier_not_found")}}class tT extends tO{constructor(e,t){super(e,"AuthRetryableFetchError",t,void 0)}}function tN(e){return tb(e)&&"AuthRetryableFetchError"===e.name}class tC extends tO{constructor(e,t,r){super(e,"AuthWeakPasswordError",t,"weak_password"),this.reasons=r}}class tM extends tO{constructor(e){super(e,"AuthInvalidJwtError",400,"invalid_jwt")}}let tI="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),tR=" 	\n\r=".split(""),tD=(()=>{let e=Array(128);for(let t=0;t<e.length;t+=1)e[t]=-1;for(let t=0;t<tR.length;t+=1)e[tR[t].charCodeAt(0)]=-2;for(let t=0;t<tI.length;t+=1)e[tI[t].charCodeAt(0)]=t;return e})();function tL(e,t,r){if(null!==e)for(t.queue=t.queue<<8|e,t.queuedBits+=8;t.queuedBits>=6;)r(tI[t.queue>>t.queuedBits-6&63]),t.queuedBits-=6;else if(t.queuedBits>0)for(t.queue=t.queue<<6-t.queuedBits,t.queuedBits=6;t.queuedBits>=6;)r(tI[t.queue>>t.queuedBits-6&63]),t.queuedBits-=6}function tB(e,t,r){let n=tD[e];if(n>-1)for(t.queue=t.queue<<6|n,t.queuedBits+=6;t.queuedBits>=8;)r(t.queue>>t.queuedBits-8&255),t.queuedBits-=8;else if(-2===n)return;else throw Error(`Invalid Base64-URL character "${String.fromCharCode(e)}"`)}function t$(e){let t=[],r=e=>{t.push(String.fromCodePoint(e))},n={utf8seq:0,codepoint:0},i={queue:0,queuedBits:0},o=e=>{!function(e,t,r){if(0===t.utf8seq){if(e<=127){r(e);return}for(let r=1;r<6;r+=1)if((e>>7-r&1)==0){t.utf8seq=r;break}if(2===t.utf8seq)t.codepoint=31&e;else if(3===t.utf8seq)t.codepoint=15&e;else if(4===t.utf8seq)t.codepoint=7&e;else throw Error("Invalid UTF-8 sequence");t.utf8seq-=1}else if(t.utf8seq>0){if(e<=127)throw Error("Invalid UTF-8 sequence");t.codepoint=t.codepoint<<6|63&e,t.utf8seq-=1,0===t.utf8seq&&r(t.codepoint)}}(e,n,r)};for(let t=0;t<e.length;t+=1)tB(e.charCodeAt(t),i,o);return t.join("")}function tU(e){let t=[],r={queue:0,queuedBits:0},n=e=>{t.push(e)};for(let t=0;t<e.length;t+=1)tB(e.charCodeAt(t),r,n);return new Uint8Array(t)}function tq(e){let t=[],r={queue:0,queuedBits:0},n=e=>{t.push(e)};return e.forEach(e=>tL(e,r,n)),tL(null,r,n),t.join("")}let tz=()=>"undefined"!=typeof window&&"undefined"!=typeof document,tF={tested:!1,writable:!1},tW=()=>{if(!tz())return!1;try{if("object"!=typeof globalThis.localStorage)return!1}catch(e){return!1}if(tF.tested)return tF.writable;let e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),tF.tested=!0,tF.writable=!0}catch(e){tF.tested=!0,tF.writable=!1}return tF.writable},tH=e=>e?(...t)=>e(...t):(...e)=>fetch(...e),tV=e=>"object"==typeof e&&null!==e&&"status"in e&&"ok"in e&&"json"in e&&"function"==typeof e.json,tK=async(e,t,r)=>{await e.setItem(t,JSON.stringify(r))},tG=async(e,t)=>{let r=await e.getItem(t);if(!r)return null;try{return JSON.parse(r)}catch(e){return r}},tZ=async(e,t)=>{await e.removeItem(t)};class tJ{constructor(){this.promise=new tJ.promiseConstructor((e,t)=>{this.resolve=e,this.reject=t})}}function tY(e){let t=e.split(".");if(3!==t.length)throw new tM("Invalid JWT structure");for(let e=0;e<t.length;e++)if(!tg.test(t[e]))throw new tM("JWT not in base64url format");
24return{header:JSON.parse(t$(t[0])),payload:JSON.parse(t$(t[1])),signature:tU(t[2]),raw:{header:t[0],payload:t[1]}}}async function tX(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function tQ(e){return("0"+e.toString(16)).substr(-2)}async function t0(e){let t=new TextEncoder().encode(e);return Array.from(new Uint8Array(await crypto.subtle.digest("SHA-256",t))).map(e=>String.fromCharCode(e)).join("")}async function t1(e){return"undefined"!=typeof crypto&&void 0!==crypto.subtle&&"undefined"!=typeof TextEncoder?btoa(await t0(e)).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,""):(console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),e)}async function t2(e,t,r=!1){let n=function(){let e=new Uint32Array(56);if("undefined"==typeof crypto){let e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",t=e.length,r="";for(let n=0;n<56;n++)r+=e.charAt(Math.floor(Math.random()*t));return r}return crypto.getRandomValues(e),Array.from(e,tQ).join("")}(),i=n;r&&(i+="/PASSWORD_RECOVERY"),await tK(e,`${t}-code-verifier`,i);let o=await t1(n),a=n===o?"plain":"s256";return[o,a]}tJ.promiseConstructor=Promise;let t3=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i,t5=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function t4(e){if(!t5.test(e))throw Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function t6(){return new Proxy({},{get:(e,t)=>{if("__isUserNotAvailableProxy"===t)return!0;if("symbol"==typeof t){let e=t.toString();if("Symbol(Symbol.toPrimitive)"===e||"Symbol(Symbol.toStringTag)"===e||"Symbol(util.inspect.custom)"===e)return}throw Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Accessing the "${t}" property of the session object is not supported. Please use getUser() instead.`)},set:(e,t)=>{throw Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${t}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(e,t)=>{throw Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${t}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function t8(e){return JSON.parse(JSON.stringify(e))}let t7=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),t9=[502,503,504];async function re(e){var t;let r,n;if(!tV(e))throw new tT(t7(e),0);if(t9.includes(e.status))throw new tT(t7(e),e.status);try{r=await e.json()}catch(e){throw new tx(t7(e),e)}let i=function(e){let t=e.headers.get(ty);if(!t||!t.match(t3))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch(e){return null}}(e);if(i&&i.getTime()>=tm["2024-01-01"].timestamp&&"object"==typeof r&&r&&"string"==typeof r.code?n=r.code:"object"==typeof r&&r&&"string"==typeof r.error_code&&(n=r.error_code),n){if("weak_password"===n)throw new tC(t7(r),e.status,(null===(t=r.weak_password)||void 0===t?void 0:t.reasons)||[]);if("session_not_found"===n)throw new tk}else if("object"==typeof r&&r&&"object"==typeof r.weak_password&&r.weak_password&&Array.isArray(r.weak_password.reasons)&&r.weak_password.reasons.length&&r.weak_password.reasons.reduce((e,t)=>e&&"string"==typeof t,!0))throw new tC(t7(r),e.status,r.weak_password.reasons);throw new tw(t7(r),e.status||500,n)}let rt=(e,t,r,n)=>{let i={method:e,headers:(null==t?void 0:t.headers)||{}};return"GET"===e?i:(i.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},null==t?void 0:t.headers),i.body=JSON.stringify(n),Object.assign(Object.assign({},i),r))};async function rr(e,t,r,n){var i;let o=Object.assign({},null==n?void 0:n.headers);o[ty]||(o[ty]=tm["2024-01-01"].name),(null==n?void 0:n.jwt)&&(o.Authorization=`Bearer ${n.jwt}`);let a=null!==(i=null==n?void 0:n.query)&&void 0!==i?i:{};(null==n?void 0:n.redirectTo)&&(a.redirect_to=n.redirectTo);let s=Object.keys(a).length?"?"+new URLSearchParams(a).toString():"",l=await rn(e,t,r+s,{headers:o,noResolveJson:null==n?void 0:n.noResolveJson},{},null==n?void 0:n.body);return(null==n?void 0:n.xform)?null==n?void 0:n.xform(l):{data:Object.assign({},l),error:null}}async function rn(e,t,r,n,i,o){let a;let s=rt(t,n,i,o);try{a=await e(r,Object.assign({},s))}catch(e){throw console.error(e),new tT(t7(e),0)}if(a.ok||await re(a),null==n?void 0:n.noResolveJson)return a;try{return await a.json()}catch(e){await re(e)}}function ri(e){var t,r;let n=null;return e.access_token&&e.refresh_token&&e.expires_in&&(n=Object.assign({},e),!e.expires_at)&&(n.expires_at=(r=e.expires_in,Math.round(Date.now()/1e3)+r)),{data:{session:n,user:null!==(t=e.user)&&void 0!==t?t:e},error:null}}function ro(e){let t=ri(e);return!t.error&&e.weak_password&&"object"==typeof e.weak_password&&Array.isArray(e.weak_password.reasons)&&e.weak_password.reasons.length&&e.weak_password.message&&"string"==typeof e.weak_password.message&&e.weak_password.reasons.reduce((e,t)=>
24e&&"string"==typeof t,!0)&&(t.data.weak_password=e.weak_password),t}function ra(e){var t;return{data:{user:null!==(t=e.user)&&void 0!==t?t:e},error:null}}function rs(e){return{data:e,error:null}}function rl(e){let{action_link:t,email_otp:r,hashed_token:n,redirect_to:o,verification_type:a}=e;return{data:{properties:{action_link:t,email_otp:r,hashed_token:n,redirect_to:o,verification_type:a},user:Object.assign({},i(e,["action_link","email_otp","hashed_token","redirect_to","verification_type"]))},error:null}}function rc(e){return e}let ru=["global","local","others"];class rh{constructor({url:e="",headers:t={},fetch:r}){this.url=e,this.headers=t,this.fetch=tH(r),this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)},this.oauth={listClients:this._listOAuthClients.bind(this),createClient:this._createOAuthClient.bind(this),getClient:this._getOAuthClient.bind(this),updateClient:this._updateOAuthClient.bind(this),deleteClient:this._deleteOAuthClient.bind(this),regenerateClientSecret:this._regenerateOAuthClientSecret.bind(this)},this.customProviders={listProviders:this._listCustomProviders.bind(this),createProvider:this._createCustomProvider.bind(this),getProvider:this._getCustomProvider.bind(this),updateProvider:this._updateCustomProvider.bind(this),deleteProvider:this._deleteCustomProvider.bind(this)}}async signOut(e,t=ru[0]){if(0>ru.indexOf(t))throw Error(`@supabase/auth-js: Parameter scope must be one of ${ru.join(", ")}`);try{return await rr(this.fetch,"POST",`${this.url}/logout?scope=${t}`,{headers:this.headers,jwt:e,noResolveJson:!0}),{data:null,error:null}}catch(e){if(tb(e))return{data:null,error:e};throw e}}async inviteUserByEmail(e,t={}){try{return await rr(this.fetch,"POST",`${this.url}/invite`,{body:{email:e,data:t.data},headers:this.headers,redirectTo:t.redirectTo,xform:ra})}catch(e){if(tb(e))return{data:{user:null},error:e};throw e}}async generateLink(e){try{let{options:t}=e,r=i(e,["options"]),n=Object.assign(Object.assign({},r),t);return"newEmail"in r&&(n.new_email=null==r?void 0:r.newEmail,delete n.newEmail),await rr(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:n,headers:this.headers,xform:rl,redirectTo:null==t?void 0:t.redirectTo})}catch(e){if(tb(e))return{data:{properties:null,user:null},error:e};throw e}}async createUser(e){try{return await rr(this.fetch,"POST",`${this.url}/admin/users`,{body:e,headers:this.headers,xform:ra})}catch(e){if(tb(e))return{data:{user:null},error:e};throw e}}async listUsers(e){var t,r,n,i,o,a,s;try{let l={nextPage:null,lastPage:0,total:0},c=await rr(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:null!==(r=null===(t=null==e?void 0:e.page)||void 0===t?void 0:t.toString())&&void 0!==r?r:"",per_page:null!==(i=null===(n=null==e?void 0:e.perPage)||void 0===n?void 0:n.toString())&&void 0!==i?i:""},xform:rc});if(c.error)throw c.error;let u=await c.json(),h=null!==(o=c.headers.get("x-total-count"))&&void 0!==o?o:0,f=null!==(s=null===(a=c.headers.get("link"))||void 0===a?void 0:a.split(","))&&void 0!==s?s:[];return f.length>0&&(f.forEach(e=>{let t=parseInt(e.split(";")[0].split("=")[1].substring(0,1)),r=JSON.parse(e.split(";")[1].split("=")[1]);l[`${r}Page`]=t}),l.total=parseInt(h)),{data:Object.assign(Object.assign({},u),l),error:null}}catch(e){if(tb(e))return{data:{users:[]},error:e};throw e}}async getUserById(e){t4(e);try{return await rr(this.fetch,"GET",`${this.url}/admin/users/${e}`,{headers:this.headers,xform:ra})}catch(e){if(tb(e))return{data:{user:null},error:e};throw e}}async updateUserById(e,t){t4(e);try{return await rr(this.fetch,"PUT",`${this.url}/admin/users/${e}`,{body:t,headers:this.headers,xform:ra})}catch(e){if(tb(e))return{data:{user:null},error:e};throw e}}async deleteUser(e,t=!1){t4(e);try{return await rr(this.fetch,"DELETE",`${this.url}/admin/users/${e}`,{headers:this.headers,body:{should_soft_delete:t},xform:ra})}catch(e){if(tb(e))return{data:{user:null},error:e};throw e}}async _listFactors(e){t4(e.userId);try{let{data:t,error:r}=await rr(this.fetch,"GET",`${this.url}/admin/users/${e.userId}/factors`,{headers:this.headers,xform:e=>({data:{factors:e},error:null})});return{data:t,error:r}}catch(e){if(tb(e))return{data:null,error:e};throw e}}async _deleteFactor(e){t4(e.userId),t4(e.id);
24try{return{data:await rr(this.fetch,"DELETE",`${this.url}/admin/users/${e.userId}/factors/${e.id}`,{headers:this.headers}),error:null}}catch(e){if(tb(e))return{data:null,error:e};throw e}}async _listOAuthClients(e){var t,r,n,i,o,a,s;try{let l={nextPage:null,lastPage:0,total:0},c=await rr(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:null!==(r=null===(t=null==e?void 0:e.page)||void 0===t?void 0:t.toString())&&void 0!==r?r:"",per_page:null!==(i=null===(n=null==e?void 0:e.perPage)||void 0===n?void 0:n.toString())&&void 0!==i?i:""},xform:rc});if(c.error)throw c.error;let u=await c.json(),h=null!==(o=c.headers.get("x-total-count"))&&void 0!==o?o:0,f=null!==(s=null===(a=c.headers.get("link"))||void 0===a?void 0:a.split(","))&&void 0!==s?s:[];return f.length>0&&(f.forEach(e=>{let t=parseInt(e.split(";")[0].split("=")[1].substring(0,1)),r=JSON.parse(e.split(";")[1].split("=")[1]);l[`${r}Page`]=t}),l.total=parseInt(h)),{data:Object.assign(Object.assign({},u),l),error:null}}catch(e){if(tb(e))return{data:{clients:[]},error:e};throw e}}async _createOAuthClient(e){try{return await rr(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:e,headers:this.headers,xform:e=>({data:e,error:null})})}catch(e){if(tb(e))return{data:null,error:e};throw e}}async _getOAuthClient(e){try{return await rr(this.fetch,"GET",`${this.url}/admin/oauth/clients/${e}`,{headers:this.headers,xform:e=>({data:e,error:null})})}catch(e){if(tb(e))return{data:null,error:e};throw e}}async _updateOAuthClient(e,t){try{return await rr(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${e}`,{body:t,headers:this.headers,xform:e=>({data:e,error:null})})}catch(e){if(tb(e))return{data:null,error:e};throw e}}async _deleteOAuthClient(e){try{return await rr(this.fetch,"DELETE",`${this.url}/admin/oauth/clients/${e}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(e){if(tb(e))return{data:null,error:e};throw e}}async _regenerateOAuthClientSecret(e){try{return await rr(this.fetch,"POST",`${this.url}/admin/oauth/clients/${e}/regenerate_secret`,{headers:this.headers,xform:e=>({data:e,error:null})})}catch(e){if(tb(e))return{data:null,error:e};throw e}}async _listCustomProviders(e){try{let t={};return(null==e?void 0:e.type)&&(t.type=e.type),await rr(this.fetch,"GET",`${this.url}/admin/custom-providers`,{headers:this.headers,query:t,xform:e=>{var t;return{data:{providers:null!==(t=null==e?void 0:e.providers)&&void 0!==t?t:[]},error:null}}})}catch(e){if(tb(e))return{data:{providers:[]},error:e};throw e}}async _createCustomProvider(e){try{return await rr(this.fetch,"POST",`${this.url}/admin/custom-providers`,{body:e,headers:this.headers,xform:e=>({data:e,error:null})})}catch(e){if(tb(e))return{data:null,error:e};throw e}}async _getCustomProvider(e){try{return await rr(this.fetch,"GET",`${this.url}/admin/custom-providers/${e}`,{headers:this.headers,xform:e=>({data:e,error:null})})}catch(e){if(tb(e))return{data:null,error:e};throw e}}async _updateCustomProvider(e,t){try{return await rr(this.fetch,"PUT",`${this.url}/admin/custom-providers/${e}`,{body:t,headers:this.headers,xform:e=>({data:e,error:null})})}catch(e){if(tb(e))return{data:null,error:e};throw e}}async _deleteCustomProvider(e){try{return await rr(this.fetch,"DELETE",`${this.url}/admin/custom-providers/${e}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(e){if(tb(e))return{data:null,error:e};throw e}}}function rf(e={}){return{getItem:t=>e[t]||null,setItem:(t,r)=>{e[t]=r},removeItem:t=>{delete e[t]}}}let rd={debug:!!(globalThis&&tW()&&globalThis.localStorage&&"true"===globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug"))};class rp extends Error{constructor(e){super(e),this.isAcquireTimeout=!0}}class ry extends rp{}async function rm(e,t,r){let n;rd.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",e,t);let i=new globalThis.AbortController;t>0&&(n=setTimeout(()=>{i.abort(),rd.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",e)},t)),await Promise.resolve();try{return await globalThis.navigator.locks.request(e,0===t?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:i.signal}
24,async i=>{if(i){clearTimeout(n),rd.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",e,i.name);try{return await r()}finally{rd.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",e,i.name)}}else{if(0===t)throw rd.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",e),new ry(`Acquiring an exclusive Navigator LockManager lock "${e}" immediately failed`);if(rd.debug)try{let e=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(e,null,"  "))}catch(e){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",e)}return console.warn("@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request"),clearTimeout(n),await r()}})}catch(o){if(t>0&&clearTimeout(n),(null==o?void 0:o.name)==="AbortError"&&t>0){if(i.signal.aborted)return rd.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire timeout, recovering by stealing lock",e),console.warn(`@supabase/gotrue-js: Lock "${e}" was not released within ${t}ms. This may indicate an orphaned lock from a component unmount (e.g., React Strict Mode). Forcefully acquiring the lock to recover.`),await Promise.resolve().then(()=>globalThis.navigator.locks.request(e,{mode:"exclusive",steal:!0},async t=>{if(!t)return console.warn("@supabase/gotrue-js: Navigator LockManager returned null lock even with steal: true"),await r();rd.debug&&console.log("@supabase/gotrue-js: navigatorLock: recovered (stolen)",e,t.name);try{return await r()}finally{rd.debug&&console.log("@supabase/gotrue-js: navigatorLock: released (stolen)",e,t.name)}}));throw rd.debug&&console.log("@supabase/gotrue-js: navigatorLock: lock was stolen by another request",e),new ry(`Lock "${e}" was released because another request stole it`)}throw o}}function rg(e){if(!/^0x[a-fA-F0-9]{40}$/.test(e))throw Error(`@supabase/auth-js: Address "${e}" is invalid.`);return e.toLowerCase()}class rv extends Error{constructor({message:e,code:t,cause:r,name:n}){var i;super(e,{cause:r}),this.__isWebAuthnError=!0,this.name=null!==(i=null!=n?n:r instanceof Error?r.name:void 0)&&void 0!==i?i:"Unknown Error",this.code=t}}class rb extends rv{constructor(e,t){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t,message:e}),this.name="WebAuthnUnknownError",this.originalError=t}}class rw{createNewAbortSignal(){if(this.controller){let e=Error("Cancelling existing WebAuthn API call for new one");e.name="AbortError",this.controller.abort(e)}let e=new AbortController;return this.controller=e,e.signal}cancelCeremony(){if(this.controller){let e=Error("Manually cancelling existing WebAuthn API call");e.name="AbortError",this.controller.abort(e),this.controller=void 0}}}let rx=new rw;function rO(e){return"localhost"===e||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}function rk(){var e,t;return!!(tz()&&"PublicKeyCredential"in window&&window.PublicKeyCredential&&"credentials"in navigator&&"function"==typeof(null===(e=null==navigator?void 0:navigator.credentials)||void 0===e?void 0:e.create)&&"function"==typeof(null===(t=null==navigator?void 0:navigator.credentials)||void 0===t?void 0:t.get))}async function rj(e){try{let t=await navigator.credentials.create(e);if(!t)return{data:null,error:new rb("Empty credential response",t)};if(!(t instanceof PublicKeyCredential))return{data:null,error:new rb("Browser returned unexpected credential type",t)};return{data:t,error:null}}catch(t){return{data:null,error:function({error:e,options:t}){var r,n,i;let{publicKey:o}=t;if(!o)throw Error("options was missing required publicKey property");if("AbortError"===e.name){if(t.signal instanceof AbortSignal)return new rv({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else if("ConstraintError"===e.name){if((null===(r=o.authenticatorSelection)||void 0===r?void 0:r.requireResidentKey)===!0)return new rv({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:e});if("conditional"===t.mediation&&(null===(n=o.authenticatorSelection)||void 0===n?void 0:n.userVerification)==="required")return new rv({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:e});if((null===(i=o.authenticatorSelection)||void 0===i?void 0:i.userVerification)==="required")return new rv({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:e})}else if("InvalidStateError"===e.name)return new rv({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:e});else if("NotAllowedError"===e.name)return new rv({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});else if("NotSupportedError"===e.name)return new rv(0===o.pubKeyCredParams.filter(e=>"public-key"===e.type).length?{message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:e}:{message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:e});else if("SecurityError"===e.name){let t=window.location.hostname;if(!rO(t))return new rv({message:`${window.location.hostname}
24 is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e});if(o.rp.id!==t)return new rv({message:`The RP ID "${o.rp.id}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else if("TypeError"===e.name){if(o.user.id.byteLength<1||o.user.id.byteLength>64)return new rv({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:e})}else if("UnknownError"===e.name)return new rv({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e});return new rv({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}({error:t,options:e})}}}async function rS(e){try{let t=await navigator.credentials.get(e);if(!t)return{data:null,error:new rb("Empty credential response",t)};if(!(t instanceof PublicKeyCredential))return{data:null,error:new rb("Browser returned unexpected credential type",t)};return{data:t,error:null}}catch(t){return{data:null,error:function({error:e,options:t}){let{publicKey:r}=t;if(!r)throw Error("options was missing required publicKey property");if("AbortError"===e.name){if(t.signal instanceof AbortSignal)return new rv({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else if("NotAllowedError"===e.name)return new rv({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});else if("SecurityError"===e.name){let t=window.location.hostname;if(!rO(t))return new rv({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e});if(r.rpId!==t)return new rv({message:`The RP ID "${r.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else if("UnknownError"===e.name)return new rv({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e});return new rv({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}({error:t,options:e})}}}let r_={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},rE={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function rA(...e){let t=e=>null!==e&&"object"==typeof e&&!Array.isArray(e),r=e=>e instanceof ArrayBuffer||ArrayBuffer.isView(e),n={};for(let i of e)if(i)for(let e in i){let o=i[e];if(void 0!==o){if(Array.isArray(o))n[e]=o;else if(r(o))n[e]=o;else if(t(o)){let r=n[e];t(r)?n[e]=rA(r,o):n[e]=rA(o)}else n[e]=o}}return n}class rP{constructor(e){this.client=e,this.enroll=this._enroll.bind(this),this.challenge=this._challenge.bind(this),this.verify=this._verify.bind(this),this.authenticate=this._authenticate.bind(this),this.register=this._register.bind(this)}async _enroll(e){return this.client.mfa.enroll(Object.assign(Object.assign({},e),{factorType:"webauthn"}))}async _challenge({factorId:e,webauthn:t,friendlyName:r,signal:n},i){var o,a,s,l,c;try{let{data:u,error:h}=await this.client.mfa.challenge({factorId:e,webauthn:t});if(!u)return{data:null,error:h};let f=null!=n?n:rx.createNewAbortSignal();if("create"===u.webauthn.type){let{user:e}=u.webauthn.credential_options.publicKey;if(!e.name){if(r)e.name=`${e.id}:${r}`;else{let t=(await this.client.getUser()).data.user,r=(null===(o=null==t?void 0:t.user_metadata)||void 0===o?void 0:o.name)||(null==t?void 0:t.email)||(null==t?void 0:t.id)||"User";e.name=`${e.id}:${r}`}}e.displayName||(e.displayName=e.name)}switch(u.webauthn.type){case"create":{let t=(a=u.webauthn.credential_options.publicKey,s=null==i?void 0:i.create,rA(r_,a,s||{})),{data:r,error:n}=await rj({publicKey:t,signal:f});if(r)return{data:{factorId:e,challengeId:u.id,webauthn:{type:u.webauthn.type,credential_response:r}},error:null};return{data:null,error:n}}case"request":{let t=(l=u.webauthn.credential_options.publicKey,c=null==i?void 0:i.request,rA(rE,l,c||{})),{data:r,error:n}=await rS(Object.assign(Object.assign({},u.webauthn.credential_options),{publicKey:t,signal:f}));if(r)return{data:{factorId:e,challengeId:u.id,webauthn:{type:u.webauthn.type,credential_response:r}},error:null};return{data:null,error:n}}}}catch(e){if(tb(e))return{data:null,error:e};return{data:null,error:new tx("Unexpected error in challenge",e)}}}async _verify({challengeId:e,factorId:t,webauthn:r}){return this.client.mfa.verify({factorId:t,challengeId:e,webauthn:r})}async _authenticate({factorId:e,webauthn:{rpId:t="undefined"!=typeof window?window.location.hostname:void 0,rpOrigins:r="undefined"!=typeof window?[window.location.origin]:void 0,signal:n}={}}
24,i){if(!t)return{data:null,error:new tv("rpId is required for WebAuthn authentication")};try{if(!rk())return{data:null,error:new tx("Browser does not support WebAuthn",null)};let{data:o,error:a}=await this.challenge({factorId:e,webauthn:{rpId:t,rpOrigins:r},signal:n},{request:i});if(!o)return{data:null,error:a};let{webauthn:s}=o;return this._verify({factorId:e,challengeId:o.challengeId,webauthn:{type:s.type,rpId:t,rpOrigins:r,credential_response:s.credential_response}})}catch(e){if(tb(e))return{data:null,error:e};return{data:null,error:new tx("Unexpected error in authenticate",e)}}}async _register({friendlyName:e,webauthn:{rpId:t="undefined"!=typeof window?window.location.hostname:void 0,rpOrigins:r="undefined"!=typeof window?[window.location.origin]:void 0,signal:n}={}},i){if(!t)return{data:null,error:new tv("rpId is required for WebAuthn registration")};try{if(!rk())return{data:null,error:new tx("Browser does not support WebAuthn",null)};let{data:o,error:a}=await this._enroll({friendlyName:e});if(!o)return await this.client.mfa.listFactors().then(t=>{var r;return null===(r=t.data)||void 0===r?void 0:r.all.find(t=>"webauthn"===t.factor_type&&t.friendly_name===e&&"unverified"!==t.status)}).then(e=>e?this.client.mfa.unenroll({factorId:null==e?void 0:e.id}):void 0),{data:null,error:a};let{data:s,error:l}=await this._challenge({factorId:o.id,friendlyName:o.friendly_name,webauthn:{rpId:t,rpOrigins:r},signal:n},{create:i});if(!s)return{data:null,error:l};return this._verify({factorId:o.id,challengeId:s.challengeId,webauthn:{rpId:t,rpOrigins:r,type:s.webauthn.type,credential_response:s.webauthn.credential_response}})}catch(e){if(tb(e))return{data:null,error:e};return{data:null,error:new tx("Unexpected error in register",e)}}}}!function(){if("object"!=typeof globalThis)try{Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__}catch(e){"undefined"!=typeof self&&(self.globalThis=self)}}();let rT={url:"http://localhost:9999",storageKey:"supabase.auth.token",autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:tp,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:5e3,skipAutoInitialize:!1};async function rN(e,t,r){return await r()}let rC={};class rM{get jwks(){var e,t;return null!==(t=null===(e=rC[this.storageKey])||void 0===e?void 0:e.jwks)&&void 0!==t?t:{keys:[]}}set jwks(e){rC[this.storageKey]=Object.assign(Object.assign({},rC[this.storageKey]),{jwks:e})}get jwks_cached_at(){var e,t;return null!==(t=null===(e=rC[this.storageKey])||void 0===e?void 0:e.cachedAt)&&void 0!==t?t:Number.MIN_SAFE_INTEGER}set jwks_cached_at(e){rC[this.storageKey]=Object.assign(Object.assign({},rC[this.storageKey]),{cachedAt:e})}constructor(e){var t,r,n;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.autoRefreshTickTimeout=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log;let i=Object.assign(Object.assign({},rT),e);if(this.storageKey=i.storageKey,this.instanceID=null!==(t=rM.nextInstanceID[this.storageKey])&&void 0!==t?t:0,rM.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!i.debug,"function"==typeof i.debug&&(this.logger=i.debug),this.instanceID>0&&tz()){let e=`${this._logPrefix()} Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.`;console.warn(e),this.logDebugMessages&&console.trace(e)}if(this.persistSession=i.persistSession,this.autoRefreshToken=i.autoRefreshToken,this.admin=new rh({url:i.url,headers:i.headers,fetch:i.fetch}),this.url=i.url,this.headers=i.headers,this.fetch=tH(i.fetch),this.lock=i.lock||rN,this.detectSessionInUrl=i.detectSessionInUrl,this.flowType=i.flowType,this.hasCustomAuthorizationHeader=i.hasCustomAuthorizationHeader,this.throwOnError=i.throwOnError,this.lockAcquireTimeout=i.lockAcquireTimeout,i.lock?this.lock=i.lock:this.persistSession&&tz()&&(null===(r=null==globalThis?void 0:globalThis.navigator)||void 0===r?void 0:r.locks)?this.lock=rm:this.lock=rN,this.jwks||(this.jwks={keys:[]},this.jwks_cached_at=Number.MIN_SAFE_INTEGER),this.mfa={verify:this._verify.bind(this),enroll:this._enroll.bind(this),unenroll:this._unenroll.bind(this),challenge:this._challenge.bind(this),listFactors:this._listFactors.bind(this),challengeAndVerify:this._challengeAndVerify.bind(this),getAuthenticatorAssuranceLevel:this._getAuthenticatorAssuranceLevel.bind(this),webauthn:new rP(this)}
24,this.oauth={getAuthorizationDetails:this._getAuthorizationDetails.bind(this),approveAuthorization:this._approveAuthorization.bind(this),denyAuthorization:this._denyAuthorization.bind(this),listGrants:this._listOAuthGrants.bind(this),revokeGrant:this._revokeOAuthGrant.bind(this)},this.persistSession?(i.storage?this.storage=i.storage:tW()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=rf(this.memoryStorage)),i.userStorage&&(this.userStorage=i.userStorage)):(this.memoryStorage={},this.storage=rf(this.memoryStorage)),tz()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(e){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",e)}null===(n=this.broadcastChannel)||void 0===n||n.addEventListener("message",async e=>{this._debug("received broadcast notification from other tab or client",e);try{await this._notifyAllSubscribers(e.data.event,e.data.session,!1)}catch(e){this._debug("#broadcastChannel","error",e)}})}i.skipAutoInitialize||this.initialize().catch(e=>{this._debug("#initialize()","error",e)})}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(e){if(this.throwOnError&&e&&e.error)throw e.error;return e}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${td}) ${new Date().toISOString()}`}_debug(...e){return this.logDebugMessages&&this.logger(this._logPrefix(),...e),this}async initialize(){return this.initializePromise||(this.initializePromise=(async()=>await this._acquireLock(this.lockAcquireTimeout,async()=>await this._initialize()))()),await this.initializePromise}async _initialize(){var e;try{let t={},r="none";if(tz()&&(t=function(e){let t={},r=new URL(e);if(r.hash&&"#"===r.hash[0])try{new URLSearchParams(r.hash.substring(1)).forEach((e,r)=>{t[r]=e})}catch(e){}return r.searchParams.forEach((e,r)=>{t[r]=e}),t}(window.location.href),this._isImplicitGrantCallback(t)?r="implicit":await this._isPKCECallback(t)&&(r="pkce")),tz()&&this.detectSessionInUrl&&"none"!==r){let{data:n,error:i}=await this._getSessionFromURL(t,r);if(i)return this._debug("#_initialize()","error detecting session from URL",i),tb(i)&&"AuthImplicitGrantRedirectError"===i.name&&(null===(e=i.details)||void 0===e||e.code),{error:i};let{session:o,redirectType:a}=n;return this._debug("#_initialize()","detected session in URL",o,"redirect type",a),await this._saveSession(o),setTimeout(async()=>{"recovery"===a?await this._notifyAllSubscribers("PASSWORD_RECOVERY",o):await this._notifyAllSubscribers("SIGNED_IN",o)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(e){if(tb(e))return this._returnResult({error:e});return this._returnResult({error:new tx("Unexpected error during initialization",e)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(e){var t,r,n;try{let{data:i,error:o}=await rr(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:null!==(r=null===(t=null==e?void 0:e.options)||void 0===t?void 0:t.data)&&void 0!==r?r:{},gotrue_meta_security:{captcha_token:null===(n=null==e?void 0:e.options)||void 0===n?void 0:n.captchaToken}},xform:ri});if(o||!i)return this._returnResult({data:{user:null,session:null},error:o});let a=i.session,s=i.user;return i.session&&(await this._saveSession(i.session),await this._notifyAllSubscribers("SIGNED_IN",a)),this._returnResult({data:{user:s,session:a},error:null})}catch(e){if(tb(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async signUp(e){var t,r,n;try{let i;if("email"in e){let{email:r,password:n,options:o}=e,a=null,s=null;"pkce"===this.flowType&&([a,s]=await t2(this.storage,this.storageKey)),i=await rr(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:null==o?void 0:o.emailRedirectTo,body:{email:r,password:n,data:null!==(t=null==o?void 0:o.data)&&void 0!==t?t:{},gotrue_meta_security:{captcha_token:null==o?void 0:o.captchaToken},code_challenge:a,code_challenge_method:s},xform:ri})}else if("phone"in e){let{phone:t,password:o,options:a}=e;i=await rr(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:t,password:o,data:null!==(r=null==a?void 0:a.data)&&void 0!==r?r:{},channel:null!==(n=null==a?void 0:a.channel)&&void 0!==n?n:"sms",gotrue_meta_security:{captcha_token:null==a?void 0:a.captchaToken}},xform:ri})}else throw new t_("You must provide either an email or phone number and a password");let{data:o,error:a}=i;if(a||!o)return await tZ(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:a});let s=o.session,l=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",s)),this._returnResult({data:{user:l,session:s},error:null})}catch(e){if(await tZ(this.storage,`${this.storageKey}-code-verifier`),tb(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async signInWithPassword(e){try{let t;if("email"in e){let{email:r,password:n,options:i}=e;t=await rr(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:r,password:n,gotrue_meta_security:{captcha_token:null==i?void 0:i.captchaToken}},xform:ro})}else if("phone"in e){let{phone:r,password:n,options:i}=e;t=await rr(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:r,password:n,gotrue_meta_security:{captcha_token:null==i?void 0:i.captchaToken}},xform:ro})}else throw new t_("You must provide either an email or phone number and a password");let{data:r,error:n}=t;if(n)return this._returnResult({data:{user:null,session:null},error:n});if(!r||!r.session||!r.user){let e=new tS;return this._returnResult({data:{user:null,session:null},error:e})}return r.session&&(await this._saveSession(r.session),await this._notifyAllSubscribers("SIGNED_IN",r.session)),this._returnResult({data:Object.assign({user:r.user,session:r.session},r.weak_password?{weakPassword:r.weak_password}:null),error:n})}catch(e){if(tb(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async signInWithOAuth(e){var t,r,n,i;return await this._handleProviderSignIn(e.provider,{redirectTo:null===(t=e.options)||void 0===t?void 0:t.redirectTo,scopes:null===(r=e.options)||void 0===r?void 0:r.scopes,queryParams:null===(n=e.options)||void 0===n?void 0:n.queryParams,skipBrowserRedirect:null===(i=e.options)||void 0===i?void 0:i.skipBrowserRedirect})}async exchangeCodeForSession(e){return await this.initializePromise,this._acquireLock(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(e))}async signInWithWeb3(e){let{chain:t}=e;switch(t){case"ethereum":return await this.signInWithEthereum(e);case"solana":return await this.signInWithSolana(e);default:throw Error(`@supabase/auth-js: Unsupported chain "${t}"`)}}async signInWithEthereum(e){var t,r,n,i,o,a,s,l,c,u,h,f;let d,p;
24if("message"in e)d=e.message,p=e.signature;else{let u;let{chain:h,wallet:y,statement:m,options:g}=e;if(tz()){if("object"==typeof y)u=y;else{let e=window;if("ethereum"in e&&"object"==typeof e.ethereum&&"request"in e.ethereum&&"function"==typeof e.ethereum.request)u=e.ethereum;else throw Error("@supabase/auth-js: No compatible Ethereum wallet interface on the window object (window.ethereum) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'ethereum', wallet: resolvedUserWallet }) instead.")}}else{if("object"!=typeof y||!(null==g?void 0:g.url))throw Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");u=y}let v=new URL(null!==(t=null==g?void 0:g.url)&&void 0!==t?t:window.location.href),b=await u.request({method:"eth_requestAccounts"}).then(e=>e).catch(()=>{throw Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!b||0===b.length)throw Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");let w=rg(b[0]),x=null===(r=null==g?void 0:g.signInWithEthereum)||void 0===r?void 0:r.chainId;x||(x=parseInt(await u.request({method:"eth_chainId"}),16)),d=function(e){var t;let{chainId:r,domain:n,expirationTime:i,issuedAt:o=new Date,nonce:a,notBefore:s,requestId:l,resources:c,scheme:u,uri:h,version:f}=e;if(!Number.isInteger(r))throw Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${r}`);if(!n)throw Error('@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.');if(a&&a.length<8)throw Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${a}`);if(!h)throw Error('@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.');if("1"!==f)throw Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${f}`);if(null===(t=e.statement)||void 0===t?void 0:t.includes("\n"))throw Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${e.statement}`);let d=rg(e.address),p=u?`${u}://${n}`:n,y=e.statement?`${e.statement}
25`:"",m=`${p} wants you to sign in with your Ethereum account:
26${d}
27
28${y}`,g=`URI: ${h}
29Version: ${f}
30Chain ID: ${r}${a?`
31Nonce: ${a}`:""}
32Issued At: ${o.toISOString()}`;if(i&&(g+=`
33Expiration Time: ${i.toISOString()}`),s&&(g+=`
34Not Before: ${s.toISOString()}`),l&&(g+=`
35Request ID: ${l}`),c){let e="\nResources:";for(let t of c){if(!t||"string"!=typeof t)throw Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${t}`);e+=`
36- ${t}`}g+=e}return`${m}
37${g}`}({domain:v.host,address:w,statement:m,uri:v.href,version:"1",chainId:x,nonce:null===(n=null==g?void 0:g.signInWithEthereum)||void 0===n?void 0:n.nonce,issuedAt:null!==(o=null===(i=null==g?void 0:g.signInWithEthereum)||void 0===i?void 0:i.issuedAt)&&void 0!==o?o:new Date,expirationTime:null===(a=null==g?void 0:g.signInWithEthereum)||void 0===a?void 0:a.expirationTime,notBefore:null===(s=null==g?void 0:g.signInWithEthereum)||void 0===s?void 0:s.notBefore,requestId:null===(l=null==g?void 0:g.signInWithEthereum)||void 0===l?void 0:l.requestId,resources:null===(c=null==g?void 0:g.signInWithEthereum)||void 0===c?void 0:c.resources}),p=await u.request({method:"personal_sign",params:[(f=d,"0x"+Array.from(new TextEncoder().encode(f),e=>e.toString(16).padStart(2,"0")).join("")),w]})}try{let{data:t,error:r}=await rr(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:d,signature:p},(null===(u=e.options)||void 0===u?void 0:u.captchaToken)?{gotrue_meta_security:{captcha_token:null===(h=e.options)||void 0===h?void 0:h.captchaToken}}:null),xform:ri});if(r)throw r;if(!t||!t.session||!t.user){let e=new tS;return this._returnResult({data:{user:null,session:null},error:e})}return t.session&&(await this._saveSession(t.session),await this._notifyAllSubscribers("SIGNED_IN",t.session)),this._returnResult({data:Object.assign({},t),error:r})}catch(e){if(tb(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async signInWithSolana(e){var t,r,n,i,o,a,s,l,c,u,h,f;let d,p;
37if("message"in e)d=e.message,p=e.signature;else{let h;let{chain:f,wallet:y,statement:m,options:g}=e;if(tz()){if("object"==typeof y)h=y;else{let e=window;if("solana"in e&&"object"==typeof e.solana&&("signIn"in e.solana&&"function"==typeof e.solana.signIn||"signMessage"in e.solana&&"function"==typeof e.solana.signMessage))h=e.solana;else throw Error("@supabase/auth-js: No compatible Solana wallet interface on the window object (window.solana) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'solana', wallet: resolvedUserWallet }) instead.")}}else{if("object"!=typeof y||!(null==g?void 0:g.url))throw Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");h=y}let v=new URL(null!==(t=null==g?void 0:g.url)&&void 0!==t?t:window.location.href);if("signIn"in h&&h.signIn){let e;let t=await h.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},null==g?void 0:g.signInWithSolana),{version:"1",domain:v.host,uri:v.href}),m?{statement:m}:null));if(Array.isArray(t)&&t[0]&&"object"==typeof t[0])e=t[0];else if(t&&"object"==typeof t&&"signedMessage"in t&&"signature"in t)e=t;else throw Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in e&&"signature"in e&&("string"==typeof e.signedMessage||e.signedMessage instanceof Uint8Array)&&e.signature instanceof Uint8Array)d="string"==typeof e.signedMessage?e.signedMessage:new TextDecoder().decode(e.signedMessage),p=e.signature;else throw Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in h)||"function"!=typeof h.signMessage||!("publicKey"in h)||"object"!=typeof h||!h.publicKey||!("toBase58"in h.publicKey)||"function"!=typeof h.publicKey.toBase58)throw Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");d=[`${v.host} wants you to sign in with your Solana account:`,h.publicKey.toBase58(),...m?["",m,""]:[""],"Version: 1",`URI: ${v.href}`,`Issued At: ${null!==(n=null===(r=null==g?void 0:g.signInWithSolana)||void 0===r?void 0:r.issuedAt)&&void 0!==n?n:new Date().toISOString()}`,...(null===(i=null==g?void 0:g.signInWithSolana)||void 0===i?void 0:i.notBefore)?[`Not Before: ${g.signInWithSolana.notBefore}`]:[],...(null===(o=null==g?void 0:g.signInWithSolana)||void 0===o?void 0:o.expirationTime)?[`Expiration Time: ${g.signInWithSolana.expirationTime}`]:[],...(null===(a=null==g?void 0:g.signInWithSolana)||void 0===a?void 0:a.chainId)?[`Chain ID: ${g.signInWithSolana.chainId}`]:[],...(null===(s=null==g?void 0:g.signInWithSolana)||void 0===s?void 0:s.nonce)?[`Nonce: ${g.signInWithSolana.nonce}`]:[],...(null===(l=null==g?void 0:g.signInWithSolana)||void 0===l?void 0:l.requestId)?[`Request ID: ${g.signInWithSolana.requestId}`]:[],...(null===(u=null===(c=null==g?void 0:g.signInWithSolana)||void 0===c?void 0:c.resources)||void 0===u?void 0:u.length)?["Resources",...g.signInWithSolana.resources.map(e=>`- ${e}`)]:[]].join("\n");let e=await h.signMessage(new TextEncoder().encode(d),"utf8");if(!e||!(e instanceof Uint8Array))throw Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");p=e}}try{let{data:t,error:r}=await rr(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:d,signature:tq(p)},(null===(h=e.options)||void 0===h?void 0:h.captchaToken)?{gotrue_meta_security:{captcha_token:null===(f=e.options)||void 0===f?void 0:f.captchaToken}}:null),xform:ri});if(r)throw r;if(!t||!t.session||!t.user){let e=new tS;return this._returnResult({data:{user:null,session:null},error:e})}return t.session&&(await this._saveSession(t.session),await this._notifyAllSubscribers("SIGNED_IN",t.session)),this._returnResult({data:Object.assign({},t),error:r})}catch(e){if(tb(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async _exchangeCodeForSession(e){let t=await tG(this.storage,`${this.storageKey}-code-verifier`),[r,n]=(null!=t?t:"").split("/");try{if(!r&&"pkce"===this.flowType)throw new tP;let{data:t,error:i}=await rr(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:e,code_verifier:r},xform:ri});if(await tZ(this.storage,`${this.storageKey}-code-verifier`),i)throw i;if(!t||!t.session||!t.user){let e=new tS;return this._returnResult({data:{user:null,session:null,redirectType:null},error:e})}return t.session&&(await this._saveSession(t.session),await this._notifyAllSubscribers("SIGNED_IN",t.session)),this._returnResult({data:Object.assign(Object.assign({},t),{redirectType:null!=n?n:null}),error:i})}catch(e){if(await tZ(this.storage,`${this.storageKey}-code-verifier`),tb(e))return this._returnResult({data:{user:null,session:null,redirectType:null},error:e});throw e}}async signInWithIdToken(e){try{let{options:t,provider:r,token:n,access_token:i,nonce:o}=e,{data:a,error:s}=await rr(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:r,id_token:n,access_token:i,nonce:o,gotrue_meta_security:{captcha_token:null==t?void 0:t.captchaToken}},xform:ri});if(s)return this._returnResult({data:{user:null,session:null},error:s});if(!a||!a.session||!a.user){let e=new tS;return this._returnResult({data:{user:null,session:null},error:e})}return a.session&&(await this._saveSession(a.session),await this._notifyAllSubscribers("SIGNED_IN",a.session)),this._returnResult({data:a,error:s})}catch(e){if(tb(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async signInWithOtp(e){var t,r,n,i,o;try{if("email"in e){let{email:n,options:i}=e,o=null,a=null;"pkce"===this.flowType&&([o,a]=await t2(this.storage,this.storageKey));let{error:s}=await rr(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:n,data:null!==(t=null==i?void 0:i.data)&&void 0!==t?t:{}
37,create_user:null===(r=null==i?void 0:i.shouldCreateUser)||void 0===r||r,gotrue_meta_security:{captcha_token:null==i?void 0:i.captchaToken},code_challenge:o,code_challenge_method:a},redirectTo:null==i?void 0:i.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:s})}if("phone"in e){let{phone:t,options:r}=e,{data:a,error:s}=await rr(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:t,data:null!==(n=null==r?void 0:r.data)&&void 0!==n?n:{},create_user:null===(i=null==r?void 0:r.shouldCreateUser)||void 0===i||i,gotrue_meta_security:{captcha_token:null==r?void 0:r.captchaToken},channel:null!==(o=null==r?void 0:r.channel)&&void 0!==o?o:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:null==a?void 0:a.message_id},error:s})}throw new t_("You must provide either an email or phone number.")}catch(e){if(await tZ(this.storage,`${this.storageKey}-code-verifier`),tb(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async verifyOtp(e){var t,r;try{let n,i;"options"in e&&(n=null===(t=e.options)||void 0===t?void 0:t.redirectTo,i=null===(r=e.options)||void 0===r?void 0:r.captchaToken);let{data:o,error:a}=await rr(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},e),{gotrue_meta_security:{captcha_token:i}}),redirectTo:n,xform:ri});if(a)throw a;if(!o)throw Error("An error occurred on token verification.");let s=o.session,l=o.user;return(null==s?void 0:s.access_token)&&(await this._saveSession(s),await this._notifyAllSubscribers("recovery"==e.type?"PASSWORD_RECOVERY":"SIGNED_IN",s)),this._returnResult({data:{user:l,session:s},error:null})}catch(e){if(tb(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async signInWithSSO(e){var t,r,n,i,o;try{let a=null,s=null;"pkce"===this.flowType&&([a,s]=await t2(this.storage,this.storageKey));let l=await rr(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in e?{provider_id:e.providerId}:null),"domain"in e?{domain:e.domain}:null),{redirect_to:null!==(r=null===(t=e.options)||void 0===t?void 0:t.redirectTo)&&void 0!==r?r:void 0}),(null===(n=null==e?void 0:e.options)||void 0===n?void 0:n.captchaToken)?{gotrue_meta_security:{captcha_token:e.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:a,code_challenge_method:s}),headers:this.headers,xform:rs});return(null===(i=l.data)||void 0===i?void 0:i.url)&&tz()&&!(null===(o=e.options)||void 0===o?void 0:o.skipBrowserRedirect)&&window.location.assign(l.data.url),this._returnResult(l)}catch(e){if(await tZ(this.storage,`${this.storageKey}-code-verifier`),tb(e))return this._returnResult({data:null,error:e});throw e}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async e=>{let{data:{session:t},error:r}=e;if(r)throw r;if(!t)throw new tk;let{error:n}=await rr(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:t.access_token});return this._returnResult({data:{user:null,session:null},error:n})})}catch(e){if(tb(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async resend(e){try{let t=`${this.url}/resend`;if("email"in e){let{email:r,type:n,options:i}=e,{error:o}=await rr(this.fetch,"POST",t,{headers:this.headers,body:{email:r,type:n,gotrue_meta_security:{captcha_token:null==i?void 0:i.captchaToken}},redirectTo:null==i?void 0:i.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:o})}if("phone"in e){let{phone:r,type:n,options:i}=e,{data:o,error:a}=await rr(this.fetch,"POST",t,{headers:this.headers,body:{phone:r,type:n,gotrue_meta_security:{captcha_token:null==i?void 0:i.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:null==o?void 0:o.message_id},error:a})}throw new t_("You must provide either an email or phone number and a type")}catch(e){if(tb(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async getSession(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>this._useSession(async e=>e))}async _acquireLock(e,t){this._debug("#_acquireLock","begin",e);try{if(this.lockAcquired){let e=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),r=(async()=>(await e,await t()))();return this.pendingInLock.push((async()=>{try{await r}catch(e){}})()),r}return await this.lock(`lock:${this.storageKey}`,e,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;let e=t();for(this.pendingInLock.push((async()=>{try{await e}catch(e){}})()),await e;this.pendingInLock.length;){let e=[...this.pendingInLock];await Promise.all(e),this.pendingInLock.splice(0,e.length)}return await e}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(e){this._debug("#_useSession","begin");try{let t=await this.__loadSession();return await e(t)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lockAcquired||this._debug("#__loadSession()","used outside of an acquired lock!",Error().stack);try{let t=null,r=await tG(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",r),null!==r&&(this._isValidSession(r)?t=r:(this._debug("#getSession()","session from storage is not val
37id"),await this._removeSession())),!t)return{data:{session:null},error:null};let n=!!t.expires_at&&1e3*t.expires_at-Date.now()<9e4;if(this._debug("#__loadSession()",`session has${n?"":" not"} expired`,"expires_at",t.expires_at),!n){if(this.userStorage){let e=await tG(this.userStorage,this.storageKey+"-user");(null==e?void 0:e.user)?t.user=e.user:t.user=t6()}if(this.storage.isServer&&t.user&&!t.user.__isUserNotAvailableProxy){var e;let r={value:this.suppressGetSessionWarning};t.user=(e=t.user,new Proxy(e,{get:(e,t,n)=>{if("__isInsecureUserWarningProxy"===t)return!0;if("symbol"==typeof t){let r=t.toString();if("Symbol(Symbol.toPrimitive)"===r||"Symbol(Symbol.toStringTag)"===r||"Symbol(util.inspect.custom)"===r||"Symbol(nodejs.util.inspect.custom)"===r)return Reflect.get(e,t,n)}return r.value||"string"!=typeof t||(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),r.value=!0),Reflect.get(e,t,n)}})),r.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:t},error:null}}let{data:i,error:o}=await this._callRefreshToken(t.refresh_token);if(o)return this._returnResult({data:{session:null},error:o});return this._returnResult({data:{session:i},error:null})}finally{this._debug("#__loadSession()","end")}}async getUser(e){if(e)return await this._getUser(e);await this.initializePromise;let t=await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser());return t.data.user&&(this.suppressGetSessionWarning=!0),t}async _getUser(e){try{if(e)return await rr(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:e,xform:ra});return await this._useSession(async e=>{var t,r,n;let{data:i,error:o}=e;if(o)throw o;return(null===(t=i.session)||void 0===t?void 0:t.access_token)||this.hasCustomAuthorizationHeader?await rr(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:null!==(n=null===(r=i.session)||void 0===r?void 0:r.access_token)&&void 0!==n?n:void 0,xform:ra}):{data:{user:null},error:new tk}})}catch(e){if(tb(e))return tj(e)&&(await this._removeSession(),await tZ(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:e});throw e}}async updateUser(e,t={}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(e,t))}async _updateUser(e,t={}){try{return await this._useSession(async r=>{let{data:n,error:i}=r;if(i)throw i;if(!n.session)throw new tk;let o=n.session,a=null,s=null;"pkce"===this.flowType&&null!=e.email&&([a,s]=await t2(this.storage,this.storageKey));let{data:l,error:c}=await rr(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:null==t?void 0:t.emailRedirectTo,body:Object.assign(Object.assign({},e),{code_challenge:a,code_challenge_method:s}),jwt:o.access_token,xform:ra});if(c)throw c;return o.user=l.user,await this._saveSession(o),await this._notifyAllSubscribers("USER_UPDATED",o),this._returnResult({data:{user:o.user},error:null})})}catch(e){if(await tZ(this.storage,`${this.storageKey}-code-verifier`),tb(e))return this._returnResult({data:{user:null},error:e});throw e}}async setSession(e){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._setSession(e))}async _setSession(e){try{if(!e.access_token||!e.refresh_token)throw new tk;let t=Date.now()/1e3,r=t,n=!0,i=null,{payload:o}=tY(e.access_token);if(o.exp&&(n=(r=o.exp)<=t),n){let{data:t,error:r}=await this._callRefreshToken(e.refresh_token);if(r)return this._returnResult({data:{user:null,session:null},error:r});if(!t)return{data:{user:null,session:null},error:null};i=t}else{let{data:n,error:o}=await this._getUser(e.access_token);if(o)return this._returnResult({data:{user:null,session:null},error:o});i={access_token:e.access_token,refresh_token:e.refresh_token,user:n.user,token_type:"bearer",expires_in:r-t,expires_at:r},await this._saveSession(i),await this._notifyAllSubscribers("SIGNED_IN",i)}return this._returnResult({data:{user:i.user,session:i},error:null})}catch(e){if(tb(e))return this._returnResult({data:{session:null,user:null},error:e});throw e}}async refreshSession(e){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._refreshSession(e))}async _refreshSession(e){try{return await this._useSession(async t=>{var r;if(!e){let{data:n,error:i}=t;if(i)throw i;e=null!==(r=n.session)&&void 0!==r?r:void 0}if(!(null==e?void 0:e.refresh_token))throw new tk;let{data:n,error:i}=await this._callRefreshToken(e.refresh_token);return i?this._returnResult({data:{user:null,session:null},error:i}):n?this._returnResult({data:{user:n.user,session:n},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(e){if(tb(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async _getSessionFromURL(e,t){try{if(!tz())throw new tE("No browser detected.");
37if(e.error||e.error_description||e.error_code)throw new tE(e.error_description||"Error in URL with unspecified error_description",{error:e.error||"unspecified_error",code:e.error_code||"unspecified_code"});switch(t){case"implicit":if("pkce"===this.flowType)throw new tA("Not a valid PKCE flow url.");break;case"pkce":if("implicit"===this.flowType)throw new tE("Not a valid implicit grant flow url.")}if("pkce"===t){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!e.code)throw new tA("No code detected.");let{data:t,error:r}=await this._exchangeCodeForSession(e.code);if(r)throw r;let n=new URL(window.location.href);return n.searchParams.delete("code"),window.history.replaceState(window.history.state,"",n.toString()),{data:{session:t.session,redirectType:null},error:null}}let{provider_token:r,provider_refresh_token:n,access_token:i,refresh_token:o,expires_in:a,expires_at:s,token_type:l}=e;if(!i||!a||!o||!l)throw new tE("No session defined in URL");let c=Math.round(Date.now()/1e3),u=parseInt(a),h=c+u;s&&(h=parseInt(s));let f=h-c;1e3*f<=3e4&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${f}s, should have been closer to ${u}s`);let d=h-u;c-d>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",d,h,c):c-d<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",d,h,c);let{data:p,error:y}=await this._getUser(i);if(y)throw y;let m={provider_token:r,provider_refresh_token:n,access_token:i,expires_in:u,expires_at:h,refresh_token:o,token_type:l,user:p.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:m,redirectType:e.type},error:null})}catch(e){if(tb(e))return this._returnResult({data:{session:null,redirectType:null},error:e});throw e}}_isImplicitGrantCallback(e){return"function"==typeof this.detectSessionInUrl?this.detectSessionInUrl(new URL(window.location.href),e):!!(e.access_token||e.error_description)}async _isPKCECallback(e){let t=await tG(this.storage,`${this.storageKey}-code-verifier`);return!!(e.code&&t)}async signOut(e={scope:"global"}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._signOut(e))}async _signOut({scope:e}={scope:"global"}){return await this._useSession(async t=>{var r;let{data:n,error:i}=t;if(i&&!tj(i))return this._returnResult({error:i});let o=null===(r=n.session)||void 0===r?void 0:r.access_token;if(o){let{error:t}=await this.admin.signOut(o,e);if(t&&!(tb(t)&&"AuthApiError"===t.name&&(404===t.status||401===t.status||403===t.status)||tj(t)))return this._returnResult({error:t})}return"others"!==e&&(await this._removeSession(),await tZ(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(e){let t=Symbol("auth-callback"),r={id:t,callback:e,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",t),this.stateChangeEmitters.delete(t)}};return this._debug("#onAuthStateChange()","registered callback with id",t),this.stateChangeEmitters.set(t,r),(async()=>{await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{this._emitInitialSession(t)})})(),{data:{subscription:r}}}async _emitInitialSession(e){return await this._useSession(async t=>{var r,n;try{let{data:{session:n},error:i}=t;if(i)throw i;await (null===(r=this.stateChangeEmitters.get(e))||void 0===r?void 0:r.callback("INITIAL_SESSION",n)),this._debug("INITIAL_SESSION","callback id",e,"session",n)}catch(t){await (null===(n=this.stateChangeEmitters.get(e))||void 0===n?void 0:n.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",e,"error",t),tj(t)?console.warn(t):console.error(t)}})}async resetPasswordForEmail(e,t={}){let r=null,n=null;"pkce"===this.flowType&&([r,n]=await t2(this.storage,this.storageKey,!0));try{return await rr(this.fetch,"POST",`${this.url}/recover`,{body:{email:e,code_challenge:r,code_challenge_method:n,gotrue_meta_security:{captcha_token:t.captchaToken}},headers:this.headers,redirectTo:t.redirectTo})}catch(e){if(await tZ(this.storage,`${this.storageKey}-code-verifier`),tb(e))return this._returnResult({data:null,error:e});throw e}}async getUserIdentities(){var e;try{let{data:t,error:r}=await this.getUser();if(r)throw r;return this._returnResult({data:{identities:null!==(e=t.user.identities)&&void 0!==e?e:[]},error:null})}catch(e){if(tb(e))return this._returnResult({data:null,error:e});throw e}}async linkIdentity(e){return"token"in e?this.linkIdentityIdToken(e):this.linkIdentityOAuth(e)}async linkIdentityOAuth(e){var t;try{let{data:r,error:n}=await this._useSession(async t=>{var r,n,i,o,a;let{data:s,error:l}=t;if(l)throw l;let c=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,e.provider,{redirectTo:null===(r=e.options)||void 0===r?void 0:r.redirectTo,scopes:null===(n=e.options)||void 0===n?void 0:n.scopes,queryParams:null===(i=e.options)||void 0===i?void 0:i.queryParams,skipBrowserRedirect:!0});return await rr(this.fetch,"GET",c,{headers:this.headers,jwt:null!==(a=null===(o=s.session)||void 0===o?void 0:o.access_token)&&void 0!==a?a:void 0})});if(n)throw n;return!tz()||(null===(t=e.options)||void 0===t?void 0:t.skipBrowserRedirect)||window.location.assign(null==r?void 0:r.url),this._returnResult({data:{provider:e.provider,url:null==r?void 0:r.url},error:null})}catch(t){if(tb(t))return this._returnResult({data:{provider:e.provider,url:null},error:t});throw t}}async linkIdentityIdToken(e){return await this._useSession(async t=>{var r;try{let{error:n,data:{session:i}}=t;if(n)throw n;let{options:o,provider:a,token:s,access_token:l,nonce:c}=e,{data:u,error:h}=await rr(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:null!==(r=null==i?void 0:i.access_token)&&void 0!==r?r:void 0,body:{provider:a,id_token:s,access_token:l,nonce:c,link_identity:!0,gotrue_meta_security:{captcha_token:null==o?void 0:o.captchaToken}},xform:ri});if(h)return this._returnResult({data:{user:null,session:null},error:h});if(!u||!u.session||!u.user)return this._returnResult({data:{user:null,session:null},error:new tS});return u.session&&(await this._saveSession(u.session),await this._notifyAllSubscribers("USER_UPDATED",u.session)),this._returnResult({data:u,error:h})}catch(e){if(await tZ(this.storage,`${this.storageKey}-code-verifier`),tb(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}})}async unlinkIdentity(e){try{return await this._useSession(async t=>{var r,n;let{data:i,error:o}=t;if(o)throw o;
37return await rr(this.fetch,"DELETE",`${this.url}/user/identities/${e.identity_id}`,{headers:this.headers,jwt:null!==(n=null===(r=i.session)||void 0===r?void 0:r.access_token)&&void 0!==n?n:void 0})})}catch(e){if(tb(e))return this._returnResult({data:null,error:e});throw e}}async _refreshAccessToken(e){let t=`#_refreshAccessToken(${e.substring(0,5)}...)`;this._debug(t,"begin");try{var r,n;let i=Date.now();return await (r=async r=>(r>0&&await tX(200*Math.pow(2,r-1)),this._debug(t,"refreshing attempt",r),await rr(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:e},headers:this.headers,xform:ri})),n=(e,t)=>t&&tN(t)&&Date.now()+200*Math.pow(2,e)-i<3e4,new Promise((e,t)=>{(async()=>{for(let i=0;i<1/0;i++)try{let t=await r(i);if(!n(i,null,t)){e(t);return}}catch(e){if(!n(i,e)){t(e);return}}})()}))}catch(e){if(this._debug(t,"error",e),tb(e))return this._returnResult({data:{session:null,user:null},error:e});throw e}finally{this._debug(t,"end")}}_isValidSession(e){return"object"==typeof e&&null!==e&&"access_token"in e&&"refresh_token"in e&&"expires_at"in e}async _handleProviderSignIn(e,t){let r=await this._getUrlForProvider(`${this.url}/authorize`,e,{redirectTo:t.redirectTo,scopes:t.scopes,queryParams:t.queryParams});return this._debug("#_handleProviderSignIn()","provider",e,"options",t,"url",r),tz()&&!t.skipBrowserRedirect&&window.location.assign(r),{data:{provider:e,url:r},error:null}}async _recoverAndRefresh(){var e,t;let r="#_recoverAndRefresh()";this._debug(r,"begin");try{let n=await tG(this.storage,this.storageKey);if(n&&this.userStorage){let t=await tG(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!t&&(t={user:n.user},await tK(this.userStorage,this.storageKey+"-user",t)),n.user=null!==(e=null==t?void 0:t.user)&&void 0!==e?e:t6()}else if(n&&!n.user&&!n.user){let e=await tG(this.storage,this.storageKey+"-user");e&&(null==e?void 0:e.user)?(n.user=e.user,await tZ(this.storage,this.storageKey+"-user"),await tK(this.storage,this.storageKey,n)):n.user=t6()}if(this._debug(r,"session from storage",n),!this._isValidSession(n)){this._debug(r,"session is not valid"),null!==n&&await this._removeSession();return}let i=(null!==(t=n.expires_at)&&void 0!==t?t:1/0)*1e3-Date.now()<9e4;if(this._debug(r,`session has${i?"":" not"} expired with margin of 90000s`),i){if(this.autoRefreshToken&&n.refresh_token){let{error:e}=await this._callRefreshToken(n.refresh_token);e&&(console.error(e),tN(e)||(this._debug(r,"refresh failed with a non-retryable error, removing the session",e),await this._removeSession()))}}else if(n.user&&!0===n.user.__isUserNotAvailableProxy)try{let{data:e,error:t}=await this._getUser(n.access_token);!t&&(null==e?void 0:e.user)?(n.user=e.user,await this._saveSession(n),await this._notifyAllSubscribers("SIGNED_IN",n)):this._debug(r,"could not get user data, skipping SIGNED_IN notification")}catch(e){console.error("Error getting user data:",e),this._debug(r,"error getting user data, skipping SIGNED_IN notification",e)}else await this._notifyAllSubscribers("SIGNED_IN",n)}catch(e){this._debug(r,"error",e),console.error(e);return}finally{this._debug(r,"end")}}async _callRefreshToken(e){var t,r;if(!e)throw new tk;if(this.refreshingDeferred)return this.refreshingDeferred.promise;let n=`#_callRefreshToken(${e.substring(0,5)}...)`;this._debug(n,"begin");try{this.refreshingDeferred=new tJ;let{data:t,error:r}=await this._refreshAccessToken(e);if(r)throw r;if(!t.session)throw new tk;await this._saveSession(t.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",t.session);let n={data:t.session,error:null};return this.refreshingDeferred.resolve(n),n}catch(e){if(this._debug(n,"error",e),tb(e)){let r={data:null,error:e};return tN(e)||await this._removeSession(),null===(t=this.refreshingDeferred)||void 0===t||t.resolve(r),r}throw null===(r=this.refreshingDeferred)||void 0===r||r.reject(e),e}finally{this.refreshingDeferred=null,this._debug(n,"end")}}async _notifyAllSubscribers(e,t,r=!0){let n=`#_notifyAllSubscribers(${e})`;this._debug(n,"begin",t,`broadcast = ${r}`);try{this.broadcastChannel&&r&&this.broadcastChannel.postMessage({event:e,session:t});let n=[],i=Array.from(this.stateChangeEmitters.values()).map(async r=>{try{await r.callback(e,t)}catch(e){n.push(e)}});if(await Promise.all(i),n.length>0){for(let e=0;e<n.length;e+=1)console.error(n[e]);throw n[0]}}finally{this._debug(n,"end")}}async _saveSession(e){this._debug("#_saveSession()",e),this.suppressGetSessionWarning=!0,await tZ(this.storage,`${this.storageKey}-code-verifier`);let t=Object.assign({},e),r=t.user&&!0===t.user.__isUserNotAvailableProxy;if(this.userStorage){!r&&t.user&&await tK(this.userStorage,this.storageKey+"-user",{user:t.user});let e=Object.assign({},t);delete e.user;let n=t8(e);await tK(this.storage,this.storageKey,n)}else{let e=t8(t);await tK(this.storage,this.storageKey,e)}}async _removeSession(){this._debug("#_removeSession()"),this.suppressGetSessionWarning=!1,await tZ(this.storage,this.storageKey),await tZ(this.storage,this.storageKey+"-code-verifier"),await tZ(this.storage,this.storageKey+"-user"),this.userStorage&&await tZ(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");let e=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{e&&tz()&&(null==window?void 0:window.removeEventListener)&&window.removeEventListener("visibilitychange",e)}
37catch(e){console.error("removing visibilitychange callback failed",e)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");let e=setInterval(()=>this._autoRefreshTokenTick(),3e4);this.autoRefreshTicker=e,e&&"object"==typeof e&&"function"==typeof e.unref?e.unref():"undefined"!=typeof Deno&&"function"==typeof Deno.unrefTimer&&Deno.unrefTimer(e);let t=setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0);this.autoRefreshTickTimeout=t,t&&"object"==typeof t&&"function"==typeof t.unref?t.unref():"undefined"!=typeof Deno&&"function"==typeof Deno.unrefTimer&&Deno.unrefTimer(t)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");let e=this.autoRefreshTicker;this.autoRefreshTicker=null,e&&clearInterval(e);let t=this.autoRefreshTickTimeout;this.autoRefreshTickTimeout=null,t&&clearTimeout(t)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async _autoRefreshTokenTick(){this._debug("#_autoRefreshTokenTick()","begin");try{await this._acquireLock(0,async()=>{try{let e=Date.now();try{return await this._useSession(async t=>{let{data:{session:r}}=t;if(!r||!r.refresh_token||!r.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}let n=Math.floor((1e3*r.expires_at-e)/3e4);this._debug("#_autoRefreshTokenTick()",`access token expires in ${n} ticks, a tick lasts 30000ms, refresh threshold is 3 ticks`),n<=3&&await this._callRefreshToken(r.refresh_token)})}catch(e){console.error("Auto refresh tick failed with error. This is likely a transient error.",e)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(e){if(e.isAcquireTimeout||e instanceof rp)this._debug("auto refresh token tick lock not available");else throw e}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!tz()||!(null==window?void 0:window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>{try{await this._onVisibilityChanged(!1)}catch(e){this._debug("#visibilityChangedCallback","error",e)}},null==window||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(e){console.error("_handleVisibilityChange",e)}}async _onVisibilityChanged(e){let t=`#_onVisibilityChanged(${e})`;this._debug(t,"visibilityState",document.visibilityState),"visible"===document.visibilityState?(this.autoRefreshToken&&this._startAutoRefresh(),e||(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{if("visible"!==document.visibilityState){this._debug(t,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()}))):"hidden"===document.visibilityState&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(e,t,r){let n=[`provider=${encodeURIComponent(t)}`];if((null==r?void 0:r.redirectTo)&&n.push(`redirect_to=${encodeURIComponent(r.redirectTo)}`),(null==r?void 0:r.scopes)&&n.push(`scopes=${encodeURIComponent(r.scopes)}`),"pkce"===this.flowType){let[e,t]=await t2(this.storage,this.storageKey),r=new URLSearchParams({code_challenge:`${encodeURIComponent(e)}`,code_challenge_method:`${encodeURIComponent(t)}`});n.push(r.toString())}if(null==r?void 0:r.queryParams){let e=new URLSearchParams(r.queryParams);n.push(e.toString())}return(null==r?void 0:r.skipBrowserRedirect)&&n.push(`skip_http_redirect=${r.skipBrowserRedirect}`),`${e}?${n.join("&")}`}async _unenroll(e){try{return await this._useSession(async t=>{var r;let{data:n,error:i}=t;return i?this._returnResult({data:null,error:i}):await rr(this.fetch,"DELETE",`${this.url}/factors/${e.factorId}`,{headers:this.headers,jwt:null===(r=null==n?void 0:n.session)||void 0===r?void 0:r.access_token})})}catch(e){if(tb(e))return this._returnResult({data:null,error:e});throw e}}async _enroll(e){try{return await this._useSession(async t=>{var r,n;let{data:i,error:o}=t;if(o)return this._returnResult({data:null,error:o});let a=Object.assign({friendly_name:e.friendlyName,factor_type:e.factorType},"phone"===e.factorType?{phone:e.phone}:"totp"===e.factorType?{issuer:e.issuer}:{}),{data:s,error:l}=await rr(this.fetch,"POST",`${this.url}/factors`,{body:a,headers:this.headers,jwt:null===(r=null==i?void 0:i.session)||void 0===r?void 0:r.access_token});return l?this._returnResult({data:null,error:l}):("totp"===e.factorType&&"totp"===s.type&&(null===(n=null==s?void 0:s.totp)||void 0===n?void 0:n.qr_code)&&(s.totp.qr_code=`data:image/svg+xml;utf-8,${s.totp.qr_code}`),this._returnResult({data:s,error:null}))})}catch(e){if(tb(e))return this._returnResult({data:null,error:e});throw e}}async _verify(e){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async t=>{var r,n,i;let{data:o,error:a}=t;if(a)return this._returnResult({data:null,error:a});let s=Object.assign({challenge_id:e.challengeId},"webauthn"in e?{webauthn:Object.assign(Object.assign({},e.webauthn),{credential_response:"create"===e.webauthn.type?(n=e.webauthn.credential_response,"toJSON"in n&&"function"==typeof n.toJSON?n.toJSON():{id:n.id,rawId:n.id,response:{attestationObject:tq(new 
37Uint8Array(n.response.attestationObject)),clientDataJSON:tq(new Uint8Array(n.response.clientDataJSON))},type:"public-key",clientExtensionResults:n.getClientExtensionResults(),authenticatorAttachment:null!==(i=n.authenticatorAttachment)&&void 0!==i?i:void 0}):function(e){var t;if("toJSON"in e&&"function"==typeof e.toJSON)return e.toJSON();let r=e.getClientExtensionResults(),n=e.response;return{id:e.id,rawId:e.id,response:{authenticatorData:tq(new Uint8Array(n.authenticatorData)),clientDataJSON:tq(new Uint8Array(n.clientDataJSON)),signature:tq(new Uint8Array(n.signature)),userHandle:n.userHandle?tq(new Uint8Array(n.userHandle)):void 0},type:"public-key",clientExtensionResults:r,authenticatorAttachment:null!==(t=e.authenticatorAttachment)&&void 0!==t?t:void 0}}(e.webauthn.credential_response)})}:{code:e.code}),{data:l,error:c}=await rr(this.fetch,"POST",`${this.url}/factors/${e.factorId}/verify`,{body:s,headers:this.headers,jwt:null===(r=null==o?void 0:o.session)||void 0===r?void 0:r.access_token});return c?this._returnResult({data:null,error:c}):(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+l.expires_in},l)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",l),this._returnResult({data:l,error:c}))})}catch(e){if(tb(e))return this._returnResult({data:null,error:e});throw e}})}async _challenge(e){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async t=>{var r;let{data:n,error:o}=t;if(o)return this._returnResult({data:null,error:o});let a=await rr(this.fetch,"POST",`${this.url}/factors/${e.factorId}/challenge`,{body:e,headers:this.headers,jwt:null===(r=null==n?void 0:n.session)||void 0===r?void 0:r.access_token});if(a.error)return a;let{data:s}=a;if("webauthn"!==s.type)return{data:s,error:null};switch(s.webauthn.type){case"create":return{data:Object.assign(Object.assign({},s),{webauthn:Object.assign(Object.assign({},s.webauthn),{credential_options:Object.assign(Object.assign({},s.webauthn.credential_options),{publicKey:function(e){if(!e)throw Error("Credential creation options are required");if("undefined"!=typeof PublicKeyCredential&&"parseCreationOptionsFromJSON"in PublicKeyCredential&&"function"==typeof PublicKeyCredential.parseCreationOptionsFromJSON)return PublicKeyCredential.parseCreationOptionsFromJSON(e);let{challenge:t,user:r,excludeCredentials:n}=e,o=i(e,["challenge","user","excludeCredentials"]),a=tU(t).buffer,s=Object.assign(Object.assign({},r),{id:tU(r.id).buffer}),l=Object.assign(Object.assign({},o),{challenge:a,user:s});if(n&&n.length>0){l.excludeCredentials=Array(n.length);for(let e=0;e<n.length;e++){let t=n[e];l.excludeCredentials[e]=Object.assign(Object.assign({},t),{id:tU(t.id).buffer,type:t.type||"public-key",transports:t.transports})}}return l}(s.webauthn.credential_options.publicKey)})})}),error:null};case"request":return{data:Object.assign(Object.assign({},s),{webauthn:Object.assign(Object.assign({},s.webauthn),{credential_options:Object.assign(Object.assign({},s.webauthn.credential_options),{publicKey:function(e){if(!e)throw Error("Credential request options are required");if("undefined"!=typeof PublicKeyCredential&&"parseRequestOptionsFromJSON"in PublicKeyCredential&&"function"==typeof PublicKeyCredential.parseRequestOptionsFromJSON)return PublicKeyCredential.parseRequestOptionsFromJSON(e);let{challenge:t,allowCredentials:r}=e,n=i(e,["challenge","allowCredentials"]),o=tU(t).buffer,a=Object.assign(Object.assign({},n),{challenge:o});if(r&&r.length>0){a.allowCredentials=Array(r.length);for(let e=0;e<r.length;e++){let t=r[e];a.allowCredentials[e]=Object.assign(Object.assign({},t),{id:tU(t.id).buffer,type:t.type||"public-key",transports:t.transports})}}return a}(s.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(e){if(tb(e))return this._returnResult({data:null,error:e});throw e}})}async _challengeAndVerify(e){let{data:t,error:r}=await this._challenge({factorId:e.factorId});return r?this._returnResult({data:null,error:r}):await this._verify({factorId:e.factorId,challengeId:t.id,code:e.code})}async _listFactors(){var e;let{data:{user:t},error:r}=await this.getUser();if(r)return{data:null,error:r};let n={all:[],phone:[],totp:[],webauthn:[]};for(let r of null!==(e=null==t?void 0:t.factors)&&void 0!==e?e:[])n.all.push(r),"verified"===r.status&&n[r.factor_type].push(r);return{data:n,error:null}}async _getAuthenticatorAssuranceLevel(e){var t,r,n,i;if(e)try{let{payload:n}=tY(e),i=null;n.aal&&(i=n.aal);let o=i,{data:{user:a},error:s}=await this.getUser(e);if(s)return this._returnResult({data:null,error:s});(null!==(r=null===(t=null==a?void 0:a.factors)||void 0===t?void 0:t.filter(e=>"verified"===e.status))&&void 0!==r?r:[]).length>0&&(o="aal2");let l=n.amr||[];return{data:{currentLevel:i,nextLevel:o,currentAuthenticationMethods:l},error:null}}catch(e){if(tb(e))return this._returnResult({data:null,error:e});throw e}let{data:{session:o},error:a}
37=await this.getSession();if(a)return this._returnResult({data:null,error:a});if(!o)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};let{payload:s}=tY(o.access_token),l=null;s.aal&&(l=s.aal);let c=l;return(null!==(i=null===(n=o.user.factors)||void 0===n?void 0:n.filter(e=>"verified"===e.status))&&void 0!==i?i:[]).length>0&&(c="aal2"),{data:{currentLevel:l,nextLevel:c,currentAuthenticationMethods:s.amr||[]},error:null}}async _getAuthorizationDetails(e){try{return await this._useSession(async t=>{let{data:{session:r},error:n}=t;return n?this._returnResult({data:null,error:n}):r?await rr(this.fetch,"GET",`${this.url}/oauth/authorizations/${e}`,{headers:this.headers,jwt:r.access_token,xform:e=>({data:e,error:null})}):this._returnResult({data:null,error:new tk})})}catch(e){if(tb(e))return this._returnResult({data:null,error:e});throw e}}async _approveAuthorization(e,t){try{return await this._useSession(async r=>{let{data:{session:n},error:i}=r;if(i)return this._returnResult({data:null,error:i});if(!n)return this._returnResult({data:null,error:new tk});let o=await rr(this.fetch,"POST",`${this.url}/oauth/authorizations/${e}/consent`,{headers:this.headers,jwt:n.access_token,body:{action:"approve"},xform:e=>({data:e,error:null})});return o.data&&o.data.redirect_url&&tz()&&!(null==t?void 0:t.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o})}catch(e){if(tb(e))return this._returnResult({data:null,error:e});throw e}}async _denyAuthorization(e,t){try{return await this._useSession(async r=>{let{data:{session:n},error:i}=r;if(i)return this._returnResult({data:null,error:i});if(!n)return this._returnResult({data:null,error:new tk});let o=await rr(this.fetch,"POST",`${this.url}/oauth/authorizations/${e}/consent`,{headers:this.headers,jwt:n.access_token,body:{action:"deny"},xform:e=>({data:e,error:null})});return o.data&&o.data.redirect_url&&tz()&&!(null==t?void 0:t.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o})}catch(e){if(tb(e))return this._returnResult({data:null,error:e});throw e}}async _listOAuthGrants(){try{return await this._useSession(async e=>{let{data:{session:t},error:r}=e;return r?this._returnResult({data:null,error:r}):t?await rr(this.fetch,"GET",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:t.access_token,xform:e=>({data:e,error:null})}):this._returnResult({data:null,error:new tk})})}catch(e){if(tb(e))return this._returnResult({data:null,error:e});throw e}}async _revokeOAuthGrant(e){try{return await this._useSession(async t=>{let{data:{session:r},error:n}=t;return n?this._returnResult({data:null,error:n}):r?(await rr(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:r.access_token,query:{client_id:e.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new tk})})}catch(e){if(tb(e))return this._returnResult({data:null,error:e});throw e}}async fetchJwk(e,t={keys:[]}){let r=t.keys.find(t=>t.kid===e);if(r)return r;let n=Date.now();if((r=this.jwks.keys.find(t=>t.kid===e))&&this.jwks_cached_at+6e5>n)return r;let{data:i,error:o}=await rr(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(o)throw o;return i.keys&&0!==i.keys.length&&(this.jwks=i,this.jwks_cached_at=n,r=i.keys.find(t=>t.kid===e))?r:null}async getClaims(e,t={}){try{let r=e;if(!r){let{data:e,error:t}
37=await this.getSession();if(t||!e.session)return this._returnResult({data:null,error:t});r=e.session.access_token}let{header:n,payload:i,signature:o,raw:{header:a,payload:s}}=tY(r);(null==t?void 0:t.allowExpired)||function(e){if(!e)throw Error("Missing exp claim");if(e<=Math.floor(Date.now()/1e3))throw Error("JWT has expired")}(i.exp);let l=!n.alg||n.alg.startsWith("HS")||!n.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(n.kid,(null==t?void 0:t.keys)?{keys:t.keys}:null==t?void 0:t.jwks);if(!l){let{error:e}=await this.getUser(r);if(e)throw e;return{data:{claims:i,header:n,signature:o},error:null}}let c=function(e){switch(e){case"RS256":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case"ES256":return{name:"ECDSA",namedCurve:"P-256",hash:{name:"SHA-256"}};default:throw Error("Invalid alg claim")}}(n.alg),u=await crypto.subtle.importKey("jwk",l,c,!0,["verify"]);if(!await crypto.subtle.verify(c,u,o,function(e){let t=[];return!function(e,t){for(let r=0;r<e.length;r+=1){let n=e.charCodeAt(r);if(n>55295&&n<=56319){let t=(n-55296)*1024&65535;n=(e.charCodeAt(r+1)-56320&65535|t)+65536,r+=1}!function(e,t){if(e<=127){t(e);return}if(e<=2047){t(192|e>>6),t(128|63&e);return}if(e<=65535){t(224|e>>12),t(128|e>>6&63),t(128|63&e);return}if(e<=1114111){t(240|e>>18),t(128|e>>12&63),t(128|e>>6&63),t(128|63&e);return}throw Error(`Unrecognized Unicode codepoint: ${e.toString(16)}`)}(n,t)}}(e,e=>t.push(e)),new Uint8Array(t)}(`${a}.${s}`)))throw new tM("Invalid JWT signature");return{data:{claims:i,header:n,signature:o},error:null}}catch(e){if(tb(e))return this._returnResult({data:null,error:e});throw e}}}rM.nextInstanceID={};var rI=rM;let rR="";"undefined"!=typeof Deno?rR="deno":"undefined"!=typeof document?rR="web":"undefined"!=typeof navigator&&"ReactNative"===navigator.product?rR="react-native":rR="node";let rD={headers:{"X-Client-Info":`supabase-js-${rR}/2.103.0`}},rL={schema:"public"},rB={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},r$={};function rU(e){return(rU="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function rq(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function rz(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?rq(Object(r),!0).forEach(function(t){!function(e,t,r){var n;(n=function(e,t){if("object"!=rU(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=rU(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"),(t="symbol"==rU(n)?n:n+"")in e)?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):rq(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}let rF=e=>e?(...t)=>e(...t):(...e)=>fetch(...e),rW=()=>Headers,rH=(e,t,r)=>{let n=rF(r),i=rW();return async(r,o)=>{var a;let s=null!==(a=await t())&&void 0!==a?a:e,l=new i(null==o?void 0:o.headers);return l.has("apikey")||l.set("apikey",e),l.has("Authorization")||l.set("Authorization",`Bearer ${s}`),n(r,rz(rz({},o),{},{headers:l}))}};var rV=class extends rI{constructor(e){super(e)}},rK=class{constructor(e,t,r){var n,i,o;this.supabaseUrl=e,this.supabaseKey=t;let a=function(e){let t=null==e?void 0:e.trim();if(!t)throw Error("supabaseUrl is required.");if(!t.match(/^https?:\/\//i))throw Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(t.endsWith("/")?t:t+"/")}catch(e){throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}(e);if(!t)throw Error("supabaseKey is required.");this.realtimeUrl=new URL("realtime/v1",a),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",a),this.storageUrl=new URL("storage/v1",a),this.functionsUrl=new URL("functions/v1",a);let s=`sb-${a.hostname.split(".")[0]}-auth-token`,l=function(e,t){var r,n;let{db:i,auth:o,realtime:a,global:s}=e,{db:l,auth:c,realtime:u,global:h}=t,f={db:rz(rz({},l),i),auth:rz(rz({},c),o),realtime:rz(rz({},u),a),storage:{},global:rz(rz(rz({},h),s),{},{headers:rz(rz({},null!==(r=null==h?void 0:h.headers)&&void 0!==r?r:{}),null!==(n=null==s?void 0:s.headers)&&void 0!==n?n:{})}),accessToken:async()=>""};return e.accessToken?f.accessToken=e.accessToken:delete f.accessToken,f}(null!=r?r:{},{db:rL,realtime:r$,auth:rz(rz({},rB),{},{storageKey:s}),global:rD});this.storageKey=null!==(n=l.auth.storageKey)&&void 0!==n?n:"",this.headers=null!==(i=l.global.headers)&&void 0!==i?i:{},l.accessToken?(this.accessToken=l.accessToken,this.auth=new Proxy({},{get:(e,t)=>{throw Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(t)} is not possible`)}})):this.auth=this._initSupabaseAuthClient(null!==(o=l.auth)&&void 0!==o?o:{},this.headers,l.global.fetch),this.fetch=rH(t,this._getAccessToken.bind(this),l.global.fetch),this.realtime=this._initRealtimeClient(rz({headers:this.headers,accessToken:this._getAccessToken.bind(this)},l.realtime)),this.accessToken&&Promise.resolve(this.accessToken()).then(e=>this.realtime.setAuth(e)).catch(e=>console.warn("Failed to set initial Realtime auth token:",e)),this.rest=new D(new URL("rest/v1",a).href,{headers:this.headers,schema:l.db.schema,fetch:this.fetch,timeout:l.db.timeout,urlLengthLimit:l.db.urlLengthLimit}),this.storage=new tf(this.storageUrl.href,this.headers,this.fetch,null==r?void 0:r.storage),l.accessToken||this._listenForAuthEvents()}get functions(){return new u(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}from(e){return this.rest.from(e)}schema(e){return this.rest.schema(e)}rpc(e,t={},r={head:!1,get:!1,count:void 0}){return this.rest.rpc(e,t,r)}
37channel(e,t={config:{}}){return this.realtime.channel(e,t)}getChannels(){return this.realtime.getChannels()}removeChannel(e){return this.realtime.removeChannel(e)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getAccessToken(){var e,t;if(this.accessToken)return await this.accessToken();let{data:r}=await this.auth.getSession();return null!==(e=null===(t=r.session)||void 0===t?void 0:t.access_token)&&void 0!==e?e:this.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:e,persistSession:t,detectSessionInUrl:r,storage:n,userStorage:i,storageKey:o,flowType:a,lock:s,debug:l,throwOnError:c},u,h){let f={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new rV({url:this.authUrl.href,headers:rz(rz({},f),u),storageKey:o,autoRefreshToken:e,persistSession:t,detectSessionInUrl:r,storage:n,userStorage:i,flowType:a,lock:s,debug:l,throwOnError:c,fetch:h,hasCustomAuthorizationHeader:Object.keys(this.headers).some(e=>"authorization"===e.toLowerCase())})}_initRealtimeClient(e){return new eT(this.realtimeUrl.href,rz(rz({},e),{},{params:rz(rz({},{apikey:this.supabaseKey}),null==e?void 0:e.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((e,t)=>{this._handleTokenChanged(e,"CLIENT",null==t?void 0:t.access_token)})}_handleTokenChanged(e,t,r){("TOKEN_REFRESHED"===e||"SIGNED_IN"===e)&&this.changedAccessToken!==r?(this.changedAccessToken=r,this.realtime.setAuth(r)):"SIGNED_OUT"===e&&(this.realtime.setAuth(),"STORAGE"==t&&this.auth.signOut(),this.changedAccessToken=void 0)}};let rG=(e,t,r)=>new rK(e,t,r);(function(){if("undefined"!=typeof window)return!1;let e=globalThis.process;if(!e)return!1;let t=e.version;if(null==t)return!1;let r=t.match(/^v(\d+)\./);return!!r&&18>=parseInt(r[1],10)})()&&console.warn("⚠️  Node.js 18 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to Node.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217");var rZ=r(20357);let rJ="https://xmxjfgsvunvghgiedhje.supabase.co",rY="sb_publishable_p9tcU1eIuN4MtmlDcg40GQ_vUAgm3j3",rX=rZ.env.SUPABASE_SERVICE_ROLE_KEY;if(!rJ||!rY)throw Error("Missing Supabase environment variables");let rQ=rG(rJ,rY);rG(rJ,rX||rY)},11431:function(e,t,r){var n;/*! decimal.js-light v2.5.1 https://github.com/MikeMcl/decimal.js-light/LICENCE */!function(i){"use strict";var o,a={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},s=!0,l="[DecimalError] ",c=l+"Invalid argument: ",u=l+"Exponent out of range: ",h=Math.floor,f=Math.pow,d=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,p=h(1286742750677284.5),y={};function m(e,t){var r,n,i,o,a,l,c,u,h=e.constructor,f=h.precision;if(!e.s||!t.s)return t.s||(t=new h(e)),s?_(t,f):t;if(c=e.d,u=t.d,a=e.e,i=t.e,c=c.slice(),o=a-i){for(o<0?(n=c,o=-o,l=u.length):(n=u,i=a,l=c.length),o>(l=(a=Math.ceil(f/7))>l?a+1:l+1)&&(o=l,n.length=1),n.reverse();o--;)n.push(0);n.reverse()}for((l=c.length)-(o=u.length)<0&&(o=l,n=u,u=c,c=n),r=0;o;)r=(c[--o]=c[o]+u[o]+r)/1e7|0,c[o]%=1e7;for(r&&(c.unshift(r),++i),l=c.length;0==c[--l];)c.pop();return t.d=c,t.e=i,s?_(t,f):t}function g(e,t,r){if(e!==~~e||e<t||e>r)throw Error(c+e)}function v(e){var t,r,n,i=e.length-1,o="",a=e[0];if(i>0){for(o+=a,t=1;t<i;t++)(r=7-(n=e[t]+"").length)&&(o+=k(r)),o+=n;(r=7-(n=(a=e[t])+"").length)&&(o+=k(r))}else if(0===a)return"0";for(;a%10==0;)a/=10;return o+a}y.absoluteValue=y.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e},y.comparedTo=y.cmp=function(e){var t,r,n,i;if(e=new this.constructor(e),this.s!==e.s)return this.s||-e.s;if(this.e!==e.e)return this.e>e.e^this.s<0?1:-1;for(t=0,r=(n=this.d.length)<(i=e.d.length)?n:i;t<r;++t)if(this.d[t]!==e.d[t])return this.d[t]>e.d[t]^this.s<0?1:-1;return n===i?0:n>i^this.s<0?1:-1},y.decimalPlaces=y.dp=function(){var e=this.d.length-1,t=(e-this.e)*7;if(e=this.d[e])for(;e%10==0;e/=10)t--;return t<0?0:t},y.dividedBy=y.div=function(e){return b(this,new this.constructor(e))},y.dividedToIntegerBy=y.idiv=function(e){var t=this.constructor;return _(b(this,new t(e),0,1),t.precision)},y.equals=y.eq=function(e){return!this.cmp(e)},y.exponent=function(){return x(this)},y.greaterThan=y.gt=function(e){return this.cmp(e)>0},y.greaterThanOrEqualTo=y.gte=function(e){return this.cmp(e)>=0},y.isInteger=y.isint=function(){return this.e>this.d.length-2},y.isNegative=y.isneg=function(){return this.s<0},y.isPositive=y.ispos=function(){return this.s>0},y.isZero=function(){return 0===this.s},y.lessThan=y.lt=function(e){return 0>this.cmp(e)},y.lessThanOrEqualTo=y.lte=function(e){return 1>this.cmp(e)},y.logarithm=y.log=function(e){var t,r=this.constructor,n=r.precision,i=n+5;if(void 0===e)e=new r(10);else if((e=new r(e)).s<1||e.eq(o))throw Error(l+"NaN");if(this.s<1)throw Error(l+(this.s?"NaN":"-Infinity"));return this.eq(o)?new r(0):(s=!1,t=b(j(this,i),j(e,i),i),s=!0,_(t,n))},y.minus=y.sub=function(e){return e=new this.constructor(e),this.s==e.s?E(this,e):m(this,(e.s=-e.s,e))},y.modulo=y.mod=function(e){var t,r=this.constructor,n=r.precision;if(!(e=new r(e)).s)throw Error(l+"NaN");return this.s?(s=!1,t=b(this,e,0,1).times(e),s=!0,this.minus(t)):_(new r(this),n)},y.naturalExponential=y.exp=function(){return w(this)},y.naturalLogarithm=y.ln=function(){return j(this)},y.negated=y.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e},y.plus=y.add=function(e){return e=new this.constructor(e),this.s==e.s?m(this,e):E(this,(e.s=-e.s,e))},y.precision=y.sd=function(e){var t,r,n;if(void 0!==e&&!!e!==e&&1!==e&&0!==e)throw Error(c+e);if(t=x(this)+1,r=7*(n=this.d.length-1)+1,n=this.d[n]){for(;n%10==0;n/=10)r--;for(n=this.d[0];n>=10;
37n/=10)r++}return e&&t>r?t:r},y.squareRoot=y.sqrt=function(){var e,t,r,n,i,o,a,c=this.constructor;if(this.s<1){if(!this.s)return new c(0);throw Error(l+"NaN")}for(e=x(this),s=!1,0==(i=Math.sqrt(+this))||i==1/0?(((t=v(this.d)).length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=h((e+1)/2)-(e<0||e%2),n=new c(t=i==1/0?"5e"+e:(t=i.toExponential()).slice(0,t.indexOf("e")+1)+e)):n=new c(i.toString()),i=a=(r=c.precision)+3;;)if(n=(o=n).plus(b(this,o,a+2)).times(.5),v(o.d).slice(0,a)===(t=v(n.d)).slice(0,a)){if(t=t.slice(a-3,a+1),i==a&&"4999"==t){if(_(o,r+1,0),o.times(o).eq(this)){n=o;break}}else if("9999"!=t)break;a+=4}return s=!0,_(n,r)},y.times=y.mul=function(e){var t,r,n,i,o,a,l,c,u,h=this.constructor,f=this.d,d=(e=new h(e)).d;if(!this.s||!e.s)return new h(0);for(e.s*=this.s,r=this.e+e.e,(c=f.length)<(u=d.length)&&(o=f,f=d,d=o,a=c,c=u,u=a),o=[],n=a=c+u;n--;)o.push(0);for(n=u;--n>=0;){for(t=0,i=c+n;i>n;)l=o[i]+d[n]*f[i-n-1]+t,o[i--]=l%1e7|0,t=l/1e7|0;o[i]=(o[i]+t)%1e7|0}for(;!o[--a];)o.pop();return t?++r:o.shift(),e.d=o,e.e=r,s?_(e,h.precision):e},y.toDecimalPlaces=y.todp=function(e,t){var r=this,n=r.constructor;
37return(r=new n(r),void 0===e)?r:(g(e,0,1e9),void 0===t?t=n.rounding:g(t,0,8),_(r,e+x(r)+1,t))},y.toExponential=function(e,t){var r,n=this,i=n.constructor;return void 0===e?r=A(n,!0):(g(e,0,1e9),void 0===t?t=i.rounding:g(t,0,8),r=A(n=_(new i(n),e+1,t),!0,e+1)),r},y.toFixed=function(e,t){var r,n,i=this.constructor;return void 0===e?A(this):(g(e,0,1e9),void 0===t?t=i.rounding:g(t,0,8),r=A((n=_(new i(this),e+x(this)+1,t)).abs(),!1,e+x(n)+1),this.isneg()&&!this.isZero()?"-"+r:r)},y.toInteger=y.toint=function(){var e=this.constructor;return _(new e(this),x(this)+1,e.rounding)},y.toNumber=function(){return+this},y.toPower=y.pow=function(e){var t,r,n,i,a,c,u=this,f=u.constructor,d=+(e=new f(e));if(!e.s)return new f(o);if(!(u=new f(u)).s){if(e.s<1)throw Error(l+"Infinity");return u}if(u.eq(o))return u;if(n=f.precision,e.eq(o))return _(u,n);if(c=(t=e.e)>=(r=e.d.length-1),a=u.s,c){if((r=d<0?-d:d)<=9007199254740991){for(i=new f(o),t=Math.ceil(n/7+4),s=!1;r%2&&P((i=i.times(u)).d,t),0!==(r=h(r/2));)P((u=u.times(u)).d,t);return s=!0,e.s<0?new f(o).div(i):_(i,n)}}else if(a<0)throw Error(l+"NaN");return a=a<0&&1&e.d[Math.max(t,r)]?-1:1,u.s=1,s=!1,i=e.times(j(u,n+12)),s=!0,(i=w(i)).s=a,i},y.toPrecision=function(e,t){var r,n,i=this,o=i.constructor;return void 0===e?(r=x(i),n=A(i,r<=o.toExpNeg||r>=o.toExpPos)):(g(e,1,1e9),void 0===t?t=o.rounding:g(t,0,8),r=x(i=_(new o(i),e,t)),n=A(i,e<=r||r<=o.toExpNeg,e)),n},y.toSignificantDigits=y.tosd=function(e,t){var r=this.constructor;return void 0===e?(e=r.precision,t=r.rounding):(g(e,1,1e9),void 0===t?t=r.rounding:g(t,0,8)),_(new r(this),e,t)},y.toString=y.valueOf=y.val=y.toJSON=function(){var e=x(this),t=this.constructor;return A(this,e<=t.toExpNeg||e>=t.toExpPos)};var b=function(){function e(e,t){var r,n=0,i=e.length;for(e=e.slice();i--;)r=e[i]*t+n,e[i]=r%1e7|0,n=r/1e7|0;return n&&e.unshift(n),e}function t(e,t,r,n){var i,o;if(r!=n)o=r>n?1:-1;else for(i=o=0;i<r;i++)if(e[i]!=t[i]){o=e[i]>t[i]?1:-1;break}return o}function r(e,t,r){for(var n=0;r--;)e[r]-=n,n=e[r]<t[r]?1:0,e[r]=1e7*n+e[r]-t[r];for(;!e[0]&&e.length>1;)e.shift()}return function(n,i,o,a){var s,c,u,h,f,d,p,y,m,g,v,b,w,O,k,j,S,E,A=n.constructor,P=n.s==i.s?1:-1,T=n.d,N=i.d;if(!n.s)return new A(n);if(!i.s)throw Error(l+"Division by zero");for(u=0,c=n.e-i.e,S=N.length,k=T.length,y=(p=new A(P)).d=[];N[u]==(T[u]||0);)++u;if(N[u]>(T[u]||0)&&--c,(b=null==o?o=A.precision:a?o+(x(n)-x(i))+1:o)<0)return new A(0);if(b=b/7+2|0,u=0,1==S)for(h=0,N=N[0],b++;(u<k||h)&&b--;u++)w=1e7*h+(T[u]||0),y[u]=w/N|0,h=w%N|0;else{for((h=1e7/(N[0]+1)|0)>1&&(N=e(N,h),T=e(T,h),S=N.length,k=T.length),O=S,g=(m=T.slice(0,S)).length;g<S;)m[g++]=0;(E=N.slice()).unshift(0),j=N[0],N[1]>=1e7/2&&++j;do h=0,(s=t(N,m,S,g))<0?(v=m[0],S!=g&&(v=1e7*v+(m[1]||0)),(h=v/j|0)>1?(h>=1e7&&(h=1e7-1),d=(f=e(N,h)).length,g=m.length,1==(s=t(f,m,d,g))&&(h--,r(f,S<d?E:N,d))):(0==h&&(s=h=1),f=N.slice()),(d=f.length)<g&&f.unshift(0),r(m,f,g),-1==s&&(g=m.length,(s=t(N,m,S,g))<1&&(h++,r(m,S<g?E:N,g))),g=m.length):0===s&&(h++,m=[0]),y[u++]=h,s&&m[0]?m[g++]=T[O]||0:(m=[T[O]],g=1);while((O++<k||void 0!==m[0])&&b--)}return y[0]||y.shift(),p.e=c,_(p,a?o+x(p)+1:o)}}();function w(e,t){var r,n,i,a,l,c=0,h=0,d=e.constructor,p=d.precision;if(x(e)>16)throw Error(u+x(e));if(!e.s)return new d(o);for(null==t?(s=!1,l=p):l=t,a=new d(.03125);e.abs().gte(.1);)e=e.times(a),h+=5;for(l+=Math.log(f(2,h))/Math.LN10*2+5|0,r=n=i=new d(o),d.precision=l;;){if(n=_(n.times(e),l),r=r.times(++c),v((a=i.plus(b(n,r,l))).d).slice(0,l)===v(i.d).slice(0,l)){for(;h--;)i=_(i.times(i),l);return d.precision=p,null==t?(s=!0,_(i,p)):i}i=a}}function x(e){for(var t=7*e.e,r=e.d[0];r>=10;r/=10)t++;return t}function O(e,t,r){if(t>e.LN10.sd())throw s=!0,r&&(e.precision=r),Error(l+"LN10 precision limit exceeded");return _(new e(e.LN10),t)}function k(e){for(var t="";e--;)t+="0";return t}function j(e,t){var r,n,i,a,c,u,h,f,d,p=1,y=e,m=y.d,g=y.constructor,w=g.precision;if(y.s<1)throw Error(l+(y.s?"NaN":"-Infinity"));if(y.eq(o))return new g(0);if(null==t?(s=!1,f=w):f=t,y.eq(10))return null==t&&(s=!0),O(g,f);if(f+=10,g.precision=f,n=(r=v(m)).charAt(0),!(15e14>Math.abs(a=x(y))))return h=O(g,f+2,w).times(a+""),y=j(new g(n+"."+r.slice(1)),f-10).plus(h),g.precision=w,null==t?(s=!0,_(y,w)):y;for(;n<7&&1!=n||1==n&&r.charAt(1)>3;)n=(r=v((y=y.times(e)).d)).charAt(0),p++;for(a=x(y),n>1?(y=new g("0."+r),a++):y=new g(n+"."+r.slice(1)),u=c=y=b(y.minus(o),y.plus(o),f),d=_(y.times(y),f),i=3;;){if(c=_(c.times(d),f),v((h=u.plus(b(c,new g(i),f))).d).slice(0,f)===v(u.d).slice(0,f))return u=u.times(2),0!==a&&(u=u.plus(O(g,f+2,w).times(a+""))),u=b(u,new g(p),f),g.precision=w,null==t?(s=!0,_(u,w)):u;u=h,i+=2}}function S(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;48===t.charCodeAt(n);)++n;for(i=t.length;48===t.charCodeAt(i-1);)--i;if(t=t.slice(n,i)){if(i-=n,r=r-n-1,e.e=h(r/7),e.d=[],n=(r+1)%7,r<0&&(n+=7),n<i){for(n&&e.d.push(+t.slice(0,n)),i-=7;n<i;)e.d.push(+t.slice(n,n+=7));n=7-(t=t.slice(n)).length}else n-=i;for(;n--;)t+="0";if(e.d.push(+t),s&&(e.e>p||e.e<-p))throw Error(u+r)}else e.s=0,e.e=0,e.d=[0];return e}function _(e,t,r){var n,i,o,a,l,c,d,y,m=e.d;for(a=1,o=m[0];o>=10;o/=10)a++;if((n=t-a)<0)n+=7,i=t,d=m[y=0];else{if((y=Math.ceil((n+1)/7))>=(o=m.length))return e;for(a=1,d=o=m[y];o>=10;o/=10)a++;n%=7,i=n-7+a}if(void 0!==r&&(l=d/(o=f(10,a-i-1))%10|0,c=t<0||void 0!==m[y+1]||d%o,c=r<4?(l||c)&&(0==r||r==(e.s<0?3:2)):l>5||5==l&&(4==r||c||6==r&&(n>0?i>0?d/f(10,a-i):0:m[y-1])%10&1||r==(e.s<0?8:7))),t<1||!m[0])return c?(o=x(e),m.length=1,t=t-o-1,m[0]=f(10,(7-t%7)%7),e.e=h(-t/7)||0):(m.length=1,m[0]=e.e=e.s=0),e;if(0==n?(m.length=y,o=1,y--):(m.length=y+1,o=f(10,7-n),m[y]=i>0?(d/f(10,a-i)%f(10,i)|0)*o:0),c)for(;;){if(0==y){1e7==(m[0]+=o)&&(m[0]=1,++e.e);break}if(m[y]+=o,1e7!=m[y])break;m[y--]=0,o=1}for(n=m.length;0===m[--n];)m.pop();if(s&&(e.e>p||e.e<-p))throw Error(u+x(e));return e}function E(e,t){var r,n,i,o,a,l,c,u,h,f,d=e.constructor,p=d.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new d(e),s?_(t,p):t;if(c=e.d,f=t.d,n=t.e,u=e.e,c=c.slice(),a=u-n){for((h=a<0)?(r=c,a=-a,l=f.length):(r=f,n=u,l=c.length),a>(i=Math.max(Math.ceil(p/7),l)+2)&&(a=i,r.length=1),r.reverse(),i=a;i--;)r.push(0);r.reverse()}else{for((h=(i=c.length)<(l=f.length))&&(l=i),i=0;i<l;i++)if(c[i]!=f[i]){h=c[i]<f[i];break}a=0}for(h&&(r=c,c=f,f=r,t.s=-t.s),l=c.length,i=f.length-l;i>0;--i)c[l++]=0;for(i=f.length;i>a;){if(c[--i]<f[i]){for(o=i;o&&0===c[--o];)c[o]=1e7-1;--c[o],c[i]+=1e7}c[i]-=f[i]}for(;0===c[--l];)c.pop();for(;0===c[0];c.shift())--n;return c[0]?(t.d=c,t.e=n,s?_(t,p):t):new d(0)}function A(e,t,r){var n,i=x(e),o=v(e.d),a=o.length;return t?(r&&(n=r-a)>0?o=o.charAt(0)+"."+o.slice(1)+k(n):a>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+k(-i-1)+o,r&&(n=r-a)>0&&(o+=k(n))):i>=a?(o+=k(i+1-a),r&&(n=r-i-1)>0&&(o=o+"."+k(n))):((n=i+1)<a&&(o=o.slice(0,n)+"."+o.slice(n)),r&&(n=r-a)>0&&(i+1===a&&(o+="."),o+=k(n))),e.s<0?"-"+o:o}function P(e,t){if(e.length>t)return e.length=t,!0}function T(e){if(!e||"object"!=typeof e)throw Error(l+"Object expected");var t,r,n,i=["precision",1,1e9,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<i.length;t+=3)if(void 0!==(n=e[r=i[t]])){if(h(n)===n&&n>=i[t+1]&&n<=i[t+2])this[r]=n;else throw Error(c+r+": "+n)}if(void 0!==(n=e[r="LN10"])){if(n==Math.LN10)this[r]=new this(n);else throw Error(c+r+": "+n)}return this}(a=function e(t){var r,n,i;function o(e){if(!(this instanceof o))return new o(e);if(this.constructor=o,e instanceof o){this.s=e.s,this.e=e.e,this.d=(e=e.d)?e.slice():e;return}if("number"==typeof e){if(0*e!=0)throw Error(c+e);if(e>0)this.s=1;else if(e<0)e=-e,this.s=-1;else{this.s=0,this.e=0,this.d=[0];return}if(e===~~e&&e<1e7){this.e=0,this.d=[e];return}return S(this,e.toString())}if("string"!=typeof e)throw Error(c+e);if(45===e.charCodeAt(0)?(e=e.slice(1),this.s=-1):this.s=1,d.test(e))S(this,e);else throw Error(c+e)}if(o.prototype=y,o.ROUND_UP=0,o.ROUND_DOWN=1,o.ROUND_CEIL=2,o.ROUND_FLOOR=3,o.ROUND_HALF_UP=4,o.ROUND_HALF_DOWN=5,o.ROUND_HALF_EVEN=6,o.ROUND_HALF_CEIL=7,o.ROUND_HALF_FLOOR=8,o.clone=e,o.config=o.set=T,void 0===t&&(t={}),t)for(r=0,i=["precision","rounding","toExpNeg","toExpPos","LN10"];r<i.length;)t.hasOwnProperty(n=i[r++])||(t[n]=this[n]);return o.config(t),o}(a)).default=a.Decimal=a,o=new a(1),void 0!==(n=(function(){return a}).call(t,r,t,e))&&(e.exports=n)}(0)},37836:function(e){"use strict";var t=Object.prototype.hasOwnProperty,r="~";function n(){}function i(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function o(e,t,n,o,a){if("function"!=typeof n)throw TypeError("The listener must be a function");var s=new i(n,o||e,a),l=r?r+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],s]:e._events[l].push(s):(e._events[l]=s,e._eventsCount++),e}function a(e,t){0==--e._eventsCount?e._events=new n:delete e._events[t]}function s(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1)),s.prototype.eventNames=function(){var e,n,i=[];if(0===this._eventsCount)return i;for(n in e=this._events)t.call(e,n)&&i.push(r?n.slice(1):n);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},s.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,o=n.length,a=Array(o);i<o;i++)a[i]=n[i].fn;return a},s.prototype.listenerCount=function(e){var t=r?r+e:e,n=this._events[t];return n?n.fn?1:n.length:0},s.prototype.emit=function(e,t,n,i,o,a){var s=r?r+e:e;if(!this._events[s])return!1;var l,c,u=this._events[s],h=arguments.length;if(u.fn){switch(u.once&&this.removeListener(e,u.fn,void 0,!0),h){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,t),!0;case 3:return u.fn.call(u.context,t,n),!0;case 4:return u.fn.call(u.context,t,n,i),!0;case 5:return u.fn.call(u.context,t,n,i,o),!0;case 6:return u.fn.call(u.context,t,n,i,o,a),!0}for(c=1,l=Array(h-1);c<h;c++)l[c-1]=arguments[c];u.fn.apply(u.context,l)}else{var f,d=u.length;for(c=0;c<d;c++)switch(u[c].once&&this.removeListener(e,u[c].fn,void 0,!0),h){case 1:u[c].fn.call(u[c].context);break;case 2:u[c].fn.call(u[c].context,t);break;case 3:u[c].fn.call(u[c].context,t,n);break;case 4:u[c].fn.call(u[c].context,t,n,i);break;default:if(!l)for(f=1,l=Array(h-1);f<h;f++)l[f-1]=arguments[f];u[c].fn.apply(u[c].context,l)}}return!0},s.prototype.on=function(e,t,r){return o(this,e,t,r,!1)},s.prototype.once=function(e,t,r){return o(this,e,t,r,!0)},s.prototype.removeListener=function(e,t,n,i){var o=r?r+e:e;if(!this._events[o])return this;if(!t)return a(this,o),this;var s=this._events[o];if(s.fn)s.fn!==t||i&&!s.once||n&&s.context!==n||a(this,o);else{for(var l=0,c=[],u=s.length;l<u;l++)(s[l].fn!==t||i&&!s[l].once||n&&s[l].context!==n)&&c.push(s[l]);c.length?this._events[o]=1===c.length?c[0]:c:a(this,o)}return this},s.prototype.removeAllListeners=function(e){var t;return e?(t=r?r+e:e,this._events[t]&&a(this,t)):(this._events=new n,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=r,s.EventEmitter=s,e.exports=s},74417:function(e,t,r){var n=r(19044)(r(2381),"DataView");e.exports=n},70266:function(e,t,r){var n=r(89829),i=r(60734),o=r(35283),a=r(97283),s=r(54778);function l(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}l.prototype.clear=n,l.prototype.delete=i,l.prototype.get=o,l.prototype.has=a,l.prototype.set=s,e.exports=l}
37,57115:function(e,t,r){var n=r(89172),i=r(13314),o=r(73917),a=r(49367),s=r(97126);function l(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}l.prototype.clear=n,l.prototype.delete=i,l.prototype.get=o,l.prototype.has=a,l.prototype.set=s,e.exports=l},77970:function(e,t,r){var n=r(19044)(r(2381),"Map");e.exports=n},8705:function(e,t,r){var n=r(59752),i=r(20170),o=r(41069),a=r(28690),s=r(27323);function l(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}l.prototype.clear=n,l.prototype.delete=i,l.prototype.get=o,l.prototype.has=a,l.prototype.set=s,e.exports=l},57780:function(e,t,r){var n=r(19044)(r(2381),"Promise");e.exports=n},71936:function(e,t,r){var n=r(19044)(r(2381),"Set");e.exports=n},89544:function(e,t,r){var n=r(8705),i=r(75912),o=r(74765);function a(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new n;++t<r;)this.add(e[t])}a.prototype.add=a.prototype.push=i,a.prototype.has=o,e.exports=a},45989:function(e,t,r){var n=r(57115),i=r(24683),o=r(34813),a=r(35115),s=r(28199),l=r(58644);function c(e){var t=this.__data__=new n(e);this.size=t.size}c.prototype.clear=i,c.prototype.delete=o,c.prototype.get=a,c.prototype.has=s,c.prototype.set=l,e.exports=c},13414:function(e,t,r){var n=r(2381).Symbol;e.exports=n},88960:function(e,t,r){var n=r(2381).Uint8Array;e.exports=n},93485:function(e,t,r){var n=r(19044)(r(2381),"WeakMap");e.exports=n},98266:function(e){e.exports=function(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}},90516:function(e){e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(!t(e[r],r,e))return!1;return!0}},19206:function(e){e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length,i=0,o=[];++r<n;){var a=e[r];t(a,r,e)&&(o[i++]=a)}return o}},43276:function(e,t,r){var n=r(48911);e.exports=function(e,t){return!!(null==e?0:e.length)&&n(e,t,0)>-1}},10079:function(e){e.exports=function(e,t,r){for(var n=-1,i=null==e?0:e.length;++n<i;)if(r(t,e[n]))return!0;return!1}},16347:function(e,t,r){var n=r(61747),i=r(6727),o=r(60443),a=r(46551),s=r(41056),l=r(78470),c=Object.prototype.hasOwnProperty;e.exports=function(e,t){var r=o(e),u=!r&&i(e),h=!r&&!u&&a(e),f=!r&&!u&&!h&&l(e),d=r||u||h||f,p=d?n(e.length,String):[],y=p.length;for(var m in e)(t||c.call(e,m))&&!(d&&("length"==m||h&&("offset"==m||"parent"==m)||f&&("buffer"==m||"byteLength"==m||"byteOffset"==m)||s(m,y)))&&p.push(m);return p}},68165:function(e){e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}},80506:function(e){e.exports=function(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}},17232:function(e){e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}},38211:function(e){e.exports=function(e){return e.split("")}},22162:function(e,t,r){var n=r(27087);e.exports=function(e,t){for(var r=e.length;r--;)if(n(e[r][0],t))return r;return -1}},85330:function(e,t,r){var n=r(98187);e.exports=function(e,t,r){"__proto__"==t&&n?n(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}},30419:function(e,t,r){var n=r(97385),i=r(23045)(n);e.exports=i},20334:function(e,t,r){var n=r(30419);e.exports=function(e,t){var r=!0;return n(e,function(e,n,i){return r=!!t(e,n,i)}),r}},77613:function(e,t,r){var n=r(41108);e.exports=function(e,t,r){for(var i=-1,o=e.length;++i<o;){var a=e[i],s=t(a);if(null!=s&&(void 0===l?s==s&&!n(s):r(s,l)))var l=s,c=a}return c}},21933:function(e){e.exports=function(e,t,r,n){for(var i=e.length,o=r+(n?1:-1);n?o--:++o<i;)if(t(e[o],o,e))return o;return -1}},55648:function(e,t,r){var n=r(80506),i=r(60883);e.exports=function e(t,r,o,a,s){var l=-1,c=t.length;for(o||(o=i),s||(s=[]);++l<c;){var u=t[l];r>0&&o(u)?r>1?e(u,r-1,o,a,s):n(s,u):a||(s[s.length]=u)}return s}},60404:function(e,t,r){var n=r(72994)();e.exports=n},97385:function(e,t,r){var n=r(60404),i=r(63815);e.exports=function(e,t){return e&&n(e,t,i)}},29013:function(e,t,r){var n=r(57442),i=r(83863);e.exports=function(e,t){t=n(t,e);for(var r=0,o=t.length;null!=e&&r<o;)e=e[i(t[r++])];return r&&r==o?e:void 0}},83066:function(e,t,r){var n=r(80506),i=r(60443);e.exports=function(e,t,r){var o=t(e);return i(e)?o:n(o,r(e))}},12731:function(e,t,r){var n=r(13414),i=r(37363),o=r(68391),a=n?n.toStringTag:void 0;
37e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?i(e):o(e)}},23985:function(e){e.exports=function(e,t){return e>t}},80444:function(e){e.exports=function(e,t){return null!=e&&t in Object(e)}},48911:function(e,t,r){var n=r(21933),i=r(74680),o=r(13708);e.exports=function(e,t,r){return t==t?o(e,t,r):n(e,i,r)}},35194:function(e,t,r){var n=r(12731),i=r(50561);e.exports=function(e){return i(e)&&"[object Arguments]"==n(e)}},43277:function(e,t,r){var n=r(36529),i=r(50561);e.exports=function e(t,r,o,a,s){return t===r||(null!=t&&null!=r&&(i(t)||i(r))?n(t,r,o,a,e,s):t!=t&&r!=r)}},36529:function(e,t,r){var n=r(45989),i=r(48648),o=r(88264),a=r(44024),s=r(14995),l=r(60443),c=r(46551),u=r(78470),h="[object Arguments]",f="[object Array]",d="[object Object]",p=Object.prototype.hasOwnProperty;e.exports=function(e,t,r,y,m,g){var v=l(e),b=l(t),w=v?f:s(e),x=b?f:s(t);w=w==h?d:w,x=x==h?d:x;var O=w==d,k=x==d,j=w==x;if(j&&c(e)){if(!c(t))return!1;v=!0,O=!1}if(j&&!O)return g||(g=new n),v||u(e)?i(e,t,r,y,m,g):o(e,t,w,r,y,m,g);if(!(1&r)){var S=O&&p.call(e,"__wrapped__"),_=k&&p.call(t,"__wrapped__");
37if(S||_){var E=S?e.value():e,A=_?t.value():t;return g||(g=new n),m(E,A,r,y,g)}}return!!j&&(g||(g=new n),a(e,t,r,y,m,g))}},29912:function(e,t,r){var n=r(45989),i=r(43277);e.exports=function(e,t,r,o){var a=r.length,s=a,l=!o;if(null==e)return!s;for(e=Object(e);a--;){var c=r[a];if(l&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++a<s;){var u=(c=r[a])[0],h=e[u],f=c[1];if(l&&c[2]){if(void 0===h&&!(u in e))return!1}else{var d=new n;if(o)var p=o(h,f,u,e,t,d);if(!(void 0===p?i(f,h,3,o,d):p))return!1}}return!0}},74680:function(e){e.exports=function(e){return e!=e}},12072:function(e,t,r){var n=r(14380),i=r(56711),o=r(63117),a=r(70559),s=/^\[object .+?Constructor\]$/,l=Object.prototype,c=Function.prototype.toString,u=l.hasOwnProperty,h=RegExp("^"+c.call(u).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!o(e)||i(e))&&(n(e)?h:s).test(a(e))}},13272:function(e,t,r){var n=r(12731),i=r(44664),o=r(50561),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,e.exports=function(e){return o(e)&&i(e.length)&&!!a[n(e)]}},37942:function(e,t,r){var n=r(41736),i=r(35937),o=r(15502),a=r(60443),s=r(82794);e.exports=function(e){return"function"==typeof e?e:null==e?o:"object"==typeof e?a(e)?i(e[0],e[1]):n(e):s(e)}},84238:function(e,t,r){var n=r(30761),i=r(93022),o=Object.prototype.hasOwnProperty;e.exports=function(e){if(!n(e))return i(e);var t=[];for(var r in Object(e))o.call(e,r)&&"constructor"!=r&&t.push(r);return t}},49182:function(e){e.exports=function(e,t){return e<t}},28519:function(e,t,r){var n=r(30419),i=r(17806);e.exports=function(e,t){var r=-1,o=i(e)?Array(e.length):[];return n(e,function(e,n,i){o[++r]=t(e,n,i)}),o}},41736:function(e,t,r){var n=r(29912),i=r(36678),o=r(91378);e.exports=function(e){var t=i(e);return 1==t.length&&t[0][2]?o(t[0][0],t[0][1]):function(r){return r===e||n(r,e,t)}}},35937:function(e,t,r){var n=r(43277),i=r(97019),o=r(59628),a=r(59757),s=r(64309),l=r(91378),c=r(83863);e.exports=function(e,t){return a(e)&&s(t)?l(c(e),t):function(r){var a=i(r,e);return void 0===a&&a===t?o(r,e):n(t,a,3)}}},66738:function(e,t,r){var n=r(68165),i=r(29013),o=r(37942),a=r(28519),s=r(642),l=r(66127),c=r(8869),u=r(15502),h=r(60443);e.exports=function(e,t,r){t=t.length?n(t,function(e){return h(e)?function(t){return i(t,1===e.length?e[0]:e)}:e}):[u];var f=-1;return t=n(t,l(o)),s(a(e,function(e,r,i){return{criteria:n(t,function(t){return t(e)}),index:++f,value:e}}),function(e,t){return c(e,t,r)})}},31358:function(e){e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},65903:function(e,t,r){var n=r(29013);e.exports=function(e){return function(t){return n(t,e)}}},44901:function(e){var t=Math.ceil,r=Math.max;e.exports=function(e,n,i,o){for(var a=-1,s=r(t((n-e)/(i||1)),0),l=Array(s);s--;)l[o?s:++a]=e,e+=i;return l}},48674:function(e,t,r){var n=r(15502),i=r(95694),o=r(45845);e.exports=function(e,t){return o(i(e,t,n),e+"")}},95922:function(e,t,r){var n=r(24008),i=r(98187),o=r(15502),a=i?function(e,t){return i(e,"toString",{configurable:!0,enumerable:!1,value:n(t),writable:!0})}:o;e.exports=a},15076:function(e){e.exports=function(e,t,r){var n=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(r=r>i?i:r)<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var o=Array(i);++n<i;)o[n]=e[n+t];return o}},73802:function(e,t,r){var n=r(30419);e.exports=function(e,t){var r;return n(e,function(e,n,i){return!(r=t(e,n,i))}),!!r}},642:function(e){e.exports=function(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e}},61747:function(e){e.exports=function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}},13963:function(e,t,r){var n=r(13414),i=r(68165),o=r(60443),a=r(41108),s=1/0,l=n?n.prototype:void 0,c=l?l.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(o(t))return i(t,e)+"";if(a(t))return c?c.call(t):"";var r=t+"";return"0"==r&&1/t==-s?"-0":r}},19334:function(e,t,r){var n=r(25788),i=/^\s+/;e.exports=function(e){return e?e.slice(0,n(e)+1).replace(i,""):e}},66127:function(e){e.exports=function(e){return function(t){return e(t)}}},32874:function(e,t,r){var n=r(89544),i=r(43276),o=r(10079),a=r(74701),s=r(66272),l=r(94778);e.exports=function(e,t,r){var c=-1,u=i,h=e.length,f=!0,d=[],p=d;if(r)f=!1,u=o;else if(h>=200){var y=t?null:s(e);if(y)return l(y);f=!1,u=a,p=new n}else p=t?[]:d;t:for(;++c<h;){var m=e[c],g=t?t(m):m;if(m=r||0!==m?m:0,f&&g==g){for(var v=p.length;v--;)if(p[v]===g)continue t;t&&p.push(g),d.push(m)}else u(p,g,r)||(p!==d&&p.push(g),d.push(m))}return d}},74701:function(e){e.exports=function(e,t){return e.has(t)}},57442:function(e,t,r){var n=r(60443),i=r(59757),o=r(57048),a=r(61250);e.exports=function(e,t){return n(e)?e:i(e,t)?[e]:o(a(e))}},9814:function(e,t,r){var n=r(15076);e.exports=function(e,t,r){var i=e.length;return r=void 0===r?i:r,!t&&r>=i?e:n(e,t,r)}},43425:function(e,t,r){var n=r(41108);e.exports=function(e,t){if(e!==t){var r=void 0!==e,i=null===e,o=e==e,a=n(e),s=void 0!==t,l=null===t,c=t==t,u=n(t);if(!l&&!u&&!a&&e>t||a&&s&&c&&!l&&!u||i&&s&&c||!r&&c||!o)return 1;if(!i&&!a&&!u&&e<t||u&&r&&o&&!i&&!a||l&&r&&o||!s&&o||!c)return -1}return 0}},8869:function(e,t,r){var n=r(43425);e.exports=function(e,t,r){for(var i=-1,o=e.criteria,a=t.criteria,s=o.length,l=r.length;++i<s;){var c=n(o[i],a[i]);if(c){if(i>=l)return c;return c*("desc"==r[i]?-1:1)}}return e.index-t.index}},45704:function(e,t,r){var n=r(2381)["__core-js_shared__"];e.exports=n},23045:function(e,t,r){var n=r(17806);e.exports=function(e,t){return function(r,i){if(null==r)return r;if(!n(r))return e(r,i);for(var o=r.length,a=t?o:-1,s=Object(r);(t?a--:++a<o)&&!1!==i(s[a],a,s););return r}}},72994:function(e){e.exports=function(e){return function(t,r,n){for(var i=-1,o=Object(t),a=n(t),s=a.length;s--;){var l=a[e?s:++i];if(!1===r(o[l],l,o))break}return t}}},58191:function(e,t,r){var n=r(9814),i=r(51865),o=r(75631),a=r(61250);e.exports=function(e){return function(t){var r=i(t=a(t))?o(t):void 0,s=r?r[0]:t.charAt(0),l=r?n(r,1).join(""):t.slice(1);return s[e]()+l}}},43310:function(e,t,r){var n=r(37942),i=r(17806),o=r(63815);e.exports=function(e){return function(t,r,a){var s=Object(t);if(!i(t)){var l=n(r,3);t=o(t),r=function(e){return l(s[e],e,s)}}var c=e(t,r,a);return c>-1?s[l?t[c]:c]:void 0}}},39105:function(e,t,r){var n=r(44901),i=r(60679),o=r(42126);e.exports=function(e){return function(t,r,a){return a&&"number"!=typeof a&&i(t,r,a)&&(r=a=void 0),t=o(t),void 0===r?(r=t,t=0):r=o(r),a=void 0===a?t<r?1:-1:o(a),n(t,r,a,e)}}},66272:function(e,t,r){var n=r(71936),i=r(47710),o=r(94778),a=n&&1/o(new n([,-0]))[1]==1/0?function(e){return new n(e)}:i;e.exports=a},98187:function(e,t,r){var n=r(19044),i=function(){try{var e=n(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=i},48648:function(e,t,r){var n=r(89544),i=r(17232),o=r(74701);e.exports=function(e,t,r,a,s,l){var c=1&r,u=e.length,h=t.length;if(u!=h&&!(c&&h>u))return!1;var f=l.get(e),d=l.get(t);if(f&&d)return f==t&&d==e;var p=-1,y=!0,m=2&r?new n:void 0;for(l.set(e,t),l.set(t,e);++p<u;){var g=e[p],v=t[p];if(a)var b=c?a(v,g,p,t,e,l):a(g,v,p,e,t,l);if(void 0!==b){if(b)continue;y=!1;break}if(m){if(!i(t,function(e,t){if(!o(m,t)&&(g===e||s(g,e,r,a,l)))return m.push(t)})){y=!1;break}}else if(!(g===v||s(g,v,r,a,l))){y=!1;break}}return l.delete(e),l.delete(t),y}},88264:function(e,t,r){var n=r(13414),i=r(88960),o=r(27087),a=r(48648),s=r(14774),l=r(94778),c=n?n.prototype:void 0,u=c?c.valueOf
37:void 0;e.exports=function(e,t,r,n,c,h,f){switch(r){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)break;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":if(e.byteLength!=t.byteLength||!h(new i(e),new i(t)))break;return!0;case"[object Boolean]":case"[object Date]":case"[object Number]":return o(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var d=s;case"[object Set]":var p=1&n;if(d||(d=l),e.size!=t.size&&!p)break;var y=f.get(e);if(y)return y==t;n|=2,f.set(e,t);var m=a(d(e),d(t),n,c,h,f);return f.delete(e),m;case"[object Symbol]":if(u)return u.call(e)==u.call(t)}return!1}},44024:function(e,t,r){var n=r(32807),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,r,o,a,s){var l=1&r,c=n(e),u=c.length;if(u!=n(t).length&&!l)return!1;for(var h=u;h--;){var f=c[h];if(!(l?f in t:i.call(t,f)))return!1}var d=s.get(e),p=s.get(t);if(d&&p)return d==t&&p==e;var y=!0;s.set(e,t),s.set(t,e);for(var m=l;++h<u;){var g=e[f=c[h]],v=t[f];if(o)var b=l?o(v,g,f,t,e,s):o(g,v,f,e,t,s);if(!(void 0===b?g===v||a(g,v,r,o,s):b)){y=!1;break}m||(m="constructor"==f)}if(y&&!m){var w=e.constructor,x=t.constructor;w!=x&&"constructor"in e&&"constructor"in t&&!("function"==typeof w&&w instanceof w&&"function"==typeof x&&x instanceof x)&&(y=!1)}return s.delete(e),s.delete(t),y}},93330:function(e,t,r){var n="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g;e.exports=n},32807:function(e,t,r){var n=r(83066),i=r(75720),o=r(63815);e.exports=function(e){return n(e,o,i)}},58035:function(e,t,r){var n=r(36919);e.exports=function(e,t){var r=e.__data__;return n(t)?r["string"==typeof t?"string":"hash"]:r.map}},36678:function(e,t,r){var n=r(64309),i=r(63815);e.exports=function(e){for(var t=i(e),r=t.length;r--;){var o=t[r],a=e[o];t[r]=[o,a,n(a)]}return t}},19044:function(e,t,r){var n=r(12072),i=r(93039);e.exports=function(e,t){var r=i(e,t);return n(r)?r:void 0}},98118:function(e,t,r){var n=r(23794)(Object.getPrototypeOf,Object);e.exports=n},37363:function(e,t,r){var n=r(13414),i=Object.prototype,o=i.hasOwnProperty,a=i.toString,s=n?n.toStringTag:void 0;e.exports=function(e){var t=o.call(e,s),r=e[s];try{e[s]=void 0;var n=!0}catch(e){}var i=a.call(e);return n&&(t?e[s]=r:delete e[s]),i}},75720:function(e,t,r){var n=r(19206),i=r(61810),o=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(e){return null==e?[]:n(a(e=Object(e)),function(t){return o.call(e,t)})}:i;e.exports=s},14995:function(e,t,r){var n=r(74417),i=r(77970),o=r(57780),a=r(71936),s=r(93485),l=r(12731),c=r(70559),u="[object Map]",h="[object Promise]",f="[object Set]",d="[object WeakMap]",p="[object DataView]",y=c(n),m=c(i),g=c(o),v=c(a),b=c(s),w=l;
vendor: 4,607 bytes, line 37
37(n&&w(new n(new ArrayBuffer(1)))!=p||i&&w(new i)!=u||o&&w(o.resolve())!=h||a&&w(new a)!=f||s&&w(new s)!=d)&&(w=function(e){var t=l(e),r="[object Object]"==t?e.constructor:void 0,n=r?c(r):"";if(n)switch(n){case y:return p;case m:return u;case g:return h;case v:return f;case b:return d}return t}),e.exports=w},93039:function(e){e.exports=function(e,t){return null==e?void 0:e[t]}},48101:function(e,t,r){var n=r(57442),i=r(6727),o=r(60443),a=r(41056),s=r(44664),l=r(83863);e.exports=function(e,t,r){t=n(t,e);for(var c=-1,u=t.length,h=!1;++c<u;){var f=l(t[c]);if(!(h=null!=e&&r(e,f)))break;e=e[f]}return h||++c!=u?h:!!(u=null==e?0:e.length)&&s(u)&&a(f,u)&&(o(e)||i(e))}},51865:function(e){var t=RegExp("[\\u200d\ud800-\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");e.exports=function(e){return t.test(e)}},89829:function(e,t,r){var n=r(91850);e.exports=function(){this.__data__=n?n(null):{},this.size=0}},60734:function(e){e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},35283:function(e,t,r){var n=r(91850),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(n){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return i.call(t,e)?t[e]:void 0}},97283:function(e,t,r){var n=r(91850),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return n?void 0!==t[e]:i.call(t,e)}},54778:function(e,t,r){var n=r(91850);e.exports=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=n&&void 0===t?"__lodash_hash_undefined__":t,this}},60883:function(e,t,r){var n=r(13414),i=r(6727),o=r(60443),a=n?n.isConcatSpreadable:void 0;e.exports=function(e){return o(e)||i(e)||!!(a&&e&&e[a])}},41056:function(e){var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,r){var n=typeof e;return!!(r=null==r?9007199254740991:r)&&("number"==n||"symbol"!=n&&t.test(e))&&e>-1&&e%1==0&&e<r}},60679:function(e,t,r){var n=r(27087),i=r(17806),o=r(41056),a=r(63117);e.exports=function(e,t,r){if(!a(r))return!1;var s=typeof t;return("number"==s?!!(i(r)&&o(t,r.length)):"string"==s&&t in r)&&n(r[t],e)}},59757:function(e,t,r){var n=r(60443),i=r(41108),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;e.exports=function(e,t){if(n(e))return!1;var r=typeof e;return!!("number"==r||"symbol"==r||"boolean"==r||null==e||i(e))||a.test(e)||!o.test(e)||null!=t&&e in Object(t)}},36919:function(e){e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},56711:function(e,t,r){var n,i=r(45704),o=(n=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"";e.exports=function(e){return!!o&&o in e}},30761:function(e){var t=Object.prototype;e.exports=function(e){var r=e&&e.constructor;return e===("function"==typeof r&&r.prototype||t)}},64309:function(e,t,r){var n=r(63117);e.exports=function(e){return e==e&&!n(e)}},89172:function(e){e.exports=function(){this.__data__=[],this.size=0}},13314:function(e,t,r){var n=r(22162),i=Array.prototype.splice;e.exports=function(e){var t=this.__data__,r=n(t,e);return!(r<0)&&(r==t.length-1?t.pop():i.call(t,r,1),--this.size,!0)}},73917:function(e,t,r){var n=r(22162);e.exports=function(e){var t=this.__data__,r=n(t,e);return r<0?void 0:t[r][1]}},49367:function(e,t,r){var n=r(22162);e.exports=function(e){return n(this.__data__,e)>-1}},97126:function(e,t,r){var n=r(22162);e.exports=function(e,t){var r=this.__data__,i=n(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}},59752:function(e,t,r){var n=r(70266),i=r(57115),o=r(77970);e.exports=function(){this.size=0,this.__data__={hash:new n,map:new(o||i),string:new n}}},20170:function(e,t,r){var n=r(58035);e.exports=function(e){var t=n(this,e).delete(e);return this.size-=t?1:0,t}},41069:function(e,t,r){var n=r(58035);e.exports=function(e){return n(this,e).get(e)}},28690:function(e,t,r){var n=r(58035);e.exports=function(e){return n(this,e).has(e)}},27323:function(e,t,r){var n=r(58035);e.exports=function(e,t){var r=n(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}},14774:function(e){e.exports=function(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r}},91378:function(e){e.exports=function(e,t){return function(r){return null!=r&&r[e]===t&&(void 0!==t||e in Object(r))}}},95325:function(e,t,r){var n=r(89830);e.exports=function(e){var t=n(e,function(e){return 500===r.size&&r.clear(),e}),r=t.cache;return t}},91850:function(e,t,r){var n=r(19044)(Object,"create");e.exports=n},93022:function(e,t,r){var n=r(23794)(Object.keys,Object);e.exports=n},28079:function(e,t,r){e=r.nmd(e);
37var n=r(93330),i=t&&!t.nodeType&&t,o=i&&e&&!e.nodeType&&e,a=o&&o.exports===i&&n.process,s=function(){try{var e=o&&o.require&&o.require("util").types;if(e)return e;return a&&a.binding&&a.binding("util")}catch(e){}}();e.exports=s},68391:function(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},23794:function(e){e.exports=function(e,t){return function(r){return e(t(r))}}},95694:function(e,t,r){var n=r(98266),i=Math.max;e.exports=function(e,t,r){return t=i(void 0===t?e.length-1:t,0),function(){for(var o=arguments,a=-1,s=i(o.length-t,0),l=Array(s);++a<s;)l[a]=o[t+a];a=-1;for(var c=Array(t+1);++a<t;)c[a]=o[a];return c[t]=r(l),n(e,this,c)}}},2381:function(e,t,r){var n=r(93330),i="object"==typeof self&&self&&self.Object===Object&&self,o=n||i||Function("return this")();e.exports=o},75912:function(e){e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},74765:function(e){e.exports=function(e){return this.__data__.has(e)}},94778:function(e){e.exports=function(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r}},45845:function(e,t,r){var n=r(95922),i=r(68530)(n);e.exports=i},68530:function(e){var t=Date.now;e.exports=function(e){var r=0,n=0;return function(){var i=t(),o=16-(i-n);if(n=i,o>0){if(++r>=800)return arguments[0]}else r=0;return e.apply(void 0,arguments)}}},24683:function(e,t,r){var n=r(57115);e.exports=function(){this.__data__=new n,this.size=0}},34813:function(e){e.exports=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}},35115:function(e){e.exports=function(e){return this.__data__.get(e)}},28199:function(e){e.exports=function(e){return this.__data__.has(e)}},58644:function(e,t,r){var n=r(57115),i=r(77970),o=r(8705);e.exports=function(e,t){var r=this.__data__;if(r instanceof n){var a=r.__data__;if(!i||a.length<199)return a.push([e,t]),this.size=++r.size,this;r=this.__data__=new o(a)}return r.set(e,t),this.size=r.size,this}},13708:function(e){e.exports=function(e,t,r){for(var n=r-1,i=e.length;++n<i;)if(e[n]===t)return n;return -1}},75631:function(e,t,r){var n=r(38211),i=r(51865),o=r(11748);e.exports=function(e){return i(e)?o(e):n(e)}},57048:function(e,t,r){var n=r(95325),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g,a=n(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(i,function(e,r,n,i){t.push(n?i.replace(o,"$1"):r||e)}),t});e.exports=a},83863:function(e,t,r){var n=r(41108),i=1/0;e.exports=function(e){if("string"==typeof e||n(e))return e;var t=e+"";return"0"==t&&1/e==-i?"-0":t}},70559:function(e){var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},25788:function(e){var t=/\s/;e.exports=function(e){for(var r=e.length;r--&&t.test(e.charAt(r)););return r}},11748:function(e){var t="\ud800-\udfff",r="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",n="\ud83c[\udffb-\udfff]",i="[^"+t+"]",o="(?:\ud83c[\udde6-\uddff]){2}",a="[\ud800-\udbff][\udc00-\udfff]",s="(?:"+r+"|"+n+")?",l="[\\ufe0e\\ufe0f]?",c="(?:\\u200d(?:"+[i,o,a].join("|")+")"+l+s+")*",u=RegExp(n+"(?="+n+")|(?:"+[i+r+"?",r,o,a,"["+t+"]"].join("|")+")"+(l+s+c),"g");e.exports=function(e){return e.match(u)||[]}},24008:function(e){e.exports=function(e){return function(){return e}}},22170:function(e,t,r){var n=r(63117),i=r(49423),o=r(49666),a=Math.max,s=Math.min;e.exports=function(e,t,r){var l,c,u,h,f,d,p=0,y=!1,m=!1,g=!0;if("function"!=typeof e)throw TypeError("Expected a function");function v(t){var r=l,n=c;return l=c=void 0,p=t,h=e.apply(n,r)}function b(e){var r=e-d,n=e-p;return void 0===d||r>=t||r<0||m&&n>=u}function w(){var e,r,n,o=i();if(b(o))return x(o);f=setTimeout(w,(e=o-d,r=o-p,n=t-e,m?s(n,u-r):n))}function x(e){return(f=void 0,g&&l)?v(e):(l=c=void 0,h)}function O(){var e,r=i(),n=b(r);if(l=arguments,c=this,d=r,n){if(void 0===f)return p=e=d,f=setTimeout(w,t),y?v(e):h;if(m)return clearTimeout(f),f=setTimeout(w,t),v(d)}return void 0===f&&(f=setTimeout(w,t)),h}return t=o(t)||0,n(r)&&(y=!!r.leading,u=(m="maxWait"in r)?a(o(r.maxWait)||0,t):u,g="trailing"in r?!!r.trailing:g),O.cancel=function(){void 0!==f&&clearTimeout(f),p=0,l=d=c=f=void 0},O.flush=function(){return void 0===f?h:x(i())},O}},27087:function(e){e.exports=function(e,t){return e===t||e!=e&&t!=t}},55118:function(e,t,r){var n=r(90516),i=r(20334),o=r(37942),a=r(60443),s=r(60679);e.exports=function(e,t,r){var l=a(e)?n:i;return r&&s(e,t,r)&&(t=void 0),l(e,o(t,3))}}
37,80203:function(e,t,r){var n=r(43310)(r(11030));e.exports=n},11030:function(e,t,r){var n=r(21933),i=r(37942),o=r(38979),a=Math.max;e.exports=function(e,t,r){var s=null==e?0:e.length;if(!s)return -1;var l=null==r?0:o(r);return l<0&&(l=a(s+l,0)),n(e,i(t,3),l)}},73720:function(e,t,r){var n=r(55648),i=r(7851);e.exports=function(e,t){return n(i(e,t),1)}},97019:function(e,t,r){var n=r(29013);e.exports=function(e,t,r){var i=null==e?void 0:n(e,t);return void 0===i?r:i}},59628:function(e,t,r){var n=r(80444),i=r(48101);e.exports=function(e,t){return null!=e&&i(e,t,n)}},15502:function(e){e.exports=function(e){return e}},6727:function(e,t,r){var n=r(35194),i=r(50561),o=Object.prototype,a=o.hasOwnProperty,s=o.propertyIsEnumerable,l=n(function(){return arguments}())?n:function(e){return i(e)&&a.call(e,"callee")&&!s.call(e,"callee")};e.exports=l},60443:function(e){var t=Array.isArray;e.exports=t},17806:function(e,t,r){var n=r(14380),i=r(44664);e.exports=function(e){return null!=e&&i(e.length)&&!n(e)}},64337:function(e,t,r){var n=r(12731),i=r(50561);e.exports=function(e){return!0===e||!1===e||i(e)&&"[object Boolean]"==n(e)}},46551:function(e,t,r){e=r.nmd(e);var n=r(2381),i=r(35423),o=t&&!t.nodeType&&t,a=o&&e&&!e.nodeType&&e,s=a&&a.exports===o?n.Buffer:void 0,l=s?s.isBuffer:void 0;e.exports=l||i},12916:function(e,t,r){var n=r(43277);e.exports=function(e,t){return n(e,t)}},14380:function(e,t,r){var n=r(12731),i=r(63117);e.exports=function(e){if(!i(e))return!1;var t=n(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},44664:function(e){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},50299:function(e,t,r){var n=r(60555);e.exports=function(e){return n(e)&&e!=+e}},49972:function(e){e.exports=function(e){return null==e}},60555:function(e,t,r){var n=r(12731),i=r(50561);e.exports=function(e){return"number"==typeof e||i(e)&&"[object Number]"==n(e)}},63117:function(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},50561:function(e){e.exports=function(e){return null!=e&&"object"==typeof e}},32999:function(e,t,r){var n=r(12731),i=r(98118),o=r(50561),a=Object.prototype,s=Function.prototype.toString,l=a.hasOwnProperty,c=s.call(Object);e.exports=function(e){if(!o(e)||"[object Object]"!=n(e))return!1;var t=i(e);if(null===t)return!0;var r=l.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&s.call(r)==c}},71519:function(e,t,r){var n=r(12731),i=r(60443),o=r(50561);e.exports=function(e){return"string"==typeof e||!i(e)&&o(e)&&"[object String]"==n(e)}},41108:function(e,t,r){var n=r(12731),i=r(50561);e.exports=function(e){return"symbol"==typeof e||i(e)&&"[object Symbol]"==n(e)}},78470:function(e,t,r){var n=r(13272),i=r(66127),o=r(28079),a=o&&o.isTypedArray,s=a?i(a):n;e.exports=s},63815:function(e,t,r){var n=r(16347),i=r(84238),o=r(17806);e.exports=function(e){return o(e)?n(e):i(e)}},96579:function(e){e.exports=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}},7851:function(e,t,r){var n=r(68165),i=r(37942),o=r(28519),a=r(60443);e.exports=function(e,t){return(a(e)?n:o)(e,i(t,3))}},47759:function(e,t,r){var n=r(85330),i=r(97385),o=r(37942);e.exports=function(e,t){var r={};return t=o(t,3),i(e,function(e,i,o){n(r,i,t(e,i,o))}),r}},47766:function(e,t,r){var n=r(77613),i=r(23985),o=r(15502);e.exports=function(e){return e&&e.length?n(e,o,i):void 0}},89830:function(e,t,r){var n=r(8705);function i(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw TypeError("Expected a function");var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var a=e.apply(this,n);return r.cache=o.set(i,a)||o,a};return r.cache=new(i.Cache||n),r}i.Cache=n,e.exports=i},89770:function(e,t,r){var n=r(77613),i=r(49182),o=r(15502);e.exports=function(e){return e&&e.length?n(e,o,i):void 0}},47710:function(e){e.exports=function(){}},49423:function(e,t,r){var n=r(2381);e.exports=function(){return n.Date.now()}},82794:function(e,t,r){var n=r(31358),i=r(65903),o=r(59757),a=r(83863);e.exports=function(e){return o(e)?n(a(e)):i(e)}},37105:function(e,t,r){var n=r(39105)();e.exports=n}
37,13632:function(e,t,r){var n=r(17232),i=r(37942),o=r(73802),a=r(60443),s=r(60679);e.exports=function(e,t,r){var l=a(e)?n:o;return r&&s(e,t,r)&&(t=void 0),l(e,i(t,3))}},60229:function(e,t,r){var n=r(55648),i=r(66738),o=r(48674),a=r(60679),s=o(function(e,t){if(null==e)return[];var r=t.length;return r>1&&a(e,t[0],t[1])?t=[]:r>2&&a(t[0],t[1],t[2])&&(t=[t[0]]),i(e,n(t,1),[])});e.exports=s},61810:function(e){e.exports=function(){return[]}},35423:function(e){e.exports=function(){return!1}},48527:function(e,t,r){var n=r(22170),i=r(63117);e.exports=function(e,t,r){var o=!0,a=!0;if("function"!=typeof e)throw TypeError("Expected a function");return i(r)&&(o="leading"in r?!!r.leading:o,a="trailing"in r?!!r.trailing:a),n(e,t,{leading:o,maxWait:t,trailing:a})}},42126:function(e,t,r){var n=r(49666),i=1/0;e.exports=function(e){return e?(e=n(e))===i||e===-i?(e<0?-1:1)*17976931348623157e292:e==e?e:0:0===e?e:0}},38979:function(e,t,r){var n=r(42126);e.exports=function(e){var t=n(e),r=t%1;return t==t?r?t-r:t:0}},49666:function(e,t,r){var n=r(19334),i=r(63117),o=r(41108),a=0/0,s=/^[-+]0x[0-9a-f]+$/i,l=/^0b[01]+$/i,c=/^0o[0-7]+$/i,u=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(o(e))return a;if(i(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=i(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=n(e);var r=l.test(e);return r||c.test(e)?u(e.slice(2),r?2:8):s.test(e)?a:+e}},61250:function(e,t,r){var n=r(13963);e.exports=function(e){return null==e?"":n(e)}},90374:function(e,t,r){var n=r(37942),i=r(32874);e.exports=function(e,t){return e&&e.length?i(e,n(t,2)):[]}},62637:function(e,t,r){var n=r(58191)("toUpperCase");e.exports=n},78030:function(e,t,r){"use strict";r.d(t,{Z:function(){return h}});var n=r(2265);/**
38 * @license lucide-react v0.516.0 - ISC
39 *
40 * This source code is licensed under the ISC license.
41 * See the LICENSE file in the root directory of this source tree.
42 */let i=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),o=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,r)=>r?r.toUpperCase():t.toLowerCase()),a=e=>{let t=o(e);return t.charAt(0).toUpperCase()+t.slice(1)},s=function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.filter((e,t,r)=>!!e&&""!==e.trim()&&r.indexOf(e)===t).join(" ").trim()},l=e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0};/**
43 * @license lucide-react v0.516.0 - ISC
44 *
45 * This source code is licensed under the ISC license.
46 * See the LICENSE file in the root directory of this source tree.
47 */var c={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
48 * @license lucide-react v0.516.0 - ISC
49 *
50 * This source code is licensed under the ISC license.
51 * See the LICENSE file in the root directory of this source tree.
52 */let u=(0,n.forwardRef)((e,t)=>{let{color:r="currentColor",size:i=24,strokeWidth:o=2,absoluteStrokeWidth:a,className:u="",children:h,iconNode:f,...d}=e;return(0,n.createElement)("svg",{ref:t,...c,width:i,height:i,stroke:r,strokeWidth:a?24*Number(o)/Number(i):o,className:s("lucide",u),...!h&&!l(d)&&{"aria-hidden":"true"},...d},[...f.map(e=>{let[t,r]=e;return(0,n.createElement)(t,r)}),...Array.isArray(h)?h:[h]])}),h=(e,t)=>{let r=(0,n.forwardRef)((r,o)=>{let{className:l,...c}=r;return(0,n.createElement)(u,{ref:o,iconNode:t,className:s("lucide-".concat(i(a(e))),"lucide-".concat(e),l),...c})});return r.displayName=a(e),r}},94207:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(78030).Z)("activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]])},55066:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(78030).Z)("arrow-down",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]])},52891:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(78030).Z)("arrow-left-right",[["path",{d:"M8 3 4 7l4 4",key:"9rb6wj"}],["path",{d:"M4 7h16",key:"6tx8e3"}],["path",{d:"m16 21 4-4-4-4",key:"siv7j2"}],["path",{d:"M20 17H4",key:"h6l3hr"}]])},95137:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(78030).Z)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]])},71976:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(78030).Z)("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]])},30338:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(78030).Z)("arrow-up-right",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]])},63541:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(78030).Z)("arrow-up",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]])},48281:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(78030).Z)("award",[["path",{d:"m15.477 12.89 1.515 8.526a.5.5 0 0 1-.81.47l-3.58-2.687a1 1 0 0 0-1.197 0l-3.586 2.686a.5.5 0 0 1-.81-.469l1.514-8.526",key:"1yiouv"}],["circle",{cx:"12",cy:"8",r:"6",key:"1vp47v"}]])},6600:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(78030).Z)("bell",[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]])},6540:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(78030).Z)("book-open",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]])},34567:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(78030).Z)("calculator",[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",key:"1nb95v"}],["line",{x1:"8",x2:"16",y1:"6",y2:"6",key:"x4nwl0"}],["line",{x1:"16",x2:"16",y1:"14",y2:"18",key:"wjye3r"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M12 10h.01",key:"1nrarc"}],["path",{d:"M8 10h.01",key:"19clt8"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M8 18h.01",key:"lrp35t"}]])},93409:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(78030).Z)("chart-column",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]])},22468:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(78030).Z)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]])},42421:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(78030).Z)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]])},70518:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(78030).Z)("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]])},76780:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(78030).Z)("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]])},92940:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(78030).Z)("circle-check-big",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]])},13231:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(78030).Z)("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]])},71935:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(78030).Z)("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]])},40933:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(78030).Z)("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]])},27419:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(78030).Z)("code-xml",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]])},6884:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});
52let n=(0,r(78030).Z)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},56935:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(78030).Z)("credit-card",[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]])},957:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(78030).Z)("crown",[["path",{d:"M11.562 3.266a.5.5 0 0 1 .876 0L15.39 8.87a1 1 0 0 0 1.516.294L21.183 5.5a.5.5 0 0 1 .798.519l-2.834 10.246a1 1 0 0 1-.956.734H5.81a1 1 0 0 1-.957-.734L2.02 6.02a.5.5 0 0 1 .798-.519l4.276 3.664a1 1 0 0 0 1.516-.294z",key:"1vdc57"}],["path",{d:"M5 21h14",key:"11awu3"}]])},97589:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(78030).Z)("database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]])},51077:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(78030).Z)("dollar-sign",[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]])},23787:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(78030).Z)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]])},43765:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(78030).Z)("flame",[["path",{d:"M8.5 14.5A2.5 2.5 0 0 0 11 12c0-1.38-.5-2-1-3-1.072-2.143-.224-4.054 2-6 .5 2.5 2 4.9 4 6.5 2 1.6 3 3.5 3 5.5a7 7 0 1 1-14 0c0-1.153.433-2.294 1-3a2.5 2.5 0 0 0 2.5 2.5z",key:"96xj49"}]])},4436:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(78030).Z)("globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]])},30690:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(78030).Z)("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]])},13953:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(78030).Z)("instagram",[["rect",{width:"20",height:"20",x:"2",y:"2",rx:"5",ry:"5",key:"2e1cvw"}],["path",{d:"M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z",key:"9exkf1"}],["line",{x1:"17.5",x2:"17.51",y1:"6.5",y2:"6.5",key:"r4j83e"}]])},35931:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(78030).Z)("layers",[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]])},3274:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(78030).Z)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},74453:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(78030).Z)("lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]])},4086:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(78030).Z)("mail",[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]])},88002:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(78030).Z)("minus",[["path",{d:"M5 12h14",key:"1ays0h"}]])},6864:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(78030).Z)("newspaper",[["path",{d:"M15 18h-5",key:"95g1m2"}],["path",{d:"M18 14h-8",key:"sponae"}],["path",{d:"M4 22h16a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v16a2 2 0 0 1-4 0v-9a2 2 0 0 1 2-2h2",key:"39pd36"}
52],["rect",{width:"8",height:"4",x:"10",y:"6",rx:"1",key:"aywv1n"}]])},40756:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(78030).Z)("radar",[["path",{d:"M19.07 4.93A10 10 0 0 0 6.99 3.34",key:"z3du51"}],["path",{d:"M4 6h.01",key:"oypzma"}],["path",{d:"M2.29 9.62A10 10 0 1 0 21.31 8.35",key:"qzzz0"}],["path",{d:"M16.24 7.76A6 6 0 1 0 8.23 16.67",key:"1yjesh"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M17.99 11.66A6 6 0 0 1 15.77 16.67",key:"1u2y91"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"m13.41 10.59 5.66-5.66",key:"mhq4k0"}]])},66706:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(78030).Z)("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]])},54817:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(78030).Z)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]])},60994:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(78030).Z)("send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]])},64341:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(78030).Z)("shield-alert",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]])},20500:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(78030).Z)("shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]])},33907:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(78030).Z)("sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]])},21902:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(78030).Z)("target",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]])},29162:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(78030).Z)("trending-down",[["path",{d:"M16 17h6v-6",key:"t6n2it"}],["path",{d:"m22 17-8.5-8.5-5 5L2 7",key:"x473p"}]])},53225:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(78030).Z)("trending-up",[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]])},36127:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(78030).Z)("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]])},85016:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(78030).Z)("trophy",[["path",{d:"M10 14.66v1.626a2 2 0 0 1-.976 1.696A5 5 0 0 0 7 21.978",key:"1n3hpd"}],["path",{d:"M14 14.66v1.626a2 2 0 0 0 .976 1.696A5 5 0 0 1 17 21.978",key:"rfe1zi"}],["path",{d:"M18 9h1.5a1 1 0 0 0 0-5H18",key:"7xy6bh"}],["path",{d:"M4 22h16",key:"57wxv0"}],["path",{d:"M6 9a6 6 0 0 0 12 0V3a1 1 0 0 0-1-1H7a1 1 0 0 0-1 1z",key:"1mhfuq"}],["path",{d:"M6 9H4.5a1 1 0 0 1 0-5H6",key:"tex48p"}]])},59799:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(78030).Z)("twitter",[["path",{d:"M22 4s-.7 2.1-2 3.4c1.6 10-9.4 17.3-18 11.6 2.2.1 4.4-.6 6-2C3 15.5.5 9.6 3 5c2.2 2.6 5.6 4.1 9 4-.9-4.2 4-6.6 7-3.8 1.1 0 3-1.2 3-1.2z",key:"pff0z6"}]])},52022:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(78030).Z)("user",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]])},11240:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(78030).Z)("users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]])},74697:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(78030).Z)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}
52],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},55430:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(78030).Z)("zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]])},87138:function(e,t,r){"use strict";r.d(t,{default:function(){return i.a}});var n=r(231),i=r.n(n)},16463:function(e,t,r){"use strict";var n=r(71169);r.o(n,"usePathname")&&r.d(t,{usePathname:function(){return n.usePathname}}),r.o(n,"useRouter")&&r.d(t,{useRouter:function(){return n.useRouter}}),r.o(n,"useSearchParams")&&r.d(t,{useSearchParams:function(){return n.useSearchParams}})},20357:function(e,t,r){"use strict";var n,i;e.exports=(null==(n=r.g.process)?void 0:n.env)&&"object"==typeof(null==(i=r.g.process)?void 0:i.env)?r.g.process:r(88081)},844:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addLocale",{enumerable:!0,get:function(){return n}}),r(18157);let n=function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return e};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},25944:function(e,t,r){"use strict";function n(e,t,r,n){return!1}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getDomainLocale",{enumerable:!0,get:function(){return n}}),r(18157),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},40905:function(e,t){"use strict";let r;Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{DOMAttributeNames:function(){return n},default:function(){return a},isEqualNode:function(){return o}});let n={acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv",noModule:"noModule"};function i(e){let{type:t,props:r}=e,i=document.createElement(t);for(let e in r){if(!r.hasOwnProperty(e)||"children"===e||"dangerouslySetInnerHTML"===e||void 0===r[e])continue;let o=n[e]||e.toLowerCase();"script"===t&&("async"===o||"defer"===o||"noModule"===o)?i[o]=!!r[e]:i.setAttribute(o,r[e])}let{children:o,dangerouslySetInnerHTML:a}=r;return a?i.innerHTML=a.__html||"":o&&(i.textContent="string"==typeof o?o:Array.isArray(o)?o.join(""):""),i}function o(e,t){if(e instanceof HTMLElement&&t instanceof HTMLElement){let r=t.getAttribute("nonce");if(r&&!e.getAttribute("nonce")){let n=t.cloneNode(!0);return n.setAttribute("nonce",""),n.nonce=r,r===e.nonce&&e.isEqualNode(n)}}return e.isEqualNode(t)}function a(){return{mountedInstances:new Set,updateHead:e=>{let t={};e.forEach(e=>{if("link"===e.type&&e.props["data-optimized-fonts"]){if(document.querySelector('style[data-href="'+e.props["data-href"]+'"]'))return;e.props.href=e.props["data-href"],e.props["data-href"]=void 0}let r=t[e.type]||[];r.push(e),t[e.type]=r});let n=t.title?t.title[0]:null,i="";if(n){let{children:e}=n.props;i="string"==typeof e?e:Array.isArray(e)?e.join(""):""}i!==document.title&&(document.title=i),["meta","base","link","style","script"].forEach(e=>{r(e,t[e]||[])})}}}r=(e,t)=>{let r=document.getElementsByTagName("head")[0],n=r.querySelector("meta[name=next-head-count]"),a=Number(n.content),s=[];for(let t=0,r=n.previousElementSibling;t<a;t++,r=(null==r?void 0:r.previousElementSibling)||null){var l;(null==r?void 0:null==(l=r.tagName)?void 0:l.toLowerCase())===e&&s.push(r)}let c=t.map(i).filter(e=>{for(let t=0,r=s.length;t<r;t++)if(o(s[t],e))return s.splice(t,1),!1;return!0});s.forEach(e=>{var t;return null==(t=e.parentNode)?void 0:t.removeChild(e)}),c.forEach(e=>r.insertBefore(e,n)),n.content=(a-s.length+c.length).toString()},("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esMo
52dule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},231:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return w}});let n=r(99920),i=r(57437),o=n._(r(2265)),a=r(98016),s=r(18029),l=r(41142),c=r(43461),u=r(844),h=r(60291),f=r(44467),d=r(53106),p=r(25944),y=r(4897),m=r(51507),g=new Set;function v(e,t,r,n,i,o){if("undefined"!=typeof window&&(o||(0,s.isLocalURL)(t))){if(!n.bypassPrefetchedCheck){let i=t+"%"+r+"%"+(void 0!==n.locale?n.locale:"locale"in e?e.locale:void 0);if(g.has(i))return;g.add(i)}Promise.resolve(o?e.prefetch(t,i):e.prefetch(t,r,n)).catch(e=>{})}}function b(e){return"string"==typeof e?e:(0,l.formatUrl)(e)}let w=o.default.forwardRef(function(e,t){let r,n;let{href:l,as:g,children:w,prefetch:x=null,passHref:O,replace:k,shallow:j,scroll:S,locale:_,onClick:E,onMouseEnter:A,onTouchStart:P,legacyBehavior:T=!1,...N}=e;r=w,T&&("string"==typeof r||"number"==typeof r)&&(r=(0,i.jsx)("a",{children:r}));let C=o.default.useContext(h.RouterContext),M=o.default.useContext(f.AppRouterContext),I=null!=C?C:M,R=!C,D=!1!==x,L=null===x?m.PrefetchKind.AUTO:m.PrefetchKind.FULL,{href:B,as:$}=o.default.useMemo(()=>{if(!C){let e=b(l);return{href:e,as:g?b(g):e}}let[e,t]=(0,a.resolveHref)(C,l,!0);return{href:e,as:g?(0,a.resolveHref)(C,g):t||e}},[C,l,g]),U=o.default.useRef(B),q=o.default.useRef($);T&&(n=o.default.Children.only(r));let z=T?n&&"object"==typeof n&&n.ref:t,[F,W,H]=(0,d.useIntersection)({rootMargin:"200px"}),V=o.default.useCallback(e=>{(q.current!==$||U.current!==B)&&(H(),q.current=$,U.current=B),F(e),z&&("function"==typeof z?z(e):"object"==typeof z&&(z.current=e))},[$,z,B,H,F]);o.default.useEffect(()=>{I&&W&&D&&v(I,B,$,{locale:_},{kind:L},R)},[$,B,W,_,D,null==C?void 0:C.locale,I,R,L]);let K={ref:V,onClick(e){T||"function"!=typeof E||E(e),T&&n.props&&"function"==typeof n.props.onClick&&n.props.onClick(e),I&&!e.defaultPrevented&&function(e,t,r,n,i,a,l,c,u){let{nodeName:h}=e.currentTarget;if("A"===h.toUpperCase()&&(function(e){let t=e.currentTarget.getAttribute("target");return t&&"_self"!==t||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.nativeEvent&&2===e.nativeEvent.which}(e)||!u&&!(0,s.isLocalURL)(r)))return;e.preventDefault();let f=()=>{let e=null==l||l;"beforePopState"in t?t[i?"replace":"push"](r,n,{shallow:a,locale:c,scroll:e}):t[i?"replace":"push"](n||r,{scroll:e})};u?o.default.startTransition(f):f()}(e,I,B,$,k,j,S,_,R)},onMouseEnter(e){T||"function"!=typeof A||A(e),T&&n.props&&"function"==typeof n.props.onMouseEnter&&n.props.onMouseEnter(e),I&&(D||!R)&&v(I,B,$,{locale:_,priority:!0,bypassPrefetchedCheck:!0},{kind:L},R)},onTouchStart:function(e){T||"function"!=typeof P||P(e),T&&n.props&&"function"==typeof n.props.onTouchStart&&n.props.onTouchStart(e),I&&(D||!R)&&v(I,B,$,{locale:_,priority:!0,bypassPrefetchedCheck:!0},{kind:L},R)}};if((0,c.isAbsoluteUrl)($))K.href=$;else if(!T||O||"a"===n.type&&!("href"in n.props)){let e=void 0!==_?_:null==C?void 0:C.locale,t=(null==C?void 0:C.isLocaleDomain)&&(0,p.getDomainLocale)($,e,null==C?void 0:C.locales,null==C?void 0:C.domainLocales);K.href=t||(0,y.addBasePath)((0,u.addLocale)($,e,null==C?void 0:C.defaultLocale))}return T?o.default.cloneElement(n,K):(0,i.jsx)("a",{...N,...K,children:r})});("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},49189:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{cancelIdleCallback:function(){return n},requestIdleCallback:function(){return r}});let r="undefined"!=typeof self&&self.requestIdleCallback&&self.requestIdleCallback.bind(window)||function(e){let t=Date.now();return self.setTimeout(function(){e({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-t))}})},1)},n="undefined"!=typeof self&&self.cancelIdleCallback&&self.cancelIdleCallback.bind(window)||function(e){return clearTimeout(e)};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esMo
52dule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},98016:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"resolveHref",{enumerable:!0,get:function(){return h}});let n=r(18323),i=r(41142),o=r(45519),a=r(43461),s=r(18157),l=r(18029),c=r(59195),u=r(80020);function h(e,t,r){let h;let f="string"==typeof t?t:(0,i.formatWithValidation)(t),d=f.match(/^[a-zA-Z]{1,}:\/\//),p=d?f.slice(d[0].length):f;if((p.split("?",1)[0]||"").match(/(\/\/|\\)/)){console.error("Invalid href '"+f+"' passed to next/router in page: '"+e.pathname+"'. Repeated forward-slashes (//) or backslashes \\ are not valid in the href.");let t=(0,a.normalizeRepeatedSlashes)(p);f=(d?d[0]:"")+t}if(!(0,l.isLocalURL)(f))return r?[f]:f;try{h=new URL(f.startsWith("#")?e.asPath:e.pathname,"http://n")}catch(e){h=new URL("/","http://n")}try{let e=new URL(f,h);e.pathname=(0,s.normalizePathTrailingSlash)(e.pathname);let t="";if((0,c.isDynamicRoute)(e.pathname)&&e.searchParams&&r){let r=(0,n.searchParamsToUrlQuery)(e.searchParams),{result:a,params:s}=(0,u.interpolateAs)(e.pathname,e.pathname,r);a&&(t=(0,i.formatWithValidation)({pathname:a,hash:e.hash,query:(0,o.omit)(r,s)}))}let a=e.origin===h.origin?e.href.slice(e.origin.length):e.href;return r?[a,t||a]:a}catch(e){return r?[f]:f}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},84080:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{default:function(){return b},handleClientScriptLoad:function(){return m},initScriptLoader:function(){return g}});let n=r(99920),i=r(41452),o=r(57437),a=n._(r(54887)),s=i._(r(2265)),l=r(36590),c=r(40905),u=r(49189),h=new Map,f=new Set,d=["onLoad","onReady","dangerouslySetInnerHTML","children","onError","strategy","stylesheets"],p=e=>{if(a.default.preinit){e.forEach(e=>{a.default.preinit(e,{as:"style"})});return}if("undefined"!=typeof window){let t=document.head;e.forEach(e=>{let r=document.createElement("link");r.type="text/css",r.rel="stylesheet",r.href=e,t.appendChild(r)})}},y=e=>{let{src:t,id:r,onLoad:n=()=>{},onReady:i=null,dangerouslySetInnerHTML:o,children:a="",strategy:s="afterInteractive",onError:l,stylesheets:u}=e,y=r||t;if(y&&f.has(y))return;if(h.has(t)){f.add(y),h.get(t).then(n,l);return}let m=()=>{i&&i(),f.add(y)},g=document.createElement("script"),v=new Promise((e,t)=>{g.addEventListener("load",function(t){e(),n&&n.call(this,t),m()}),g.addEventListener("error",function(e){t(e)})}).catch(function(e){l&&l(e)});for(let[r,n]of(o?(g.innerHTML=o.__html||"",m()):a?(g.textContent="string"==typeof a?a:Array.isArray(a)?a.join(""):"",m()):t&&(g.src=t,h.set(t,v)),Object.entries(e))){if(void 0===n||d.includes(r))continue;let e=c.DOMAttributeNames[r]||r.toLowerCase();g.setAttribute(e,n)}"worker"===s&&g.setAttribute("type","text/partytown"),g.setAttribute("data-nscript",s),u&&p(u),document.body.appendChild(g)};function m(e){let{strategy:t="afterInteractive"}=e;"lazyOnload"===t?window.addEventListener("load",()=>{(0,u.requestIdleCallback)(()=>y(e))}):y(e)}function g(e){e.forEach(m),[...document.querySelectorAll('[data-nscript="beforeInteractive"]'),...document.querySelectorAll('[data-nscript="beforePageRender"]')].forEach(e=>{let t=e.id||e.getAttribute("src");f.add(t)})}function v(e){let{id:t,src:r="",onLoad:n=()=>{},onReady:i=null,strategy:c="afterInteractive",onError:h,stylesheets:d,...p}=e,{updateScripts:m,scripts:g,getIsSsr:v,appDir:b,nonce:w}=(0,s.useContext)(l.HeadManagerContext),x=(0,s.useRef)(!1);(0,s.useEffect)(()=>{let e=t||r;x.current||(i&&e&&f.has(e)&&i(),x.current=!0)},[i,t,r]);let O=(0,s.useRef)(!1);if((0,s.useEffect)(()=>{!O.current&&("afterInteractive"===c?y(e):"lazyOnload"===c&&("complete"===document.readyState?(0,u.requestIdleCallback)(()=>y(e)):window.addEventListener("load",()=>{(0,u.requestIdleCallback)(()=>y(e))})),O.current=!0)},[e,c]),("beforeInteractive"===c||"worker"===c)&&(m?(g[c]=(g[c]||[]).concat([{id:t,src:r,onLoad:n,onReady:i,onError:h,...p}
52]),m(g)):v&&v()?f.add(t||r):v&&!v()&&y(e)),b){if(d&&d.forEach(e=>{a.default.preinit(e,{as:"style"})}),"beforeInteractive"===c)return r?(a.default.preload(r,p.integrity?{as:"script",integrity:p.integrity,nonce:w}:{as:"script",nonce:w}),(0,o.jsx)("script",{nonce:w,dangerouslySetInnerHTML:{__html:"(self.__next_s=self.__next_s||[]).push("+JSON.stringify([r,{...p,id:t}])+")"}})):(p.dangerouslySetInnerHTML&&(p.children=p.dangerouslySetInnerHTML.__html,delete p.dangerouslySetInnerHTML),(0,o.jsx)("script",{nonce:w,dangerouslySetInnerHTML:{__html:"(self.__next_s=self.__next_s||[]).push("+JSON.stringify([0,{...p,id:t}])+")"}}));"afterInteractive"===c&&r&&a.default.preload(r,p.integrity?{as:"script",integrity:p.integrity,nonce:w}:{as:"script",nonce:w})}return null}Object.defineProperty(v,"__nextScript",{value:!0});let b=v;("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},53106:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useIntersection",{enumerable:!0,get:function(){return l}});let n=r(2265),i=r(49189),o="function"==typeof IntersectionObserver,a=new Map,s=[];function l(e){let{rootRef:t,rootMargin:r,disabled:l}=e,c=l||!o,[u,h]=(0,n.useState)(!1),f=(0,n.useRef)(null),d=(0,n.useCallback)(e=>{f.current=e},[]);return(0,n.useEffect)(()=>{if(o){if(c||u)return;let e=f.current;if(e&&e.tagName)return function(e,t,r){let{id:n,observer:i,elements:o}=function(e){let t;let r={root:e.root||null,margin:e.rootMargin||""},n=s.find(e=>e.root===r.root&&e.margin===r.margin);if(n&&(t=a.get(n)))return t;let i=new Map;return t={id:r,observer:new IntersectionObserver(e=>{e.forEach(e=>{let t=i.get(e.target),r=e.isIntersecting||e.intersectionRatio>0;t&&r&&t(r)})},e),elements:i},s.push(r),a.set(r,t),t}(r);return o.set(e,t),i.observe(e),function(){if(o.delete(e),i.unobserve(e),0===o.size){i.disconnect(),a.delete(n);let e=s.findIndex(e=>e.root===n.root&&e.margin===n.margin);e>-1&&s.splice(e,1)}}}(e,e=>e&&h(e),{root:null==t?void 0:t.current,rootMargin:r})}else if(!u){let e=(0,i.requestIdleCallback)(()=>h(!0));return()=>(0,i.cancelIdleCallback)(e)}},[c,r,t,u,f.current]),[d,u,(0,n.useCallback)(()=>{h(!1)},[])]}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},86300:function(e){!function(){var t={675:function(e,t){"use strict";t.byteLength=function(e){var t=l(e),r=t[0],n=t[1];return(r+n)*3/4-n},t.toByteArray=function(e){var t,r,o=l(e),a=o[0],s=o[1],c=new i((a+s)*3/4-s),u=0,h=s>0?a-4:a;for(r=0;r<h;r+=4)t=n[e.charCodeAt(r)]<<18|n[e.charCodeAt(r+1)]<<12|n[e.charCodeAt(r+2)]<<6|n[e.charCodeAt(r+3)],c[u++]=t>>16&255,c[u++]=t>>8&255,c[u++]=255&t;return 2===s&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,c[u++]=255&t),1===s&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,c[u++]=t>>8&255,c[u++]=255&t),c},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],a=0,s=n-i;a<s;a+=16383)o.push(function(e,t,n){for(var i,o=[],a=t;a<n;a+=3)o.push(r[(i=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]))>>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return o.join("")}(e,a,a+16383>s?s:a+16383));return 1===i?o.push(r[(t=e[n-1])>>2]+r[t<<4&63]+"=="):2===i&&o.push(r[(t=(e[n-2]<<8)+e[n-1])>>10]+r[t>>4&63]+r[t<<2&63]+"="),o.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,s=o.length;a<s;++a)r[a]=o[a],n[o.charCodeAt(a)]=a;function l(e){var t=e.length;if(t%4>0)throw Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");-1===r&&(r=t);var n=r===t?0:4-r%4;return[r,n]}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},72:function(e,t,r){"use strict";/*!
53 * The buffer module from node.js, for the browser.
54 *
55 * @author   Feross Aboukhadijeh <https://feross.org>
56 * @license  MIT
57 */var n=r(675),i=r(783),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;function a(e){if(e>
572147483647)throw RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,s.prototype),t}function s(e,t,r){if("number"==typeof e){if("string"==typeof t)throw TypeError('The "string" argument must be of type string. Received type number');return u(e)}return l(e,t,r)}function l(e,t,r){if("string"==typeof e)return function(e,t){if(("string"!=typeof t||""===t)&&(t="utf8"),!s.isEncoding(t))throw TypeError("Unknown encoding: "+t);var r=0|d(e,t),n=a(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}(e,t);if(ArrayBuffer.isView(e))return h(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(P(e,ArrayBuffer)||e&&P(e.buffer,ArrayBuffer)||"undefined"!=typeof SharedArrayBuffer&&(P(e,SharedArrayBuffer)||e&&P(e.buffer,SharedArrayBuffer)))return function(e,t,r){var n;if(t<0||e.byteLength<t)throw RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw RangeError('"length" is outside of buffer bounds');return Object.setPrototypeOf(n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),s.prototype),n}(e,t,r);if("number"==typeof e)throw TypeError('The "value" argument must not be of type number. Received type number');var n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return s.from(n,t,r);var i=function(e){if(s.isBuffer(e)){var t,r=0|f(e.length),n=a(r);return 0===n.length||e.copy(n,0,0,r),n}return void 0!==e.length?"number"!=typeof e.length||(t=e.length)!=t?a(0):h(e):"Buffer"===e.type&&Array.isArray(e.data)?h(e.data):void 0}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return s.from(e[Symbol.toPrimitive]("string"),t,r);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function c(e){if("number"!=typeof e)throw TypeError('"size" argument must be of type number');if(e<0)throw RangeError('The value "'+e+'" is invalid for option "size"')}function u(e){return c(e),a(e<0?0:0|f(e))}function h(e){for(var t=e.length<0?0:0|f(e.length),r=a(t),n=0;n<t;n+=1)r[n]=255&e[n];return r}function f(e){if(e>=2147483647)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|e}function d(e,t){if(s.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||P(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return S(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return E(e).length;default:if(i)return n?-1:S(e).length;t=(""+t).toLowerCase(),i=!0}}function p(e,t,r){var i,o,a=!1;if((void 0===t||t<0)&&(t=0),t>this.length||((void 0===r||r>this.length)&&(r=this.length),r<=0||(r>>>=0)<=(t>>>=0)))return"";for(e||(e="utf8");;)switch(e){case"hex":return function(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=t;o<r;++o)i+=T[e[o]];return i}(this,t,r);case"utf8":case"utf-8":return v(this,t,r);case"ascii":return function(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}(this,t,r);case"latin1":case"binary":return function(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}(this,t,r);case"base64":return i=t,o=r,0===i&&o===this.length?n.fromByteArray(this):n.fromByteArray(this.slice(i,o));case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return function(e,t,r){for(var n=e.slice(t,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}(this,t,r);default:if(a)throw TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),a=!0}}function y(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function m(e,t,r,n,i){var o;if(0===e.length)return -1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),(o=r=+r)!=o&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return -1;r=e.length-1}
57else if(r<0){if(!i)return -1;r=0}if("string"==typeof t&&(t=s.from(t,n)),s.isBuffer(t))return 0===t.length?-1:g(e,t,r,n,i);if("number"==typeof t)return(t&=255,"function"==typeof Uint8Array.prototype.indexOf)?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):g(e,[t],r,n,i);throw TypeError("val must be string, number or Buffer")}function g(e,t,r,n,i){var o,a=1,s=e.length,l=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return -1;a=2,s/=2,l/=2,r/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var u=-1;for(o=r;o<s;o++)if(c(e,o)===c(t,-1===u?0:o-u)){if(-1===u&&(u=o),o-u+1===l)return u*a}else -1!==u&&(o-=o-u),u=-1}else for(r+l>s&&(r=s-l),o=r;o>=0;o--){for(var h=!0,f=0;f<l;f++)if(c(e,o+f)!==c(t,f)){h=!1;break}if(h)return o}return -1}function v(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i<r;){var o,a,s,l,c=e[i],u=null,h=c>239?4:c>223?3:c>191?2:1;if(i+h<=r)switch(h){case 1:c<128&&(u=c);break;case 2:(192&(o=e[i+1]))==128&&(l=(31&c)<<6|63&o)>127&&(u=l);break;case 3:o=e[i+1],a=e[i+2],(192&o)==128&&(192&a)==128&&(l=(15&c)<<12|(63&o)<<6|63&a)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:o=e[i+1],a=e[i+2],s=e[i+3],(192&o)==128&&(192&a)==128&&(192&s)==128&&(l=(15&c)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&l<1114112&&(u=l)}null===u?(u=65533,h=1):u>65535&&(u-=65536,n.push(u>>>10&1023|55296),u=56320|1023&u),n.push(u),i+=h}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);for(var r="",n=0;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=4096));return r}(n)}function b(e,t,r){if(e%1!=0||e<0)throw RangeError("offset is not uint");if(e+t>r)throw RangeError("Trying to access beyond buffer length")}function w(e,t,r,n,i,o){if(!s.isBuffer(e))throw TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw RangeError('"value" argument is out of bounds');if(r+n>e.length)throw RangeError("Index out of range")}function x(e,t,r,n,i,o){if(r+n>e.length||r<0)throw RangeError("Index out of range")}function O(e,t,r,n,o){return t=+t,r>>>=0,o||x(e,t,r,4,34028234663852886e22,-34028234663852886e22),i.write(e,t,r,n,23,4),r+4}function k(e,t,r,n,o){return t=+t,r>>>=0,o||x(e,t,r,8,17976931348623157e292,-17976931348623157e292),i.write(e,t,r,n,52,8),r+8}t.Buffer=s,t.SlowBuffer=function(e){return+e!=e&&(e=0),s.alloc(+e)},t.INSPECT_MAX_BYTES=50,t.kMaxLength=2147483647,s.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),s.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}}),s.poolSize=8192,s.from=function(e,t,r){return l(e,t,r)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array),s.alloc=function(e,t,r){return(c(e),e<=0)?a(e):void 0!==t?"string"==typeof r?a(e).fill(t,r):a(e).fill(t):a(e)},s.allocUnsafe=function(e){return u(e)},s.allocUnsafeSlow=function(e){return u(e)},s.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==s.prototype},s.compare=function(e,t){if(P(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),P(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),!s.isBuffer(e)||!s.isBuffer(t))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var r=e.length,n=t.length,i=0,o=Math.min(r,n);i<o;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0},s.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(e,t){if(!Array.isArray(e))throw TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return s.alloc(0);if(void 0===t)for(r=0,t=0;r<e.length;++r)t+=e[r].length;var r,n=s.allocUnsafe(t),i=0;for(r=0;r<e.length;++r){var o=e[r];if(P(o,Uint8Array)&&(o=s.from(o)),!s.isBuffer(o))throw TypeError('"list" argument must be an Array of Buffers');o.copy(n,i),i+=o.length}return n},s.byteLength=d,s.prototype._isBuffer=!0,s.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)y(this,t,t+1);return this},s.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)y(this,t,t+3),y(this,t+1,t+2);return this},s.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)y(this,t,t+7),y(this,t+1,t+6),y(this,t+2,t+5),y(this,t+3,t+4);return this},s.prototype.toString=function(){var e=this.length;return 0===e?"":0==arguments.length?v(this,0,e):p.apply(this,arguments)}
vendor: 8,902 bytes, line 57
57,s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(e){if(!s.isBuffer(e))throw TypeError("Argument must be a Buffer");return this===e||0===s.compare(this,e)},s.prototype.inspect=function(){var e="",r=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},o&&(s.prototype[o]=s.prototype.inspect),s.prototype.compare=function(e,t,r,n,i){if(P(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),!s.isBuffer(e))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return -1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,i>>>=0,this===e)return 0;for(var o=i-n,a=r-t,l=Math.min(o,a),c=this.slice(n,i),u=e.slice(t,r),h=0;h<l;++h)if(c[h]!==u[h]){o=c[h],a=u[h];break}return o<a?-1:a<o?1:0},s.prototype.includes=function(e,t,r){return -1!==this.indexOf(e,t,r)},s.prototype.indexOf=function(e,t,r){return m(this,e,t,r,!0)},s.prototype.lastIndexOf=function(e,t,r){return m(this,e,t,r,!1)},s.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else if(isFinite(t))t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var i,o,a,s,l,c,u,h,f,d,p,y,m=this.length-t;if((void 0===r||r>m)&&(r=m),e.length>0&&(r<0||t<0)||t>this.length)throw RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var g=!1;;)switch(n){case"hex":return function(e,t,r,n){r=Number(r)||0;var i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;var o=t.length;n>o/2&&(n=o/2);for(var a=0;a<n;++a){var s=parseInt(t.substr(2*a,2),16);if(s!=s)break;e[r+a]=s}return a}(this,e,t,r);case"utf8":case"utf-8":return l=t,c=r,A(S(e,this.length-l),this,l,c);case"ascii":return u=t,h=r,A(_(e),this,u,h);case"latin1":case"binary":return i=this,o=e,a=t,s=r,A(_(o),i,a,s);case"base64":return f=t,d=r,A(E(e),this,f,d);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return p=t,y=r,A(function(e,t){for(var r,n,i=[],o=0;o<e.length&&!((t-=2)<0);++o)n=(r=e.charCodeAt(o))>>8,i.push(r%256),i.push(n);return i}(e,this.length-p),this,p,y);default:if(g)throw TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),g=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},s.prototype.slice=function(e,t){var r=this.length;e=~~e,t=void 0===t?r:~~t,e<0?(e+=r)<0&&(e=0):e>r&&(e=r),t<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);var n=this.subarray(e,t);return Object.setPrototypeOf(n,s.prototype),n},s.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||b(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return n},s.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||b(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},s.prototype.readUInt8=function(e,t){return e>>>=0,t||b(e,1,this.length),this[e]},s.prototype.readUInt16LE=function(e,t){return e>>>=0,t||b(e,2,this.length),this[e]|this[e+1]<<8},s.prototype.readUInt16BE=function(e,t){return e>>>=0,t||b(e,2,this.length),this[e]<<8|this[e+1]},s.prototype.readUInt32LE=function(e,t){return e>>>=0,t||b(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},s.prototype.readUInt32BE=function(e,t){return e>>>=0,t||b(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},s.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||b(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*t)),n},s.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||b(e,t,this.length);for(var n=t,i=1,o=this[e+--n];n>0&&(i*=256);)o+=this[e+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},s.prototype.readInt8=function(e,t){return(e>>>=0,t||b(e,1,this.length),128&this[e])?-((255-this[e]+1)*1):this[e]},s.prototype.readInt16LE=function(e,t){e>>>=0,t||b(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},s.prototype.readInt16BE=function(e,t){e>>>=0,t||b(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},s.prototype.readInt32LE=function(e,t){return e>>>=0,t||b(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},s.prototype.readInt32BE=function(e,t){return e>>>=0,t||b(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},s.prototype.readFloatLE=function(e,t){return e>>>=0,t||b(e,4,this.length),i.read(this,e,!0,23,4)},s.prototype.readFloatBE=function(e,t){return e>>>=0,t||b(e,4,this.length),i.read(this,e,!1,23,4)},s.prototype.readDoubleLE=function(e,t){return e>>>=0,t||b(e,8,this.length),i.read(this,e,!0,52,8)},s.prototype.readDoubleBE=function(e,t){return e>>>=0,t||b(e,8,this.length),i.read(this,e,!1,52,8)},s.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){var i=Math.pow(2,8*r)-1;w(this,e,t,r,i,0)}var o=1,a=0;for(this[t]=255&e;++a<r&&(o*=256);)this[t+a]=e/o&255;return t+r},s.prototype.writeUIntBE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){var i=Math.pow(2,8*r)-1;w(this,e,t,r,i,0)}var o=r-1,a=1;for(this[t+o]=255&e;--o>=0&&(a*=256);)this[t+o]=e/a&255;return t+r},s.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||w(this,e,t,1,255,0),this[t]=255&e,t+1},s.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||w(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||w(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||w(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},s.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||w(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);w(this,e,t,r,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o<r&&(a*=256);)e<0&&0===s&&0!==this[t+o-1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+r},s.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);w(this,e,t,r,i-1,-i)}var o=r-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+r},s.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||w(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},s.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||w(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||w(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||w(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},s.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||w(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeFloatLE=function(e,t,r){return O(this,e,t,!0,r)},s.prototype.writeFloatBE=function(e,t,r){return O(this,e,t,!1,r)},s.prototype.writeDoubleLE=function(e,t,r){return k(this,e,t,!0,r)},s.prototype.writeDoubleBE=function(e,t,r){return k(this,e,t,!1,r)},s.prototype.copy=function(e,t,r,n){if(!s.isBuffer(e))throw TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r||0===e.length||0===this.length)return 0;if(t<0)throw RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw RangeError("Index out of range");if(n<0)throw RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);var i=n-r;if(this===e&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(t,r,n);else if(this===e&&r<t&&t<n)for(var o=i-1;o>=0;--o)e[o+t]=this[o+r];else Uint8Array.prototype.set.call(e,this.subarray(r,n),t);return i},s.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw TypeError("encoding must be a string");if("string"==typeof n&&!s.isEncoding(n))throw TypeError("Unknown encoding: "+n);if(1===e.length){var i,o=e.charCodeAt(0);("utf8"===n&&o<128||"latin1"===n)&&(e=o)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw RangeError("Out of range index");if(r<=t)return this;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i<r;++i)this[i]=e;else{var a=s.isBuffer(e)?e:s.from(e,n),l=a.length;
57if(0===l)throw TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<r-t;++i)this[i+t]=a[i%l]}return this};var j=/[^+/0-9A-Za-z-_]/g;function S(e,t){t=t||1/0;for(var r,n=e.length,i=null,o=[],a=0;a<n;++a){if((r=e.charCodeAt(a))>55295&&r<57344){if(!i){if(r>56319||a+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else if(r<1114112){if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}else throw Error("Invalid code point")}return o}function _(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}function E(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(j,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function A(e,t,r,n){for(var i=0;i<n&&!(i+r>=t.length)&&!(i>=e.length);++i)t[i+r]=e[i];return i}function P(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}var T=function(){for(var e="0123456789abcdef",t=Array(256),r=0;r<16;++r)for(var n=16*r,i=0;i<16;++i)t[n+i]=e[r]+e[i];return t}()},783:function(e,t){/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */t.read=function(e,t,r,n,i){var o,a,s=8*i-n-1,l=(1<<s)-1,c=l>>1,u=-7,h=r?i-1:0,f=r?-1:1,d=e[t+h];for(h+=f,o=d&(1<<-u)-1,d>>=-u,u+=s;u>0;o=256*o+e[t+h],h+=f,u-=8);for(a=o&(1<<-u)-1,o>>=-u,u+=n;u>0;a=256*a+e[t+h],h+=f,u-=8);if(0===o)o=1-c;else{if(o===l)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,n),o-=c}return(d?-1:1)*a*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var a,s,l,c=8*o-i-1,u=(1<<c)-1,h=u>>1,f=23===i?5960464477539062e-23:0,d=n?0:o-1,p=n?1:-1,y=t<0||0===t&&1/t<0?1:0;for(isNaN(t=Math.abs(t))||t===1/0?(s=isNaN(t)?1:0,a=u):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),a+h>=1?t+=f/l:t+=f*Math.pow(2,1-h),t*l>=2&&(a++,l/=2),a+h>=u?(s=0,a=u):a+h>=1?(s=(t*l-1)*Math.pow(2,i),a+=h):(s=t*Math.pow(2,h-1)*Math.pow(2,i),a=0));i>=8;e[r+d]=255&s,d+=p,s/=256,i-=8);for(a=a<<i|s,c+=i;c>0;e[r+d]=255&a,d+=p,a/=256,c-=8);e[r+d-p]|=128*y}}},r={};function n(e){var i=r[e];if(void 0!==i)return i.exports;var o=r[e]={exports:{}},a=!0;try{t[e](o,o.exports,n),a=!1}finally{a&&delete r[e]}return o.exports}n.ab="//";var i=n(72);e.exports=i}()},88081:function(e){!function(){var t={229:function(e){var t,r,n,i=e.exports={};function o(){throw Error("setTimeout has not been defined")}function a(){throw Error("clearTimeout has not been defined")}function s(e){if(t===setTimeout)return setTimeout(e,0);if((t===o||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:o}catch(e){t=o}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var l=[],c=!1,u=-1;function h(){c&&n&&(c=!1,n.length?l=n.concat(l):u=-1,l.length&&f())}function f(){if(!c){var e=s(h);c=!0;for(var t=l.length;t;){for(n=l,l=[];++u<t;)n&&n[u].run();u=-1,t=l.length}n=null,c=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function d(e,t){this.fun=e,this.array=t}function p(){}i.nextTick=function(e){var t=Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];l.push(new d(e,t)),1!==l.length||c||s(f)},d.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=p,i.addListener=p,i.once=p,i.off=p,i.removeListener=p,i.removeAllListeners=p,i.emit=p,i.prependListener=p,i.prependOnceListener=p,i.listeners=function(e){return[]},i.binding=function(e){throw Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw Error("process.chdir is not supported")},i.umask=function(){return 0}}},r={};function n(e){var i=r[e];if(void 0!==i)return i.exports;var o=r[e]={exports:{}},a=!0;try{t[e](o,o.exports,n),a=!1}finally{a&&delete r[e]}return o.exports}n.ab="//";var i=n(229);e.exports=i}()},81943:function(e,t){"use strict";
57Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"escapeStringRegexp",{enumerable:!0,get:function(){return i}});let r=/[|\\{}()[\]^$+*?.-]/,n=/[|\\{}()[\]^$+*?.-]/g;function i(e){return r.test(e)?e.replace(n,"\\$&"):e}},60291:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"RouterContext",{enumerable:!0,get:function(){return n}});let n=r(99920)._(r(2265)).default.createContext(null)},41142:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{formatUrl:function(){return o},formatWithValidation:function(){return s},urlObjectKeys:function(){return a}});let n=r(41452)._(r(18323)),i=/https?|ftp|gopher|file/;function o(e){let{auth:t,hostname:r}=e,o=e.protocol||"",a=e.pathname||"",s=e.hash||"",l=e.query||"",c=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?c=t+e.host:r&&(c=t+(~r.indexOf(":")?"["+r+"]":r),e.port&&(c+=":"+e.port)),l&&"object"==typeof l&&(l=String(n.urlQueryToSearchParams(l)));let u=e.search||l&&"?"+l||"";return o&&!o.endsWith(":")&&(o+=":"),e.slashes||(!o||i.test(o))&&!1!==c?(c="//"+(c||""),a&&"/"!==a[0]&&(a="/"+a)):c||(c=""),s&&"#"!==s[0]&&(s="#"+s),u&&"?"!==u[0]&&(u="?"+u),""+o+c+(a=a.replace(/[?#]/g,encodeURIComponent))+(u=u.replace("#","%23"))+s}let a=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function s(e){return o(e)}},59195:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{getSortedRoutes:function(){return n.getSortedRoutes},isDynamicRoute:function(){return i.isDynamicRoute}});let n=r(49089),i=r(28083)},80020:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"interpolateAs",{enumerable:!0,get:function(){return o}});let n=r(41533),i=r(63169);function o(e,t,r){let o="",a=(0,i.getRouteRegex)(e),s=a.groups,l=(t!==e?(0,n.getRouteMatcher)(a)(t):"")||r;o=e;let c=Object.keys(s);return c.every(e=>{let t=l[e]||"",{repeat:r,optional:n}=s[e],i="["+(r?"...":"")+e+"]";return n&&(i=(t?"":"/")+"["+i+"]"),r&&!Array.isArray(t)&&(t=[t]),(n||e in l)&&(o=o.replace(i,r?t.map(e=>encodeURIComponent(e)).join("/"):encodeURIComponent(t))||"/")})||(o=""),{params:c,result:o}}},28083:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isDynamicRoute",{enumerable:!0,get:function(){return o}});let n=r(82269),i=/\/\[[^/]+?\](?=\/|$)/;function o(e){return(0,n.isInterceptionRouteAppPath)(e)&&(e=(0,n.extractInterceptionRouteInformation)(e).interceptedRoute),i.test(e)}},18029:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isLocalURL",{enumerable:!0,get:function(){return o}});let n=r(43461),i=r(49404);function o(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,i.hasBasePath)(r.pathname)}catch(e){return!1}}},45519:function(e,t){"use strict";function r(e,t){let r={};return Object.keys(e).forEach(n=>{t.includes(n)||(r[n]=e[n])}),r}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"omit",{enumerable:!0,get:function(){return r}})},18323:function(e,t){"use strict";function r(e){let t={};return e.forEach((e,r)=>{void 0===t[r]?t[r]=e:Array.isArray(t[r])?t[r].push(e):t[r]=[t[r],e]}),t}function n(e){return"string"!=typeof e&&("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function i(e){let t=new URLSearchParams;return Object.entries(e).forEach(e=>{let[r,i]=e;Array.isArray(i)?i.forEach(e=>t.append(r,n(e))):t.set(r,n(i))}),t}function o(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return r.forEach(t=>{Array.from(t.keys()).forEach(t=>e.delete(t)),t.forEach((t,r)=>e.append(r,t))}),e}Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{assign:function(){return o},searchParamsToUrlQuery:function(){return r},urlQueryToSearchParams:function(){return i}})},41533:function(e,t,r){"use strict";
57Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getRouteMatcher",{enumerable:!0,get:function(){return i}});let n=r(43461);function i(e){let{re:t,groups:r}=e;return e=>{let i=t.exec(e);if(!i)return!1;let o=e=>{try{return decodeURIComponent(e)}catch(e){throw new n.DecodeError("failed to decode param")}},a={};return Object.keys(r).forEach(e=>{let t=r[e],n=i[t.pos];void 0!==n&&(a[e]=~n.indexOf("/")?n.split("/").map(e=>o(e)):t.repeat?[o(n)]:o(n))}),a}}},63169:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{getNamedMiddlewareRegex:function(){return f},getNamedRouteRegex:function(){return h},getRouteRegex:function(){return l}});let n=r(82269),i=r(81943),o=r(67741);function a(e){let t=e.startsWith("[")&&e.endsWith("]");t&&(e=e.slice(1,-1));let r=e.startsWith("...");return r&&(e=e.slice(3)),{key:e,repeat:r,optional:t}}function s(e){let t=(0,o.removeTrailingSlash)(e).slice(1).split("/"),r={},s=1;return{parameterizedRoute:t.map(e=>{let t=n.INTERCEPTION_ROUTE_MARKERS.find(t=>e.startsWith(t)),o=e.match(/\[((?:\[.*\])|.+)\]/);if(t&&o){let{key:e,optional:n,repeat:l}=a(o[1]);return r[e]={pos:s++,repeat:l,optional:n},"/"+(0,i.escapeStringRegexp)(t)+"([^/]+?)"}if(!o)return"/"+(0,i.escapeStringRegexp)(e);{let{key:e,repeat:t,optional:n}=a(o[1]);return r[e]={pos:s++,repeat:t,optional:n},t?n?"(?:/(.+?))?":"/(.+?)":"/([^/]+?)"}}).join(""),groups:r}}function l(e){let{parameterizedRoute:t,groups:r}=s(e);return{re:RegExp("^"+t+"(?:/)?$"),groups:r}}function c(e){let{interceptionMarker:t,getSafeRouteKey:r,segment:n,routeKeys:o,keyPrefix:s}=e,{key:l,optional:c,repeat:u}=a(n),h=l.replace(/\W/g,"");s&&(h=""+s+h);let f=!1;(0===h.length||h.length>30)&&(f=!0),isNaN(parseInt(h.slice(0,1)))||(f=!0),f&&(h=r()),s?o[h]=""+s+l:o[h]=l;let d=t?(0,i.escapeStringRegexp)(t):"";return u?c?"(?:/"+d+"(?<"+h+">.+?))?":"/"+d+"(?<"+h+">.+?)":"/"+d+"(?<"+h+">[^/]+?)"}function u(e,t){let r;let a=(0,o.removeTrailingSlash)(e).slice(1).split("/"),s=(r=0,()=>{let e="",t=++r;for(;t>0;)e+=String.fromCharCode(97+(t-1)%26),t=Math.floor((t-1)/26);return e}),l={};return{namedParameterizedRoute:a.map(e=>{let r=n.INTERCEPTION_ROUTE_MARKERS.some(t=>e.startsWith(t)),o=e.match(/\[((?:\[.*\])|.+)\]/);if(r&&o){let[r]=e.split(o[0]);return c({getSafeRouteKey:s,interceptionMarker:r,segment:o[1],routeKeys:l,keyPrefix:t?"nxtI":void 0})}return o?c({getSafeRouteKey:s,segment:o[1],routeKeys:l,keyPrefix:t?"nxtP":void 0}):"/"+(0,i.escapeStringRegexp)(e)}).join(""),routeKeys:l}}function h(e,t){let r=u(e,t);return{...l(e),namedRegex:"^"+r.namedParameterizedRoute+"(?:/)?$",routeKeys:r.routeKeys}}function f(e,t){let{parameterizedRoute:r}=s(e),{catchAll:n=!0}=t;if("/"===r)return{namedRegex:"^/"+(n?".*":"")+"$"};let{namedParameterizedRoute:i}=u(e,!1);return{namedRegex:"^"+i+(n?"(?:(/.*)?)":"")+"$"}}},49089:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getSortedRoutes",{enumerable:!0,get:function(){return n}});class r{insert(e){this._insert(e.split("/").filter(Boolean),[],!1)}smoosh(){return this._smoosh()}_smoosh(e){void 0===e&&(e="/");let t=[...this.children.keys()].sort();null!==this.slugName&&t.splice(t.indexOf("[]"),1),null!==this.restSlugName&&t.splice(t.indexOf("[...]"),1),null!==this.optionalRestSlugName&&t.splice(t.indexOf("[[...]]"),1);let r=t.map(t=>this.children.get(t)._smoosh(""+e+t+"/")).reduce((e,t)=>[...e,...t],[]);if(null!==this.slugName&&r.push(...this.children.get("[]")._smoosh(e+"["+this.slugName+"]/")),!this.placeholder){let t="/"===e?"/":e.slice(0,-1);if(null!=this.optionalRestSlugName)throw Error('You cannot define a route with the same specificity as a optional catch-all route ("'+t+'" and "'+t+"[[..."+this.optionalRestSlugName+']]").');r.unshift(t)}return null!==this.restSlugName&&r.push(...this.children.get("[...]")._smoosh(e+"[..."+this.restSlugName+"]/")),null!==this.optionalRestSlugName&&r.push(...this.children.get("[[...]]")._smoosh(e+"[[..."+this.optionalRestSlugName+"]]/")),r}_insert(e,t,n){if(0===e.length){this.placeholder=!1;return}if(n)throw Error("Catch-all must be the last part of the URL.");let i=e[0];if(i.startsWith("[")&&i.endsWith("]")){let r=i.slice(1,-1),a=!1;if(r.startsWith("[")&&r.endsWith("]")&&(r=r.slice(1,-1),a=!0),r.startsWith("...")&&(r=r.substring(3),n=!0),r.startsWith("[")||r.endsWith("]"))throw Error("Segment names may not start or end with extra brackets ('"+r+"').");if(r.startsWith("."))throw Error("Segment names may not start with erroneous periods ('"+r+"').");function o(e,r){if(null!==e&&e!==r)throw Error("You cannot use different slug names for the same dynamic path ('"+e+"' !== '"+r+"').");
57t.forEach(e=>{if(e===r)throw Error('You cannot have the same slug name "'+r+'" repeat within a single dynamic path');if(e.replace(/\W/g,"")===i.replace(/\W/g,""))throw Error('You cannot have the slug names "'+e+'" and "'+r+'" differ only by non-word symbols within a single dynamic path')}),t.push(r)}if(n){if(a){if(null!=this.restSlugName)throw Error('You cannot use both an required and optional catch-all route at the same level ("[...'+this.restSlugName+']" and "'+e[0]+'" ).');o(this.optionalRestSlugName,r),this.optionalRestSlugName=r,i="[[...]]"}else{if(null!=this.optionalRestSlugName)throw Error('You cannot use both an optional and required catch-all route at the same level ("[[...'+this.optionalRestSlugName+']]" and "'+e[0]+'").');o(this.restSlugName,r),this.restSlugName=r,i="[...]"}}else{if(a)throw Error('Optional route parameters are not yet supported ("'+e[0]+'").');o(this.slugName,r),this.slugName=r,i="[]"}}this.children.has(i)||this.children.set(i,new r),this.children.get(i)._insert(e.slice(1),t,n)}constructor(){this.placeholder=!0,this.children=new Map,this.slugName=null,this.restSlugName=null,this.optionalRestSlugName=null}}function n(e){let t=new r;return e.forEach(e=>t.insert(e)),t.smoosh()}},43461:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{DecodeError:function(){return p},MiddlewareNotFoundError:function(){return v},MissingStaticPage:function(){return g},NormalizeError:function(){return y},PageNotFoundError:function(){return m},SP:function(){return f},ST:function(){return d},WEB_VITALS:function(){return r},execOnce:function(){return n},getDisplayName:function(){return l},getLocationOrigin:function(){return a},getURL:function(){return s},isAbsoluteUrl:function(){return o},isResSent:function(){return c},loadGetInitialProps:function(){return h},normalizeRepeatedSlashes:function(){return u},stringifyError:function(){return b}});let r=["CLS","FCP","FID","INP","LCP","TTFB"];function n(e){let t,r=!1;return function(){for(var n=arguments.length,i=Array(n),o=0;o<n;o++)i[o]=arguments[o];return r||(r=!0,t=e(...i)),t}}let i=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,o=e=>i.test(e);function a(){let{protocol:e,hostname:t,port:r}=window.location;return e+"//"+t+(r?":"+r:"")}function s(){let{href:e}=window.location,t=a();return e.substring(t.length)}function l(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function c(e){return e.finished||e.headersSent}function u(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?"?"+t.slice(1).join("?"):"")}async function h(e,t){let r=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await h(t.Component,t.ctx)}:{};let n=await e.getInitialProps(t);if(r&&c(r))return n;if(!n)throw Error('"'+l(e)+'.getInitialProps()" should resolve to an object. But found "'+n+'" instead.');return n}let f="undefined"!=typeof performance,d=f&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);
57class p extends Error{}class y extends Error{}class m extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message="Cannot find module for page: "+e}}class g extends Error{constructor(e,t){super(),this.message="Failed to load static file for page: "+e+" "+t}}class v extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function b(e){return JSON.stringify({message:e.message,stack:e.stack})}},99949:function(e,t,r){"use strict";var n=r(88877);function i(){}function o(){}o.resetWarningCache=i,e.exports=function(){function e(e,t,r,i,o,a){if(a!==n){var s=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:i}
57;return r.PropTypes=r,r}},41448:function(e,t,r){e.exports=r(99949)()},88877:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},74332:function(e,t){"use strict";/**
58 * @license React
59 * react-is.production.min.js
60 *
61 * Copyright (c) Facebook, Inc. and its affiliates.
62 *
63 * This source code is licensed under the MIT license found in the
64 * LICENSE file in the root directory of this source tree.
65 */var r=Symbol.for("react.element"),n=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),l=Symbol.for("react.context"),c=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),p=Symbol.for("react.lazy");Symbol.for("react.offscreen"),Symbol.for("react.module.reference"),t.isFragment=function(e){return function(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case i:case a:case o:case h:case f:return e;default:switch(e=e&&e.$$typeof){case c:case l:case u:case p:case d:case s:return e;default:return t}}case n:return t}}}(e)===i}},12659:function(e,t,r){"use strict";e.exports=r(74332)}}]);

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