my-datatable-sydyjo
Version:
A React table to manage and display employees
1,455 lines (1,453 loc) • 50.6 kB
JavaScript
import dr, { useState as ge, useMemo as Ae } from "react";
function Nr(n) {
return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
}
var _e = { exports: {} }, Ee = {};
/**
* @license React
* react-jsx-runtime.production.min.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.
*/
var Qe;
function Lr() {
if (Qe) return Ee;
Qe = 1;
var n = dr, R = Symbol.for("react.element"), v = Symbol.for("react.fragment"), u = Object.prototype.hasOwnProperty, E = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, f = { key: !0, ref: !0, __self: !0, __source: !0 };
function j(c, y, S) {
var l, b = {}, D = null, Y = null;
S !== void 0 && (D = "" + S), y.key !== void 0 && (D = "" + y.key), y.ref !== void 0 && (Y = y.ref);
for (l in y) u.call(y, l) && !f.hasOwnProperty(l) && (b[l] = y[l]);
if (c && c.defaultProps) for (l in y = c.defaultProps, y) b[l] === void 0 && (b[l] = y[l]);
return { $$typeof: R, type: c, key: D, ref: Y, props: b, _owner: E.current };
}
return Ee.Fragment = v, Ee.jsx = j, Ee.jsxs = j, Ee;
}
var Te = {};
/**
* @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.
*/
var er;
function Ur() {
return er || (er = 1, process.env.NODE_ENV !== "production" && function() {
var n = dr, R = Symbol.for("react.element"), v = Symbol.for("react.portal"), u = Symbol.for("react.fragment"), E = Symbol.for("react.strict_mode"), f = Symbol.for("react.profiler"), j = Symbol.for("react.provider"), c = Symbol.for("react.context"), y = Symbol.for("react.forward_ref"), S = Symbol.for("react.suspense"), l = Symbol.for("react.suspense_list"), b = Symbol.for("react.memo"), D = Symbol.for("react.lazy"), Y = Symbol.for("react.offscreen"), z = Symbol.iterator, W = "@@iterator";
function V(e) {
if (e === null || typeof e != "object")
return null;
var r = z && e[z] || e[W];
return typeof r == "function" ? r : null;
}
var m = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
function $(e) {
{
for (var r = arguments.length, i = new Array(r > 1 ? r - 1 : 0), d = 1; d < r; d++)
i[d - 1] = arguments[d];
I("error", e, i);
}
}
function I(e, r, i) {
{
var d = m.ReactDebugCurrentFrame, M = d.getStackAddendum();
M !== "" && (r += "%s", i = i.concat([M]));
var N = i.map(function(w) {
return String(w);
});
N.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, N);
}
}
var k = !1, a = !1, G = !1, ye = !1, he = !1, ue;
ue = Symbol.for("react.module.reference");
function be(e) {
return !!(typeof e == "string" || typeof e == "function" || e === u || e === f || he || e === E || e === S || e === l || ye || e === Y || k || a || G || typeof e == "object" && e !== null && (e.$$typeof === D || e.$$typeof === b || e.$$typeof === j || e.$$typeof === c || e.$$typeof === y || // 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 === ue || e.getModuleId !== void 0));
}
function ce(e, r, i) {
var d = e.displayName;
if (d)
return d;
var M = r.displayName || r.name || "";
return M !== "" ? i + "(" + M + ")" : i;
}
function fe(e) {
return e.displayName || "Context";
}
function ee(e) {
if (e == null)
return null;
if (typeof e.tag == "number" && $("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;
if (typeof e == "string")
return e;
switch (e) {
case u:
return "Fragment";
case v:
return "Portal";
case f:
return "Profiler";
case E:
return "StrictMode";
case S:
return "Suspense";
case l:
return "SuspenseList";
}
if (typeof e == "object")
switch (e.$$typeof) {
case c:
var r = e;
return fe(r) + ".Consumer";
case j:
var i = e;
return fe(i._context) + ".Provider";
case y:
return ce(e, e.render, "ForwardRef");
case b:
var d = e.displayName || null;
return d !== null ? d : ee(e.type) || "Memo";
case D: {
var M = e, N = M._payload, w = M._init;
try {
return ee(w(N));
} catch {
return null;
}
}
}
return null;
}
var X = Object.assign, ae = 0, Q, ne, oe, le, t, s, _;
function T() {
}
T.__reactDisabledLog = !0;
function p() {
{
if (ae === 0) {
Q = console.log, ne = console.info, oe = console.warn, le = console.error, t = console.group, s = console.groupCollapsed, _ = console.groupEnd;
var e = {
configurable: !0,
enumerable: !0,
value: T,
writable: !0
};
Object.defineProperties(console, {
info: e,
log: e,
warn: e,
error: e,
group: e,
groupCollapsed: e,
groupEnd: e
});
}
ae++;
}
}
function C() {
{
if (ae--, ae === 0) {
var e = {
configurable: !0,
enumerable: !0,
writable: !0
};
Object.defineProperties(console, {
log: X({}, e, {
value: Q
}),
info: X({}, e, {
value: ne
}),
warn: X({}, e, {
value: oe
}),
error: X({}, e, {
value: le
}),
group: X({}, e, {
value: t
}),
groupCollapsed: X({}, e, {
value: s
}),
groupEnd: X({}, e, {
value: _
})
});
}
ae < 0 && $("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
}
}
var h = m.ReactCurrentDispatcher, g;
function P(e, r, i) {
{
if (g === void 0)
try {
throw Error();
} catch (M) {
var d = M.stack.trim().match(/\n( *(at )?)/);
g = d && d[1] || "";
}
return `
` + g + e;
}
}
var A = !1, O;
{
var J = typeof WeakMap == "function" ? WeakMap : Map;
O = new J();
}
function o(e, r) {
if (!e || A)
return "";
{
var i = O.get(e);
if (i !== void 0)
return i;
}
var d;
A = !0;
var M = Error.prepareStackTrace;
Error.prepareStackTrace = void 0;
var N;
N = h.current, h.current = null, p();
try {
if (r) {
var w = function() {
throw Error();
};
if (Object.defineProperty(w.prototype, "props", {
set: function() {
throw Error();
}
}), typeof Reflect == "object" && Reflect.construct) {
try {
Reflect.construct(w, []);
} catch (Z) {
d = Z;
}
Reflect.construct(e, [], w);
} else {
try {
w.call();
} catch (Z) {
d = Z;
}
e.call(w.prototype);
}
} else {
try {
throw Error();
} catch (Z) {
d = Z;
}
e();
}
} catch (Z) {
if (Z && d && typeof Z.stack == "string") {
for (var x = Z.stack.split(`
`), H = d.stack.split(`
`), U = x.length - 1, B = H.length - 1; U >= 1 && B >= 0 && x[U] !== H[B]; )
B--;
for (; U >= 1 && B >= 0; U--, B--)
if (x[U] !== H[B]) {
if (U !== 1 || B !== 1)
do
if (U--, B--, B < 0 || x[U] !== H[B]) {
var te = `
` + x[U].replace(" at new ", " at ");
return e.displayName && te.includes("<anonymous>") && (te = te.replace("<anonymous>", e.displayName)), typeof e == "function" && O.set(e, te), te;
}
while (U >= 1 && B >= 0);
break;
}
}
} finally {
A = !1, h.current = N, C(), Error.prepareStackTrace = M;
}
var pe = e ? e.displayName || e.name : "", se = pe ? P(pe) : "";
return typeof e == "function" && O.set(e, se), se;
}
function re(e, r, i) {
return o(e, !1);
}
function de(e) {
var r = e.prototype;
return !!(r && r.isReactComponent);
}
function ie(e, r, i) {
if (e == null)
return "";
if (typeof e == "function")
return o(e, de(e));
if (typeof e == "string")
return P(e);
switch (e) {
case S:
return P("Suspense");
case l:
return P("SuspenseList");
}
if (typeof e == "object")
switch (e.$$typeof) {
case y:
return re(e.render);
case b:
return ie(e.type, r, i);
case D: {
var d = e, M = d._payload, N = d._init;
try {
return ie(N(M), r, i);
} catch {
}
}
}
return "";
}
var me = Object.prototype.hasOwnProperty, Ye = {}, We = m.ReactDebugCurrentFrame;
function Re(e) {
if (e) {
var r = e._owner, i = ie(e.type, e._source, r ? r.type : null);
We.setExtraStackFrame(i);
} else
We.setExtraStackFrame(null);
}
function gr(e, r, i, d, M) {
{
var N = Function.call.bind(me);
for (var w in e)
if (N(e, w)) {
var x = void 0;
try {
if (typeof e[w] != "function") {
var H = Error((d || "React class") + ": " + i + " type `" + w + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[w] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
throw H.name = "Invariant Violation", H;
}
x = e[w](r, w, d, i, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
} catch (U) {
x = U;
}
x && !(x instanceof Error) && (Re(M), $("%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).", d || "React class", i, w, typeof x), Re(null)), x instanceof Error && !(x.message in Ye) && (Ye[x.message] = !0, Re(M), $("Failed %s type: %s", i, x.message), Re(null));
}
}
}
var Er = Array.isArray;
function Oe(e) {
return Er(e);
}
function Tr(e) {
{
var r = typeof Symbol == "function" && Symbol.toStringTag, i = r && e[Symbol.toStringTag] || e.constructor.name || "Object";
return i;
}
}
function Rr(e) {
try {
return Ne(e), !1;
} catch {
return !0;
}
}
function Ne(e) {
return "" + e;
}
function Le(e) {
if (Rr(e))
return $("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Tr(e)), Ne(e);
}
var Ue = m.ReactCurrentOwner, _r = {
key: !0,
ref: !0,
__self: !0,
__source: !0
}, Ve, Be;
function Sr(e) {
if (me.call(e, "ref")) {
var r = Object.getOwnPropertyDescriptor(e, "ref").get;
if (r && r.isReactWarning)
return !1;
}
return e.ref !== void 0;
}
function Pr(e) {
if (me.call(e, "key")) {
var r = Object.getOwnPropertyDescriptor(e, "key").get;
if (r && r.isReactWarning)
return !1;
}
return e.key !== void 0;
}
function Or(e, r) {
typeof e.ref == "string" && Ue.current;
}
function xr(e, r) {
{
var i = function() {
Ve || (Ve = !0, $("%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));
};
i.isReactWarning = !0, Object.defineProperty(e, "key", {
get: i,
configurable: !0
});
}
}
function Cr(e, r) {
{
var i = function() {
Be || (Be = !0, $("%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));
};
i.isReactWarning = !0, Object.defineProperty(e, "ref", {
get: i,
configurable: !0
});
}
}
var wr = function(e, r, i, d, M, N, w) {
var x = {
// This tag allows us to uniquely identify this as a React Element
$$typeof: R,
// Built-in properties that belong on the element
type: e,
key: r,
ref: i,
props: w,
// Record the component responsible for creating this element.
_owner: N
};
return x._store = {}, Object.defineProperty(x._store, "validated", {
configurable: !1,
enumerable: !1,
writable: !0,
value: !1
}), Object.defineProperty(x, "_self", {
configurable: !1,
enumerable: !1,
writable: !1,
value: d
}), Object.defineProperty(x, "_source", {
configurable: !1,
enumerable: !1,
writable: !1,
value: M
}), Object.freeze && (Object.freeze(x.props), Object.freeze(x)), x;
};
function jr(e, r, i, d, M) {
{
var N, w = {}, x = null, H = null;
i !== void 0 && (Le(i), x = "" + i), Pr(r) && (Le(r.key), x = "" + r.key), Sr(r) && (H = r.ref, Or(r, M));
for (N in r)
me.call(r, N) && !_r.hasOwnProperty(N) && (w[N] = r[N]);
if (e && e.defaultProps) {
var U = e.defaultProps;
for (N in U)
w[N] === void 0 && (w[N] = U[N]);
}
if (x || H) {
var B = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
x && xr(w, B), H && Cr(w, B);
}
return wr(e, x, H, M, d, Ue.current, w);
}
}
var xe = m.ReactCurrentOwner, ze = m.ReactDebugCurrentFrame;
function ve(e) {
if (e) {
var r = e._owner, i = ie(e.type, e._source, r ? r.type : null);
ze.setExtraStackFrame(i);
} else
ze.setExtraStackFrame(null);
}
var Ce;
Ce = !1;
function we(e) {
return typeof e == "object" && e !== null && e.$$typeof === R;
}
function Je() {
{
if (xe.current) {
var e = ee(xe.current.type);
if (e)
return `
Check the render method of \`` + e + "`.";
}
return "";
}
}
function Ar(e) {
return "";
}
var Ke = {};
function $r(e) {
{
var r = Je();
if (!r) {
var i = typeof e == "string" ? e : e.displayName || e.name;
i && (r = `
Check the top-level render call using <` + i + ">.");
}
return r;
}
}
function Ge(e, r) {
{
if (!e._store || e._store.validated || e.key != null)
return;
e._store.validated = !0;
var i = $r(r);
if (Ke[i])
return;
Ke[i] = !0;
var d = "";
e && e._owner && e._owner !== xe.current && (d = " It was passed a child from " + ee(e._owner.type) + "."), ve(e), $('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', i, d), ve(null);
}
}
function He(e, r) {
{
if (typeof e != "object")
return;
if (Oe(e))
for (var i = 0; i < e.length; i++) {
var d = e[i];
we(d) && Ge(d, r);
}
else if (we(e))
e._store && (e._store.validated = !0);
else if (e) {
var M = V(e);
if (typeof M == "function" && M !== e.entries)
for (var N = M.call(e), w; !(w = N.next()).done; )
we(w.value) && Ge(w.value, r);
}
}
}
function Dr(e) {
{
var r = e.type;
if (r == null || typeof r == "string")
return;
var i;
if (typeof r == "function")
i = r.propTypes;
else if (typeof r == "object" && (r.$$typeof === y || // Note: Memo only checks outer props here.
// Inner props are checked in the reconciler.
r.$$typeof === b))
i = r.propTypes;
else
return;
if (i) {
var d = ee(r);
gr(i, e.props, "prop", d, e);
} else if (r.PropTypes !== void 0 && !Ce) {
Ce = !0;
var M = ee(r);
$("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", M || "Unknown");
}
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && $("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
}
}
function Ir(e) {
{
for (var r = Object.keys(e.props), i = 0; i < r.length; i++) {
var d = r[i];
if (d !== "children" && d !== "key") {
ve(e), $("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", d), ve(null);
break;
}
}
e.ref !== null && (ve(e), $("Invalid attribute `ref` supplied to `React.Fragment`."), ve(null));
}
}
var Xe = {};
function Ze(e, r, i, d, M, N) {
{
var w = be(e);
if (!w) {
var x = "";
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (x += " 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 H = Ar();
H ? x += H : x += Je();
var U;
e === null ? U = "null" : Oe(e) ? U = "array" : e !== void 0 && e.$$typeof === R ? (U = "<" + (ee(e.type) || "Unknown") + " />", x = " Did you accidentally export a JSX literal instead of a component?") : U = typeof e, $("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", U, x);
}
var B = jr(e, r, i, M, N);
if (B == null)
return B;
if (w) {
var te = r.children;
if (te !== void 0)
if (d)
if (Oe(te)) {
for (var pe = 0; pe < te.length; pe++)
He(te[pe], e);
Object.freeze && Object.freeze(te);
} else
$("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
He(te, e);
}
if (me.call(r, "key")) {
var se = ee(e), Z = Object.keys(r).filter(function(Wr) {
return Wr !== "key";
}), je = Z.length > 0 ? "{key: someKey, " + Z.join(": ..., ") + ": ...}" : "{key: someKey}";
if (!Xe[se + je]) {
var Yr = Z.length > 0 ? "{" + Z.join(": ..., ") + ": ...}" : "{}";
$(`A props object containing a "key" prop is being spread into JSX:
let props = %s;
<%s {...props} />
React keys must be passed directly to JSX without using spread:
let props = %s;
<%s key={someKey} {...props} />`, je, se, Yr, se), Xe[se + je] = !0;
}
}
return e === u ? Ir(B) : Dr(B), B;
}
}
function kr(e, r, i) {
return Ze(e, r, i, !0);
}
function Mr(e, r, i) {
return Ze(e, r, i, !1);
}
var Fr = Mr, qr = kr;
Te.Fragment = u, Te.jsx = Fr, Te.jsxs = qr;
}()), Te;
}
var rr;
function Vr() {
return rr || (rr = 1, process.env.NODE_ENV === "production" ? _e.exports = Lr() : _e.exports = Ur()), _e.exports;
}
var L = Vr(), Se = { exports: {} }, Pe = { exports: {} }, F = {};
/** @license React v16.13.1
* react-is.production.min.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.
*/
var tr;
function Br() {
if (tr) return F;
tr = 1;
var n = typeof Symbol == "function" && Symbol.for, R = n ? Symbol.for("react.element") : 60103, v = n ? Symbol.for("react.portal") : 60106, u = n ? Symbol.for("react.fragment") : 60107, E = n ? Symbol.for("react.strict_mode") : 60108, f = n ? Symbol.for("react.profiler") : 60114, j = n ? Symbol.for("react.provider") : 60109, c = n ? Symbol.for("react.context") : 60110, y = n ? Symbol.for("react.async_mode") : 60111, S = n ? Symbol.for("react.concurrent_mode") : 60111, l = n ? Symbol.for("react.forward_ref") : 60112, b = n ? Symbol.for("react.suspense") : 60113, D = n ? Symbol.for("react.suspense_list") : 60120, Y = n ? Symbol.for("react.memo") : 60115, z = n ? Symbol.for("react.lazy") : 60116, W = n ? Symbol.for("react.block") : 60121, V = n ? Symbol.for("react.fundamental") : 60117, m = n ? Symbol.for("react.responder") : 60118, $ = n ? Symbol.for("react.scope") : 60119;
function I(a) {
if (typeof a == "object" && a !== null) {
var G = a.$$typeof;
switch (G) {
case R:
switch (a = a.type, a) {
case y:
case S:
case u:
case f:
case E:
case b:
return a;
default:
switch (a = a && a.$$typeof, a) {
case c:
case l:
case z:
case Y:
case j:
return a;
default:
return G;
}
}
case v:
return G;
}
}
}
function k(a) {
return I(a) === S;
}
return F.AsyncMode = y, F.ConcurrentMode = S, F.ContextConsumer = c, F.ContextProvider = j, F.Element = R, F.ForwardRef = l, F.Fragment = u, F.Lazy = z, F.Memo = Y, F.Portal = v, F.Profiler = f, F.StrictMode = E, F.Suspense = b, F.isAsyncMode = function(a) {
return k(a) || I(a) === y;
}, F.isConcurrentMode = k, F.isContextConsumer = function(a) {
return I(a) === c;
}, F.isContextProvider = function(a) {
return I(a) === j;
}, F.isElement = function(a) {
return typeof a == "object" && a !== null && a.$$typeof === R;
}, F.isForwardRef = function(a) {
return I(a) === l;
}, F.isFragment = function(a) {
return I(a) === u;
}, F.isLazy = function(a) {
return I(a) === z;
}, F.isMemo = function(a) {
return I(a) === Y;
}, F.isPortal = function(a) {
return I(a) === v;
}, F.isProfiler = function(a) {
return I(a) === f;
}, F.isStrictMode = function(a) {
return I(a) === E;
}, F.isSuspense = function(a) {
return I(a) === b;
}, F.isValidElementType = function(a) {
return typeof a == "string" || typeof a == "function" || a === u || a === S || a === f || a === E || a === b || a === D || typeof a == "object" && a !== null && (a.$$typeof === z || a.$$typeof === Y || a.$$typeof === j || a.$$typeof === c || a.$$typeof === l || a.$$typeof === V || a.$$typeof === m || a.$$typeof === $ || a.$$typeof === W);
}, F.typeOf = I, F;
}
var q = {};
/** @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.
*/
var nr;
function zr() {
return nr || (nr = 1, process.env.NODE_ENV !== "production" && function() {
var n = typeof Symbol == "function" && Symbol.for, R = n ? Symbol.for("react.element") : 60103, v = n ? Symbol.for("react.portal") : 60106, u = n ? Symbol.for("react.fragment") : 60107, E = n ? Symbol.for("react.strict_mode") : 60108, f = n ? Symbol.for("react.profiler") : 60114, j = n ? Symbol.for("react.provider") : 60109, c = n ? Symbol.for("react.context") : 60110, y = n ? Symbol.for("react.async_mode") : 60111, S = n ? Symbol.for("react.concurrent_mode") : 60111, l = n ? Symbol.for("react.forward_ref") : 60112, b = n ? Symbol.for("react.suspense") : 60113, D = n ? Symbol.for("react.suspense_list") : 60120, Y = n ? Symbol.for("react.memo") : 60115, z = n ? Symbol.for("react.lazy") : 60116, W = n ? Symbol.for("react.block") : 60121, V = n ? Symbol.for("react.fundamental") : 60117, m = n ? Symbol.for("react.responder") : 60118, $ = n ? Symbol.for("react.scope") : 60119;
function I(o) {
return typeof o == "string" || typeof o == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
o === u || o === S || o === f || o === E || o === b || o === D || typeof o == "object" && o !== null && (o.$$typeof === z || o.$$typeof === Y || o.$$typeof === j || o.$$typeof === c || o.$$typeof === l || o.$$typeof === V || o.$$typeof === m || o.$$typeof === $ || o.$$typeof === W);
}
function k(o) {
if (typeof o == "object" && o !== null) {
var re = o.$$typeof;
switch (re) {
case R:
var de = o.type;
switch (de) {
case y:
case S:
case u:
case f:
case E:
case b:
return de;
default:
var ie = de && de.$$typeof;
switch (ie) {
case c:
case l:
case z:
case Y:
case j:
return ie;
default:
return re;
}
}
case v:
return re;
}
}
}
var a = y, G = S, ye = c, he = j, ue = R, be = l, ce = u, fe = z, ee = Y, X = v, ae = f, Q = E, ne = b, oe = !1;
function le(o) {
return oe || (oe = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), t(o) || k(o) === y;
}
function t(o) {
return k(o) === S;
}
function s(o) {
return k(o) === c;
}
function _(o) {
return k(o) === j;
}
function T(o) {
return typeof o == "object" && o !== null && o.$$typeof === R;
}
function p(o) {
return k(o) === l;
}
function C(o) {
return k(o) === u;
}
function h(o) {
return k(o) === z;
}
function g(o) {
return k(o) === Y;
}
function P(o) {
return k(o) === v;
}
function A(o) {
return k(o) === f;
}
function O(o) {
return k(o) === E;
}
function J(o) {
return k(o) === b;
}
q.AsyncMode = a, q.ConcurrentMode = G, q.ContextConsumer = ye, q.ContextProvider = he, q.Element = ue, q.ForwardRef = be, q.Fragment = ce, q.Lazy = fe, q.Memo = ee, q.Portal = X, q.Profiler = ae, q.StrictMode = Q, q.Suspense = ne, q.isAsyncMode = le, q.isConcurrentMode = t, q.isContextConsumer = s, q.isContextProvider = _, q.isElement = T, q.isForwardRef = p, q.isFragment = C, q.isLazy = h, q.isMemo = g, q.isPortal = P, q.isProfiler = A, q.isStrictMode = O, q.isSuspense = J, q.isValidElementType = I, q.typeOf = k;
}()), q;
}
var ar;
function vr() {
return ar || (ar = 1, process.env.NODE_ENV === "production" ? Pe.exports = Br() : Pe.exports = zr()), Pe.exports;
}
/*
object-assign
(c) Sindre Sorhus
@license MIT
*/
var $e, or;
function Jr() {
if (or) return $e;
or = 1;
var n = Object.getOwnPropertySymbols, R = Object.prototype.hasOwnProperty, v = Object.prototype.propertyIsEnumerable;
function u(f) {
if (f == null)
throw new TypeError("Object.assign cannot be called with null or undefined");
return Object(f);
}
function E() {
try {
if (!Object.assign)
return !1;
var f = new String("abc");
if (f[5] = "de", Object.getOwnPropertyNames(f)[0] === "5")
return !1;
for (var j = {}, c = 0; c < 10; c++)
j["_" + String.fromCharCode(c)] = c;
var y = Object.getOwnPropertyNames(j).map(function(l) {
return j[l];
});
if (y.join("") !== "0123456789")
return !1;
var S = {};
return "abcdefghijklmnopqrst".split("").forEach(function(l) {
S[l] = l;
}), Object.keys(Object.assign({}, S)).join("") === "abcdefghijklmnopqrst";
} catch {
return !1;
}
}
return $e = E() ? Object.assign : function(f, j) {
for (var c, y = u(f), S, l = 1; l < arguments.length; l++) {
c = Object(arguments[l]);
for (var b in c)
R.call(c, b) && (y[b] = c[b]);
if (n) {
S = n(c);
for (var D = 0; D < S.length; D++)
v.call(c, S[D]) && (y[S[D]] = c[S[D]]);
}
}
return y;
}, $e;
}
var De, ir;
function qe() {
if (ir) return De;
ir = 1;
var n = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
return De = n, De;
}
var Ie, sr;
function pr() {
return sr || (sr = 1, Ie = Function.call.bind(Object.prototype.hasOwnProperty)), Ie;
}
var ke, ur;
function Kr() {
if (ur) return ke;
ur = 1;
var n = function() {
};
if (process.env.NODE_ENV !== "production") {
var R = /* @__PURE__ */ qe(), v = {}, u = /* @__PURE__ */ pr();
n = function(f) {
var j = "Warning: " + f;
typeof console < "u" && console.error(j);
try {
throw new Error(j);
} catch {
}
};
}
function E(f, j, c, y, S) {
if (process.env.NODE_ENV !== "production") {
for (var l in f)
if (u(f, l)) {
var b;
try {
if (typeof f[l] != "function") {
var D = Error(
(y || "React class") + ": " + c + " type `" + l + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof f[l] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
);
throw D.name = "Invariant Violation", D;
}
b = f[l](j, l, y, c, null, R);
} catch (z) {
b = z;
}
if (b && !(b instanceof Error) && n(
(y || "React class") + ": type specification of " + c + " `" + l + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof b + ". 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 instanceof Error && !(b.message in v)) {
v[b.message] = !0;
var Y = S ? S() : "";
n(
"Failed " + c + " type: " + b.message + (Y ?? "")
);
}
}
}
}
return E.resetWarningCache = function() {
process.env.NODE_ENV !== "production" && (v = {});
}, ke = E, ke;
}
var Me, cr;
function Gr() {
if (cr) return Me;
cr = 1;
var n = vr(), R = Jr(), v = /* @__PURE__ */ qe(), u = /* @__PURE__ */ pr(), E = /* @__PURE__ */ Kr(), f = function() {
};
process.env.NODE_ENV !== "production" && (f = function(c) {
var y = "Warning: " + c;
typeof console < "u" && console.error(y);
try {
throw new Error(y);
} catch {
}
});
function j() {
return null;
}
return Me = function(c, y) {
var S = typeof Symbol == "function" && Symbol.iterator, l = "@@iterator";
function b(t) {
var s = t && (S && t[S] || t[l]);
if (typeof s == "function")
return s;
}
var D = "<<anonymous>>", Y = {
array: m("array"),
bigint: m("bigint"),
bool: m("boolean"),
func: m("function"),
number: m("number"),
object: m("object"),
string: m("string"),
symbol: m("symbol"),
any: $(),
arrayOf: I,
element: k(),
elementType: a(),
instanceOf: G,
node: be(),
objectOf: he,
oneOf: ye,
oneOfType: ue,
shape: fe,
exact: ee
};
function z(t, s) {
return t === s ? t !== 0 || 1 / t === 1 / s : t !== t && s !== s;
}
function W(t, s) {
this.message = t, this.data = s && typeof s == "object" ? s : {}, this.stack = "";
}
W.prototype = Error.prototype;
function V(t) {
if (process.env.NODE_ENV !== "production")
var s = {}, _ = 0;
function T(C, h, g, P, A, O, J) {
if (P = P || D, O = O || g, J !== v) {
if (y) {
var o = 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 o.name = "Invariant Violation", o;
} else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
var re = P + ":" + g;
!s[re] && // Avoid spamming the console because they are often not actionable except for lib authors
_ < 3 && (f(
"You are manually calling a React.PropTypes validation function for the `" + O + "` prop on `" + P + "`. 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."
), s[re] = !0, _++);
}
}
return h[g] == null ? C ? h[g] === null ? new W("The " + A + " `" + O + "` is marked as required " + ("in `" + P + "`, but its value is `null`.")) : new W("The " + A + " `" + O + "` is marked as required in " + ("`" + P + "`, but its value is `undefined`.")) : null : t(h, g, P, A, O);
}
var p = T.bind(null, !1);
return p.isRequired = T.bind(null, !0), p;
}
function m(t) {
function s(_, T, p, C, h, g) {
var P = _[T], A = Q(P);
if (A !== t) {
var O = ne(P);
return new W(
"Invalid " + C + " `" + h + "` of type " + ("`" + O + "` supplied to `" + p + "`, expected ") + ("`" + t + "`."),
{ expectedType: t }
);
}
return null;
}
return V(s);
}
function $() {
return V(j);
}
function I(t) {
function s(_, T, p, C, h) {
if (typeof t != "function")
return new W("Property `" + h + "` of component `" + p + "` has invalid PropType notation inside arrayOf.");
var g = _[T];
if (!Array.isArray(g)) {
var P = Q(g);
return new W("Invalid " + C + " `" + h + "` of type " + ("`" + P + "` supplied to `" + p + "`, expected an array."));
}
for (var A = 0; A < g.length; A++) {
var O = t(g, A, p, C, h + "[" + A + "]", v);
if (O instanceof Error)
return O;
}
return null;
}
return V(s);
}
function k() {
function t(s, _, T, p, C) {
var h = s[_];
if (!c(h)) {
var g = Q(h);
return new W("Invalid " + p + " `" + C + "` of type " + ("`" + g + "` supplied to `" + T + "`, expected a single ReactElement."));
}
return null;
}
return V(t);
}
function a() {
function t(s, _, T, p, C) {
var h = s[_];
if (!n.isValidElementType(h)) {
var g = Q(h);
return new W("Invalid " + p + " `" + C + "` of type " + ("`" + g + "` supplied to `" + T + "`, expected a single ReactElement type."));
}
return null;
}
return V(t);
}
function G(t) {
function s(_, T, p, C, h) {
if (!(_[T] instanceof t)) {
var g = t.name || D, P = le(_[T]);
return new W("Invalid " + C + " `" + h + "` of type " + ("`" + P + "` supplied to `" + p + "`, expected ") + ("instance of `" + g + "`."));
}
return null;
}
return V(s);
}
function ye(t) {
if (!Array.isArray(t))
return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? f(
"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])."
) : f("Invalid argument supplied to oneOf, expected an array.")), j;
function s(_, T, p, C, h) {
for (var g = _[T], P = 0; P < t.length; P++)
if (z(g, t[P]))
return null;
var A = JSON.stringify(t, function(J, o) {
var re = ne(o);
return re === "symbol" ? String(o) : o;
});
return new W("Invalid " + C + " `" + h + "` of value `" + String(g) + "` " + ("supplied to `" + p + "`, expected one of " + A + "."));
}
return V(s);
}
function he(t) {
function s(_, T, p, C, h) {
if (typeof t != "function")
return new W("Property `" + h + "` of component `" + p + "` has invalid PropType notation inside objectOf.");
var g = _[T], P = Q(g);
if (P !== "object")
return new W("Invalid " + C + " `" + h + "` of type " + ("`" + P + "` supplied to `" + p + "`, expected an object."));
for (var A in g)
if (u(g, A)) {
var O = t(g, A, p, C, h + "." + A, v);
if (O instanceof Error)
return O;
}
return null;
}
return V(s);
}
function ue(t) {
if (!Array.isArray(t))
return process.env.NODE_ENV !== "production" && f("Invalid argument supplied to oneOfType, expected an instance of array."), j;
for (var s = 0; s < t.length; s++) {
var _ = t[s];
if (typeof _ != "function")
return f(
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + oe(_) + " at index " + s + "."
), j;
}
function T(p, C, h, g, P) {
for (var A = [], O = 0; O < t.length; O++) {
var J = t[O], o = J(p, C, h, g, P, v);
if (o == null)
return null;
o.data && u(o.data, "expectedType") && A.push(o.data.expectedType);
}
var re = A.length > 0 ? ", expected one of type [" + A.join(", ") + "]" : "";
return new W("Invalid " + g + " `" + P + "` supplied to " + ("`" + h + "`" + re + "."));
}
return V(T);
}
function be() {
function t(s, _, T, p, C) {
return X(s[_]) ? null : new W("Invalid " + p + " `" + C + "` supplied to " + ("`" + T + "`, expected a ReactNode."));
}
return V(t);
}
function ce(t, s, _, T, p) {
return new W(
(t || "React class") + ": " + s + " type `" + _ + "." + T + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + p + "`."
);
}
function fe(t) {
function s(_, T, p, C, h) {
var g = _[T], P = Q(g);
if (P !== "object")
return new W("Invalid " + C + " `" + h + "` of type `" + P + "` " + ("supplied to `" + p + "`, expected `object`."));
for (var A in t) {
var O = t[A];
if (typeof O != "function")
return ce(p, C, h, A, ne(O));
var J = O(g, A, p, C, h + "." + A, v);
if (J)
return J;
}
return null;
}
return V(s);
}
function ee(t) {
function s(_, T, p, C, h) {
var g = _[T], P = Q(g);
if (P !== "object")
return new W("Invalid " + C + " `" + h + "` of type `" + P + "` " + ("supplied to `" + p + "`, expected `object`."));
var A = R({}, _[T], t);
for (var O in A) {
var J = t[O];
if (u(t, O) && typeof J != "function")
return ce(p, C, h, O, ne(J));
if (!J)
return new W(
"Invalid " + C + " `" + h + "` key `" + O + "` supplied to `" + p + "`.\nBad object: " + JSON.stringify(_[T], null, " ") + `
Valid keys: ` + JSON.stringify(Object.keys(t), null, " ")
);
var o = J(g, O, p, C, h + "." + O, v);
if (o)
return o;
}
return null;
}
return V(s);
}
function X(t) {
switch (typeof t) {
case "number":
case "string":
case "undefined":
return !0;
case "boolean":
return !t;
case "object":
if (Array.isArray(t))
return t.every(X);
if (t === null || c(t))
return !0;
var s = b(t);
if (s) {
var _ = s.call(t), T;
if (s !== t.entries) {
for (; !(T = _.next()).done; )
if (!X(T.value))
return !1;
} else
for (; !(T = _.next()).done; ) {
var p = T.value;
if (p && !X(p[1]))
return !1;
}
} else
return !1;
return !0;
default:
return !1;
}
}
function ae(t, s) {
return t === "symbol" ? !0 : s ? s["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && s instanceof Symbol : !1;
}
function Q(t) {
var s = typeof t;
return Array.isArray(t) ? "array" : t instanceof RegExp ? "object" : ae(s, t) ? "symbol" : s;
}
function ne(t) {
if (typeof t > "u" || t === null)
return "" + t;
var s = Q(t);
if (s === "object") {
if (t instanceof Date)
return "date";
if (t instanceof RegExp)
return "regexp";
}
return s;
}
function oe(t) {
var s = ne(t);
switch (s) {
case "array":
case "object":
return "an " + s;
case "boolean":
case "date":
case "regexp":
return "a " + s;
default:
return s;
}
}
function le(t) {
return !t.constructor || !t.constructor.name ? D : t.constructor.name;
}
return Y.checkPropTypes = E, Y.resetWarningCache = E.resetWarningCache, Y.PropTypes = Y, Y;
}, Me;
}
var Fe, fr;
function Hr() {
if (fr) return Fe;
fr = 1;
var n = /* @__PURE__ */ qe();
function R() {
}
function v() {
}
return v.resetWarningCache = R, Fe = function() {
function u(j, c, y, S, l, b) {
if (b !== n) {
var D = 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 D.name = "Invariant Violation", D;
}
}
u.isRequired = u;
function E() {
return u;
}
var f = {
array: u,
bigint: u,
bool: u,
func: u,
number: u,
object: u,
string: u,
symbol: u,
any: u,
arrayOf: E,
element: u,
elementType: u,
instanceOf: E,
node: u,
objectOf: E,
oneOf: E,
oneOfType: E,
shape: E,
exact: E,
checkPropTypes: v,
resetWarningCache: R
};
return f.PropTypes = f, f;
}, Fe;
}
var lr;
function Xr() {
if (lr) return Se.exports;
if (lr = 1, process.env.NODE_ENV !== "production") {
var n = vr(), R = !0;
Se.exports = /* @__PURE__ */ Gr()(n.isElement, R);
} else
Se.exports = /* @__PURE__ */ Hr()();
return Se.exports;
}
var Zr = /* @__PURE__ */ Xr();
const K = /* @__PURE__ */ Nr(Zr);
function yr({ columns: n, sortColumn: R, sortDirection: v, onSort: u }) {
return /* @__PURE__ */ L.jsx("thead", { children: /* @__PURE__ */ L.jsx("tr", { role: "row", children: n.map((E) => /* @__PURE__ */ L.jsxs(
"th",
{
onClick: () => u(E.accessor),
className: "sorting",
"aria-label": `${E.accessor}: activate to sort column ${v === "asc" ? "ascending" : "descending"}`,
children: [
E.header,
/* @__PURE__ */ L.jsxs("div", { className: "sort-icon-wrapper", children: [
/* @__PURE__ */ L.jsxs(
"span",
{
className: `arrow up ${R === E.accessor && v === "asc" ? "active" : ""}`,
children: [
" ",
"▲"
]
}
),
/* @__PURE__ */ L.jsx(
"span",
{
className: `arrow down ${R === E.accessor && v === "desc" ? "active" : ""}`,
children: "▼"
}
)
] })
]
},
E.accessor
)) }) });
}
yr.propTypes = {
columns: K.arrayOf(
K.shape({
header: K.string.isRequired,
accessor: K.string.isRequired,
render: K.func
})
).isRequired,
sortColumn: K.string,
sortDirection: K.oneOf(["asc", "desc"]).isRequired,
onSort: K.func.isRequired
};
function hr({ value: n, onChange: R }) {
return /* @__PURE__ */ L.jsx("div", { className: "dataTables_filter", children: /* @__PURE__ */ L.jsxs("label", { children: [
"Search:",
/* @__PURE__ */ L.jsx(
"input",
{
type: "search",
"aria-controls": "employee-table",
value: n,
onChange: (v) => R(v.target.value)
}
)
] }) });
}
hr.propTypes = {
value: K.string.isRequired,
onChange: K.func.isRequired
};
function br({ value: n, onChange: R }) {
return /* @__PURE__ */ L.jsx("div", { className: "dataTables_length", children: /* @__PURE__ */ L.jsxs("label", { children: [
"Show",
/* @__PURE__ */ L.jsx(
"select",
{
value: n,
onChange: (v) => R(Number(v.target.value)),
children: [10, 25, 50, 100].map((v) => /* @__PURE__ */ L.jsx("option", { value: v, children: v }, v))
}
),
"entries"
] }) });
}
br.propTypes = {
value: K.number.isRequired,
onChange: K.func.isRequired
};
function mr({ currentPage: n, totalPages: R, onPrevious: v, onNext: u }) {
return /* @__PURE__ */ L.jsxs("div", { className: "dataTables_paginate paging_simple_numbers", children: [
/* @__PURE__ */ L.jsx(
"button",
{
className: "paginate_button previous",
onClick: v,
disabled: n === 1,
children: "Previous"
}
),
/* @__PURE__ */ L.jsx("span", { className: "paginate_button current", children: n }),
/* @__PURE__ */ L.jsx(
"button",
{
className: "paginate_button next",
onClick: u,
disabled: n === R,
children: "Next"
}
)
] });
}
mr.propTypes = {
currentPage: K.number.isRequired,
totalPages: K.number.isRequired,
onPrevious: K.func.isRequired,
onNext: K.func.isRequired
};
function et({ data: n }) {
const [R, v] = ge(1), [u, E] = ge(10), [f, j] = ge(""), [c, y] = ge(null), [S, l] = ge("asc"), b = (m) => new Date(m).toLocaleDateString("fr-FR"), D = [
{ header: "First Name", accessor: "firstName" },
{ header: "Last Name", accessor: "lastName" },
{ header: "Star Date", accessor: "startDate", render: b },
{ header: "Department", accessor: "department" },
{ header: "Date of Birth", accessor: "dateOfBirth", render: b },
{ header: "Street", accessor: "street" },
{ header: "City", accessor: "city" },
{ header: "State", accessor: "state" },
{ header: "Zip Code", accessor: "zipCode" }
], Y = Ae(() => {
let m = [...n];
if (f) {
const $ = f.toLowerCase();
m = m.filter(
(I) => Object.values(I).some(
(k) => k == null ? void 0 : k.toString().toLowerCase().includes($)
)
);
}
return c && (m.sort(($, I) => {
const k = $[c], a = I[c];
if (k == null) return 1;
if (a == null) return -1;
let G = 0;
return typeof k == "string" ? G = k.localeCompare(a) : k > a ? G = 1 : k < a ? G = -1 : G = 0, G;
}), S === "desc" && m.reverse()), m;
}, [n, f, c, S]);
Ae(() => v(1), [f, u]);
const z = Ae(() => {
const m = (R - 1) * u;
return Y.slice(m, m + u);
}, [Y, R, u]), W = Math.ceil(Y.length / u), V = (m) => {
c === m ? l(($) => $ === "asc" ? "desc" : "asc") : (y(m), l("asc"));
};
return /* @__PURE__ */ L.jsxs("div", { className: "dataTables_wrapper no-footer", children: [
/* @__PURE__ */ L.jsx(br, { value: u, onChange: E }),
/* @__PURE__ */ L.jsx(hr, { value: f, onChange: j }),
/* @__PURE__ */ L.jsxs("table", { className: "display dataTable no-footer", children: [
/* @__PURE__ */ L.jsx(
yr,
{
columns: D,
sortColumn: c,
sortDirection: S,
onSort: V
}
),
/* @__PURE__ */ L.jsx("tbody", { children: z.map((m, $) => /* @__PURE__ */ L.jsx("tr", { className: $ % 2 === 0 ? "odd" : "even", children: D.map((I) =>