react-contribution-calendar
Advanced tools
Comparing version 1.2.7 to 1.2.9
import './styles/style.css'; | ||
import Je, { useRef as gr, useState as mr, useEffect as Er } from "react"; | ||
var ye = { exports: {} }, q = {}; | ||
import Je, { useRef as Er, useState as _r, useEffect as Rr } from "react"; | ||
var me = { exports: {} }, z = {}; | ||
/** | ||
@@ -14,20 +14,20 @@ * @license React | ||
var We; | ||
function _r() { | ||
function Sr() { | ||
if (We) | ||
return q; | ||
return z; | ||
We = 1; | ||
var t = Je, l = Symbol.for("react.element"), o = Symbol.for("react.fragment"), a = Object.prototype.hasOwnProperty, h = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, b = { key: !0, ref: !0, __self: !0, __source: !0 }; | ||
function i(u, d, E) { | ||
var c, f = {}, m = null, p = null; | ||
E !== void 0 && (m = "" + E), d.key !== void 0 && (m = "" + d.key), d.ref !== void 0 && (p = d.ref); | ||
for (c in d) | ||
a.call(d, c) && !b.hasOwnProperty(c) && (f[c] = d[c]); | ||
if (u && u.defaultProps) | ||
for (c in d = u.defaultProps, d) | ||
f[c] === void 0 && (f[c] = d[c]); | ||
return { $$typeof: l, type: u, key: m, ref: p, props: f, _owner: h.current }; | ||
var t = Je, l = Symbol.for("react.element"), o = Symbol.for("react.fragment"), a = Object.prototype.hasOwnProperty, u = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, h = { key: !0, ref: !0, __self: !0, __source: !0 }; | ||
function c(s, i, g) { | ||
var d, v = {}, R = null, T = null; | ||
g !== void 0 && (R = "" + g), i.key !== void 0 && (R = "" + i.key), i.ref !== void 0 && (T = i.ref); | ||
for (d in i) | ||
a.call(i, d) && !h.hasOwnProperty(d) && (v[d] = i[d]); | ||
if (s && s.defaultProps) | ||
for (d in i = s.defaultProps, i) | ||
v[d] === void 0 && (v[d] = i[d]); | ||
return { $$typeof: l, type: s, key: R, ref: T, props: v, _owner: u.current }; | ||
} | ||
return q.Fragment = o, q.jsx = i, q.jsxs = i, q; | ||
return z.Fragment = o, z.jsx = c, z.jsxs = c, z; | ||
} | ||
var z = {}; | ||
var q = {}; | ||
/** | ||
@@ -42,24 +42,24 @@ * @license React | ||
*/ | ||
var Be; | ||
function Rr() { | ||
return Be || (Be = 1, process.env.NODE_ENV !== "production" && function() { | ||
var t = Je, l = Symbol.for("react.element"), o = Symbol.for("react.portal"), a = Symbol.for("react.fragment"), h = Symbol.for("react.strict_mode"), b = Symbol.for("react.profiler"), i = Symbol.for("react.provider"), u = Symbol.for("react.context"), d = Symbol.for("react.forward_ref"), E = Symbol.for("react.suspense"), c = Symbol.for("react.suspense_list"), f = Symbol.for("react.memo"), m = Symbol.for("react.lazy"), p = Symbol.for("react.offscreen"), R = Symbol.iterator, O = "@@iterator"; | ||
function A(e) { | ||
var Le; | ||
function Dr() { | ||
return Le || (Le = 1, process.env.NODE_ENV !== "production" && function() { | ||
var t = Je, l = Symbol.for("react.element"), o = Symbol.for("react.portal"), a = Symbol.for("react.fragment"), u = Symbol.for("react.strict_mode"), h = Symbol.for("react.profiler"), c = Symbol.for("react.provider"), s = Symbol.for("react.context"), i = Symbol.for("react.forward_ref"), g = Symbol.for("react.suspense"), d = Symbol.for("react.suspense_list"), v = Symbol.for("react.memo"), R = Symbol.for("react.lazy"), T = Symbol.for("react.offscreen"), E = Symbol.iterator, F = "@@iterator"; | ||
function C(e) { | ||
if (e === null || typeof e != "object") | ||
return null; | ||
var r = R && e[R] || e[O]; | ||
var r = E && e[E] || e[F]; | ||
return typeof r == "function" ? r : null; | ||
} | ||
var k = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; | ||
function T(e) { | ||
var j = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; | ||
function S(e) { | ||
{ | ||
for (var r = arguments.length, n = new Array(r > 1 ? r - 1 : 0), s = 1; s < r; s++) | ||
n[s - 1] = arguments[s]; | ||
le("error", e, n); | ||
for (var r = arguments.length, n = new Array(r > 1 ? r - 1 : 0), f = 1; f < r; f++) | ||
n[f - 1] = arguments[f]; | ||
J("error", e, n); | ||
} | ||
} | ||
function le(e, r, n) { | ||
function J(e, r, n) { | ||
{ | ||
var s = k.ReactDebugCurrentFrame, g = s.getStackAddendum(); | ||
g !== "" && (r += "%s", n = n.concat([g])); | ||
var f = j.ReactDebugCurrentFrame, b = f.getStackAddendum(); | ||
b !== "" && (r += "%s", n = n.concat([b])); | ||
var _ = n.map(function(y) { | ||
@@ -71,25 +71,25 @@ return String(y); | ||
} | ||
var Ee = !1, H = !1, ae = !1, oe = !1, ie = !1, $; | ||
$ = Symbol.for("react.module.reference"); | ||
function M(e) { | ||
return !!(typeof e == "string" || typeof e == "function" || e === a || e === b || ie || e === h || e === E || e === c || oe || e === p || Ee || H || ae || typeof e == "object" && e !== null && (e.$$typeof === m || e.$$typeof === f || e.$$typeof === i || e.$$typeof === u || e.$$typeof === d || // This needs to include all possible module reference object | ||
var ie = !1, H = !1, se = !1, fe = !1, ce = !1, G; | ||
G = Symbol.for("react.module.reference"); | ||
function I(e) { | ||
return !!(typeof e == "string" || typeof e == "function" || e === a || e === h || ce || e === u || e === g || e === d || fe || e === T || ie || H || se || typeof e == "object" && e !== null && (e.$$typeof === R || e.$$typeof === v || e.$$typeof === c || e.$$typeof === s || e.$$typeof === i || // This needs to include all possible module reference object | ||
// types supported by any Flight configuration anywhere since | ||
// we don't know which Flight build this will end up being used | ||
// with. | ||
e.$$typeof === $ || e.getModuleId !== void 0)); | ||
e.$$typeof === G || e.getModuleId !== void 0)); | ||
} | ||
function P(e, r, n) { | ||
var s = e.displayName; | ||
if (s) | ||
return s; | ||
var g = r.displayName || r.name || ""; | ||
return g !== "" ? n + "(" + g + ")" : n; | ||
function M(e, r, n) { | ||
var f = e.displayName; | ||
if (f) | ||
return f; | ||
var b = r.displayName || r.name || ""; | ||
return b !== "" ? n + "(" + b + ")" : n; | ||
} | ||
function Y(e) { | ||
function O(e) { | ||
return e.displayName || "Context"; | ||
} | ||
function w(e) { | ||
function A(e) { | ||
if (e == null) | ||
return null; | ||
if (typeof e.tag == "number" && T("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function") | ||
if (typeof e.tag == "number" && S("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function") | ||
return e.displayName || e.name || null; | ||
@@ -103,9 +103,9 @@ if (typeof e == "string") | ||
return "Portal"; | ||
case b: | ||
case h: | ||
return "Profiler"; | ||
case h: | ||
case u: | ||
return "StrictMode"; | ||
case E: | ||
case g: | ||
return "Suspense"; | ||
case c: | ||
case d: | ||
return "SuspenseList"; | ||
@@ -115,17 +115,17 @@ } | ||
switch (e.$$typeof) { | ||
case u: | ||
case s: | ||
var r = e; | ||
return Y(r) + ".Consumer"; | ||
return O(r) + ".Consumer"; | ||
case c: | ||
var n = e; | ||
return O(n._context) + ".Provider"; | ||
case i: | ||
var n = e; | ||
return Y(n._context) + ".Provider"; | ||
case d: | ||
return P(e, e.render, "ForwardRef"); | ||
case f: | ||
var s = e.displayName || null; | ||
return s !== null ? s : w(e.type) || "Memo"; | ||
case m: { | ||
var g = e, _ = g._payload, y = g._init; | ||
return M(e, e.render, "ForwardRef"); | ||
case v: | ||
var f = e.displayName || null; | ||
return f !== null ? f : A(e.type) || "Memo"; | ||
case R: { | ||
var b = e, _ = b._payload, y = b._init; | ||
try { | ||
return w(y(_)); | ||
return A(y(_)); | ||
} catch { | ||
@@ -138,14 +138,14 @@ return null; | ||
} | ||
var F = Object.assign, N = 0, G, K, X, _e, Re, De, Se; | ||
function xe() { | ||
var x = Object.assign, P = 0, K, X, Z, Q, Re, Se, De; | ||
function Te() { | ||
} | ||
xe.__reactDisabledLog = !0; | ||
function ze() { | ||
Te.__reactDisabledLog = !0; | ||
function Ge() { | ||
{ | ||
if (N === 0) { | ||
G = console.log, K = console.info, X = console.warn, _e = console.error, Re = console.group, De = console.groupCollapsed, Se = console.groupEnd; | ||
if (P === 0) { | ||
K = console.log, X = console.info, Z = console.warn, Q = console.error, Re = console.group, Se = console.groupCollapsed, De = console.groupEnd; | ||
var e = { | ||
configurable: !0, | ||
enumerable: !0, | ||
value: xe, | ||
value: Te, | ||
writable: !0 | ||
@@ -163,8 +163,8 @@ }; | ||
} | ||
N++; | ||
P++; | ||
} | ||
} | ||
function He() { | ||
function Ke() { | ||
{ | ||
if (N--, N === 0) { | ||
if (P--, P === 0) { | ||
var e = { | ||
@@ -176,61 +176,61 @@ configurable: !0, | ||
Object.defineProperties(console, { | ||
log: F({}, e, { | ||
value: G | ||
}), | ||
info: F({}, e, { | ||
log: x({}, e, { | ||
value: K | ||
}), | ||
warn: F({}, e, { | ||
info: x({}, e, { | ||
value: X | ||
}), | ||
error: F({}, e, { | ||
value: _e | ||
warn: x({}, e, { | ||
value: Z | ||
}), | ||
group: F({}, e, { | ||
error: x({}, e, { | ||
value: Q | ||
}), | ||
group: x({}, e, { | ||
value: Re | ||
}), | ||
groupCollapsed: F({}, e, { | ||
groupCollapsed: x({}, e, { | ||
value: Se | ||
}), | ||
groupEnd: x({}, e, { | ||
value: De | ||
}), | ||
groupEnd: F({}, e, { | ||
value: Se | ||
}) | ||
}); | ||
} | ||
N < 0 && T("disabledDepth fell below zero. This is a bug in React. Please file an issue."); | ||
P < 0 && S("disabledDepth fell below zero. This is a bug in React. Please file an issue."); | ||
} | ||
} | ||
var se = k.ReactCurrentDispatcher, fe; | ||
function Z(e, r, n) { | ||
var ue = j.ReactCurrentDispatcher, de; | ||
function ee(e, r, n) { | ||
{ | ||
if (fe === void 0) | ||
if (de === void 0) | ||
try { | ||
throw Error(); | ||
} catch (g) { | ||
var s = g.stack.trim().match(/\n( *(at )?)/); | ||
fe = s && s[1] || ""; | ||
} catch (b) { | ||
var f = b.stack.trim().match(/\n( *(at )?)/); | ||
de = f && f[1] || ""; | ||
} | ||
return ` | ||
` + fe + e; | ||
` + de + e; | ||
} | ||
} | ||
var ce = !1, Q; | ||
var ve = !1, re; | ||
{ | ||
var Ge = typeof WeakMap == "function" ? WeakMap : Map; | ||
Q = new Ge(); | ||
var Xe = typeof WeakMap == "function" ? WeakMap : Map; | ||
re = new Xe(); | ||
} | ||
function Te(e, r) { | ||
if (!e || ce) | ||
function we(e, r) { | ||
if (!e || ve) | ||
return ""; | ||
{ | ||
var n = Q.get(e); | ||
var n = re.get(e); | ||
if (n !== void 0) | ||
return n; | ||
} | ||
var s; | ||
ce = !0; | ||
var g = Error.prepareStackTrace; | ||
var f; | ||
ve = !0; | ||
var b = Error.prepareStackTrace; | ||
Error.prepareStackTrace = void 0; | ||
var _; | ||
_ = se.current, se.current = null, ze(); | ||
_ = ue.current, ue.current = null, Ge(); | ||
try { | ||
@@ -248,4 +248,4 @@ if (r) { | ||
Reflect.construct(y, []); | ||
} catch (I) { | ||
s = I; | ||
} catch (N) { | ||
f = N; | ||
} | ||
@@ -256,4 +256,4 @@ Reflect.construct(e, [], y); | ||
y.call(); | ||
} catch (I) { | ||
s = I; | ||
} catch (N) { | ||
f = N; | ||
} | ||
@@ -265,23 +265,23 @@ e.call(y.prototype); | ||
throw Error(); | ||
} catch (I) { | ||
s = I; | ||
} catch (N) { | ||
f = N; | ||
} | ||
e(); | ||
} | ||
} catch (I) { | ||
if (I && s && typeof I.stack == "string") { | ||
for (var v = I.stack.split(` | ||
`), C = s.stack.split(` | ||
`), D = v.length - 1, S = C.length - 1; D >= 1 && S >= 0 && v[D] !== C[S]; ) | ||
S--; | ||
for (; D >= 1 && S >= 0; D--, S--) | ||
if (v[D] !== C[S]) { | ||
if (D !== 1 || S !== 1) | ||
} catch (N) { | ||
if (N && f && typeof N.stack == "string") { | ||
for (var p = N.stack.split(` | ||
`), k = f.stack.split(` | ||
`), D = p.length - 1, w = k.length - 1; D >= 1 && w >= 0 && p[D] !== k[w]; ) | ||
w--; | ||
for (; D >= 1 && w >= 0; D--, w--) | ||
if (p[D] !== k[w]) { | ||
if (D !== 1 || w !== 1) | ||
do | ||
if (D--, S--, S < 0 || v[D] !== C[S]) { | ||
var j = ` | ||
` + v[D].replace(" at new ", " at "); | ||
return e.displayName && j.includes("<anonymous>") && (j = j.replace("<anonymous>", e.displayName)), typeof e == "function" && Q.set(e, j), j; | ||
if (D--, w--, w < 0 || p[D] !== k[w]) { | ||
var $ = ` | ||
` + p[D].replace(" at new ", " at "); | ||
return e.displayName && $.includes("<anonymous>") && ($ = $.replace("<anonymous>", e.displayName)), typeof e == "function" && re.set(e, $), $; | ||
} | ||
while (D >= 1 && S >= 0); | ||
while (D >= 1 && w >= 0); | ||
break; | ||
@@ -291,37 +291,37 @@ } | ||
} finally { | ||
ce = !1, se.current = _, He(), Error.prepareStackTrace = g; | ||
ve = !1, ue.current = _, Ke(), Error.prepareStackTrace = b; | ||
} | ||
var B = e ? e.displayName || e.name : "", Ye = B ? Z(B) : ""; | ||
return typeof e == "function" && Q.set(e, Ye), Ye; | ||
var W = e ? e.displayName || e.name : "", Ye = W ? ee(W) : ""; | ||
return typeof e == "function" && re.set(e, Ye), Ye; | ||
} | ||
function Ke(e, r, n) { | ||
return Te(e, !1); | ||
function Ze(e, r, n) { | ||
return we(e, !1); | ||
} | ||
function Xe(e) { | ||
function Qe(e) { | ||
var r = e.prototype; | ||
return !!(r && r.isReactComponent); | ||
} | ||
function ee(e, r, n) { | ||
function te(e, r, n) { | ||
if (e == null) | ||
return ""; | ||
if (typeof e == "function") | ||
return Te(e, Xe(e)); | ||
return we(e, Qe(e)); | ||
if (typeof e == "string") | ||
return Z(e); | ||
return ee(e); | ||
switch (e) { | ||
case E: | ||
return Z("Suspense"); | ||
case c: | ||
return Z("SuspenseList"); | ||
case g: | ||
return ee("Suspense"); | ||
case d: | ||
return ee("SuspenseList"); | ||
} | ||
if (typeof e == "object") | ||
switch (e.$$typeof) { | ||
case d: | ||
return Ke(e.render); | ||
case f: | ||
return ee(e.type, r, n); | ||
case m: { | ||
var s = e, g = s._payload, _ = s._init; | ||
case i: | ||
return Ze(e.render); | ||
case v: | ||
return te(e.type, r, n); | ||
case R: { | ||
var f = e, b = f._payload, _ = f._init; | ||
try { | ||
return ee(_(g), r, n); | ||
return te(_(b), r, n); | ||
} catch { | ||
@@ -333,34 +333,34 @@ } | ||
} | ||
var re = Object.prototype.hasOwnProperty, we = {}, Fe = k.ReactDebugCurrentFrame; | ||
function te(e) { | ||
var ne = Object.prototype.hasOwnProperty, Fe = {}, je = j.ReactDebugCurrentFrame; | ||
function le(e) { | ||
if (e) { | ||
var r = e._owner, n = ee(e.type, e._source, r ? r.type : null); | ||
Fe.setExtraStackFrame(n); | ||
var r = e._owner, n = te(e.type, e._source, r ? r.type : null); | ||
je.setExtraStackFrame(n); | ||
} else | ||
Fe.setExtraStackFrame(null); | ||
je.setExtraStackFrame(null); | ||
} | ||
function Ze(e, r, n, s, g) { | ||
function er(e, r, n, f, b) { | ||
{ | ||
var _ = Function.call.bind(re); | ||
var _ = Function.call.bind(ne); | ||
for (var y in e) | ||
if (_(e, y)) { | ||
var v = void 0; | ||
var p = void 0; | ||
try { | ||
if (typeof e[y] != "function") { | ||
var C = Error((s || "React class") + ": " + n + " type `" + y + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[y] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."); | ||
throw C.name = "Invariant Violation", C; | ||
var k = Error((f || "React class") + ": " + n + " type `" + y + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[y] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."); | ||
throw k.name = "Invariant Violation", k; | ||
} | ||
v = e[y](r, y, s, n, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"); | ||
p = e[y](r, y, f, n, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"); | ||
} catch (D) { | ||
v = D; | ||
p = D; | ||
} | ||
v && !(v instanceof Error) && (te(g), T("%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).", s || "React class", n, y, typeof v), te(null)), v instanceof Error && !(v.message in we) && (we[v.message] = !0, te(g), T("Failed %s type: %s", n, v.message), te(null)); | ||
p && !(p instanceof Error) && (le(b), S("%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).", f || "React class", n, y, typeof p), le(null)), p instanceof Error && !(p.message in Fe) && (Fe[p.message] = !0, le(b), S("Failed %s type: %s", n, p.message), le(null)); | ||
} | ||
} | ||
} | ||
var Qe = Array.isArray; | ||
function ue(e) { | ||
return Qe(e); | ||
var rr = Array.isArray; | ||
function pe(e) { | ||
return rr(e); | ||
} | ||
function er(e) { | ||
function tr(e) { | ||
{ | ||
@@ -371,5 +371,5 @@ var r = typeof Symbol == "function" && Symbol.toStringTag, n = r && e[Symbol.toStringTag] || e.constructor.name || "Object"; | ||
} | ||
function rr(e) { | ||
function nr(e) { | ||
try { | ||
return Ce(e), !1; | ||
return xe(e), !1; | ||
} catch { | ||
@@ -379,10 +379,10 @@ return !0; | ||
} | ||
function Ce(e) { | ||
function xe(e) { | ||
return "" + e; | ||
} | ||
function Oe(e) { | ||
if (rr(e)) | ||
return T("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", er(e)), Ce(e); | ||
function Ce(e) { | ||
if (nr(e)) | ||
return S("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", tr(e)), xe(e); | ||
} | ||
var U = k.ReactCurrentOwner, tr = { | ||
var U = j.ReactCurrentOwner, lr = { | ||
key: !0, | ||
@@ -392,6 +392,6 @@ ref: !0, | ||
__source: !0 | ||
}, je, ke, de; | ||
de = {}; | ||
function nr(e) { | ||
if (re.call(e, "ref")) { | ||
}, Oe, ke, ye; | ||
ye = {}; | ||
function ar(e) { | ||
if (ne.call(e, "ref")) { | ||
var r = Object.getOwnPropertyDescriptor(e, "ref").get; | ||
@@ -403,4 +403,4 @@ if (r && r.isReactWarning) | ||
} | ||
function lr(e) { | ||
if (re.call(e, "key")) { | ||
function or(e) { | ||
if (ne.call(e, "key")) { | ||
var r = Object.getOwnPropertyDescriptor(e, "key").get; | ||
@@ -412,12 +412,12 @@ if (r && r.isReactWarning) | ||
} | ||
function ar(e, r) { | ||
function ir(e, r) { | ||
if (typeof e.ref == "string" && U.current && r && U.current.stateNode !== r) { | ||
var n = w(U.current.type); | ||
de[n] || (T('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', w(U.current.type), e.ref), de[n] = !0); | ||
var n = A(U.current.type); | ||
ye[n] || (S('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', A(U.current.type), e.ref), ye[n] = !0); | ||
} | ||
} | ||
function or(e, r) { | ||
function sr(e, r) { | ||
{ | ||
var n = function() { | ||
je || (je = !0, T("%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)", r)); | ||
Oe || (Oe = !0, S("%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)", r)); | ||
}; | ||
@@ -430,6 +430,6 @@ n.isReactWarning = !0, Object.defineProperty(e, "key", { | ||
} | ||
function ir(e, r) { | ||
function fr(e, r) { | ||
{ | ||
var n = function() { | ||
ke || (ke = !0, T("%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)", r)); | ||
ke || (ke = !0, S("%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)", r)); | ||
}; | ||
@@ -442,4 +442,4 @@ n.isReactWarning = !0, Object.defineProperty(e, "ref", { | ||
} | ||
var sr = function(e, r, n, s, g, _, y) { | ||
var v = { | ||
var cr = function(e, r, n, f, b, _, y) { | ||
var p = { | ||
// This tag allows us to uniquely identify this as a React Element | ||
@@ -455,3 +455,3 @@ $$typeof: l, | ||
}; | ||
return v._store = {}, Object.defineProperty(v._store, "validated", { | ||
return p._store = {}, Object.defineProperty(p._store, "validated", { | ||
configurable: !1, | ||
@@ -461,20 +461,20 @@ enumerable: !1, | ||
value: !1 | ||
}), Object.defineProperty(v, "_self", { | ||
}), Object.defineProperty(p, "_self", { | ||
configurable: !1, | ||
enumerable: !1, | ||
writable: !1, | ||
value: s | ||
}), Object.defineProperty(v, "_source", { | ||
value: f | ||
}), Object.defineProperty(p, "_source", { | ||
configurable: !1, | ||
enumerable: !1, | ||
writable: !1, | ||
value: g | ||
}), Object.freeze && (Object.freeze(v.props), Object.freeze(v)), v; | ||
value: b | ||
}), Object.freeze && (Object.freeze(p.props), Object.freeze(p)), p; | ||
}; | ||
function fr(e, r, n, s, g) { | ||
function ur(e, r, n, f, b) { | ||
{ | ||
var _, y = {}, v = null, C = null; | ||
n !== void 0 && (Oe(n), v = "" + n), lr(r) && (Oe(r.key), v = "" + r.key), nr(r) && (C = r.ref, ar(r, g)); | ||
var _, y = {}, p = null, k = null; | ||
n !== void 0 && (Ce(n), p = "" + n), or(r) && (Ce(r.key), p = "" + r.key), ar(r) && (k = r.ref, ir(r, b)); | ||
for (_ in r) | ||
re.call(r, _) && !tr.hasOwnProperty(_) && (y[_] = r[_]); | ||
ne.call(r, _) && !lr.hasOwnProperty(_) && (y[_] = r[_]); | ||
if (e && e.defaultProps) { | ||
@@ -485,13 +485,13 @@ var D = e.defaultProps; | ||
} | ||
if (v || C) { | ||
var S = typeof e == "function" ? e.displayName || e.name || "Unknown" : e; | ||
v && or(y, S), C && ir(y, S); | ||
if (p || k) { | ||
var w = typeof e == "function" ? e.displayName || e.name || "Unknown" : e; | ||
p && sr(y, w), k && fr(y, w); | ||
} | ||
return sr(e, v, C, g, s, U.current, y); | ||
return cr(e, p, k, b, f, U.current, y); | ||
} | ||
} | ||
var ve = k.ReactCurrentOwner, Pe = k.ReactDebugCurrentFrame; | ||
function W(e) { | ||
var he = j.ReactCurrentOwner, Pe = j.ReactDebugCurrentFrame; | ||
function Y(e) { | ||
if (e) { | ||
var r = e._owner, n = ee(e.type, e._source, r ? r.type : null); | ||
var r = e._owner, n = te(e.type, e._source, r ? r.type : null); | ||
Pe.setExtraStackFrame(n); | ||
@@ -501,5 +501,5 @@ } else | ||
} | ||
var pe; | ||
pe = !1; | ||
function he(e) { | ||
var ge; | ||
ge = !1; | ||
function be(e) { | ||
return typeof e == "object" && e !== null && e.$$typeof === l; | ||
@@ -509,4 +509,4 @@ } | ||
{ | ||
if (ve.current) { | ||
var e = w(ve.current.type); | ||
if (he.current) { | ||
var e = A(he.current.type); | ||
if (e) | ||
@@ -520,3 +520,3 @@ return ` | ||
} | ||
function cr(e) { | ||
function dr(e) { | ||
{ | ||
@@ -532,4 +532,4 @@ if (e !== void 0) { | ||
} | ||
var Me = {}; | ||
function ur(e) { | ||
var $e = {}; | ||
function vr(e) { | ||
{ | ||
@@ -546,3 +546,3 @@ var r = Ae(); | ||
} | ||
function Ie(e, r) { | ||
function Me(e, r) { | ||
{ | ||
@@ -552,30 +552,30 @@ if (!e._store || e._store.validated || e.key != null) | ||
e._store.validated = !0; | ||
var n = ur(r); | ||
if (Me[n]) | ||
var n = vr(r); | ||
if ($e[n]) | ||
return; | ||
Me[n] = !0; | ||
var s = ""; | ||
e && e._owner && e._owner !== ve.current && (s = " It was passed a child from " + w(e._owner.type) + "."), W(e), T('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', n, s), W(null); | ||
$e[n] = !0; | ||
var f = ""; | ||
e && e._owner && e._owner !== he.current && (f = " It was passed a child from " + A(e._owner.type) + "."), Y(e), S('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', n, f), Y(null); | ||
} | ||
} | ||
function $e(e, r) { | ||
function Ne(e, r) { | ||
{ | ||
if (typeof e != "object") | ||
return; | ||
if (ue(e)) | ||
if (pe(e)) | ||
for (var n = 0; n < e.length; n++) { | ||
var s = e[n]; | ||
he(s) && Ie(s, r); | ||
var f = e[n]; | ||
be(f) && Me(f, r); | ||
} | ||
else if (he(e)) | ||
else if (be(e)) | ||
e._store && (e._store.validated = !0); | ||
else if (e) { | ||
var g = A(e); | ||
if (typeof g == "function" && g !== e.entries) | ||
for (var _ = g.call(e), y; !(y = _.next()).done; ) | ||
he(y.value) && Ie(y.value, r); | ||
var b = C(e); | ||
if (typeof b == "function" && b !== e.entries) | ||
for (var _ = b.call(e), y; !(y = _.next()).done; ) | ||
be(y.value) && Me(y.value, r); | ||
} | ||
} | ||
} | ||
function dr(e) { | ||
function pr(e) { | ||
{ | ||
@@ -588,5 +588,5 @@ var r = e.type; | ||
n = r.propTypes; | ||
else if (typeof r == "object" && (r.$$typeof === d || // Note: Memo only checks outer props here. | ||
else if (typeof r == "object" && (r.$$typeof === i || // Note: Memo only checks outer props here. | ||
// Inner props are checked in the reconciler. | ||
r.$$typeof === f)) | ||
r.$$typeof === v)) | ||
n = r.propTypes; | ||
@@ -596,71 +596,71 @@ else | ||
if (n) { | ||
var s = w(r); | ||
Ze(n, e.props, "prop", s, e); | ||
} else if (r.PropTypes !== void 0 && !pe) { | ||
pe = !0; | ||
var g = w(r); | ||
T("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", g || "Unknown"); | ||
var f = A(r); | ||
er(n, e.props, "prop", f, e); | ||
} else if (r.PropTypes !== void 0 && !ge) { | ||
ge = !0; | ||
var b = A(r); | ||
S("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", b || "Unknown"); | ||
} | ||
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && T("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead."); | ||
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && S("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead."); | ||
} | ||
} | ||
function vr(e) { | ||
function yr(e) { | ||
{ | ||
for (var r = Object.keys(e.props), n = 0; n < r.length; n++) { | ||
var s = r[n]; | ||
if (s !== "children" && s !== "key") { | ||
W(e), T("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", s), W(null); | ||
var f = r[n]; | ||
if (f !== "children" && f !== "key") { | ||
Y(e), S("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", f), Y(null); | ||
break; | ||
} | ||
} | ||
e.ref !== null && (W(e), T("Invalid attribute `ref` supplied to `React.Fragment`."), W(null)); | ||
e.ref !== null && (Y(e), S("Invalid attribute `ref` supplied to `React.Fragment`."), Y(null)); | ||
} | ||
} | ||
function Ne(e, r, n, s, g, _) { | ||
function Ie(e, r, n, f, b, _) { | ||
{ | ||
var y = M(e); | ||
var y = I(e); | ||
if (!y) { | ||
var v = ""; | ||
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (v += " 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 C = cr(g); | ||
C ? v += C : v += Ae(); | ||
var p = ""; | ||
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (p += " 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 k = dr(b); | ||
k ? p += k : p += Ae(); | ||
var D; | ||
e === null ? D = "null" : ue(e) ? D = "array" : e !== void 0 && e.$$typeof === l ? (D = "<" + (w(e.type) || "Unknown") + " />", v = " Did you accidentally export a JSX literal instead of a component?") : D = typeof e, T("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", D, v); | ||
e === null ? D = "null" : pe(e) ? D = "array" : e !== void 0 && e.$$typeof === l ? (D = "<" + (A(e.type) || "Unknown") + " />", p = " Did you accidentally export a JSX literal instead of a component?") : D = typeof e, S("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", D, p); | ||
} | ||
var S = fr(e, r, n, g, _); | ||
if (S == null) | ||
return S; | ||
var w = ur(e, r, n, b, _); | ||
if (w == null) | ||
return w; | ||
if (y) { | ||
var j = r.children; | ||
if (j !== void 0) | ||
if (s) | ||
if (ue(j)) { | ||
for (var B = 0; B < j.length; B++) | ||
$e(j[B], e); | ||
Object.freeze && Object.freeze(j); | ||
var $ = r.children; | ||
if ($ !== void 0) | ||
if (f) | ||
if (pe($)) { | ||
for (var W = 0; W < $.length; W++) | ||
Ne($[W], e); | ||
Object.freeze && Object.freeze($); | ||
} else | ||
T("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."); | ||
S("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 | ||
$e(j, e); | ||
Ne($, e); | ||
} | ||
return e === a ? vr(S) : dr(S), S; | ||
return e === a ? yr(w) : pr(w), w; | ||
} | ||
} | ||
function pr(e, r, n) { | ||
return Ne(e, r, n, !0); | ||
} | ||
function hr(e, r, n) { | ||
return Ne(e, r, n, !1); | ||
return Ie(e, r, n, !0); | ||
} | ||
var yr = hr, br = pr; | ||
z.Fragment = a, z.jsx = yr, z.jsxs = br; | ||
}()), z; | ||
function gr(e, r, n) { | ||
return Ie(e, r, n, !1); | ||
} | ||
var br = gr, mr = hr; | ||
q.Fragment = a, q.jsx = br, q.jsxs = mr; | ||
}()), q; | ||
} | ||
process.env.NODE_ENV === "production" ? ye.exports = _r() : ye.exports = Rr(); | ||
var x = ye.exports; | ||
function be({ children: t, textColor: l, cy: o, style: a, colSpan: h, ...b }) { | ||
return /* @__PURE__ */ x.jsx("td", { className: "calendar-label", style: a, colSpan: h, ...b, children: /* @__PURE__ */ x.jsx("span", { className: "calendar-label-text", "aria-hidden": "true", style: { color: l }, children: t }) }); | ||
process.env.NODE_ENV === "production" ? me.exports = Sr() : me.exports = Dr(); | ||
var m = me.exports; | ||
function Ee({ children: t, textColor: l, style: o, colSpan: a, hide: u, ...h }) { | ||
return /* @__PURE__ */ m.jsx("td", { className: "calendar-label", style: o, colSpan: a, ...h, children: u ? void 0 : /* @__PURE__ */ m.jsx("span", { className: "calendar-label-text", "aria-hidden": "true", style: { color: l }, children: t }) }); | ||
} | ||
const Dr = { | ||
//light themes | ||
const Tr = { | ||
// light themes | ||
empty: { | ||
@@ -778,3 +778,17 @@ level0: "#ffffff", | ||
}, | ||
//dark themes | ||
emoji_positive: { | ||
level0: "🫥", | ||
level1: "😢", | ||
level2: "😞", | ||
level3: "🙂", | ||
level4: "😃" | ||
}, | ||
emoji_negative: { | ||
level0: "😃", | ||
level1: "🙂", | ||
level2: "😕", | ||
level3: "😢", | ||
level4: "🫥" | ||
}, | ||
// dark themes | ||
dark_empty: { | ||
@@ -892,3 +906,3 @@ level0: "#000000", | ||
} | ||
}, Sr = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], xr = (t = /* @__PURE__ */ new Date()) => { | ||
}, wr = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], Fr = (t = /* @__PURE__ */ new Date()) => { | ||
const l = { | ||
@@ -922,17 +936,17 @@ Sun: "Sunday", | ||
}; | ||
}, Br = (t) => t.reduce((l, o) => l + o, 0), Tr = (t) => { | ||
const l = xr(new Date(t)); | ||
}, Br = (t) => t.reduce((l, o) => l + o, 0), jr = (t) => { | ||
const l = Fr(new Date(t)); | ||
return `${l.date}, ${l.month} ${l.day}, ${l.year}`; | ||
}, Le = (t, l, o) => `${t}-${String(l + 1).padStart(2, "0")}-${String(o).padStart(2, "0")}`, wr = (t, l, o) => `${t}-${String(l).padStart(2, "0")}-${String(o).padStart(2, "0")}`, ge = (t) => ({ year: +t.slice(0, 4), month: +t.slice(5, 7), day: +t.slice(8, 10) }), L = (t) => +t.slice(0, 4), Ve = (t) => +t.slice(5, 7), Lr = (t) => +t.slice(8, 10), Fr = (t = J()) => t % 4 === 0 && t % 100 !== 0 || t % 400 === 0, me = (t = J()) => [31, Fr(t) ? 29 : 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], Cr = (t) => new Date(t).getDay(), V = (t = J()) => new Date(t, 0, 1).getDay(), Vr = (t) => new Date(t).getDay(), J = () => (/* @__PURE__ */ new Date()).getFullYear(), Jr = (t = J(), l, o) => { | ||
const a = me(t), h = V(t), b = []; | ||
let i = h; | ||
for (let u = 0; u < 12; u++) { | ||
const d = a[u]; | ||
let E = 0; | ||
for (let c = 0; c < d; c++) | ||
i === 0 && E++, i = (i + 1) % 7; | ||
u === 0 && h !== 0 && E++, b.push(E); | ||
}, Be = (t, l, o) => `${t}-${String(l + 1).padStart(2, "0")}-${String(o).padStart(2, "0")}`, xr = (t, l, o) => `${t}-${String(l).padStart(2, "0")}-${String(o).padStart(2, "0")}`, ae = (t) => ({ year: +t.slice(0, 4), month: +t.slice(5, 7), day: +t.slice(8, 10) }), L = (t) => +t.slice(0, 4), Ve = (t) => +t.slice(5, 7), Vr = (t) => +t.slice(8, 10), Cr = (t = V()) => t % 4 === 0 && t % 100 !== 0 || t % 400 === 0, _e = (t = V()) => [31, Cr(t) ? 29 : 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], Or = (t) => new Date(t).getDay(), B = (t = V()) => new Date(t, 0, 1).getDay(), Jr = (t) => new Date(t).getDay(), V = () => (/* @__PURE__ */ new Date()).getFullYear(), Ur = (t = V(), l, o) => { | ||
const a = _e(t), u = B(t), h = []; | ||
let c = u; | ||
for (let s = 0; s < 12; s++) { | ||
const i = a[s]; | ||
let g = 0; | ||
for (let d = 0; d < i; d++) | ||
c === 0 && g++, c = (c + 1) % 7; | ||
s === 0 && u !== 0 && g++, h.push(g); | ||
} | ||
return t !== l && h !== 0 && l !== o && (b[0] -= 1), b; | ||
}, Or = (t) => { | ||
return t !== l && u !== 0 && l !== o && (h[0] -= 1), h; | ||
}, kr = (t) => { | ||
const l = /* @__PURE__ */ new Map(); | ||
@@ -944,51 +958,51 @@ return t.forEach((o) => { | ||
}), l; | ||
}, jr = (t) => typeof t == "string" ? Dr[t] : t, kr = (t, l) => { | ||
}, Ue = (t) => typeof t == "string" ? Tr[t] : t, Pr = (t, l) => { | ||
let o = 0; | ||
for (let a = t; a <= l; ++a) | ||
o += Ue(t, a === t); | ||
o += ze(t, a === t); | ||
return new Array(7).fill(0).map(() => new Array(o).fill(0)); | ||
}, Pr = (t, l) => { | ||
}, Ar = (t, l) => { | ||
let o = 0; | ||
for (let a = t; a <= l; ++a) | ||
o += Ue(t, a === t); | ||
o += ze(t, a === t); | ||
return new Array(7).fill("").map(() => new Array(o).fill("")); | ||
}, Ue = (t, l) => { | ||
const o = V(t); | ||
}, ze = (t, l) => { | ||
const o = B(t); | ||
return l || o === 0 ? 53 : 52; | ||
}, Ar = (t, l, o) => { | ||
const a = L(t), h = L(l), b = kr(a, h); | ||
let i = 0, u = 1; | ||
for (let d = a; d <= h; ++d) { | ||
const E = o ? V(d) : (V(d) + 6) % 7, c = me(d); | ||
let f = 0, m = 1, p = E; | ||
for (; f < 12; ) { | ||
for (let R = 0; R < c[f]; ++R) | ||
b[p % 7][~~(p / 7) + i] = u, p++, m++, u++; | ||
m > c[f] && (m = 1, f++); | ||
}, $r = (t, l, o) => { | ||
const a = L(t), u = L(l), h = Pr(a, u); | ||
let c = 0, s = 1; | ||
for (let i = a; i <= u; ++i) { | ||
const g = o ? B(i) : (B(i) + 6) % 7, d = _e(i); | ||
let v = 0, R = 1, T = g; | ||
for (; v < 12; ) { | ||
for (let E = 0; E < d[v]; ++E) | ||
h[T % 7][~~(T / 7) + c] = s, T++, R++, s++; | ||
R > d[v] && (R = 1, v++); | ||
} | ||
i += ~~(p / 7); | ||
c += ~~(T / 7); | ||
} | ||
return b; | ||
return h; | ||
}, qe = (t, l, o) => { | ||
const a = L(t), h = L(l), b = Pr(a, h); | ||
let i = 0; | ||
for (let u = a; u <= h; ++u) { | ||
const d = o ? V(u) : (V(u) + 6) % 7, E = me(u); | ||
let c = 0, f = 1, m = d; | ||
for (; c < 12; ) { | ||
for (let p = 0; p < E[c]; ++p) { | ||
const R = wr(u, c + 1, f); | ||
b[m % 7][~~(m / 7) + i] = R, m++, f++; | ||
const a = L(t), u = L(l), h = Ar(a, u); | ||
let c = 0; | ||
for (let s = a; s <= u; ++s) { | ||
const i = o ? B(s) : (B(s) + 6) % 7, g = _e(s); | ||
let d = 0, v = 1, R = i; | ||
for (; d < 12; ) { | ||
for (let T = 0; T < g[d]; ++T) { | ||
const E = xr(s, d + 1, v); | ||
h[R % 7][~~(R / 7) + c] = E, R++, v++; | ||
} | ||
f > E[c] && (f = 1, c++); | ||
v > g[d] && (v = 1, d++); | ||
} | ||
i += ~~(m / 7); | ||
c += ~~(R / 7); | ||
} | ||
return b; | ||
}, ne = (t, l, o) => { | ||
const a = `${t}-01-01`, h = Mr(a, l), b = Ar(a, l, o); | ||
for (let i = 0; i < b.length; ++i) | ||
for (let u = 0; u < b[i].length; ++u) | ||
if (h === b[i][u]) | ||
return { row: i, col: u }; | ||
return h; | ||
}, oe = (t, l, o) => { | ||
const a = `${t}-01-01`, u = Mr(a, l), h = $r(a, l, o); | ||
for (let c = 0; c < h.length; ++c) | ||
for (let s = 0; s < h[c].length; ++s) | ||
if (u === h[c][s]) | ||
return { row: c, col: s }; | ||
return { row: 0, col: 0 }; | ||
@@ -998,56 +1012,78 @@ }, Mr = (t, l) => { | ||
return (new Date(l).getTime() - o.getTime()) / (1e3 * 60 * 60 * 24) + 1; | ||
}, Ir = (t, l, o, a) => { | ||
const { row: h, col: b } = ne( | ||
}, He = (t, l, o, a) => { | ||
const { row: u, col: h } = oe( | ||
L(t), | ||
t, | ||
a | ||
), { col: i } = ne(L(t), l, a), u = [], d = []; | ||
let E = -1, c = 0; | ||
for (let f = b; f <= i; ++f) | ||
f === b ? c = Ve(o[h][f]) - 1 : c = Ve(o[0][f]) - 1, c !== E && (u.push(Sr[c]), E = c, d.push(0)), d[d.length - 1]++; | ||
return { months: u, colSpans: d }; | ||
), { col: c } = oe(L(t), l, a), s = [], i = []; | ||
let g = -1, d = 0; | ||
for (let v = h; v <= c; ++v) | ||
v === h ? d = Ve(o[u][v]) - 1 : d = Ve(o[0][v]) - 1, d !== g && (s.push(wr[d]), g = d, i.push(0)), i[i.length - 1]++; | ||
return { months: s, colSpans: i }; | ||
}; | ||
function $r({ start: t, end: l, textColor: o, startsOnSunday: a, cy: h }) { | ||
const b = qe(t, l, a), { year: i, month: u, day: d } = ge(l), E = Cr(`${i}-${u}-01`), { months: c, colSpans: f } = Ir(t, l, b, a); | ||
return /* @__PURE__ */ x.jsx("thead", { children: /* @__PURE__ */ x.jsxs("tr", { children: [ | ||
/* @__PURE__ */ x.jsx(be, { textColor: o, style: { width: "4em", fontSize: h }, colSpan: 1, children: " " }), | ||
c.map((m, p) => { | ||
let R = f[p]; | ||
return f.length === 1 && f[0] === 1 ? R++ : c.length > 1 && d < 10 && E !== 0 && p === c.length - 2 ? R-- : c.length > 1 && d < 10 && E !== 0 && p === c.length - 1 && R++, /* @__PURE__ */ x.jsx(be, { textColor: o, style: { fontSize: h }, colSpan: R, children: m }, p); | ||
function Nr({ start: t, end: l, textColor: o, startsOnSunday: a, cy: u }) { | ||
const h = qe(t, l, a), { day: c } = ae(t), { year: s, month: i, day: g } = ae(l), d = Or(`${s}-${i}-01`), { months: v, colSpans: R } = He(t, l, h, a); | ||
return /* @__PURE__ */ m.jsx("thead", { children: /* @__PURE__ */ m.jsxs("tr", { children: [ | ||
/* @__PURE__ */ m.jsx(Ee, { textColor: o, style: { fontSize: u }, colSpan: 1, children: " " }), | ||
v.map((T, E) => { | ||
let F = R[E]; | ||
R.length === 1 && R[0] === 1 ? F++ : v.length > 1 && g < 10 && d !== 0 && E === v.length - 2 ? F-- : v.length > 1 && g < 10 && d !== 0 && E === v.length - 1 && F++; | ||
const C = E === 0 && v.length > 1 && F <= 1 && c >= 21; | ||
return /* @__PURE__ */ m.jsx( | ||
Ee, | ||
{ | ||
textColor: o, | ||
style: { fontSize: u }, | ||
colSpan: F, | ||
hide: C, | ||
children: T | ||
}, | ||
E | ||
); | ||
}) | ||
] }) }); | ||
} | ||
function Nr({ themeProps: t, dataLevel: l, style: o, dataTooltip: a, tooltipSize: h, ...b }) { | ||
const i = gr(null), [u, d] = mr(-10), E = (f) => { | ||
if (!f) | ||
function Ir({ | ||
cx: t, | ||
theme: l, | ||
themeProps: o, | ||
dataLevel: a, | ||
style: u, | ||
dataTooltip: h, | ||
tooltipSize: c, | ||
...s | ||
}) { | ||
const i = Er(null), [g, d] = _r(-10), v = (E) => { | ||
if (!E) | ||
return 0; | ||
let m = 0; | ||
return f.childNodes.forEach((p) => { | ||
p.nodeType === Node.ELEMENT_NODE && window.getComputedStyle(p).display !== "none" && m++; | ||
}), m; | ||
}, c = (f) => { | ||
if (!f || !f.parentNode) | ||
let F = 0; | ||
return E.childNodes.forEach((C) => { | ||
C.nodeType === Node.ELEMENT_NODE && window.getComputedStyle(C).display !== "none" && F++; | ||
}), F; | ||
}, R = (E) => { | ||
if (!E || !E.parentNode) | ||
return -1; | ||
const m = Array.from(f.parentNode.childNodes); | ||
let p = 0; | ||
for (let R = 0; R < f.cellIndex; R++) | ||
m[R].style.display !== "none" && p++; | ||
return p; | ||
const F = Array.from(E.parentNode.childNodes); | ||
let C = 0; | ||
for (let j = 0; j < E.cellIndex; j++) | ||
F[j].style.display !== "none" && C++; | ||
return C; | ||
}; | ||
return Er(() => { | ||
const f = () => { | ||
var m; | ||
Rr(() => { | ||
const E = () => { | ||
var F; | ||
if (i.current) { | ||
const p = E((m = i.current) == null ? void 0 : m.parentNode), R = c(i.current); | ||
if (p) { | ||
let O = -10; | ||
const A = R / p; | ||
A > 0.9 ? O = Math.max(~~(i.current.cellIndex * -150) / p, -150) : A > 0.8 ? O = Math.max(~~(i.current.cellIndex * -130) / p, -140) : A > 0.66 ? O = Math.max(~~(i.current.cellIndex * -120) / p, -120) : A > 0.5 ? O = Math.max(~~(i.current.cellIndex * -100) / p, -100) : A > 0.33 ? O = Math.max(~~(i.current.cellIndex * -50) / p, -50) : A > 0.2 ? O = Math.min(~~(i.current.cellIndex * -20) / p, -30) : O = Math.min(~~(i.current.cellIndex * -7) / p, -10), d(O); | ||
const C = v((F = i.current) == null ? void 0 : F.parentNode), j = R(i.current); | ||
if (C) { | ||
let S = -10; | ||
j / C > 0.33 ? S = Math.max(~~(i.current.cellIndex * -9 * t) / C, -9 * t) : S = Math.max(~~i.current.cellIndex * -30 * t / C, -10), d(S); | ||
} | ||
} | ||
}; | ||
return i.current && i.current.addEventListener("mouseover", f), () => { | ||
i.current && i.current.removeEventListener("mouseover", f); | ||
return i.current && i.current.addEventListener("mouseover", E), () => { | ||
i.current && i.current.removeEventListener("mouseover", E); | ||
}; | ||
}, []), /* @__PURE__ */ x.jsx( | ||
}, []); | ||
const T = (E) => E === "emoji_positive" || E === "emoji_negative"; | ||
return /* @__PURE__ */ m.jsx( | ||
"td", | ||
@@ -1058,10 +1094,12 @@ { | ||
style: { | ||
...o, | ||
backgroundColor: t[`level${l}`], | ||
"--tooltip-offset": `${u}px`, | ||
fontSize: h | ||
...u, | ||
outline: T(l) ? "transparent" : "1px solid rgba(27, 31, 35, 0.06)", | ||
backgroundColor: T(l) ? "transparent" : o[`level${a}`], | ||
"--tooltip-offset": `${g}px`, | ||
fontSize: c | ||
}, | ||
"data-tooltip": a, | ||
"data-level": l, | ||
...b | ||
"data-tooltip": h, | ||
"data-level": a, | ||
...s, | ||
children: T(l) ? o[`level${a}`] : void 0 | ||
} | ||
@@ -1075,16 +1113,16 @@ ); | ||
textColor: a, | ||
startsOnSunday: h, | ||
includeBoundary: b, | ||
cx: i, | ||
cy: u, | ||
cr: d, | ||
theme: E, | ||
onClick: c | ||
startsOnSunday: u, | ||
includeBoundary: h, | ||
cx: c, | ||
cy: s, | ||
cr: i, | ||
theme: g, | ||
onClick: d | ||
}) { | ||
const { year: f, day: m } = ge(l), { day: p } = ge(o), { row: R, col: O } = ne(f, l, h), { row: A, col: k } = ne(f, o, h), T = h ? ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"] : ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"], le = qe(l, o, h), H = ((M) => jr(M))(E), ae = Or(t), oe = (M, P) => P < O || P > k, ie = (M, P) => P === O && M < R || P === k && M > A, $ = () => O === k || p - m <= 7; | ||
return /* @__PURE__ */ x.jsx("tbody", { children: T.map((M, P) => /* @__PURE__ */ x.jsxs("tr", { children: [ | ||
/* @__PURE__ */ x.jsx(be, { tabIndex: 0, textColor: a, style: { textAlign: "right", fontSize: u, lineHeight: 0 }, children: M }), | ||
le[P].map((Y, w) => { | ||
if (k === 0 && w === 1) | ||
return /* @__PURE__ */ x.jsx( | ||
const { year: v, day: R } = ae(l), { day: T } = ae(o), { row: E, col: F } = oe(v, l, u), { row: C, col: j } = oe(v, o, u), S = qe(l, o, u), { colSpans: J } = He(l, o, S, u), ie = u ? ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"] : ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"], H = Ue(g), se = kr(t), fe = (M, O) => O == j + 1 && J[J.length - 1] === 1, ce = (M, O) => O < F || O > j, G = (M, O) => O === F && M < E || O === j && M > C, I = () => F === j || T - R <= 7; | ||
return /* @__PURE__ */ m.jsx("tbody", { children: ie.map((M, O) => /* @__PURE__ */ m.jsxs("tr", { children: [ | ||
/* @__PURE__ */ m.jsx(Ee, { tabIndex: 0, textColor: a, style: { textAlign: "left", fontSize: s, lineHeight: 0 }, children: M }), | ||
S[O].map((A, x) => { | ||
if (j === 0 && x === 1) | ||
return /* @__PURE__ */ m.jsx( | ||
"td", | ||
@@ -1094,6 +1132,6 @@ { | ||
padding: 0, | ||
width: $() ? i : 0, | ||
height: $() ? u : 0, | ||
width: I() ? c : 0, | ||
height: I() ? s : 0, | ||
outline: "none", | ||
borderRadius: d, | ||
borderRadius: i, | ||
outlineOffset: "-1px", | ||
@@ -1103,8 +1141,8 @@ shapeRendering: "geometricPrecision" | ||
}, | ||
w | ||
x | ||
); | ||
if (oe(P, w)) | ||
return /* @__PURE__ */ x.jsx("td", { style: { padding: "0", display: "none" } }, w); | ||
if (ie(P, w)) | ||
return /* @__PURE__ */ x.jsx( | ||
if (fe(O, x)) | ||
return /* @__PURE__ */ m.jsx("td", { style: { padding: "0", display: "block" } }, x); | ||
if (G(O, x)) | ||
return /* @__PURE__ */ m.jsx( | ||
"td", | ||
@@ -1114,6 +1152,6 @@ { | ||
padding: 0, | ||
width: $() ? i : 0, | ||
height: $() ? u : 0, | ||
outline: b ? `1px solid ${H.level0}` : "none", | ||
borderRadius: d, | ||
width: I() ? c : 0, | ||
height: I() ? s : 0, | ||
outline: h ? `1px solid ${H.level0}` : "none", | ||
borderRadius: i, | ||
outlineOffset: "-1px", | ||
@@ -1123,24 +1161,28 @@ shapeRendering: "geometricPrecision" | ||
}, | ||
w | ||
x | ||
); | ||
const F = ae.get(Y), N = Tr(Y), G = (K) => { | ||
const X = { | ||
date: Y, | ||
data: F == null ? void 0 : F.data | ||
if (ce(O, x)) | ||
return /* @__PURE__ */ m.jsx("td", { style: { padding: "0", display: "none" } }, x); | ||
const P = se.get(A), K = jr(A), X = (Z) => { | ||
const Q = { | ||
date: A, | ||
data: P == null ? void 0 : P.data | ||
}; | ||
c && c(K, X); | ||
d && d(Z, Q); | ||
}; | ||
return /* @__PURE__ */ x.jsx( | ||
Nr, | ||
return /* @__PURE__ */ m.jsx( | ||
Ir, | ||
{ | ||
cx: c, | ||
tabIndex: -1, | ||
style: { width: i, height: u, borderRadius: d }, | ||
dataLevel: F !== void 0 ? F.level : 0, | ||
"data-content": JSON.stringify(F == null ? void 0 : F.data), | ||
dataTooltip: N, | ||
tooltipSize: u, | ||
style: { width: c, height: s, borderRadius: i }, | ||
dataLevel: P !== void 0 ? P.level : 0, | ||
"data-content": JSON.stringify(P == null ? void 0 : P.data), | ||
dataTooltip: K, | ||
tooltipSize: s, | ||
theme: g, | ||
themeProps: H, | ||
onClick: G | ||
onClick: X | ||
}, | ||
w | ||
x | ||
); | ||
@@ -1150,59 +1192,75 @@ }) | ||
} | ||
function Ur({ | ||
function Wr({ textColor: t, cx: l, cy: o, theme: a }) { | ||
const u = Ue(a), h = `4px ${l + 72}px 0 0`, c = (i) => i === "emoji_positive" || i === "emoji_negative", s = (i, g) => c(i) ? { width: l, height: o, fontSize: l } : { width: l, height: o, backgroundColor: u[`level${g}`], outline: "1px solid #1b1f230f" }; | ||
return /* @__PURE__ */ m.jsx("div", { className: "description", style: { padding: h }, children: /* @__PURE__ */ m.jsxs("div", { className: "themes", children: [ | ||
/* @__PURE__ */ m.jsx("span", { style: { color: t, fontSize: l }, children: "Less" }), | ||
/* @__PURE__ */ m.jsx("div", { className: "cell", style: { ...s(a, 0) }, children: c(a) ? u.level0 : void 0 }), | ||
/* @__PURE__ */ m.jsx("div", { className: "cell", style: { ...s(a, 1) }, children: c(a) ? u.level1 : void 0 }), | ||
/* @__PURE__ */ m.jsx("div", { className: "cell", style: { ...s(a, 2) }, children: c(a) ? u.level2 : void 0 }), | ||
/* @__PURE__ */ m.jsx("div", { className: "cell", style: { ...s(a, 3) }, children: c(a) ? u.level3 : void 0 }), | ||
/* @__PURE__ */ m.jsx("div", { className: "cell", style: { ...s(a, 4) }, children: c(a) ? u.level4 : void 0 }), | ||
/* @__PURE__ */ m.jsx("span", { style: { color: t, fontSize: l }, children: "More" }) | ||
] }) }); | ||
} | ||
function zr({ | ||
data: t = [], | ||
start: l = Le(J(), 0, 1), | ||
end: o = Le(J(), 11, 31), | ||
textColor: a = "#000", | ||
startsOnSunday: h = !0, | ||
includeBoundary: b = !0, | ||
cx: i = 10, | ||
cy: u = 10, | ||
cr: d = 2, | ||
theme: E = "grass", | ||
onCellClick: c = () => { | ||
start: l = Be(V(), 0, 1), | ||
end: o = Be(V(), 11, 31), | ||
textColor: a = "#1f2328", | ||
startsOnSunday: u = !0, | ||
includeBoundary: h = !0, | ||
cx: c = 10, | ||
cy: s = 10, | ||
cr: i = 2, | ||
theme: g = "grass", | ||
onCellClick: d = () => { | ||
}, | ||
style: f | ||
style: v | ||
}) { | ||
return /* @__PURE__ */ x.jsx("div", { className: "container", style: f, children: /* @__PURE__ */ x.jsxs("table", { children: [ | ||
/* @__PURE__ */ x.jsx($r, { start: l, end: o, textColor: a, startsOnSunday: h, cy: u }), | ||
/* @__PURE__ */ x.jsx( | ||
Yr, | ||
{ | ||
data: t, | ||
start: l, | ||
end: o, | ||
textColor: a, | ||
startsOnSunday: h, | ||
includeBoundary: b, | ||
cx: i, | ||
cy: u, | ||
cr: d, | ||
theme: E, | ||
onClick: c | ||
} | ||
) | ||
] }) }); | ||
const R = `0 ${c + 70}px 0 ${c + 10}px`; | ||
return /* @__PURE__ */ m.jsxs("div", { className: "container", style: v, children: [ | ||
/* @__PURE__ */ m.jsx("div", { className: "calendar", style: { padding: R }, children: /* @__PURE__ */ m.jsxs("table", { children: [ | ||
/* @__PURE__ */ m.jsx(Nr, { start: l, end: o, textColor: a, startsOnSunday: u, cy: s }), | ||
/* @__PURE__ */ m.jsx( | ||
Yr, | ||
{ | ||
data: t, | ||
start: l, | ||
end: o, | ||
textColor: a, | ||
startsOnSunday: u, | ||
includeBoundary: h, | ||
cx: c, | ||
cy: s, | ||
cr: i, | ||
theme: g, | ||
onClick: d | ||
} | ||
) | ||
] }) }), | ||
/* @__PURE__ */ m.jsx(Wr, { textColor: a, cx: c, cy: s, theme: g }) | ||
] }); | ||
} | ||
export { | ||
Ur as ContributionCalendar, | ||
jr as createTheme, | ||
zr as ContributionCalendar, | ||
Ue as createTheme, | ||
Br as getArraySum, | ||
Jr as getColumnSpansForYears, | ||
J as getCurrentYear, | ||
xr as getDateDetails, | ||
Le as getDateString, | ||
Tr as getDateTooltip, | ||
Ur as getColumnSpansForYears, | ||
V as getCurrentYear, | ||
Fr as getDateDetails, | ||
Be as getDateString, | ||
jr as getDateTooltip, | ||
qe as getDayArray, | ||
Cr as getDayIndexFromDateString, | ||
Vr as getDayIndexOfMonth, | ||
Or as getDayIndexFromDateString, | ||
Jr as getDayIndexOfMonth, | ||
Mr as getDaysBetween, | ||
V as getFirstDayIndexOfYear, | ||
Ir as getMonthsAndColSpans, | ||
ne as getRowAndColumnIndexFromDate, | ||
Fr as isLeapYear, | ||
ge as parseDateFromDateString, | ||
Lr as parseDayFromDateString, | ||
Or as parseInputData, | ||
B as getFirstDayIndexOfYear, | ||
He as getMonthsAndColSpans, | ||
oe as getRowAndColumnIndexFromDate, | ||
Cr as isLeapYear, | ||
ae as parseDateFromDateString, | ||
Vr as parseDayFromDateString, | ||
kr as parseInputData, | ||
Ve as parseMonthFromDateString, | ||
L as parseYearFromDateString | ||
}; |
@@ -1,2 +0,2 @@ | ||
// Type definitions for react-contribution-calendar 1.2.3 | ||
// Type definitions for react-contribution-calendar 1.2.9 | ||
// Project: https://github.com/seiwon-yaehee/react-contribution-calendar | ||
@@ -36,3 +36,3 @@ // Definitions by: Seiwon Park <https://github.com/SeiwonPark> | ||
/** | ||
* The text color of calendar indexes for months and dates, defaults to `#000`. | ||
* The text color of calendar indexes for months and dates, defaults to `#1F2328`. | ||
*/ | ||
@@ -70,2 +70,6 @@ textColor?: string | ||
onCellClick?: MouseEventHandler | ||
/** | ||
* Root styles for the ContributionCalendar. | ||
*/ | ||
style?: CSSProperties | ||
} | ||
@@ -112,3 +116,3 @@ | ||
* | ||
* @version 1.2.3 | ||
* @version 1.2.9 | ||
* @see {@link https://github.com/seiwon-yaehee/react-contribution-calendar#apis} | ||
@@ -115,0 +119,0 @@ */ |
{ | ||
"name": "react-contribution-calendar", | ||
"description": "A GitHub-like contribution calendar component for React", | ||
"version": "1.2.7", | ||
"version": "1.2.9", | ||
"type": "module", | ||
@@ -6,0 +6,0 @@ "main": "./dist/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
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
81235
1546