react-d3-speedometer
Advanced tools
Comparing version 2.0.0-rc.3 to 2.1.0-rc.0
@@ -76,2 +76,4 @@ declare module 'react-d3-speedometer' { | ||
valueFormat?: string | ||
segmentValueFormatter?: (value: string) => string | ||
currentValueText?: string | ||
@@ -78,0 +80,0 @@ currentValuePlaceholderStyle?: string |
@@ -1,101 +0,493 @@ | ||
var __defProp = Object.defineProperty; | ||
var __getOwnPropSymbols = Object.getOwnPropertySymbols; | ||
var __hasOwnProp = Object.prototype.hasOwnProperty; | ||
var __propIsEnum = Object.prototype.propertyIsEnumerable; | ||
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; | ||
var __spreadValues = (a2, b2) => { | ||
for (var prop in b2 || (b2 = {})) | ||
if (__hasOwnProp.call(b2, prop)) | ||
__defNormalProp(a2, prop, b2[prop]); | ||
if (__getOwnPropSymbols) | ||
for (var prop of __getOwnPropSymbols(b2)) { | ||
if (__propIsEnum.call(b2, prop)) | ||
__defNormalProp(a2, prop, b2[prop]); | ||
} | ||
return a2; | ||
}; | ||
var __publicField = (obj, key, value) => { | ||
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value); | ||
return value; | ||
}; | ||
import e, { PureComponent as t } from "react"; | ||
import { format as n } from "d3-format"; | ||
import { select as r } from "d3-selection"; | ||
import { scaleLinear as a, scaleQuantize as o } from "d3-scale"; | ||
import { interpolateHsl as i } from "d3-interpolate"; | ||
import { rgb as s } from "d3-color"; | ||
import { arc as u, line as l, curveMonotoneX as c } from "d3-shape"; | ||
import { transition as d } from "d3-transition"; | ||
import { easeQuadInOut as g, easeElastic as p, easeElasticInOut as f, easeElasticOut as m, easeElasticIn as h, easeBackInOut as b, easeBackOut as v, easeBackIn as y, easeBounceInOut as x, easeBounceOut as O, easeBounceIn as S, easeCircleInOut as I, easeCircleOut as j, easeCircleIn as T, easeExpInOut as C, easeExpOut as R, easeExpIn as w, easeSinInOut as A, easeSinOut as E, easeSinIn as _, easePolyInOut as V, easePolyOut as F, easePolyIn as P, easeCubicInOut as $, easeCubicOut as k, easeCubicIn as q, easeQuadOut as L, easeQuadIn as D, easeLinear as W } from "d3-ease"; | ||
import { range as B } from "d3-array"; | ||
var z = { exports: {} }; | ||
function U() { | ||
var ur = Object.defineProperty; | ||
var cr = (e, t, r) => t in e ? ur(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r; | ||
var $e = (e, t, r) => (cr(e, typeof t != "symbol" ? t + "" : t, r), r); | ||
import zt, { PureComponent as lr } from "react"; | ||
import { format as it } from "d3-format"; | ||
import { select as qt } from "d3-selection"; | ||
import { scaleLinear as fr, scaleQuantize as pr } from "d3-scale"; | ||
import { interpolateHsl as dr } from "d3-interpolate"; | ||
import { rgb as st } from "d3-color"; | ||
import { arc as yr, line as mr, curveMonotoneX as gr } from "d3-shape"; | ||
import { transition as br } from "d3-transition"; | ||
import { easeQuadInOut as ut, easeElastic as vr, easeElasticInOut as hr, easeElasticOut as xr, easeElasticIn as Or, easeBackInOut as Sr, easeBackOut as jr, easeBackIn as wr, easeBounceInOut as Ir, easeBounceOut as Er, easeBounceIn as _r, easeCircleInOut as Tr, easeCircleOut as Cr, easeCircleIn as Rr, easeExpInOut as $r, easeExpOut as kr, easeExpIn as Pr, easeSinInOut as Fr, easeSinOut as Ar, easeSinIn as Vr, easePolyInOut as Nr, easePolyOut as Dr, easePolyIn as Lr, easeCubicInOut as Wr, easeCubicOut as zr, easeCubicIn as qr, easeQuadOut as Mr, easeQuadIn as Br, easeLinear as Ur } from "d3-ease"; | ||
import { range as Hr } from "d3-array"; | ||
var ct, $ = { exports: {} }, lt = { exports: {} }, q = {}, ft, pt, ke, dt, yt, mt, gt, bt, vt, ht, Pe, xt, Ot, St, U = {}; | ||
/** @license React v16.13.1 | ||
* react-is.development.js | ||
* | ||
* Copyright (c) Facebook, Inc. and its affiliates. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
function jt() { | ||
return pt || (pt = 1, ((e) => { | ||
process.env.NODE_ENV === "production" ? e.exports = function() { | ||
if (ct) | ||
return q; | ||
ct = 1; | ||
var t = typeof Symbol == "function" && Symbol.for, r = t ? Symbol.for("react.element") : 60103, a = t ? Symbol.for("react.portal") : 60106, u = t ? Symbol.for("react.fragment") : 60107, i = t ? Symbol.for("react.strict_mode") : 60108, c = t ? Symbol.for("react.profiler") : 60114, l = t ? Symbol.for("react.provider") : 60109, d = t ? Symbol.for("react.context") : 60110, I = t ? Symbol.for("react.async_mode") : 60111, V = t ? Symbol.for("react.concurrent_mode") : 60111, m = t ? Symbol.for("react.forward_ref") : 60112, T = t ? Symbol.for("react.suspense") : 60113, b = t ? Symbol.for("react.suspense_list") : 60120, h = t ? Symbol.for("react.memo") : 60115, E = t ? Symbol.for("react.lazy") : 60116, w = t ? Symbol.for("react.block") : 60121, Q = t ? Symbol.for("react.fundamental") : 60117, F = t ? Symbol.for("react.responder") : 60118, Z = t ? Symbol.for("react.scope") : 60119; | ||
function x(o) { | ||
if (typeof o == "object" && o !== null) { | ||
var v = o.$$typeof; | ||
switch (v) { | ||
case r: | ||
switch (o = o.type) { | ||
case I: | ||
case V: | ||
case u: | ||
case c: | ||
case i: | ||
case T: | ||
return o; | ||
default: | ||
switch (o = o && o.$$typeof) { | ||
case d: | ||
case m: | ||
case E: | ||
case h: | ||
case l: | ||
return o; | ||
default: | ||
return v; | ||
} | ||
} | ||
case a: | ||
return v; | ||
} | ||
} | ||
} | ||
function s(o) { | ||
return x(o) === V; | ||
} | ||
return q.AsyncMode = I, q.ConcurrentMode = V, q.ContextConsumer = d, q.ContextProvider = l, q.Element = r, q.ForwardRef = m, q.Fragment = u, q.Lazy = E, q.Memo = h, q.Portal = a, q.Profiler = c, q.StrictMode = i, q.Suspense = T, q.isAsyncMode = (o) => s(o) || x(o) === I, q.isConcurrentMode = s, q.isContextConsumer = (o) => x(o) === d, q.isContextProvider = (o) => x(o) === l, q.isElement = (o) => typeof o == "object" && o !== null && o.$$typeof === r, q.isForwardRef = (o) => x(o) === m, q.isFragment = (o) => x(o) === u, q.isLazy = (o) => x(o) === E, q.isMemo = (o) => x(o) === h, q.isPortal = (o) => x(o) === a, q.isProfiler = (o) => x(o) === c, q.isStrictMode = (o) => x(o) === i, q.isSuspense = (o) => x(o) === T, q.isValidElementType = (o) => typeof o == "string" || typeof o == "function" || o === u || o === V || o === c || o === i || o === T || o === b || typeof o == "object" && o !== null && (o.$$typeof === E || o.$$typeof === h || o.$$typeof === l || o.$$typeof === d || o.$$typeof === m || o.$$typeof === Q || o.$$typeof === F || o.$$typeof === Z || o.$$typeof === w), q.typeOf = x, q; | ||
}() : e.exports = (ft || (ft = 1, process.env.NODE_ENV !== "production" && (() => { | ||
var t = typeof Symbol == "function" && Symbol.for, r = t ? Symbol.for("react.element") : 60103, a = t ? Symbol.for("react.portal") : 60106, u = t ? Symbol.for("react.fragment") : 60107, i = t ? Symbol.for("react.strict_mode") : 60108, c = t ? Symbol.for("react.profiler") : 60114, l = t ? Symbol.for("react.provider") : 60109, d = t ? Symbol.for("react.context") : 60110, I = t ? Symbol.for("react.async_mode") : 60111, V = t ? Symbol.for("react.concurrent_mode") : 60111, m = t ? Symbol.for("react.forward_ref") : 60112, T = t ? Symbol.for("react.suspense") : 60113, b = t ? Symbol.for("react.suspense_list") : 60120, h = t ? Symbol.for("react.memo") : 60115, E = t ? Symbol.for("react.lazy") : 60116, w = t ? Symbol.for("react.block") : 60121, Q = t ? Symbol.for("react.fundamental") : 60117, F = t ? Symbol.for("react.responder") : 60118, Z = t ? Symbol.for("react.scope") : 60119; | ||
function x(p) { | ||
if (typeof p == "object" && p !== null) { | ||
var ce = p.$$typeof; | ||
switch (ce) { | ||
case r: | ||
var ne = p.type; | ||
switch (ne) { | ||
case I: | ||
case V: | ||
case u: | ||
case c: | ||
case i: | ||
case T: | ||
return ne; | ||
default: | ||
var ae = ne && ne.$$typeof; | ||
switch (ae) { | ||
case d: | ||
case m: | ||
case E: | ||
case h: | ||
case l: | ||
return ae; | ||
default: | ||
return ce; | ||
} | ||
} | ||
case a: | ||
return ce; | ||
} | ||
} | ||
} | ||
var s = I, o = V, v = d, g = l, S = r, O = m, k = u, j = E, C = h, N = a, P = c, X = i, ee = T, te = !1; | ||
function re(p) { | ||
return x(p) === V; | ||
} | ||
U.AsyncMode = s, U.ConcurrentMode = o, U.ContextConsumer = v, U.ContextProvider = g, U.Element = S, U.ForwardRef = O, U.Fragment = k, U.Lazy = j, U.Memo = C, U.Portal = N, U.Profiler = P, U.StrictMode = X, U.Suspense = ee, U.isAsyncMode = (p) => (te || (te = !0), re(p) || x(p) === I), U.isConcurrentMode = re, U.isContextConsumer = (p) => x(p) === d, U.isContextProvider = (p) => x(p) === l, U.isElement = (p) => typeof p == "object" && p !== null && p.$$typeof === r, U.isForwardRef = (p) => x(p) === m, U.isFragment = (p) => x(p) === u, U.isLazy = (p) => x(p) === E, U.isMemo = (p) => x(p) === h, U.isPortal = (p) => x(p) === a, U.isProfiler = (p) => x(p) === c, U.isStrictMode = (p) => x(p) === i, U.isSuspense = (p) => x(p) === T, U.isValidElementType = (p) => typeof p == "string" || typeof p == "function" || p === u || p === V || p === c || p === i || p === T || p === b || typeof p == "object" && p !== null && (p.$$typeof === E || p.$$typeof === h || p.$$typeof === l || p.$$typeof === d || p.$$typeof === m || p.$$typeof === Q || p.$$typeof === F || p.$$typeof === Z || p.$$typeof === w), U.typeOf = x; | ||
})()), U); | ||
})(lt)), lt.exports; | ||
} | ||
function N() { | ||
/* | ||
object-assign | ||
(c) Sindre Sorhus | ||
@license MIT | ||
*/ | ||
function Fe() { | ||
return mt ? yt : (mt = 1, yt = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"); | ||
} | ||
N.resetWarningCache = U; | ||
z.exports = (() => { | ||
function e2(e3, t3, n3, r2, a2, o2) { | ||
if (o2 !== "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED") { | ||
var i2 = new 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 i2.name = "Invariant Violation", i2; | ||
function wt() { | ||
return bt ? gt : (bt = 1, gt = Function.call.bind(Object.prototype.hasOwnProperty)); | ||
} | ||
if (process.env.NODE_ENV !== "production") { | ||
var Qr = jt(); | ||
$.exports = function() { | ||
if (xt) | ||
return Pe; | ||
xt = 1; | ||
var e = jt(), t = (() => { | ||
if (dt) | ||
return ke; | ||
dt = 1; | ||
var l = Object.getOwnPropertySymbols, d = Object.prototype.hasOwnProperty, I = Object.prototype.propertyIsEnumerable; | ||
function V(m) { | ||
if (m == null) | ||
throw new TypeError("Object.assign cannot be called with null or undefined"); | ||
return Object(m); | ||
} | ||
return ke = (() => { | ||
try { | ||
if (!Object.assign) | ||
return !1; | ||
var m = new String("abc"); | ||
if (m[5] = "de", Object.getOwnPropertyNames(m)[0] === "5") | ||
return !1; | ||
for (var T = {}, b = 0; b < 10; b++) | ||
T["_" + String.fromCharCode(b)] = b; | ||
if (Object.getOwnPropertyNames(T).map((E) => T[E]).join("") !== "0123456789") | ||
return !1; | ||
var h = {}; | ||
return "abcdefghijklmnopqrst".split("").forEach((E) => { | ||
h[E] = E; | ||
}), Object.keys(Object.assign({}, h)).join("") === "abcdefghijklmnopqrst"; | ||
} catch { | ||
return !1; | ||
} | ||
})() ? Object.assign : function(m, T) { | ||
for (var b, h, E = V(m), w = 1; w < arguments.length; w++) { | ||
for (var Q in b = Object(arguments[w])) | ||
d.call(b, Q) && (E[Q] = b[Q]); | ||
if (l) { | ||
h = l(b); | ||
for (var F = 0; F < h.length; F++) | ||
I.call(b, h[F]) && (E[h[F]] = b[h[F]]); | ||
} | ||
} | ||
return E; | ||
}, ke; | ||
})(), r = Fe(), a = wt(), u = (() => { | ||
if (ht) | ||
return vt; | ||
ht = 1; | ||
var l = () => { | ||
}; | ||
if (process.env.NODE_ENV !== "production") { | ||
var d = Fe(), I = {}, V = wt(); | ||
l = (T) => { | ||
var b = "Warning: " + T; | ||
try { | ||
throw new Error(b); | ||
} catch { | ||
} | ||
}; | ||
} | ||
function m(T, b, h, E, w) { | ||
if (process.env.NODE_ENV !== "production") { | ||
for (var Q in T) | ||
if (V(T, Q)) { | ||
var F; | ||
try { | ||
if (typeof T[Q] != "function") { | ||
var Z = Error((E || "React class") + ": " + h + " type `" + Q + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof T[Q] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."); | ||
throw Z.name = "Invariant Violation", Z; | ||
} | ||
F = T[Q](b, Q, E, h, null, d); | ||
} catch (s) { | ||
F = s; | ||
} | ||
if (!F || F instanceof Error || l((E || "React class") + ": type specification of " + h + " `" + Q + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof F + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."), F instanceof Error && !(F.message in I)) { | ||
I[F.message] = !0; | ||
var x = w ? w() : ""; | ||
l("Failed " + h + " type: " + F.message + (x != null ? x : "")); | ||
} | ||
} | ||
} | ||
} | ||
return m.resetWarningCache = () => { | ||
process.env.NODE_ENV !== "production" && (I = {}); | ||
}, vt = m; | ||
})(), i = () => { | ||
}; | ||
function c() { | ||
return null; | ||
} | ||
} | ||
function t2() { | ||
return e2; | ||
} | ||
e2.isRequired = e2; | ||
var n2 = { array: e2, bigint: e2, bool: e2, func: e2, number: e2, object: e2, string: e2, symbol: e2, any: e2, arrayOf: t2, element: e2, elementType: e2, instanceOf: t2, node: e2, objectOf: t2, oneOf: t2, oneOfType: t2, shape: t2, exact: t2, checkPropTypes: N, resetWarningCache: U }; | ||
return n2.PropTypes = n2, n2; | ||
})(); | ||
var H = z.exports, M = typeof global == "object" && global && global.Object === Object && global, Q = typeof self == "object" && self && self.Object === Object && self, G = M || Q || Function("return this")(), Y = G.Symbol, J = Object.prototype, K = J.hasOwnProperty, X = J.toString, Z = Y ? Y.toStringTag : void 0; | ||
var ee = Object.prototype.toString; | ||
var te = Y ? Y.toStringTag : void 0; | ||
function ne(e2) { | ||
return e2 == null ? e2 === void 0 ? "[object Undefined]" : "[object Null]" : te && te in Object(e2) ? function(e3) { | ||
var t2 = K.call(e3, Z), n2 = e3[Z]; | ||
return process.env.NODE_ENV !== "production" && (i = (l) => { | ||
var d = "Warning: " + l; | ||
try { | ||
throw new Error(d); | ||
} catch { | ||
} | ||
}), Pe = function(l, d) { | ||
var I = typeof Symbol == "function" && Symbol.iterator, V = "<<anonymous>>", m = { array: E("array"), bigint: E("bigint"), bool: E("boolean"), func: E("function"), number: E("number"), object: E("object"), string: E("string"), symbol: E("symbol"), any: h(c), arrayOf: (s) => h((o, v, g, S, O) => { | ||
if (typeof s != "function") | ||
return new b("Property `" + O + "` of component `" + g + "` has invalid PropType notation inside arrayOf."); | ||
var k = o[v]; | ||
if (!Array.isArray(k)) | ||
return new b("Invalid " + S + " `" + O + "` of type `" + F(k) + "` supplied to `" + g + "`, expected an array."); | ||
for (var j = 0; j < k.length; j++) { | ||
var C = s(k, j, g, S, O + "[" + j + "]", r); | ||
if (C instanceof Error) | ||
return C; | ||
} | ||
return null; | ||
}), element: h((s, o, v, g, S) => { | ||
var O = s[o]; | ||
return l(O) ? null : new b("Invalid " + g + " `" + S + "` of type `" + F(O) + "` supplied to `" + v + "`, expected a single ReactElement."); | ||
}), elementType: h((s, o, v, g, S) => { | ||
var O = s[o]; | ||
return e.isValidElementType(O) ? null : new b("Invalid " + g + " `" + S + "` of type `" + F(O) + "` supplied to `" + v + "`, expected a single ReactElement type."); | ||
}), instanceOf: (s) => h((o, v, g, S, O) => { | ||
if (!(o[v] instanceof s)) { | ||
var k = s.name || V; | ||
return new b("Invalid " + S + " `" + O + "` of type `" + ((j = o[v]).constructor && j.constructor.name ? j.constructor.name : V) + "` supplied to `" + g + "`, expected instance of `" + k + "`."); | ||
} | ||
var j; | ||
return null; | ||
}), node: h((s, o, v, g, S) => Q(s[o]) ? null : new b("Invalid " + g + " `" + S + "` supplied to `" + v + "`, expected a ReactNode.")), objectOf: (s) => h((o, v, g, S, O) => { | ||
if (typeof s != "function") | ||
return new b("Property `" + O + "` of component `" + g + "` has invalid PropType notation inside objectOf."); | ||
var k = o[v], j = F(k); | ||
if (j !== "object") | ||
return new b("Invalid " + S + " `" + O + "` of type `" + j + "` supplied to `" + g + "`, expected an object."); | ||
for (var C in k) | ||
if (a(k, C)) { | ||
var N = s(k, C, g, S, O + "." + C, r); | ||
if (N instanceof Error) | ||
return N; | ||
} | ||
return null; | ||
}), oneOf: function(s) { | ||
if (!Array.isArray(s)) | ||
return process.env.NODE_ENV !== "production" && i(arguments.length > 1 ? "Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])." : "Invalid argument supplied to oneOf, expected an array."), c; | ||
function o(v, g, S, O, k) { | ||
for (var j = v[g], C = 0; C < s.length; C++) | ||
if (T(j, s[C])) | ||
return null; | ||
var N = JSON.stringify(s, (P, X) => Z(X) === "symbol" ? String(X) : X); | ||
return new b("Invalid " + O + " `" + k + "` of value `" + String(j) + "` supplied to `" + S + "`, expected one of " + N + "."); | ||
} | ||
return h(o); | ||
}, oneOfType: (s) => { | ||
if (!Array.isArray(s)) | ||
return process.env.NODE_ENV !== "production" && i("Invalid argument supplied to oneOfType, expected an instance of array."), c; | ||
for (var o = 0; o < s.length; o++) { | ||
var v = s[o]; | ||
if (typeof v != "function") | ||
return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + x(v) + " at index " + o + "."), c; | ||
} | ||
return h((g, S, O, k, j) => { | ||
for (var C = [], N = 0; N < s.length; N++) { | ||
var P = (0, s[N])(g, S, O, k, j, r); | ||
if (P == null) | ||
return null; | ||
P.data && a(P.data, "expectedType") && C.push(P.data.expectedType); | ||
} | ||
return new b("Invalid " + k + " `" + j + "` supplied to `" + O + "`" + (C.length > 0 ? ", expected one of type [" + C.join(", ") + "]" : "") + "."); | ||
}); | ||
}, shape: (s) => h((o, v, g, S, O) => { | ||
var k = o[v], j = F(k); | ||
if (j !== "object") | ||
return new b("Invalid " + S + " `" + O + "` of type `" + j + "` supplied to `" + g + "`, expected `object`."); | ||
for (var C in s) { | ||
var N = s[C]; | ||
if (typeof N != "function") | ||
return w(g, S, O, C, Z(N)); | ||
var P = N(k, C, g, S, O + "." + C, r); | ||
if (P) | ||
return P; | ||
} | ||
return null; | ||
}), exact: (s) => h((o, v, g, S, O) => { | ||
var k = o[v], j = F(k); | ||
if (j !== "object") | ||
return new b("Invalid " + S + " `" + O + "` of type `" + j + "` supplied to `" + g + "`, expected `object`."); | ||
var C = t({}, o[v], s); | ||
for (var N in C) { | ||
var P = s[N]; | ||
if (a(s, N) && typeof P != "function") | ||
return w(g, S, O, N, Z(P)); | ||
if (!P) | ||
return new b("Invalid " + S + " `" + O + "` key `" + N + "` supplied to `" + g + "`.\nBad object: " + JSON.stringify(o[v], null, " ") + ` | ||
Valid keys: ` + JSON.stringify(Object.keys(s), null, " ")); | ||
var X = P(k, N, g, S, O + "." + N, r); | ||
if (X) | ||
return X; | ||
} | ||
return null; | ||
}) }; | ||
function T(s, o) { | ||
return s === o ? s !== 0 || 1 / s == 1 / o : s != s && o != o; | ||
} | ||
function b(s, o) { | ||
this.message = s, this.data = o && typeof o == "object" ? o : {}, this.stack = ""; | ||
} | ||
function h(s) { | ||
if (process.env.NODE_ENV !== "production") | ||
var o = {}, v = 0; | ||
function g(O, k, j, C, N, P, X) { | ||
if (C = C || V, P = P || j, X !== r) { | ||
if (d) { | ||
var ee = new 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 ee.name = "Invariant Violation", ee; | ||
} | ||
if (process.env.NODE_ENV !== "production" && typeof console < "u") { | ||
var te = C + ":" + j; | ||
!o[te] && v < 3 && (i("You are manually calling a React.PropTypes validation function for the `" + P + "` prop on `" + C + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."), o[te] = !0, v++); | ||
} | ||
} | ||
return k[j] == null ? O ? k[j] === null ? new b("The " + N + " `" + P + "` is marked as required in `" + C + "`, but its value is `null`.") : new b("The " + N + " `" + P + "` is marked as required in `" + C + "`, but its value is `undefined`.") : null : s(k, j, C, N, P); | ||
} | ||
var S = g.bind(null, !1); | ||
return S.isRequired = g.bind(null, !0), S; | ||
} | ||
function E(s) { | ||
return h((o, v, g, S, O, k) => { | ||
var j = o[v]; | ||
return F(j) !== s ? new b("Invalid " + S + " `" + O + "` of type `" + Z(j) + "` supplied to `" + g + "`, expected `" + s + "`.", { expectedType: s }) : null; | ||
}); | ||
} | ||
function w(s, o, v, g, S) { | ||
return new b((s || "React class") + ": " + o + " type `" + v + "." + g + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + S + "`."); | ||
} | ||
function Q(s) { | ||
switch (typeof s) { | ||
case "number": | ||
case "string": | ||
case "undefined": | ||
return !0; | ||
case "boolean": | ||
return !s; | ||
case "object": | ||
if (Array.isArray(s)) | ||
return s.every(Q); | ||
if (s === null || l(s)) | ||
return !0; | ||
var o = ((O) => { | ||
var k = O && (I && O[I] || O["@@iterator"]); | ||
if (typeof k == "function") | ||
return k; | ||
})(s); | ||
if (!o) | ||
return !1; | ||
var v, g = o.call(s); | ||
if (o !== s.entries) { | ||
for (; !(v = g.next()).done; ) | ||
if (!Q(v.value)) | ||
return !1; | ||
} else | ||
for (; !(v = g.next()).done; ) { | ||
var S = v.value; | ||
if (S && !Q(S[1])) | ||
return !1; | ||
} | ||
return !0; | ||
default: | ||
return !1; | ||
} | ||
} | ||
function F(s) { | ||
var o = typeof s; | ||
return Array.isArray(s) ? "array" : s instanceof RegExp ? "object" : ((v, g) => v === "symbol" || !!g && (g["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && g instanceof Symbol))(o, s) ? "symbol" : o; | ||
} | ||
function Z(s) { | ||
if (s == null) | ||
return "" + s; | ||
var o = F(s); | ||
if (o === "object") { | ||
if (s instanceof Date) | ||
return "date"; | ||
if (s instanceof RegExp) | ||
return "regexp"; | ||
} | ||
return o; | ||
} | ||
function x(s) { | ||
var o = Z(s); | ||
switch (o) { | ||
case "array": | ||
case "object": | ||
return "an " + o; | ||
case "boolean": | ||
case "date": | ||
case "regexp": | ||
return "a " + o; | ||
default: | ||
return o; | ||
} | ||
} | ||
return b.prototype = Error.prototype, m.checkPropTypes = u, m.resetWarningCache = u.resetWarningCache, m.PropTypes = m, m; | ||
}, Pe; | ||
}()(Qr.isElement, !0); | ||
} else | ||
$.exports = function() { | ||
if (St) | ||
return Ot; | ||
St = 1; | ||
var e = Fe(); | ||
function t() { | ||
} | ||
function r() { | ||
} | ||
return r.resetWarningCache = t, Ot = () => { | ||
function a(c, l, d, I, V, m) { | ||
if (m !== e) { | ||
var T = new 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 T.name = "Invariant Violation", T; | ||
} | ||
} | ||
function u() { | ||
return a; | ||
} | ||
a.isRequired = a; | ||
var i = { array: a, bigint: a, bool: a, func: a, number: a, object: a, string: a, symbol: a, any: a, arrayOf: u, element: a, elementType: a, instanceOf: u, node: a, objectOf: u, oneOf: u, oneOfType: u, shape: u, exact: u, checkPropTypes: r, resetWarningCache: t }; | ||
return i.PropTypes = i, i; | ||
}; | ||
}()(); | ||
const Mt = typeof global == "object" && global && global.Object === Object && global; | ||
var Yr = typeof self == "object" && self && self.Object === Object && self; | ||
const oe = Mt || Yr || Function("return this")(), Se = oe.Symbol; | ||
var Bt = Object.prototype, Gr = Bt.hasOwnProperty, Jr = Bt.toString, me = Se ? Se.toStringTag : void 0, Xr = Object.prototype.toString, It = Se ? Se.toStringTag : void 0; | ||
function se(e) { | ||
return e == null ? e === void 0 ? "[object Undefined]" : "[object Null]" : It && It in Object(e) ? function(t) { | ||
var r = Gr.call(t, me), a = t[me]; | ||
try { | ||
e3[Z] = void 0; | ||
var r2 = true; | ||
} catch (e4) { | ||
t[me] = void 0; | ||
var u = !0; | ||
} catch { | ||
} | ||
var a2 = X.call(e3); | ||
return r2 && (t2 ? e3[Z] = n2 : delete e3[Z]), a2; | ||
}(e2) : function(e3) { | ||
return ee.call(e3); | ||
}(e2); | ||
var i = Jr.call(t); | ||
return u && (r ? t[me] = a : delete t[me]), i; | ||
}(e) : function(t) { | ||
return Xr.call(t); | ||
}(e); | ||
} | ||
function re(e2) { | ||
return e2 != null && typeof e2 == "object"; | ||
function ve(e) { | ||
return e != null && typeof e == "object"; | ||
} | ||
function ae(e2) { | ||
return e2; | ||
function Ut(e) { | ||
return e; | ||
} | ||
var oe = Object.prototype; | ||
function ie(e2) { | ||
var t2 = e2 && e2.constructor; | ||
return e2 === (typeof t2 == "function" && t2.prototype || oe); | ||
var Et, _t, Kr = Object.prototype; | ||
function Tt(e) { | ||
var t = e && e.constructor; | ||
return e === (typeof t == "function" && t.prototype || Kr); | ||
} | ||
var se, ue, le = (se = Object.keys, ue = Object, (e2) => se(ue(e2))), ce = Object.prototype.hasOwnProperty; | ||
function de(e2) { | ||
var t2 = typeof e2; | ||
return e2 != null && (t2 == "object" || t2 == "function"); | ||
const Zr = (Et = Object.keys, _t = Object, (e) => Et(_t(e))); | ||
var en = Object.prototype.hasOwnProperty; | ||
function je(e) { | ||
var t = typeof e; | ||
return e != null && (t == "object" || t == "function"); | ||
} | ||
function ge(e2) { | ||
if (!de(e2)) | ||
return false; | ||
var t2 = ne(e2); | ||
return t2 == "[object Function]" || t2 == "[object GeneratorFunction]" || t2 == "[object AsyncFunction]" || t2 == "[object Proxy]"; | ||
function Ht(e) { | ||
if (!je(e)) | ||
return !1; | ||
var t = se(e); | ||
return t == "[object Function]" || t == "[object GeneratorFunction]" || t == "[object AsyncFunction]" || t == "[object Proxy]"; | ||
} | ||
var pe, fe = G["__core-js_shared__"], me = (pe = /[^.]+$/.exec(fe && fe.keys && fe.keys.IE_PROTO || "")) ? "Symbol(src)_1." + pe : ""; | ||
var he = Function.prototype.toString; | ||
function be(e2) { | ||
if (e2 != null) { | ||
const Ae = oe["__core-js_shared__"]; | ||
var Ct, Rt = (Ct = /[^.]+$/.exec(Ae && Ae.keys && Ae.keys.IE_PROTO || "")) ? "Symbol(src)_1." + Ct : "", tn = Function.prototype.toString; | ||
function ue(e) { | ||
if (e != null) { | ||
try { | ||
return he.call(e2); | ||
} catch (e3) { | ||
return tn.call(e); | ||
} catch { | ||
} | ||
try { | ||
return e2 + ""; | ||
} catch (e3) { | ||
return e + ""; | ||
} catch { | ||
} | ||
@@ -105,373 +497,807 @@ } | ||
} | ||
var ve = /^\[object .+?Constructor\]$/, ye = Function.prototype, xe = Object.prototype, Oe = ye.toString, Se = xe.hasOwnProperty, Ie = RegExp("^" + Oe.call(Se).replace(/[\\^$.*+?()[\]{}|]/g, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"); | ||
function je(e2) { | ||
return !(!de(e2) || function(e3) { | ||
return !!me && me in e3; | ||
}(e2)) && (ge(e2) ? Ie : ve).test(be(e2)); | ||
var rn = /^\[object .+?Constructor\]$/, nn = Function.prototype, on = Object.prototype, an = nn.toString, sn = on.hasOwnProperty, un = RegExp("^" + an.call(sn).replace(/[\\^$.*+?()[\]{}|]/g, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"); | ||
function cn(e) { | ||
return !(!je(e) || function(t) { | ||
return !!Rt && Rt in t; | ||
}(e)) && (Ht(e) ? un : rn).test(ue(e)); | ||
} | ||
function Te(e2, t2) { | ||
var n2 = function(e3, t3) { | ||
return e3 == null ? void 0 : e3[t3]; | ||
}(e2, t2); | ||
return je(n2) ? n2 : void 0; | ||
function he(e, t) { | ||
var r = function(a, u) { | ||
return a == null ? void 0 : a[u]; | ||
}(e, t); | ||
return cn(r) ? r : void 0; | ||
} | ||
var Ce = Te(G, "DataView"), Re = Te(G, "Map"), we = Te(G, "Promise"), Ae = Te(G, "Set"), Ee = Te(G, "WeakMap"), _e = be(Ce), Ve = be(Re), Fe = be(we), Pe = be(Ae), $e = be(Ee), ke = ne; | ||
(Ce && ke(new Ce(new ArrayBuffer(1))) != "[object DataView]" || Re && ke(new Re()) != "[object Map]" || we && ke(we.resolve()) != "[object Promise]" || Ae && ke(new Ae()) != "[object Set]" || Ee && ke(new Ee()) != "[object WeakMap]") && (ke = (e2) => { | ||
var t2 = ne(e2), n2 = t2 == "[object Object]" ? e2.constructor : void 0, r2 = n2 ? be(n2) : ""; | ||
if (r2) | ||
switch (r2) { | ||
case _e: | ||
const Ne = he(oe, "DataView"), De = he(oe, "Map"), Le = he(oe, "Promise"), We = he(oe, "Set"), ze = he(oe, "WeakMap"); | ||
var ln = ue(Ne), fn = ue(De), pn = ue(Le), dn = ue(We), yn = ue(ze), ie = se; | ||
(Ne && ie(new Ne(new ArrayBuffer(1))) != "[object DataView]" || De && ie(new De()) != "[object Map]" || Le && ie(Le.resolve()) != "[object Promise]" || We && ie(new We()) != "[object Set]" || ze && ie(new ze()) != "[object WeakMap]") && (ie = (e) => { | ||
var t = se(e), r = t == "[object Object]" ? e.constructor : void 0, a = r ? ue(r) : ""; | ||
if (a) | ||
switch (a) { | ||
case ln: | ||
return "[object DataView]"; | ||
case Ve: | ||
case fn: | ||
return "[object Map]"; | ||
case Fe: | ||
case pn: | ||
return "[object Promise]"; | ||
case Pe: | ||
case dn: | ||
return "[object Set]"; | ||
case $e: | ||
case yn: | ||
return "[object WeakMap]"; | ||
} | ||
return t2; | ||
return t; | ||
}); | ||
var qe = ke; | ||
function Le(e2) { | ||
return re(e2) && ne(e2) == "[object Arguments]"; | ||
const mn = ie; | ||
function $t(e) { | ||
return ve(e) && se(e) == "[object Arguments]"; | ||
} | ||
var De = Object.prototype, We = De.hasOwnProperty, Be = De.propertyIsEnumerable, ze = Le(function() { | ||
var Qt = Object.prototype, gn = Qt.hasOwnProperty, bn = Qt.propertyIsEnumerable; | ||
const vn = $t(function() { | ||
return arguments; | ||
}()) ? Le : (e2) => re(e2) && We.call(e2, "callee") && !Be.call(e2, "callee"), Ue = Array.isArray; | ||
function Ne(e2) { | ||
return typeof e2 == "number" && e2 > -1 && e2 % 1 == 0 && e2 <= 9007199254740991; | ||
}()) ? $t : (e) => ve(e) && gn.call(e, "callee") && !bn.call(e, "callee"), Ue = Array.isArray; | ||
function Yt(e) { | ||
return typeof e == "number" && e > -1 && e % 1 == 0 && e <= 9007199254740991; | ||
} | ||
var He = typeof exports == "object" && exports && !exports.nodeType && exports, Me = He && typeof module == "object" && module && !module.nodeType && module, Qe = Me && Me.exports === He ? G.Buffer : void 0, Ge = (Qe ? Qe.isBuffer : void 0) || function() { | ||
return false; | ||
}, Ye = {}; | ||
Ye["[object Float32Array]"] = Ye["[object Float64Array]"] = Ye["[object Int8Array]"] = Ye["[object Int16Array]"] = Ye["[object Int32Array]"] = Ye["[object Uint8Array]"] = Ye["[object Uint8ClampedArray]"] = Ye["[object Uint16Array]"] = Ye["[object Uint32Array]"] = true, Ye["[object Arguments]"] = Ye["[object Array]"] = Ye["[object ArrayBuffer]"] = Ye["[object Boolean]"] = Ye["[object DataView]"] = Ye["[object Date]"] = Ye["[object Error]"] = Ye["[object Function]"] = Ye["[object Map]"] = Ye["[object Number]"] = Ye["[object Object]"] = Ye["[object RegExp]"] = Ye["[object Set]"] = Ye["[object String]"] = Ye["[object WeakMap]"] = false; | ||
var Je = typeof exports == "object" && exports && !exports.nodeType && exports, Ke = Je && typeof module == "object" && module && !module.nodeType && module, Xe = Ke && Ke.exports === Je && M.process, Ze = (() => { | ||
var Gt = typeof exports == "object" && exports && !exports.nodeType && exports, kt = Gt && typeof module == "object" && module && !module.nodeType && module, Pt = kt && kt.exports === Gt ? oe.Buffer : void 0; | ||
const hn = (Pt ? Pt.isBuffer : void 0) || function() { | ||
return !1; | ||
}; | ||
var Y = {}; | ||
Y["[object Float32Array]"] = Y["[object Float64Array]"] = Y["[object Int8Array]"] = Y["[object Int16Array]"] = Y["[object Int32Array]"] = Y["[object Uint8Array]"] = Y["[object Uint8ClampedArray]"] = Y["[object Uint16Array]"] = Y["[object Uint32Array]"] = !0, Y["[object Arguments]"] = Y["[object Array]"] = Y["[object ArrayBuffer]"] = Y["[object Boolean]"] = Y["[object DataView]"] = Y["[object Date]"] = Y["[object Error]"] = Y["[object Function]"] = Y["[object Map]"] = Y["[object Number]"] = Y["[object Object]"] = Y["[object RegExp]"] = Y["[object Set]"] = Y["[object String]"] = Y["[object WeakMap]"] = !1; | ||
var Jt = typeof exports == "object" && exports && !exports.nodeType && exports, be = Jt && typeof module == "object" && module && !module.nodeType && module, Ve = be && be.exports === Jt && Mt.process, Ft = (() => { | ||
try { | ||
var e2 = Ke && Ke.require && Ke.require("util").types; | ||
return e2 || Xe && Xe.binding && Xe.binding("util"); | ||
} catch (e3) { | ||
var e = be && be.require && be.require("util").types; | ||
return e || Ve && Ve.binding && Ve.binding("util"); | ||
} catch { | ||
} | ||
})(), et = Ze && Ze.isTypedArray, tt = et ? function(e2) { | ||
return (t2) => e2(t2); | ||
}(et) : function(e2) { | ||
return re(e2) && Ne(e2.length) && !!Ye[ne(e2)]; | ||
}, nt = tt, rt = Object.prototype.hasOwnProperty; | ||
function at(e2) { | ||
if (e2 == null) | ||
return true; | ||
if (function(e3) { | ||
return e3 != null && Ne(e3.length) && !ge(e3); | ||
}(e2) && (Ue(e2) || typeof e2 == "string" || typeof e2.splice == "function" || Ge(e2) || nt(e2) || ze(e2))) | ||
return !e2.length; | ||
var t2 = qe(e2); | ||
if (t2 == "[object Map]" || t2 == "[object Set]") | ||
return !e2.size; | ||
if (ie(e2)) | ||
return !function(e3) { | ||
if (!ie(e3)) | ||
return le(e3); | ||
var t3 = []; | ||
for (var n3 in Object(e3)) | ||
ce.call(e3, n3) && n3 != "constructor" && t3.push(n3); | ||
return t3; | ||
}(e2).length; | ||
for (var n2 in e2) | ||
if (rt.call(e2, n2)) | ||
return false; | ||
return true; | ||
})(), At = Ft && Ft.isTypedArray, xn = At ? function(e) { | ||
return (t) => e(t); | ||
}(At) : function(e) { | ||
return ve(e) && Yt(e.length) && !!Y[se(e)]; | ||
}; | ||
const On = xn; | ||
var Sn = Object.prototype.hasOwnProperty; | ||
function qe(e) { | ||
if (e == null) | ||
return !0; | ||
if (function(a) { | ||
return a != null && Yt(a.length) && !Ht(a); | ||
}(e) && (Ue(e) || typeof e == "string" || typeof e.splice == "function" || hn(e) || On(e) || vn(e))) | ||
return !e.length; | ||
var t = mn(e); | ||
if (t == "[object Map]" || t == "[object Set]") | ||
return !e.size; | ||
if (Tt(e)) | ||
return !function(a) { | ||
if (!Tt(a)) | ||
return Zr(a); | ||
var u = []; | ||
for (var i in Object(a)) | ||
en.call(a, i) && i != "constructor" && u.push(i); | ||
return u; | ||
}(e).length; | ||
for (var r in e) | ||
if (Sn.call(e, r)) | ||
return !1; | ||
return !0; | ||
} | ||
function ot(e2) { | ||
var t2 = e2 == null ? 0 : e2.length; | ||
return t2 ? e2[t2 - 1] : void 0; | ||
function Xt(e) { | ||
var t = e == null ? 0 : e.length; | ||
return t ? e[t - 1] : void 0; | ||
} | ||
function it(e2, t2, n2) { | ||
var r2 = -1, a2 = e2.length; | ||
t2 < 0 && (t2 = -t2 > a2 ? 0 : a2 + t2), (n2 = n2 > a2 ? a2 : n2) < 0 && (n2 += a2), a2 = t2 > n2 ? 0 : n2 - t2 >>> 0, t2 >>>= 0; | ||
for (var o2 = Array(a2); ++r2 < a2; ) | ||
o2[r2] = e2[r2 + t2]; | ||
return o2; | ||
function Kt(e, t, r) { | ||
var a = -1, u = e.length; | ||
t < 0 && (t = -t > u ? 0 : u + t), (r = r > u ? u : r) < 0 && (r += u), u = t > r ? 0 : r - t >>> 0, t >>>= 0; | ||
for (var i = Array(u); ++a < u; ) | ||
i[a] = e[a + t]; | ||
return i; | ||
} | ||
var st = /\s/; | ||
var ut = /^\s+/; | ||
function lt(e2) { | ||
return e2 ? e2.slice(0, function(e3) { | ||
for (var t2 = e3.length; t2-- && st.test(e3.charAt(t2)); ) | ||
var jn = /\s/, wn = /^\s+/; | ||
function In(e) { | ||
return e && e.slice(0, function(t) { | ||
for (var r = t.length; r-- && jn.test(t.charAt(r)); ) | ||
; | ||
return t2; | ||
}(e2) + 1).replace(ut, "") : e2; | ||
return r; | ||
}(e) + 1).replace(wn, ""); | ||
} | ||
var ct = /^[-+]0x[0-9a-f]+$/i, dt = /^0b[01]+$/i, gt = /^0o[0-7]+$/i, pt = parseInt; | ||
function ft(e2) { | ||
if (typeof e2 == "number") | ||
return e2; | ||
if (function(e3) { | ||
return typeof e3 == "symbol" || re(e3) && ne(e3) == "[object Symbol]"; | ||
}(e2)) | ||
var En = /^[-+]0x[0-9a-f]+$/i, _n = /^0b[01]+$/i, Tn = /^0o[0-7]+$/i, Cn = parseInt; | ||
function Rn(e) { | ||
if (typeof e == "number") | ||
return e; | ||
if (function(a) { | ||
return typeof a == "symbol" || ve(a) && se(a) == "[object Symbol]"; | ||
}(e)) | ||
return NaN; | ||
if (de(e2)) { | ||
var t2 = typeof e2.valueOf == "function" ? e2.valueOf() : e2; | ||
e2 = de(t2) ? t2 + "" : t2; | ||
if (je(e)) { | ||
var t = typeof e.valueOf == "function" ? e.valueOf() : e; | ||
e = je(t) ? t + "" : t; | ||
} | ||
if (typeof e2 != "string") | ||
return e2 === 0 ? e2 : +e2; | ||
e2 = lt(e2); | ||
var n2 = dt.test(e2); | ||
return n2 || gt.test(e2) ? pt(e2.slice(2), n2 ? 2 : 8) : ct.test(e2) ? NaN : +e2; | ||
if (typeof e != "string") | ||
return e === 0 ? e : +e; | ||
e = In(e); | ||
var r = _n.test(e); | ||
return r || Tn.test(e) ? Cn(e.slice(2), r ? 2 : 8) : En.test(e) ? NaN : +e; | ||
} | ||
function mt(e2) { | ||
var t2 = function(e3) { | ||
return e3 ? 1 / 0 === (e3 = ft(e3)) || -1 / 0 === e3 ? 17976931348623157e292 * (e3 < 0 ? -1 : 1) : e3 == e3 ? e3 : 0 : e3 === 0 ? e3 : 0; | ||
}(e2), n2 = t2 % 1; | ||
return t2 == t2 ? n2 ? t2 - n2 : t2 : 0; | ||
function He(e) { | ||
var t = function(a) { | ||
return a ? (a = Rn(a)) === 1 / 0 || a === -1 / 0 ? 17976931348623157e292 * (a < 0 ? -1 : 1) : a == a ? a : 0 : a === 0 ? a : 0; | ||
}(e), r = t % 1; | ||
return t == t ? r ? t - r : t : 0; | ||
} | ||
var ht = Math.min; | ||
function bt(e2, t2) { | ||
if ((e2 = mt(e2)) < 1 || e2 > 9007199254740991) | ||
var $n = Math.min; | ||
function kn(e, t) { | ||
if ((e = He(e)) < 1 || e > 9007199254740991) | ||
return []; | ||
var n2, r2 = 4294967295, a2 = ht(e2, 4294967295); | ||
e2 -= 4294967295; | ||
for (var o2 = function(e3, t3) { | ||
for (var n3 = -1, r3 = Array(e3); ++n3 < e3; ) | ||
r3[n3] = t3(n3); | ||
return r3; | ||
}(a2, t2 = typeof (n2 = t2) == "function" ? n2 : ae); ++r2 < e2; ) | ||
t2(r2); | ||
return o2; | ||
var r, a = 4294967295, u = $n(e, 4294967295); | ||
e -= 4294967295; | ||
for (var i = function(c, l) { | ||
for (var d = -1, I = Array(c); ++d < c; ) | ||
I[d] = l(d); | ||
return I; | ||
}(u, t = typeof (r = t) == "function" ? r : Ut); ++a < e; ) | ||
t(a); | ||
return i; | ||
} | ||
function vt(e2, t2) { | ||
return function(e3) { | ||
return e3 && e3.length ? ((e4, t3) => { | ||
for (var n2, r2 = -1, a2 = e4.length; ++r2 < a2; ) { | ||
var o2 = t3(e4[r2]); | ||
o2 !== void 0 && (n2 = n2 === void 0 ? o2 : n2 + o2); | ||
function we(e, t) { | ||
return function(r) { | ||
return r && r.length ? ((a, u) => { | ||
for (var i, c = -1, l = a.length; ++c < l; ) { | ||
var d = u(a[c]); | ||
d !== void 0 && (i = i === void 0 ? d : i + d); | ||
} | ||
return n2; | ||
})(e3, ae) : 0; | ||
}(function(e3, t3, n2) { | ||
return e3 && e3.length ? it(e3, 0, (t3 = n2 || t3 === void 0 ? 1 : mt(t3)) < 0 ? 0 : t3) : []; | ||
}(e2, t2)); | ||
return i; | ||
})(r, Ut) : 0; | ||
}(function(r, a, u) { | ||
return r && r.length ? Kt(r, 0, (a = u || a === void 0 ? 1 : He(a)) < 0 ? 0 : a) : []; | ||
}(e, t)); | ||
} | ||
function yt({ tickData: e2, customSegmentStops: t2, min: n2, max: r2 }) { | ||
if (!Ue(t2) || at(t2)) | ||
return e2; | ||
if (((a2 = t2) && a2.length ? a2[0] : void 0) !== n2) | ||
throw new Error(`First value should be equivalent to min value given. Current min value - ${n2}`); | ||
var a2; | ||
if (ot(t2) !== r2) | ||
throw new Error(`Last value should be equivalent to max value given. Current min value - ${r2}`); | ||
return function(e3, t3, n3) { | ||
var r3 = e3 == null ? 0 : e3.length; | ||
return r3 ? it(e3, (t3 = n3 || t3 === void 0 ? 1 : mt(t3)) < 0 ? 0 : t3, r3) : []; | ||
}(t2.map((e3, a3) => { | ||
if (a3 !== 0) | ||
return (e3 - t2[a3 - 1]) / (r2 - n2); | ||
function Pn({ tickData: e, customSegmentStops: t, min: r, max: a }) { | ||
if (!Ue(t) || qe(t)) | ||
return e; | ||
if (((u = t) && u.length ? u[0] : void 0) !== r) | ||
throw new Error(`First value should be equivalent to min value given. Current min value - ${r}`); | ||
var u; | ||
if (Xt(t) !== a) | ||
throw new Error(`Last value should be equivalent to max value given. Current min value - ${a}`); | ||
return function(i, c, l) { | ||
var d = i == null ? 0 : i.length; | ||
return d ? Kt(i, (c = l || c === void 0 ? 1 : He(c)) < 0 ? 0 : c, d) : []; | ||
}(t.map((i, c) => { | ||
if (c !== 0) | ||
return (i - t[c - 1]) / (a - r); | ||
})); | ||
} | ||
function xt({ maxSegmentLabelCount: e2, segmentCount: t2 }) { | ||
const n2 = parseInt(e2, 10), r2 = parseInt(t2, 10); | ||
return (typeof (a2 = n2) == "number" || re(a2) && ne(a2) == "[object Number]") && n2 >= 0 && n2 <= r2 ? n2 : r2; | ||
var a2; | ||
function Fn({ maxSegmentLabelCount: e, segmentCount: t }) { | ||
const r = parseInt(e, 10), a = parseInt(t, 10); | ||
return (typeof (u = r) == "number" || ve(u) && se(u) == "[object Number]") && r >= 0 && r <= a ? r : a; | ||
var u; | ||
} | ||
function Ot(e2) { | ||
return e2 * Math.PI / 180; | ||
function Vt(e) { | ||
return e * Math.PI / 180; | ||
} | ||
const St = { Inside: "INSIDE", Outside: "OUTSIDE" }, It = { easeLinear: "easeLinear", easeQuadIn: "easeQuadIn", easeQuadOut: "easeQuadOut", easeQuadInOut: "easeQuadInOut", easeCubicIn: "easeCubicIn", easeCubicOut: "easeCubicOut", easeCubicInOut: "easeCubicInOut", easePolyIn: "easePolyIn", easePolyOut: "easePolyOut", easePolyInOut: "easePolyInOut", easeSinIn: "easeSinIn", easeSinOut: "easeSinOut", easeSinInOut: "easeSinInOut", easeExpIn: "easeExpIn", easeExpOut: "easeExpOut", easeExpInOut: "easeExpInOut", easeCircleIn: "easeCircleIn", easeCircleOut: "easeCircleOut", easeCircleInOut: "easeCircleInOut", easeBounceIn: "easeBounceIn", easeBounceOut: "easeBounceOut", easeBounceInOut: "easeBounceInOut", easeBackIn: "easeBackIn", easeBackOut: "easeBackOut", easeBackInOut: "easeBackInOut", easeElasticIn: "easeElasticIn", easeElasticOut: "easeElasticOut", easeElasticInOut: "easeElasticInOut", easeElastic: "easeElastic" }, jt = { value: 0, minValue: 0, maxValue: 1e3, forceRender: false, width: 300, height: 300, paddingHorizontal: 0, paddingVertical: 0, fluidWidth: false, dimensionUnit: "px", segments: 5, maxSegmentLabels: -1, customSegmentStops: [], customSegmentLabels: [], needleColor: "steelblue", startColor: "#FF471A", endColor: "#33CC33", segmentColors: [], needleTransition: It.easeQuadInOut, needleTransitionDuration: 500, needleHeightRatio: 0.9, ringWidth: 60, textColor: "#666", valueFormat: "", currentValueText: "${value}", currentValuePlaceholderStyle: "${value}", labelFontSize: "14px", valueTextFontSize: "16px", valueTextFontWeight: "bold", svgAriaLabel: "React d3 speedometer" }, Tt = { ringInset: 20, pointerWidth: 10, pointerTailLength: 5, minAngle: -90, maxAngle: 90, labelInset: 10 }; | ||
function Ct(e2) { | ||
switch (e2) { | ||
case It.easeLinear: | ||
return W; | ||
case It.easeQuadIn: | ||
return D; | ||
case It.easeQuadOut: | ||
return L; | ||
case It.easeQuadInOut: | ||
return g; | ||
case It.easeCubicIn: | ||
return q; | ||
case It.easeCubicOut: | ||
return k; | ||
case It.easeCubicInOut: | ||
return $; | ||
case It.easePolyIn: | ||
return P; | ||
case It.easePolyOut: | ||
return F; | ||
case It.easePolyInOut: | ||
return V; | ||
case It.easeSinIn: | ||
return _; | ||
case It.easeSinOut: | ||
return E; | ||
case It.easeSinInOut: | ||
return A; | ||
case It.easeExpIn: | ||
return w; | ||
case It.easeExpOut: | ||
return R; | ||
case It.easeExpInOut: | ||
return C; | ||
case It.easeCircleIn: | ||
return T; | ||
case It.easeCircleOut: | ||
return j; | ||
case It.easeCircleInOut: | ||
return I; | ||
case It.easeBounceIn: | ||
return S; | ||
case It.easeBounceOut: | ||
return O; | ||
case It.easeBounceInOut: | ||
return x; | ||
case It.easeBackIn: | ||
return y; | ||
case It.easeBackOut: | ||
return v; | ||
case It.easeBackInOut: | ||
return b; | ||
case It.easeElasticIn: | ||
return h; | ||
case It.easeElasticOut: | ||
return m; | ||
case It.easeElasticInOut: | ||
return f; | ||
case It.easeElastic: | ||
return p; | ||
const no = { Inside: "INSIDE", Outside: "OUTSIDE" }, M = { easeLinear: "easeLinear", easeQuadIn: "easeQuadIn", easeQuadOut: "easeQuadOut", easeQuadInOut: "easeQuadInOut", easeCubicIn: "easeCubicIn", easeCubicOut: "easeCubicOut", easeCubicInOut: "easeCubicInOut", easePolyIn: "easePolyIn", easePolyOut: "easePolyOut", easePolyInOut: "easePolyInOut", easeSinIn: "easeSinIn", easeSinOut: "easeSinOut", easeSinInOut: "easeSinInOut", easeExpIn: "easeExpIn", easeExpOut: "easeExpOut", easeExpInOut: "easeExpInOut", easeCircleIn: "easeCircleIn", easeCircleOut: "easeCircleOut", easeCircleInOut: "easeCircleInOut", easeBounceIn: "easeBounceIn", easeBounceOut: "easeBounceOut", easeBounceInOut: "easeBounceInOut", easeBackIn: "easeBackIn", easeBackOut: "easeBackOut", easeBackInOut: "easeBackInOut", easeElasticIn: "easeElasticIn", easeElasticOut: "easeElasticOut", easeElasticInOut: "easeElasticInOut", easeElastic: "easeElastic" }, Zt = (e) => e, An = { value: 0, minValue: 0, maxValue: 1e3, forceRender: !1, width: 300, height: 300, paddingHorizontal: 0, paddingVertical: 0, fluidWidth: !1, dimensionUnit: "px", segments: 5, maxSegmentLabels: -1, customSegmentStops: [], customSegmentLabels: [], needleColor: "steelblue", startColor: "#FF471A", endColor: "#33CC33", segmentColors: [], needleTransition: M.easeQuadInOut, needleTransitionDuration: 500, needleHeightRatio: 0.9, ringWidth: 60, textColor: "#666", valueFormat: "", segmentValueFormatter: Zt, currentValueText: "${value}", currentValuePlaceholderStyle: "${value}", labelFontSize: "14px", valueTextFontSize: "16px", valueTextFontWeight: "bold", svgAriaLabel: "React d3 speedometer" }, Vn = { ringInset: 20, pointerWidth: 10, pointerTailLength: 5, minAngle: -90, maxAngle: 90, labelInset: 10 }; | ||
function Nn(e) { | ||
switch (e) { | ||
case M.easeLinear: | ||
return Ur; | ||
case M.easeQuadIn: | ||
return Br; | ||
case M.easeQuadOut: | ||
return Mr; | ||
case M.easeQuadInOut: | ||
return ut; | ||
case M.easeCubicIn: | ||
return qr; | ||
case M.easeCubicOut: | ||
return zr; | ||
case M.easeCubicInOut: | ||
return Wr; | ||
case M.easePolyIn: | ||
return Lr; | ||
case M.easePolyOut: | ||
return Dr; | ||
case M.easePolyInOut: | ||
return Nr; | ||
case M.easeSinIn: | ||
return Vr; | ||
case M.easeSinOut: | ||
return Ar; | ||
case M.easeSinInOut: | ||
return Fr; | ||
case M.easeExpIn: | ||
return Pr; | ||
case M.easeExpOut: | ||
return kr; | ||
case M.easeExpInOut: | ||
return $r; | ||
case M.easeCircleIn: | ||
return Rr; | ||
case M.easeCircleOut: | ||
return Cr; | ||
case M.easeCircleInOut: | ||
return Tr; | ||
case M.easeBounceIn: | ||
return _r; | ||
case M.easeBounceOut: | ||
return Er; | ||
case M.easeBounceInOut: | ||
return Ir; | ||
case M.easeBackIn: | ||
return wr; | ||
case M.easeBackOut: | ||
return jr; | ||
case M.easeBackInOut: | ||
return Sr; | ||
case M.easeElasticIn: | ||
return Or; | ||
case M.easeElasticOut: | ||
return xr; | ||
case M.easeElasticInOut: | ||
return hr; | ||
case M.easeElastic: | ||
return vr; | ||
default: | ||
return g; | ||
return ut; | ||
} | ||
} | ||
var Rt = Number.isNaN || function(e2) { | ||
return typeof e2 == "number" && e2 != e2; | ||
var Nt = Number.isNaN || function(e) { | ||
return typeof e == "number" && e != e; | ||
}; | ||
function wt(e2, t2) { | ||
if (e2.length !== t2.length) | ||
return false; | ||
for (var n2 = 0; n2 < e2.length; n2++) | ||
if (r2 = e2[n2], a2 = t2[n2], !(r2 === a2 || Rt(r2) && Rt(a2))) | ||
return false; | ||
var r2, a2; | ||
return true; | ||
function Dn(e, t) { | ||
if (e.length !== t.length) | ||
return !1; | ||
for (var r = 0; r < e.length; r++) | ||
if (a = e[r], u = t[r], !(a === u || Nt(a) && Nt(u))) | ||
return !1; | ||
var a, u; | ||
return !0; | ||
} | ||
function At(e2, t2) { | ||
t2 === void 0 && (t2 = wt); | ||
var n2 = null; | ||
function r2() { | ||
for (var r3 = [], a2 = 0; a2 < arguments.length; a2++) | ||
r3[a2] = arguments[a2]; | ||
if (n2 && n2.lastThis === this && t2(r3, n2.lastArgs)) | ||
return n2.lastResult; | ||
var o2 = e2.apply(this, r3); | ||
return n2 = { lastResult: o2, lastArgs: r3, lastThis: this }, o2; | ||
function Ie(e, t) { | ||
t === void 0 && (t = Dn); | ||
var r = null; | ||
function a() { | ||
for (var u = [], i = 0; i < arguments.length; i++) | ||
u[i] = arguments[i]; | ||
if (r && r.lastThis === this && t(u, r.lastArgs)) | ||
return r.lastResult; | ||
var c = e.apply(this, u); | ||
return r = { lastResult: c, lastArgs: u, lastThis: this }, c; | ||
} | ||
return r2.clear = function() { | ||
n2 = null; | ||
}, r2; | ||
return a.clear = function() { | ||
r = null; | ||
}, a; | ||
} | ||
const Et = At(function(e2) { | ||
return function({ min: e3, max: t2, segments: n2 }) { | ||
return a().range([0, 1]).domain([e3, t2]); | ||
}({ min: e2.minValue, max: e2.maxValue, segments: e2.maxSegmentLabels }); | ||
}), _t = At(function(e2) { | ||
let t2 = function(e3, { min: t3, max: n2, segments: r2 }) { | ||
let a2 = []; | ||
if (a2 = e3.ticks(r2), (ot(a2) !== n2 || r2 < a2.length) && a2.length > 1) { | ||
const e4 = (n2 - t3) / r2; | ||
a2 = [t3], bt(r2, (n3) => { | ||
a2.push(t3 + (n3 + 1) * e4); | ||
const Qe = Ie(function(e) { | ||
return function({ min: t, max: r, segments: a }) { | ||
return fr().range([0, 1]).domain([t, r]); | ||
}({ min: e.minValue, max: e.maxValue, segments: e.maxSegmentLabels }); | ||
}), Ln = Ie(function(e) { | ||
let t = function(r, { min: a, max: u, segments: i }) { | ||
let c = []; | ||
if (c = r.ticks(i), (Xt(c) !== u || i < c.length) && c.length > 1) { | ||
const l = (u - a) / i; | ||
c = [a], kn(i, (d) => { | ||
c.push(a + (d + 1) * l); | ||
}); | ||
} | ||
return a2.length === 1 && (a2 = [t3, n2]), a2; | ||
}(Et(e2), { min: e2.minValue, max: e2.maxValue, segments: e2.maxSegmentLabels }); | ||
e2.customSegmentStops.length > 0 && e2.maxSegmentLabels !== 0 && (t2 = e2.customSegmentStops); | ||
return t2; | ||
}), Vt = At(function(e2) { | ||
const t2 = B(e2.majorTicks).map((t3) => 1 / e2.majorTicks); | ||
return yt({ tickData: t2, customSegmentStops: e2.customSegmentStops, min: e2.minValue, max: e2.maxValue }); | ||
}), Ft = At(function(e2) { | ||
const t2 = Vt(e2), n2 = e2.maxAngle - e2.minAngle, r2 = e2.width / 2; | ||
return u().innerRadius(r2 - e2.ringWidth - e2.ringInset).outerRadius(r2 - e2.ringInset).startAngle((r3, a2) => { | ||
const o2 = vt(t2, a2); | ||
return Ot(e2.minAngle + o2 * n2); | ||
}).endAngle((r3, a2) => { | ||
const o2 = vt(t2, a2 + 1); | ||
return Ot(e2.minAngle + o2 * n2); | ||
return c.length === 1 && (c = [a, u]), c; | ||
}(Qe(e), { min: e.minValue, max: e.maxValue, segments: e.maxSegmentLabels }); | ||
return e.customSegmentStops.length > 0 && e.maxSegmentLabels !== 0 && (t = e.customSegmentStops), t; | ||
}), Me = Ie(function(e) { | ||
const t = Hr(e.majorTicks).map((r) => 1 / e.majorTicks); | ||
return Pn({ tickData: t, customSegmentStops: e.customSegmentStops, min: e.minValue, max: e.maxValue }); | ||
}), Wn = Ie(function(e) { | ||
const t = Me(e), r = e.maxAngle - e.minAngle, a = e.width / 2; | ||
return yr().innerRadius(a - e.ringWidth - e.ringInset).outerRadius(a - e.ringInset).startAngle((u, i) => { | ||
const c = we(t, i); | ||
return Vt(e.minAngle + c * r); | ||
}).endAngle((u, i) => { | ||
const c = we(t, i + 1); | ||
return Vt(e.minAngle + c * r); | ||
}); | ||
}); | ||
const Pt = ({ d3_refs: e2, newValue: t2, config: n2 }) => { | ||
const r2 = Et(n2)(t2), a2 = n2.maxAngle - n2.minAngle, o2 = n2.minAngle + r2 * a2; | ||
e2.pointer.transition(function({ duration: e3, ease: t3 }) { | ||
return d().duration(e3).ease(t3); | ||
}({ duration: n2.needleTransitionDuration, ease: Ct(n2.needleTransition) })).attr("transform", `rotate(${o2})`), e2.current_value_text.text(function(e3, t3) { | ||
const n3 = t3.labelFormat(e3), r3 = t3.currentValuePlaceholderStyle; | ||
return t3.currentValueText.replace(r3, n3); | ||
}(t2, n2)); | ||
}, $t = ({ container: e2, config: t2 }) => { | ||
const n2 = function(e3) { | ||
return e3.width / 2; | ||
}(t2), a2 = function(e3, t3, n3) { | ||
return `translate(${e3 + t3}, ${e3 + n3})`; | ||
}(n2, t2.paddingHorizontal, t2.paddingVertical), o2 = function({ container: e3, config: t3 }) { | ||
const n3 = t3.width + 2 * t3.paddingHorizontal, a3 = t3.height + 2 * t3.paddingVertical; | ||
return r(e3).append("svg:svg").attr("class", "speedometer").attr("width", `${n3}${t3.dimensionUnit}`).attr("height", `${a3}${t3.dimensionUnit}`).attr("role", "img").attr("focusable", "false").attr("aria-label", t3.svgAriaLabel).style("width", `${n3}${t3.dimensionUnit}`).style("height", `${a3}${t3.dimensionUnit}`); | ||
}({ container: e2, config: t2 }); | ||
return function({ config: e3, svg: t3, centerTx: n3 }) { | ||
const r2 = Vt(e3), a3 = Ft(e3); | ||
t3.append("g").attr("class", "arc").attr("transform", n3).selectAll("path").data(r2).enter().append("path").attr("class", "speedo-segment").attr("fill", (t4, n4) => !at(e3.segmentColors) && e3.segmentColors[n4] ? e3.segmentColors[n4] : e3.arcColorFn(t4 * n4)).attr("d", a3); | ||
}({ config: t2, svg: o2, centerTx: a2 }), function({ config: e3, svg: t3, centerTx: n3, r: r2 }) { | ||
const a3 = _t(e3), o3 = Vt(e3), i2 = Et(e3), s2 = e3.maxAngle - e3.minAngle, { customSegmentLabels: u2 } = e3, l2 = Ue(u2) && !at(u2), c2 = l2 && u2.length === o3.length; | ||
if (l2 && !c2) | ||
throw new Error(`Custom Segment Labels should be an array with length of ${o3.length}`); | ||
if (l2 && c2) | ||
return void function({ config: e4, svg: t4, centerTx: n4, r: r3, ticks: a4, tickData: o4, scale: i3, range: s3 }) { | ||
const { customSegmentStops: u3, customSegmentLabels: l3 } = e4; | ||
function c3(t5, n5) { | ||
const r4 = u3.length === 0 ? i3(t5) : vt(o4, n5); | ||
return e4.minAngle + r4 * s3; | ||
}), Dt = ({ d3_refs: e, newValue: t, config: r }) => { | ||
const a = Qe(r)(t), u = r.maxAngle - r.minAngle, i = r.minAngle + a * u; | ||
e.pointer.transition(function({ duration: c, ease: l }) { | ||
return br().duration(c).ease(l); | ||
}({ duration: r.needleTransitionDuration, ease: Nn(r.needleTransition) })).attr("transform", `rotate(${i})`), e.current_value_text.text(function(c, l) { | ||
const d = l.labelFormat(c), I = l.currentValuePlaceholderStyle; | ||
return l.currentValueText.replace(I, d); | ||
}(t, r)); | ||
}, zn = ({ container: e, config: t }) => { | ||
const r = function(i) { | ||
return i.width / 2; | ||
}(t), a = function(i, c, l) { | ||
return `translate(${i + c}, ${i + l})`; | ||
}(r, t.paddingHorizontal, t.paddingVertical), u = function({ container: i, config: c }) { | ||
const l = c.width + 2 * c.paddingHorizontal, d = c.height + 2 * c.paddingVertical; | ||
return qt(i).append("svg:svg").attr("class", "speedometer").attr("width", `${l}${c.dimensionUnit}`).attr("height", `${d}${c.dimensionUnit}`).attr("role", "img").attr("focusable", "false").attr("aria-label", c.svgAriaLabel).style("width", `${l}${c.dimensionUnit}`).style("height", `${d}${c.dimensionUnit}`); | ||
}({ container: e, config: t }); | ||
return function({ config: i, svg: c, centerTx: l }) { | ||
const d = Me(i), I = Wn(i); | ||
c.append("g").attr("class", "arc").attr("transform", l).selectAll("path").data(d).enter().append("path").attr("class", "speedo-segment").attr("fill", (V, m) => !qe(i.segmentColors) && i.segmentColors[m] ? i.segmentColors[m] : i.arcColorFn(V * m)).attr("d", I); | ||
}({ config: t, svg: u, centerTx: a }), function({ config: i, svg: c, centerTx: l, r: d }) { | ||
const I = Ln(i), V = Me(i), m = Qe(i), T = i.maxAngle - i.minAngle, { customSegmentLabels: b } = i, h = Ue(b) && !qe(b), E = h && b.length === V.length; | ||
if (h && !E) | ||
throw new Error(`Custom Segment Labels should be an array with length of ${V.length}`); | ||
if (h && E) | ||
return void function({ config: w, svg: Q, centerTx: F, r: Z, ticks: x, tickData: s, scale: o, range: v }) { | ||
const { customSegmentStops: g, customSegmentLabels: S } = w; | ||
function O(P, X) { | ||
const ee = g.length === 0 ? o(P) : we(s, X); | ||
return w.minAngle + ee * v; | ||
} | ||
const d2 = l3.map((e5, t5) => { | ||
const n5 = t5, r4 = t5 + 1, o5 = c3(a4[n5], n5); | ||
return (c3(a4[r4], r4) + o5) / 2; | ||
}), g2 = r3 - e4.ringWidth - e4.ringInset, p2 = r3 - e4.ringInset, f2 = p2 - (p2 - g2) / 2; | ||
t4.append("g").attr("class", "label").attr("transform", n4).selectAll("text").data(l3).enter().append("text").attr("transform", (t5, n5) => { | ||
const a5 = d2[n5], o5 = `rotate(${a5}) translate(0, ${e4.labelInset - r3})`, i4 = `rotate(${a5}) translate(0, ${e4.labelInset / 2 - f2})`; | ||
return t5.position === "OUTSIDE" ? o5 : i4; | ||
}).text((e5) => e5.text || "").attr("class", "segment-value").style("text-anchor", "middle").style("font-size", (t5) => t5.fontSize || e4.labelFontSize).style("font-weight", "bold").style("fill", (t5) => t5.color || e4.textColor); | ||
}({ config: e3, svg: t3, centerTx: n3, r: r2, ticks: a3, tickData: o3, scale: i2, range: s2 }); | ||
t3.append("g").attr("class", "label").attr("transform", n3).selectAll("text").data(a3).enter().append("text").attr("transform", (t4, n4) => { | ||
const a4 = e3.customSegmentStops.length === 0 ? i2(t4) : vt(o3, n4); | ||
return `rotate(${e3.minAngle + a4 * s2}) translate(0, ${e3.labelInset - r2})`; | ||
}).text(e3.labelFormat).attr("class", "segment-value").style("text-anchor", "middle").style("font-size", e3.labelFontSize).style("font-weight", "bold").style("fill", e3.textColor); | ||
}({ config: t2, svg: o2, centerTx: a2, r: n2 }), { current_value_text: kt({ config: t2, svg: o2 }), pointer: qt({ config: t2, svg: o2, r: n2, centerTx: a2 }) }; | ||
const k = S.map((P, X) => { | ||
const ee = X, te = X + 1, re = O(x[ee], ee); | ||
return (O(x[te], te) + re) / 2; | ||
}), j = Z - w.ringWidth - w.ringInset, C = Z - w.ringInset, N = C - (C - j) / 2; | ||
Q.append("g").attr("class", "label").attr("transform", F).selectAll("text").data(S).enter().append("text").attr("transform", (P, X) => { | ||
const ee = k[X], te = `rotate(${ee}) translate(0, ${w.labelInset - Z})`, re = `rotate(${ee}) translate(0, ${w.labelInset / 2 - N})`; | ||
return P.position === "OUTSIDE" ? te : re; | ||
}).text((P) => P.text || "").attr("class", "segment-value").style("text-anchor", "middle").style("font-size", (P) => P.fontSize || w.labelFontSize).style("font-weight", "bold").style("fill", (P) => P.color || w.textColor); | ||
}({ config: i, svg: c, centerTx: l, r: d, ticks: I, tickData: V, scale: m, range: T }); | ||
c.append("g").attr("class", "label").attr("transform", l).selectAll("text").data(I).enter().append("text").attr("transform", (w, Q) => { | ||
const F = i.customSegmentStops.length === 0 ? m(w) : we(V, Q); | ||
return `rotate(${i.minAngle + F * T}) translate(0, ${i.labelInset - d})`; | ||
}).text((w) => i.segmentValueFormatter(i.labelFormat(w))).attr("class", "segment-value").style("text-anchor", "middle").style("font-size", i.labelFontSize).style("font-weight", "bold").style("fill", i.textColor); | ||
}({ config: t, svg: u, centerTx: a, r }), { current_value_text: qn({ config: t, svg: u }), pointer: Mn({ config: t, svg: u, r, centerTx: a }) }; | ||
}; | ||
function kt({ config: e2, svg: t2 }) { | ||
const n2 = (e2.width + 2 * e2.paddingHorizontal) / 2, r2 = (e2.width + 4 * e2.paddingVertical) / 2; | ||
return t2.append("g").attr("transform", `translate(${n2}, ${r2})`).append("text").attr("class", "current-value").attr("text-anchor", "middle").attr("y", 23).text(e2.currentValue).style("font-size", e2.valueTextFontSize).style("font-weight", e2.valueTextFontWeight).style("fill", e2.textColor); | ||
function qn({ config: e, svg: t }) { | ||
const r = (e.width + 2 * e.paddingHorizontal) / 2, a = (e.width + 4 * e.paddingVertical) / 2; | ||
return t.append("g").attr("transform", `translate(${r}, ${a})`).append("text").attr("class", "current-value").attr("text-anchor", "middle").attr("y", 23).text(e.currentValue).style("font-size", e.valueTextFontSize).style("font-weight", e.valueTextFontWeight).style("fill", e.textColor); | ||
} | ||
function qt({ config: e2, svg: t2, r: n2, centerTx: r2 }) { | ||
const a2 = function({ heightRatio: e3, radius: t3 }) { | ||
if (e3 < 0 || e3 > 1) | ||
throw new Error(`Invalid needleHeightRatio given - ${e3}`); | ||
return Math.round(t3 * e3); | ||
}({ heightRatio: e2.needleHeightRatio, radius: n2 }), o2 = [[e2.pointerWidth / 2, 0], [0, -a2], [-e2.pointerWidth / 2, 0], [0, e2.pointerTailLength], [e2.pointerWidth / 2, 0]], i2 = l().curve(c); | ||
return t2.append("g").data([o2]).attr("class", "pointer").attr("transform", r2).style("fill", e2.needleColor).append("path").attr("d", i2).attr("transform", `rotate(${e2.minAngle})`); | ||
function Mn({ config: e, svg: t, r, centerTx: a }) { | ||
const u = function({ heightRatio: l, radius: d }) { | ||
if (l < 0 || l > 1) | ||
throw new Error(`Invalid needleHeightRatio given - ${l}`); | ||
return Math.round(d * l); | ||
}({ heightRatio: e.needleHeightRatio, radius: r }), i = [[e.pointerWidth / 2, 0], [0, -u], [-e.pointerWidth / 2, 0], [0, e.pointerTailLength], [e.pointerWidth / 2, 0]], c = mr().curve(gr); | ||
return t.append("g").data([i]).attr("class", "pointer").attr("transform", a).style("fill", e.needleColor).append("path").attr("d", c).attr("transform", `rotate(${e.minAngle})`); | ||
} | ||
var Lt = { exports: {} }, Dt = {}, Wt = e, Bt = Symbol.for("react.element"), zt = Symbol.for("react.fragment"), Ut = Object.prototype.hasOwnProperty, Nt = Wt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, Ht = { key: true, ref: true, __self: true, __source: true }; | ||
function Mt(e2, t2, n2) { | ||
var r2, a2 = {}, o2 = null, i2 = null; | ||
for (r2 in n2 !== void 0 && (o2 = "" + n2), t2.key !== void 0 && (o2 = "" + t2.key), t2.ref !== void 0 && (i2 = t2.ref), t2) | ||
Ut.call(t2, r2) && !Ht.hasOwnProperty(r2) && (a2[r2] = t2[r2]); | ||
if (e2 && e2.defaultProps) | ||
for (r2 in t2 = e2.defaultProps) | ||
a2[r2] === void 0 && (a2[r2] = t2[r2]); | ||
return { $$typeof: Bt, type: e2, key: o2, ref: i2, props: a2, _owner: Nt.current }; | ||
var Lt, er = { exports: {} }, ge = {}, Wt, Oe = {}; | ||
/** | ||
* @license React | ||
* react-jsx-runtime.development.js | ||
* | ||
* Copyright (c) Facebook, Inc. and its affiliates. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
function Bn() { | ||
return Wt || (Wt = 1, process.env.NODE_ENV !== "production" && (() => { | ||
var e = zt, t = Symbol.for("react.element"), r = Symbol.for("react.portal"), a = Symbol.for("react.fragment"), u = Symbol.for("react.strict_mode"), i = Symbol.for("react.profiler"), c = Symbol.for("react.provider"), l = Symbol.for("react.context"), d = Symbol.for("react.forward_ref"), I = Symbol.for("react.suspense"), V = Symbol.for("react.suspense_list"), m = Symbol.for("react.memo"), T = Symbol.for("react.lazy"), b = Symbol.for("react.offscreen"), h = Symbol.iterator, E = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; | ||
function w(n) { | ||
for (var y = arguments.length, f = new Array(y > 1 ? y - 1 : 0), D = 1; D < y; D++) | ||
f[D - 1] = arguments[D]; | ||
Q("error", n, f); | ||
} | ||
function Q(n, y, f) { | ||
var D = E.ReactDebugCurrentFrame.getStackAddendum(); | ||
D !== "" && (y += "%s", f = f.concat([D])); | ||
var A = f.map((L) => String(L)); | ||
A.unshift("Warning: " + y), Function.prototype.apply.call(console[n], console, A); | ||
} | ||
var F = Symbol.for("react.module.reference"); | ||
function Z(n) { | ||
return n.displayName || "Context"; | ||
} | ||
function x(n) { | ||
if (n == null) | ||
return null; | ||
if (typeof n.tag == "number" && w("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof n == "function") | ||
return n.displayName || n.name || null; | ||
if (typeof n == "string") | ||
return n; | ||
switch (n) { | ||
case a: | ||
return "Fragment"; | ||
case r: | ||
return "Portal"; | ||
case i: | ||
return "Profiler"; | ||
case u: | ||
return "StrictMode"; | ||
case I: | ||
return "Suspense"; | ||
case V: | ||
return "SuspenseList"; | ||
} | ||
if (typeof n == "object") | ||
switch (n.$$typeof) { | ||
case l: | ||
return Z(n) + ".Consumer"; | ||
case c: | ||
return Z(n._context) + ".Provider"; | ||
case d: | ||
return function(L, W, B) { | ||
var G = L.displayName; | ||
if (G) | ||
return G; | ||
var K = W.displayName || W.name || ""; | ||
return K !== "" ? B + "(" + K + ")" : B; | ||
}(n, n.render, "ForwardRef"); | ||
case m: | ||
var y = n.displayName || null; | ||
return y !== null ? y : x(n.type) || "Memo"; | ||
case T: | ||
var f = n, D = f._payload, A = f._init; | ||
try { | ||
return x(A(D)); | ||
} catch { | ||
return null; | ||
} | ||
} | ||
return null; | ||
} | ||
var s, o, v, g, S, O, k, j = Object.assign, C = 0; | ||
function N() { | ||
} | ||
N.__reactDisabledLog = !0; | ||
var P, X = E.ReactCurrentDispatcher; | ||
function ee(n, y, f) { | ||
if (P === void 0) | ||
try { | ||
throw Error(); | ||
} catch (A) { | ||
var D = A.stack.trim().match(/\n( *(at )?)/); | ||
P = D && D[1] || ""; | ||
} | ||
return ` | ||
` + P + n; | ||
} | ||
var te, re = !1, p = typeof WeakMap == "function" ? WeakMap : Map; | ||
function ce(n, y) { | ||
if (!n || re) | ||
return ""; | ||
var f, D = te.get(n); | ||
if (D !== void 0) | ||
return D; | ||
re = !0; | ||
var A, L = Error.prepareStackTrace; | ||
Error.prepareStackTrace = void 0, A = X.current, X.current = null, function() { | ||
if (C === 0) { | ||
s = console.log, o = console.info, v = console.warn, g = console.error, S = console.group, O = console.groupCollapsed, k = console.groupEnd; | ||
var z = { configurable: !0, enumerable: !0, value: N, writable: !0 }; | ||
Object.defineProperties(console, { info: z, log: z, warn: z, error: z, group: z, groupCollapsed: z, groupEnd: z }); | ||
} | ||
C++; | ||
}(); | ||
try { | ||
if (y) { | ||
var W = () => { | ||
throw Error(); | ||
}; | ||
if (Object.defineProperty(W.prototype, "props", { set: () => { | ||
throw Error(); | ||
} }), typeof Reflect == "object" && Reflect.construct) { | ||
try { | ||
Reflect.construct(W, []); | ||
} catch (z) { | ||
f = z; | ||
} | ||
Reflect.construct(n, [], W); | ||
} else { | ||
try { | ||
W.call(); | ||
} catch (z) { | ||
f = z; | ||
} | ||
n.call(W.prototype); | ||
} | ||
} else { | ||
try { | ||
throw Error(); | ||
} catch (z) { | ||
f = z; | ||
} | ||
n(); | ||
} | ||
} catch (z) { | ||
if (z && f && typeof z.stack == "string") { | ||
for (var B = z.stack.split(` | ||
`), G = f.stack.split(` | ||
`), K = B.length - 1, H = G.length - 1; K >= 1 && H >= 0 && B[K] !== G[H]; ) | ||
H--; | ||
for (; K >= 1 && H >= 0; K--, H--) | ||
if (B[K] !== G[H]) { | ||
if (K !== 1 || H !== 1) | ||
do | ||
if (K--, --H < 0 || B[K] !== G[H]) { | ||
var R = ` | ||
` + B[K].replace(" at new ", " at "); | ||
return n.displayName && R.includes("<anonymous>") && (R = R.replace("<anonymous>", n.displayName)), typeof n == "function" && te.set(n, R), R; | ||
} | ||
while (K >= 1 && H >= 0); | ||
break; | ||
} | ||
} | ||
} finally { | ||
re = !1, X.current = A, function() { | ||
if (--C == 0) { | ||
var z = { configurable: !0, enumerable: !0, writable: !0 }; | ||
Object.defineProperties(console, { log: j({}, z, { value: s }), info: j({}, z, { value: o }), warn: j({}, z, { value: v }), error: j({}, z, { value: g }), group: j({}, z, { value: S }), groupCollapsed: j({}, z, { value: O }), groupEnd: j({}, z, { value: k }) }); | ||
} | ||
C < 0 && w("disabledDepth fell below zero. This is a bug in React. Please file an issue."); | ||
}(), Error.prepareStackTrace = L; | ||
} | ||
var J = n ? n.displayName || n.name : "", _ = J ? ee(J) : ""; | ||
return typeof n == "function" && te.set(n, _), _; | ||
} | ||
function ne(n, y, f) { | ||
if (n == null) | ||
return ""; | ||
if (typeof n == "function") | ||
return ce(n, !(!(D = n.prototype) || !D.isReactComponent)); | ||
var D; | ||
if (typeof n == "string") | ||
return ee(n); | ||
switch (n) { | ||
case I: | ||
return ee("Suspense"); | ||
case V: | ||
return ee("SuspenseList"); | ||
} | ||
if (typeof n == "object") | ||
switch (n.$$typeof) { | ||
case d: | ||
return ce(n.render, !1); | ||
case m: | ||
return ne(n.type, y, f); | ||
case T: | ||
var A = n, L = A._payload, W = A._init; | ||
try { | ||
return ne(W(L), y, f); | ||
} catch { | ||
} | ||
} | ||
return ""; | ||
} | ||
te = new p(); | ||
var ae = Object.prototype.hasOwnProperty, Ye = {}, Ge = E.ReactDebugCurrentFrame; | ||
function xe(n) { | ||
if (n) { | ||
var y = n._owner, f = ne(n.type, n._source, y ? y.type : null); | ||
Ge.setExtraStackFrame(f); | ||
} else | ||
Ge.setExtraStackFrame(null); | ||
} | ||
var tr = Array.isArray; | ||
function Ee(n) { | ||
return tr(n); | ||
} | ||
function Je(n) { | ||
return "" + n; | ||
} | ||
function Xe(n) { | ||
if (function(y) { | ||
try { | ||
return Je(y), !1; | ||
} catch { | ||
return !0; | ||
} | ||
}(n)) | ||
return w("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", function(y) { | ||
return typeof Symbol == "function" && Symbol.toStringTag && y[Symbol.toStringTag] || y.constructor.name || "Object"; | ||
}(n)), Je(n); | ||
} | ||
var Ke, Ze, _e, pe = E.ReactCurrentOwner, rr = { key: !0, ref: !0, __self: !0, __source: !0 }; | ||
_e = {}; | ||
function nr(n, y, f, D, A) { | ||
var L, W = {}, B = null, G = null; | ||
for (L in f !== void 0 && (Xe(f), B = "" + f), function(R) { | ||
if (ae.call(R, "key")) { | ||
var J = Object.getOwnPropertyDescriptor(R, "key").get; | ||
if (J && J.isReactWarning) | ||
return !1; | ||
} | ||
return R.key !== void 0; | ||
}(y) && (Xe(y.key), B = "" + y.key), function(R) { | ||
if (ae.call(R, "ref")) { | ||
var J = Object.getOwnPropertyDescriptor(R, "ref").get; | ||
if (J && J.isReactWarning) | ||
return !1; | ||
} | ||
return R.ref !== void 0; | ||
}(y) && (G = y.ref, function(R, J) { | ||
if (typeof R.ref == "string" && pe.current && J && pe.current.stateNode !== J) { | ||
var _ = x(pe.current.type); | ||
_e[_] || (w('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', x(pe.current.type), R.ref), _e[_] = !0); | ||
} | ||
}(y, A)), y) | ||
ae.call(y, L) && !rr.hasOwnProperty(L) && (W[L] = y[L]); | ||
if (n && n.defaultProps) { | ||
var K = n.defaultProps; | ||
for (L in K) | ||
W[L] === void 0 && (W[L] = K[L]); | ||
} | ||
if (B || G) { | ||
var H = typeof n == "function" ? n.displayName || n.name || "Unknown" : n; | ||
B && function(R, J) { | ||
var _ = () => { | ||
Ke || (Ke = !0, w("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", J)); | ||
}; | ||
_.isReactWarning = !0, Object.defineProperty(R, "key", { get: _, configurable: !0 }); | ||
}(W, H), G && function(R, J) { | ||
var _ = () => { | ||
Ze || (Ze = !0, w("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", J)); | ||
}; | ||
_.isReactWarning = !0, Object.defineProperty(R, "ref", { get: _, configurable: !0 }); | ||
}(W, H); | ||
} | ||
return ((R, J, _, z, de, ye, sr) => { | ||
var fe = { $$typeof: t, type: R, key: J, ref: _, props: sr, _owner: ye, _store: {} }; | ||
return Object.defineProperty(fe._store, "validated", { configurable: !1, enumerable: !1, writable: !0, value: !1 }), Object.defineProperty(fe, "_self", { configurable: !1, enumerable: !1, writable: !1, value: z }), Object.defineProperty(fe, "_source", { configurable: !1, enumerable: !1, writable: !1, value: de }), Object.freeze && (Object.freeze(fe.props), Object.freeze(fe)), fe; | ||
})(n, B, G, A, D, pe.current, W); | ||
} | ||
var Te, Ce = E.ReactCurrentOwner, et = E.ReactDebugCurrentFrame; | ||
function le(n) { | ||
if (n) { | ||
var y = n._owner, f = ne(n.type, n._source, y ? y.type : null); | ||
et.setExtraStackFrame(f); | ||
} else | ||
et.setExtraStackFrame(null); | ||
} | ||
function Re(n) { | ||
return typeof n == "object" && n !== null && n.$$typeof === t; | ||
} | ||
function tt() { | ||
if (Ce.current) { | ||
var n = x(Ce.current.type); | ||
if (n) | ||
return ` | ||
Check the render method of \`` + n + "`."; | ||
} | ||
return ""; | ||
} | ||
Te = !1; | ||
var rt = {}; | ||
function nt(n, y) { | ||
if (n._store && !n._store.validated && n.key == null) { | ||
n._store.validated = !0; | ||
var f = function(A) { | ||
var L = tt(); | ||
if (!L) { | ||
var W = typeof A == "string" ? A : A.displayName || A.name; | ||
W && (L = ` | ||
Check the top-level render call using <` + W + ">."); | ||
} | ||
return L; | ||
}(y); | ||
if (!rt[f]) { | ||
rt[f] = !0; | ||
var D = ""; | ||
n && n._owner && n._owner !== Ce.current && (D = " It was passed a child from " + x(n._owner.type) + "."), le(n), w('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', f, D), le(null); | ||
} | ||
} | ||
} | ||
function ot(n, y) { | ||
if (typeof n == "object") { | ||
if (Ee(n)) | ||
for (var f = 0; f < n.length; f++) { | ||
var D = n[f]; | ||
Re(D) && nt(D, y); | ||
} | ||
else if (Re(n)) | ||
n._store && (n._store.validated = !0); | ||
else if (n) { | ||
var A = function(B) { | ||
if (B === null || typeof B != "object") | ||
return null; | ||
var G = h && B[h] || B["@@iterator"]; | ||
return typeof G == "function" ? G : null; | ||
}(n); | ||
if (typeof A == "function" && A !== n.entries) | ||
for (var L, W = A.call(n); !(L = W.next()).done; ) | ||
Re(L.value) && nt(L.value, y); | ||
} | ||
} | ||
} | ||
function or(n) { | ||
var y, f = n.type; | ||
if (f != null && typeof f != "string") { | ||
if (typeof f == "function") | ||
y = f.propTypes; | ||
else { | ||
if (typeof f != "object" || f.$$typeof !== d && f.$$typeof !== m) | ||
return; | ||
y = f.propTypes; | ||
} | ||
if (y) { | ||
var D = x(f); | ||
(function(A, L, W, B, G) { | ||
var K = Function.call.bind(ae); | ||
for (var H in A) | ||
if (K(A, H)) { | ||
var R = void 0; | ||
try { | ||
if (typeof A[H] != "function") { | ||
var J = Error((B || "React class") + ": " + W + " type `" + H + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof A[H] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."); | ||
throw J.name = "Invariant Violation", J; | ||
} | ||
R = A[H](L, H, B, W, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"); | ||
} catch (_) { | ||
R = _; | ||
} | ||
!R || R instanceof Error || (xe(G), w("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", B || "React class", W, H, typeof R), xe(null)), R instanceof Error && !(R.message in Ye) && (Ye[R.message] = !0, xe(G), w("Failed %s type: %s", W, R.message), xe(null)); | ||
} | ||
})(y, n.props, "prop", D, n); | ||
} else | ||
f.PropTypes !== void 0 && !Te && (Te = !0, w("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", x(f) || "Unknown")); | ||
typeof f.getDefaultProps != "function" || f.getDefaultProps.isReactClassApproved || w("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead."); | ||
} | ||
} | ||
function at(n, y, f, D, A, L) { | ||
var W = function(_) { | ||
return typeof _ == "string" || typeof _ == "function" || _ === a || _ === i || _ === u || _ === I || _ === V || _ === b || typeof _ == "object" && _ !== null && (_.$$typeof === T || _.$$typeof === m || _.$$typeof === c || _.$$typeof === l || _.$$typeof === d || _.$$typeof === F || _.getModuleId !== void 0); | ||
}(n); | ||
if (!W) { | ||
var B = ""; | ||
(n === void 0 || typeof n == "object" && n !== null && Object.keys(n).length === 0) && (B += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."); | ||
var G, K = function(_) { | ||
return _ !== void 0 ? ` | ||
Check your code at ` + _.fileName.replace(/^.*[\\\/]/, "") + ":" + _.lineNumber + "." : ""; | ||
}(A); | ||
B += K || tt(), n === null ? G = "null" : Ee(n) ? G = "array" : n !== void 0 && n.$$typeof === t ? (G = "<" + (x(n.type) || "Unknown") + " />", B = " Did you accidentally export a JSX literal instead of a component?") : G = typeof n, w("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", G, B); | ||
} | ||
var H = nr(n, y, f, A, L); | ||
if (H == null) | ||
return H; | ||
if (W) { | ||
var R = y.children; | ||
if (R !== void 0) | ||
if (D) | ||
if (Ee(R)) { | ||
for (var J = 0; J < R.length; J++) | ||
ot(R[J], n); | ||
Object.freeze && Object.freeze(R); | ||
} else | ||
w("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."); | ||
else | ||
ot(R, n); | ||
} | ||
return n === a ? function(_) { | ||
for (var z = Object.keys(_.props), de = 0; de < z.length; de++) { | ||
var ye = z[de]; | ||
if (ye !== "children" && ye !== "key") { | ||
le(_), w("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", ye), le(null); | ||
break; | ||
} | ||
} | ||
_.ref !== null && (le(_), w("Invalid attribute `ref` supplied to `React.Fragment`."), le(null)); | ||
}(H) : or(H), H; | ||
} | ||
var ar = function(n, y, f) { | ||
return at(n, y, f, !1); | ||
}, ir = function(n, y, f) { | ||
return at(n, y, f, !0); | ||
}; | ||
Oe.Fragment = a, Oe.jsx = ar, Oe.jsxs = ir; | ||
})()), Oe; | ||
} | ||
Dt.Fragment = zt, Dt.jsx = Mt, Dt.jsxs = Mt, Lt.exports = Dt; | ||
const Qt = Lt.exports.jsx; | ||
class Gt extends t { | ||
constructor(e2) { | ||
super(e2); | ||
__publicField(this, "render", () => Qt("div", { ref: (e2) => this.gaugeDiv = e2 })); | ||
this.d3_refs = { pointer: false, current_value_text: false }; | ||
((e) => { | ||
process.env.NODE_ENV === "production" ? e.exports = function() { | ||
if (Lt) | ||
return ge; | ||
Lt = 1; | ||
var t = zt, r = Symbol.for("react.element"), a = Symbol.for("react.fragment"), u = Object.prototype.hasOwnProperty, i = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, c = { key: !0, ref: !0, __self: !0, __source: !0 }; | ||
function l(d, I, V) { | ||
var m, T = {}, b = null, h = null; | ||
for (m in V !== void 0 && (b = "" + V), I.key !== void 0 && (b = "" + I.key), I.ref !== void 0 && (h = I.ref), I) | ||
u.call(I, m) && !c.hasOwnProperty(m) && (T[m] = I[m]); | ||
if (d && d.defaultProps) | ||
for (m in I = d.defaultProps) | ||
T[m] === void 0 && (T[m] = I[m]); | ||
return { $$typeof: r, type: d, key: b, ref: h, props: T, _owner: i.current }; | ||
} | ||
return ge.Fragment = a, ge.jsx = l, ge.jsxs = l, ge; | ||
}() : e.exports = Bn(); | ||
})(er); | ||
const Un = er.exports.jsx; | ||
class Be extends lr { | ||
constructor(r) { | ||
super(r); | ||
$e(this, "render", () => Un("div", { ref: (r) => this.gaugeDiv = r })); | ||
this.d3_refs = { pointer: !1, current_value_text: !1 }; | ||
} | ||
@@ -485,14 +1311,18 @@ componentDidMount() { | ||
renderGauge() { | ||
this.config = (({ PROPS: e2, parentWidth: t2, parentHeight: r2 }) => { | ||
const a2 = { width: e2.fluidWidth ? t2 : e2.width, height: e2.fluidWidth ? r2 : e2.height, paddingHorizontal: e2.paddingHorizontal, paddingVertical: e2.paddingVertical, dimensionUnit: e2.dimensionUnit, ringWidth: e2.ringWidth, minValue: e2.minValue, maxValue: e2.maxValue, needleColor: e2.needleColor, majorTicks: e2.segments, customSegmentStops: e2.customSegmentStops, customSegmentLabels: e2.customSegmentLabels, maxSegmentLabels: xt({ maxSegmentLabelCount: e2.maxSegmentLabels, segmentCount: e2.segments }), segmentColors: e2.segmentColors, arcColorFn: e2.segmentColors.length > 0 ? o(e2.segmentColors) : i(s(e2.startColor), s(e2.endColor)), needleTransition: e2.needleTransition, needleTransitionDuration: e2.needleTransitionDuration, needleHeightRatio: e2.needleHeightRatio, textColor: e2.textColor, labelFormat: n(e2.valueFormat), currentValueText: e2.currentValueText, currentValuePlaceholderStyle: e2.currentValuePlaceholderStyle, labelFontSize: e2.labelFontSize, valueTextFontSize: e2.valueTextFontSize, valueTextFontWeight: e2.valueTextFontWeight, svgAriaLabel: e2.svgAriaLabel }; | ||
return Object.assign({}, Tt, a2); | ||
})({ PROPS: this.props, parentWidth: this.gaugeDiv.parentNode.clientWidth, parentHeight: this.gaugeDiv.parentNode.clientHeight }), r(this.gaugeDiv).select("svg").remove(), this.d3_refs = $t({ container: this.gaugeDiv, config: this.config }), Pt({ d3_refs: this.d3_refs, newValue: this.props.value, config: this.config }); | ||
this.config = (({ PROPS: r, parentWidth: a, parentHeight: u }) => { | ||
const i = { width: r.fluidWidth ? a : r.width, height: r.fluidWidth ? u : r.height, paddingHorizontal: r.paddingHorizontal, paddingVertical: r.paddingVertical, dimensionUnit: r.dimensionUnit, ringWidth: r.ringWidth, minValue: r.minValue, maxValue: r.maxValue, needleColor: r.needleColor, majorTicks: r.segments, customSegmentStops: r.customSegmentStops, customSegmentLabels: r.customSegmentLabels, maxSegmentLabels: Fn({ maxSegmentLabelCount: r.maxSegmentLabels, segmentCount: r.segments }), segmentColors: r.segmentColors, arcColorFn: r.segmentColors.length > 0 ? pr(r.segmentColors) : dr(st(r.startColor), st(r.endColor)), needleTransition: r.needleTransition, needleTransitionDuration: r.needleTransitionDuration, needleHeightRatio: r.needleHeightRatio, textColor: r.textColor, labelFormat: it(r.valueFormat), segmentValueFormatter: r.segmentValueFormatter, currentValueText: r.currentValueText, currentValuePlaceholderStyle: r.currentValuePlaceholderStyle, labelFontSize: r.labelFontSize, valueTextFontSize: r.valueTextFontSize, valueTextFontWeight: r.valueTextFontWeight, svgAriaLabel: r.svgAriaLabel }; | ||
return Object.assign({}, Vn, i); | ||
})({ PROPS: this.props, parentWidth: this.gaugeDiv.parentNode.clientWidth, parentHeight: this.gaugeDiv.parentNode.clientHeight }), qt(this.gaugeDiv).select("svg").remove(), this.d3_refs = zn({ container: this.gaugeDiv, config: this.config }), Dt({ d3_refs: this.d3_refs, newValue: this.props.value, config: this.config }); | ||
} | ||
updateReadings() { | ||
var e2, t2; | ||
this.config = (e2 = this.config, t2 = { labelFormat: n(this.props.valueFormat || ""), currentValueText: this.props.currentValueText || "${value}" }, __spreadValues(__spreadValues({}, e2), t2)), Pt({ d3_refs: this.d3_refs, newValue: this.props.value || 0, config: this.config }); | ||
var r, a; | ||
this.config = (r = this.config, a = { labelFormat: it(this.props.valueFormat || ""), segmentValueFormatter: this.props.segmentValueFormatter || Zt, currentValueText: this.props.currentValueText || "${value}" }, { ...r, ...a }), Dt({ d3_refs: this.d3_refs, newValue: this.props.value || 0, config: this.config }); | ||
} | ||
} | ||
__publicField(Gt, "displayName", "ReactSpeedometer"); | ||
Gt.propTypes = { value: H.number.isRequired, minValue: H.number.isRequired, maxValue: H.number.isRequired, forceRender: H.bool.isRequired, width: H.number.isRequired, height: H.number.isRequired, paddingHorizontal: H.number.isRequired, paddingVertical: H.number.isRequired, dimensionUnit: H.string.isRequired, fluidWidth: H.bool.isRequired, segments: H.number.isRequired, maxSegmentLabels: H.number, customSegmentStops: H.array, customSegmentLabels: H.arrayOf(H.shape({ text: H.string, position: H.oneOf(["OUTSIDE", "INSIDE"]), fontSize: H.string, color: H.string })), needleColor: H.string.isRequired, startColor: H.string.isRequired, endColor: H.string.isRequired, segmentColors: H.array.isRequired, needleTransition: H.string.isRequired, needleTransitionDuration: H.number.isRequired, needleHeightRatio: H.number.isRequired, ringWidth: H.number.isRequired, textColor: H.string.isRequired, valueFormat: H.string.isRequired, currentValueText: H.string.isRequired, currentValuePlaceholderStyle: H.string.isRequired, labelFontSize: H.string.isRequired, valueTextFontSize: H.string.isRequired, valueTextFontWeight: H.string.isRequired }, Gt.defaultProps = jt; | ||
export { St as CustomSegmentLabelPosition, It as Transition, Gt as default }; | ||
$e(Be, "displayName", "ReactSpeedometer"); | ||
Be.propTypes = { value: $.exports.number.isRequired, minValue: $.exports.number.isRequired, maxValue: $.exports.number.isRequired, forceRender: $.exports.bool.isRequired, width: $.exports.number.isRequired, height: $.exports.number.isRequired, paddingHorizontal: $.exports.number.isRequired, paddingVertical: $.exports.number.isRequired, dimensionUnit: $.exports.string.isRequired, fluidWidth: $.exports.bool.isRequired, segments: $.exports.number.isRequired, maxSegmentLabels: $.exports.number, customSegmentStops: $.exports.array, customSegmentLabels: $.exports.arrayOf($.exports.shape({ text: $.exports.string, position: $.exports.oneOf(["OUTSIDE", "INSIDE"]), fontSize: $.exports.string, color: $.exports.string })), needleColor: $.exports.string.isRequired, startColor: $.exports.string.isRequired, endColor: $.exports.string.isRequired, segmentColors: $.exports.array.isRequired, needleTransition: $.exports.string.isRequired, needleTransitionDuration: $.exports.number.isRequired, needleHeightRatio: $.exports.number.isRequired, ringWidth: $.exports.number.isRequired, textColor: $.exports.string.isRequired, valueFormat: $.exports.string.isRequired, segmentValueFormatter: $.exports.func, currentValueText: $.exports.string.isRequired, currentValuePlaceholderStyle: $.exports.string.isRequired, labelFontSize: $.exports.string.isRequired, valueTextFontSize: $.exports.string.isRequired, valueTextFontWeight: $.exports.string.isRequired, svgAriaLabel: $.exports.string }, Be.defaultProps = An; | ||
export { | ||
no as CustomSegmentLabelPosition, | ||
M as Transition, | ||
Be as default | ||
}; |
{ | ||
"name": "react-d3-speedometer", | ||
"version": "2.0.0-rc.3", | ||
"version": "2.1.0-rc.0", | ||
"description": "React library for showing speedometer like gauge using d3.", | ||
@@ -58,3 +58,3 @@ "author": { | ||
"build-storybook": "build-storybook", | ||
"prepublish": "npm run build" | ||
"prepublishOnly": "npm run build" | ||
}, | ||
@@ -65,14 +65,14 @@ "devDependencies": { | ||
"@rollup/plugin-node-resolve": "^13.1.3", | ||
"@storybook/addon-actions": "^6.4.21", | ||
"@storybook/addon-docs": "^6.4.21", | ||
"@storybook/addon-essentials": "^6.4.21", | ||
"@storybook/addon-actions": "^6.5.12", | ||
"@storybook/addon-docs": "^6.5.12", | ||
"@storybook/addon-essentials": "^6.5.12", | ||
"@storybook/addon-info": "^6.0.0-alpha.2", | ||
"@storybook/addon-interactions": "^6.4.21", | ||
"@storybook/addon-interactions": "^6.5.12", | ||
"@storybook/addon-knobs": "^6.4.0", | ||
"@storybook/addon-links": "^6.4.21", | ||
"@storybook/addon-storysource": "^6.4.21", | ||
"@storybook/builder-vite": "^0.1.26", | ||
"@storybook/react": "^6.4.21", | ||
"@storybook/testing-library": "^0.0.9", | ||
"@storybook/theming": "^6.4.21", | ||
"@storybook/addon-links": "^6.5.12", | ||
"@storybook/addon-storysource": "^6.5.12", | ||
"@storybook/builder-vite": "^0.2.3", | ||
"@storybook/react": "^6.5.12", | ||
"@storybook/testing-library": "^0.0.13", | ||
"@storybook/theming": "^6.5.12", | ||
"@testing-library/jest-dom": "^5.16.4", | ||
@@ -98,3 +98,4 @@ "@testing-library/react": "^13.0.0", | ||
"rollup-plugin-terser": "^7.0.2", | ||
"vite": "^2.9.1", | ||
"typescript": "^4.8.4", | ||
"vite": "^3.1.3", | ||
"vitest": "^0.8.4", | ||
@@ -101,0 +102,0 @@ "webpack": "^5.72.0" |
@@ -87,2 +87,3 @@ # react-d3-speedometer | ||
| valueFormat | String | | should be a valid format for [d3-format](https://github.com/d3/d3-format#locale_format). By default, no formatter is used. You can use a valid d3 format identifier (for eg: `d` to convert float to integers), to format the values. **Note:** This formatter affects all the values (current value, segment values) displayed in the speedometer | | ||
| segmentValueFormatter | Function | value => value | Custom segment values formatter function. This function is applied after 'valueFormat' prop if present. | | ||
| currentValueText | String | ${value} | Should be provided a string which should have **${value}** placeholder which will be replaced with current value. By default, current value is shown (formatted with `valueFormat`). For example, if current Value is 333 if you would like to show `Current Value: 333`, you should provide a string **`Current Value: ${value}`**. See [Live Example](https://palerdot.in/react-d3-speedometer/?selectedKind=react-d3-speedometer&selectedStory=Custom%20Current%20Value%20Text&full=0&down=1&left=1&panelRight=0) | | ||
@@ -89,0 +90,0 @@ | currentValuePlaceholderStyle | String | ${value} | Should be provided a placeholder string which will be replaced with current value in `currentValueTextProp`. For example: you can use ruby like interpolation by giving following props - `<ReactSpeedometer currentValueText="Current Value: #{value}" currentValuePlaceholderStyle={"#{value}"} />`. This is also helpful if you face `no-template-curly-in-string` eslint warnings and would like to use different placeholder for current value | |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
330177
5182
360
39
39