Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@jonahsnider/util

Package Overview
Dependencies
Maintainers
1
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jonahsnider/util - npm Package Compare versions

Comparing version 8.11.0 to 8.12.0

2

dist/index.dev.js

@@ -1,2 +0,2 @@

var t,e;t=this,e=function(t){"use strict";class e{constructor(t,e){if(this.lower=t,this.upper=e,t>e)throw new RangeError("lower must be less than upper")}static from(t){const[n,r]=t;return new e(n,r)}has(t){return t>=this.lower&&t<=this.upper}*[Symbol.iterator](){yield this.lower,yield this.upper}isSuperrange(t){return t===this||this.lower>=t.lower&&this.upper<=t.upper}isSubrange(t){return t===this||this.lower<=t.lower&&this.upper>=t.upper}equals(t){return t===this||this.lower===t.lower&&this.upper===t.upper}intersects(t){return t===this||this.lower<=t.upper&&this.upper>=t.lower}}const n=Object.freeze(new e(100,200)),r=Object.freeze(new e(200,300)),i=Object.freeze(new e(300,400)),o=Object.freeze(new e(400,500)),u=Object.freeze(new e(500,600));var a,s,c=Object.freeze({__proto__:null,informational:n,success:r,redirects:i,clientErrors:o,serverErrors:u});!function(t){t[t.Continue=100]="Continue",t[t.SwitchingProtocols=101]="SwitchingProtocols",t[t.EarlyHints=103]="EarlyHints",t[t.Ok=200]="Ok",t[t.Created=201]="Created",t[t.Accepted=202]="Accepted",t[t.NonAuthoritativeInformation=203]="NonAuthoritativeInformation",t[t.NoContent=204]="NoContent",t[t.ResetContent=205]="ResetContent",t[t.PartialContent=206]="PartialContent",t[t.MultipleChoices=300]="MultipleChoices",t[t.MovedPermanently=301]="MovedPermanently",t[t.Found=302]="Found",t[t.SeeOther=303]="SeeOther",t[t.NotModified=304]="NotModified",t[t.TemporaryRedirect=307]="TemporaryRedirect",t[t.PermanentRedirect=308]="PermanentRedirect",t[t.BadRequest=400]="BadRequest",t[t.Unauthorized=401]="Unauthorized",t[t.PaymentRequired=402]="PaymentRequired",t[t.Forbidden=403]="Forbidden",t[t.NotFound=404]="NotFound",t[t.MethodNotAllowed=405]="MethodNotAllowed",t[t.NotAcceptable=406]="NotAcceptable",t[t.ProxyAuthenticationRequired=407]="ProxyAuthenticationRequired",t[t.RequestTimeout=408]="RequestTimeout",t[t.Conflict=409]="Conflict",t[t.Gone=410]="Gone",t[t.LengthRequired=411]="LengthRequired",t[t.PreconditionFailed=412]="PreconditionFailed",t[t.PayloadTooLarge=413]="PayloadTooLarge",t[t.UriTooLong=414]="UriTooLong",t[t.UnsupportedMediaType=415]="UnsupportedMediaType",t[t.RangeNotSatisfiable=416]="RangeNotSatisfiable",t[t.ExpectationFailed=417]="ExpectationFailed",t[t.ImATeapot=418]="ImATeapot",t[t.UnprocessableEntity=422]="UnprocessableEntity",t[t.TooEarly=425]="TooEarly",t[t.UpgradeRequired=426]="UpgradeRequired",t[t.PreconditionRequired=428]="PreconditionRequired",t[t.TooManyRequests=429]="TooManyRequests",t[t.RequestHeaderFieldsTooLarge=431]="RequestHeaderFieldsTooLarge",t[t.UnavailableForLegalReasons=451]="UnavailableForLegalReasons",t[t.InternalServerError=500]="InternalServerError",t[t.NotImplemented=501]="NotImplemented",t[t.BadGateway=502]="BadGateway",t[t.ServiceUnavailable=503]="ServiceUnavailable",t[t.GatewayTimeout=504]="GatewayTimeout",t[t.HttpVersionNotSupported=505]="HttpVersionNotSupported",t[t.VariantAlsoNegotiates=506]="VariantAlsoNegotiates",t[t.InsufficientStorage=507]="InsufficientStorage",t[t.LoopDetected=508]="LoopDetected",t[t.NotExtended=510]="NotExtended",t[t.NetworkAuthenticationRequired=511]="NetworkAuthenticationRequired"}(a||(a={})),function(t){t.Get="GET",t.Head="HEAD",t.Post="POST",t.Put="PUT",t.Delete="DELETE",t.Connect="CONNECT",t.Options="OPTIONS",t.Trace="TRACE",t.Patch="PATCH"}(s||(s={}));var f,l,d=Object.freeze({__proto__:null,StatusRange:c,get Status(){return a},get Method(){return s}});function h(t,e){return Array.from({length:e},((e,n)=>t(n)))}function p(t,e){let n=-1;for(let r=t.length-1;r>=0&&t[r]===e;r--)n=r;return n}function S(t,e){const n=[];for(let r=0;r<t.length;r++)t[r]===e&&n.push(r);return n}function m(t,e){let n;if("size"in t?n="size":"length"in t&&(n="length"),!n)throw new RangeError("Expected a to have a size property or a length property");return t[n]<e[n]?[e,t]:[t,e]}function*k(...t){for(const e of t)yield*e}function g(t){const e=new Map;for(const n of t){const t=(e.get(n)??0)+1;e.set(n,t)}return e}function R(t,e){let n=-1;for(const r of t){if(r!==e)break;n++}return n}function*b(t,e){for(let n=0;n<e;n++)yield t}t.Rank=void 0,(f=t.Rank||(t.Rank={}))[f.Ace=1]="Ace",f[f.Two=2]="Two",f[f.Three=3]="Three",f[f.Four=4]="Four",f[f.Five=5]="Five",f[f.Six=6]="Six",f[f.Seven=7]="Seven",f[f.Eight=8]="Eight",f[f.Nine=9]="Nine",f[f.Ten=10]="Ten",f[f.Jack=11]="Jack",f[f.Queen=12]="Queen",f[f.King=13]="King",t.Suit=void 0,(l=t.Suit||(t.Suit={}))[l.Clubs=0]="Clubs",l[l.Diamonds=1]="Diamonds",l[l.Hearts=2]="Hearts",l[l.Spades=3]="Spades";const w=[{rank:t.Rank.Ace,suit:t.Suit.Clubs},{rank:t.Rank.Two,suit:t.Suit.Clubs},{rank:t.Rank.Three,suit:t.Suit.Clubs},{rank:t.Rank.Four,suit:t.Suit.Clubs},{rank:t.Rank.Five,suit:t.Suit.Clubs},{rank:t.Rank.Six,suit:t.Suit.Clubs},{rank:t.Rank.Seven,suit:t.Suit.Clubs},{rank:t.Rank.Eight,suit:t.Suit.Clubs},{rank:t.Rank.Nine,suit:t.Suit.Clubs},{rank:t.Rank.Ten,suit:t.Suit.Clubs},{rank:t.Rank.Jack,suit:t.Suit.Clubs},{rank:t.Rank.Queen,suit:t.Suit.Clubs},{rank:t.Rank.King,suit:t.Suit.Clubs},{rank:t.Rank.Ace,suit:t.Suit.Diamonds},{rank:t.Rank.Two,suit:t.Suit.Diamonds},{rank:t.Rank.Three,suit:t.Suit.Diamonds},{rank:t.Rank.Four,suit:t.Suit.Diamonds},{rank:t.Rank.Five,suit:t.Suit.Diamonds},{rank:t.Rank.Six,suit:t.Suit.Diamonds},{rank:t.Rank.Seven,suit:t.Suit.Diamonds},{rank:t.Rank.Eight,suit:t.Suit.Diamonds},{rank:t.Rank.Nine,suit:t.Suit.Diamonds},{rank:t.Rank.Ten,suit:t.Suit.Diamonds},{rank:t.Rank.Jack,suit:t.Suit.Diamonds},{rank:t.Rank.Queen,suit:t.Suit.Diamonds},{rank:t.Rank.King,suit:t.Suit.Diamonds},{rank:t.Rank.Ace,suit:t.Suit.Hearts},{rank:t.Rank.Two,suit:t.Suit.Hearts},{rank:t.Rank.Three,suit:t.Suit.Hearts},{rank:t.Rank.Four,suit:t.Suit.Hearts},{rank:t.Rank.Five,suit:t.Suit.Hearts},{rank:t.Rank.Six,suit:t.Suit.Hearts},{rank:t.Rank.Seven,suit:t.Suit.Hearts},{rank:t.Rank.Eight,suit:t.Suit.Hearts},{rank:t.Rank.Nine,suit:t.Suit.Hearts},{rank:t.Rank.Ten,suit:t.Suit.Hearts},{rank:t.Rank.Jack,suit:t.Suit.Hearts},{rank:t.Rank.Queen,suit:t.Suit.Hearts},{rank:t.Rank.King,suit:t.Suit.Hearts},{rank:t.Rank.Ace,suit:t.Suit.Spades},{rank:t.Rank.Two,suit:t.Suit.Spades},{rank:t.Rank.Three,suit:t.Suit.Spades},{rank:t.Rank.Four,suit:t.Suit.Spades},{rank:t.Rank.Five,suit:t.Suit.Spades},{rank:t.Rank.Six,suit:t.Suit.Spades},{rank:t.Rank.Seven,suit:t.Suit.Spades},{rank:t.Rank.Eight,suit:t.Suit.Spades},{rank:t.Rank.Nine,suit:t.Suit.Spades},{rank:t.Rank.Ten,suit:t.Suit.Spades},{rank:t.Rank.Jack,suit:t.Suit.Spades},{rank:t.Rank.Queen,suit:t.Suit.Spades},{rank:t.Rank.King,suit:t.Suit.Spades}],y=new WeakMap;function T(t){const e=t[0].map((t=>t.length));for(const n of t)for(const[t,{length:r}]of n.entries())e[t]<r&&(e[t]=r);return e}function v(t,e){if(Array.isArray(t)&&Array.isArray(e))return function(t,e){return t===e||t.length===e.length&&t.every(((t,n)=>t===e[n]))}(t,e);if(t instanceof Set&&e instanceof Set)return function(t,e){if(t===e)return!0;if(t.size!==e.size)return!1;for(const n of t)if(!e.has(n))return!1;return!0}(t,e);if(t instanceof Map&&e instanceof Map)return function(t,e){if(t===e)return!0;if(t.size!==e.size)return!1;for(const[n,r]of t.entries())if(!e.has(n)||e.get(n)!==r)return!1;return!0}(t,e);throw new RangeError("Expected both parameters to be an array, Set, or Map")}class E extends Map{constructor(t,e){super(e),this.defaultValueOrDefaultValueFn=t,this.defaultValueIsFunction="function"==typeof t}get(t){return this.has(t)?super.get(t):this.defaultValueIsFunction?this.defaultValueOrDefaultValueFn(t):this.defaultValueOrDefaultValueFn}}function x(t,e,n){if(e>n)throw new RangeError("min exceeded max");return t<e?e:t>n?n:t}function M(t,e){return t*e}function A(t,e){return t+e}function N(t){const e=t.reduce(A);return e/("bigint"==typeof e?BigInt(t.length):t.length)}function C(t,e,n){return 1/(2.5066282746310002*e)*Math.E**(-.5*(t-n/e)**2)}function F(t,e){if(t>e)throw new RangeError("min exceeded max");return Math.random()*(e-t)+t}function O(t,e=N(t)){return t.map((t=>(t-e)**2)).reduce(A)/(t.length-1)}function P(t,e=N(t)){return Math.sqrt(O(t,e))}const D=Symbol("delayResolvedValue");var q=Object.freeze({__proto__:null,and:function(t,e){return t&e},or:function(t,e){return t|e},xor:function(t,e){return t^e}});function H(t,e){return t<e?-1:t>e?1:0}function z(t,e){return t<e?1:t>e?-1:0}var j=Object.freeze({__proto__:null,ascending:function(t,e){return e===undefined&&"function"==typeof t?(e,n)=>H(t(e),t(n)):H(t,e)},descending:function(t,e){return e===undefined&&"function"==typeof t?(e,n)=>z(t(e),t(n)):z(t,e)}});const _=/\S/;t.AutoPercentage=class{constructor(){this._count=0}percentage(){return this._count++,{[Symbol.toPrimitive]:()=>1/this._count}}count(){return this._count++,{[Symbol.toPrimitive]:()=>this._count}}},t.Bitwise=q,t.DefaultMap=E,t.Http=d,t.MathMap=class extends E{add(t,e){const n=this.get(t)+e;return this.set(t,n),n}subtract(t,e){const n=this.get(t)-e;return this.set(t,n),n}multiply(t,e){const n=this.get(t)*e;return this.set(t,n),n}divide(t,e){const n=this.get(t)/e;return this.set(t,n),n}pow(t,e){const n=this.get(t)**e;return this.set(t,n),n}sqrt(t){const e=Math.sqrt(this.get(t));return this.set(t,e),e}root(t,e){if(2===e)return this.sqrt(t);const n=this.get(t)**(1/e);return this.set(t,n),n}},t.Range=e,t.Sort=j,t.Stopwatch=class{static start(){const t=new this;return t.start(),t}get started(){return this.startTime!==undefined}start(){this.startTime=process.hrtime.bigint()}end(){if(this.startTime===undefined)throw Error("This timer was not started");return Number(process.hrtime.bigint()-this.startTime)/1e6}},t.allDuplicates=function(t){const e=new Set,n=[];for(const r of t)e.has(r)?n.push(r):e.add(r);return n},t.binarySearch=function(t,e){let n=0,r=t.length-1;for(;n<=r;){const i=Math.trunc((n+r)/2),o=e(t[i]);if(o<0)n=i+1;else{if(!(o>0))return t[i];r=i-1}}return undefined},t.capitalize=function(t){const e=t.charAt(0).toUpperCase();return`${e}${t.slice(e.length)}`},t.chunk=function(t,e){return t.length===e?t.map((t=>[t])):h((n=>t.slice(n*e,n*e+e)),Math.ceil(t.length/e))},t.clamp=x,t.combineIterables=k,t.count=function(t,e){let n=0;if(e)for(const r of t)e(r)&&n++;else for(const e of t)n++;return n},t.cycle=function*(t,e){for(let n=0;n<e;n++)yield*t},t.difference=function(t,e){if(t===e)return new Set;const n=new Set(t);for(const t of e)n["delete"](t);return n},t.duplicates=function(t){const e=new Set,n=new Set;for(const r of t)e.has(r)?n.add(r):e.add(r);return n},t.enumHas=function(t,e){return y.has(t)||y.set(t,new Set(Object.values(t))),y.get(t).has(e)},t.every=function(t,e){for(const n of t)if(!e(n))return!1;return!0},t.fill=function(t,e){return Array.from({length:e},(()=>t))},t.find=function(t,e){for(const n of t)if(e(n))return n;return undefined},t.findIndexAll=function(t,e){const n=[];for(let r=0;r<t.length;r++)e(t[r],r)&&n.push(r);return n},t.first=function(t,e){if(e===undefined){for(const e of t)return e;return undefined}return function*(t,e){for(const n of t){if(!e--)break;yield n}}(t,e)},t.firstIndexOfLastGroup=p,t.formatTable=function(t,e=" "){const n=T(t);return t.map((t=>t.map(((t,e)=>t.padEnd(n[e]))).join(e))).join("\n")},t.frequencyTable=g,t.geometricMean=function(t){return t.reduce(M)**(1/t.length)},t.harmonicMean=function(t){return t.length/t.reduce(((t,e)=>t+1/e),0)},t.holes=function(t){const e=[];for(let n=0;n<t.length;n++)n in t||e.push(n);return e},t.identical=v,t.includes=function(t,e){for(const n of t)if(n===e)return!0;return!1},t.indexOfAll=S,t.intersection=function(t,e){if(t===e)return new Set(t);const n=new Set,[r,i]=m(t,e);for(const t of r)i.has(t)&&n.add(t);return n},t.invert=function(t){return(...e)=>-t(...e)},t.isAnagram=function(t,e){return t===e||t.length===e.length&&v(g(t),g(e))},t.isDisjoint=function(t,e){if(t===e)return!1;const n=t instanceof Set?t:new Set(t);for(const t of e)if(n.has(t))return!1;return!0},t.isEmpty=function(t){for(const e of t)return!1;return!0},t.isSorted=function(t,e){for(let n=0;n<t.length-1;n++)if(e(t[n],t[n+1])>0)return!1;return!0},t.isSubset=function(t,e){if(t===e)return!0;for(const n of t)if(!e.has(n))return!1;return!0},t.isSuperset=function(t,e){if(t===e)return!0;for(const n of e)if(!t.has(n))return!1;return!0},t.isWhitespace=function(t){return!_.test(t)},t.iteratorToIterable=function(t){return{[Symbol.iterator]:()=>t}},t.jaccardIndex=function(t,e){if(0===t.size&&0===e.size)return 1;let n=0;const[r,i]=m(t,e);for(const t of r)i.has(t)&&n++;return x(n/(t.size+e.size-n),0,1)},t.join=function(t,e=","){let n="";const r=t[Symbol.iterator]();let i=r.next();for(;;){const t=i;if(i=r.next(),n+=t.value,i.done)return n;n+=e}},t.largeToSmall=m,t.lastIndexOfFirstGroup=R,t.lines=function(t){return t.split("\n").map((t=>t.trim())).filter((t=>t.length>0))},t.mapFill=h,t.mapRepeat=function*(t,e){for(let n=0;n<e;n++)yield t(n)},t.max=function(t,e){return e>t?e:t},t.maxColumnLength=T,t.mean=N,t.median=function(t){const e=t.length%2==0,n=t.length/2;if(e){const e="bigint"==typeof t[0]?2n:2;return(t[n-1]+t[n])/e}return t[Math.floor(n)]},t.min=function(t,e){return e<t?e:t},t.mode=function(t){const e=new Map;let n=0,r=[];for(const i of t){const t=e.get(i),o=t===undefined?1:t+1;e.set(i,o),o>n?(n=o,r=[i]):o===n&&r.push(i)}return r},t.multiReplace=function(t,e){const n=Object.entries(e);let r="",i=0;for(;i<t.length;)t:{for(const[e,o]of n)if(t.slice(i).startsWith(e)){r+=o,i+=e.length;break t}r+=t[i++]}return r},t.name=function I(t,e){return e?`${I(t)}${e.name in t?".":"#"}${e.name}`:t.name},t.newDeck=function(){return[...w]},t.normaldist=C,t.not=function(t){return(...e)=>!t(...e)},t.nullish=function(t){return null===t||t===undefined},t.overwrite=function(t,e,n){return t.splice(e,e+n.length-1,...n)},t.padEnd=function(t,e,n){t.push(...b(n,e-t.length))},t.padStart=function(t,e,n){t.unshift(...b(n,e-t.length))},t.partition=function(t,e){const n=[],r=[];let i=0;for(const o of t)(e(o,i++)?n:r).push(o);return[n,r]},t.pick=function(t,e){return Object.fromEntries(e.map((e=>[e,t[e]])))},t.product=M,t.pull=function(t,e){const n=t.indexOf(e);return-1===n?[]:t.splice(n,1)},t.pullAll=function(t,e){const n=S(t,e);n.reverse();const r=[];for(const e of n)r.push(t.splice(e,1)[0]);return r},t.random=F,t.randomInt=function(t,e){if(t>e)throw new RangeError("min exceeded max");return Math.floor(F(Math.ceil(t),Math.floor(e)))},t.regExpUnion=function(...t){return RegExp(t.map((t=>`(${t.source})`)).join("|"))},t.relativeStddev=function(t,e=N(t)){return P(t,e)/e},t.rename=function(t,e,n){if(e===n)return{...t};const{[e]:r,...i}={...t,[n]:t[e]};return i},t.repeat=b,t.replace=function(t,e,n){const r=t.indexOf(e);return-1!==r&&(t[r]=n),r},t.replaceAll=function(t,e,n){let r=0;for(let i=0;i<t.length;i++)t[i]===e&&(t[i]=n,r++);return r},t.same=function(...t){const e=t.map((t=>t[Symbol.iterator]()));for(;;){const t=e.map((t=>t.next())),[{done:n,value:r}]=t;for(const e of t){if(e.done)return t.every((t=>t.done===n));if(e.value!==r)return!1}}},t.sample=function(t){return t[Math.floor(Math.random()*t.length)]},t.settled=async function(t){try{return[await t,undefined]}catch(e){return[undefined,e]}},t.shuffle=function(t,e=!0){const n=e?t:[...t];for(let t=n.length-1;t>0;t--){const e=Math.floor(Math.random()*(t+1));[n[t],n[e]]=[n[e],n[t]]}if(!e)return n},t.skip=function(t,e){const n=t[Symbol.iterator]();for(let t=0;t<e&&!n.next().done;t++);return n},t.some=function(t,e){for(const n of t)if(e(n))return!0;return!1},t.sortObject=function(t,e){return Object.entries(t).sort((([,t],[,n])=>e(t,n)))},t.standardNormaldist=function(t){return C(t,1,0)},t.stddev=P,t.sum=A,t.symmetricDifference=function(t,e){if(t===e)return new Set;const n=new Set(t);for(const t of e)n.has(t)?n["delete"](t):n.add(t);return n},t.thunkify=function(t){let e,n=!1;return(...r)=>(n||(n=!0,e=t(...r)),e)},t.timeout=async function(t,e){const[n,r]=function(t){let e;const n=new Promise((n=>{e=setTimeout((()=>{n(D)}),t)}));return[e,n]}(e),i=await Promise.race([t,r])["finally"]((()=>{clearTimeout(n)}));if(i===D)throw Error("Timed out");return i},t.toDigits=function(t,e){const n=10**e;return Math.round(t*n*(1+Number.EPSILON))/n},t.triangularNumber=function(t){if(t<0)throw new RangeError("Value must be greater than or equal to 0");return"bigint"==typeof t?t*(t+1n)/2n:t*(t+1)/2},t.trimEnd=function(t,e){const n=p(t,e);return-1===n?"string"==typeof t?t:[...t]:t.slice(0,n)},t.trimStart=function(t,e){const n=R(t,e);return-1===n?"string"==typeof t?t:[...t]:t.slice(n+1)},t.truncate=function(t,e,n=""){return t.length>e?`${t.slice(0,e)}${n}`:t},t.uncapitalize=function(t){const e=t.charAt(0).toLowerCase();return`${e}${t.slice(e.length)}`},t.union=function(t,e){return t===e?new Set(t):new Set(k(t,e))},t.variance=O,Object.defineProperty(t,"__esModule",{value:!0})},"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).jonahsniderUtil={});
var t,e;t=this,e=function(t){"use strict";class e{constructor(t,e){if(this.lower=t,this.upper=e,t>e)throw new RangeError("lower must be less than upper")}static from(t){const[n,r]=t;return new e(n,r)}has(t){return t>=this.lower&&t<=this.upper}*[Symbol.iterator](){yield this.lower,yield this.upper}isSuperrange(t){return t===this||this.lower>=t.lower&&this.upper<=t.upper}isSubrange(t){return t===this||this.lower<=t.lower&&this.upper>=t.upper}equals(t){return t===this||this.lower===t.lower&&this.upper===t.upper}intersects(t){return t===this||this.lower<=t.upper&&this.upper>=t.lower}}const n=Object.freeze(new e(100,200)),r=Object.freeze(new e(200,300)),i=Object.freeze(new e(300,400)),o=Object.freeze(new e(400,500)),u=Object.freeze(new e(500,600));var a,s,c=Object.freeze({__proto__:null,informational:n,success:r,redirects:i,clientErrors:o,serverErrors:u});!function(t){t[t.Continue=100]="Continue",t[t.SwitchingProtocols=101]="SwitchingProtocols",t[t.EarlyHints=103]="EarlyHints",t[t.Ok=200]="Ok",t[t.Created=201]="Created",t[t.Accepted=202]="Accepted",t[t.NonAuthoritativeInformation=203]="NonAuthoritativeInformation",t[t.NoContent=204]="NoContent",t[t.ResetContent=205]="ResetContent",t[t.PartialContent=206]="PartialContent",t[t.MultipleChoices=300]="MultipleChoices",t[t.MovedPermanently=301]="MovedPermanently",t[t.Found=302]="Found",t[t.SeeOther=303]="SeeOther",t[t.NotModified=304]="NotModified",t[t.TemporaryRedirect=307]="TemporaryRedirect",t[t.PermanentRedirect=308]="PermanentRedirect",t[t.BadRequest=400]="BadRequest",t[t.Unauthorized=401]="Unauthorized",t[t.PaymentRequired=402]="PaymentRequired",t[t.Forbidden=403]="Forbidden",t[t.NotFound=404]="NotFound",t[t.MethodNotAllowed=405]="MethodNotAllowed",t[t.NotAcceptable=406]="NotAcceptable",t[t.ProxyAuthenticationRequired=407]="ProxyAuthenticationRequired",t[t.RequestTimeout=408]="RequestTimeout",t[t.Conflict=409]="Conflict",t[t.Gone=410]="Gone",t[t.LengthRequired=411]="LengthRequired",t[t.PreconditionFailed=412]="PreconditionFailed",t[t.PayloadTooLarge=413]="PayloadTooLarge",t[t.UriTooLong=414]="UriTooLong",t[t.UnsupportedMediaType=415]="UnsupportedMediaType",t[t.RangeNotSatisfiable=416]="RangeNotSatisfiable",t[t.ExpectationFailed=417]="ExpectationFailed",t[t.ImATeapot=418]="ImATeapot",t[t.UnprocessableEntity=422]="UnprocessableEntity",t[t.TooEarly=425]="TooEarly",t[t.UpgradeRequired=426]="UpgradeRequired",t[t.PreconditionRequired=428]="PreconditionRequired",t[t.TooManyRequests=429]="TooManyRequests",t[t.RequestHeaderFieldsTooLarge=431]="RequestHeaderFieldsTooLarge",t[t.UnavailableForLegalReasons=451]="UnavailableForLegalReasons",t[t.InternalServerError=500]="InternalServerError",t[t.NotImplemented=501]="NotImplemented",t[t.BadGateway=502]="BadGateway",t[t.ServiceUnavailable=503]="ServiceUnavailable",t[t.GatewayTimeout=504]="GatewayTimeout",t[t.HttpVersionNotSupported=505]="HttpVersionNotSupported",t[t.VariantAlsoNegotiates=506]="VariantAlsoNegotiates",t[t.InsufficientStorage=507]="InsufficientStorage",t[t.LoopDetected=508]="LoopDetected",t[t.NotExtended=510]="NotExtended",t[t.NetworkAuthenticationRequired=511]="NetworkAuthenticationRequired"}(a||(a={})),function(t){t.Get="GET",t.Head="HEAD",t.Post="POST",t.Put="PUT",t.Delete="DELETE",t.Connect="CONNECT",t.Options="OPTIONS",t.Trace="TRACE",t.Patch="PATCH"}(s||(s={}));var f,l,d=Object.freeze({__proto__:null,StatusRange:c,get Status(){return a},get Method(){return s}});function h(t,e){return Array.from({length:e},((e,n)=>t(n)))}function p(t,e){let n=-1;for(let r=t.length-1;r>=0&&t[r]===e;r--)n=r;return n}function S(t,e){const n=[];for(let r=0;r<t.length;r++)t[r]===e&&n.push(r);return n}function m(t,e){let n;if("size"in t?n="size":"length"in t&&(n="length"),!n)throw new RangeError("Expected a to have a size property or a length property");return t[n]<e[n]?[e,t]:[t,e]}function*k(...t){for(const e of t)yield*e}function g(t){const e=new Map;for(const n of t){const t=(e.get(n)??0)+1;e.set(n,t)}return e}function R(t,e){let n=-1;for(const r of t){if(r!==e)break;n++}return n}function*b(t,e){for(let n=0;n<e;n++)yield t}t.Rank=void 0,(f=t.Rank||(t.Rank={}))[f.Ace=1]="Ace",f[f.Two=2]="Two",f[f.Three=3]="Three",f[f.Four=4]="Four",f[f.Five=5]="Five",f[f.Six=6]="Six",f[f.Seven=7]="Seven",f[f.Eight=8]="Eight",f[f.Nine=9]="Nine",f[f.Ten=10]="Ten",f[f.Jack=11]="Jack",f[f.Queen=12]="Queen",f[f.King=13]="King",t.Suit=void 0,(l=t.Suit||(t.Suit={}))[l.Clubs=0]="Clubs",l[l.Diamonds=1]="Diamonds",l[l.Hearts=2]="Hearts",l[l.Spades=3]="Spades";const y=[{rank:t.Rank.Ace,suit:t.Suit.Clubs},{rank:t.Rank.Two,suit:t.Suit.Clubs},{rank:t.Rank.Three,suit:t.Suit.Clubs},{rank:t.Rank.Four,suit:t.Suit.Clubs},{rank:t.Rank.Five,suit:t.Suit.Clubs},{rank:t.Rank.Six,suit:t.Suit.Clubs},{rank:t.Rank.Seven,suit:t.Suit.Clubs},{rank:t.Rank.Eight,suit:t.Suit.Clubs},{rank:t.Rank.Nine,suit:t.Suit.Clubs},{rank:t.Rank.Ten,suit:t.Suit.Clubs},{rank:t.Rank.Jack,suit:t.Suit.Clubs},{rank:t.Rank.Queen,suit:t.Suit.Clubs},{rank:t.Rank.King,suit:t.Suit.Clubs},{rank:t.Rank.Ace,suit:t.Suit.Diamonds},{rank:t.Rank.Two,suit:t.Suit.Diamonds},{rank:t.Rank.Three,suit:t.Suit.Diamonds},{rank:t.Rank.Four,suit:t.Suit.Diamonds},{rank:t.Rank.Five,suit:t.Suit.Diamonds},{rank:t.Rank.Six,suit:t.Suit.Diamonds},{rank:t.Rank.Seven,suit:t.Suit.Diamonds},{rank:t.Rank.Eight,suit:t.Suit.Diamonds},{rank:t.Rank.Nine,suit:t.Suit.Diamonds},{rank:t.Rank.Ten,suit:t.Suit.Diamonds},{rank:t.Rank.Jack,suit:t.Suit.Diamonds},{rank:t.Rank.Queen,suit:t.Suit.Diamonds},{rank:t.Rank.King,suit:t.Suit.Diamonds},{rank:t.Rank.Ace,suit:t.Suit.Hearts},{rank:t.Rank.Two,suit:t.Suit.Hearts},{rank:t.Rank.Three,suit:t.Suit.Hearts},{rank:t.Rank.Four,suit:t.Suit.Hearts},{rank:t.Rank.Five,suit:t.Suit.Hearts},{rank:t.Rank.Six,suit:t.Suit.Hearts},{rank:t.Rank.Seven,suit:t.Suit.Hearts},{rank:t.Rank.Eight,suit:t.Suit.Hearts},{rank:t.Rank.Nine,suit:t.Suit.Hearts},{rank:t.Rank.Ten,suit:t.Suit.Hearts},{rank:t.Rank.Jack,suit:t.Suit.Hearts},{rank:t.Rank.Queen,suit:t.Suit.Hearts},{rank:t.Rank.King,suit:t.Suit.Hearts},{rank:t.Rank.Ace,suit:t.Suit.Spades},{rank:t.Rank.Two,suit:t.Suit.Spades},{rank:t.Rank.Three,suit:t.Suit.Spades},{rank:t.Rank.Four,suit:t.Suit.Spades},{rank:t.Rank.Five,suit:t.Suit.Spades},{rank:t.Rank.Six,suit:t.Suit.Spades},{rank:t.Rank.Seven,suit:t.Suit.Spades},{rank:t.Rank.Eight,suit:t.Suit.Spades},{rank:t.Rank.Nine,suit:t.Suit.Spades},{rank:t.Rank.Ten,suit:t.Suit.Spades},{rank:t.Rank.Jack,suit:t.Suit.Spades},{rank:t.Rank.Queen,suit:t.Suit.Spades},{rank:t.Rank.King,suit:t.Suit.Spades}],w=new WeakMap;function T(t){const e=t[0].map((t=>t.length));for(const n of t)for(const[t,{length:r}]of n.entries())e[t]<r&&(e[t]=r);return e}function v(t,e){if(Array.isArray(t)&&Array.isArray(e))return function(t,e){return t===e||t.length===e.length&&t.every(((t,n)=>t===e[n]))}(t,e);if(t instanceof Set&&e instanceof Set)return function(t,e){if(t===e)return!0;if(t.size!==e.size)return!1;for(const n of t)if(!e.has(n))return!1;return!0}(t,e);if(t instanceof Map&&e instanceof Map)return function(t,e){if(t===e)return!0;if(t.size!==e.size)return!1;for(const[n,r]of t.entries())if(!e.has(n)||e.get(n)!==r)return!1;return!0}(t,e);throw new RangeError("Expected both parameters to be an array, Set, or Map")}class E extends Map{constructor(t,e){super(e),this.defaultValueOrDefaultValueFn=t,this.defaultValueIsFunction="function"==typeof t}get(t){return this.has(t)?super.get(t):this.defaultValueIsFunction?this.defaultValueOrDefaultValueFn(t):this.defaultValueOrDefaultValueFn}}function x(t,e,n){if(e>n)throw new RangeError("min exceeded max");return t<e?e:t>n?n:t}function M(t,e){return t*e}function A(t,e){return t+e}function N(t){const e=t.reduce(A);return e/("bigint"==typeof e?BigInt(t.length):t.length)}function C(t,e,n){return 1/(2.5066282746310002*e)*Math.E**(-.5*(t-n/e)**2)}function O(t,e){if(t>e)throw new RangeError("min exceeded max");return Math.random()*(e-t)+t}function F(t,e=N(t)){return t.map((t=>(t-e)**2)).reduce(A)/(t.length-1)}function P(t,e=N(t)){return Math.sqrt(F(t,e))}function D(t,e){if(t===e)return new Set;const n=new Set(t);for(const t of e)n["delete"](t);return n}const q=Symbol("delayResolvedValue");var H=Object.freeze({__proto__:null,and:function(t,e){return t&e},or:function(t,e){return t|e},xor:function(t,e){return t^e}});function j(t,e){return t<e?-1:t>e?1:0}function z(t,e){return t<e?1:t>e?-1:0}var _=Object.freeze({__proto__:null,ascending:function(t,e){return e===undefined&&"function"==typeof t?(e,n)=>j(t(e),t(n)):j(t,e)},descending:function(t,e){return e===undefined&&"function"==typeof t?(e,n)=>z(t(e),t(n)):z(t,e)}});const I=/\S/;t.AutoPercentage=class{constructor(){this._count=0}percentage(){return this._count++,{[Symbol.toPrimitive]:()=>1/this._count}}count(){return this._count++,{[Symbol.toPrimitive]:()=>this._count}}},t.Bitwise=H,t.DefaultMap=E,t.Http=d,t.MathMap=class extends E{add(t,e){const n=this.get(t)+e;return this.set(t,n),n}subtract(t,e){const n=this.get(t)-e;return this.set(t,n),n}multiply(t,e){const n=this.get(t)*e;return this.set(t,n),n}divide(t,e){const n=this.get(t)/e;return this.set(t,n),n}pow(t,e){const n=this.get(t)**e;return this.set(t,n),n}sqrt(t){const e=Math.sqrt(this.get(t));return this.set(t,e),e}root(t,e){if(2===e)return this.sqrt(t);const n=this.get(t)**(1/e);return this.set(t,n),n}},t.Range=e,t.Sort=_,t.Stopwatch=class{static start(){const t=new this;return t.start(),t}get started(){return this.startTime!==undefined}start(){this.startTime=process.hrtime.bigint()}end(){if(this.startTime===undefined)throw Error("This timer was not started");return Number(process.hrtime.bigint()-this.startTime)/1e6}},t.allDuplicates=function(t){const e=new Set,n=[];for(const r of t)e.has(r)?n.push(r):e.add(r);return n},t.binarySearch=function(t,e){let n=0,r=t.length-1;for(;n<=r;){const i=Math.trunc((n+r)/2),o=e(t[i]);if(o<0)n=i+1;else{if(!(o>0))return t[i];r=i-1}}return undefined},t.capitalize=function(t){const e=t.charAt(0).toUpperCase();return`${e}${t.slice(e.length)}`},t.chunk=function(t,e){return t.length===e?t.map((t=>[t])):h((n=>t.slice(n*e,n*e+e)),Math.ceil(t.length/e))},t.clamp=x,t.combineIterables=k,t.count=function(t,e){let n=0;if(e)for(const r of t)e(r)&&n++;else for(const e of t)n++;return n},t.cycle=function*(t,e){for(let n=0;n<e;n++)yield*t},t.difference=D,t.duplicates=function(t){const e=new Set,n=new Set;for(const r of t)e.has(r)?n.add(r):e.add(r);return n},t.enumHas=function(t,e){return w.has(t)||w.set(t,new Set(Object.values(t))),w.get(t).has(e)},t.every=function(t,e){for(const n of t)if(!e(n))return!1;return!0},t.fill=function(t,e){return Array.from({length:e},(()=>t))},t.find=function(t,e){for(const n of t)if(e(n))return n;return undefined},t.findIndexAll=function(t,e){const n=[];for(let r=0;r<t.length;r++)e(t[r],r)&&n.push(r);return n},t.first=function(t,e){if(e===undefined){for(const e of t)return e;return undefined}return function*(t,e){for(const n of t){if(!e--)break;yield n}}(t,e)},t.firstIndexOfLastGroup=p,t.formatTable=function(t,e=" "){const n=T(t);return t.map((t=>t.map(((t,e)=>t.padEnd(n[e]))).join(e))).join("\n")},t.frequencyTable=g,t.geometricMean=function(t){return t.reduce(M)**(1/t.length)},t.harmonicMean=function(t){return t.length/t.reduce(((t,e)=>t+1/e),0)},t.holes=function(t){const e=[];for(let n=0;n<t.length;n++)n in t||e.push(n);return e},t.identical=v,t.includes=function(t,e){for(const n of t)if(n===e)return!0;return!1},t.indexOfAll=S,t.intersection=function(t,e){if(t===e)return new Set(t);const n=new Set,[r,i]=m(t,e);for(const t of r)i.has(t)&&n.add(t);return n},t.invert=function(t){return(...e)=>-t(...e)},t.isAnagram=function(t,e){return t===e||t.length===e.length&&v(g(t),g(e))},t.isDisjoint=function(t,e){if(t===e)return!1;const n=t instanceof Set?t:new Set(t);for(const t of e)if(n.has(t))return!1;return!0},t.isEmpty=function(t){for(const e of t)return!1;return!0},t.isSorted=function(t,e){for(let n=0;n<t.length-1;n++)if(e(t[n],t[n+1])>0)return!1;return!0},t.isSubset=function(t,e){if(t===e)return!0;for(const n of t)if(!e.has(n))return!1;return!0},t.isSuperset=function(t,e){if(t===e)return!0;for(const n of e)if(!t.has(n))return!1;return!0},t.isWhitespace=function(t){return!I.test(t)},t.iteratorToIterable=function(t){return{[Symbol.iterator]:()=>t}},t.jaccardIndex=function(t,e){if(0===t.size&&0===e.size)return 1;let n=0;const[r,i]=m(t,e);for(const t of r)i.has(t)&&n++;return x(n/(t.size+e.size-n),0,1)},t.join=function(t,e=","){let n="";const r=t[Symbol.iterator]();let i=r.next();for(;;){const t=i;if(i=r.next(),n+=t.value,i.done)return n;n+=e}},t.largeToSmall=m,t.lastIndexOfFirstGroup=R,t.lines=function(t){return t.split("\n").map((t=>t.trim())).filter((t=>t.length>0))},t.mapFill=h,t.mapRepeat=function*(t,e){for(let n=0;n<e;n++)yield t(n)},t.max=function(t,e){return e>t?e:t},t.maxColumnLength=T,t.mean=N,t.median=function(t){const e=t.length%2==0,n=t.length/2;if(e){const e="bigint"==typeof t[0]?2n:2;return(t[n-1]+t[n])/e}return t[Math.floor(n)]},t.min=function(t,e){return e<t?e:t},t.mode=function(t){const e=new Map;let n=0,r=[];for(const i of t){const t=e.get(i),o=t===undefined?1:t+1;e.set(i,o),o>n?(n=o,r=[i]):o===n&&r.push(i)}return r},t.multiReplace=function(t,e){const n=Object.entries(e);let r="",i=0;for(;i<t.length;)t:{for(const[e,o]of n)if(t.slice(i).startsWith(e)){r+=o,i+=e.length;break t}r+=t[i++]}return r},t.name=function U(t,e){return e?`${U(t)}${e.name in t?".":"#"}${e.name}`:t.name},t.newDeck=function(){return[...y]},t.normaldist=C,t.not=function(t){return(...e)=>!t(...e)},t.nullish=function(t){return null===t||t===undefined},t.omit=function(t,e){const n=D(Object.keys(t),e.filter((t=>"symbol"!=typeof t)).map((t=>t+"")));return Object.fromEntries([...n].map((e=>[e,t[e]])))},t.overwrite=function(t,e,n){return t.splice(e,e+n.length-1,...n)},t.padEnd=function(t,e,n){t.push(...b(n,e-t.length))},t.padStart=function(t,e,n){t.unshift(...b(n,e-t.length))},t.partition=function(t,e){const n=[],r=[];let i=0;for(const o of t)(e(o,i++)?n:r).push(o);return[n,r]},t.pick=function(t,e){return Object.fromEntries(e.map((e=>[e,t[e]])))},t.product=M,t.pull=function(t,e){const n=t.indexOf(e);return-1===n?[]:t.splice(n,1)},t.pullAll=function(t,e){const n=S(t,e);n.reverse();const r=[];for(const e of n)r.push(t.splice(e,1)[0]);return r},t.random=O,t.randomInt=function(t,e){if(t>e)throw new RangeError("min exceeded max");return Math.floor(O(Math.ceil(t),Math.floor(e)))},t.regExpUnion=function(...t){return RegExp(t.map((t=>`(${t.source})`)).join("|"))},t.relativeStddev=function(t,e=N(t)){return P(t,e)/e},t.rename=function(t,e,n){if(e===n)return{...t};const{[e]:r,...i}={...t,[n]:t[e]};return i},t.repeat=b,t.replace=function(t,e,n){const r=t.indexOf(e);return-1!==r&&(t[r]=n),r},t.replaceAll=function(t,e,n){let r=0;for(let i=0;i<t.length;i++)t[i]===e&&(t[i]=n,r++);return r},t.same=function(...t){const e=t.map((t=>t[Symbol.iterator]()));for(;;){const t=e.map((t=>t.next())),[{done:n,value:r}]=t;for(const e of t){if(e.done)return t.every((t=>t.done===n));if(e.value!==r)return!1}}},t.sample=function(t){return t[Math.floor(Math.random()*t.length)]},t.settled=async function(t){try{return[await t,undefined]}catch(e){return[undefined,e]}},t.shuffle=function(t,e=!0){const n=e?t:[...t];for(let t=n.length-1;t>0;t--){const e=Math.floor(Math.random()*(t+1));[n[t],n[e]]=[n[e],n[t]]}if(!e)return n},t.skip=function(t,e){const n=t[Symbol.iterator]();for(let t=0;t<e&&!n.next().done;t++);return n},t.some=function(t,e){for(const n of t)if(e(n))return!0;return!1},t.sortObject=function(t,e){return Object.entries(t).sort((([,t],[,n])=>e(t,n)))},t.standardNormaldist=function(t){return C(t,1,0)},t.stddev=P,t.sum=A,t.symmetricDifference=function(t,e){if(t===e)return new Set;const n=new Set(t);for(const t of e)n.has(t)?n["delete"](t):n.add(t);return n},t.thunkify=function(t){let e,n=!1;return(...r)=>(n||(n=!0,e=t(...r)),e)},t.timeout=async function(t,e){const[n,r]=function(t){let e;const n=new Promise((n=>{e=setTimeout((()=>{n(q)}),t)}));return[e,n]}(e),i=await Promise.race([t,r])["finally"]((()=>{clearTimeout(n)}));if(i===q)throw Error("Timed out");return i},t.toDigits=function(t,e){const n=10**e;return Math.round(t*n*(1+Number.EPSILON))/n},t.triangularNumber=function(t){if(t<0)throw new RangeError("Value must be greater than or equal to 0");return"bigint"==typeof t?t*(t+1n)/2n:t*(t+1)/2},t.trimEnd=function(t,e){const n=p(t,e);return-1===n?"string"==typeof t?t:[...t]:t.slice(0,n)},t.trimStart=function(t,e){const n=R(t,e);return-1===n?"string"==typeof t?t:[...t]:t.slice(n+1)},t.truncate=function(t,e,n=""){return t.length>e?`${t.slice(0,e)}${n}`:t},t.uncapitalize=function(t){const e=t.charAt(0).toLowerCase();return`${e}${t.slice(e.length)}`},t.union=function(t,e){return t===e?new Set(t):new Set(k(t,e))},t.variance=F,Object.defineProperty(t,"__esModule",{value:!0})},"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).jonahsniderUtil={});
//# sourceMappingURL=index.dev.js.map

