@nodef/extra-array.web 0.0.0-stage → 4.5.0

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.
package/index.js ADDED
@@ -0,0 +1,2 @@
1
+ function f(t){return t}function p(t,n){return t<n?-1:t>n?1:0}var Zt=2*Math.PI;function y(t,n){return t-n*Math.floor(t/n)}function $(t,n=null){if(!n)return new Set(t);let e=new Set,r=-1;for(let o of t)e.add(n(o,++r,t));return e}function I(t,n,e=1){let r=(n-t)/e,o=[];for(let u=0;u<r;++u,t+=e)o.push(t);return o}function In(t,n){let e=[];for(let r=0;r<n;++r)e.push(t());return e}function Wn(t,n,e){let r=[];e!==0&&r.push(n);for(let o=1;o!==e;++o)r.push(n=t(n,o,null));return r}function Fn(t){return[...t]}function O(t){return Array.isArray(t)?t:[...t]}function Vn(t){return t.slice()}function Ln(t){return structuredClone(t)}function v(t){return Array.isArray(t)}function Un(t){return[...t.keys()]}function Yn(t){return t.keys()}function Bn(t){return t.slice()}function _n(t){return t.values()}function zn(t){return[...t.entries()]}function Cn(t){return t.entries()}function h(t,n){let e=t.length;return n>=0?Math.min(n,e):Math.max(e+n,0)}function g(t,n=0,e=t.length){let r=t.length;return n=n>=0?Math.min(n,r):Math.max(r+n,0),e=e>=0?Math.min(e,r):Math.max(r+e,0),[n,Math.max(n,e)]}function Hn(t){return t.length===0}function ot(t,n=0,e=t.length){return[n,e]=g(t,n,e),e-n}function xn(t,n,e){let r=t.length;return t.length=n,n>r&&t.fill(e,r),t}function Gn(t){return t.length=0,t}function A(t,n){return t[h(t,n)]}function ut(t,n){return n.map(e=>A(t,e))}function W(t,n){let e=t;for(let r of n)e=v(e)?A(e,r):void 0;return e}function Zn(t,n){let e=t;for(let r of n){if(!v(e))return!1;e=A(e,r)}return!0}function Qn(t,n,e){return F(t.slice(),n,e)}function F(t,n,e){return t[h(t,n)]=e,t}function Kn(t,n,e){let r=W(t,n.slice(0,-1));return v(r)&&F(r,_(n),e),t}function jn(t,n,e){return it(t.slice(),n,e)}function it(t,n,e){n=h(t,n),e=h(t,e);let r=t[n];return t[n]=t[e],t[e]=r,t}function w(t,n,e){let r=t[n];return t[n]=t[e],t[e]=r,t}function Jn(t,n,e,r,o){return[n,e]=g(t,n,e),[r,o]=g(t,r,o),r<n&&([n,e,r,o]=[r,o,n,e]),r<e?t.slice():t.slice(0,n).concat(t.slice(r,o),t.slice(n,r),t.slice(e))}function te(t,n,e,r,o){if([n,e]=g(t,n,e),[r,o]=g(t,r,o),r<n&&([n,e,r,o]=[r,o,n,e]),r<e)return t;let u=t.slice(n,e);return t.splice(n,e-n,...t.slice(r,o)),t.splice(r,o-r,...u),t}function ne(t,n){return n=h(t,n),t.slice(0,n).concat(t.slice(n+1))}function ee(t,n){return t.splice(n,1),t}function re(t,n){let e=W(t,n.slice(0,-1));return v(e)&&e.splice(_(n),1),t}function oe(t,n=null,e=null){return V(t,n,e)===-1}function ue(t,n=null,e=null){return V(t,n,e)>=0}function V(t,n=null,e=null){n=n||p,e=e||f;let r=t.length;if(r<=1)return-1;let o=e(t[0],0,t);for(let u=1;u<r;++u){let i=e(t[u],u,t);if(n(o,i)>0)return u;o=i}return-1}function ie(t,n=null,e=null,r=null){return lt(t.slice(),n,e,r)}function lt(t,n=null,e=null,r=null){if(n=n||p,!e&&!r)return t.sort(n);let o=t.length;return e=e||f,r=r||w,S(t,0,o,o,n,e,r)}function le(t,n,e,r=null,o=null,u=null){return ct(t.slice(),n,e,r,o,u)}function ct(t,n,e,r=null,o=null,u=null){return r=r||p,o=o||f,u=u||w,[n,e]=g(t,n,e),S(t,n,e,e-n,r,o,u)}function ce(t,n,e=null,r=null,o=null){return st(t.slice(),n,e,r,o)}function st(t,n,e=null,r=null,o=null){return L(t,0,t.length,n,e,r,o)}function se(t,n,e,r,o=null,u=null,i=null){return L(t.slice(),n,e,r,o,u,i)}function L(t,n,e,r,o=null,u=null,i=null){return o=o||p,u=u||f,i=i||w,[n,e]=g(t,n,e),S(t,n,e,r,o,u,i)}function S(t,n,e,r,o,u,i){let l=Math.floor(Math.log2(e-n)*2);return b(t,n,e,l,16,r,o,u,i)}function b(t,n,e,r,o,u,i,l,c){if(u<=0||e-n<=1)return t;if(e-n<=o)return gt(t,n,e,u,i,l,c);if(r<=0)return ft(t,n,e,u,i,l,c);let s=n+Math.floor((e-n)*Math.random());return s=at(t,n,e,s,i,l,c),b(t,n,s,r,o,Math.min(s-n,u),i,l,c),b(t,s+1,e,r,o,Math.min(e-s-1,u),i,l,c),t}function at(t,n,e,r,o,u,i){let l=u(t[r],r,t),c=n-1;i(t,r,e-1);for(let s=n;s<e-1;++s){let a=u(t[s],s,t);o(a,l)>0||i(t,++c,s)}return i(t,++c,e-1),c}function ft(t,n,e,r,o,u,i){pt(t,n,e,o,u,i);for(let l=e-1;r>0&&n<e;++n,--r)i(t,n,l),R(t,n+1,e,l,o,u,i);return t}function pt(t,n,e,r,o,u){for(let i=e-Math.floor((e-n)/2);i<e;++i)R(t,n,e,i,r,o,u)}function R(t,n,e,r,o,u,i){let l=r,c=2*r-e,s=c-1;c>=n&&o(u(t[c],c,t),u(t[l],l,t))<0&&(l=c),s>=n&&o(u(t[s],s,t),u(t[l],l,t))<0&&(l=s),l!==r&&(i(t,l,r),R(t,n,e,l,o,u,i))}function ht(t,n,e,r,o,u){for(let i=n+Math.floor((e-n)/2)-1;i>=n;--i)X(t,n,e,i,r,o,u)}function X(t,n,e,r,o,u,i){let l=r,c=2*r-n+1,s=c+1;c<e&&o(u(t[c],c,t),u(t[l],l,t))>0&&(l=c),s<e&&o(u(t[s],s,t),u(t[l],l,t))>0&&(l=s),l!==r&&(i(t,l,r),X(t,n,e,l,o,u,i))}function gt(t,n,e,r,o,u,i){return i===w?dt(t,n,e,r,o,u,i):Mt(t,n,e,r,o,u,i)}function Mt(t,n,e,r,o,u,i){for(let l=n+1;l<e;++l){let c=t[l],s=u(c,l,t);for(let a=l-1;a>=n&&o(u(t[a],a,t),s)>0;--a)i(t,a,a+1)}return t}function dt(t,n,e,r,o,u,i){for(let l=n+1;l<e;++l){let c=t[l],s=u(c,l,t),a=l-1;for(;a>=n&&o(u(t[a],a,t),s)>0;--a)t[a+1]=t[a];t[a+1]=c}return t}function ae(t,n=null,e=null){let r=U(t,n,e);return t[r]}function fe(t,n=null,e=null){let r=U(t,n,e);return[r,t[r]]}function pe(t,n=null,e=null){let r=Y(t,n,e);return t[r]}function he(t,n=null,e=null){let r=Y(t,n,e);return[r,t[r]]}function ge(t,n=null,e=null){let[r,o]=mt(t,n,e);return[r[1],o[1]]}function mt(t,n=null,e=null){n=n||p,e=e||f;let r=t.length;if(r===0)return[[-1,void 0],[-1,void 0]];let o=t[0],u=e(o,0,t),i=0,l=o,c=u,s=0,a=o,m=u;for(let d=1;d<r;++d)o=t[d],u=e(o,d,t),n(u,c)<0&&(i=d,l=o,c=u),n(u,m)>0&&(s=d,a=o,m=u);return[[i,l],[s,a]]}function Me(t,n,e=null,r=null){return N(t,n,e,r).map(u=>t[u])}function de(t,n,e=null,r=null){return N(t,n,e,r).map(u=>[u,t[u]])}function me(t,n,e=null,r=null){return B(t,n,e,r).map(u=>t[u])}function we(t,n,e=null,r=null){return B(t,n,e,r).map(u=>[u,t[u]])}function U(t,n=null,e=null){n=n||p,e=e||f;let r=t.length;if(r===0)return-1;let o=0,u=e(t[0],0,t);for(let i=1;i<r;++i){let l=e(t[i],i,t);n(l,u)<0&&(o=i,u=l)}return o}function Y(t,n=null,e=null){n=n||p,e=e||f;let r=t.length;if(r===0)return-1;let o=0,u=e(t[0],0,t);for(let i=1;i<r;++i){let l=e(t[i],i,t);n(l,u)>0&&(o=i,u=l)}return o}function N(t,n,e=null,r=null){e=e||p,r=r||f;let o=t.length,u=Math.min(n,o),i=I(0,u);ht(i,0,u,e,c=>r(t[c],c,t),w);let l=r(t[i[0]],i[0],t);for(let c=n;c<o;++c){let s=r(t[c],c,t);e(s,l)>=0||(i[0]=c,X(i,0,u,0,e,a=>r(t[a],a,t),w),l=r(t[i[0]],i[0],t))}return i.sort((c,s)=>e(r(t[c],c,t),r(t[s],s,t))),i}function B(t,n,e=null,r=null){return e=e||p,N(t,n,(u,i)=>-e(u,i),r)}function ve(t,n,e=null,r=null){let o=t.length,u=n.length;return o===u&&E(t,n,e,r)===0}function E(t,n,e=null,r=null){e=e||p,r=r||f;let o=t.length,u=n.length;for(let i=0,l=Math.min(o,u);i<l;++i){let c=r(t[i],i,t),s=r(n[i],i,n),a=e(c,s);if(a!==0)return a}return Math.sign(o-u)}function ye(t,n){return t.length>0?t[0]:n}function $e(t){return t.slice(1)}function be(t){return t.slice(0,-1)}function _(t,n){return t.length>0?t[t.length-1]:n}function Pe(t,n,e=1){return n=h(t,n),e=Math.max(e,0),t.slice(n,n+e)}function Ae(t,n=0,e=t.length){return t.slice(n,e)}function Se(t,n=0,e=t.length){return t.copyWithin(0,n,e),t.length=ot(t,n,e),t}function Re(t,n,e=0){return t.includes(n,e)}function Xe(t,n,e=null,r=null){return wt(t,n,e,r)>=0}function wt(t,n,e=null,r=null){e=e||p,r=r||f;let o=r(n,0,null),u=-1;for(let i of t){let l=r(i,++u,t);if(e(l,o)===0)return u}return-1}function Ne(t,n,e=null,r=null){e=e||p,r=r||f;let o=r(n,0,null);for(let u=t.length-1;u>=0;--u){let i=r(t[u],u,t);if(e(i,o)===0)return u}return-1}function Ee(t,n,e=null,r=null){e=e||p,r=r||f;let o=r(n,0,null),u=-1,i=[];for(let l of t){let c=r(l,++u,t);e(c,o)===0&&i.push(u)}return i}function qe(t,n=null,e=null){n=n||p,e=e||f;let r=t.length;if(r<=1)return-1;let o=e(t[0],0,t);for(let u=1;u<r;++u){let i=e(t[u],u,t);if(n(o,i)===0)return u;o=i}return-1}function De(t,n,e=null,r=null){e=e||p,r=r||f;let o=t.length,u=n.length,i=Math.min(o,u);for(let l=0;l<i;++l){let c=r(t[l],l,t),s=r(n[l],l,n);if(e(c,s)!==0)return l}return o===u?-1:i}function Oe(t,n,e=null,r=null){let o=n.length;return o===0||E(t.slice(0,o),n,e,r)===0}function ke(t,n,e=null,r=null){let o=n.length;return o===0||E(t.slice(-o),n,e,r)===0}function Te(t,n,e=null,r=null){return Rt(t,n,e,r)>=0}function vt(t,n,e=null,r=null){return Xt(t,n,e,r)>=0}function Ie(t,n,e=null,r=null){let o=r?t.map(r):t.slice(),u=r?n.map(r):n.slice();return vt(o.sort(),u.sort(),e)}function We(t,n=-1){return[...yt(t,n)]}function*yt(t,n=-1){let e=t.length;if(!(n>e)){if(n>=0){yield t.slice(0,n);return}for(let r=0;r<=e;++r)yield t.slice(0,r)}}function Fe(t,n=-1){return[...$t(t,n)]}function*$t(t,n=-1){let e=t.length;if(!(n>e)){if(n>=0){yield t.slice(t.length-n);return}for(let r=0;r<=e;++r)yield t.slice(r)}}function Ve(t,n=-1){return[...bt(t,n)]}function bt(t,n=-1){return n>=0?Pt(t,n):At(t)}function*Pt(t,n){let e=t.length;if(!(n>e)){if(n===0){yield[];return}for(let r=0,o=e-n+1;r<o;++r)yield t.slice(r,r+n)}}function*At(t){let n=t.length;yield[];for(let e=0;e<n;++e)for(let r=e+1;r<=n;++r)yield t.slice(e,r)}function Le(t,n=-1){return[...P(t,n)]}function*P(t,n=-1){let e=t.length;if(n>e)return;if(n===e){yield t;return}if(n===0||e===0){yield[];return}let r=t.slice(0,-1);yield*P(r,n);for(let o of P(r,n-1))o.push(t[e-1]),yield o}function Ue(t,n=-1){return[...St(t,n)]}function*St(t,n=-1){let e=t.length;if(n>e)return;let r=n<0?0:n,o=n<0?e:n;for(;r<=o;++r)yield*z(t,r)}function*z(t,n){let e=t.length;if(e===0||n===0){yield[];return}for(let r=0;r<e;++r){let o=Tt(t,r,1);for(let u of z(o,n-1))yield[t[r],...u]}}function Rt(t,n,e=null,r=null){e=e||p,r=r||f;let o=t.length,u=n.length;for(let i=0;i<=o-u;++i)if(q(t,n,i,e,r))return i;return-1}function Ye(t,n,e=null,r=null){e=e||p,r=r||f;let o=t.length,u=n.length;for(let i=o-u;i>=0;--i)if(q(t,n,i,e,r))return i;return-1}function Be(t,n,e=null,r=null){e=e||p,r=r||f;let o=t.length,u=n.length,i=[];for(let l=0;l<=o-u;++l)q(t,n,l,e,r)&&i.push(l);return i}function q(t,n,e,r,o){let u=n.length;for(let i=0;i<u;++i){let l=o(t[e+i],e+i,t),c=o(n[i],i,n);if(r(l,c)!==0)return!1}return!0}function Xt(t,n,e=null,r=null){e=e||p,r=r||f;let o=[...n].map(r),u=o.length,i=-1,l=-1,c=0;for(let s of t){let a=r(s,++l,t);if(e(a,o[c])===0&&(i<0&&(i=l),++c>=u))return i}return-1}function _e(t,n=Math.random){n=n||Math.random;let e=Math.floor(n()*t.length);return t[e]}function ze(t,n=-1,e=Math.random){e=e||Math.random;let r=t.length;return n>r?null:(n=n>=0?n:Math.floor((r+1)*e()),t.slice(0,n))}function Ce(t,n=-1,e=Math.random){let r=t.length;return n>r?null:(n=n>=0?n:Math.floor((r+1)*e()),t.slice(r-n))}function He(t,n=-1,e=Math.random){let r=t.length;if(n>r)return null;n=n>=0?n:Nt(r,e());let o=Math.floor((r+1-n)*e());return t.slice(o,o+n)}function Nt(t,n){let e=.5*t*(t+1)+1,r=.5*Math.sqrt(1+8*n*e)-.5;return t+1-Math.floor(r+1)}function xe(t,n=-1,e=Math.random){let r=t.length;return n>r?null:n>=0?Et(t,n,e):qt(t,e)}function Et(t,n,e){let r=I(0,t.length);return C(r,n,e).sort(),ut(t,r)}function qt(t,n){let e=[];for(let r of t)n()<.5&&e.push(r);return e}function Ge(t,n=-1,e=Math.random){let r=t.length;return n>r?null:C(t.slice(),n,e)}function C(t,n=-1,e=Math.random){e=e||Math.random;let r=t.length;if(n>r)return t;n=n>=0?n:Math.floor((r+1)*e());for(let o=0;o<n;++o){let u=o+Math.floor((r-o)*e()),i=t[o];t[o]=t[u],t[u]=i}return t.length=n,t}function Ze(t,n){return t.find(n)}function Qe(t,n){for(let e=t.length-1;e>=0;--e)if(n(t[e],e,t))return t[e]}function Ke(t,n=1){return n=Math.max(n,0),t.slice(0,n)}function je(t,n=1){let e=t.length;return n=Math.min(Math.max(n,0),e),t.slice(e-n)}function Je(t,n){return t.slice(0,H(t,n))}function tr(t,n){return t.slice(x(t,n))}function nr(t,n=1){return n=Math.max(n,0),t.slice(n)}function er(t,n=1){let e=t.length;return n=Math.min(Math.max(n,0),e),t.slice(0,e-n)}function rr(t,n){return t.slice(H(t,n))}function or(t,n){return t.slice(0,x(t,n))}function H(t,n){let e=-1;for(let r of t)if(!n(r,++e,t))return e;return++e}function x(t,n){let e=t.length-1;for(;e>=0&&n(t[e],e,t);--e);return++e}function ur(t,n){let e=-1;for(let r of t)if(n(r,++e,t))return e;return++e}function ir(t,n){let e=t.length-1;for(;e>=0&&!n(t[e],e,t);--e);return++e}function lr(t,n,e=0){return t.indexOf(n,e)}function cr(t,n,e=t.length-1){return t.lastIndexOf(n,e)}function sr(t,n){return t.findIndex(n)}function ar(t,n){for(let e=t.length-1;e>=0;--e)if(n(t[e],e,t))return e;return-1}function fr(t,n){let e=-1,r=[];for(let o of t)n(o,++e,t)&&r.push(e);return r}function pr(t,n){t.forEach(n)}function Dt(t,n=null){return n?t.some(n):Ot(t)}function Ot(t){let n=t.length;for(let e=0;e<n;++e)if(t[e])return!0;return!1}function hr(t,n=null){return n?t.every(n):kt(t)}function kt(t){let n=t.length;for(let e=0;e<n;++e)if(!t[e])return!1;return!0}function gr(t,n){return t.map(n)}function Mr(t,n){let e=t.length;for(let r=0;r<e;++r)t[r]=n(t[r],r,t);return t}function dr(t,n,e){return arguments.length<=2?t.reduce(n):t.reduce(n,e)}function mr(t,n,e){let r=arguments.length<=2;for(let o=t.length-1;o>=0;--o)r?(e=t[o],r=!1):e=n(e,t[o],o,t);return e}function wr(t,n){return t.filter(n)}function vr(t,n){let e=t.length,r=0;for(let o=0;o<e;++o)n(t[o],o,t)&&(t[r++]=t[o]);return t.length=r,t}function yr(t,n){let e=t.length,r=[];for(let o of n)o>=0&&o<e&&r.push(t[o]);return r}function $r(t,n){let e=-1,r=[];for(let o of t)n(o,++e,t)||r.push(o);return r}function br(t,n){let e=t.length,r=0;for(let o=0;o<e;++o)n(t[o],o,t)||(t[r++]=t[o]);return t.length=r,t}function Pr(t,n){let e=-1,r=[];for(let o of t)n.includes(++e)||r.push(o);return r}function Ar(t,n=-1,e=null,r=null){return e=e||f,r=r||v,G([],t,n,e,r)}function G(t,n,e,r,o){let u=-1;for(let i of n){let l=r(i,++u,n);e!==0&&o(l,u,n)?G(t,i,e-1,r,o):t.push(l)}return t}function Sr(t,n=null,e=null){n=n||f,e=e||v;let r=-1,o=[];for(let u of t){let i=n(u,++r,t);e(i,r,t)?M(o,i):o.push(i)}return o}function Rr(t,n,e){let r=[],o=t.length;for(let u=0;u<o;++u)r.push(e),e=n(e,t[u],u,t);return r}function Xr(t,n,e){let r=t.length;for(let o=0;o<r;++o){let u=t[o];t[o]=e,e=n(e,u,o,t)}return t}function Nr(t,n,e){let r=arguments.length<=2,o=[],u=t.length;for(let i=0;i<u;++i)e=r?t[i]:n(e,t[i],i,t),o.push(e),r=!1;return o}function Er(t,n,e){let r=t.length;for(let o=0;o<r;++o)e=t[o]=n(e,t[o],o,t);return t}function qr(t,n,e){let r=[];t.length>0&&r.push(n(e,t[0]));let o=t.length;for(let u=1;u<o;++u)r.push(n(t[u-1],t[u]));return r}function Dr(t,n,e){let r=t.length;if(r===0)return t;let o=t[0];t[0]=n(e,o);for(let u=1;u<r;++u){let i=t[u];t[u]=n(o,i),o=i}return t}function Or(t,n){let e=[],r=-1;for(let o of t)++r>0&&e.push(n),e.push(o);return e}function kr(t,n){let e=[],r,o=-1;for(let u of t)++o>0&&e.push(n(r,u)),e.push(r=u);return e}function Tr(t,n,e=1,r=1,o=e,u=r){let i=t.length,l=n.length,c=[];e=Math.max(e,0),r=Math.max(r,0),o=Math.max(o,1),u=Math.max(u,1);for(let s=0,a=0;s<i;s+=o){if(s>0){for(let m=a,d=m+r;m<d;++m)c.push(n[m%l]);a+=u}M(c,t.slice(s,s+e))}return c}function Ir(t){let n=[];for(let e=0;;++e){let r=0;for(let o of t)e<o.length&&(n.push(o[e]),++r);if(r===0)break}return n}function Wr(t,n=null,e=null,r){n=n||f,e=e||Dt;let o=t.length,u=[];if(o===0)return u;let i=new Array(o).fill(!1),l=t.map(c=>c.length);for(let c=0;;++c){let s=[];for(let a=0;a<o;++a)i[a]=c>=l[a],s[a]=i[a]?r:t[a][c];if(e(i))break;u.push(n(s,c,null))}return u}function Fr(t,n,e=0,r=t.length){return t.slice().fill(n,e,r)}function Vr(t,n,e=0,r=t.length){return t.fill(n,e,r)}function Lr(t,...n){return t.concat(n)}function Ur(t,...n){return t.push(...n),t}function Yr(t){return t.slice(0,-1)}function Br(t){return t.pop(),t}function _r(t){return t.slice(1)}function zr(t){return t.shift(),t}function Cr(t,...n){return M(n,t)}function Hr(t,...n){return t.unshift(...n),t}function xr(t,n,e=0,r=0,o=n.length){return D(t.slice(),n,e,r,o)}function D(t,n,e=0,r=0,o=n.length){for(e=h(t,e),[r,o]=g(n,r,o);r<o;++r,++e)t[e]=n[r];return t}function Gr(t,n=0,e=0,r=t.length){return t.slice().copyWithin(n,e,r)}function Zr(t,n=0,e=0,r=t.length){return t.copyWithin(n,e,r)}function Qr(t,n=0,e=0,r=t.length){return n=h(t,n),[e,r]=g(t,e,r),n<e?k(t,n,e,r):k(t,e,r,n)}function k(t,n,e,r){return t.slice(0,n).concat(t.slice(e,r),t.slice(n,e),t.slice(r))}function Kr(t,n=0,e=0,r=t.length){n=h(t,n),[e,r]=g(t,e,r);let o=t.slice(e,r),u=o.length;return n<e?t.copyWithin(n+u,n,e):t.copyWithin(e,r,n),D(t,o,n<e?n:n-u)}function Tt(t,n,e=t.length,...r){return n=h(t,n),e=Math.max(e,0),M(t.slice(0,n),r,t.slice(n+e))}function jr(t,n,e=t.length,...r){return t.splice(n,e,...r),t}function Jr(t,n){let e=-1,r=0;for(let o of t)n(o,++e,t)&&++r;return r}function to(t,n=null){n=n||f;let e=-1,r=new Map;for(let o of t){let u=n(o,++e,t);r.set(u,(r.get(u)||0)+1)}return r}function no(t,n){let e=[],r=[],o=-1;for(let u of t)n(u,++o,t)?e.push(u):r.push(u);return[e,r]}function eo(t,n=null){n=n||f;let e=-1,r=new Map;for(let o of t){let u=n(o,++e,t);r.has(u)||r.set(u,[]),r.get(u).push(o)}return r}function ro(t,n){let e=-1,r=[],o=[];for(let u of t)n(u,++e,t)?o.length&&(r.push(o),o=[]):o.push(u);return o.length&&r.push(o),r}function oo(t,n){let e=-1,r=[],o=[];for(let u of t)n.includes(++e)?o.length&&(r.push(o),o=[]):o.push(u);return o.length&&r.push(o),r}function uo(t,n){let e=0,r=[],o=t.length;for(let u=0;u<o;++u)n(t[u],u,t)&&(r.push(t.slice(e,u)),e=u);return r.push(t.slice(e)),r}function io(t,n){let e=0,r=[],o=t.length;for(let u=0;u<o;++u)n(t[u],u,t)&&(r.push(t.slice(e,u+1)),e=u+1);return r.push(t.slice(e)),r}function lo(t,n){let e=t.length,r=0,o=[];for(let u of n)u=u<0?e+u:u,o.push(t.slice(r,u)),r=Math.max(r,u);return o.push(t.slice(r)),o}function co(t,n){let e=t.length,r=0,o=[];for(let u of n)u=u<0?e+u:u,o.push(t.slice(r,u+1)),r=Math.max(r,u+1);return o.push(t.slice(r)),o}function so(t,n=null,e=null){n=n||p,e=e||f;let r=[],o=[],u,i=-1;for(let l of t){let c=e(l,++i,t);i===0||n(u,c)===0?o.push(l):(r.push(o),o=[l]),u=c}return r.push(o),r}function ao(t,n=1,e=n){let r=[];if(n<0)return r;e=Math.max(e,1);let o=t.length;for(let u=0;u<o;u+=e)r.push(t.slice(u,u+n));return r}function fo(...t){return[].concat(...t)}function M(t,...n){for(let e of n)t.push(...e);return t}function po(t,n=","){return t.join(n)}function ho(t,n=0,e=t.length){let r=t.length;if(e<=0||r===0)return[];n=y(n,r);let o=t.slice(n,n+e);e-=o.length;let u=Math.floor(e/r);for(let i=0;i<u;++i)M(o,t);return M(o,t.slice(0,e%r))}function go(t,n=1){let e=[];for(;n>0;--n)M(e,t);return e}function Mo(t){return t.slice().reverse()}function mo(t){return t.reverse()}function wo(t,n=0){return n=y(n,t.length),M(t.slice(n),t.slice(0,n))}function vo(t,n=0){n=y(n,t.length);let e=t.slice(0,n);return t.copyWithin(0,n),D(t,e,t.length-n)}function yo(t,n=null,e=null){return n?Wt(t,n,e):It(t,e)}function It(t,n=null){n=n||f;let e=new Set,r=-1;for(let o of t){let u=n(o,++r,t);if(e.has(u))return!1;e.add(u)}return!0}function Wt(t,n=null,e=null){n=n||p,e=e||f;let r=[...t].map(e);for(let o of r)for(let u of r)if(n(o,u)===0)return!1;return!0}function $o(t,n,e=null,r=null){return e?Vt(t,n,e,r):Ft(t,n,r)}function Ft(t,n,e=null){e=e||f;let r=$(n,e),o=-1;for(let u of t){let i=e(u,++o,t);if(r.has(i))return!1}return!0}function Vt(t,n,e=null,r=null){e=e||p,r=r||f;let o=[...n].map(r),u=-1;for(let i of t){let l=r(i,++u,t);for(let c of o)if(e(l,c)===0)return!1}return!0}function bo(t,n=null,e=null){return n?Ut(t,n,e):Lt(t,e)}function Lt(t,n=null){n=n||f;let e=new Set,r=-1,o=[];for(let u of t){let i=n(u,++r,t);e.has(i)||(e.add(i),o.push(u))}return o}function Ut(t,n=null,e=null){n=n||p,e=e||f;let r=-1,o=[],u=[];t:for(let i of t){let l=e(i,++r,t);for(let c of o)if(n(c,l)===0)continue t;o.push(l),u.push(i)}return u}function Po(t,n,e=null,r=null){return Yt(t.slice(),n,e,r)}function Yt(t,n,e=null,r=null){return e?_t(t,n,e,r):Bt(t,n,r)}function Bt(t,n,e=null){e=e||f;let r=$(t,e),o=-1;for(let u of n){let i=e(u,++o,n);r.has(i)||t.push(u)}return t}function _t(t,n,e=null,r=null){e=e||p,r=r||f;let o=t.map(r),u=-1;t:for(let i of n){let l=r(i,++u,n);for(let c of o)if(e(c,l)===0)continue t;t.push(i)}return t}function Ao(t,n,e=null,r=null){return e?Ct(t,n,e,r):zt(t,n,r)}function zt(t,n,e=null){e=e||f;let r=$(n,e),o=-1,u=[];for(let i of t){let l=e(i,++o,t);r.has(l)&&u.push(i)}return u}function Ct(t,n,e=null,r=null){e=e||p,r=r||f;let o=[...n].map(r),u=-1,i=[];t:for(let l of t){let c=r(l,++u,t);for(let s of o)if(e(c,s)===0){i.push(l);continue t}}return i}function T(t,n,e=null,r=null){return e?xt(t,n,e,r):Ht(t,n,r)}function Ht(t,n,e=null){e=e||f;let r=$(n,e),o=-1,u=[];for(let i of t){let l=e(i,++o,t);r.has(l)||u.push(i)}return u}function xt(t,n,e=null,r=null){e=e||p,r=r||f;let o=[...n].map(r),u=-1,i=[];t:for(let l of t){let c=r(l,++u,t);for(let s of o)if(e(c,s)===0)continue t;i.push(l)}return i}function So(t,n,e=null,r=null){let o=O(t),u=O(n),i=T(o,u,e,r),l=T(u,o,e,r);return M(i,l)}function Ro(t,n=null){n=n||f;let e=t.length,r=[];if(e===0)return r;let o=new Array(e).fill(0),u=t.map(i=>i.length);if(u.some(i=>i===0))return r;for(let i=0;;++i){let l=[];for(let s=0;s<e;++s)l.push(t[s][o[s]]);r.push(n(l,i,null));let c=e-1;for(;c>=0&&!(++o[c]<u[c]);--c)o[c]=0;if(c<0)break}return r}export{Nr as accumulate,qr as adjacentCombine,Dr as adjacentCombine$,hr as allOf,Dt as anyOf,Lr as append,Ur as append$,A as at,_ as back,Ro as cartesianProduct,ao as chunk,Gn as clear$,Vn as clone,E as compare,fo as concat,M as concat$,xr as copy,D as copy$,Gr as copyWithin,Zr as copyWithin$,Jr as count,to as countAs,to as countEach,uo as cut,lo as cutAt,co as cutAtRight,io as cutRight,ho as cycle,Ln as deepClone,T as difference,nr as drop,er as dropRight,rr as dropWhile,or as dropWhileRight,ke as endsWith,zn as entries,hr as every,Rr as exclusiveScan,Xr as exclusiveScan$,Fr as fill,Vr as fill$,wr as filter,vr as filter$,yr as filterAt,Ze as find,wr as findAll,sr as findIndex,ar as findLastIndex,Qe as findRight,ye as first,Ar as flat,Sr as flatMap,pr as forEach,Fn as from,O as from$,Wn as fromApplication,Wn as fromApply,In as fromCall,In as fromInvocation,Fn as fromIterable,O as fromIterable$,I as fromRange,ye as front,A as get,ut as getAll,W as getPath,so as group,eo as groupToMap,Te as hasInfix,Zn as hasPath,Ie as hasPermutation,Oe as hasPrefix,vt as hasSubsequence,ke as hasSuffix,ue as hasUnsortedValue,Xe as hasValue,ye as head,Cn as ientries,bt as iinfixes,Yn as ikeys,Re as includes,Nr as inclusiveScan,Er as inclusiveScan$,h as index,lr as indexOf,g as indexRange,He as infix,Ve as infixes,be as init,Ir as interleave,Tr as intermix,kr as interpolate,Ao as intersection,Or as intersperse,St as ipermutations,yt as iprefixes,v as is,$o as isDisjoint,Hn as isEmpty,ve as isEqual,oe as isSorted,yo as isUnique,P as isubsequences,$t as isuffixes,_n as ivalues,po as join,Un as keys,_ as last,cr as lastIndexOf,Ke as left,ot as length,gr as map,Mr as map$,pe as max,he as maxEntry,pe as maximum,we as maximumEntries,he as maximumEntry,me as maximums,Pe as middle,ae as min,fe as minEntry,ae as minimum,de as minimumEntries,fe as minimumEntry,Me as minimums,Qr as moveWithin,Kr as moveWithin$,ce as partialSort,st as partialSort$,no as partition,eo as partitionAs,eo as partitionEach,Ge as permutation,C as permutation$,Ue as permutations,C as permute$,Yr as pop,Br as pop$,Yr as popBack,Yr as popBack$,_r as popFront,zr as popFront$,ze as prefix,We as prefixes,Cr as prepend,Hr as prepend$,Lr as push,Ur as push$,Lr as pushBack,Ur as pushBack$,Cr as pushFront,Hr as pushFront$,He as randomInfix,Ge as randomPermutation,C as randomPermutation$,ze as randomPrefix,xe as randomSubsequence,Ce as randomSuffix,_e as randomValue,ge as range,mt as rangeEntries,se as rangedPartialSort,L as rangedPartialSort$,le as rangedSort,ct as rangedSort$,dr as reduce,mr as reduceRight,$r as reject,br as reject$,Pr as rejectAt,ne as remove,ee as remove$,re as removePath$,go as repeat,xn as resize$,Mo as reverse,mo as reverse$,je as right,wo as rotate,vo as rotate$,ur as scanUntil,ir as scanUntilRight,H as scanWhile,x as scanWhileRight,sr as search,qe as searchAdjacentDuplicate,qe as searchAdjacentDuplicateValue,fr as searchAll,Rt as searchInfix,Be as searchInfixAll,Ye as searchInfixRight,Y as searchMaximumValue,B as searchMaximumValues,U as searchMinimumValue,N as searchMinimumValues,De as searchMismatch,De as searchMismatchedValue,ar as searchRight,Xt as searchSubsequence,V as searchUnsortedValue,wt as searchValue,Ee as searchValueAll,Ne as searchValueRight,Qn as set,F as set$,Kn as setPath$,Vn as shallowClone,_r as shift,zr as shift$,C as shuffle$,ot as size,Ae as slice,Se as slice$,Dt as some,ie as sort,lt as sort$,Tt as splice,jr as splice$,ro as split,oo as splitAt,Oe as startsWith,xe as subsequence,Le as subsequences,Ce as suffix,Fe as suffixes,jn as swap,it as swap$,Jn as swapRanges,te as swapRanges$,So as symmetricDifference,$e as tail,Ke as take,je as takeRight,Je as takeWhile,tr as takeWhileRight,Mo as toReversed,ie as toSorted,Tt as toSpliced,Po as union,Yt as union$,bo as unique,Cr as unshift,Hr as unshift$,_e as value,Bn as values,Qn as with,Wr as zip};
2
+ //# sourceMappingURL=index.js.map