my-datatable-sydyjo
Version:
A React table to manage and display employees
50 lines (47 loc) • 33.6 kB
JavaScript
(function(G,he){typeof exports=="object"&&typeof module<"u"?module.exports=he(require("react")):typeof define=="function"&&define.amd?define(["react"],he):(G=typeof globalThis<"u"?globalThis:G||self,G.DataTable=he(G.React))})(this,function(G){"use strict";function he(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var _e={exports:{}},be={};/**
* @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 mr(){if(qe)return be;qe=1;var n=G,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={},M=null,q=null;S!==void 0&&(M=""+S),y.key!==void 0&&(M=""+y.key),y.ref!==void 0&&(q=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:M,ref:q,props:b,_owner:E.current}}return be.Fragment=v,be.jsx=j,be.jsxs=j,be}var me={};/**
* @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 We;function gr(){return We||(We=1,process.env.NODE_ENV!=="production"&&function(){var n=G,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"),M=Symbol.for("react.lazy"),q=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 D(e){{for(var r=arguments.length,i=new Array(r>1?r-1:0),d=1;d<r;d++)i[d-1]=arguments[d];$("error",e,i)}}function $(e,r,i){{var d=m.ReactDebugCurrentFrame,Y=d.getStackAddendum();Y!==""&&(r+="%s",i=i.concat([Y]));var L=i.map(function(w){return String(w)});L.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,L)}}var F=!1,a=!1,H=!1,ge=!1,Ee=!1,ce;ce=Symbol.for("react.module.reference");function Te(e){return!!(typeof e=="string"||typeof e=="function"||e===u||e===f||Ee||e===E||e===S||e===l||ge||e===q||F||a||H||typeof e=="object"&&e!==null&&(e.$$typeof===M||e.$$typeof===b||e.$$typeof===j||e.$$typeof===c||e.$$typeof===y||e.$$typeof===ce||e.getModuleId!==void 0))}function fe(e,r,i){var d=e.displayName;if(d)return d;var Y=r.displayName||r.name||"";return Y!==""?i+"("+Y+")":i}function le(e){return e.displayName||"Context"}function re(e){if(e==null)return null;if(typeof e.tag=="number"&&D("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 le(r)+".Consumer";case j:var i=e;return le(i._context)+".Provider";case y:return fe(e,e.render,"ForwardRef");case b:var d=e.displayName||null;return d!==null?d:re(e.type)||"Memo";case M:{var Y=e,L=Y._payload,w=Y._init;try{return re(w(L))}catch{return null}}}return null}var Z=Object.assign,oe=0,ee,ae,ie,de,t,s,_;function T(){}T.__reactDisabledLog=!0;function p(){{if(oe===0){ee=console.log,ae=console.info,ie=console.warn,de=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})}oe++}}function C(){{if(oe--,oe===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:Z({},e,{value:ee}),info:Z({},e,{value:ae}),warn:Z({},e,{value:ie}),error:Z({},e,{value:de}),group:Z({},e,{value:t}),groupCollapsed:Z({},e,{value:s}),groupEnd:Z({},e,{value:_})})}oe<0&&D("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(Y){var d=Y.stack.trim().match(/\n( *(at )?)/);g=d&&d[1]||""}return`
`+g+e}}var A=!1,O;{var K=typeof WeakMap=="function"?WeakMap:Map;O=new K}function o(e,r){if(!e||A)return"";{var i=O.get(e);if(i!==void 0)return i}var d;A=!0;var Y=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var L;L=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(Q){d=Q}Reflect.construct(e,[],w)}else{try{w.call()}catch(Q){d=Q}e.call(w.prototype)}}else{try{throw Error()}catch(Q){d=Q}e()}}catch(Q){if(Q&&d&&typeof Q.stack=="string"){for(var x=Q.stack.split(`
`),X=d.stack.split(`
`),U=x.length-1,B=X.length-1;U>=1&&B>=0&&x[U]!==X[B];)B--;for(;U>=1&&B>=0;U--,B--)if(x[U]!==X[B]){if(U!==1||B!==1)do if(U--,B--,B<0||x[U]!==X[B]){var ne=`
`+x[U].replace(" at new "," at ");return e.displayName&&ne.includes("<anonymous>")&&(ne=ne.replace("<anonymous>",e.displayName)),typeof e=="function"&&O.set(e,ne),ne}while(U>=1&&B>=0);break}}}finally{A=!1,h.current=L,C(),Error.prepareStackTrace=Y}var ye=e?e.displayName||e.name:"",ue=ye?P(ye):"";return typeof e=="function"&&O.set(e,ue),ue}function te(e,r,i){return o(e,!1)}function ve(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function se(e,r,i){if(e==null)return"";if(typeof e=="function")return o(e,ve(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 te(e.render);case b:return se(e.type,r,i);case M:{var d=e,Y=d._payload,L=d._init;try{return se(L(Y),r,i)}catch{}}}return""}var Re=Object.prototype.hasOwnProperty,ar={},or=m.ReactDebugCurrentFrame;function Oe(e){if(e){var r=e._owner,i=se(e.type,e._source,r?r.type:null);or.setExtraStackFrame(i)}else or.setExtraStackFrame(null)}function jr(e,r,i,d,Y){{var L=Function.call.bind(Re);for(var w in e)if(L(e,w)){var x=void 0;try{if(typeof e[w]!="function"){var X=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 X.name="Invariant Violation",X}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)&&(Oe(Y),D("%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),Oe(null)),x instanceof Error&&!(x.message in ar)&&(ar[x.message]=!0,Oe(Y),D("Failed %s type: %s",i,x.message),Oe(null))}}}var Ar=Array.isArray;function ke(e){return Ar(e)}function Dr(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,i=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return i}}function Ir(e){try{return ir(e),!1}catch{return!0}}function ir(e){return""+e}function sr(e){if(Ir(e))return D("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Dr(e)),ir(e)}var ur=m.ReactCurrentOwner,kr={key:!0,ref:!0,__self:!0,__source:!0},cr,fr;function Mr(e){if(Re.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function $r(e){if(Re.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function Fr(e,r){typeof e.ref=="string"&&ur.current}function Yr(e,r){{var i=function(){cr||(cr=!0,D("%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 qr(e,r){{var i=function(){fr||(fr=!0,D("%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,Y,L,w){var x={$$typeof:R,type:e,key:r,ref:i,props:w,_owner:L};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:Y}),Object.freeze&&(Object.freeze(x.props),Object.freeze(x)),x};function Nr(e,r,i,d,Y){{var L,w={},x=null,X=null;i!==void 0&&(sr(i),x=""+i),$r(r)&&(sr(r.key),x=""+r.key),Mr(r)&&(X=r.ref,Fr(r,Y));for(L in r)Re.call(r,L)&&!kr.hasOwnProperty(L)&&(w[L]=r[L]);if(e&&e.defaultProps){var U=e.defaultProps;for(L in U)w[L]===void 0&&(w[L]=U[L])}if(x||X){var B=typeof e=="function"?e.displayName||e.name||"Unknown":e;x&&Yr(w,B),X&&qr(w,B)}return Wr(e,x,X,Y,d,ur.current,w)}}var Me=m.ReactCurrentOwner,lr=m.ReactDebugCurrentFrame;function pe(e){if(e){var r=e._owner,i=se(e.type,e._source,r?r.type:null);lr.setExtraStackFrame(i)}else lr.setExtraStackFrame(null)}var $e;$e=!1;function Fe(e){return typeof e=="object"&&e!==null&&e.$$typeof===R}function dr(){{if(Me.current){var e=re(Me.current.type);if(e)return`
Check the render method of \``+e+"`."}return""}}function Lr(e){return""}var vr={};function Ur(e){{var r=dr();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 pr(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var i=Ur(r);if(vr[i])return;vr[i]=!0;var d="";e&&e._owner&&e._owner!==Me.current&&(d=" It was passed a child from "+re(e._owner.type)+"."),pe(e),D('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),pe(null)}}function yr(e,r){{if(typeof e!="object")return;if(ke(e))for(var i=0;i<e.length;i++){var d=e[i];Fe(d)&&pr(d,r)}else if(Fe(e))e._store&&(e._store.validated=!0);else if(e){var Y=V(e);if(typeof Y=="function"&&Y!==e.entries)for(var L=Y.call(e),w;!(w=L.next()).done;)Fe(w.value)&&pr(w.value,r)}}}function Vr(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||r.$$typeof===b))i=r.propTypes;else return;if(i){var d=re(r);jr(i,e.props,"prop",d,e)}else if(r.PropTypes!==void 0&&!$e){$e=!0;var Y=re(r);D("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Y||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&D("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Br(e){{for(var r=Object.keys(e.props),i=0;i<r.length;i++){var d=r[i];if(d!=="children"&&d!=="key"){pe(e),D("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",d),pe(null);break}}e.ref!==null&&(pe(e),D("Invalid attribute `ref` supplied to `React.Fragment`."),pe(null))}}var hr={};function br(e,r,i,d,Y,L){{var w=Te(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 X=Lr();X?x+=X:x+=dr();var U;e===null?U="null":ke(e)?U="array":e!==void 0&&e.$$typeof===R?(U="<"+(re(e.type)||"Unknown")+" />",x=" Did you accidentally export a JSX literal instead of a component?"):U=typeof e,D("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=Nr(e,r,i,Y,L);if(B==null)return B;if(w){var ne=r.children;if(ne!==void 0)if(d)if(ke(ne)){for(var ye=0;ye<ne.length;ye++)yr(ne[ye],e);Object.freeze&&Object.freeze(ne)}else D("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 yr(ne,e)}if(Re.call(r,"key")){var ue=re(e),Q=Object.keys(r).filter(function(Xr){return Xr!=="key"}),Ye=Q.length>0?"{key: someKey, "+Q.join(": ..., ")+": ...}":"{key: someKey}";if(!hr[ue+Ye]){var Hr=Q.length>0?"{"+Q.join(": ..., ")+": ...}":"{}";D(`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} />`,Ye,ue,Hr,ue),hr[ue+Ye]=!0}}return e===u?Br(B):Vr(B),B}}function zr(e,r,i){return br(e,r,i,!0)}function Jr(e,r,i){return br(e,r,i,!1)}var Kr=Jr,Gr=zr;me.Fragment=u,me.jsx=Kr,me.jsxs=Gr}()),me}var Ne;function Er(){return Ne||(Ne=1,process.env.NODE_ENV==="production"?_e.exports=mr():_e.exports=gr()),_e.exports}var N=Er(),Se={exports:{}},Pe={exports:{}},I={};/** @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 Le;function Tr(){if(Le)return I;Le=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,M=n?Symbol.for("react.suspense_list"):60120,q=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,D=n?Symbol.for("react.scope"):60119;function $(a){if(typeof a=="object"&&a!==null){var H=a.$$typeof;switch(H){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 q:case j:return a;default:return H}}case v:return H}}}function F(a){return $(a)===S}return I.AsyncMode=y,I.ConcurrentMode=S,I.ContextConsumer=c,I.ContextProvider=j,I.Element=R,I.ForwardRef=l,I.Fragment=u,I.Lazy=z,I.Memo=q,I.Portal=v,I.Profiler=f,I.StrictMode=E,I.Suspense=b,I.isAsyncMode=function(a){return F(a)||$(a)===y},I.isConcurrentMode=F,I.isContextConsumer=function(a){return $(a)===c},I.isContextProvider=function(a){return $(a)===j},I.isElement=function(a){return typeof a=="object"&&a!==null&&a.$$typeof===R},I.isForwardRef=function(a){return $(a)===l},I.isFragment=function(a){return $(a)===u},I.isLazy=function(a){return $(a)===z},I.isMemo=function(a){return $(a)===q},I.isPortal=function(a){return $(a)===v},I.isProfiler=function(a){return $(a)===f},I.isStrictMode=function(a){return $(a)===E},I.isSuspense=function(a){return $(a)===b},I.isValidElementType=function(a){return typeof a=="string"||typeof a=="function"||a===u||a===S||a===f||a===E||a===b||a===M||typeof a=="object"&&a!==null&&(a.$$typeof===z||a.$$typeof===q||a.$$typeof===j||a.$$typeof===c||a.$$typeof===l||a.$$typeof===V||a.$$typeof===m||a.$$typeof===D||a.$$typeof===W)},I.typeOf=$,I}var k={};/** @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 Ue;function Rr(){return Ue||(Ue=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,M=n?Symbol.for("react.suspense_list"):60120,q=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,D=n?Symbol.for("react.scope"):60119;function $(o){return typeof o=="string"||typeof o=="function"||o===u||o===S||o===f||o===E||o===b||o===M||typeof o=="object"&&o!==null&&(o.$$typeof===z||o.$$typeof===q||o.$$typeof===j||o.$$typeof===c||o.$$typeof===l||o.$$typeof===V||o.$$typeof===m||o.$$typeof===D||o.$$typeof===W)}function F(o){if(typeof o=="object"&&o!==null){var te=o.$$typeof;switch(te){case R:var ve=o.type;switch(ve){case y:case S:case u:case f:case E:case b:return ve;default:var se=ve&&ve.$$typeof;switch(se){case c:case l:case z:case q:case j:return se;default:return te}}case v:return te}}}var a=y,H=S,ge=c,Ee=j,ce=R,Te=l,fe=u,le=z,re=q,Z=v,oe=f,ee=E,ae=b,ie=!1;function de(o){return ie||(ie=!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)||F(o)===y}function t(o){return F(o)===S}function s(o){return F(o)===c}function _(o){return F(o)===j}function T(o){return typeof o=="object"&&o!==null&&o.$$typeof===R}function p(o){return F(o)===l}function C(o){return F(o)===u}function h(o){return F(o)===z}function g(o){return F(o)===q}function P(o){return F(o)===v}function A(o){return F(o)===f}function O(o){return F(o)===E}function K(o){return F(o)===b}k.AsyncMode=a,k.ConcurrentMode=H,k.ContextConsumer=ge,k.ContextProvider=Ee,k.Element=ce,k.ForwardRef=Te,k.Fragment=fe,k.Lazy=le,k.Memo=re,k.Portal=Z,k.Profiler=oe,k.StrictMode=ee,k.Suspense=ae,k.isAsyncMode=de,k.isConcurrentMode=t,k.isContextConsumer=s,k.isContextProvider=_,k.isElement=T,k.isForwardRef=p,k.isFragment=C,k.isLazy=h,k.isMemo=g,k.isPortal=P,k.isProfiler=A,k.isStrictMode=O,k.isSuspense=K,k.isValidElementType=$,k.typeOf=F}()),k}var Ve;function Be(){return Ve||(Ve=1,process.env.NODE_ENV==="production"?Pe.exports=Tr():Pe.exports=Rr()),Pe.exports}/*
object-assign
(c) Sindre Sorhus
@license MIT
*/var xe,ze;function _r(){if(ze)return xe;ze=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 xe=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 M=0;M<S.length;M++)v.call(c,S[M])&&(y[S[M]]=c[S[M]])}}return y},xe}var Ce,Je;function we(){if(Je)return Ce;Je=1;var n="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Ce=n,Ce}var je,Ke;function Ge(){return Ke||(Ke=1,je=Function.call.bind(Object.prototype.hasOwnProperty)),je}var Ae,He;function Sr(){if(He)return Ae;He=1;var n=function(){};if(process.env.NODE_ENV!=="production"){var R=we(),v={},u=Ge();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 M=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 M.name="Invariant Violation",M}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 q=S?S():"";n("Failed "+c+" type: "+b.message+(q??""))}}}}return E.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(v={})},Ae=E,Ae}var De,Xe;function Pr(){if(Xe)return De;Xe=1;var n=Be(),R=_r(),v=we(),u=Ge(),E=Sr(),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 De=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 M="<<anonymous>>",q={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:D(),arrayOf:$,element:F(),elementType:a(),instanceOf:H,node:Te(),objectOf:Ee,oneOf:ge,oneOfType:ce,shape:le,exact:re};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,K){if(P=P||M,O=O||g,K!==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 te=P+":"+g;!s[te]&&_<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[te]=!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=ee(P);if(A!==t){var O=ae(P);return new W("Invalid "+C+" `"+h+"` of type "+("`"+O+"` supplied to `"+p+"`, expected ")+("`"+t+"`."),{expectedType:t})}return null}return V(s)}function D(){return V(j)}function $(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=ee(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 F(){function t(s,_,T,p,C){var h=s[_];if(!c(h)){var g=ee(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=ee(h);return new W("Invalid "+p+" `"+C+"` of type "+("`"+g+"` supplied to `"+T+"`, expected a single ReactElement type."))}return null}return V(t)}function H(t){function s(_,T,p,C,h){if(!(_[T]instanceof t)){var g=t.name||M,P=de(_[T]);return new W("Invalid "+C+" `"+h+"` of type "+("`"+P+"` supplied to `"+p+"`, expected ")+("instance of `"+g+"`."))}return null}return V(s)}function ge(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(K,o){var te=ae(o);return te==="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 Ee(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=ee(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 ce(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 "+ie(_)+" at index "+s+"."),j}function T(p,C,h,g,P){for(var A=[],O=0;O<t.length;O++){var K=t[O],o=K(p,C,h,g,P,v);if(o==null)return null;o.data&&u(o.data,"expectedType")&&A.push(o.data.expectedType)}var te=A.length>0?", expected one of type ["+A.join(", ")+"]":"";return new W("Invalid "+g+" `"+P+"` supplied to "+("`"+h+"`"+te+"."))}return V(T)}function Te(){function t(s,_,T,p,C){return Z(s[_])?null:new W("Invalid "+p+" `"+C+"` supplied to "+("`"+T+"`, expected a ReactNode."))}return V(t)}function fe(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 le(t){function s(_,T,p,C,h){var g=_[T],P=ee(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 fe(p,C,h,A,ae(O));var K=O(g,A,p,C,h+"."+A,v);if(K)return K}return null}return V(s)}function re(t){function s(_,T,p,C,h){var g=_[T],P=ee(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 K=t[O];if(u(t,O)&&typeof K!="function")return fe(p,C,h,O,ae(K));if(!K)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=K(g,O,p,C,h+"."+O,v);if(o)return o}return null}return V(s)}function Z(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(Z);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(!Z(T.value))return!1}else for(;!(T=_.next()).done;){var p=T.value;if(p&&!Z(p[1]))return!1}}else return!1;return!0;default:return!1}}function oe(t,s){return t==="symbol"?!0:s?s["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&s instanceof Symbol:!1}function ee(t){var s=typeof t;return Array.isArray(t)?"array":t instanceof RegExp?"object":oe(s,t)?"symbol":s}function ae(t){if(typeof t>"u"||t===null)return""+t;var s=ee(t);if(s==="object"){if(t instanceof Date)return"date";if(t instanceof RegExp)return"regexp"}return s}function ie(t){var s=ae(t);switch(s){case"array":case"object":return"an "+s;case"boolean":case"date":case"regexp":return"a "+s;default:return s}}function de(t){return!t.constructor||!t.constructor.name?M:t.constructor.name}return q.checkPropTypes=E,q.resetWarningCache=E.resetWarningCache,q.PropTypes=q,q},De}var Ie,Ze;function Or(){if(Ze)return Ie;Ze=1;var n=we();function R(){}function v(){}return v.resetWarningCache=R,Ie=function(){function u(j,c,y,S,l,b){if(b!==n){var M=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 M.name="Invariant Violation",M}}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},Ie}var Qe;function xr(){if(Qe)return Se.exports;if(Qe=1,process.env.NODE_ENV!=="production"){var n=Be(),R=!0;Se.exports=Pr()(n.isElement,R)}else Se.exports=Or()();return Se.exports}var Cr=xr();const J=he(Cr);function er({columns:n,sortColumn:R,sortDirection:v,onSort:u}){return N.jsx("thead",{children:N.jsx("tr",{role:"row",children:n.map(E=>N.jsxs("th",{onClick:()=>u(E.accessor),className:"sorting","aria-label":`${E.accessor}: activate to sort column ${v==="asc"?"ascending":"descending"}`,children:[E.header,N.jsxs("div",{className:"sort-icon-wrapper",children:[N.jsxs("span",{className:`arrow up ${R===E.accessor&&v==="asc"?"active":""}`,children:[" ","▲"]}),N.jsx("span",{className:`arrow down ${R===E.accessor&&v==="desc"?"active":""}`,children:"▼"})]})]},E.accessor))})})}er.propTypes={columns:J.arrayOf(J.shape({header:J.string.isRequired,accessor:J.string.isRequired,render:J.func})).isRequired,sortColumn:J.string,sortDirection:J.oneOf(["asc","desc"]).isRequired,onSort:J.func.isRequired};function rr({value:n,onChange:R}){return N.jsx("div",{className:"dataTables_filter",children:N.jsxs("label",{children:["Search:",N.jsx("input",{type:"search","aria-controls":"employee-table",value:n,onChange:v=>R(v.target.value)})]})})}rr.propTypes={value:J.string.isRequired,onChange:J.func.isRequired};function tr({value:n,onChange:R}){return N.jsx("div",{className:"dataTables_length",children:N.jsxs("label",{children:["Show",N.jsx("select",{value:n,onChange:v=>R(Number(v.target.value)),children:[10,25,50,100].map(v=>N.jsx("option",{value:v,children:v},v))}),"entries"]})})}tr.propTypes={value:J.number.isRequired,onChange:J.func.isRequired};function nr({currentPage:n,totalPages:R,onPrevious:v,onNext:u}){return N.jsxs("div",{className:"dataTables_paginate paging_simple_numbers",children:[N.jsx("button",{className:"paginate_button previous",onClick:v,disabled:n===1,children:"Previous"}),N.jsx("span",{className:"paginate_button current",children:n}),N.jsx("button",{className:"paginate_button next",onClick:u,disabled:n===R,children:"Next"})]})}nr.propTypes={currentPage:J.number.isRequired,totalPages:J.number.isRequired,onPrevious:J.func.isRequired,onNext:J.func.isRequired};function wr({data:n}){const[R,v]=G.useState(1),[u,E]=G.useState(10),[f,j]=G.useState(""),[c,y]=G.useState(null),[S,l]=G.useState("asc"),b=m=>new Date(m).toLocaleDateString("fr-FR"),M=[{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"}],q=G.useMemo(()=>{let m=[...n];if(f){const D=f.toLowerCase();m=m.filter($=>Object.values($).some(F=>F==null?void 0:F.toString().toLowerCase().includes(D)))}return c&&(m.sort((D,$)=>{const F=D[c],a=$[c];if(F==null)return 1;if(a==null)return-1;let H=0;return typeof F=="string"?H=F.localeCompare(a):F>a?H=1:F<a?H=-1:H=0,H}),S==="desc"&&m.reverse()),m},[n,f,c,S]);G.useMemo(()=>v(1),[f,u]);const z=G.useMemo(()=>{const m=(R-1)*u;return q.slice(m,m+u)},[q,R,u]),W=Math.ceil(q.length/u),V=m=>{c===m?l(D=>D==="asc"?"desc":"asc"):(y(m),l("asc"))};return N.jsxs("div",{className:"dataTables_wrapper no-footer",children:[N.jsx(tr,{value:u,onChange:E}),N.jsx(rr,{value:f,onChange:j}),N.jsxs("table",{className:"display dataTable no-footer",children:[N.jsx(er,{columns:M,sortColumn:c,sortDirection:S,onSort:V}),N.jsx("tbody",{children:z.map((m,D)=>N.jsx("tr",{className:D%2===0?"odd":"even",children:M.map($=>N.jsx("td",{className:$.accessor===c?"sorting_1":"",children:$.render?$.render(m[$.accessor]):m[$.accessor]},$.accessor))},D))})]}),N.jsx("div",{className:"dataTables_info",children:`Showing ${R} to ${W} of ${q.length} entries`}),N.jsx(nr,{currentPage:R,totalPages:W,onPrevious:()=>v(m=>Math.max(m-1,1)),onNext:()=>v(m=>Math.min(m+1,W))})]})}return wr});