@@ -1,2 +0,2 @@

var t,e;t=this,e=function(t){"use strict";class e{constructor(t,e){if(this.lower=t,this.upper=e,t>e)throw new RangeError("lower must be less than upper")}static from(t){const[n,r]=t;return new e(n,r)}has(t){return t>=this.lower&&t<=this.upper}*[Symbol.iterator](){yield this.lower,yield this.upper}isSuperrange(t){return t===this||this.lower>=t.lower&&this.upper<=t.upper}isSubrange(t){return t===this||this.lower<=t.lower&&this.upper>=t.upper}equals(t){return t===this||this.lower===t.lower&&this.upper===t.upper}intersects(t){return t===this||this.lower<=t.upper&&this.upper>=t.lower}}const n=Object.freeze(new e(100,200)),r=Object.freeze(new e(200,300)),i=Object.freeze(new e(300,400)),o=Object.freeze(new e(400,500)),u=Object.freeze(new e(500,600));var a,s,c=Object.freeze({__proto__:null,informational:n,success:r,redirects:i,clientErrors:o,serverErrors:u});!function(t){t[t.Continue=100]="Continue",t[t.SwitchingProtocols=101]="SwitchingProtocols",t[t.EarlyHints=103]="EarlyHints",t[t.Ok=200]="Ok",t[t.Created=201]="Created",t[t.Accepted=202]="Accepted",t[t.NonAuthoritativeInformation=203]="NonAuthoritativeInformation",t[t.NoContent=204]="NoContent",t[t.ResetContent=205]="ResetContent",t[t.PartialContent=206]="PartialContent",t[t.MultipleChoices=300]="MultipleChoices",t[t.MovedPermanently=301]="MovedPermanently",t[t.Found=302]="Found",t[t.SeeOther=303]="SeeOther",t[t.NotModified=304]="NotModified",t[t.TemporaryRedirect=307]="TemporaryRedirect",t[t.PermanentRedirect=308]="PermanentRedirect",t[t.BadRequest=400]="BadRequest",t[t.Unauthorized=401]="Unauthorized",t[t.PaymentRequired=402]="PaymentRequired",t[t.Forbidden=403]="Forbidden",t[t.NotFound=404]="NotFound",t[t.MethodNotAllowed=405]="MethodNotAllowed",t[t.NotAcceptable=406]="NotAcceptable",t[t.ProxyAuthenticationRequired=407]="ProxyAuthenticationRequired",t[t.RequestTimeout=408]="RequestTimeout",t[t.Conflict=409]="Conflict",t[t.Gone=410]="Gone",t[t.LengthRequired=411]="LengthRequired",t[t.PreconditionFailed=412]="PreconditionFailed",t[t.PayloadTooLarge=413]="PayloadTooLarge",t[t.UriTooLong=414]="UriTooLong",t[t.UnsupportedMediaType=415]="UnsupportedMediaType",t[t.RangeNotSatisfiable=416]="RangeNotSatisfiable",t[t.ExpectationFailed=417]="ExpectationFailed",t[t.ImATeapot=418]="ImATeapot",t[t.UnprocessableEntity=422]="UnprocessableEntity",t[t.TooEarly=425]="TooEarly",t[t.UpgradeRequired=426]="UpgradeRequired",t[t.PreconditionRequired=428]="PreconditionRequired",t[t.TooManyRequests=429]="TooManyRequests",t[t.RequestHeaderFieldsTooLarge=431]="RequestHeaderFieldsTooLarge",t[t.UnavailableForLegalReasons=451]="UnavailableForLegalReasons",t[t.InternalServerError=500]="InternalServerError",t[t.NotImplemented=501]="NotImplemented",t[t.BadGateway=502]="BadGateway",t[t.ServiceUnavailable=503]="ServiceUnavailable",t[t.GatewayTimeout=504]="GatewayTimeout",t[t.HttpVersionNotSupported=505]="HttpVersionNotSupported",t[t.VariantAlsoNegotiates=506]="VariantAlsoNegotiates",t[t.InsufficientStorage=507]="InsufficientStorage",t[t.LoopDetected=508]="LoopDetected",t[t.NotExtended=510]="NotExtended",t[t.NetworkAuthenticationRequired=511]="NetworkAuthenticationRequired"}(a||(a={})),function(t){t.Get="GET",t.Head="HEAD",t.Post="POST",t.Put="PUT",t.Delete="DELETE",t.Connect="CONNECT",t.Options="OPTIONS",t.Trace="TRACE",t.Patch="PATCH"}(s||(s={}));var f,l,d=Object.freeze({__proto__:null,StatusRange:c,get Status(){return a},get Method(){return s}});function h(t,e){return Array.from({length:e},((e,n)=>t(n)))}function p(t,e){let n=-1;for(let r=t.length-1;r>=0&&t[r]===e;r--)n=r;return n}function S(t,e){const n=[];for(let r=0;r<t.length;r++)t[r]===e&&n.push(r);return n}function k(t,e){let n;if("size"in t?n="size":"length"in t&&(n="length"),!n)throw new RangeError("Expected a to have a size property or a length property");return t[n]<e[n]?[e,t]:[t,e]}function*m(...t){for(const e of t)yield*e}function g(t){const e=new Map;for(const n of t){const t=(e.get(n)??0)+1;e.set(n,t)}return e}function R(t,e){let n=-1;for(const r of t){if(r!==e)break;n++}return n}function*b(t,e){for(let n=0;n<e;n++)yield t}t.Rank=void 0,(f=t.Rank||(t.Rank={}))[f.Ace=1]="Ace",f[f.Two=2]="Two",f[f.Three=3]="Three",f[f.Four=4]="Four",f[f.Five=5]="Five",f[f.Six=6]="Six",f[f.Seven=7]="Seven",f[f.Eight=8]="Eight",f[f.Nine=9]="Nine",f[f.Ten=10]="Ten",f[f.Jack=11]="Jack",f[f.Queen=12]="Queen",f[f.King=13]="King",t.Suit=void 0,(l=t.Suit||(t.Suit={}))[l.Clubs=0]="Clubs",l[l.Diamonds=1]="Diamonds",l[l.Hearts=2]="Hearts",l[l.Spades=3]="Spades";const y=[{rank:t.Rank.Ace,suit:t.Suit.Clubs},{rank:t.Rank.Two,suit:t.Suit.Clubs},{rank:t.Rank.Three,suit:t.Suit.Clubs},{rank:t.Rank.Four,suit:t.Suit.Clubs},{rank:t.Rank.Five,suit:t.Suit.Clubs},{rank:t.Rank.Six,suit:t.Suit.Clubs},{rank:t.Rank.Seven,suit:t.Suit.Clubs},{rank:t.Rank.Eight,suit:t.Suit.Clubs},{rank:t.Rank.Nine,suit:t.Suit.Clubs},{rank:t.Rank.Ten,suit:t.Suit.Clubs},{rank:t.Rank.Jack,suit:t.Suit.Clubs},{rank:t.Rank.Queen,suit:t.Suit.Clubs},{rank:t.Rank.King,suit:t.Suit.Clubs},{rank:t.Rank.Ace,suit:t.Suit.Diamonds},{rank:t.Rank.Two,suit:t.Suit.Diamonds},{rank:t.Rank.Three,suit:t.Suit.Diamonds},{rank:t.Rank.Four,suit:t.Suit.Diamonds},{rank:t.Rank.Five,suit:t.Suit.Diamonds},{rank:t.Rank.Six,suit:t.Suit.Diamonds},{rank:t.Rank.Seven,suit:t.Suit.Diamonds},{rank:t.Rank.Eight,suit:t.Suit.Diamonds},{rank:t.Rank.Nine,suit:t.Suit.Diamonds},{rank:t.Rank.Ten,suit:t.Suit.Diamonds},{rank:t.Rank.Jack,suit:t.Suit.Diamonds},{rank:t.Rank.Queen,suit:t.Suit.Diamonds},{rank:t.Rank.King,suit:t.Suit.Diamonds},{rank:t.Rank.Ace,suit:t.Suit.Hearts},{rank:t.Rank.Two,suit:t.Suit.Hearts},{rank:t.Rank.Three,suit:t.Suit.Hearts},{rank:t.Rank.Four,suit:t.Suit.Hearts},{rank:t.Rank.Five,suit:t.Suit.Hearts},{rank:t.Rank.Six,suit:t.Suit.Hearts},{rank:t.Rank.Seven,suit:t.Suit.Hearts},{rank:t.Rank.Eight,suit:t.Suit.Hearts},{rank:t.Rank.Nine,suit:t.Suit.Hearts},{rank:t.Rank.Ten,suit:t.Suit.Hearts},{rank:t.Rank.Jack,suit:t.Suit.Hearts},{rank:t.Rank.Queen,suit:t.Suit.Hearts},{rank:t.Rank.King,suit:t.Suit.Hearts},{rank:t.Rank.Ace,suit:t.Suit.Spades},{rank:t.Rank.Two,suit:t.Suit.Spades},{rank:t.Rank.Three,suit:t.Suit.Spades},{rank:t.Rank.Four,suit:t.Suit.Spades},{rank:t.Rank.Five,suit:t.Suit.Spades},{rank:t.Rank.Six,suit:t.Suit.Spades},{rank:t.Rank.Seven,suit:t.Suit.Spades},{rank:t.Rank.Eight,suit:t.Suit.Spades},{rank:t.Rank.Nine,suit:t.Suit.Spades},{rank:t.Rank.Ten,suit:t.Suit.Spades},{rank:t.Rank.Jack,suit:t.Suit.Spades},{rank:t.Rank.Queen,suit:t.Suit.Spades},{rank:t.Rank.King,suit:t.Suit.Spades}],w=new WeakMap;function T(t){const e=t[0].map((t=>t.length));for(const n of t)for(const[t,{length:r}]of n.entries())e[t]<r&&(e[t]=r);return e}function v(t,e){if(Array.isArray(t)&&Array.isArray(e))return function(t,e){return t===e||t.length===e.length&&t.every(((t,n)=>t===e[n]))}(t,e);if(t instanceof Set&&e instanceof Set)return function(t,e){if(t===e)return!0;if(t.size!==e.size)return!1;for(const n of t)if(!e.has(n))return!1;return!0}(t,e);if(t instanceof Map&&e instanceof Map)return function(t,e){if(t===e)return!0;if(t.size!==e.size)return!1;for(const[n,r]of t.entries())if(!e.has(n)||e.get(n)!==r)return!1;return!0}(t,e);throw new RangeError("Expected both parameters to be an array, Set, or Map")}class E extends Map{constructor(t,e){super(e),this.defaultValueOrDefaultValueFn=t,this.defaultValueIsFunction="function"==typeof t}get(t){return this.has(t)?super.get(t):this.defaultValueIsFunction?this.defaultValueOrDefaultValueFn(t):this.defaultValueOrDefaultValueFn}}function M(t,e,n){return t<e?e:t>n?n:t}function A(t,e){return t*e}function N(t,e){return t+e}function C(t){const e=t.reduce(N);return e/("bigint"==typeof e?BigInt(t.length):t.length)}function x(t,e,n){return 1/(2.5066282746310002*e)*Math.E**(-.5*(t-n/e)**2)}function F(t,e){return Math.random()*(e-t)+t}function O(t,e=C(t)){return t.map((t=>(t-e)**2)).reduce(N)/(t.length-1)}function P(t,e=C(t)){return Math.sqrt(O(t,e))}const D=Symbol("delayResolvedValue");var q=Object.freeze({__proto__:null,and:function(t,e){return t&e},or:function(t,e){return t|e},xor:function(t,e){return t^e}});function H(t,e){return t<e?-1:t>e?1:0}function z(t,e){return t<e?1:t>e?-1:0}var j=Object.freeze({__proto__:null,ascending:function(t,e){return e===undefined&&"function"==typeof t?(e,n)=>H(t(e),t(n)):H(t,e)},descending:function(t,e){return e===undefined&&"function"==typeof t?(e,n)=>z(t(e),t(n)):z(t,e)}});const _=/\S/;t.AutoPercentage=class{constructor(){this._count=0}percentage(){return this._count++,{[Symbol.toPrimitive]:()=>1/this._count}}count(){return this._count++,{[Symbol.toPrimitive]:()=>this._count}}},t.Bitwise=q,t.DefaultMap=E,t.Http=d,t.MathMap=class extends E{add(t,e){const n=this.get(t)+e;return this.set(t,n),n}subtract(t,e){const n=this.get(t)-e;return this.set(t,n),n}multiply(t,e){const n=this.get(t)*e;return this.set(t,n),n}divide(t,e){const n=this.get(t)/e;return this.set(t,n),n}pow(t,e){const n=this.get(t)**e;return this.set(t,n),n}sqrt(t){const e=Math.sqrt(this.get(t));return this.set(t,e),e}root(t,e){if(2===e)return this.sqrt(t);const n=this.get(t)**(1/e);return this.set(t,n),n}},t.Range=e,t.Sort=j,t.Stopwatch=class{static start(){const t=new this;return t.start(),t}get started(){return this.startTime!==undefined}start(){this.startTime=process.hrtime.bigint()}end(){return Number(process.hrtime.bigint()-this.startTime)/1e6}},t.allDuplicates=function(t){const e=new Set,n=[];for(const r of t)e.has(r)?n.push(r):e.add(r);return n},t.binarySearch=function(t,e){let n=0,r=t.length-1;for(;n<=r;){const i=Math.trunc((n+r)/2),o=e(t[i]);if(o<0)n=i+1;else{if(!(o>0))return t[i];r=i-1}}return undefined},t.capitalize=function(t){const e=t.charAt(0).toUpperCase();return`${e}${t.slice(e.length)}`},t.chunk=function(t,e){return t.length===e?t.map((t=>[t])):h((n=>t.slice(n*e,n*e+e)),Math.ceil(t.length/e))},t.clamp=M,t.combineIterables=m,t.count=function(t,e){let n=0;if(e)for(const r of t)e(r)&&n++;else for(const e of t)n++;return n},t.cycle=function*(t,e){for(let n=0;n<e;n++)yield*t},t.difference=function(t,e){if(t===e)return new Set;const n=new Set(t);for(const t of e)n["delete"](t);return n},t.duplicates=function(t){const e=new Set,n=new Set;for(const r of t)e.has(r)?n.add(r):e.add(r);return n},t.enumHas=function(t,e){return w.has(t)||w.set(t,new Set(Object.values(t))),w.get(t).has(e)},t.every=function(t,e){for(const n of t)if(!e(n))return!1;return!0},t.fill=function(t,e){return Array.from({length:e},(()=>t))},t.find=function(t,e){for(const n of t)if(e(n))return n;return undefined},t.findIndexAll=function(t,e){const n=[];for(let r=0;r<t.length;r++)e(t[r],r)&&n.push(r);return n},t.first=function(t,e){if(e===undefined){for(const e of t)return e;return undefined}return function*(t,e){for(const n of t){if(!e--)break;yield n}}(t,e)},t.firstIndexOfLastGroup=p,t.formatTable=function(t,e=" "){const n=T(t);return t.map((t=>t.map(((t,e)=>t.padEnd(n[e]))).join(e))).join("\n")},t.frequencyTable=g,t.geometricMean=function(t){return t.reduce(A)**(1/t.length)},t.harmonicMean=function(t){return t.length/t.reduce(((t,e)=>t+1/e),0)},t.holes=function(t){const e=[];for(let n=0;n<t.length;n++)n in t||e.push(n);return e},t.identical=v,t.includes=function(t,e){for(const n of t)if(n===e)return!0;return!1},t.indexOfAll=S,t.intersection=function(t,e){if(t===e)return new Set(t);const n=new Set,[r,i]=k(t,e);for(const t of r)i.has(t)&&n.add(t);return n},t.invert=function(t){return(...e)=>-t(...e)},t.isAnagram=function(t,e){return t===e||t.length===e.length&&v(g(t),g(e))},t.isDisjoint=function(t,e){if(t===e)return!1;const n=t instanceof Set?t:new Set(t);for(const t of e)if(n.has(t))return!1;return!0},t.isEmpty=function(t){for(const e of t)return!1;return!0},t.isSorted=function(t,e){for(let n=0;n<t.length-1;n++)if(e(t[n],t[n+1])>0)return!1;return!0},t.isSubset=function(t,e){if(t===e)return!0;for(const n of t)if(!e.has(n))return!1;return!0},t.isSuperset=function(t,e){if(t===e)return!0;for(const n of e)if(!t.has(n))return!1;return!0},t.isWhitespace=function(t){return!_.test(t)},t.iteratorToIterable=function(t){return{[Symbol.iterator]:()=>t}},t.jaccardIndex=function(t,e){if(0===t.size&&0===e.size)return 1;let n=0;const[r,i]=k(t,e);for(const t of r)i.has(t)&&n++;return M(n/(t.size+e.size-n),0,1)},t.join=function(t,e=","){let n="";const r=t[Symbol.iterator]();let i=r.next();for(;;){const t=i;if(i=r.next(),n+=t.value,i.done)return n;n+=e}},t.largeToSmall=k,t.lastIndexOfFirstGroup=R,t.lines=function(t){return t.split("\n").map((t=>t.trim())).filter((t=>t.length>0))},t.mapFill=h,t.mapRepeat=function*(t,e){for(let n=0;n<e;n++)yield t(n)},t.max=function(t,e){return e>t?e:t},t.maxColumnLength=T,t.mean=C,t.median=function(t){const e=t.length%2==0,n=t.length/2;if(e){const e="bigint"==typeof t[0]?2n:2;return(t[n-1]+t[n])/e}return t[Math.floor(n)]},t.min=function(t,e){return e<t?e:t},t.mode=function(t){const e=new Map;let n=0,r=[];for(const i of t){const t=e.get(i),o=t===undefined?1:t+1;e.set(i,o),o>n?(n=o,r=[i]):o===n&&r.push(i)}return r},t.multiReplace=function(t,e){const n=Object.entries(e);let r="",i=0;for(;i<t.length;)t:{for(const[e,o]of n)if(t.slice(i).startsWith(e)){r+=o,i+=e.length;break t}r+=t[i++]}return r},t.name=function I(t,e){return e?`${I(t)}${e.name in t?".":"#"}${e.name}`:t.name},t.newDeck=function(){return[...y]},t.normaldist=x,t.not=function(t){return(...e)=>!t(...e)},t.nullish=function(t){return null===t||t===undefined},t.overwrite=function(t,e,n){return t.splice(e,e+n.length-1,...n)},t.padEnd=function(t,e,n){t.push(...b(n,e-t.length))},t.padStart=function(t,e,n){t.unshift(...b(n,e-t.length))},t.partition=function(t,e){const n=[],r=[];let i=0;for(const o of t)(e(o,i++)?n:r).push(o);return[n,r]},t.pick=function(t,e){return Object.fromEntries(e.map((e=>[e,t[e]])))},t.product=A,t.pull=function(t,e){const n=t.indexOf(e);return-1===n?[]:t.splice(n,1)},t.pullAll=function(t,e){const n=S(t,e);n.reverse();const r=[];for(const e of n)r.push(t.splice(e,1)[0]);return r},t.random=F,t.randomInt=function(t,e){return Math.floor(F(Math.ceil(t),Math.floor(e)))},t.regExpUnion=function(...t){return RegExp(t.map((t=>`(${t.source})`)).join("|"))},t.relativeStddev=function(t,e=C(t)){return P(t,e)/e},t.rename=function(t,e,n){if(e===n)return{...t};const{[e]:r,...i}={...t,[n]:t[e]};return i},t.repeat=b,t.replace=function(t,e,n){const r=t.indexOf(e);return-1!==r&&(t[r]=n),r},t.replaceAll=function(t,e,n){let r=0;for(let i=0;i<t.length;i++)t[i]===e&&(t[i]=n,r++);return r},t.same=function(...t){const e=t.map((t=>t[Symbol.iterator]()));for(;;){const t=e.map((t=>t.next())),[{done:n,value:r}]=t;for(const e of t){if(e.done)return t.every((t=>t.done===n));if(e.value!==r)return!1}}},t.sample=function(t){return t[Math.floor(Math.random()*t.length)]},t.settled=async function(t){try{return[await t,undefined]}catch(e){return[undefined,e]}},t.shuffle=function(t,e=!0){const n=e?t:[...t];for(let t=n.length-1;t>0;t--){const e=Math.floor(Math.random()*(t+1));[n[t],n[e]]=[n[e],n[t]]}if(!e)return n},t.skip=function(t,e){const n=t[Symbol.iterator]();for(let t=0;t<e&&!n.next().done;t++);return n},t.some=function(t,e){for(const n of t)if(e(n))return!0;return!1},t.sortObject=function(t,e){return Object.entries(t).sort((([,t],[,n])=>e(t,n)))},t.standardNormaldist=function(t){return x(t,1,0)},t.stddev=P,t.sum=N,t.symmetricDifference=function(t,e){if(t===e)return new Set;const n=new Set(t);for(const t of e)n.has(t)?n["delete"](t):n.add(t);return n},t.thunkify=function(t){let e,n=!1;return(...r)=>(n||(n=!0,e=t(...r)),e)},t.timeout=async function(t,e){const[n,r]=function(t){let e;const n=new Promise((n=>{e=setTimeout((()=>{n(D)}),t)}));return[e,n]}(e),i=await Promise.race([t,r])["finally"]((()=>{clearTimeout(n)}));if(i===D)throw Error("Timed out");return i},t.toDigits=function(t,e){const n=10**e;return Math.round(t*n*(1+Number.EPSILON))/n},t.triangularNumber=function(t){if(t<0)throw new RangeError("Value must be greater than or equal to 0");return"bigint"==typeof t?t*(t+1n)/2n:t*(t+1)/2},t.trimEnd=function(t,e){const n=p(t,e);return-1===n?"string"==typeof t?t:[...t]:t.slice(0,n)},t.trimStart=function(t,e){const n=R(t,e);return-1===n?"string"==typeof t?t:[...t]:t.slice(n+1)},t.truncate=function(t,e,n=""){return t.length>e?`${t.slice(0,e)}${n}`:t},t.uncapitalize=function(t){const e=t.charAt(0).toLowerCase();return`${e}${t.slice(e.length)}`},t.union=function(t,e){return t===e?new Set(t):new Set(m(t,e))},t.variance=O,Object.defineProperty(t,"__esModule",{value:!0})},"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).jonahsniderUtil={});
var t,e;t=this,e=function(t){"use strict";class e{constructor(t,e){if(this.lower=t,this.upper=e,t>e)throw new RangeError("lower must be less than upper")}static from(t){const[n,r]=t;return new e(n,r)}has(t){return t>=this.lower&&t<=this.upper}*[Symbol.iterator](){yield this.lower,yield this.upper}isSuperrange(t){return t===this||this.lower>=t.lower&&this.upper<=t.upper}isSubrange(t){return t===this||this.lower<=t.lower&&this.upper>=t.upper}equals(t){return t===this||this.lower===t.lower&&this.upper===t.upper}intersects(t){return t===this||this.lower<=t.upper&&this.upper>=t.lower}}const n=Object.freeze(new e(100,200)),r=Object.freeze(new e(200,300)),i=Object.freeze(new e(300,400)),o=Object.freeze(new e(400,500)),u=Object.freeze(new e(500,600));var a,s,c=Object.freeze({__proto__:null,informational:n,success:r,redirects:i,clientErrors:o,serverErrors:u});!function(t){t[t.Continue=100]="Continue",t[t.SwitchingProtocols=101]="SwitchingProtocols",t[t.EarlyHints=103]="EarlyHints",t[t.Ok=200]="Ok",t[t.Created=201]="Created",t[t.Accepted=202]="Accepted",t[t.NonAuthoritativeInformation=203]="NonAuthoritativeInformation",t[t.NoContent=204]="NoContent",t[t.ResetContent=205]="ResetContent",t[t.PartialContent=206]="PartialContent",t[t.MultipleChoices=300]="MultipleChoices",t[t.MovedPermanently=301]="MovedPermanently",t[t.Found=302]="Found",t[t.SeeOther=303]="SeeOther",t[t.NotModified=304]="NotModified",t[t.TemporaryRedirect=307]="TemporaryRedirect",t[t.PermanentRedirect=308]="PermanentRedirect",t[t.BadRequest=400]="BadRequest",t[t.Unauthorized=401]="Unauthorized",t[t.PaymentRequired=402]="PaymentRequired",t[t.Forbidden=403]="Forbidden",t[t.NotFound=404]="NotFound",t[t.MethodNotAllowed=405]="MethodNotAllowed",t[t.NotAcceptable=406]="NotAcceptable",t[t.ProxyAuthenticationRequired=407]="ProxyAuthenticationRequired",t[t.RequestTimeout=408]="RequestTimeout",t[t.Conflict=409]="Conflict",t[t.Gone=410]="Gone",t[t.LengthRequired=411]="LengthRequired",t[t.PreconditionFailed=412]="PreconditionFailed",t[t.PayloadTooLarge=413]="PayloadTooLarge",t[t.UriTooLong=414]="UriTooLong",t[t.UnsupportedMediaType=415]="UnsupportedMediaType",t[t.RangeNotSatisfiable=416]="RangeNotSatisfiable",t[t.ExpectationFailed=417]="ExpectationFailed",t[t.ImATeapot=418]="ImATeapot",t[t.UnprocessableEntity=422]="UnprocessableEntity",t[t.TooEarly=425]="TooEarly",t[t.UpgradeRequired=426]="UpgradeRequired",t[t.PreconditionRequired=428]="PreconditionRequired",t[t.TooManyRequests=429]="TooManyRequests",t[t.RequestHeaderFieldsTooLarge=431]="RequestHeaderFieldsTooLarge",t[t.UnavailableForLegalReasons=451]="UnavailableForLegalReasons",t[t.InternalServerError=500]="InternalServerError",t[t.NotImplemented=501]="NotImplemented",t[t.BadGateway=502]="BadGateway",t[t.ServiceUnavailable=503]="ServiceUnavailable",t[t.GatewayTimeout=504]="GatewayTimeout",t[t.HttpVersionNotSupported=505]="HttpVersionNotSupported",t[t.VariantAlsoNegotiates=506]="VariantAlsoNegotiates",t[t.InsufficientStorage=507]="InsufficientStorage",t[t.LoopDetected=508]="LoopDetected",t[t.NotExtended=510]="NotExtended",t[t.NetworkAuthenticationRequired=511]="NetworkAuthenticationRequired"}(a||(a={})),function(t){t.Get="GET",t.Head="HEAD",t.Post="POST",t.Put="PUT",t.Delete="DELETE",t.Connect="CONNECT",t.Options="OPTIONS",t.Trace="TRACE",t.Patch="PATCH"}(s||(s={}));var f,l,d=Object.freeze({__proto__:null,StatusRange:c,get Status(){return a},get Method(){return s}});function h(t,e){return Array.from({length:e},((e,n)=>t(n)))}function p(t,e){let n=-1;for(let r=t.length-1;r>=0&&t[r]===e;r--)n=r;return n}function S(t,e){const n=[];for(let r=0;r<t.length;r++)t[r]===e&&n.push(r);return n}function k(t,e){let n;if("size"in t?n="size":"length"in t&&(n="length"),!n)throw new RangeError("Expected a to have a size property or a length property");return t[n]<e[n]?[e,t]:[t,e]}function*m(...t){for(const e of t)yield*e}function g(t){const e=new Map;for(const n of t){const t=(e.get(n)??0)+1;e.set(n,t)}return e}function R(t,e){let n=-1;for(const r of t){if(r!==e)break;n++}return n}function*b(t,e){for(let n=0;n<e;n++)yield t}t.Rank=void 0,(f=t.Rank||(t.Rank={}))[f.Ace=1]="Ace",f[f.Two=2]="Two",f[f.Three=3]="Three",f[f.Four=4]="Four",f[f.Five=5]="Five",f[f.Six=6]="Six",f[f.Seven=7]="Seven",f[f.Eight=8]="Eight",f[f.Nine=9]="Nine",f[f.Ten=10]="Ten",f[f.Jack=11]="Jack",f[f.Queen=12]="Queen",f[f.King=13]="King",t.Suit=void 0,(l=t.Suit||(t.Suit={}))[l.Clubs=0]="Clubs",l[l.Diamonds=1]="Diamonds",l[l.Hearts=2]="Hearts",l[l.Spades=3]="Spades";const y=[{rank:t.Rank.Ace,suit:t.Suit.Clubs},{rank:t.Rank.Two,suit:t.Suit.Clubs},{rank:t.Rank.Three,suit:t.Suit.Clubs},{rank:t.Rank.Four,suit:t.Suit.Clubs},{rank:t.Rank.Five,suit:t.Suit.Clubs},{rank:t.Rank.Six,suit:t.Suit.Clubs},{rank:t.Rank.Seven,suit:t.Suit.Clubs},{rank:t.Rank.Eight,suit:t.Suit.Clubs},{rank:t.Rank.Nine,suit:t.Suit.Clubs},{rank:t.Rank.Ten,suit:t.Suit.Clubs},{rank:t.Rank.Jack,suit:t.Suit.Clubs},{rank:t.Rank.Queen,suit:t.Suit.Clubs},{rank:t.Rank.King,suit:t.Suit.Clubs},{rank:t.Rank.Ace,suit:t.Suit.Diamonds},{rank:t.Rank.Two,suit:t.Suit.Diamonds},{rank:t.Rank.Three,suit:t.Suit.Diamonds},{rank:t.Rank.Four,suit:t.Suit.Diamonds},{rank:t.Rank.Five,suit:t.Suit.Diamonds},{rank:t.Rank.Six,suit:t.Suit.Diamonds},{rank:t.Rank.Seven,suit:t.Suit.Diamonds},{rank:t.Rank.Eight,suit:t.Suit.Diamonds},{rank:t.Rank.Nine,suit:t.Suit.Diamonds},{rank:t.Rank.Ten,suit:t.Suit.Diamonds},{rank:t.Rank.Jack,suit:t.Suit.Diamonds},{rank:t.Rank.Queen,suit:t.Suit.Diamonds},{rank:t.Rank.King,suit:t.Suit.Diamonds},{rank:t.Rank.Ace,suit:t.Suit.Hearts},{rank:t.Rank.Two,suit:t.Suit.Hearts},{rank:t.Rank.Three,suit:t.Suit.Hearts},{rank:t.Rank.Four,suit:t.Suit.Hearts},{rank:t.Rank.Five,suit:t.Suit.Hearts},{rank:t.Rank.Six,suit:t.Suit.Hearts},{rank:t.Rank.Seven,suit:t.Suit.Hearts},{rank:t.Rank.Eight,suit:t.Suit.Hearts},{rank:t.Rank.Nine,suit:t.Suit.Hearts},{rank:t.Rank.Ten,suit:t.Suit.Hearts},{rank:t.Rank.Jack,suit:t.Suit.Hearts},{rank:t.Rank.Queen,suit:t.Suit.Hearts},{rank:t.Rank.King,suit:t.Suit.Hearts},{rank:t.Rank.Ace,suit:t.Suit.Spades},{rank:t.Rank.Two,suit:t.Suit.Spades},{rank:t.Rank.Three,suit:t.Suit.Spades},{rank:t.Rank.Four,suit:t.Suit.Spades},{rank:t.Rank.Five,suit:t.Suit.Spades},{rank:t.Rank.Six,suit:t.Suit.Spades},{rank:t.Rank.Seven,suit:t.Suit.Spades},{rank:t.Rank.Eight,suit:t.Suit.Spades},{rank:t.Rank.Nine,suit:t.Suit.Spades},{rank:t.Rank.Ten,suit:t.Suit.Spades},{rank:t.Rank.Jack,suit:t.Suit.Spades},{rank:t.Rank.Queen,suit:t.Suit.Spades},{rank:t.Rank.King,suit:t.Suit.Spades}],w=new WeakMap;function T(t){const e=t[0].map((t=>t.length));for(const n of t)for(const[t,{length:r}]of n.entries())e[t]<r&&(e[t]=r);return e}function v(t,e){if(Array.isArray(t)&&Array.isArray(e))return function(t,e){return t===e||t.length===e.length&&t.every(((t,n)=>t===e[n]))}(t,e);if(t instanceof Set&&e instanceof Set)return function(t,e){if(t===e)return!0;if(t.size!==e.size)return!1;for(const n of t)if(!e.has(n))return!1;return!0}(t,e);if(t instanceof Map&&e instanceof Map)return function(t,e){if(t===e)return!0;if(t.size!==e.size)return!1;for(const[n,r]of t.entries())if(!e.has(n)||e.get(n)!==r)return!1;return!0}(t,e);throw new RangeError("Expected both parameters to be an array, Set, or Map")}class E extends Map{constructor(t,e){super(e),this.defaultValueOrDefaultValueFn=t,this.defaultValueIsFunction="function"==typeof t}get(t){return this.has(t)?super.get(t):this.defaultValueIsFunction?this.defaultValueOrDefaultValueFn(t):this.defaultValueOrDefaultValueFn}}function M(t,e,n){return t<e?e:t>n?n:t}function A(t,e){return t*e}function N(t,e){return t+e}function C(t){const e=t.reduce(N);return e/("bigint"==typeof e?BigInt(t.length):t.length)}function x(t,e,n){return 1/(2.5066282746310002*e)*Math.E**(-.5*(t-n/e)**2)}function O(t,e){return Math.random()*(e-t)+t}function F(t,e=C(t)){return t.map((t=>(t-e)**2)).reduce(N)/(t.length-1)}function P(t,e=C(t)){return Math.sqrt(F(t,e))}function D(t,e){if(t===e)return new Set;const n=new Set(t);for(const t of e)n["delete"](t);return n}const q=Symbol("delayResolvedValue");var H=Object.freeze({__proto__:null,and:function(t,e){return t&e},or:function(t,e){return t|e},xor:function(t,e){return t^e}});function j(t,e){return t<e?-1:t>e?1:0}function z(t,e){return t<e?1:t>e?-1:0}var _=Object.freeze({__proto__:null,ascending:function(t,e){return e===undefined&&"function"==typeof t?(e,n)=>j(t(e),t(n)):j(t,e)},descending:function(t,e){return e===undefined&&"function"==typeof t?(e,n)=>z(t(e),t(n)):z(t,e)}});const I=/\S/;t.AutoPercentage=class{constructor(){this._count=0}percentage(){return this._count++,{[Symbol.toPrimitive]:()=>1/this._count}}count(){return this._count++,{[Symbol.toPrimitive]:()=>this._count}}},t.Bitwise=H,t.DefaultMap=E,t.Http=d,t.MathMap=class extends E{add(t,e){const n=this.get(t)+e;return this.set(t,n),n}subtract(t,e){const n=this.get(t)-e;return this.set(t,n),n}multiply(t,e){const n=this.get(t)*e;return this.set(t,n),n}divide(t,e){const n=this.get(t)/e;return this.set(t,n),n}pow(t,e){const n=this.get(t)**e;return this.set(t,n),n}sqrt(t){const e=Math.sqrt(this.get(t));return this.set(t,e),e}root(t,e){if(2===e)return this.sqrt(t);const n=this.get(t)**(1/e);return this.set(t,n),n}},t.Range=e,t.Sort=_,t.Stopwatch=class{static start(){const t=new this;return t.start(),t}get started(){return this.startTime!==undefined}start(){this.startTime=process.hrtime.bigint()}end(){return Number(process.hrtime.bigint()-this.startTime)/1e6}},t.allDuplicates=function(t){const e=new Set,n=[];for(const r of t)e.has(r)?n.push(r):e.add(r);return n},t.binarySearch=function(t,e){let n=0,r=t.length-1;for(;n<=r;){const i=Math.trunc((n+r)/2),o=e(t[i]);if(o<0)n=i+1;else{if(!(o>0))return t[i];r=i-1}}return undefined},t.capitalize=function(t){const e=t.charAt(0).toUpperCase();return`${e}${t.slice(e.length)}`},t.chunk=function(t,e){return t.length===e?t.map((t=>[t])):h((n=>t.slice(n*e,n*e+e)),Math.ceil(t.length/e))},t.clamp=M,t.combineIterables=m,t.count=function(t,e){let n=0;if(e)for(const r of t)e(r)&&n++;else for(const e of t)n++;return n},t.cycle=function*(t,e){for(let n=0;n<e;n++)yield*t},t.difference=D,t.duplicates=function(t){const e=new Set,n=new Set;for(const r of t)e.has(r)?n.add(r):e.add(r);return n},t.enumHas=function(t,e){return w.has(t)||w.set(t,new Set(Object.values(t))),w.get(t).has(e)},t.every=function(t,e){for(const n of t)if(!e(n))return!1;return!0},t.fill=function(t,e){return Array.from({length:e},(()=>t))},t.find=function(t,e){for(const n of t)if(e(n))return n;return undefined},t.findIndexAll=function(t,e){const n=[];for(let r=0;r<t.length;r++)e(t[r],r)&&n.push(r);return n},t.first=function(t,e){if(e===undefined){for(const e of t)return e;return undefined}return function*(t,e){for(const n of t){if(!e--)break;yield n}}(t,e)},t.firstIndexOfLastGroup=p,t.formatTable=function(t,e=" "){const n=T(t);return t.map((t=>t.map(((t,e)=>t.padEnd(n[e]))).join(e))).join("\n")},t.frequencyTable=g,t.geometricMean=function(t){return t.reduce(A)**(1/t.length)},t.harmonicMean=function(t){return t.length/t.reduce(((t,e)=>t+1/e),0)},t.holes=function(t){const e=[];for(let n=0;n<t.length;n++)n in t||e.push(n);return e},t.identical=v,t.includes=function(t,e){for(const n of t)if(n===e)return!0;return!1},t.indexOfAll=S,t.intersection=function(t,e){if(t===e)return new Set(t);const n=new Set,[r,i]=k(t,e);for(const t of r)i.has(t)&&n.add(t);return n},t.invert=function(t){return(...e)=>-t(...e)},t.isAnagram=function(t,e){return t===e||t.length===e.length&&v(g(t),g(e))},t.isDisjoint=function(t,e){if(t===e)return!1;const n=t instanceof Set?t:new Set(t);for(const t of e)if(n.has(t))return!1;return!0},t.isEmpty=function(t){for(const e of t)return!1;return!0},t.isSorted=function(t,e){for(let n=0;n<t.length-1;n++)if(e(t[n],t[n+1])>0)return!1;return!0},t.isSubset=function(t,e){if(t===e)return!0;for(const n of t)if(!e.has(n))return!1;return!0},t.isSuperset=function(t,e){if(t===e)return!0;for(const n of e)if(!t.has(n))return!1;return!0},t.isWhitespace=function(t){return!I.test(t)},t.iteratorToIterable=function(t){return{[Symbol.iterator]:()=>t}},t.jaccardIndex=function(t,e){if(0===t.size&&0===e.size)return 1;let n=0;const[r,i]=k(t,e);for(const t of r)i.has(t)&&n++;return M(n/(t.size+e.size-n),0,1)},t.join=function(t,e=","){let n="";const r=t[Symbol.iterator]();let i=r.next();for(;;){const t=i;if(i=r.next(),n+=t.value,i.done)return n;n+=e}},t.largeToSmall=k,t.lastIndexOfFirstGroup=R,t.lines=function(t){return t.split("\n").map((t=>t.trim())).filter((t=>t.length>0))},t.mapFill=h,t.mapRepeat=function*(t,e){for(let n=0;n<e;n++)yield t(n)},t.max=function(t,e){return e>t?e:t},t.maxColumnLength=T,t.mean=C,t.median=function(t){const e=t.length%2==0,n=t.length/2;if(e){const e="bigint"==typeof t[0]?2n:2;return(t[n-1]+t[n])/e}return t[Math.floor(n)]},t.min=function(t,e){return e<t?e:t},t.mode=function(t){const e=new Map;let n=0,r=[];for(const i of t){const t=e.get(i),o=t===undefined?1:t+1;e.set(i,o),o>n?(n=o,r=[i]):o===n&&r.push(i)}return r},t.multiReplace=function(t,e){const n=Object.entries(e);let r="",i=0;for(;i<t.length;)t:{for(const[e,o]of n)if(t.slice(i).startsWith(e)){r+=o,i+=e.length;break t}r+=t[i++]}return r},t.name=function U(t,e){return e?`${U(t)}${e.name in t?".":"#"}${e.name}`:t.name},t.newDeck=function(){return[...y]},t.normaldist=x,t.not=function(t){return(...e)=>!t(...e)},t.nullish=function(t){return null===t||t===undefined},t.omit=function(t,e){const n=D(Object.keys(t),e.filter((t=>"symbol"!=typeof t)).map((t=>t+"")));return Object.fromEntries([...n].map((e=>[e,t[e]])))},t.overwrite=function(t,e,n){return t.splice(e,e+n.length-1,...n)},t.padEnd=function(t,e,n){t.push(...b(n,e-t.length))},t.padStart=function(t,e,n){t.unshift(...b(n,e-t.length))},t.partition=function(t,e){const n=[],r=[];let i=0;for(const o of t)(e(o,i++)?n:r).push(o);return[n,r]},t.pick=function(t,e){return Object.fromEntries(e.map((e=>[e,t[e]])))},t.product=A,t.pull=function(t,e){const n=t.indexOf(e);return-1===n?[]:t.splice(n,1)},t.pullAll=function(t,e){const n=S(t,e);n.reverse();const r=[];for(const e of n)r.push(t.splice(e,1)[0]);return r},t.random=O,t.randomInt=function(t,e){return Math.floor(O(Math.ceil(t),Math.floor(e)))},t.regExpUnion=function(...t){return RegExp(t.map((t=>`(${t.source})`)).join("|"))},t.relativeStddev=function(t,e=C(t)){return P(t,e)/e},t.rename=function(t,e,n){if(e===n)return{...t};const{[e]:r,...i}={...t,[n]:t[e]};return i},t.repeat=b,t.replace=function(t,e,n){const r=t.indexOf(e);return-1!==r&&(t[r]=n),r},t.replaceAll=function(t,e,n){let r=0;for(let i=0;i<t.length;i++)t[i]===e&&(t[i]=n,r++);return r},t.same=function(...t){const e=t.map((t=>t[Symbol.iterator]()));for(;;){const t=e.map((t=>t.next())),[{done:n,value:r}]=t;for(const e of t){if(e.done)return t.every((t=>t.done===n));if(e.value!==r)return!1}}},t.sample=function(t){return t[Math.floor(Math.random()*t.length)]},t.settled=async function(t){try{return[await t,undefined]}catch(e){return[undefined,e]}},t.shuffle=function(t,e=!0){const n=e?t:[...t];for(let t=n.length-1;t>0;t--){const e=Math.floor(Math.random()*(t+1));[n[t],n[e]]=[n[e],n[t]]}if(!e)return n},t.skip=function(t,e){const n=t[Symbol.iterator]();for(let t=0;t<e&&!n.next().done;t++);return n},t.some=function(t,e){for(const n of t)if(e(n))return!0;return!1},t.sortObject=function(t,e){return Object.entries(t).sort((([,t],[,n])=>e(t,n)))},t.standardNormaldist=function(t){return x(t,1,0)},t.stddev=P,t.sum=N,t.symmetricDifference=function(t,e){if(t===e)return new Set;const n=new Set(t);for(const t of e)n.has(t)?n["delete"](t):n.add(t);return n},t.thunkify=function(t){let e,n=!1;return(...r)=>(n||(n=!0,e=t(...r)),e)},t.timeout=async function(t,e){const[n,r]=function(t){let e;const n=new Promise((n=>{e=setTimeout((()=>{n(q)}),t)}));return[e,n]}(e),i=await Promise.race([t,r])["finally"]((()=>{clearTimeout(n)}));if(i===q)throw Error("Timed out");return i},t.toDigits=function(t,e){const n=10**e;return Math.round(t*n*(1+Number.EPSILON))/n},t.triangularNumber=function(t){if(t<0)throw new RangeError("Value must be greater than or equal to 0");return"bigint"==typeof t?t*(t+1n)/2n:t*(t+1)/2},t.trimEnd=function(t,e){const n=p(t,e);return-1===n?"string"==typeof t?t:[...t]:t.slice(0,n)},t.trimStart=function(t,e){const n=R(t,e);return-1===n?"string"==typeof t?t:[...t]:t.slice(n+1)},t.truncate=function(t,e,n=""){return t.length>e?`${t.slice(0,e)}${n}`:t},t.uncapitalize=function(t){const e=t.charAt(0).toLowerCase();return`${e}${t.slice(e.length)}`},t.union=function(t,e){return t===e?new Set(t):new Set(m(t,e))},t.variance=F,Object.defineProperty(t,"__esModule",{value:!0})},"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).jonahsniderUtil={});
//# sourceMappingURL=index.prod.js.map
{
"name": "@jonahsnider/util",
"version": "8.11.0",
"version": "8.12.0",
"description": "A useful collection of optimized utility functions",

@@ -5,0 +5,0 @@ "homepage": "https://util.jonah.pw/",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc