@jrc03c/make-key 0.0.34 → 0.0.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,20 +1,4 @@
1
- (()=>{var Tt=Object.create;var Ue=Object.defineProperty;var It=Object.getOwnPropertyDescriptor;var Dt=Object.getOwnPropertyNames;var Mt=Object.getPrototypeOf,Et=Object.prototype.hasOwnProperty;var qe=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,n)=>(typeof require<"u"?require:t)[n]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')});var jt=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of Dt(t))!Et.call(e,s)&&s!==n&&Ue(e,s,{get:()=>t[s],enumerable:!(r=It(t,s))||r.enumerable});return e};var ze=(e,t,n)=>(n=e!=null?Tt(Mt(e)):{},jt(t||!e||!e.__esModule?Ue(n,"default",{value:e,enumerable:!0}):n,e));var Bt=Object.defineProperty,Ft=(e,t,n)=>t in e?Bt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,nt=(e,t,n)=>(Ft(e,typeof t!="symbol"?t+"":t,n),n);function d(e){return typeof e=="number"&&!isNaN(e)||typeof e=="bigint"}var At=new Function(`
2
- try {
3
- return this === window
4
- } catch(e) {}
5
-
6
- try {
7
- return typeof importScripts !== "undefined"
8
- } catch(e) {}
9
-
10
- return false
11
- `),U=class extends Error{constructor(e){At()?super(e):super(`
12
-
13
- \x1B[31m`+e+`
14
- \x1B[0m`)}};function a(e,t){if(!e)throw new U(t)}var rt=[Array,ArrayBuffer,BigInt64Array,BigUint64Array,Float32Array,Float64Array,Int16Array,Int32Array,Int8Array,Uint16Array,Uint32Array,Uint8Array,Uint8ClampedArray];function p(e){return e===null||typeof e>"u"}var Pt=rt.map(e=>e.name);function h(e){try{return e instanceof Array?!0:p(e.constructor)?!1:rt.indexOf(e.constructor)>-1||Pt.indexOf(e.constructor.name)>-1}catch{return!1}}function v(e){try{return!!e._symbol&&e._symbol===Symbol.for("@jrc03c/js-math-tools/dataframe")}catch{return!1}}function D(e){return typeof e=="function"}function K(e){return typeof e=="object"&&!p(e)&&!h(e)}function y(e){try{return!!e._symbol&&e._symbol===Symbol.for("@jrc03c/js-math-tools/series")}catch{return!1}}function Q(e,t){if(v(e)){let o=Q(e.values,t);return o.length>0&&d(o[0])&&o[0]>=0&&o[0]<e.index.length&&(o[0]=e.index[o[0]]),o.length>1&&d(o[1])&&o[1]>=0&&o[1]<e.columns.length&&(o[1]=e.columns[o[1]]),o}if(y(e)){let o=Q(e.values,t);return o.length>0&&d(o[0])&&o[0]>=0&&o[0]<e.index.length&&(o[0]=e.index[o[0]]),o}if(a(K(e)||h(e),"You must pass (1) an object, array, Series, or DataFrame and (2) a function or value into the `indexOf` function!"),!D(t)){let o=t;t=i=>i===o}function n(o,i,u){if(u=u||[],u.indexOf(o)>-1)return null;if(K(o)){u.push(o);let l=Object.keys(o).concat(Object.getOwnPropertySymbols(o));for(let c=0;c<l.length;c++){let f=l[c],m=o[f];if(i(m))return[f];let g=n(m,i,u);if(g&&g.length>0)return[f].concat(g)}}else if(h(o)){u.push(o);for(let l=0;l<o.length;l++){let c=o[l];if(i(c))return[l];let f=n(c,i,u);if(f&&f.length>0)return[l].concat(f)}}else if(i(o))return[];return null}function r(o){try{return t(o)}catch{return!1}}let s=n(e,r);return s&&s.length>0?s:null}function E(e){function t(n){if(typeof n=="object"){if(n===null)return null;if(h(n))return n instanceof Array?n.map(s=>E(s)):n.slice();if(y(n)){let s=n.copy();return s.values=E(s.values),s}if(v(n)){let s=n.copy();return s.values=E(n.values),s}if(n instanceof Date)return new Date(n.getTime());n=Z(n);let r={};return Object.keys(n).concat(Object.getOwnPropertySymbols(n)).forEach(s=>{r[s]=E(n[s])}),r}else return n}return t(Z(e))}function Z(e){function t(s,o,i){if(o=o||[],i=i||"",o.indexOf(s)>-1){let u=i.split("/").slice(i.startsWith("/")?1:0);if(u.some((c,f)=>{let m=u.slice(0,u.length-f-1),g=n;return m.forEach(N=>{g=g[N]}),g===s}))return`<reference to "${n===s?"/":"/"+Q(n,s).join("/")}">`}return typeof s=="object"?s===null?null:(o.push(s),h(s)?typeof s.constructor<"u"&&s.constructor.name!=="Array"?s.slice():s.map((u,l)=>t(u,o,i+"/"+l)):(Object.keys(s).concat(Object.getOwnPropertySymbols(s)).forEach(u=>{s[u]=t(s[u],o,i+"/"+u.toString())}),s)):s}let n=e,r=t(n);if(v(e)){let s=e.copy();s._values=r.values,s._columns=r.columns,s._index=r.index,r=s}if(y(e)){let s=e.copy();s.name=r.name,s._values=r.values,s._index=r.index,r=s}return r}function L(e){return e instanceof Date&&e.toString()!=="Invalid Date"}var Ge=["number","int","float","bigint"];function J(e,t){function n(r,s){let o=typeof r,i=typeof s;if(o!==i&&!Ge.includes(o)&&!Ge.includes(i))return!1;if(o==="undefined"&&i==="undefined")return!0;if(o==="boolean"||o==="symbol")return r===s;if(o==="number"||o==="bigint")try{let u=r.toString(),l=s.toString();return u===l}catch{return!1}if(o==="string"||o==="function")return r===s;if(o==="object"){if(r===null||s===null)return r===null&&s===null;{if(L(r))return L(s)?r.getTime()===s.getTime():!1;if(L(s))return!1;if(r instanceof RegExp&&s instanceof RegExp)return r.toString()===s.toString();if(h(r)!==h(s))return!1;let u=Object.keys(r).concat(Object.getOwnPropertySymbols(r)),l=Object.keys(s).concat(Object.getOwnPropertySymbols(s));if(u.length!==l.length)return!1;for(let c=0;c<u.length;c++){let f=u[c];if(!n(r[f],s[f]))return!1}return!0}}}try{return n(e,t)}catch{return n(Z(e),Z(t))}}function oe(e){let t="abcdefg1234567890",n="";for(;n.length<e;)n+=t[Math.floor(Math.random()*t.length)];return n}var Ct=oe(16),kt=oe(16),Rt=oe(16),Yt=oe(16),Kt=oe(16),Jt=class{constructor(){this.clear()}get counts(){return this.values.map(e=>this.get(e))}get values(){return Object.values(this.valuesDict)}clear(){return this.countsDict={},this.valuesDict={},this}count(e){for(let t of e)h(t)?this.count(t):this.increment(t);return this}delete(e){let t=this.getStandardizedKey(e);return delete this.countsDict[t],delete this.valuesDict[t],this}get(e){return this.countsDict[this.getStandardizedKey(e)]||0}getStandardizedKey(e){return typeof e=="object"&&e===null?Ct:p(e)?kt:D(e)?e.toString():typeof e=="symbol"?e.toString()+" - "+Kt:e===1/0?Rt:e===-1/0?Yt:typeof e=="bigint"?e.toString():v(e)?e.toJSONString():y(e)?JSON.stringify(e.toObject()):JSON.stringify(e)}has(e){return!p(this.countsDict[this.getStandardizedKey(e)])}increment(e){return this.set(e,this.get(e)+1)}set(e,t){let n=this.getStandardizedKey(e);return this.countsDict[n]=t,this.valuesDict[n]=e,this}toArray(){return this.values.map(e=>({value:e,count:this.get(e)}))}toObject(){let e={};return this.values.forEach(t=>{e[t]=this.get(t)}),e}};function R(e){if(v(e)||y(e))return R(e.values);a(h(e),"The `flatten` function only works on arrays, Series, and DataFrames!");function t(n){let r=[];return n.forEach(s=>{h(s)?r=r.concat(t(s)):r.push(s)}),r}return t(e)}function P(e,t){t=t||{};let n=new Jt,r={},s=R(e),o=[],i=-1/0,u=1/0,l=!1,c=0;for(let m of s){if(typeof m=="bigint"&&(l=!0),!t.shouldDropNaNs||d(m))try{m>i&&(i=m),m<u&&(u=m),c+=Number(m),o.push(m)}catch{i=NaN,u=NaN,c=NaN}n.increment(m)}let f=c/o.length;if(r.counts=n,r.max=i,r.mean=f,r.min=u,r.n=s.length,r.sum=c,isNaN(r.mean)&&(r.max=NaN,r.min=NaN),t.shouldDropNaNs&&(r.nWithoutNaNs=o.length),t.mode){let m=Array.from(n.values.map(I=>[I,n.get(I)])).toSorted((I,M)=>M[1]-I[1]),g=m[0][1],N=[];for(let I of m)if(I[1]==g)N.push(I[0]);else break;r.mode=N.toSorted()}if(t.median)if(isNaN(f))r.median=NaN;else{let m=o.toSorted((N,I)=>Number(N)-Number(I)),g=Math.floor(m.length/2);if(m.length%2===0){let N=m[g-1],I=m[g];if(r.median=(Number(N)+Number(I))/2,l&&typeof N=="bigint"&&typeof I=="bigint")try{r.median=BigInt(r.median)}catch{}}else r.median=m[g]}if(t.stdev||t.variance){let m=0;for(let N of o)m+=Math.pow(Number(N)-f,2);m/=o.length;let g=Math.sqrt(m);r.stdev=g,r.variance=m}if(l){try{r.sum=BigInt(r.sum)}catch{}try{r.mean=BigInt(r.mean)}catch{}t.mode&&(r.mode=r.mode.map(m=>{try{return BigInt(m)}catch{return m}}))}return r}function ge(e,t){let{counts:n}=P(e);return p(t)||(D(t)?n.values.forEach(r=>{t(r)||n.delete(r)}):n.values.forEach(r=>{J(r,t)||n.delete(r)})),n}function Ie(e){if(v(e)||y(e))return Ie(e.values);if(h(e)){let t=!1,n=!1,r=null;for(let s of e){if(Ie(s))return!0;if(h(s)){if(r===null)r=s.length;else if(s.length!==r)return!0;t=!0}else n=!0;if(t&&n)return!0}}return!1}function ie(e){return Ie(Z(e))}function Ne(e){if(v(e)||y(e))return Ne(e.values);a(h(e),"The `isNested` function only works on arrays, Series, and DataFrames!");for(let t=0;t<e.length;t++)if(h(e[t]))return!0;return!1}var W="You must pass a natural number or a one-dimensional array of natural numbers into the `ndarray` function!";function k(e){a(!p(e),W),h(e)||(e=[e]),a(!Ne(e),W),a(e.length>0,W);let t=e[0];if(typeof t=="bigint"&&(t=Number(t)),a(d(t),W),a(t>=0,W),a(Math.floor(t)===t,W),a(t!==1/0,"We can't create an array containing an infinite number of values!"),e.length===1){let n=[];for(let r=0;r<t;r++)n.push(void 0);return n}else{let n=[];for(let r=0;r<t;r++)n.push(k(e.slice(1)));return n}}function Y(e){if(v(e)||y(e)){let n=e.copy();return n.values=Y(n.values),n.index=Y(n.index),n}a(h(e),"The `reverse` function only works on arrays, Series, and DataFrames!");let t=[];for(let n=e.length-1;n>=0;n--)t.push(e[n]);return t}function T(e,t,n=1){a(!p(e)&&!p(t)&&!p(n),"You must pass two numbers and optionally a step value to the `range` function!"),a(d(e)&&d(t)&&d(n),"You must pass two numbers and optionally a step value to the `range` function!"),a(n>0,"The step value must be greater than 0! (NOTE: The step value is a magnitude; it does not indicate direction.)");let r=!1,s=typeof e=="bigint"||typeof t=="bigint"||typeof n=="bigint";if(e=Number(e),t=Number(t),n=Number(n),e>t){r=!0;let i=e;e=t+n,t=i+n}let o=[];for(let i=e;i<t;i+=n)if(s)try{o.push(BigInt(i))}catch{o.push(i)}else o.push(i);return r&&(o=Y(o)),o}function ue(e){let t="abcdefg1234567890",n="";for(;n.length<e;)n+=t[Math.floor(Math.random()*t.length)];return n}var $t=ue(256),Lt=ue(256),Vt=ue(256),Ut=ue(256),qt=ue(256);function C(e){if(v(e)||y(e))return C(e.values);a(h(e),"The `set` function only works on arrays, Series, and DataFrames!");let t=[],n={};return R(e).forEach(r=>{let s=typeof r=="object"&&r===null?$t:p(r)?Lt:D(r)?r.toString():typeof r=="symbol"?r.toString()+" - "+qt:r===1/0?Vt:r===-1/0?Ut:typeof r=="bigint"?r.toString():v(r)?r.toJSONString():y(r)?JSON.stringify(r.toObject()):JSON.stringify(r);n[s]||t.push(r),n[s]=!0}),t}function st(e){if(h(e)){let t=st(e[0]);return[e.length].concat(t||[])}else return}function b(e){return v(e)||y(e)?b(e.values):(a(h(e),"The `shape` function only works on arrays, Series, and DataFrames!"),st(e))}function ot(e,t,n){if(p(n)&&(n=0),a(n===0||n===1||n==="vertical"||n==="horizontal",'The only valid axis values for use when appending data to a DataFrame are 0, 1, "vertical", and "horizontal". Note that 0 == "horizontal" and 1 == "vertical".'),h(t)){a(!ie(t),"The array of data you're trying to append to this DataFrame is jagged!");let r=b(t);if(r.length===1)if(n===0){let s=e.copy();s._values.push(t);let o=Math.max(e.shape[1],r[0]);for(s._values.forEach(i=>{for(;i.length<o;)i.push(void 0)});s._index.length<s._values.length;)s._index.push("row"+s._index.length);for(;s._columns.length<o;)s._columns.push("col"+s._columns.length);return s}else{let s=Math.max(e.shape[0],r[0]),o=e.copy();for(T(0,s).forEach(i=>{i>=o._values.length&&o._values.push(k(e.shape[1])),o._values[i].push(t[i])});o._index.length<o._values.length;)o._index.push("row"+o._index.length);for(;o._columns.length<o._values[0].length;)o._columns.push("col"+o._columns.length);return o}else if(r.length===2)if(n===0){let s=Math.max(...t.map(i=>i.length).concat([e.shape[1]])),o=e.copy();for(o._values=o._values.concat(t).map(i=>{for(;i.length<s;)i.push(void 0);return i});o._index.length<o._values.length;)o._index.push("row"+o._index.length);for(;o._columns.length<s;)o._columns.push("col"+o._columns.length);return o}else{let s=Math.max(...t.map(u=>u.length))+e.shape[1],o=Math.max(e.shape[0],r[0]),i=e.copy();for(T(0,o).forEach(u=>{for(u>=i._values.length&&i._values.push(k(e.shape[1])),i._values[u]=i._values[u].concat(t[u]);i._values[u].length<s;)i._values[u].push(void 0)});i._index.length<i._values.length;)i._index.push("row"+i._index.length);for(;i._columns.length<s;)i._columns.push("col"+i._columns.length);return i}else throw new U("Only 1- and 2-dimensional arrays can be appended to a DataFrame!")}else if(y(t)){let r=ot(e,t.values,n);return n===0?r.index[r.index.length-1]=r.index.indexOf(t.name)>-1?t.name+" (2)":t.name:r.columns[r.columns.length-1]=r.columns.indexOf(t.name)>-1?t.name+" (2)":t.name,r}else if(v(t))if(n===0){let r=e.copy(),s=C(r._columns.concat(t._columns)).length;for(r._values.forEach(o=>{for(;o.length<s;)o.push(void 0)}),t.apply(o=>{let i=o.copy(),u=[];r._columns.forEach(l=>{let c=i._index.indexOf(l);c>-1?(u.push(i._values[c]),i._values.splice(c,1),i._index.splice(c,1)):u.push(void 0)}),r._values.push(u.concat(i._values))},1),r._columns=r._columns.concat(t._columns.filter(o=>r._columns.indexOf(o)<0));r._index.length<r._values.length;){let o="row"+r._index.length;r._index.push(o+(e._index.indexOf(o)>-1?" (2)":""))}return r}else{let r=e.copy();return r._index.forEach((s,o)=>{let i=t._index.indexOf(s);i>-1?r._values[o]=r._values[o].concat(t._values[i]):r._values[o]=r._values[o].concat(k(t.shape[1]))}),t._index.forEach((s,o)=>{r._index.indexOf(s)<0&&(r._index.push(s),r._values.push(k(r._columns.length).concat(t._values[o])))}),r._columns=r._columns.concat(t._columns.map(s=>s+(r._columns.indexOf(s)>-1?" (2)":""))),r}else throw new U("Only 1- or 2-dimensional arrays, Series, and DataFrames can be appended to a DataFrame!")}function zt(e,t,n,r,s){if(s=s||0,a(D(r),"The first parameter to the `apply` method must be a function."),a(s===0||s===1,"The second parameter to the `apply` method (the `axis`) must be 0 or 1."),s===0){let o={},i;if(n.columns.forEach((u,l)=>{let c=new t(n.values.map(m=>m[l]));c.name=u,c.index=n.index;let f=r(c,l,n);f instanceof t?o[u]=f.values:o[u]=f,p(i)&&(i=f instanceof t||h(f))}),i){let u=new e(o);return u.index=n.index,u}else{let u=new t(n.columns.map(l=>o[l]));return u.index=n.columns,u}}else if(s===1){let o,i=n.values.map((u,l)=>{let c=new t(u);c.name=n.index[l],c.index=n.columns;let f=r(c,l,n);return p(o)&&(o=f instanceof t||h(f)),f instanceof t?f.values:f});if(o){let u=new e(i);return u.index=n.index,u.columns=n.columns,u}else{let u=new t(i);return u.index=n.index,u}}}function w(e){return typeof e=="string"}function Gt(e,t,n,r,s){let o=u=>u instanceof e,i=u=>u instanceof t;if(p(s)){if(o(r))return n.append(r,1);if(i(r))return n.append(r,1);if(K(r)){let u=Math.max(...Object.keys(r).concat(Object.getOwnPropertySymbols(r)).map(l=>r[l].length));return Object.keys(r).concat(Object.getOwnPropertySymbols(r)).forEach(l=>{for(;r[l].length<u;)r[l].push(void 0)}),n.append(new e(r),1)}else throw new U("You must pass a DataFrame, Series, or object into the `assign` method!")}else{a(w(r),"If passing two arguments into the `assign` method, then the first argument must be a string name!"),a(h(s)&&!ie(s)&&b(s).length===1,"If passing two arguments into the `assign` method, then the second argument must be a 1-dimensional array!");let u=n.append(s,1);return u.columns[u.columns.length-1]=r,u}}function Wt(e,t){if(t.isEmpty)return new e;let n=new e(E(t.values));return n.columns=t.columns.slice(),n.index=t.index.slice(),n}function Ht(e,t,n,r,s){p(r)&&(r=[]),p(s)&&(s=[]),(w(r)||d(r))&&(r=[r]),(w(s)||d(s))&&(s=[s]),a(h(r),"The `drop` method only works on 1-dimensional arrays of numerical indices and/or strings."),a(h(s),"The `drop` method only works on 1-dimensional arrays of numerical indices and/or strings."),a(b(r).length===1,"The `drop` method only works on 1-dimensional arrays of numerical indices and/or strings."),a(b(s).length===1,"The `drop` method only works on 1-dimensional arrays of numerical indices and/or strings.");let o,i;n.index.forEach((l,c)=>{r.indexOf(l)<0&&r.indexOf(c)<0&&(o||(o=[]),o.push(l))}),n.columns.forEach((l,c)=>{s.indexOf(l)<0&&s.indexOf(c)<0&&(i||(i=[]),i.push(l))});let u=n.get(o,i);if(u instanceof t){let l=new e;l=l.assign(u),n.index.indexOf(u.name)>-1&&(l=l.transpose()),u=l}return u}function it(e){return d(e)&&(e>=0?Math.floor(e)===e:Math.ceil(e)===e)}function x(e){return it(e)&&e>=0}function Xt(e,t,n,r,s,o){r=r||0,a(r===0||r===1,"The first parameter of the `dropMissing` method (the `axis`) must be 0 or 1."),o=o||0,a(x(o),"The third parameter of the `dropMissing` method (the `threshold`) should be a whole number (meaning that data should be dropped if it contains more than `threshold` null values)."),s=o>0?"none":s||"any",a(s==="any"||s==="all"||s==="none","The second parameter of the `dropMissing` method (the `condition` parameter, which indicates the condition under which data should be dropped) should be 'any' or 'all' (meaning that if 'any' of the data contains null values, then it should be dropped; or that if 'all' of the data contains null values, then it should be dropped).");function i(c){if(o>0){let f=0;for(let m=0;m<c.length;m++){let g=c[m];if(p(g)&&f++,f>=o)return[]}}else if(s==="any")for(let f=0;f<c.length;f++){let m=c[f];if(p(m))return[]}else if(s==="all"){for(let f=0;f<c.length;f++){let m=c[f];if(!p(m))return c}return[]}return c}let u=n.copy(),l=Math.random().toString();if(r===0){u=u.assign(l,u.index);let c=u.values.map(i).filter(m=>m.length>0);if(b(c).length<2)return new e;u.values=c;let f=u.get(null,l);if(p(f))return new e;w(f)&&(f=[f]),f instanceof t&&(f=f.values),u.index=f,u=u.drop(null,l)}else if(r===1){let c={};if(u.columns.forEach((m,g)=>{let N=u.values.map(M=>M[g]),I=i(N);I.length>0&&(c[m]=I)}),Object.keys(c).length+Object.getOwnPropertySymbols(c).length===0)return new e;let f=new e(c);return f.index=u.index,f}return u}function Re(e){if(v(e)||y(e))return e.dropNaN(...Object.values(arguments).slice(1));a(h(e),"The `dropNaN` function only works on arrays, Series, and DataFrames!");let t=[];return e.forEach(n=>{try{return t.push(Re(n))}catch{if(d(n))return t.push(n)}}),t}function Qt(e,t,n,r,s){n=n||0,a(n===0||n===1,"The first parameter of the `dropNaN` method (the `axis`) must be 0 or 1."),s=s||0,a(x(s),"The third parameter of the `dropNaN` method (the `threshold`) should be a whole number (meaning that data should be dropped if it contains more than `threshold` NaN values)."),r=s>0?"none":r||"any",a(r==="any"||r==="all"||r==="none","The second parameter of the `dropNaN` method (the `condition` parameter, which indicates the condition under which data should be dropped) should be 'any' or 'all' (meaning that if 'any' of the data contains NaN values, then it should be dropped; or that if 'all' of the data contains NaN values, then it should be dropped).");function o(u){let l=Re(u);return s>0?u.length-l.length<s:r==="any"?l.length===u.length:r==="all"?l.length>0:!0}let i=t.copy();if(n===0){let u=i.index.filter(l=>{let c=i.get(l,null).values;return o(c)});return u.length>0?i.get(u,null):new e}else if(n===1){let u=i.columns.filter(l=>{let c=i.get(null,l).values;return o(c)});return u.length>0?i.get(null,u):new e}return i}function We(e){let t={};return R(e).forEach((n,r)=>{t[n]=r}),t}function H(e){return Object.keys(e).concat(Object.getOwnPropertySymbols(e)).sort((t,n)=>e[t]-e[n])}function Zt(e,t,n,r,s){a(D(r),"The `filter` method takes a single parameter: a function that is used to filter the values."),p(s)&&(s=0),a(s===0||s===1,"The `axis` parameter to the `filter` method must be 0 or 1.");let o=n.copy();if(o.isEmpty)return o;let i=We(o.index),u=We(o.columns);if(s===0){let l=0,c=o.values.filter((f,m)=>{let g=new t(f);g.name=n.index[m],g.index=n.columns;let N=r(g,m,n);return N?l++:delete i[o.index[m]],N});if(l===0)return new e;if(l===1){let f=new t(c[0]);return f.name=H(i)[0],f.index=H(u),f}o.values=c,o.index=H(i)}else if(s===1){o=o.transpose();let l=0,c=o.values.filter((f,m)=>{let g=new t(f);g.name=n.columns[m],g.index=n.index;let N=r(g,m,n);return N?l++:delete u[o.index[m]],N});if(l===0)return new e;if(l===1){let f=new t(c[0]);return f.name=H(u)[0],f.index=H(i),f}o.values=c,o.index=H(u),o=o.transpose()}return o}function xt(e,t,n){(w(t)||d(t))&&(t=[t]),(w(n)||d(n))&&(n=[n]);for(let s in t)typeof t[s]=="bigint"&&(t[s]=Number(t[s]));for(let s in n)typeof n[s]=="bigint"&&(n[s]=Number(n[s]));let r=C((t||[]).concat(n||[]).map(s=>typeof s));return a(r.length<=2,"Only whole numbers and/or strings are allowed in `get` arrays!"),r.length===1&&a(r[0]==="string"||r[0]==="number","Only whole numbers and/or strings are allowed in `get` arrays!"),r.length===2&&(a(r.indexOf("string")>-1,"Only whole numbers and/or strings are allowed in `get` arrays!"),a(r.indexOf("number")>-1,"Only whole numbers and/or strings are allowed in `get` arrays!")),p(t)||(t=t.map(s=>{if(w(s))return a(e.index.indexOf(s)>-1,`Row "${s}" does not exist!`),s;if(d(s))return a(s>=0,`Index ${s} is out of bounds!`),a(Math.floor(s)===s,"Row numbers must be integers!"),a(s<e.index.length,`Index ${s} is out of bounds!`),e.index[s]})),p(n)||(n=n.map(s=>{if(w(s))return a(e.columns.indexOf(s)>-1,`Column "${s}" does not exist!`),s;if(d(s))return a(s>=0,`Column ${s} is out of bounds!`),a(Math.floor(s)===s,"Column numbers must be integers!"),a(s<e.columns.length,`Column ${s} is out of bounds!`),e.columns[s]})),e.getSubsetByNames(t,n)}function en(e,t){try{return e<t?-1:e>t?1:0}catch{return e=typeof e=="object"&&e!==null?JSON.stringify(e):e.toString(),t=typeof t=="object"&&t!==null?JSON.stringify(t):t.toString(),e<t?-1:e>t?1:0}}function G(e,t){if(p(t)&&(t=en),v(e)||y(e))return e.sort(...Object.values(arguments).slice(1));a(h(e),"The `sort` function only works on arrays, Series, and DataFrames!"),a(D(t),"The second parameter of the `sort` function must be a comparison function!");let n=e.slice();return n.sort(t),n}function tn(e){let t=e.toLowerCase(),n="";for(let s=0;s<t.length;s++){let o=t[s];o.match(/[a-z0-9]/g)?n+=o:n+=" "}let r=n.split(" ").filter(s=>s.length>0);return r[0]+r.slice(1).map(s=>s[0].toUpperCase()+s.substring(1)).join("")}function He(e,t,n){p(n)?n=t.columns:w(n)&&(n=[n]);let r={};n.forEach(o=>{a(w(o),"You must pass either a string or a one-dimensional array of strings into the `getDummies` (AKA `oneHotEncode`) method!");let i=t.columns.indexOf(o);a(i>-1,`The given DataFrame does not have a column called "${o}"!`);let u=t.values.map(c=>c[i]),l=G(C(u));u.forEach(c=>{l.forEach(f=>{let m=o+"_"+tn(f.toString());r[m]||(r[m]=[]),c===f?r[m].push(1):r[m].push(0)})})});let s=new e(r);return s.index=t.index,s}function nn(e,t,n){let r=e.shape;p(t)&&(t=T(0,r[0])),p(n)&&(n=T(0,r[1])),d(t)&&(t=[t]),d(n)&&(n=[n]),a(h(t)&&h(n),"The `rowIndices` and `colIndices` parameters must be 1-dimensional arrays of whole numbers."),a(b(t).length===1&&b(n).length===1,"The `rowIndices` and `colIndices` parameters must be 1-dimensional arrays of whole numbers."),a(t.length>0,"The `rowIndices` array must contain at least one index."),a(n.length>0,"The `colIndices` array must contain at least one index."),t.forEach(i=>{a(x(i),"The `rowIndices` and `colIndices` parameters must be 1-dimensional arrays of whole numbers."),a(i<e.index.length,`The row index ${i} is out of bounds.`)}),n.forEach(i=>{a(x(i),"The `rowIndices` and `colIndices` parameters must be 1-dimensional arrays of whole numbers."),a(i<e.columns.length,`The column index ${i} is out of bounds.`)});let s=t.map(i=>e.index[i]),o=n.map(i=>e.columns[i]);return e.getSubsetByNames(s,o)}function rn(e,t,n,r,s){p(r)&&(r=n.index),p(s)&&(s=n.columns),w(r)&&(r=[r]),w(s)&&(s=[s]),a(h(r)&&h(s),"The `rows` and `cols` parameters must be 1-dimensional arrays of strings."),a(b(r).length===1&&b(s).length===1,"The `rows` and `cols` parameters must be 1-dimensional arrays of strings."),a(r.length>0,"The `rows` array must contain at least one row name."),a(s.length>0,"The `cols` array must contain at least one column name."),r.forEach(u=>{a(w(u),"The `rows` and `cols` parameters must be 1-dimensional arrays of strings."),a(n.index.indexOf(u)>-1,`The row name "${u}" does not exist in the list of rows.`)}),s.forEach(u=>{a(w(u),"The `rows` and `cols` parameters must be 1-dimensional arrays of strings."),a(n.columns.indexOf(u)>-1,`The column name "${u}" does not exist in the list of columns.`)});let o=r.map(u=>s.map(l=>n.values[n.index.indexOf(u)][n.columns.indexOf(l)]));if(r.length===1&&s.length===1)return o[0][0];if(r.length===1){let u=new t(o[0]);return u.name=r[0],u.index=s,u}if(s.length===1){let u=new t(o.map(l=>l[0]));return u.name=s[0],u.index=r,u}let i=new e(o);return i.columns=s,i.index=r,i}function sn(e,t,n){function r(g,N){return w(g)&&g.length>N?g.substring(0,N-3)+"...":g}if(n.isEmpty)return console.table({}),console.log("Shape:",[0,0],`
15
- `),n;let s=typeof window>"u"?20:10,o=Math.floor(s/2),i=typeof process>"u"?10:Math.floor(process.stdout.columns/24)-1,u=Math.floor(i/2),l=s>n.index.length?null:T(0,o).concat(T(n.index.length-o,n.index.length)),c=i>n.columns.length?null:T(0,u).concat(T(n.columns.length-u,n.columns.length)),f=n.get(l,c);f instanceof t&&(n.shape[0]===1?(f=new e([f.values]),f.index=n.index,f.columns=new t(n.columns).get(c).values):n.shape[1]===1&&(f=new e([f.values]).transpose(),f.index=new t(n.index).get(l).values,f.columns=n.columns)),s<=n.index.length&&(f._index.splice(o,0,"..."),f._values.splice(o,0,T(0,f.columns.length).map(()=>"..."))),i<=n.columns.length&&(f._columns.splice(u,0,"..."),f._values=f._values.map(g=>(g.splice(u,0,"..."),g)));let m=28;return f instanceof t?(f.values=f.values.map(g=>r(g,m)),f.name=r(f.name,m),f.index=f.index.map(g=>r(g,m))):(f.values=f.values.map(g=>g.map(N=>r(N,m))),f.columns=f.columns.map(g=>r(g,m)),f.index=f.index.map(g=>r(g,m))),console.table(f.toDetailedObject()),console.log("Shape:",n.shape,`
16
- `),n}function X(e,t){a(d(e),"The `leftPad` function only works on numbers!");let n=e.toString();for(;n.length<t;)n="0"+n;return n}function on(e,t){let n=t?e:e.copy();return n.index=T(0,e.shape[0]).map(r=>"row"+X(r,(n.index.length-1).toString().length)),n}function ae(e,t){if(v(e)||y(e))return ae(e.values,t);a(h(e),"The `product` function only works on arrays, Series, and DataFrames!");try{if(e.length===0)return NaN;let n=R(e),r=!1,s=1;for(let o of n){if(!d(o))if(t)o=1;else return NaN;typeof o=="bigint"&&(r=!0,o=Number(o)),s*=o}if(r)try{return BigInt(s)}catch{}return s}catch{return NaN}}function un(e){return it(e)&&e>0}function se(e,t){if(v(e)||y(e))return se(e.values,t);if(a(h(e),"The first argument passed into the `reshape` function must be an array!"),d(t)&&(t=[t]),a(h(t),"The second argument passed into the `reshape` function must be a whole number or a one-dimensional array of whole numbers!"),a(b(t).length===1,"The first argument passed into the `reshape` function must be a whole number or a one-dimensional array of whole numbers!"),t=t.map(o=>(typeof o=="bigint"&&(o=Number(o)),a(un(o),"The first argument passed into the `reshape` function must be a whole number or a one-dimensional array of whole numbers!"),Number(o))),t.length===0)return R(e);let n=R(e);if(t.length===1&&t[0]===n.length)return n;a(ae(t)===n.length,"The new shape doesn't match the number of values available in `x` (the first argument passed into the `reshape` function)!");let r=[],s=Math.floor(n.length/t[0]);for(let o=0;o<t[0];o++){let i=n.slice(o*s,(o+1)*s);r.push(se(i,t.slice(1)))}return r}var ut=Math.pow(2,64),_=[];we(Math.floor(Math.random()*ut));function an(e,t){e=j(e);function n(){e+=j("0x9e3779b97f4a7c15");let s=E(e);return s=(s^s>>BigInt(30))*j("0xbf58476d1ce4e5b9"),s=(s^s>>BigInt(27))*j("0x94d049bb133111eb"),s^s>>BigInt(31)}let r=[];for(let s=0;s<t;s++)r.push(n());return r}function j(e){return BigInt.asUintN(64,BigInt(e))}function Xe(e,t){return e=j(e),t=BigInt(t),j(j(e<<t)|j(e>>j(BigInt(64)-t)))}function we(e){if(typeof e=="bigint"&&(e=Number(e)),p(e))return E(_);{a(d(e),"If passing a value into the `seed` function, then that value must be an integer!");let t=an(Math.floor(e),4);_[0]=t[0],_[1]=t[1],_[2]=t[2],_[3]=t[3]}}function Qe(){let e=j(Xe(_[0]+_[3],23)+_[0]),t=j(_[1]<<BigInt(17));return _[2]=j(_[2]^_[0]),_[3]=j(_[3]^_[1]),_[1]=j(_[1]^_[2]),_[0]=j(_[0]^_[3]),_[2]=j(_[2]^t),_[3]=Xe(_[3],45),Math.floor(Number(e))/ut}function q(e){return p(e)?Qe():(h(e)||(e=[e]),se(k(ae(e)).map(Qe),e))}function pe(e){if(v(e)||y(e))return e.shuffle(...Object.values(arguments).slice(1));a(h(e),"The `shuffle` function only works on arrays, Series, and DataFrames!");let t=[],n=e.slice();for(let r=0;r<e.length;r++){let s=Math.floor(q()*n.length);t.push(n.splice(s,1)[0])}return t}function ln(e,t){return p(t)&&(t=0),a(t===0||t===1,"The `axis` parameter to the `shuffle` must be 0, 1, or undefined."),e.get(t===0?pe(e.index):null,t===1?pe(e.columns):null)}function z(e){return typeof e=="boolean"}function cn(e,t,n){return D(t)?fn(e,t,n):hn(e,t,n)}function fn(e,t,n){if(n=p(n)?0:n,a(D(t),"When sorting a DataFrame using a function, the first argument to the `sort` method must be a function!"),a(d(n),"When sorting a DataFrame using a function, the second argument to the `sort` method must be null, undefined, 0, or 1 to indicate the axis along which the data should be sorted! An axis of 0 means that the rows will be sorted relative to each other, whereas an axis of 1 means that the columns will be sorted relative to each other."),n===0){let r=G(e.index,(s,o)=>t(e.get(s,null),e.get(o,null)));return e.get(r,null)}else{let r=G(e.columns,(s,o)=>t(e.get(null,s),e.get(null,o)));return e.get(null,r)}}function hn(e,t,n){let r=e.copy(),s=q().toString();r=r.assign(s,r.index),p(t)&&(t=[s],n=[!0]),(d(t)||w(t))&&(t=[t],(z(n)||w(n))&&(n=[n])),a(h(t),"The first parameter of the `sort` method must be (1) a string or index representing a column name or index, respectively; (2) a 1-dimensional array of strings and/or indices; or (3) null."),a(b(t).length===1,"The first parameter of the `sort` method must be (1) a string or index representing a column name or index, respectively; (2) a 1-dimensional array of strings and/or indices; or (3) null."),p(n)&&(n=T(0,t.length).map(()=>!0)),a(h(n),"The second parameter of the `sort` method must be (1) a string or boolean representing the sort direction ('ascending' / 'descending', or true / false); (2) a 1-dimensional array of strings and/or booleans; or (3) null."),a(b(n).length===1,"The second parameter of the `sort` method must be (1) a string or boolean representing the sort direction ('ascending' / 'descending', or true / false); (2) a 1-dimensional array of strings and/or booleans; or (3) null."),a(t.length===n.length,"The arrays passed into the `sort` method must be equal in length."),t=t.map(i=>{if(a(w(i)||d(i),"Column references can either be column names (as strings) or column indices (as whole numbers)."),w(i)){let u=r.columns.indexOf(i);return a(u>-1,`The column "${i}" does not exist!`),u}if(d(i))return a(x(i),"Column indices must be whole numbers!"),a(i<r.columns.length,`The index ${i} is out of bounds!`),i}),n=n.map(i=>{if(a(w(i)||z(i),"Direction references can either be strings ('ascending' or 'descending') or booleans (true or false)."),w(i)){let u=i.trim().toLowerCase();return a(u==="ascending"||u==="descending","Direction references can either be strings ('ascending' or 'descending') or booleans (true or false)."),u==="ascending"}if(z(i))return i}),r.values=G(r.values,(i,u)=>{let l=0;for(;i[t[l]]===u[t[l]]&&l<t.length;)l++;let c=n[l];if(i[t[l]]===u[t[l]])return 0;if(i[t[l]]<u[t[l]])return c?-1:1;if(i[t[l]]>u[t[l]])return c?1:-1});let o=r.columns.indexOf(s);return r.index=r.values.map(i=>i[o]),r=r.dropColumns(s),r}function mn(e,t){p(t)?t=0:a(t===0||t===1,"The axis parameter of the `toDetailedObject` method must be undefined, 0, or 1. An axis of 0 indicates that the returned object should be organized first by rows and then by columns. An axis of 1 indicates that the returned object should be organized first by columns and then by rows.");let n={};return t===0?e.index.forEach((r,s)=>{let o={};e.columns.forEach((i,u)=>{o[i]=e.values[s][u]}),n[r]=o}):e.columns.forEach((r,s)=>{let o={};e.index.forEach((i,u)=>{o[i]=e.values[u][s]}),n[r]=o}),n}function at(e,t){return JSON.stringify(e.toObject(t))}async function dn(e,t,n){let r=at(e,n),s=!1,o=!1,i,u;try{let l=t;if(t.includes("/")){let f=t.split("/");l=f[f.length-1]}let c=document.createElement("a");c.href=`data:application/json;charset=utf-8,${encodeURIComponent(r)}`,c.download=l,c.dispatchEvent(new MouseEvent("click")),s=!0}catch(l){i=l}try{let l=await import("node:fs"),c=await import("node:path");l.writeFileSync(c.resolve(t),r,"utf8"),o=!0}catch(l){u=l}if(!s&&!o)throw typeof window<"u"?new U(i):typeof module<"u"?new U(u):new U("I don't know what's going wrong, but it doesn't seem like you're in Node or the browser, and we couldn't download and/or write the file to disk!");return e}function gn(e){let t={};return e.columns.forEach(n=>{t[n]=e.get(n).values}),t}function V(e){if(v(e)||y(e))return e.transpose();a(h(e),"The `transpose` function only works on arrays, Series, and DataFrames!");let t=b(e);if(a(t.length<=2,"I'm not smart enough to know how to transpose arrays that have more than 2 dimensions. Sorry for the inconvenience! Please only pass 1- or 2-dimensional arrays into the `transpose` function!"),t.length===1)return Y(e);if(t.length===2){let n=k(Y(t));for(let r=0;r<t[0];r++)for(let s=0;s<t[1];s++)n[s][r]=e[r][s];return n}}function lt(e,t,n){if(y(n))return new e(t.values.concat(n.values));if(h(n)){let r=b(n);a(r.length===1&&!Ne(r),"Only vectors can be appended to Series!");let s=t.copy();return n.forEach((o,i)=>{s._values.push(o),s._index.push("item"+(t.values.length+i))}),s}return lt(t,[n])}function pn(e,t){a(D(t),"The parameter to the `apply` method must be a function.");let n=e.copy();return n._values=n._values.map((r,s)=>t(r,s)),n}function yn(e){let t=e.copy(),n=[];return t._values=t.values.filter((r,s)=>p(r)?!1:(n.push(t.index[s]),!0)),t._index=n,t}function bn(e,t){let n=[],r=[];t.values.forEach((o,i)=>{d(o)&&(r.push(o),n.push(t.index[i]))});let s=new e(r);return s.name=t.name,s.index=n,s}function vn(e,t,n){let r=t.copy(),s=E(r.index),o=[],i=r.values.filter((u,l)=>{let c=n(u,l,r.values);return c||o.push(r.index[l]),c});return o.forEach(u=>{s.splice(s.indexOf(u),1)}),i.length===0?(r=new e,r.name=t.name,r):(r.values=i,r.index=s,r)}function Nn(e,t){(w(t)||d(t))&&(t=[t]);for(let r in t)typeof t[r]=="bigint"&&(t[r]=Number(t[r]));let n=C((t||[]).map(r=>typeof r));return a(n.length<=2,"Only whole numbers and/or strings are allowed in `get` arrays!"),n.length===1&&a(n[0]==="string"||n[0]==="number","Only whole numbers and/or strings are allowed in `get` arrays!"),n.length===2&&(a(n.indexOf("string")>-1,"Only whole numbers and/or strings are allowed in `get` arrays!"),a(n.indexOf("number")>-1,"Only whole numbers and/or strings are allowed in `get` arrays!")),p(t)||(t=t.map(r=>{if(typeof r=="string")return a(e.index.indexOf(r)>-1,`Index "${r}" does not exist!`),r;if(typeof r=="number")return a(r>=0,`Index ${r} is out of bounds!`),a(Math.floor(r)===r,"Indices must be integers!"),a(r<e.index.length,`Index ${r} is out of bounds!`),e.index[r]})),e.getSubsetByNames(t)}function wn(e,t){let n=e.shape;p(t)&&(t=T(0,n[0])),a(h(t),"The `indices` array must be 1-dimensional array of whole numbers."),a(b(t).length===1,"The `indices` array must be a 1-dimensional array of whole numbers."),a(t.length>0,"The `indices` array must contain at least one index."),t.forEach(s=>{a(x(s),"The `indices` array must be a 1-dimensional array of whole numbers."),a(s<e.index.length,`The row index ${s} is out of bounds.`)});let r=t.map(s=>e.index[s]);return e.getSubsetByNames(r)}function On(e,t,n){p(n)&&(n=t.index),a(h(n),"The `indices` array must be a 1-dimensional array of strings."),a(b(n).length===1,"The `indices` array must be a 1-dimensional array of strings."),a(n.length>0,"The `indices` array must contain at least one index name."),n.forEach(o=>{a(w(o),"The `indices` array must contain only strings."),a(t.index.indexOf(o)>-1,`The name "${o}" does not exist in the index.`)});let r=n.map(o=>t.values[t.index.indexOf(o)]);if(r.length===1)return r[0];let s=new e(r);return s.index=n,s.name=t.name,s}function _n(e){let t=e.copy(),n=typeof window>"u"?20:10;if(t.index.length>n){t=t.get(T(0,n/2).concat(T(t.index.length-n/2,t.index.length)));let s=E(t.index);s.splice(Math.floor(s.length/2),0,"..."),t.values.push("..."),t.index.push("..."),t=t.get(s)}let r={};return t.values.forEach((s,o)=>{let i={};i[t.name]=s,r[t.index[o]]=i}),console.table(r),console.log("Shape:",e.shape,`
17
- `),e}function Sn(e){let t=e.copy();return t.get(pe(t.index))}function Tn(e,t,n){n=n||((l,c)=>l<c?-1:1),a(p(n)||D(n),"You must pass undefined, null, or a comparison function as the second argument to the `sort` method!");let r=V([t.values,t.index]),s=G(r,(l,c)=>n(l[0],c[0])),o=[],i=[];s.forEach(l=>{o.push(l[0]),i.push(l[1])});let u=new e;return u._values=o,u._index=i,u.name=t.name,u}function In(e,t){let n=V([t.values,t.index]);n=V(G(n,(s,o)=>{if(s[1]===o[1])return 0;if(s[1]<o[1])return-1;if(s[1]>o[1])return 1}));let r=new e(n[0]);return r.index=n[1],r.name=t.name,r}function Dn(e){let t={};return t[e.name]={},e.index.forEach((n,r)=>{t[e.name][n]=e.values[r]}),t}var Ze=Symbol.for("@jrc03c/js-math-tools/series");function Mn(e){class t{static[Symbol.hasInstance](r){try{return!!r._symbol&&r._symbol===Ze}catch{return!1}}constructor(r){if(this.name="data",Object.defineProperty(this,"_symbol",{configurable:!1,enumerable:!1,writable:!1,value:Ze}),Object.defineProperty(this,"_values",{value:[],configurable:!0,enumerable:!1,writable:!0}),Object.defineProperty(this,"values",{configurable:!0,enumerable:!0,get(){return this._values},set(s){a(h(s),"The new values must be a 1-dimensional array!");let o=b(s);a(o.length===1,"The new array of values must be 1-dimensional!"),o[0]<this._index.length?this._index=this._index.slice(0,o[0]):o[0]>this._index.length&&(this._index=this._index.concat(T(this._index.length,o[0]).map(i=>"item"+X(i,(s.length-1).toString().length)))),this._values=s}}),Object.defineProperty(this,"_index",{value:[],configurable:!0,enumerable:!1,writable:!0}),Object.defineProperty(this,"index",{configurable:!0,enumerable:!0,get(){return this._index},set(s){a(h(s),"The new index must be a 1-dimensional array of strings!"),a(s.length===this.shape[0],"The new index must be the same length as the old index!"),a(b(s).length===1,"The new index must be a 1-dimensional array of strings!"),s.forEach(o=>{a(w(o),"All of the row names must be strings!")}),this._index=s}}),r){if(r instanceof t)this.name=r.name,this.values=E(r.values),this.index=E(r.index);else if(h(r)){let s=b(r);a(s.length===1,"When passing an array into the constructor of a Series, the array must be 1-dimensional!"),this.values=r}else if(r instanceof Object){let s=Object.keys(r).concat(Object.getOwnPropertySymbols(r)).map(u=>u.toString());a(s.length===1,"When passing an object into the constructor of a Series, the object must have only 1 key-value pair, where the key is the name of the data and the value is the 1-dimensional array of values!");let o=s[0],i=r[o];a(b(i).length===1,"When passing an object into the constructor of a Series, the object must have only 1 key-value pair, where the key is the name of the data and the value is the 1-dimensional array of values!"),this.name=o,this.values=i.slice()}}}get shape(){return b(this.values)}get length(){return this.shape[0]}get isEmpty(){return this.values.filter(r=>!p(r)).length===0}clear(){let r=this.copy();return r.values.forEach((s,o)=>{r.values[o]=void 0}),r}get(r){return Nn(this,r)}getSubsetByNames(r){return On(t,this,r)}getSubsetByIndices(r){return wn(this,r)}loc(r){return this.getSubsetByNames(r)}iloc(r){return this.getSubsetByIndices(r)}reverse(){let r=new t(Y(this.values));return r.index=Y(this.index),r.name=this.name,r}resetIndex(){let r=this.copy();return r.index=T(0,this.shape[0]).map(s=>"item"+X(s,(r.index.length-1).toString().length)),r}copy(){let r=new t;return r._values=E(this.values),r._index=E(this.index),r.name=this.name,r}append(r){return lt(t,this,r)}apply(r){return pn(this,r)}concat(r){return this.append(r)}dropMissing(r,s){return yn(this,r,s)}dropNaN(){return bn(t,this)}toObject(){return Dn(this)}print(){return _n(this)}shuffle(){return Sn(this)}sort(r){return Tn(t,this,r)}sortByIndex(){return In(t,this)}filter(r){return vn(t,this,r)}toDataFrame(){let r=new e(V([this.values]));return r.columns=[this.name],r.index=this.index,r}transpose(){let r=this.copy();return r.values=Y(r.values),r.index=Y(r.index),r}getDummies(){return this.toDataFrame().getDummies()}oneHotEncode(){return this.getDummies()}}return t}var xe=Symbol.for("@jrc03c/js-math-tools/dataframe");function le(e){let t="abcdefghijklmnopqrstuvwxyz1234567890",n="";for(let r=0;r<e;r++)n+=t[Math.floor(q()*t.length)];return n}var S=class{static[Symbol.hasInstance](e){try{return!!e._symbol&&e._symbol===xe}catch{return!1}}constructor(e){if(Object.defineProperty(this,"_symbol",{configurable:!1,enumerable:!1,writable:!1,value:xe}),Object.defineProperty(this,"_values",{value:[],configurable:!0,enumerable:!1,writable:!0}),Object.defineProperty(this,"values",{configurable:!0,enumerable:!0,get(){return this._values.length===0||!p(this._values[0])&&this._values[0].length===0?[[]]:this._values},set(t){a(h(t),"The new values must be a 2-dimensional array!");let n=b(t);a(n.length===2,"The new array of values must be 2-dimensional!"),n[0]<this._index.length?this._index=this._index.slice(0,n[0]):n[0]>this._index.length&&(this._index=this._index.concat(T(this._index.length,n[0]).map(r=>"row"+X(r,(n[0]-1).toString().length)))),n[1]<this._columns.length?this._columns=this._columns.slice(0,n[1]):n[1]>this._columns.length&&(this._columns=this._columns.concat(T(this._columns.length,n[1]).map(r=>"col"+X(r,(n[1]-1).toString().length)))),this._values=t}}),Object.defineProperty(this,"_columns",{value:[],configurable:!0,enumerable:!1,writable:!0}),Object.defineProperty(this,"columns",{configurable:!0,enumerable:!0,get(){return this._columns},set(t){a(h(t),"The new columns list must be a 1-dimensional array of strings!"),a(this.isEmpty||t.length===this.shape[1],"The new columns list must be the same length as the old columns list!"),a(b(t).length===1,"The new columns list must be a 1-dimensional array of strings!"),t=t.map(r=>(typeof r!="string"&&(r=JSON.stringify(r)||r.toString()),r.trim().length===0?"untitled_"+le(8):r.trim()));let n=(()=>{let r=ge(t),s={};return r.values.forEach(o=>{s[o]=r.get(o)}),s})();t=t.map(r=>n[r]>1?r+"_"+le(8):r),this._columns=t}}),Object.defineProperty(this,"_index",{value:[],configurable:!0,enumerable:!1,writable:!0}),Object.defineProperty(this,"index",{configurable:!0,enumerable:!0,get(){return this._index},set(t){a(h(t),"The new index must be a 1-dimensional array of strings!"),a(this.isEmpty||t.length===this.shape[0],"The new index must be the same length as the old index!"),a(b(t).length===1,"The new index must be a 1-dimensional array of strings!"),t=t.map(r=>(typeof r!="string"&&(r=JSON.stringify(r)||r.toString()),r.trim().length===0?"untitled_"+le(8):r.trim()));let n=(()=>{let r=ge(t),s={};return r.values.forEach(o=>{s[o]=r.get(o)}),s})();t=t.map(r=>n[r]>1?r+"_"+le(8):r),this._index=t}}),a(p(e)||K(e)||h(e),"The `data` passed into the constructor of a DataFrame must be either (1) an object where the key-value pairs are (respectively) column names and 1-dimensional arrays of values, or (2) a 2-dimensional array of values."),e)if(e instanceof S)this.values=E(e.values),this.columns=E(e.columns),this.index=E(e.index);else if(h(e)){let t=b(e);a(t.length===2,"The `data` array passed into the constructor of a DataFrame must be 2-dimensional!"),a(!ie(e),"The 2-dimensional array passed into the constructor of a DataFrame must not contain sub-arrays (i.e., rows) of different lengths!"),this.values=e}else{this._columns=Object.keys(e).concat(Object.getOwnPropertySymbols(e)).map(o=>o.toString());let t=[],n=null,r=null;this._columns.forEach(o=>{p(r)&&(n=o,r=e[o].length),a(e[o].length===r,`The object passed into the DataFrame constructor contains arrays of different lengths! The key "${n}" points to an array containing ${r} items, and the key "${o}" points to an array containing ${e[o].length} items.`),r=e[o].length;let i=e[o];t.push(i)}),this._values=V(t);let s=b(this.values);this._index=T(0,s[0]).map(o=>"row"+X(o,(s[0]-1).toString().length))}}get shape(){return b(this.values)}get length(){return this.shape[0]}get width(){return this.shape[1]}get rows(){return this.index}set rows(e){this.index=e}get isEmpty(){return this.values.length===0||this.values.every(e=>e.length===0)}clear(){let e=new S(k(this.shape));return e.columns=this.columns.slice(),e.index=this.index.slice(),e}get(e,t){if(arguments.length===0)return this;if(arguments.length===1)try{return this.get(null,e)}catch{return this.get(e,null)}return xt(this,e,t)}getSubsetByNames(e,t){return rn(S,B,this,e,t)}getSubsetByIndices(e,t){return nn(this,e,t)}getDummies(e){return He(S,this,e)}oneHotEncode(e){return He(S,this,e)}transpose(){let e=new S(V(this.values));return e.columns=this.index.slice(),e.index=this.columns.slice(),e}get T(){return this.transpose()}resetIndex(e){return on(this,e)}copy(){return Wt(S,this)}assign(e,t){return Gt(S,B,this,e,t)}apply(e,t){return zt(S,B,this,e,t)}dropMissing(e,t,n){return Xt(S,B,this,e,t,n)}dropNaN(e,t,n){return Qt(S,this,e,t,n)}drop(e,t){return Ht(S,B,this,e,t)}dropColumns(e){return this.drop(null,e)}dropRows(e){return this.drop(e,null)}toDetailedObject(e){return mn(this,e)}toObject(){return gn(this)}toJSONString(e){return at(this,e)}saveAsJSON(e,t){return dn(this,e,t)}print(){return sn(S,B,this)}sort(e,t){return cn(this,e,t)}sortByIndex(){return this.sort()}filter(e,t){return Zt(S,B,this,e,t)}shuffle(e){return ln(this,e)}append(e,t){return ot(this,e,t)}concat(e,t){return this.append(e,t)}join(e,t){return this.append(e,t)}toString(){return JSON.stringify(this)}},B=Mn(S);function Oe(e,t){return P(e,{shouldDropNaNs:t}).max}function O(e){return a(D(e),"You must pass a function into the `vectorize` function!"),function t(){let n,r,s=[],o=[],i=Object.keys(arguments).filter(u=>{let l=arguments[u];return h(l)?!0:y(l)?(n=!0,s.push(l),!0):v(l)?(r=!0,o.push(l),!0):!1}).map(u=>arguments[u]);if(i.slice(0,-1).forEach((u,l)=>{a(J(h(u)?b(u):u.shape,h(i[l+1])?b(i[l+1]):i[l+1].shape),`When passing multiple arrays into the \`${e.name}\` function, all of the arrays must have the same shape!`)}),i.length>0){let u=Oe(i.map(c=>c.length?c.length:c.values.length)),l=T(0,u).map(c=>{let f=Object.keys(arguments).map(m=>h(arguments[m])?arguments[m][c]:y(arguments[m])||v(arguments[m])?arguments[m].values[c]:arguments[m]);return t(...f)});if(r)try{if(o.length===1&&J(b(o[0]),b(l))){let c=new S(l);return c.index=o[0].index.slice(),c.columns=o[0].columns.slice(),c}else return new S(l)}catch{return l}if(n)try{if(s.length===1&&s[0].length===l.length){let c=new B(l);return c.name=s[0].name,c.index=s[0].index.slice(),c}else return new B(l)}catch{return l}return l}else return e(...arguments)}}function En(e){try{return d(e)?typeof e=="bigint"?e<0?-e:e:Math.abs(e):NaN}catch{return NaN}}var Ye=O(En);function jn(){try{let e=0,t=!1,n=Object.values(arguments);for(let r of n){if(!d(r))return NaN;typeof r=="bigint"&&(t=!0,r=Number(r)),e+=r}if(t)try{return BigInt(e)}catch{}return e}catch{return NaN}}var ye=O(jn);function Bn(e,t){try{return t(e)}catch{return NaN}}var _e=O(Bn);function Fn(e){try{return d(e)?(typeof e=="bigint"&&(e=Number(e)),Math.acos(e)):NaN}catch{return NaN}}var An=O(Fn);function Pn(e){try{return d(e)?(typeof e=="bigint"&&(e=Number(e)),Math.asin(e)):NaN}catch{return NaN}}var Cn=O(Pn);function kn(e){try{return d(e)?(typeof e=="bigint"&&(e=Number(e)),Math.atan(e)):NaN}catch{return NaN}}var Rn=O(kn);function De(e,t){if(v(e)){let n=De(e.values,t);return[e.index[n[0]],e.columns[n[1]]]}if(y(e)){let n=De(e.values,t);return e.index[n]}a(h(e),"The `argmax` function only works on arrays, Series, and DataFrames!");try{let n=Q(e,Oe(e,t));return n?n.length===0?void 0:n.length===1?n[0]:n:void 0}catch{return}}function ct(e,t){return P(e,{shouldDropNaNs:t}).min}function Me(e,t){if(v(e)){let n=Me(e.values,t);return[e.index[n[0]],e.columns[n[1]]]}if(y(e)){let n=Me(e.values,t);return e.index[n]}a(h(e),"The `argmin` function only works on arrays, Series, and DataFrames!");try{let n=Q(e,ct(e,t));return n?n.length===0?void 0:n.length===1?n[0]:n:void 0}catch{return}}function A(e,t){if(v(e)||y(e))return e.apply(n=>A(n,t));if(h(e))return e.map(n=>A(n,t));if(t==="null")return null;if(t==="number"){if(p(e))return NaN;let n=A(e,"boolean");if(z(n))return n?1:0;try{JSON.parse(e)}catch{let o=A(e,"date");if(L(o))return o.getTime()}let r=parseFloat(e);return isNaN(r)?NaN:r}if(t==="int"){let n=A(e,"number");return n>=0?Math.floor(n):Math.ceil(n)}if(t==="float")return A(e,"number");if(t==="bigint")return typeof e=="bigint"?e:BigInt(A(e,"int"));if(t==="boolean"){if(z(e))return e;if(d(e))return e===0?!1:e===1?!0:null;try{let n=(typeof e=="object"?e.toString()==="null"?"false":JSON.stringify(e):e.toString()).trim().toLowerCase();return n==="true"||n==="yes"||n==="y"?!0:n==="false"||n==="no"||n==="n"?!1:null}catch{return null}}if(t==="date"){if(L(e))return e;if(p(e))return null;let n=parseFloat(e);if(!isNaN(n)){let s=new Date(e);return L(s)?s:null}let r=Date.parse(e);return isNaN(r)?null:new Date(r)}if(t==="object"){if(K(e))return e;let n=A(e,"boolean");if(z(n))return null;try{let s=A(e,"number");if(d(s))return JSON.parse(e),null}catch{}let r=A(e,"date");if(r)return r;try{let s=JSON.parse(e);return h(s)?s.map(o=>A(o,t)):s}catch{return null}}if(t==="string")return p(e)?J(e,void 0)?"undefined":"null":e instanceof Date?e.toJSON():(()=>typeof e=="object"?e===null?"null":JSON.stringify(e):e.toString())()}function Yn(e){try{return d(e)?typeof e=="bigint"?e:Math.ceil(e):NaN}catch{return NaN}}var Kn=O(Yn);function Jn(e,t){try{if(!d(e))return NaN;if(typeof e=="bigint")return e;if(p(t))t=1e-10;else if(!d(t))return NaN;return Ye(e)<t?0:e}catch{return NaN}}var $n=O(Jn);function Ee(e){if(v(e)||y(e)){let t=e.copy();return t.values=Ee(t.values),t}if(h(e))return e.map(t=>Ee(t));try{let t=JSON.parse(e);return d(t)?typeof t=="bigint"?Number(t):t>=0?Math.floor(t):Math.ceil(t):NaN}catch{return NaN}}var F=O(Ee);function ft(e,t,n){try{return d(e)?d(t)?d(n)?typeof e=="bigint"?BigInt(ft(F(e),t,n)):e<t?t:e>n?n:e:NaN:NaN:NaN}catch{return NaN}}var Ln=O(ft);function be(e,t){function*n(r,s){if(s>r.length)yield r;else if(s<=0)yield[];else if(r.length<2)yield r;else for(let o=0;o<r.length;o++){let i=r[o],u=r.slice(o+1);if(!(u.length<s-1)&&s-1>=0)for(let l of be(u,s-1))yield[i].concat(l)}}return v(e)||y(e)?be(e.values,t):(a(h(e),"The `combinations` function only works on arrays, Series, and DataFrames!"),a(d(t)&&F(t)===t&&t>=0,"`r` must be a non-negative integer!"),n(R(e),t))}function ht(e,t){let n=[];for(let r of be(e,t))n.push(r.slice());return n}function mt(){let e=Object.values(arguments).map(n=>v(n)||y(n)?C(n.values):(a(h(n),"The `intersect` function only works on arrays, Series, and DataFrames!"),C(n)));return C(e).filter(n=>e.every(r=>r.findIndex(s=>J(s,n))>-1))}var te=class{constructor(e){a(p(e)||e===te.DROP_NAN_MODE||e===te.DROP_MISSING_MODE,"The `mode` value passed into the `IndexMatcher` constructor must be undefined or one of [IndexMatcher.DROP_NAN_MODE, IndexMatcher.DROP_MISSING_MODE]! (By default, the mode is `Indexer.DROP_MISSING_MODE`.)"),this.mode=p(e)?te.DROP_NAN_MODE:e,this.index=null}fit(){let e=[];return Object.values(arguments).forEach(t=>{if(h(t)){let n=b(t);if(n.length===1)t=new B(t);else if(n.length===2)t=new S(t);else throw new Error("The `IndexMatcher.fit` method only works on arrays, Series, and DataFrames!")}a(v(t)||y(t),"The `IndexMatcher.fit` method only works on arrays, Series, and DataFrames!"),this.mode===te.DROP_MISSING_MODE?e.push(t.dropMissing().index):e.push(t.dropNaN().index)}),this.index=mt(...e),this}transform(){a(!!this.index,"The IndexMatcher hasn't been fitted yet! Please call the `fit` method before calling the `transform` method.");let e=Object.values(arguments).map(t=>{if(h(t)){let n=b(t);if(n.length===1)return new B(t).get(this.index).values;if(n.length===2)return new S(t).get(this.index,null).values;throw new Error("The `IndexMatcher.fit` method only works on arrays, Series, and DataFrames!")}return a(v(t)||y(t),"The `IndexMatcher.fit` method only works on arrays, Series, and DataFrames!"),t.get(this.index,null)});return e.length===1?e[0]:e}fitAndTransform(){return this.fit(...arguments).transform(...arguments)}},Se=te;nt(Se,"DROP_NAN_MODE","DROP_NAN_MODE");nt(Se,"DROP_MISSING_MODE","DROP_MISSING_MODE");function re(e,t,n,r){if(y(e))return re(e.values,t,n,r);if(y(t))return re(e,t.values,n,r);if(a(h(e)&&h(t)&&b(e).length===1&&b(t).length===1,"The `covariance` function only works on 1-dimensional arrays and Series!"),a(e.length===t.length,"The two arrays or Series passed into the `covariance` function must have the same length!"),n)return re(...new Se().fitAndTransform(e,t),!1,r);try{let s=P(e,{stdev:r}),o=P(t,{stdev:r}),i=Number(s.mean),u=Number(o.mean);if(!d(i)||!d(u))return NaN;let l=Math.max(e.length,t.length),c=0;for(let f=0;f<l;f++){let m=e[f],g=t[f];if(!d(m))return NaN;if(!d(g))return NaN;typeof m=="bigint"&&(m=Number(m)),typeof g=="bigint"&&(g=Number(g)),c+=(m-i)*(g-u)}return r?[c/e.length,s,o]:c/e.length}catch{return NaN}}function je(e,t,n){if(y(e))return je(e.values,t,n);if(y(t))return je(e,t.values,n);a(h(e)&&h(t)&&b(e).length===1&&b(t).length===1,"The `correl` function only works on 1-dimensional arrays and Series!"),a(e.length===t.length,"The two arrays or Series passed into the `correl` function must have the same length!");try{let[s,o,i]=re(e,t,n,!0),u=o.stdev*i.stdev;return s/u}catch{return NaN}}function Vn(e){try{return d(e)?(typeof e=="bigint"&&(e=Number(e)),Math.cos(e)):NaN}catch{return NaN}}var Un=O(Vn),qn=Object.freeze({boolean:"boolean",date:"date",null:"null",number:"number",object:"object",string:"string"});function Be(e,t){if(v(e)||y(e))return Be(e.values,t);if(v(t)||y(t))return Be(e,t.values);a(h(e)&&h(t),"The `diff` function only works on arrays, Series, and DataFrames!");let n=C(e),r=C(t),s=[];return n.forEach(o=>{r.findIndex(i=>J(i,o))<0&&s.push(o)}),s}function dt(e,t){try{if(!d(e))return NaN;if(!d(t))return NaN;if(typeof e=="bigint"||typeof t=="bigint"){let n=dt(Number(e),Number(t));try{return BigInt(n)}catch{return n}}return Math.pow(e,t)}catch{return NaN}}var Ke=O(dt);function gt(e){try{if(!d(e))return NaN;if(typeof e=="bigint"){let t=gt(Number(e));try{return BigInt(t)}catch{return t}}return Math.sqrt(e)}catch{return NaN}}var pt=O(gt);function zn(){try{let e=Object.values(arguments);if(e.length===0)return NaN;let t=!1,n=1;for(let r of e){if(!d(r))return NaN;typeof r=="bigint"&&(t=!0,r=Number(r)),n*=r}if(t)try{return BigInt(n)}catch{}return n}catch{return NaN}}var yt=O(zn);function ee(){return yt(...arguments)}function bt(e,t){return ye(e,ee(t,-1))}function Je(e,t){return P(e,{shouldDropNaNs:t}).sum}function Fe(e,t){if(d(e)&&d(t))return Ye(e-t);if(v(e)||y(e))return Fe(e.values,t);if(v(t)||y(t))return Fe(e,t.values);h(e)&&h(t)&&a(J(b(e),b(t)),"If passing two arrays, Series, or DataFrames into the `distance` function, then those objects must have the same shape!");try{return pt(Je(Ke(bt(e,t),2)))}catch{return NaN}}function Gn(e,t){return ee(e,Ke(t,-1))}function $(e,t){if(v(e)){let s=$(e.values,t);if(b(s).length===1){let o=new B(s);return o.name=y(t)?t.name:o.name,o.index=e.index.slice(),o}else{let o=new S(s);return o.index=e.index.slice(),v(t)&&(o.columns=t.columns.slice()),o}}if(v(t)){let s=$(e,t.values);if(b(s).length===1){let o=new B(s);return o.name=y(e)?e.name:o.name,o.index=t.columns.slice(),o}else{let o=new S(s);return o.columns=t.columns.slice(),o}}if(y(e))return $(e.values,t);if(y(t))return $(e,t.values);a(h(e)&&h(t),"The `dot` function only works on arrays, Series, and DataFrames!");let n=b(e),r=b(t);if(a(n.length<=2&&r.length<=2,"I'm not smart enough to know how to get the dot-product of arrays that have more than 2 dimensions. Sorry for the inconvenience! Please only pass 1- or 2-dimensional arrays into the `dot` function!"),a(n[n.length-1]===r[0],`There's a dimension misalignment in the two arrays you passed into the \`dot\` function. (${n[n.length-1]} !== ${r[0]})`),n.length===1&&r.length===1)return Je(ee(e,t));if(n.length===1&&r.length===2)return V(t).map(s=>$(e,s));if(n.length===2&&r.length===1)return e.map(s=>$(s,t));if(n.length===2&&r.length===2){let s=V(t),o=[];for(let i=0;i<e.length;i++){let u=[];for(let l=0;l<s.length;l++)u.push($(e[i],s[l]));o.push(u)}return o}}function $e(e){if(v(e)||y(e))return e.dropMissing(...Object.values(arguments).slice(1));a(h(e),"The `dropMissing` function only works on arrays, Series, and DataFrames!");let t=[];return e.forEach(n=>{try{return t.push($e(n))}catch{p(n)||t.push(n)}}),t}function fe(e,t){if(v(e)||y(e))return fe(e.values,t);if(v(t)||y(t))return fe(e,t.values);a(h(e)&&h(t),"The `dropMissingPairwise` function only works on arrays, Series, and DataFrames!"),a(J(b(e),b(t)),"The two arrays, Series, and/or DataFrames passed into the `dropMissingPairwise` function must have the same shape!");let n=[],r=[];for(let s=0;s<e.length;s++)try{let[o,i]=fe(e[s],t[s]);n.push(o),r.push(i)}catch{!p(e[s])&&!p(t[s])&&(n.push(e[s]),r.push(t[s]))}return[n,r]}function he(e,t){if(v(e)||y(e))return he(e.values,t);if(v(t)||y(t))return he(e,t.values);a(h(e)&&h(t),"The `dropNaNPairwise` only works on arrays, Series, and DataFrames!"),a(J(b(e),b(t)),"The two arrays, Series, and/or DataFrames passed into the `dropNaNPairwise` must have the same shape!");let n=[],r=[];for(let s=0;s<e.length;s++)try{let[o,i]=he(e[s],t[s]);n.push(o),r.push(i)}catch{d(e[s])&&d(t[s])&&(n.push(e[s]),r.push(t[s]))}return[n,r]}function Wn(e){return $e(e)}function ve(e,t){if(v(e)||y(e))return ve(e.values,t);a(h(e),"The first argument passed into the `every` function must be an array, Series, or DataFrame!"),a(D(t),"The second argument passed into the `every` function must be a function!");for(let n of e)if(h(n)){if(!ve(n,t))return!1}else if(!t(n))return!1;return!0}function Hn(e){try{if(!d(e))return NaN;if(typeof e=="bigint"){if(e===0n)return 1n;e=Number(e)}return Math.exp(e)}catch{return NaN}}var Xn=O(Hn);function Ae(e){try{return typeof e=="bigint"?BigInt(Ae(F(e))):e!==F(e)?NaN:e<=1?1:e*Ae(e-1)}catch{return NaN}}var Qn=O(Ae);function Pe(e,t){if(v(e)||y(e))return Pe(e.values,t);if(a(K(e)||h(e),"You must pass (1) an object, array, Series, or DataFrame and (2) a function or value into the `find` function!"),!D(t)){let s=t;t=o=>o===s}function n(s,o,i){if(i=i||[],i.indexOf(s)>-1)return null;if(K(s)){i.push(s);let u=Object.keys(s).concat(Object.getOwnPropertySymbols(s));for(let l=0;l<u.length;l++){let c=u[l],f=s[c];if(o(f))return f;let m=n(f,o,i);if(m)return m}}else if(h(s)){i.push(s);for(let u=0;u<s.length;u++){let l=s[u];if(o(l))return l;let c=n(l,o,i);if(c)return c}}else if(o(s))return s;return null}function r(s){try{return t(s)}catch{return!1}}return n(e,r)}function Ce(e,t){if(v(e)||y(e))return Ce(e.values,t);if(a(K(e)||h(e),"You must pass (1) an object, array, Series, or DataFrame and (2) a function or value into the `findAll` function!"),!D(t)){let o=t;t=i=>i===o}function n(o,i,u){if(u=u||[],u.indexOf(o)>-1)return null;if(K(o)){u.push(o);let l=Object.keys(o).concat(Object.getOwnPropertySymbols(o)),c=[];for(let f=0;f<l.length;f++){let m=l[f],g=o[m],N=!1;i(g)&&(c.push(g),N=!0);let I=n(g,i,u);I&&I.length>0&&I.slice(N?1:0).forEach(M=>c.push(M))}return c}else if(h(o)){u.push(o);let l=[];for(let c=0;c<o.length;c++){let f=o[c],m=!1;i(f)&&(l.push(f),m=!0);let g=n(f,i,u);g&&g.length>0&&g.slice(m?1:0).forEach(N=>l.push(N))}return l}else if(i(o))return[o];return null}function r(o){try{return t(o)}catch{return!1}}let s=n(e,r);return s&&s.length>0?s:null}function Zn(e){try{if(e==="Infinity")return 1/0;if(e==="-Infinity")return-1/0;let t=JSON.parse(e);return d(t)?t:NaN}catch{return NaN}}var xn=O(Zn);function er(e){try{return d(e)?typeof e=="bigint"?e:Math.floor(e):NaN}catch{return NaN}}var tr=O(er);function Le(e){d(e)&&(e=[e]);let t=[],n=ae(e);for(let r=0;r<n;r++)t.push(0);return se(t,e)}function nr(e){typeof e=="bigint"&&(e=F(e)),a(!p(e),"You must pass an integer greater than 0 (representing the size) into the `identity` function!"),a(d(e),"You must pass an integer greater than 0 (representing the size) into the `identity` function!"),a(F(e)===e,"You must pass an integer greater than 0 (representing the size) into the `identity` function!"),a(e>0,"You must pass an integer greater than 0 (representing the size) into the `identity` function!");let t=Le([e,e]);for(let n=0;n<e;n++)t[n][n]=1;return t}var rr=["true","false","yes","no"],sr=["null","none","nan","na","n/a","","undefined"];function ce(e){return e.type==="number"&&(typeof e.value<"u"?e.isInteger=F(e.value)===e.value:e.isInteger=ve(e.values,t=>d(t)?F(t)===t:!0)),e}function me(e){if(v(e)){let o=e.copy(),i=me(e.values);return o.values=i.values,ce({type:i.type,values:o})}if(y(e)){let o=e.copy(),i=me(e.values);return o.values=i.values,ce({type:i.type,values:o})}if(!h(e)){let o=me([e]);return o.value=o.values[0],delete o.values,ce(o)}a(h(e),"The `inferType` function only works on arrays, Series, and DataFrames!");let t=R(e).map(o=>{if(o===void 0)return"null";try{if(typeof o=="object"){let l=new Date(o.getTime());if(L(l))return"date"}}catch{}w(o)||(typeof o=="bigint"?o=o.toString()+"n":o=JSON.stringify(o));let u=o.toLowerCase().trim();if(sr.indexOf(u)>-1)return"null";if(rr.indexOf(u)>-1)return"boolean";try{if(o.match(/^-?\d+n$/g))return"bigint";let l=JSON.parse(o);return d(l)?"number":typeof l=="object"?h(l)?"string":"object":"string"}catch{let c=new Date(o);return L(c)?"date":"string"}}),n=ge(t),s=n.values.toSorted((o,i)=>n.get(i)-n.get(o))[0];return ce({type:s,values:_e(e,o=>A(o,s))})}function de(e){if(v(e)){let n=e.copy();return n.values=de(n.values),n}a(h(e),"The `inverse` function only works on square 2-dimensional arrays or DataFrames!");let t=b(e);if(a(t.length===2,"The array passed into the `inverse` function must be exactly two-dimensional and square!"),a(t[0]===t[1],"The array passed into the `inverse` function must be exactly two-dimensional and square!"),a(t[0]>=0,"The array passed into the `inverse` function must be exactly two-dimensional and square!"),t[0]===0)return e;if(t[0]===1){a(e[0][0]!==0,"This matrix cannot be inverted!");let n=e[0][0];return typeof n=="bigint"&&(n=Number(n)),1/n}else if(t[0]===2){let n=e[0][0],r=e[0][1],s=e[1][0],o=e[1][1];typeof n=="bigint"&&(n=Number(n)),typeof r=="bigint"&&(r=Number(r)),typeof s=="bigint"&&(s=Number(s)),typeof o=="bigint"&&(o=Number(o));let i=n*o-r*s;a(i!==0,"This matrix cannot be inverted!");let u=[[o,-r],[-s,n]];return ee(u,1/i)}else if(t[0]>1){let n=(r,s)=>d(r)||d(s)?ee(r,s):$(r,s);for(let r=1;r<t[0]-1;r++)try{let s=e.slice(0,r).map(M=>M.slice(0,r)),o=e.slice(0,r).map(M=>M.slice(r,t[0])),i=e.slice(r,t[0]).map(M=>M.slice(0,r)),u=e.slice(r,t[0]).map(M=>M.slice(r,t[0])),l=de(s),c=de(ye(u,n(-1,n(n(i,l),o)))),f=ye(l,n(n(n(n(l,o),c),i),l)),m=n(-1,n(n(l,o),c)),g=n(-1,n(n(c,i),l)),N=c;return f.map((M,Te)=>M.concat(m[Te])).concat(g.map((M,Te)=>M.concat(N[Te])))}catch{}a(!1,"This matrix cannot be inverted!")}}var or=new Function(`
1
+ (()=>{function f(e){return typeof e=="number"&&!isNaN(e)||typeof e=="bigint"}var gt=new Function(`
18
2
  try {
19
3
  return this === window
20
4
  } catch(e) {}
@@ -24,4 +8,10 @@
24
8
  } catch(e){}
25
9
 
26
10
  return false
27
- `);function vt(e,t,n){try{if(!d(e))return NaN;if(!d(t))return NaN;if(!d(n))return NaN;if(typeof e=="bigint"||typeof t=="bigint"){let r=vt(Number(e),Number(t),n);try{return BigInt(r)}catch{return r}}return n*(t-e)+e}catch{return NaN}}var ir=O(vt);function Nt(e,t){try{if(t=p(t)?Math.E:t,!d(e))return NaN;if(!d(t))return NaN;if(typeof e=="bigint"||typeof t=="bigint"){let n=Nt(Number(e),Number(t));try{return BigInt(n)}catch{return n}}return Math.log(e)/Math.log(t)}catch{return NaN}}var ur=O(Nt);function ar(e,t){return P(e,{shouldDropNaNs:t}).mean}function lr(e,t){return P(e,{shouldDropNaNs:t,median:!0}).median}function wt(e,t){try{if(!d(e))return NaN;if(!d(t))return NaN;if(typeof e=="bigint"||typeof t=="bigint"){let n=wt(Number(e),Number(t));try{return BigInt(n)}catch{return n}}return e%t}catch{return NaN}}var cr=O(wt);function fr(e,t){return P(e,{shouldDropNaNs:t,mode:!0}).mode}function et(){let e=q(),t=q();return Math.sqrt(-2*Math.log(e))*Math.cos(2*Math.PI*t)}function hr(e){return p(e)?et():_e(k(e),et)}function mr(e){return _e(k(e),()=>1)}function Ve(e,t){function*n(r,s){if(s=s||r.length,r.length===1){yield[r];return}for(let o of ht(r,s)){if(!o.slice)continue;let i=Le(o.length);yield o;let u=1;for(;u<o.length;)if(i[u]<u){if(u%2===0){let l=o[0];o[0]=o[u],o[u]=l}else{let l=o[i[u]];o[i[u]]=o[u],o[u]=l}yield o,i[u]+=1,u=1}else i[u]=0,u+=1}}return v(e)||y(e)?Ve(e.values,t):(a(h(e),"The `permutations` function only works on arrays, Series, and DataFrames!"),p(t)&&(t=e.length),a(d(t)&&F(t)===t&&t>=0,"`r` must be a non-negative integer!"),n(R(e),t))}function dr(e,t){let n=[];for(let r of Ve(e,t))n.push(r.slice());return n}function gr(){Object.keys(arguments).forEach(e=>{let t=arguments[e];if(h(t))if(ie(t))console.log(t);else{let n=b(t);n.length===1?new B(t).print():n.length==2?new S(t).print():console.log(t)}else v(t)||y(t)?t.print():console.log(t)})}var pr=O((e,t,n,r,s)=>{try{let o=!1;for(let c of[e,t,n,r,s]){if(!d(c))return NaN;typeof c=="bigint"&&(o=!0)}o&&(e=Number(e),t=Number(t),n=Number(n),r=Number(r),s=Number(s));let i=(s-r)*(e-t),u=n-t;if(u===0)return NaN;let l=i/u+r;if(o)try{return BigInt(l)}catch{}return l}catch{return NaN}});function yr(e,t,n,r,s){if(h(e)&&p(r)&&p(s)){r=t,s=n;let o=P(e);t=o.min,n=o.max}return pr(e,t,n,r,s)}function br(e){try{return d(e)?typeof e=="bigint"?e:Math.round(e):NaN}catch{return NaN}}var vr=O(br);function Ot(e){try{return d(e)?typeof e=="bigint"?BigInt(Ot(Number(e))):e<0?-1:e>0?1:0:NaN}catch{return NaN}}var Nr=O(Ot);function wr(e){try{return d(e)?(typeof e=="bigint"&&(e=Number(e)),Math.sin(e)):NaN}catch{return NaN}}var Or=O(wr);function ke(e,t){if(v(e)||y(e))return ke(e.values,t);a(h(e),"The first argument passed into the `some` function must be an array, Series, or DataFrame!"),a(D(t),"The second argument passed into the `some` function must be a function!");for(let n of e)if(h(n)){if(ke(n,t))return!0}else if(t(n))return!0;return!1}function _t(e,t){return P(e,{shouldDropNaNs:t,stdev:!0}).stdev}function _r(e){return _t(e)}function Sr(e){try{return d(e)?(typeof e=="bigint"&&(e=Number(e)),Math.tan(e)):NaN}catch{return NaN}}var Tr=O(Sr);function tt(e,t){a(D(e),"`fn` must be a function!");let n=new Date;return t?e(...t):e(),new Date-n}async function Ir(e,t){a(D(e),"`fn` must be a function!");let n=new Date;return t?await e(...t):await e(),new Date-n}function Dr(){return C([...arguments].map(e=>h(e)?e:v(e)||y(e)?e.values:[e]))}function Mr(e,t){return P(e,{shouldDropNaNs:t,variance:!0}).variance}function Er(){let e=[],t=Object.values(arguments).map(n=>((v(n)||y(n))&&(n=n.values),a(h(n),"The `zip` function only works on arrays, Series, and DataFrames!"),n));return T(0,Oe(t.map(n=>n.length))).forEach(n=>{let r=[];t.forEach(s=>{let o=s[n];r.push(p(o)?void 0:o)}),e.push(r)}),e}var ne={abs:Ye,add:ye,apply:_e,arccos:An,arcsin:Cn,arctan:Rn,argmax:De,argmin:Me,assert:a,cast:A,ceil:Kn,chop:$n,clamp:Ln,combinations:ht,combinationsIterator:be,copy:E,correl:je,cos:Un,count:ge,covariance:re,DataFrame:S,dataTypes:qn,decycle:Z,diff:Be,distance:Fe,divide:Gn,dot:$,dropMissing:$e,dropMissingPairwise:fe,dropNaN:Re,dropNaNPairwise:he,dropUndefined:Wn,every:ve,exp:Xn,factorial:Qn,find:Pe,findAll:Ce,flatten:R,float:xn,floor:tr,identity:nr,IndexMatcher:Se,indexOf:Q,inferType:me,int:F,intersect:mt,inverse:de,isArray:h,isBoolean:z,isBrowser:or,isDataFrame:v,isDate:L,isEqual:J,isFunction:D,isJagged:ie,isNested:Ne,isNumber:d,isObject:K,isSeries:y,isString:w,isUndefined:p,lerp:ir,log:ur,MathError:U,max:Oe,mean:ar,median:lr,min:ct,mod:cr,mode:fr,multiply:yt,ndarray:k,normal:hr,ones:mr,permutations:dr,permutationsIterator:Ve,pow:Ke,print:gr,product:ae,random:q,range:T,remap:yr,reshape:se,reverse:Y,round:vr,scale:ee,seed:we,Series:B,set:C,shape:b,shuffle:pe,sign:Nr,sin:Or,some:ke,sort:G,sqrt:pt,stats:P,std:_t,stdev:_r,subtract:bt,sum:Je,tan:Tr,timeAsync:Ir,timeSync:tt,time:tt,transpose:V,union:Dr,variance:Mr,vectorize:O,zeros:Le,zip:Er,dump(){let e=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:void 0;if(!e)throw new ne.MathError("Cannot dump functions into global scope because none of `globalThis`, `global`, `window`, or `self` exist in the current context!");Object.keys(ne).forEach(t=>{try{Object.defineProperty(e,t,{configurable:!1,enumerable:!0,writable:!1,value:ne[t]})}catch{e[t]=ne[t]}})}};typeof window<"u"&&(window.JSMathTools=ne);function St(e,t,n){arguments.length===2&&(d(arguments[1])?n=null:(n=t,t=null)),a(d(e)&&F(e)===e,"`keyLength` must be an integer!"),t&&(a(d(t)&&F(t)===t,"`keySeed` must be an integer!"),we(t)),n&&a(w(n),"`charset` must be a string!");let r="";n=n||"abcdefg1234567890";for(let s=0;s<e;s++)r+=n[F(q()*n.length)];return r}typeof globalThis<"u"&&(globalThis.makeKey=St);})();
11
+ `);var R=class extends Error{constructor(t){gt()?super(t):super(`
12
+
13
+ \x1B[31m`+t+`
14
+ \x1B[0m`)}};function s(e,t){if(!e)throw new R(t)}var yt=[Array,ArrayBuffer,BigInt64Array,BigUint64Array,Float32Array,Float64Array,Int16Array,Int32Array,Int8Array,Uint16Array,Uint32Array,Uint8Array,Uint8ClampedArray];function h(e){return e===null||typeof e>"u"}var Oe=yt.map(e=>e.name);function l(e){try{return e instanceof Array?!0:h(e.constructor)?!1:yt.indexOf(e.constructor)>-1||Oe.indexOf(e.constructor.name)>-1}catch{return!1}}function y(e){try{return!!e._symbol&&e._symbol===Symbol.for("@jrc03c/js-math-tools/dataframe")}catch{return!1}}function O(e){return typeof e=="function"}function C(e){return typeof e=="object"&&!h(e)&&!l(e)}function g(e){try{return!!e._symbol&&e._symbol===Symbol.for("@jrc03c/js-math-tools/series")}catch{return!1}}function V(e,t){if(y(e)){let i=V(e.values,t);return i.length>0&&f(i[0])&&i[0]>=0&&i[0]<e.index.length&&(i[0]=e.index[i[0]]),i.length>1&&f(i[1])&&i[1]>=0&&i[1]<e.columns.length&&(i[1]=e.columns[i[1]]),i}if(g(e)){let i=V(e.values,t);return i.length>0&&f(i[0])&&i[0]>=0&&i[0]<e.index.length&&(i[0]=e.index[i[0]]),i}if(s(C(e)||l(e),"You must pass (1) an object, array, Series, or DataFrame and (2) a function or value into the `indexOf` function!"),!O(t)){let i=t;t=a=>a===i}function n(i,a,m){if(m=m||[],m.indexOf(i)>-1)return null;if(C(i)){m.push(i);let u=Object.keys(i).concat(Object.getOwnPropertySymbols(i));for(let p=0;p<u.length;p++){let c=u[p],d=i[c];if(a(d))return[c];let v=n(d,a,m);if(v&&v.length>0)return[c].concat(v)}}else if(l(i)){m.push(i);for(let u=0;u<i.length;u++){let p=i[u];if(a(p))return[u];let c=n(p,a,m);if(c&&c.length>0)return[u].concat(c)}}else if(a(i))return[];return null}function r(i){try{return t(i)}catch{return!1}}let o=n(e,r);return o&&o.length>0?o:null}function _(e){function t(n){if(typeof n=="object"){if(n===null)return null;if(l(n))return n instanceof Array?n.map(o=>_(o)):n.slice();if(g(n)){let o=n.copy();return o.values=_(o.values),o}if(y(n)){let o=n.copy();return o.values=_(n.values),o}if(n instanceof Date)return new Date(n.getTime());n=L(n);let r={};return Object.keys(n).concat(Object.getOwnPropertySymbols(n)).forEach(o=>{r[o]=_(n[o])}),r}else return n}return t(L(e))}function L(e){function t(o,i,a){if(i=i||[],a=a||"",i.indexOf(o)>-1){let m=a.split("/").slice(a.startsWith("/")?1:0);if(m.some((p,c)=>{let d=m.slice(0,m.length-c-1),v=n;return d.forEach(D=>{v=v[D]}),v===o}))return`<reference to "${n===o?"/":"/"+V(n,o).join("/")}">`}return typeof o=="object"?o===null?null:(i.push(o),l(o)?typeof o.constructor<"u"&&o.constructor.name!=="Array"?o.slice():o.map((m,u)=>t(m,i,a+"/"+u)):(Object.keys(o).concat(Object.getOwnPropertySymbols(o)).forEach(m=>{o[m]=t(o[m],i,a+"/"+m.toString())}),o)):o}let n=e,r=t(n);if(y(e)){let o=e.copy();o._values=r.values,o._columns=r.columns,o._index=r.index,r=o}if(g(e)){let o=e.copy();o.name=r.name,o._values=r.values,o._index=r.index,r=o}return r}function G(e){return e instanceof Date&&e.toString()!=="Invalid Date"}var _t=["number","int","float","bigint"];function P(e,t){function n(r,o){let i=typeof r,a=typeof o;if(i!==a&&!_t.includes(i)&&!_t.includes(a))return!1;if(i==="undefined"&&a==="undefined")return!0;if(i==="boolean"||i==="symbol")return r===o;if(i==="number"||i==="bigint")try{let m=r.toString(),u=o.toString();return m===u}catch{return!1}if(i==="string"||i==="function")return r===o;if(i==="object"){if(r===null||o===null)return r===null&&o===null;{if(G(r))return G(o)?r.getTime()===o.getTime():!1;if(G(o))return!1;if(r instanceof RegExp&&o instanceof RegExp)return r.toString()===o.toString();if(l(r)!==l(o))return!1;let m=Object.keys(r).concat(Object.getOwnPropertySymbols(r)),u=Object.keys(o).concat(Object.getOwnPropertySymbols(o));if(m.length!==u.length)return!1;for(let p=0;p<m.length;p++){let c=m[p];if(!n(r[c],o[c]))return!1}return!0}}}try{return n(e,t)}catch{return n(L(e),L(t))}}function rt(e){let t="abcdefg1234567890",n="";for(;n.length<e;)n+=t[Math.floor(Math.random()*t.length)];return n}var Te=rt(16),De=rt(16),_e=rt(16),Ie=rt(16),xe=rt(16),at=class{constructor(){this.clear()}get counts(){return this.values.map(t=>this.get(t))}get values(){return Object.values(this.valuesDict)}clear(){return this.countsDict={},this.valuesDict={},this}count(t){for(let n of t)l(n)?this.count(n):this.increment(n);return this}delete(t){let n=this.getStandardizedKey(t);return delete this.countsDict[n],delete this.valuesDict[n],this}get(t){return this.countsDict[this.getStandardizedKey(t)]||0}getStandardizedKey(t){return typeof t=="object"&&t===null?Te:h(t)?De:O(t)?t.toString():typeof t=="symbol"?t.toString()+" - "+xe:t===1/0?_e:t===-1/0?Ie:typeof t=="bigint"?t.toString():y(t)?t.toJSONString():g(t)?JSON.stringify(t.toObject()):JSON.stringify(t)}has(t){return!h(this.countsDict[this.getStandardizedKey(t)])}increment(t){return this.set(t,this.get(t)+1)}set(t,n){let r=this.getStandardizedKey(t);return this.countsDict[r]=n,this.valuesDict[r]=t,this}toArray(){return this.values.map(t=>({value:t,count:this.get(t)}))}toObject(){let t={};return this.values.forEach(n=>{t[n]=this.get(n)}),t}};function I(e){if(y(e)||g(e))return I(e.values);s(l(e),"The `flatten` function only works on arrays, Series, and DataFrames!");function t(n){let r=[];return n.forEach(o=>{l(o)?r=r.concat(t(o)):r.push(o)}),r}return t(e)}function j(e,t){t=t||{};let n=new at,r={},o=I(e),i=[],a=-1/0,m=1/0,u=!1,p=0;for(let d of o){if(typeof d=="bigint"&&(u=!0),!t.shouldDropNaNs||f(d))try{d>a&&(a=d),d<m&&(m=d),p+=Number(d),i.push(d)}catch{a=NaN,m=NaN,p=NaN}n.increment(d)}let c=p/i.length;if(r.counts=n,r.max=a,r.mean=c,r.min=m,r.n=o.length,r.sum=p,isNaN(r.mean)&&(r.max=NaN,r.min=NaN),t.shouldDropNaNs&&(r.nWithoutNaNs=i.length),t.mode){let d=Array.from(n.values.map(F=>[F,n.get(F)])).toSorted((F,st)=>st[1]-F[1]),v=d[0][1],D=[];for(let F of d)if(F[1]==v)D.push(F[0]);else break;r.mode=D.toSorted()}if(t.median)if(isNaN(c))r.median=NaN;else{let d=i.toSorted((D,F)=>Number(D)-Number(F)),v=Math.floor(d.length/2);if(d.length%2===0){let D=d[v-1],F=d[v];if(r.median=(Number(D)+Number(F))/2,u&&typeof D=="bigint"&&typeof F=="bigint")try{r.median=BigInt(r.median)}catch{}}else r.median=d[v]}if(t.stdev||t.variance){let d=0;for(let D of i)d+=Math.pow(Number(D)-c,2);d/=i.length;let v=Math.sqrt(d);r.stdev=v,r.variance=d}if(u){try{r.sum=BigInt(r.sum)}catch{}try{r.mean=BigInt(r.mean)}catch{}t.mode&&(r.mode=r.mode.map(d=>{try{return BigInt(d)}catch{return d}}))}return r}function nt(e,t){let{counts:n}=j(e);return h(t)||(O(t)?n.values.forEach(r=>{t(r)||n.delete(r)}):n.values.forEach(r=>{P(r,t)||n.delete(r)})),n}function bt(e){if(y(e)||g(e))return bt(e.values);if(l(e)){let t=!1,n=!1,r=null;for(let o of e){if(bt(o))return!0;if(l(o)){if(r===null)r=o.length;else if(o.length!==r)return!0;t=!0}else n=!0;if(t&&n)return!0}}return!1}function q(e){return bt(L(e))}function H(e){if(y(e)||g(e))return H(e.values);s(l(e),"The `isNested` function only works on arrays, Series, and DataFrames!");for(let t=0;t<e.length;t++)if(l(e[t]))return!0;return!1}var X="You must pass a natural number or a one-dimensional array of natural numbers into the `ndarray` function!";function A(e){s(!h(e),X),l(e)||(e=[e]),s(!H(e),X),s(e.length>0,X);let t=e[0];if(typeof t=="bigint"&&(t=Number(t)),s(f(t),X),s(t>=0,X),s(Math.floor(t)===t,X),s(t!==1/0,"We can't create an array containing an infinite number of values!"),e.length===1){let n=[];for(let r=0;r<t;r++)n.push(void 0);return n}else{let n=[];for(let r=0;r<t;r++)n.push(A(e.slice(1)));return n}}function B(e){if(y(e)||g(e)){let n=e.copy();return n.values=B(n.values),n.index=B(n.index),n}s(l(e),"The `reverse` function only works on arrays, Series, and DataFrames!");let t=[];for(let n=e.length-1;n>=0;n--)t.push(e[n]);return t}function S(e,t,n=1){s(!h(e)&&!h(t)&&!h(n),"You must pass two numbers and optionally a step value to the `range` function!"),s(f(e)&&f(t)&&f(n),"You must pass two numbers and optionally a step value to the `range` function!"),s(n>0,"The step value must be greater than 0! (NOTE: The step value is a magnitude; it does not indicate direction.)");let r=!1,o=typeof e=="bigint"||typeof t=="bigint"||typeof n=="bigint";if(e=Number(e),t=Number(t),n=Number(n),e>t){r=!0;let a=e;e=t+n,t=a+n}let i=[];for(let a=e;a<t;a+=n)if(o)try{i.push(BigInt(a))}catch{i.push(a)}else i.push(a);return r&&(i=B(i)),i}function ot(e){let t="abcdefg1234567890",n="";for(;n.length<e;)n+=t[Math.floor(Math.random()*t.length)];return n}var Fe=ot(256),Ae=ot(256),je=ot(256),Ee=ot(256),Me=ot(256);function U(e){if(y(e)||g(e))return U(e.values);s(l(e),"The `set` function only works on arrays, Series, and DataFrames!");let t=[],n={};return I(e).forEach(r=>{let o=typeof r=="object"&&r===null?Fe:h(r)?Ae:O(r)?r.toString():typeof r=="symbol"?r.toString()+" - "+Me:r===1/0?je:r===-1/0?Ee:typeof r=="bigint"?r.toString():y(r)?r.toJSONString():g(r)?JSON.stringify(r.toObject()):JSON.stringify(r);n[o]||t.push(r),n[o]=!0}),t}function It(e){if(l(e)){let t=It(e[0]);return[e.length].concat(t||[])}else return}function b(e){return y(e)||g(e)?b(e.values):(s(l(e),"The `shape` function only works on arrays, Series, and DataFrames!"),It(e))}function Nt(e,t,n){if(h(n)&&(n=0),s(n===0||n===1||n==="vertical"||n==="horizontal",'The only valid axis values for use when appending data to a DataFrame are 0, 1, "vertical", and "horizontal". Note that 0 == "horizontal" and 1 == "vertical".'),l(t)){s(!q(t),"The array of data you're trying to append to this DataFrame is jagged!");let r=b(t);if(r.length===1)if(n===0){let o=e.copy();o._values.push(t);let i=Math.max(e.shape[1],r[0]);for(o._values.forEach(a=>{for(;a.length<i;)a.push(void 0)});o._index.length<o._values.length;)o._index.push("row"+o._index.length);for(;o._columns.length<i;)o._columns.push("col"+o._columns.length);return o}else{let o=Math.max(e.shape[0],r[0]),i=e.copy();for(S(0,o).forEach(a=>{a>=i._values.length&&i._values.push(A(e.shape[1])),i._values[a].push(t[a])});i._index.length<i._values.length;)i._index.push("row"+i._index.length);for(;i._columns.length<i._values[0].length;)i._columns.push("col"+i._columns.length);return i}else if(r.length===2)if(n===0){let o=Math.max(...t.map(a=>a.length).concat([e.shape[1]])),i=e.copy();for(i._values=i._values.concat(t).map(a=>{for(;a.length<o;)a.push(void 0);return a});i._index.length<i._values.length;)i._index.push("row"+i._index.length);for(;i._columns.length<o;)i._columns.push("col"+i._columns.length);return i}else{let o=Math.max(...t.map(m=>m.length))+e.shape[1],i=Math.max(e.shape[0],r[0]),a=e.copy();for(S(0,i).forEach(m=>{for(m>=a._values.length&&a._values.push(A(e.shape[1])),a._values[m]=a._values[m].concat(t[m]);a._values[m].length<o;)a._values[m].push(void 0)});a._index.length<a._values.length;)a._index.push("row"+a._index.length);for(;a._columns.length<o;)a._columns.push("col"+a._columns.length);return a}else throw new R("Only 1- and 2-dimensional arrays can be appended to a DataFrame!")}else if(g(t)){let r=Nt(e,t.values,n);return n===0?r.index[r.index.length-1]=r.index.indexOf(t.name)>-1?t.name+" (2)":t.name:r.columns[r.columns.length-1]=r.columns.indexOf(t.name)>-1?t.name+" (2)":t.name,r}else if(y(t))if(n===0){let r=e.copy(),o=U(r._columns.concat(t._columns)).length;for(r._values.forEach(i=>{for(;i.length<o;)i.push(void 0)}),t.apply(i=>{let a=i.copy(),m=[];r._columns.forEach(u=>{let p=a._index.indexOf(u);p>-1?(m.push(a._values[p]),a._values.splice(p,1),a._index.splice(p,1)):m.push(void 0)}),r._values.push(m.concat(a._values))},1),r._columns=r._columns.concat(t._columns.filter(i=>r._columns.indexOf(i)<0));r._index.length<r._values.length;){let i="row"+r._index.length;r._index.push(i+(e._index.indexOf(i)>-1?" (2)":""))}return r}else{let r=e.copy();return r._index.forEach((o,i)=>{let a=t._index.indexOf(o);a>-1?r._values[i]=r._values[i].concat(t._values[a]):r._values[i]=r._values[i].concat(A(t.shape[1]))}),t._index.forEach((o,i)=>{r._index.indexOf(o)<0&&(r._index.push(o),r._values.push(A(r._columns.length).concat(t._values[i])))}),r._columns=r._columns.concat(t._columns.map(o=>o+(r._columns.indexOf(o)>-1?" (2)":""))),r}else throw new R("Only 1- or 2-dimensional arrays, Series, and DataFrames can be appended to a DataFrame!")}function xt(e,t,n,r,o){if(o=o||0,s(O(r),"The first parameter to the `apply` method must be a function."),s(o===0||o===1,"The second parameter to the `apply` method (the `axis`) must be 0 or 1."),o===0){let i={},a;if(n.columns.forEach((m,u)=>{let p=new t(n.values.map(d=>d[u]));p.name=m,p.index=n.index;let c=r(p,u,n);c instanceof t?i[m]=c.values:i[m]=c,h(a)&&(a=c instanceof t||l(c))}),a){let m=new e(i);return m.index=n.index,m}else{let m=new t(n.columns.map(u=>i[u]));return m.index=n.columns,m}}else if(o===1){let i,a=n.values.map((m,u)=>{let p=new t(m);p.name=n.index[u],p.index=n.columns;let c=r(p,u,n);return h(i)&&(i=c instanceof t||l(c)),c instanceof t?c.values:c});if(i){let m=new e(a);return m.index=n.index,m.columns=n.columns,m}else{let m=new t(a);return m.index=n.index,m}}}function w(e){return typeof e=="string"}function Ft(e,t,n,r,o){let i=m=>m instanceof e,a=m=>m instanceof t;if(h(o)){if(i(r))return n.append(r,1);if(a(r))return n.append(r,1);if(C(r)){let m=Math.max(...Object.keys(r).concat(Object.getOwnPropertySymbols(r)).map(u=>r[u].length));return Object.keys(r).concat(Object.getOwnPropertySymbols(r)).forEach(u=>{for(;r[u].length<m;)r[u].push(void 0)}),n.append(new e(r),1)}else throw new R("You must pass a DataFrame, Series, or object into the `assign` method!")}else{s(w(r),"If passing two arguments into the `assign` method, then the first argument must be a string name!"),s(l(o)&&!q(o)&&b(o).length===1,"If passing two arguments into the `assign` method, then the second argument must be a 1-dimensional array!");let m=n.append(o,1);return m.columns[m.columns.length-1]=r,m}}function At(e,t){if(t.isEmpty)return new e;let n=new e(_(t.values));return n.columns=t.columns.slice(),n.index=t.index.slice(),n}function jt(e,t,n,r,o){h(r)&&(r=[]),h(o)&&(o=[]),(w(r)||f(r))&&(r=[r]),(w(o)||f(o))&&(o=[o]),s(l(r),"The `drop` method only works on 1-dimensional arrays of numerical indices and/or strings."),s(l(o),"The `drop` method only works on 1-dimensional arrays of numerical indices and/or strings."),s(b(r).length===1,"The `drop` method only works on 1-dimensional arrays of numerical indices and/or strings."),s(b(o).length===1,"The `drop` method only works on 1-dimensional arrays of numerical indices and/or strings.");let i,a;n.index.forEach((u,p)=>{r.indexOf(u)<0&&r.indexOf(p)<0&&(i||(i=[]),i.push(u))}),n.columns.forEach((u,p)=>{o.indexOf(u)<0&&o.indexOf(p)<0&&(a||(a=[]),a.push(u))});let m=n.get(i,a);if(m instanceof t){let u=new e;u=u.assign(m),n.index.indexOf(m.name)>-1&&(u=u.transpose()),m=u}return m}function mt(e){return f(e)&&(e>=0?Math.floor(e)===e:Math.ceil(e)===e)}function k(e){return mt(e)&&e>=0}function Et(e,t,n,r,o,i){r=r||0,s(r===0||r===1,"The first parameter of the `dropMissing` method (the `axis`) must be 0 or 1."),i=i||0,s(k(i),"The third parameter of the `dropMissing` method (the `threshold`) should be a whole number (meaning that data should be dropped if it contains more than `threshold` null values)."),o=i>0?"none":o||"any",s(o==="any"||o==="all"||o==="none","The second parameter of the `dropMissing` method (the `condition` parameter, which indicates the condition under which data should be dropped) should be 'any' or 'all' (meaning that if 'any' of the data contains null values, then it should be dropped; or that if 'all' of the data contains null values, then it should be dropped).");function a(p){if(i>0){let c=0;for(let d=0;d<p.length;d++){let v=p[d];if(h(v)&&c++,c>=i)return[]}}else if(o==="any")for(let c=0;c<p.length;c++){let d=p[c];if(h(d))return[]}else if(o==="all"){for(let c=0;c<p.length;c++){let d=p[c];if(!h(d))return p}return[]}return p}let m=n.copy(),u=Math.random().toString();if(r===0){m=m.assign(u,m.index);let p=m.values.map(a).filter(d=>d.length>0);if(b(p).length<2)return new e;m.values=p;let c=m.get(null,u);if(h(c))return new e;w(c)&&(c=[c]),c instanceof t&&(c=c.values),m.index=c,m=m.drop(null,u)}else if(r===1){let p={};if(m.columns.forEach((d,v)=>{let D=m.values.map(st=>st[v]),F=a(D);F.length>0&&(p[d]=F)}),Object.keys(p).length+Object.getOwnPropertySymbols(p).length===0)return new e;let c=new e(p);return c.index=m.index,c}return m}function ut(e){if(y(e)||g(e))return e.dropNaN(...Object.values(arguments).slice(1));s(l(e),"The `dropNaN` function only works on arrays, Series, and DataFrames!");let t=[];return e.forEach(n=>{try{return t.push(ut(n))}catch{if(f(n))return t.push(n)}}),t}function Mt(e,t,n,r,o){n=n||0,s(n===0||n===1,"The first parameter of the `dropNaN` method (the `axis`) must be 0 or 1."),o=o||0,s(k(o),"The third parameter of the `dropNaN` method (the `threshold`) should be a whole number (meaning that data should be dropped if it contains more than `threshold` NaN values)."),r=o>0?"none":r||"any",s(r==="any"||r==="all"||r==="none","The second parameter of the `dropNaN` method (the `condition` parameter, which indicates the condition under which data should be dropped) should be 'any' or 'all' (meaning that if 'any' of the data contains NaN values, then it should be dropped; or that if 'all' of the data contains NaN values, then it should be dropped).");function i(m){let u=ut(m);return o>0?m.length-u.length<o:r==="any"?u.length===m.length:r==="all"?u.length>0:!0}let a=t.copy();if(n===0){let m=a.index.filter(u=>{let p=a.get(u,null).values;return i(p)});return m.length>0?a.get(m,null):new e}else if(n===1){let m=a.columns.filter(u=>{let p=a.get(null,u).values;return i(p)});return m.length>0?a.get(null,m):new e}return a}function Bt(e){let t={};return I(e).forEach((n,r)=>{t[n]=r}),t}function Q(e){return Object.keys(e).concat(Object.getOwnPropertySymbols(e)).sort((t,n)=>e[t]-e[n])}function Ut(e,t,n,r,o){s(O(r),"The `filter` method takes a single parameter: a function that is used to filter the values."),h(o)&&(o=0),s(o===0||o===1,"The `axis` parameter to the `filter` method must be 0 or 1.");let i=n.copy();if(i.isEmpty)return i;let a=Bt(i.index),m=Bt(i.columns);if(o===0){let u=0,p=i.values.filter((c,d)=>{let v=new t(c);v.name=n.index[d],v.index=n.columns;let D=r(v,d,n);return D?u++:delete a[i.index[d]],D});if(u===0)return new e;if(u===1){let c=new t(p[0]);return c.name=Q(a)[0],c.index=Q(m),c}i.values=p,i.index=Q(a)}else if(o===1){i=i.transpose();let u=0,p=i.values.filter((c,d)=>{let v=new t(c);v.name=n.columns[d],v.index=n.index;let D=r(v,d,n);return D?u++:delete m[i.index[d]],D});if(u===0)return new e;if(u===1){let c=new t(p[0]);return c.name=Q(m)[0],c.index=Q(a),c}i.values=p,i.index=Q(m),i=i.transpose()}return i}function Pt(e,t,n){(w(t)||f(t))&&(t=[t]),(w(n)||f(n))&&(n=[n]);for(let o in t)typeof t[o]=="bigint"&&(t[o]=Number(t[o]));for(let o in n)typeof n[o]=="bigint"&&(n[o]=Number(n[o]));let r=U((t||[]).concat(n||[]).map(o=>typeof o));return s(r.length<=2,"Only whole numbers and/or strings are allowed in `get` arrays!"),r.length===1&&s(r[0]==="string"||r[0]==="number","Only whole numbers and/or strings are allowed in `get` arrays!"),r.length===2&&(s(r.indexOf("string")>-1,"Only whole numbers and/or strings are allowed in `get` arrays!"),s(r.indexOf("number")>-1,"Only whole numbers and/or strings are allowed in `get` arrays!")),h(t)||(t=t.map(o=>{if(w(o))return s(e.index.indexOf(o)>-1,`Row "${o}" does not exist!`),o;if(f(o))return s(o>=0,`Index ${o} is out of bounds!`),s(Math.floor(o)===o,"Row numbers must be integers!"),s(o<e.index.length,`Index ${o} is out of bounds!`),e.index[o]})),h(n)||(n=n.map(o=>{if(w(o))return s(e.columns.indexOf(o)>-1,`Column "${o}" does not exist!`),o;if(f(o))return s(o>=0,`Column ${o} is out of bounds!`),s(Math.floor(o)===o,"Column numbers must be integers!"),s(o<e.columns.length,`Column ${o} is out of bounds!`),e.columns[o]})),e.getSubsetByNames(t,n)}function Be(e,t){try{return e<t?-1:e>t?1:0}catch{return e=typeof e=="object"&&e!==null?JSON.stringify(e):e.toString(),t=typeof t=="object"&&t!==null?JSON.stringify(t):t.toString(),e<t?-1:e>t?1:0}}function J(e,t){if(h(t)&&(t=Be),y(e)||g(e))return e.sort(...Object.values(arguments).slice(1));s(l(e),"The `sort` function only works on arrays, Series, and DataFrames!"),s(O(t),"The second parameter of the `sort` function must be a comparison function!");let n=e.slice();return n.sort(t),n}function Ue(e){let t=e.toLowerCase(),n="";for(let o=0;o<t.length;o++){let i=t[o];i.match(/[a-z0-9]/g)?n+=i:n+=" "}let r=n.split(" ").filter(o=>o.length>0);return r[0]+r.slice(1).map(o=>o[0].toUpperCase()+o.substring(1)).join("")}function vt(e,t,n){h(n)?n=t.columns:w(n)&&(n=[n]);let r={};n.forEach(i=>{s(w(i),"You must pass either a string or a one-dimensional array of strings into the `getDummies` (AKA `oneHotEncode`) method!");let a=t.columns.indexOf(i);s(a>-1,`The given DataFrame does not have a column called "${i}"!`);let m=t.values.map(p=>p[a]),u=J(U(m));m.forEach(p=>{u.forEach(c=>{let d=i+"_"+Ue(c.toString());r[d]||(r[d]=[]),p===c?r[d].push(1):r[d].push(0)})})});let o=new e(r);return o.index=t.index,o}function zt(e,t,n){let r=e.shape;h(t)&&(t=S(0,r[0])),h(n)&&(n=S(0,r[1])),f(t)&&(t=[t]),f(n)&&(n=[n]),s(l(t)&&l(n),"The `rowIndices` and `colIndices` parameters must be 1-dimensional arrays of whole numbers."),s(b(t).length===1&&b(n).length===1,"The `rowIndices` and `colIndices` parameters must be 1-dimensional arrays of whole numbers."),s(t.length>0,"The `rowIndices` array must contain at least one index."),s(n.length>0,"The `colIndices` array must contain at least one index."),t.forEach(a=>{s(k(a),"The `rowIndices` and `colIndices` parameters must be 1-dimensional arrays of whole numbers."),s(a<e.index.length,`The row index ${a} is out of bounds.`)}),n.forEach(a=>{s(k(a),"The `rowIndices` and `colIndices` parameters must be 1-dimensional arrays of whole numbers."),s(a<e.columns.length,`The column index ${a} is out of bounds.`)});let o=t.map(a=>e.index[a]),i=n.map(a=>e.columns[a]);return e.getSubsetByNames(o,i)}function Ct(e,t,n,r,o){h(r)&&(r=n.index),h(o)&&(o=n.columns),w(r)&&(r=[r]),w(o)&&(o=[o]),s(l(r)&&l(o),"The `rows` and `cols` parameters must be 1-dimensional arrays of strings."),s(b(r).length===1&&b(o).length===1,"The `rows` and `cols` parameters must be 1-dimensional arrays of strings."),s(r.length>0,"The `rows` array must contain at least one row name."),s(o.length>0,"The `cols` array must contain at least one column name."),r.forEach(m=>{s(w(m),"The `rows` and `cols` parameters must be 1-dimensional arrays of strings."),s(n.index.indexOf(m)>-1,`The row name "${m}" does not exist in the list of rows.`)}),o.forEach(m=>{s(w(m),"The `rows` and `cols` parameters must be 1-dimensional arrays of strings."),s(n.columns.indexOf(m)>-1,`The column name "${m}" does not exist in the list of columns.`)});let i=r.map(m=>o.map(u=>n.values[n.index.indexOf(m)][n.columns.indexOf(u)]));if(r.length===1&&o.length===1)return i[0][0];if(r.length===1){let m=new t(i[0]);return m.name=r[0],m.index=o,m}if(o.length===1){let m=new t(i.map(u=>u[0]));return m.name=o[0],m.index=r,m}let a=new e(i);return a.columns=o,a.index=r,a}function kt(e,t,n){function r(v,D){return w(v)&&v.length>D?v.substring(0,D-3)+"...":v}if(n.isEmpty)return console.table({}),console.log("Shape:",[0,0],`
15
+ `),n;let o=typeof window>"u"?20:10,i=Math.floor(o/2),a=4,m=Math.floor(a/2),u=o>n.index.length?null:S(0,i).concat(S(n.index.length-i,n.index.length)),p=a>n.columns.length?null:S(0,m).concat(S(n.columns.length-m,n.columns.length)),c=n.get(u,p);c instanceof t&&(n.shape[0]===1?(c=new e([c.values]),c.index=n.index,c.columns=new t(n.columns).get(p).values):n.shape[1]===1&&(c=new e([c.values]).transpose(),c.index=new t(n.index).get(u).values,c.columns=n.columns)),o<=n.index.length&&(c._index.splice(i,0,"..."),c._values.splice(i,0,S(0,c.columns.length).map(()=>"..."))),a<=n.columns.length&&(c._columns.splice(m,0,"..."),c._values=c._values.map(v=>(v.splice(m,0,"..."),v)));let d=28;return c instanceof t?(c.values=c.values.map(v=>r(v,d)),c.name=r(c.name,d),c.index=c.index.map(v=>r(v,d))):(c.values=c.values.map(v=>v.map(D=>r(D,d))),c.columns=c.columns.map(v=>r(v,d)),c.index=c.index.map(v=>r(v,d))),console.table(c.toDetailedObject()),console.log("Shape:",n.shape,`
16
+ `),n}function $(e,t){s(f(e),"The `leftPad` function only works on numbers!");let n=e.toString();for(;n.length<t;)n="0"+n;return n}function Jt(e,t){let n=t?e:e.copy();return n.index=S(0,e.shape[0]).map(r=>"row"+$(r,(n.index.length-1).toString().length)),n}function W(e,t){if(y(e)||g(e))return W(e.values,t);s(l(e),"The `product` function only works on arrays, Series, and DataFrames!");try{if(e.length===0)return NaN;let n=I(e),r=!1,o=1;for(let i of n){if(!f(i))if(t)i=1;else return NaN;typeof i=="bigint"&&(r=!0,i=Number(i)),o*=i}if(r)try{return BigInt(o)}catch{}return o}catch{return NaN}}function Rt(e){return mt(e)&&e>0}function Z(e,t){if(y(e)||g(e))return Z(e.values,t);if(s(l(e),"The first argument passed into the `reshape` function must be an array!"),f(t)&&(t=[t]),s(l(t),"The second argument passed into the `reshape` function must be a whole number or a one-dimensional array of whole numbers!"),s(b(t).length===1,"The first argument passed into the `reshape` function must be a whole number or a one-dimensional array of whole numbers!"),t=t.map(i=>(typeof i=="bigint"&&(i=Number(i)),s(Rt(i),"The first argument passed into the `reshape` function must be a whole number or a one-dimensional array of whole numbers!"),Number(i))),t.length===0)return I(e);let n=I(e);if(t.length===1&&t[0]===n.length)return n;s(W(t)===n.length,"The new shape doesn't match the number of values available in `x` (the first argument passed into the `reshape` function)!");let r=[],o=Math.floor(n.length/t[0]);for(let i=0;i<t[0];i++){let a=n.slice(i*o,(i+1)*o);r.push(Z(a,t.slice(1)))}return r}var $t=Math.pow(2,64),T=[];ft(Math.floor(Math.random()*$t));function Pe(e,t){e=x(e);function n(){e+=x("0x9e3779b97f4a7c15");let o=_(e);return o=(o^o>>BigInt(30))*x("0xbf58476d1ce4e5b9"),o=(o^o>>BigInt(27))*x("0x94d049bb133111eb"),o^o>>BigInt(31)}let r=[];for(let o=0;o<t;o++)r.push(n());return r}function x(e){return BigInt.asUintN(64,BigInt(e))}function Yt(e,t){return e=x(e),t=BigInt(t),x(x(e<<t)|x(e>>x(BigInt(64)-t)))}function ft(e){if(typeof e=="bigint"&&(e=Number(e)),h(e))return _(T);{s(f(e),"If passing a value into the `seed` function, then that value must be an integer!");let t=Pe(Math.floor(e),4);T[0]=t[0],T[1]=t[1],T[2]=t[2],T[3]=t[3]}}function Kt(){let e=x(Yt(T[0]+T[3],23)+T[0]),t=x(T[1]<<BigInt(17));return T[2]=x(T[2]^T[0]),T[3]=x(T[3]^T[1]),T[1]=x(T[1]^T[2]),T[0]=x(T[0]^T[3]),T[2]=x(T[2]^t),T[3]=Yt(T[3],45),Math.floor(Number(e))/$t}function Y(e){return h(e)?Kt():(l(e)||(e=[e]),Z(A(W(e)).map(Kt),e))}function tt(e){if(y(e)||g(e))return e.shuffle(...Object.values(arguments).slice(1));s(l(e),"The `shuffle` function only works on arrays, Series, and DataFrames!");let t=[],n=e.slice();for(let r=0;r<e.length;r++){let o=Math.floor(Y()*n.length);t.push(n.splice(o,1)[0])}return t}function Lt(e,t){return h(t)&&(t=0),s(t===0||t===1,"The `axis` parameter to the `shuffle` must be 0, 1, or undefined."),e.get(t===0?tt(e.index):null,t===1?tt(e.columns):null)}function et(e){return typeof e=="boolean"}function qt(e,t,n){return O(t)?ze(e,t,n):Ce(e,t,n)}function ze(e,t,n){if(n=h(n)?0:n,s(O(t),"When sorting a DataFrame using a function, the first argument to the `sort` method must be a function!"),s(f(n),"When sorting a DataFrame using a function, the second argument to the `sort` method must be null, undefined, 0, or 1 to indicate the axis along which the data should be sorted! An axis of 0 means that the rows will be sorted relative to each other, whereas an axis of 1 means that the columns will be sorted relative to each other."),n===0){let r=J(e.index,(o,i)=>t(e.get(o,null),e.get(i,null)));return e.get(r,null)}else{let r=J(e.columns,(o,i)=>t(e.get(null,o),e.get(null,i)));return e.get(null,r)}}function Ce(e,t,n){let r=e.copy(),o=Y().toString();r=r.assign(o,r.index),h(t)&&(t=[o],n=[!0]),(f(t)||w(t))&&(t=[t],(et(n)||w(n))&&(n=[n])),s(l(t),"The first parameter of the `sort` method must be (1) a string or index representing a column name or index, respectively; (2) a 1-dimensional array of strings and/or indices; or (3) null."),s(b(t).length===1,"The first parameter of the `sort` method must be (1) a string or index representing a column name or index, respectively; (2) a 1-dimensional array of strings and/or indices; or (3) null."),h(n)&&(n=S(0,t.length).map(()=>!0)),s(l(n),"The second parameter of the `sort` method must be (1) a string or boolean representing the sort direction ('ascending' / 'descending', or true / false); (2) a 1-dimensional array of strings and/or booleans; or (3) null."),s(b(n).length===1,"The second parameter of the `sort` method must be (1) a string or boolean representing the sort direction ('ascending' / 'descending', or true / false); (2) a 1-dimensional array of strings and/or booleans; or (3) null."),s(t.length===n.length,"The arrays passed into the `sort` method must be equal in length."),t=t.map(a=>{if(s(w(a)||f(a),"Column references can either be column names (as strings) or column indices (as whole numbers)."),w(a)){let m=r.columns.indexOf(a);return s(m>-1,`The column "${a}" does not exist!`),m}if(f(a))return s(k(a),"Column indices must be whole numbers!"),s(a<r.columns.length,`The index ${a} is out of bounds!`),a}),n=n.map(a=>{if(s(w(a)||et(a),"Direction references can either be strings ('ascending' or 'descending') or booleans (true or false)."),w(a)){let m=a.trim().toLowerCase();return s(m==="ascending"||m==="descending","Direction references can either be strings ('ascending' or 'descending') or booleans (true or false)."),m==="ascending"}if(et(a))return a}),r.values=J(r.values,(a,m)=>{let u=0;for(;a[t[u]]===m[t[u]]&&u<t.length;)u++;let p=n[u];if(a[t[u]]===m[t[u]])return 0;if(a[t[u]]<m[t[u]])return p?-1:1;if(a[t[u]]>m[t[u]])return p?1:-1});let i=r.columns.indexOf(o);return r.index=r.values.map(a=>a[i]),r=r.dropColumns(o),r}function Vt(e,t){h(t)?t=0:s(t===0||t===1,"The axis parameter of the `toDetailedObject` method must be undefined, 0, or 1. An axis of 0 indicates that the returned object should be organized first by rows and then by columns. An axis of 1 indicates that the returned object should be organized first by columns and then by rows.");let n={};return t===0?e.index.forEach((r,o)=>{let i={};e.columns.forEach((a,m)=>{i[a]=e.values[o][m]}),n[r]=i}):e.columns.forEach((r,o)=>{let i={};e.index.forEach((a,m)=>{i[a]=e.values[m][o]}),n[r]=i}),n}function lt(e,t){return JSON.stringify(e.toObject(t))}async function Gt(e,t){return JSON.parse(lt(e,t))}function Wt(e){let t={};return e.columns.forEach(n=>{t[n]=e.get(n).values}),t}function z(e){if(y(e)||g(e))return e.transpose();s(l(e),"The `transpose` function only works on arrays, Series, and DataFrames!");let t=b(e);if(s(t.length<=2,"I'm not smart enough to know how to transpose arrays that have more than 2 dimensions. Sorry for the inconvenience! Please only pass 1- or 2-dimensional arrays into the `transpose` function!"),t.length===1)return B(e);if(t.length===2){let n=A(B(t));for(let r=0;r<t[0];r++)for(let o=0;o<t[1];o++)n[o][r]=e[r][o];return n}}function wt(e,t,n){if(g(n))return new e(t.values.concat(n.values));if(l(n)){let r=b(n);s(r.length===1&&!H(r),"Only vectors can be appended to Series!");let o=t.copy();return n.forEach((i,a)=>{o._values.push(i),o._index.push("item"+(t.values.length+a))}),o}return wt(t,[n])}function Ht(e,t){s(O(t),"The parameter to the `apply` method must be a function.");let n=e.copy();return n._values=n._values.map((r,o)=>t(r,o)),n}function Xt(e){let t=e.copy(),n=[];return t._values=t.values.filter((r,o)=>h(r)?!1:(n.push(t.index[o]),!0)),t._index=n,t}function Qt(e,t){let n=[],r=[];t.values.forEach((i,a)=>{f(i)&&(r.push(i),n.push(t.index[a]))});let o=new e(r);return o.name=t.name,o.index=n,o}function Zt(e,t,n){let r=t.copy(),o=_(r.index),i=[],a=r.values.filter((m,u)=>{let p=n(m,u,r.values);return p||i.push(r.index[u]),p});return i.forEach(m=>{o.splice(o.indexOf(m),1)}),a.length===0?(r=new e,r.name=t.name,r):(r.values=a,r.index=o,r)}function te(e,t){(w(t)||f(t))&&(t=[t]);for(let r in t)typeof t[r]=="bigint"&&(t[r]=Number(t[r]));let n=U((t||[]).map(r=>typeof r));return s(n.length<=2,"Only whole numbers and/or strings are allowed in `get` arrays!"),n.length===1&&s(n[0]==="string"||n[0]==="number","Only whole numbers and/or strings are allowed in `get` arrays!"),n.length===2&&(s(n.indexOf("string")>-1,"Only whole numbers and/or strings are allowed in `get` arrays!"),s(n.indexOf("number")>-1,"Only whole numbers and/or strings are allowed in `get` arrays!")),h(t)||(t=t.map(r=>{if(typeof r=="string")return s(e.index.indexOf(r)>-1,`Index "${r}" does not exist!`),r;if(typeof r=="number")return s(r>=0,`Index ${r} is out of bounds!`),s(Math.floor(r)===r,"Indices must be integers!"),s(r<e.index.length,`Index ${r} is out of bounds!`),e.index[r]})),e.getSubsetByNames(t)}function ee(e,t){let n=e.shape;h(t)&&(t=S(0,n[0])),s(l(t),"The `indices` array must be 1-dimensional array of whole numbers."),s(b(t).length===1,"The `indices` array must be a 1-dimensional array of whole numbers."),s(t.length>0,"The `indices` array must contain at least one index."),t.forEach(o=>{s(k(o),"The `indices` array must be a 1-dimensional array of whole numbers."),s(o<e.index.length,`The row index ${o} is out of bounds.`)});let r=t.map(o=>e.index[o]);return e.getSubsetByNames(r)}function re(e,t,n){h(n)&&(n=t.index),s(l(n),"The `indices` array must be a 1-dimensional array of strings."),s(b(n).length===1,"The `indices` array must be a 1-dimensional array of strings."),s(n.length>0,"The `indices` array must contain at least one index name."),n.forEach(i=>{s(w(i),"The `indices` array must contain only strings."),s(t.index.indexOf(i)>-1,`The name "${i}" does not exist in the index.`)});let r=n.map(i=>t.values[t.index.indexOf(i)]);if(r.length===1)return r[0];let o=new e(r);return o.index=n,o.name=t.name,o}function ne(e){let t=e.copy(),n=typeof window>"u"?20:10;if(t.index.length>n){t=t.get(S(0,n/2).concat(S(t.index.length-n/2,t.index.length)));let o=_(t.index);o.splice(Math.floor(o.length/2),0,"..."),t.values.push("..."),t.index.push("..."),t=t.get(o)}let r={};return t.values.forEach((o,i)=>{let a={};a[t.name]=o,r[t.index[i]]=a}),console.table(r),console.log("Shape:",e.shape,`
17
+ `),e}function oe(e){let t=e.copy();return t.get(tt(t.index))}function ie(e,t,n){n=n||((u,p)=>u<p?-1:1),s(h(n)||O(n),"You must pass undefined, null, or a comparison function as the second argument to the `sort` method!");let r=z([t.values,t.index]),o=J(r,(u,p)=>n(u[0],p[0])),i=[],a=[];o.forEach(u=>{i.push(u[0]),a.push(u[1])});let m=new e;return m._values=i,m._index=a,m.name=t.name,m}function se(e,t){let n=z([t.values,t.index]);n=z(J(n,(o,i)=>{if(o[1]===i[1])return 0;if(o[1]<i[1])return-1;if(o[1]>i[1])return 1}));let r=new e(n[0]);return r.index=n[1],r.name=t.name,r}function ae(e){let t={};return t[e.name]={},e.index.forEach((n,r)=>{t[e.name][n]=e.values[r]}),t}var me=Symbol.for("@jrc03c/js-math-tools/series");function ue(e){class t{static[Symbol.hasInstance](r){try{return!!r._symbol&&r._symbol===me}catch{return!1}}constructor(r){if(this.name="data",Object.defineProperty(this,"_symbol",{configurable:!1,enumerable:!1,writable:!1,value:me}),Object.defineProperty(this,"_values",{value:[],configurable:!0,enumerable:!1,writable:!0}),Object.defineProperty(this,"values",{configurable:!0,enumerable:!0,get(){return this._values},set(o){s(l(o),"The new values must be a 1-dimensional array!");let i=b(o);s(i.length===1,"The new array of values must be 1-dimensional!"),i[0]<this._index.length?this._index=this._index.slice(0,i[0]):i[0]>this._index.length&&(this._index=this._index.concat(S(this._index.length,i[0]).map(a=>"item"+$(a,(o.length-1).toString().length)))),this._values=o}}),Object.defineProperty(this,"_index",{value:[],configurable:!0,enumerable:!1,writable:!0}),Object.defineProperty(this,"index",{configurable:!0,enumerable:!0,get(){return this._index},set(o){s(l(o),"The new index must be a 1-dimensional array of strings!"),s(o.length===this.shape[0],"The new index must be the same length as the old index!"),s(b(o).length===1,"The new index must be a 1-dimensional array of strings!"),o.forEach(i=>{s(w(i),"All of the row names must be strings!")}),this._index=o}}),r){if(r instanceof t)this.name=r.name,this.values=_(r.values),this.index=_(r.index);else if(l(r)){let o=b(r);s(o.length===1,"When passing an array into the constructor of a Series, the array must be 1-dimensional!"),this.values=r}else if(r instanceof Object){let o=Object.keys(r).concat(Object.getOwnPropertySymbols(r)).map(m=>m.toString());s(o.length===1,"When passing an object into the constructor of a Series, the object must have only 1 key-value pair, where the key is the name of the data and the value is the 1-dimensional array of values!");let i=o[0],a=r[i];s(b(a).length===1,"When passing an object into the constructor of a Series, the object must have only 1 key-value pair, where the key is the name of the data and the value is the 1-dimensional array of values!"),this.name=i,this.values=a.slice()}}}get shape(){return b(this.values)}get length(){return this.shape[0]}get isEmpty(){return this.values.filter(r=>!h(r)).length===0}clear(){let r=this.copy();return r.values.forEach((o,i)=>{r.values[i]=void 0}),r}get(r){return te(this,r)}getSubsetByNames(r){return re(t,this,r)}getSubsetByIndices(r){return ee(this,r)}loc(r){return this.getSubsetByNames(r)}iloc(r){return this.getSubsetByIndices(r)}reverse(){let r=new t(B(this.values));return r.index=B(this.index),r.name=this.name,r}resetIndex(){let r=this.copy();return r.index=S(0,this.shape[0]).map(o=>"item"+$(o,(r.index.length-1).toString().length)),r}copy(){let r=new t;return r._values=_(this.values),r._index=_(this.index),r.name=this.name,r}append(r){return wt(t,this,r)}apply(r){return Ht(this,r)}concat(r){return this.append(r)}dropMissing(r,o){return Xt(this,r,o)}dropNaN(){return Qt(t,this)}toObject(){return ae(this)}print(){return ne(this)}shuffle(){return oe(this)}sort(r){return ie(t,this,r)}sortByIndex(){return se(t,this)}filter(r){return Zt(t,this,r)}toDataFrame(){let r=new e(z([this.values]));return r.columns=[this.name],r.index=this.index,r}transpose(){let r=this.copy();return r.values=B(r.values),r.index=B(r.index),r}getDummies(){return this.toDataFrame().getDummies()}oneHotEncode(){return this.getDummies()}}return t}var fe=Symbol.for("@jrc03c/js-math-tools/dataframe");function pt(e){let t="abcdefghijklmnopqrstuvwxyz1234567890",n="";for(let r=0;r<e;r++)n+=t[Math.floor(Y()*t.length)];return n}var K=class e{static[Symbol.hasInstance](t){try{return!!t._symbol&&t._symbol===fe}catch{return!1}}constructor(t){if(Object.defineProperty(this,"_symbol",{configurable:!1,enumerable:!1,writable:!1,value:fe}),Object.defineProperty(this,"_values",{value:[],configurable:!0,enumerable:!1,writable:!0}),Object.defineProperty(this,"values",{configurable:!0,enumerable:!0,get(){return this._values.length===0||!h(this._values[0])&&this._values[0].length===0?[[]]:this._values},set(n){s(l(n),"The new values must be a 2-dimensional array!");let r=b(n);s(r.length===2,"The new array of values must be 2-dimensional!"),r[0]<this._index.length?this._index=this._index.slice(0,r[0]):r[0]>this._index.length&&(this._index=this._index.concat(S(this._index.length,r[0]).map(o=>"row"+$(o,(r[0]-1).toString().length)))),r[1]<this._columns.length?this._columns=this._columns.slice(0,r[1]):r[1]>this._columns.length&&(this._columns=this._columns.concat(S(this._columns.length,r[1]).map(o=>"col"+$(o,(r[1]-1).toString().length)))),this._values=n}}),Object.defineProperty(this,"_columns",{value:[],configurable:!0,enumerable:!1,writable:!0}),Object.defineProperty(this,"columns",{configurable:!0,enumerable:!0,get(){return this._columns},set(n){s(l(n),"The new columns list must be a 1-dimensional array of strings!"),s(this.isEmpty||n.length===this.shape[1],"The new columns list must be the same length as the old columns list!"),s(b(n).length===1,"The new columns list must be a 1-dimensional array of strings!"),n=n.map(o=>(typeof o!="string"&&(o=JSON.stringify(o)||o.toString()),o.trim().length===0?"untitled_"+pt(8):o.trim()));let r=(()=>{let o=nt(n),i={};return o.values.forEach(a=>{i[a]=o.get(a)}),i})();n=n.map(o=>r[o]>1?o+"_"+pt(8):o),this._columns=n}}),Object.defineProperty(this,"_index",{value:[],configurable:!0,enumerable:!1,writable:!0}),Object.defineProperty(this,"index",{configurable:!0,enumerable:!0,get(){return this._index},set(n){s(l(n),"The new index must be a 1-dimensional array of strings!"),s(this.isEmpty||n.length===this.shape[0],"The new index must be the same length as the old index!"),s(b(n).length===1,"The new index must be a 1-dimensional array of strings!"),n=n.map(o=>(typeof o!="string"&&(o=JSON.stringify(o)||o.toString()),o.trim().length===0?"untitled_"+pt(8):o.trim()));let r=(()=>{let o=nt(n),i={};return o.values.forEach(a=>{i[a]=o.get(a)}),i})();n=n.map(o=>r[o]>1?o+"_"+pt(8):o),this._index=n}}),s(h(t)||C(t)||l(t),"The `data` passed into the constructor of a DataFrame must be either (1) an object where the key-value pairs are (respectively) column names and 1-dimensional arrays of values, or (2) a 2-dimensional array of values."),t)if(t instanceof e)this.values=_(t.values),this.columns=_(t.columns),this.index=_(t.index);else if(l(t)){let n=b(t);s(n.length===2,"The `data` array passed into the constructor of a DataFrame must be 2-dimensional!"),s(!q(t),"The 2-dimensional array passed into the constructor of a DataFrame must not contain sub-arrays (i.e., rows) of different lengths!"),this.values=t}else{this._columns=Object.keys(t).concat(Object.getOwnPropertySymbols(t)).map(a=>a.toString());let n=[],r=null,o=null;this._columns.forEach(a=>{h(o)&&(r=a,o=t[a].length),s(t[a].length===o,`The object passed into the DataFrame constructor contains arrays of different lengths! The key "${r}" points to an array containing ${o} items, and the key "${a}" points to an array containing ${t[a].length} items.`),o=t[a].length;let m=t[a];n.push(m)}),this._values=z(n);let i=b(this.values);this._index=S(0,i[0]).map(a=>"row"+$(a,(i[0]-1).toString().length))}}get shape(){return b(this.values)}get length(){return this.shape[0]}get width(){return this.shape[1]}get rows(){return this.index}set rows(t){this.index=t}get isEmpty(){return this.values.length===0||this.values.every(t=>t.length===0)}clear(){let t=new e(A(this.shape));return t.columns=this.columns.slice(),t.index=this.index.slice(),t}get(t,n){if(arguments.length===0)return this;if(arguments.length===1)try{return this.get(null,t)}catch{return this.get(t,null)}return Pt(this,t,n)}getSubsetByNames(t,n){return Ct(e,E,this,t,n)}getSubsetByIndices(t,n){return zt(this,t,n)}getDummies(t){return vt(e,this,t)}oneHotEncode(t){return vt(e,this,t)}transpose(){let t=new e(z(this.values));return t.columns=this.index.slice(),t.index=this.columns.slice(),t}get T(){return this.transpose()}resetIndex(t){return Jt(this,t)}copy(){return At(e,this)}assign(t,n){return Ft(e,E,this,t,n)}apply(t,n){return xt(e,E,this,t,n)}dropMissing(t,n,r){return Et(e,E,this,t,n,r)}dropNaN(t,n,r){return Mt(e,this,t,n,r)}drop(t,n){return jt(e,E,this,t,n)}dropColumns(t){return this.drop(null,t)}dropRows(t){return this.drop(t,null)}toDetailedObject(t){return Vt(this,t)}toObject(){return Wt(this)}toJSONString(t){return lt(this,t)}saveAsJSON(t,n){return Gt(this,t,n)}print(){return kt(e,E,this)}sort(t,n){return qt(this,t,n)}sortByIndex(){return this.sort()}filter(t,n){return Ut(e,E,this,t,n)}shuffle(t){return Lt(this,t)}append(t,n){return Nt(this,t,n)}concat(t,n){return this.append(t,n)}join(t,n){return this.append(t,n)}toString(){return JSON.stringify(this)}},E=ue(K);function it(e,t){return j(e,{shouldDropNaNs:t}).max}function N(e){return s(O(e),"You must pass a function into the `vectorize` function!"),function t(){let n,r,o=[],i=[],a=Object.keys(arguments).filter(m=>{let u=arguments[m];return l(u)?!0:g(u)?(n=!0,o.push(u),!0):y(u)?(r=!0,i.push(u),!0):!1}).map(m=>arguments[m]);if(a.slice(0,-1).forEach((m,u)=>{s(P(l(m)?b(m):m.shape,l(a[u+1])?b(a[u+1]):a[u+1].shape),`When passing multiple arrays into the \`${e.name}\` function, all of the arrays must have the same shape!`)}),a.length>0){let m=it(a.map(p=>p.length?p.length:p.values.length)),u=S(0,m).map(p=>{let c=Object.keys(arguments).map(d=>l(arguments[d])?arguments[d][p]:g(arguments[d])||y(arguments[d])?arguments[d].values[p]:arguments[d]);return t(...c)});if(r)try{if(i.length===1&&P(b(i[0]),b(u))){let p=new K(u);return p.index=i[0].index.slice(),p.columns=i[0].columns.slice(),p}else return new K(u)}catch{return u}if(n)try{if(o.length===1&&o[0].length===u.length){let p=new E(u);return p.name=o[0].name,p.index=o[0].index.slice(),p}else return new E(u)}catch{return u}return u}else return e(...arguments)}}function ke(e){try{return f(e)?typeof e=="bigint"?e<0?-e:e:Math.abs(e):NaN}catch{return NaN}}var ct=N(ke);function Je(){try{let e=0,t=!1,n=Object.values(arguments);for(let r of n){if(!f(r))return NaN;typeof r=="bigint"&&(t=!0,r=Number(r)),e+=r}if(t)try{return BigInt(e)}catch{}return e}catch{return NaN}}var St=N(Je);function Re(e,t){try{return t(e)}catch{return NaN}}var ht=N(Re);function Ye(e){try{return f(e)?(typeof e=="bigint"&&(e=Number(e)),Math.acos(e)):NaN}catch{return NaN}}var Ke=N(Ye);function $e(e){try{return f(e)?(typeof e=="bigint"&&(e=Number(e)),Math.asin(e)):NaN}catch{return NaN}}var Le=N($e);function qe(e){try{return f(e)?(typeof e=="bigint"&&(e=Number(e)),Math.atan(e)):NaN}catch{return NaN}}var Ve=N(qe);function We(e){try{return f(e)?typeof e=="bigint"?e:Math.ceil(e):NaN}catch{return NaN}}var He=N(We);function Xe(e,t){try{if(!f(e))return NaN;if(typeof e=="bigint")return e;if(h(t))t=1e-10;else if(!f(t))return NaN;return ct(e)<t?0:e}catch{return NaN}}var Qe=N(Xe);function Ot(e){if(y(e)||g(e)){let t=e.copy();return t.values=Ot(t.values),t}if(l(e))return e.map(t=>Ot(t));try{let t=JSON.parse(e);return f(t)?typeof t=="bigint"?Number(t):t>=0?Math.floor(t):Math.ceil(t):NaN}catch{return NaN}}var M=N(Ot);function le(e,t,n){try{return f(e)?f(t)?f(n)?typeof e=="bigint"?BigInt(le(M(e),t,n)):e<t?t:e>n?n:e:NaN:NaN:NaN}catch{return NaN}}var Ze=N(le);function nr(e){try{return f(e)?(typeof e=="bigint"&&(e=Number(e)),Math.cos(e)):NaN}catch{return NaN}}var or=N(nr);var ir=Object.freeze({boolean:"boolean",date:"date",null:"null",number:"number",object:"object",string:"string"});function pe(e,t){try{if(!f(e))return NaN;if(!f(t))return NaN;if(typeof e=="bigint"||typeof t=="bigint"){let n=pe(Number(e),Number(t));try{return BigInt(n)}catch{return n}}return Math.pow(e,t)}catch{return NaN}}var Tt=N(pe);function ce(e){try{if(!f(e))return NaN;if(typeof e=="bigint"){let t=ce(Number(e));try{return BigInt(t)}catch{return t}}return Math.sqrt(e)}catch{return NaN}}var he=N(ce);function sr(){try{let e=Object.values(arguments);if(e.length===0)return NaN;let t=!1,n=1;for(let r of e){if(!f(r))return NaN;typeof r=="bigint"&&(t=!0,r=Number(r)),n*=r}if(t)try{return BigInt(n)}catch{}return n}catch{return NaN}}var de=N(sr);function ur(e){try{if(!f(e))return NaN;if(typeof e=="bigint"){if(e===0n)return 1n;e=Number(e)}return Math.exp(e)}catch{return NaN}}var fr=N(ur);function Dt(e){try{return typeof e=="bigint"?BigInt(Dt(M(e))):e!==M(e)?NaN:e<=1?1:e*Dt(e-1)}catch{return NaN}}var lr=N(Dt);function pr(e){try{if(e==="Infinity")return 1/0;if(e==="-Infinity")return-1/0;let t=JSON.parse(e);return f(t)?t:NaN}catch{return NaN}}var cr=N(pr);function hr(e){try{return f(e)?typeof e=="bigint"?e:Math.floor(e):NaN}catch{return NaN}}var dr=N(hr);function be(e,t,n){try{if(!f(e))return NaN;if(!f(t))return NaN;if(!f(n))return NaN;if(typeof e=="bigint"||typeof t=="bigint"){let r=be(Number(e),Number(t),n);try{return BigInt(r)}catch{return r}}return n*(t-e)+e}catch{return NaN}}var Nr=N(be);function Ne(e,t){try{if(t=h(t)?Math.E:t,!f(e))return NaN;if(!f(t))return NaN;if(typeof e=="bigint"||typeof t=="bigint"){let n=Ne(Number(e),Number(t));try{return BigInt(n)}catch{return n}}return Math.log(e)/Math.log(t)}catch{return NaN}}var vr=N(Ne);function ve(e,t){try{if(!f(e))return NaN;if(!f(t))return NaN;if(typeof e=="bigint"||typeof t=="bigint"){let n=ve(Number(e),Number(t));try{return BigInt(n)}catch{return n}}return e%t}catch{return NaN}}var wr=N(ve);var ld=N((e,t,n,r,o)=>{try{let i=!1;for(let p of[e,t,n,r,o]){if(!f(p))return NaN;typeof p=="bigint"&&(i=!0)}i&&(e=Number(e),t=Number(t),n=Number(n),r=Number(r),o=Number(o));let a=(o-r)*(e-t),m=n-t;if(m===0)return NaN;let u=a/m+r;if(i)try{return BigInt(u)}catch{}return u}catch{return NaN}});function Or(e){try{return f(e)?typeof e=="bigint"?e:Math.round(e):NaN}catch{return NaN}}var Tr=N(Or);function we(e){try{return f(e)?typeof e=="bigint"?BigInt(we(Number(e))):e<0?-1:e>0?1:0:NaN}catch{return NaN}}var Dr=N(we);function _r(e){try{return f(e)?(typeof e=="bigint"&&(e=Number(e)),Math.sin(e)):NaN}catch{return NaN}}var Ir=N(_r);function Fr(e){try{return f(e)?(typeof e=="bigint"&&(e=Number(e)),Math.tan(e)):NaN}catch{return NaN}}var Ar=N(Fr);function Se(e,t,n){arguments.length===2&&(f(arguments[1])?n=null:(n=t,t=null)),s(f(e)&&M(e)===e,"`keyLength` must be an integer!"),t&&(s(f(t)&&M(t)===t,"`keySeed` must be an integer!"),ft(t)),n&&s(w(n),"`charset` must be a string!");let r="";n=n||"abcdefg1234567890";for(let o=0;o<e;o++)r+=n[M(Y()*n.length)];return r}typeof globalThis<"u"&&(globalThis.makeKey=Se);})();
package/package.json CHANGED
@@ -4,12 +4,12 @@
4
4
  "key": "./bin.mjs"
5
5
  },
6
6
  "dependencies": {
7
- "@jrc03c/js-math-tools": "^0.0.87"
7
+ "@jrc03c/js-math-tools": "^0.0.92"
8
8
  },
9
9
  "description": "",
10
10
  "devDependencies": {
11
11
  "@jrc03c/fake-jest": "^0.0.16",
12
- "esbuild": "^0.17.11",
12
+ "esbuild": "^0.25.0",
13
13
  "eslint": "^8.36.0"
14
14
  },
15
15
  "keywords": [],
@@ -18,5 +18,5 @@
18
18
  "module": "./src/index.mjs",
19
19
  "name": "@jrc03c/make-key",
20
20
  "type": "module",
21
- "version": "0.0.34"
21
+ "version": "0.0.36"
22
22
  }