-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbasic.js
More file actions
1 lines (1 loc) · 37.2 KB
/
Copy pathbasic.js
File metadata and controls
1 lines (1 loc) · 37.2 KB
1
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((t="undefined"!=typeof globalThis?globalThis:t||self).$={})}(this,function(t){"use strict";function n(t){return t.length=0,t}function e(t){return void 0===t}function r(t){return Boolean(t.length)}function o(t){return null===t}function i(t){return!e(t)&&!o(t)}function s(t){return t}function c(t,n,e,r){if(!t)return;const o=t.length;if(i(e))for(let i=0;i<o;i++)n.call(e,t[i],i,t,o,r);else for(let e=0;e<o;e++)n(t[e],e,t,o,r);return t}function u(t,n=s,e=[],r,o){return i(r)?c(t,(t,s,c,u)=>{const f=n.call(r,t,s,e,c,u,o);i(f)&&e.push(f)}):c(t,(t,s,c,u)=>{const f=n(t,s,e,c,u,r,o);i(f)&&e.push(f)}),e}async function f(t,n,e,r){if(!t)return;const o=t.length;if(i(e))for(let i=0;i<o;i++)await n.call(e,t[i],i,t,o,r);else for(let e=0;e<o;e++)await n(t[e],e,t,o,r);return t}async function a(t,n=s){const e=[];return await f(t,async(t,r,o)=>{const s=await n(t,r,e,o);i(s)&&e.push(s)}),e}const{sign:l}=Math;function h(t){return-1===l(t)}function p(t,n,e,r){let o=t;for(;o<n;)r.push(o),o+=e;return r}function g(t,n,e,r){let o=t;for(;o>n;)r.push(o),o-=e;return r}function y(t){return Boolean(t)}function d(t,n=y,e){if(!t)return;const r=t.length;if(r){for(let o=0;o<r;o++)if(!1===n(t[o],o,t,r,e))return!1;return!0}}function m(t){return function(n,...e){return e?.length?t(n)&&d(e,t):t(n)}}const b=m(Array.isArray);const A=Reflect.construct;function w(t,n=[],e){const r=b(n)?n:[n];return e?A(t,r,e):A(t,r)}function v(t){return b(t)&&t||i(t)&&[t]||[]}function x(t){return t.flat(1/0)}function C(t,n){return t.forEach(n),t}function O(...t){const n=w(Map),e=[];return c(t,(t,e)=>{c(t,(t,r)=>{let o=n.get(t);if(o){if(o.parentIndex===e)return;o.count++}else o={count:1,parentIndex:e,child:t},n.set(t,o)})}),C(n,t=>{1===t.count&&0===t.parentIndex&&e.push(t.child)}),e}function M(t,n=1,e=t.length){return t.splice(n,e)}function I(t,n,e){if(!t)return;const r=t.length;for(let o=r-1;o>=0;o--)n(t[o],o,t,r,e);return t}async function E(t,n){if(!t)return;const e=t.length;for(let r=e-1;r>=0;r--)await n(t[r],r,t,e);return t}async function j(t,n,e){if(!t)return;const r=t.length;for(let o=0;o<r;o++)if(!1===await n(t[o],o,t,r,e))return!1;return!0}function T(t,n,e=[],r){return c(t,(t,o,i,s)=>{!0===n(t,o,e,i,s,r)&&e.push(t)}),e}async function F(t,n,e=[],r){return await f(t,async(t,o,i,s)=>{!0===await n(t,o,e,i,s,r)&&e.push(t)}),e}function B(t){return t?n=>n?.constructor===t||!1:()=>!1}const S=B(globalThis.Buffer),R=m(S);function N(t,...n){return globalThis.Buffer?Buffer.isBuffer?Buffer.isBuffer(t)&&(!n?.length||d(n,Buffer.isBuffer)):R(t,...n):Error("Buffer is not available in this environment")}const P=B(Date),U=m(P),k=t=>!!i(t)&&"Object("===t.constructor.toString().trim().slice(9,16),$=B(RegExp),D=m($);function L(t){return t?.constructor}function q(t){return L(t)?.name}const z=/Array/;function K(t){if(t){const n=q(t);if(z.test(n)&&"Array"!==n)return!0}return!1}const V=Object.keys;function Z(t){if(t)return V(t)}function W(t,n){if(t===n)return!0;if(null===t||null===n||void 0===t||void 0===n)return!1;if(typeof t!=typeof n)return!1;if(N(t))return N(n)&&t.equals(n);if(U(t))return U(n)&&t.getTime()===n.getTime();if(D(t))return D(n)&&t.source===n.source&&t.flags===n.flags;if(b(t)||K(t))return t.length===n?.length&&d(t,(t,e)=>W(t,n[e]));if(k(t)){if(!k(n))return!1;const e=Z(t);return e.length===Z(n).length&&d(e,e=>W(t[e],n[e]))}return!1}const _=Math.max;function G(t,n,e=[],r,o){return i(r)?c(t,(t,i,s,c)=>{e[i]=n.call(r,t,i,e,s,c,o)}):c(t,(t,r,i,s)=>{e[r]=n(t,r,e,i,s,o)}),e}async function J(t,n,e){if(!t)return;const r=[],o=t.length;if(e)for(let i=0;i<o;i++)r[i]=n.call(e,t[i],i,r,o);else for(let e=0;e<o;e++)r[e]=n(t[e],e,r,o);return Promise.all(r)}async function H(t,n){const e=[];return await f(t,async(t,r,o)=>{e[r]=await n(t,r,e,o)}),e}function Q(t,n){return t-n}function X(t,n){return n-t}const{floor:Y,random:tt}=Math;function nt(t,n=0){return Y(tt()*(t-n))+n}const et=Array.from;function rt(t,n,e){if(i(t))return et(t,n,e)}function ot(t,n=t.length){if(t.length<=1)return rt(t);const e=rt(t);let r,o,i=0;for(;i<n;)r=nt(e.length-1,0),o=e[i],e[i]=e[r],e[r]=o,i++;return e}const it=Math.min;function st(t,n,e){return e.indexOf(t)===n}function ct(t,n,e){return t!==e[n-1]}function ut(t,n){return n?t.filter(ct):t.filter(st)}function ft(t){return(N(t)||t?.fill)&&t.fill(0),t}const at=t=>!!i(t)&&t instanceof Function,lt=B(Number),ht=m(lt);const pt=m(B(String));function gt(t,n){const e=L(t);return e&&e===n||!1}function yt(t){return n=>{const e=q(n);return e&&e===t||!1}}const dt=Object.assign;function mt(t,n){if(k(n))dt(t,n);else if(at(n)){const e=n.name;e?t[e]=n:dt(t,n)}else(pt(n)||ht(n))&&(t[n]=n);return t}function bt(t={},...n){const e=n.length;for(let r=0;r<e;r++)mt(t,n[r]);return t}function At(t,n){if(k(n))dt(t.prototype,n);else if(at(n)){const e=n.name;e&&(t.prototype[e]=n)}else if(gt(n)){const e=n.constructor?.name;e&&(t.prototype[e]=n)}else(pt(n)||ht(n))&&(t.prototype[n]=n);return t}function wt(t,n,e,r,o){if(t[o]===r)return!0}function vt(t,n,e,r){const o=t[e],i=n[e];return o===i&&r?r(t,n,e):i?o?o<i?1:o>i?-1:0:1:-1}function xt(t,n="id",e){return t.sort((t,r)=>vt(t,r,n,e))}function Ct(t,n,e,r){const o=t[e],i=n[e];return o===i&&r?r(t,n,e):i?o?o<i?-1:o>i?1:0:-1:1}function Ot(t,n="id",e){return t.sort((t,r)=>Ct(t,r,n,e))}function Mt(t,n){if(t)return pt(n)?t[n]:G(n,n=>t[n])}function It(t,n,e,r){const o=t[e],i=n[e];return o===i&&r?r(t,n,e):o.localeCompare(i)}function Et(t,n,e,r){const o=t[e],i=n[e];return o===i&&r?r(t,n,e):i.localeCompare(o)}function jt(t){return n=>!!i(n)&&t.test(n)}const Tt=jt(/\.css$/),Ft=jt(/\.html$/),Bt=jt(/\.js$/),St=jt(/\.json$/);const Rt=async(t,n,e,r)=>{if(!t)return;const o=Z(t);return i(e)?await f(o,(i,s,c,u)=>n.call(e,t[i],i,t,u,o,r)):await f(o,(e,i,s,c)=>n(t[e],e,t,c,o,r)),t};function Nt(t,n,e,r){if(!t)return;const o=Z(t);return i(e)?c(o,(o,i,s,c)=>{n.call(e,t[o],o,t,c,s,r)}):c(o,(e,o,i,s)=>{n(t[e],e,t,s,i,r)}),t}const Pt=B(Set),Ut=m(Pt);function kt(t,n){if(Ut(t)){for(const e of t)n(e,t);return t}for(const[e,r]of t)n(r,e,t);return t}const $t=yt("GeneratorFunction"),Dt=m($t);async function Lt(t,n,e){if(Ut(t)){for(const e of t)await n(e,t);return t}if(Dt(t))for await(const r of t(...e))await n(r,t);for(const[e,r]of t)await n(r,e,t);return t}const qt=yt("AsyncFunction"),zt=m(qt);function Kt(t,n,e,r,o,s){return(c,u,f,a,l)=>{let h;const p=zt(u);if(i(c)&&u)return h=b(c)?p?n:t:k(c)||at(c)?p?r:e:o?p?s:o:Dt(c)?s:p?r:e,h(c,u,f,a,l)}}const Vt=Kt(c,f,Nt,Rt,kt,Lt);class Zt{constructor(t){this.addChainMethod(t)}addChainMethod(t){const n=this;Vt(t,(t,e)=>{n[e]=function(...e){return this.value=t.call(n,n.value,...e),n}})}setValue(t){return this.value=t,this}done(){const t=this.value;return this.value=null,t}value=null}class Wt{list=w(Map);remove(t){clearTimeout(t),this.list.delete(t)}has(t){return this.list.has(t)}get(t){return this.list.get(t)}set(t,n){const e=this,r=setTimeout(()=>{t(),e.remove(r)},n);return this.list.set(r,!0),r}clear(){const t=this;t.list.forEach(n=>{t.remove(n)})}}const _t=w(Wt);function Gt(t,n){return _t.set(t,n)}const Jt=Reflect.apply;function Ht(t,n,e){if(at(t))return Jt(t,n,e)}function Qt(t,n=[]){const e=L(t);return e===Function&&"function"===e.name?function(){}:w(e,n)}function Xt(t,n=s,e){const r=e||Qt(t);if(b(t)||Ut(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){o(n(e,r,t))}return r}const o=at(r.set);for(const[e,i]of t){const s=n(i,e,r,t);o?r.set(e,s):r[e]=s}return r}async function Yt(t,n=s,e,r){if(Dt(t)){const e=[];for await(const o of t(...r))e.push(await n(o,e,t));return e}const o=e||Qt(t);if(b(t)||Ut(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){r(await n(e,o,t))}return o}const i=at(o.set);for await(const[e,r]of t){const s=await n(r,e,o,t);i?o.set(e,s):o[e]=s}return o}async function tn(t,n,e={}){if(t)return await Rt(t,async(t,r,o,i,s)=>{e[r]=await n(t,r,e,o,i,s)}),e}function nn(t,n,e={},r,o){if(t)return i(r)?Nt(t,(t,i,s,c,u)=>{e[i]=n.call(r,t,i,e,s,c,u,o)}):Nt(t,(t,r,i,s,c)=>{e[r]=n(t,r,e,i,s,c,o)}),e}const en=Kt(G,H,nn,tn,Xt,Yt);async function rn(t,n){if(!t)return;return j(Z(t),(e,r,o,i)=>n(t[e],e,t,i,o))}function on(t,n){if(!t)return;return d(Z(t),(e,r,o,i)=>n(t[e],e,t,i,o))}function sn(t,n=s){if(b(t)||Ut(t))for(const e of t){if(!1===n(e,t))return!1}else for(const[e,r]of t){if(!1===n(r,e,t))return!1}return!0}async function cn(t,n=s,e){if(Dt(t))for await(const r of t(...e)){if(!1===await n(r,t))return!1}else if(b(t)||Ut(t))for(const e of t){if(!1===await n(e,t))return!1}else for(const[e,r]of t){if(!1===await n(r,e,t))return!1}return!0}const un=Kt(d,j,on,rn,sn,cn);const fn=/\.|\[/,an=/]/g;function ln(t){return t.replace(an,"").split(fn)}function hn(t,n){if(!n)return!1;let e=n;return d(b(t)?t:ln(t),t=>(e=e[t],i(e))),e}const pn=Function.prototype;function gn(t){return pn.call.bind(t)}const yn=Object.getOwnPropertyNames,dn=Object.getOwnPropertyDescriptor,mn=Object.defineProperty,bn=gn(Object.hasOwnProperty),An=Object.is;const{random:wn}=Math;const{round:vn,floor:xn,ceil:Cn}=Math;function On(t,n,e){if(!e)return t(n);const r=10**e;return t(n*r)/r}const{sign:Mn}=Math;function In(t){return 0===t}async function En(t,n=s,e={}){return await Rt(t,async(t,r,o,s,c)=>{const u=await n(t,r,e,o,s,c);i(u)&&(e[r]=u)}),e}function jn(t,n=s,e={}){return Nt(t,(t,r,o,s,c)=>{const u=n(t,r,e,o,s,c);i(u)&&(e[r]=u)}),e}const Tn=Object.assign;const Fn=Object.assign;function Bn(t,n,e={}){return Nt(t,(t,r,o,i,s)=>{!0===n(t,r,e,o,i,s)&&(e[r]=t)}),e}async function Sn(t,n,e={}){return await Rt(t,async(t,r,o,i,s)=>{!0===await n(t,r,e,o,i,s)&&(e[r]=t)}),e}const Rn=Object.entries;const Nn=Object.hasOwn;const Pn=/[()[\]{}*+?^$|#.,/\\\s-]/g;function Un(t){return t.replace(Pn,"\\$&")}function kn(t,n){return n?kn(G(t,Un)):RegExp(t.join("|"))}function $n(t){if(!t)return;if(k(t))return Z(t).length;const n=t.length;if(i(n))return n;const e=t.size;return i(n)?e:Z(t).length}const Dn=/[ _-]+/g;const Ln=/[ _-]+/g,qn=/[ ]+/g;const zn=/[ _-]+/g,Kn=/[ ]+/g;const Vn=/[ _-]+/g;const Zn=/[ _-]+/g;function Wn(t,n=1){return t.substring(n)}const _n=/%(?![\da-f]{2})/gi,Gn=/&/g,Jn=/</g,Hn=/>/g,Qn=/"/g;function Xn(t){return decodeURIComponent(t.replace(_n,()=>"%25"))}function Yn(t){return t.replace(Gn,"&").replace(Jn,"<").replace(Hn,">").replace(Qn,""")}const te=/[̀-ͯ]/g,ne=/[^a-z0-9]+/g,ee=/^-+|-+$/g;const re=/\S+/g,oe=/\w+/g;const ie=/\w+/g;function se(t){return t[0].toUpperCase()}function ce(t){return se(t)+Wn(t)}function ue(t){return se(t)+Wn(t).toLowerCase()}const fe=B(Map),ae=m(fe);function le(t){return!i(t)}function he(t,n){if(le(t)||at(t))return!1;if(b(t)||K(t))return!0;const e=t.length;if(le(e)||!ht(e)||e<0)return!1;if(n){const n=Z(t);return!!n&&un(n,(t,n)=>n>=0&&ht(n))}return!0}const pe=B(BigInt),ge=m(pe),ye=B(Boolean),de=m(ye),me=B(ArrayBuffer),be=m(me);const Ae=RegExp("Array|ArrayBuffer|Boolean|DataView|Date|Map|Object|Boolean|Number|BigInt|String|RegExp|Set|Error|EvalError|RangeError|ReferenceError|SyntaxError|TypeError|URIError");const we=B(Error),ve=m(we);function xe(t){return!1===t}const Ce=B(Float32Array),Oe=m(Ce),Me=B(Float64Array),Ie=m(Me),{isInteger:Ee}=Number,je=Ee,Te=B(Int16Array),Fe=m(Te),Be=B(Int32Array),Se=m(Be),Re=B(Int8Array),Ne=m(Re);function Pe(t){return!!t&&t instanceof Promise}function Ue(t){return!!t&&(Pe(t)||zt(t)||Dt(t))}const{isSafeInteger:ke}=Number,$e=ke;const De=B(Uint16Array),Le=m(De),qe=B(Uint32Array),ze=m(qe),Ke=B(Uint8Array),Ve=m(Ke),Ze=B(Uint8ClampedArray),We=m(Ze),_e=B(WeakMap),Ge=m(_e);const Je=void 0!==globalThis.Deno,He=void 0!==globalThis.process&&process.versions&&process.versions.node;function Qe(t,n=!0){return Boolean(t)&&n}function Xe(t,n){return xe(W(t,n))}const Ye=JSON,tr=Ye.parse;function nr(t,n){if(pt(t))return tr(t,n)}const er=Ye.stringify;function rr(t,n,e){const r=globalThis.options||e;let o;return at(r)?o=`${r.name} : ${r.constructor.name}`:r&&(o=`${r.title||r.method.name} -> ${r.file}`),new Error(`Test Failed: ${o}\n\t\t\tResult: ${er(t)}\n\t\t\tExpected: ${er(n)}`,r)}async function or(t){return Pe(t)||Ue(t)?await t:t}const ir=/^class[\s{]/;function sr(t){return at(t)&&!function(t){return"function"==typeof t&&ir.test(Function.prototype.toString.call(t))}(t)}async function cr(t,n,e){const r=await or(t);if(r===n)return!0;if(sr(n)){return!1!==await n(r,e)||rr(r,n,e)}const o=await or(n);return!Xe(r,o)||rr(r,o,e)}const ur=globalThis.structuredClone;async function fr(t,n=s,e,r){if(Dt(t)){const e=[];for await(const o of t(...r)){const r=await n(o,e,t);i(r)&&e.push(r)}return e}const o=e||Qt(t);if(b(t)||Ut(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){const s=await n(e,o,t);i(s)&&r(s)}return o}const c=at(o.set);for await(const[e,r]of t){const s=await n(r,e,o,t);i(s)&&(c?o.set(e,s):o[e]=s)}return o}function ar(t,n=s,e){const r=e||Qt(t);if(b(t)||Ut(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){const s=n(e,r,t);i(s)&&o(s)}return r}const o=at(r.set);for(const[e,s]of t){const c=n(s,e,r,t);i(c)&&(o?r.set(e,c):r[e]=c)}return r}const lr=Kt(u,a,jn,En,ar,fr);function hr(t,n){return new Promise(e=>{setTimeout(()=>e(n),t)})}const pr=globalThis.requestAnimationFrame;function gr(t,n=s,e){const r=e||Qt(t);if(b(t)||Ut(t)){const e=r.push||r.add,o=e&&e.bind(r);for(const e of t){!0===n(e,r,t)&&o(e)}}else{const e=at(r.set);for(const[o,i]of t){!0===n(i,o,r,t)&&(e?r.set(o,i):r[o]=i)}}return r}async function yr(t,n=s,e,r){if(Dt(t)){const e=[];for await(const o of t(...r))!0===await n(o,e,t)&&e.push(o);return e}const o=e||Qt(t);if(b(t)||Ut(t)){const e=o.push||o.add,r=e&&e.bind(o);for(const e of t){!0===await n(e,o,t)&&r(e)}}else{const e=at(o.set);for await(const[r,i]of t){!0===await n(i,r,o,t)&&(e?o.set(r,i):o[r]=i)}}return o}const dr=Kt(T,F,Bn,Sn,gr,yr);function mr(t){return(...n)=>e=>{let r=e;return t(n,t=>{r=t(r)}),r}}const br=mr(c),Ar=mr(I);function wr(t){return(...n)=>async e=>{let r=e;return await t(n,async t=>{r=await t(r)}),r}}const vr=wr(f),xr=wr(E);const Cr=jt(/\./);class Or{list=w(Map);remove(t){clearInterval(t),this.list.delete(t)}has(t){return this.list.has(t)}get(t){return this.list.get(t)}set(t,n){const e=setInterval(()=>{t()},n);return this.list.set(e,!0),e}clear(){const t=this;t.list.forEach(n=>{t.remove(n)})}}const Mr=w(Or);class Ir{static models=new Map;constructor(t,n){i(n)?(bt(this,n),this.modelName=t,Ir.models.set(t,n)):bt(this,t)}delete(t){Ir.models.delete(t||this.modelName)}set(t){t&&(this.modelName=t),Ir.models.set(t||this.modelName,this)}has(t){return Ir.models.has(t||this.modelName)}get(t){return Ir.models.get(t||this.modelName)}}class Er{source;constructor(t={}){if(this.source=t,null===t||"object"!=typeof t)return t;Nt(t,n=>{t[n]=new Er(t[n])}),this.data=new Proxy(t,{get:(t,n)=>(console.log(t,n,t[n]),t[n]),set:(t,n,e)=>(console.log(t,n,t[n]),t[n]=new Er(e),!0)})}}class jr{totalActive=0;freed=[];totalFree=0;get(){let t=this.freed.shift();return i(t)?this.totalFree--:(t=this.totalActive,this.totalActive++),t}free(t){this.freed.push(t),this.totalFree++;const n=this.totalActive>0,e=this.totalActive===this.totalFree;n&&e&&this.reset()}reset(){this.totalActive=0,this.freed.length=0,this.totalFree=0}}const Tr=w(jr),Fr=globalThis.crypto,Br="function"==typeof Fr?.randomUUID;class Sr{constructor(t=new Map){this.items=t,this.isMap=t instanceof Map}getItem(t){return this.isMap?this.items.get(t):this.items[t]}get(...t){return this.getItem(...t)}hasItem(t){return this.isMap?this.items.has(t):i(this.items[t])}has(...t){return this.hasItem(...t)}setItem(t,n){return this.isMap?this.items.set(t,n):this.items[t]=n,this}set(...t){return this.setItem(...t)}clear(){return this.isMap?this.items.clear():this.items=Qt(this.items),this}removeItem(t){return this.isMap?this.items.delete(t):this.items[t]=null,this}remove(...t){return this.removeItem(...t)}}t.Chain=Zt,t.Emitter=class{constructor(){this.listeners=new Map}on(t,n){const e=this.listeners.get(t);return e?e.push(n):this.listeners.set(t,[n]),this}once(t,n){const e=(...r)=>{this.off(t,e),n(...r)};return this.on(t,e)}off(t,n){const e=this.listeners.get(t);if(!e)return this;if(!n)return this.listeners.delete(t),this;const r=e.filter(t=>t!==n);return r.length?this.listeners.set(t,r):this.listeners.delete(t),this}emit(t,...n){const e=this.listeners.get(t);if(!e)return!1;for(const t of[...e])t(...n);return!0}clear(){this.listeners.clear()}},t.Intervals=Or,t.LRUCache=class{constructor(t=100){this.capacity=t,this.store=new Map}get(t){if(!this.store.has(t))return;const n=this.store.get(t);return this.store.delete(t),this.store.set(t,n),n}set(t,n){if(this.store.has(t))this.store.delete(t);else if(this.store.size>=this.capacity){const t=this.store.keys().next().value;this.store.delete(t)}return this.store.set(t,n),this}has(t){return this.store.has(t)}delete(t){return this.store.delete(t)}clear(){this.store.clear()}get size(){return this.store.size}},t.Model=Ir,t.Store=Er,t.Timers=Wt,t.UniqID=jr,t.VirtualStorage=Sr,t.add=function(t,n){return t+n},t.after=function(t,n){let e,r=t;return(...t)=>(null!==r&&r--,r<=0&&(e=n(...t),r=null),e)},t.apply=Ht,t.arrayToRegex=kn,t.arraysToObject=function(t,n){const e={};return c(t,(t,r)=>{e[n[r]]=t}),e},t.ary=function(t,n){return(...e)=>t(...e.splice(0,n))},t.assert=function(t,n,e){if(Ue(t)||Ue(n)||Pe(t)||Pe(n))return cr(t,n,e);if(t===n)return!0;if(sr(n)){return!1!==n(t,e)||rr(t,n,e)}return!Xe(t,n)||rr(t,n,e)},t.assertAsync=cr,t.assign=bt,t.assignToClass=At,t.assignToObject=mt,t.before=function(t,n){let e,r=t;return(...t)=>(null!==r&&r--,r>=1?e=n(...t):r=null,e)},t.bindAll=function(t,n,e){const r=en(t,t=>at(t)?t.bind(n):t);return e?bt(e,r):r},t.cacheNativeMethod=gn,t.calcProgress=function(t,n){return 0!==t&&(0===n?0:n/t*100)},t.camelCase=function(t){let n="";return t.replace(Dn," ").trim().split(" ").forEach((t,e)=>{n+=0===e?t.toLowerCase():t[0].toUpperCase()+t.slice(1).toLowerCase()}),n},t.ceilTo=function(t,n=0){return On(Cn,t,n)},t.chain=function(t){return w(Zt,[t])},t.chunk=function(t,n=1){const e=[];let r=0;return t.forEach((t,o)=>{o%n||(e.push([]),o&&r++),e[r].push(t)}),e},t.chunkString=function(t,n){return t.match(new RegExp(`(.|[\r\n]){1,${n}}`,"g"))},t.clamp=function(t,n,e){return t<n?n:t>e?e:t},t.clear=function(t){if(t){if(N(t))return ft(t);if(b(t))return n(t);t.clear?t.clear():t.length&&(t.length=0)}return t},t.clearArray=n,t.clearBuffer=ft,t.clearIntervals=function(){Mr.clear()},t.clearTimers=function(){_t.clear()},t.clone=function(t){return ur(t)},t.cloneArray=function(t){return t.slice()},t.cloneType=Qt,t.compact=function(t){if(k(t)){const n=Z(t),e=n.length,r={};for(let o=0;o<e;o++){const e=n[o],i=t[e];Qe(i)&&(r[e]=i)}return r}return t.filter(t=>Qe(t))},t.compactKeys=function(t){const n=[];return Nt(t,(t,e)=>{i(t)&&n.push(e)}),n},t.compactMap=lr,t.compactMapArray=u,t.compactMapAsyncArray=a,t.compactMapAsyncObject=En,t.compactMapObject=jn,t.concurrent=async function(t,n,...e){const r=t.length,o=[];if(n)for(let i=0;i<r;i++){const r=t[i];o[i]=t[i].call(n,...e,i,o,r)}else for(let n=0;n<r;n++){const r=t[n];o[n]=t[n](...e,n,o,r)}return Promise.all(o)},t.concurrentEach=async function(t,n,e){if(t)return b(t)?J(t,n,e):void 0},t.concurrentEachArray=J,t.concurrentStatus=function(t,n,e){const r=t.length,o=[];for(let i=0;i<r;i++)o[i]=n(t[i],i,t,r,e);return Promise.allSettled(o)},t.cond=function(t){return function(...n){for(const[e,r]of t)if(e.apply(this,n))return r.apply(this,n)}},t.consolidate=function(...t){return Tn({},...t)},t.constant=function(t){return()=>t},t.construct=w,t.copy=function(t){if(t)return Fn({},t)},t.countBy=function(t,n){const e={};let r;return c(t,t=>{r=n(t),e[r]||(e[r]=0),e[r]++}),e},t.countKey=function(t,n){let e=0;return c(t,t=>{t[n]&&e++}),e},t.countWithoutKey=function(t,n){let e=0;return c(t,t=>{t[n]||e++}),e},t.curry=function(t,e=t.length){const r=[],o=(...i)=>{if(r.push(...i),r.length===e){const e=t(...r);return n(r),e}return o};return o},t.curryRight=function(t,e=t.length){const r=[],o=(...i)=>{if(r.unshift(...i),r.length===e){const e=t(...r);return n(r),e}return o};return o},t.debounce=function(t,n){function e(...t){!1!==e.id&&_t.remove(e.id),e.id=Gt(()=>{e.callable(...t),e.id=!1},n)}return e.id=!1,e.callable=t.bind(e),e.clear=()=>{!1!==e.id&&(_t.remove(e.id),e.id=!1)},e},t.deduct=function(t){return t-1},t.defProp=mn,t.defaults=function(t,...n){const e={...t},r=n.length;for(let t=0;t<r;t++){const r=n[t],o=Object.keys(r),i=o.length;for(let t=0;t<i;t++){const n=o[t];void 0===e[n]&&(e[n]=r[n])}}return e},t.delay=hr,t.difference=O,t.divide=function(t,n){return t/n},t.drop=M,t.dropRight=(t,n=1,e=t.length)=>M(t,0,e-n),t.each=Vt,t.eachArray=c,t.eachAsyncArray=f,t.eachAsyncObject=Rt,t.eachObject=Nt,t.eachRight=I,t.eachRightAsync=E,t.ensureArray=v,t.ensureBuffer=function(t){return globalThis.Buffer?N(t)&&t||i(t)&&Buffer.from(t)||Buffer.alloc(0):Error("Buffer is not available in this environment")},t.equalsZero=In,t.escapeRegex=Un,t.escapeRegexRegex=Pn,t.every=un,t.everyArg=function(...t){return zt(t[0])?async function(...n){return un(t,async t=>un(n,async n=>t(n)))}:function(...n){return un(t,t=>un(n,n=>t(n)))}},t.everyArray=d,t.everyAsyncArray=j,t.everyAsyncObject=rn,t.everyObject=on,t.extendClass=function(t,...n){const e=n.length;for(let r=0;r<e;r++)At(t,n[r]);return t},t.filter=dr,t.filterArray=T,t.filterAsyncArray=F,t.filterAsyncObject=Sn,t.filterObject=Bn,t.findIndex=function(t,n,e="id"){const r=t.findIndex((t,r)=>wt(t,0,0,n,e));return-1!==r&&r},t.findIndexCache=wt,t.findItem=function(t,n,e="id"){const r=t.find((t,r)=>wt(t,0,0,n,e));return-1!==r&&r},t.first=function(t,n){return n?t.slice(0,n):t[0]},t.flatten=function(t,n=1){if(!t)return;let e=t;for(let t=0;t<n;t++)e=e.reduce((t,n)=>t.concat(v(n)),[]);return e},t.flattenDeep=x,t.floorTo=function(t,n=0){return On(xn,t,n)},t.flow=br,t.flowAsync=vr,t.flowAsyncRight=xr,t.flowRight=Ar,t.forCompactMap=function(t,n){const e=Qt(t),r=e.push||e.add;if(r&&at(r)){const o=r.bind(e);t.forEach(t=>{const r=n(t,e);i(r)&&o(r)})}else at(e.set)?t.forEach((t,r)=>{const o=n(t,r,e);i(o)&&e.set(r,o)}):t.forEach((t,r)=>{const o=n(t,r,e);i(o)&&(e[r]=o)});return e},t.forEach=C,t.forEachAsync=async function(t,n){const e=[],r=[];let o=0;t.forEach((t,n)=>{e[o]=t,r[o]=t,o++});for(let t=0;t<o;t++)await n(e[t],r[t]);return t},t.forMap=function(t,n){const e=Qt(t),r=e.push||e.add;if(r&&at(r)){const o=r.bind(e);t.forEach(t=>{const r=n(t,e);o(r)})}else at(e.set)?t.forEach((t,r)=>{const o=n(t,r,e);e.set(r,o)}):t.forEach((t,r)=>{const o=n(t,r,e);e[r]=o});return e},t.forOf=kt,t.forOfAsync=Lt,t.forOfCompactMap=ar,t.forOfCompactMapAsync=fr,t.forOfEvery=sn,t.forOfEveryAsync=cn,t.forOfFilter=gr,t.forOfFilterAsync=yr,t.forOfMap=Xt,t.forOfMapAsync=Yt,t.generateLoop=Kt,t.get=hn,t.getChild=function(t){return null==t?null:t.constructor??null},t.getCollectionInsertIndex=function(t,n,e){let r=0;return d(t,(t,o)=>(r=o,n[e]>=t[e]&&(r=o+1,!0))),r},t.getConstructor=L,t.getConstructorName=q,t.getEntries=function(t){if(i(t))return Rn(t)},t.getFileExtension=function(t){if(t)return t.substring(t.lastIndexOf(".")+1)},t.getFilename=function(t){if(t)return t.substring(t.lastIndexOf("/")+1)},t.getHighest=function(t,n="id"){return Ot(t,n)[0]},t.getLowest=function(t,n){return xt(t,n,!1)[0]},t.getNumberInsertIndex=function(t,n){let e=0;return d(t,(t,r)=>(e=r,n>=t&&(e=r+1,!0))),e},t.getParent=function(t){return null==t?null:Object.getPrototypeOf(t)},t.getPropDesc=dn,t.getPropNames=yn,t.getType=L,t.getTypeName=q,t.groupBy=function(t,n){const e={};return c(t,t=>{const r=n(t);e[r]||(e[r]=[]),e[r].push(t)}),e},t.has=function t(n,e,r){if(le(n)||le(e))return!1;if(n===e)return!0;if(pt(n))return pt(e)?n.includes(e,r):D(e)?e.test(n):at(e)?e(n):b(e)?d(e,e=>t(n,e)):un(e,e=>t(n,e));if(b(n))return D(e)?n.some(t=>e.test(t)):at(e)?n.some(e):b(e)?d(e,e=>t(n,e)):n.includes(e,r);if(k(n)){const t=Object.keys(n),r=t.length;if(D(e)){for(let o=0;o<r;o++)if(e.test(n[t[o]]))return!0;return!1}if(at(e)){for(let o=0;o<r;o++){const r=t[o];if(e(n[r],r,n))return!0}return!1}if(k(e))return on(e,(t,e)=>n[e]===t);for(let o=0;o<r;o++)if(n[t[o]]===e)return!0;return!1}return!1},t.hasAnyKeys=function(t,...n){if(t)return Boolean(n.find(n=>{const e=ln(n);if(1===e.length)return Nn(t,n);{const n=e.pop(),r=hn(e,t);return!!r&&Nn(r,n)}}))},t.hasDot=Cr,t.hasKeys=function(t,...n){if(t)return d(n,n=>{const e=ln(n);if(1===e.length)return Nn(t,n);{const n=e.pop(),r=hn(e,t);return!!r&&Nn(r,n)}})},t.hasLength=r,t.hasProp=bn,t.hasValue=i,t.htmlEntities=Yn,t.ifInvoke=function(t,n,...e){if(at(t))return n?t.call(n,...e):t(...e)},t.ifNotAssign=(t,n,e)=>(n&&!i(t[n])&&(t[n]=e),t),t.ifValue=function(t,n,e,r){if(i(t)){if(at(n))return e?Ht(n,e,r):n(...r);if(k(n))return n[e]=t,n}},t.inAsync=async function(t,n,...e){const r=t.length,o=[];if(n)for(let i=0;i<r;i++){const r=t[i];o[i]=await t[i].call(n,...e,i,r)}else for(let n=0;n<r;n++){const r=t[n];o[n]=await t[n](...e,n,r)}return o},t.inSync=function(t,n,...e){const r=t.length,o=[];if(n)for(let i=0;i<r;i++){const r=t[i];o[i]=r.call(n,...e,i,r)}else for(let n=0;n<r;n++){const r=t[n];o[n]=r(...e,n,r)}return o},t.increment=function(t){return t+1},t.indexBy=function(t,n="id"){const e={};return c(t,t=>{e[t[n]]=t}),e},t.initial=function(t){return t.slice(0,t.length-1)},t.initialString=function(t,n=1){return t.slice(0,-1*n)},t.insertInRange=function(t,n,e){return t.slice(0,n)+e+t.slice(n,t.length)},t.intersection=function(t,...n){return u(t,t=>{if(d(n,n=>n.includes(t)))return t})},t.interval=function(t,n){return Mr.set(t,n)},t.intervals=Mr,t.invert=function(t,n={}){if(t)return Nt(t,(t,e)=>{n[t]=e}),n},t.invokeArray=function(t,n,e){if(!t)return;const r=t.length;if(i(e))for(let o=0;o<r;o++)t[o].call(e,n);else for(let e=0;e<r;e++)t[e](n);return t},t.invokeCollection=function(t,n,e,r){return G(t,r?(t,o)=>t[n].call(r,e):(t,r)=>t[n](e))},t.invokeCollectionAsync=function(t,n,e,r){return H(t,r?t=>t[n].call(r,e):async t=>t[n](e))},t.isArguments=function(t){return!!i(t)&&"[object Arguments]"===t.toString()},t.isArray=b,t.isArrayBuffer=be,t.isArrayBufferCall=me,t.isArrayLike=he,t.isAsync=zt,t.isAsyncCall=qt,t.isBigInt=ge,t.isBigIntCall=pe,t.isBoolean=de,t.isBooleanCall=ye,t.isBuffer=N,t.isBufferCall=S,t.isChild=function(t,n){return!(!t||!n)&&t instanceof n},t.isCloneable=function(t){if(i(t)){const n=t?.constructor?.name;return Ae.test(n)}return!1},t.isConstructor=gt,t.isConstructorFactory=B,t.isDate=U,t.isDateCall=P,t.isDeno=Je,t.isEmpty=function(t){return pt(t)||b(t)?!r(t):k(t)?!$n(t):!i(t)},t.isEqual=W,t.isError=ve,t.isErrorCall=we,t.isEven=function(t){return!(1&t)},t.isF32=Oe,t.isF32Call=Ce,t.isF64=Ie,t.isF64Call=Me,t.isFalse=xe,t.isFalsy=function(t,n=!0){return!1===Boolean(t)&&n},t.isFileCSS=Tt,t.isFileHTML=Ft,t.isFileJS=Bt,t.isFileJSON=St,t.isFloat=je,t.isFunction=at,t.isGenerator=Dt,t.isGeneratorCall=$t,t.isI16=Fe,t.isI16Call=Te,t.isI32=Se,t.isI32Call=Be,t.isI8=Ne,t.isI8Call=Re,t.isIndexable=function(t){return b(t)||K(t)||pt(t)||he(t)},t.isIterable=function(t){return i(t)&&"function"==typeof t[Symbol.iterator]},t.isKindAsync=Ue,t.isMap=ae,t.isMapCall=fe,t.isMatchArray=function(t,n){return t.length===n.length&&d(t,(t,e)=>W(n[e],t))},t.isMatchObject=(t,n)=>{if(t===n)return!0;const e=Z(t),r=Z(n);return e.length===r.length&&d(e,e=>t[e]===n[e])},t.isNegative=h,t.isNodejs=He,t.isNotArray=function(t,...n){return!b(t,...n)},t.isNotNumber=function(t){return!ht(t)},t.isNotString=function(t){return!pt(t)},t.isNull=o,t.isNumber=ht,t.isNumberCall=lt,t.isNumberEqual=function(t,n){return t===n},t.isNumberInRange=function(t,n,e){return t>n&&t<e},t.isNumberNotInRange=function(t,n,e){return t<n||t>e},t.isOdd=function(t){return!(1&~t)},t.isParent=function(t,n){return!!(t&&n&&n.call)&&t instanceof n},t.isPlainObject=k,t.isPositive=function(t){return 1===Mn(t)},t.isPrimitive=function(t){const n=typeof t;return null==t||"object"!==n&&"function"!==n},t.isPromise=Pe,t.isRegex=D,t.isRegexCall=$,t.isRelated=function(t,n){return!le(t)&&!le(n)&&(t.call?n instanceof t:n.call?t instanceof n:n.constructor===t.constructor)},t.isSafeInt=$e,t.isSame=An,t.isSameType=function(t,n){const e=L(t),r=L(n);return e===r&&e.name===r.name},t.isSet=Ut,t.isSetCall=Pt,t.isString=pt,t.isTrue=function(t){return!0===t},t.isTruthy=Qe,t.isType=gt,t.isTypeFactory=m,t.isTypeNameFactory=yt,t.isTypedArray=K,t.isU16=Le,t.isU16Call=De,t.isU32=ze,t.isU32Call=qe,t.isU8=Ve,t.isU8C=We,t.isU8CCall=Ze,t.isU8Call=Ke,t.isUndefined=e,t.isWeakMap=Ge,t.isWeakMapCall=_e,t.isZero=In,t.jsonParse=nr,t.jsonParseNative=tr,t.jsonParseTry=function(t,n){if(t)try{return nr(t,n)}catch(t){return}},t.kebabCase=function(t){return t.replace(/([A-Z]+)/g," $1").replace(Ln," ").trim().toLowerCase().replace(qn,"-")},t.keyBy=function(t,n){const e={},r="function"==typeof n;for(let o=0;o<t.length;o++){const i=t[o];e[r?n(i,o,t):i[n]]=i}return e},t.keys=Z,t.largest=function(t){return _(...t)},t.last=function(t,n){const e=t.length;return n?t.slice(e-n,e):t[e-1]},t.lowerCase=function(t){return t.replace(/([A-Z]+)/g," $1").replace(Zn," ").trim().toLowerCase()},t.map=en,t.mapArray=G,t.mapAsyncArray=H,t.mapAsyncObject=tn,t.mapKeys=function(t,n){const e={},r=Object.keys(t),o=r.length;for(let i=0;i<o;i++){const o=r[i],s=t[o];e[n(s,o,t)]=s}return e},t.mapObject=nn,t.mapRightArray=function(t,n,e=[],r){let o=0;const i=t.length;for(let s=i-1;s>=0;s--)e[o]=n(t[s],s,t,i,r),o++;return e},t.mapValues=function(t,n){const e={},r=Object.keys(t),o=r.length;for(let i=0;i<o;i++){const o=r[i];e[o]=n(t[o],o,t)}return e},t.mapWhile=function(t,n,e=[],r){const o=t.length;for(let i=0;i<o;i++){const s=t[i];if(!1===n(s,i,e,t,o,r))break;e[i]=s}return e},t.max=function(t){if(t?.length)return Math.max(...t)},t.mean=function(t){if(!t?.length)return;let n=0;for(let e=0;e<t.length;e++)n+=t[e];return n/t.length},t.median=function(t){if(!t?.length)return;const n=[...t].sort((t,n)=>t-n),e=n.length>>1;return n.length%2?n[e]:(n[e-1]+n[e])/2},t.memoize=function(t,n){const e=new Map;function r(...r){const o=n?n(...r):r[0];if(e.has(o))return e.get(o);const i=t.apply(this,r);return e.set(o,i),i}return r.cache=e,r},t.merge=function t(n,...e){return Vt(e,e=>{Vt(e,(e,r)=>{if(n[r]&&(k(e)||b(e)))return t(n[r],e);n[r]=e})}),n},t.min=function(t){if(t?.length)return Math.min(...t)},t.model=function(t,n){return i(n)?w(Ir,[t,n]):Ir.models.get(t)},t.multiply=function(t,n){return t*n},t.negate=function(t){return(...n)=>!t(...n)},t.nextFrame=function(){return new Promise(pr?t=>pr(t):t=>setTimeout(t,0))},t.noValue=le,t.noop=function(){},t.notEmpty=function(t){return pt(t)||b(t)?r(t):k(t)?$n(t)>0:i(t)},t.notEqual=Xe,t.nthArg=function(t=0){return(...n)=>n[t]},t.objectAssign=dt,t.objectEntries=Rn,t.objectSize=$n,t.omit=function(t,n){if(!t)return{};if(b(n)){const e=kn(n);return Bn(t,(t,n)=>!e.test(n))}if(D(n))return Bn(t,(t,e)=>!n.test(e));if(pt(n))return Bn(t,(t,e)=>e!==n);if(ht(n)){const e=n.toString();return Bn(t,(t,n)=>n!==e)}return at(n)?Bn(t,(t,e)=>!n(t,e)):dt({},t)},t.once=t=>{let n;return(...e)=>(i(n)||(n=t(...e)),n)},t.onlyUnique=st,t.over=function(t){return(...n)=>en(t,t=>t(...n))},t.overArgs=function(t,n){const e=n.length;return function(...r){const o=new Array(r.length);for(let t=0;t<r.length;t++)o[t]=t<e?n[t](r[t]):r[t];return t.apply(this,o)}},t.overAsync=function(t){return async(...n)=>en(t,async t=>t(...n))},t.overEvery=function(t){return n=>un(t,t=>t(n))},t.pair=function(t,n){return[t,n]},t.partition=function(t,n){const e=[];return[u(t,(t,r)=>{if(n(t,r))return t;e.push(t)}),e]},t.pick=(t,n,e={})=>{if(t)return c(n,n=>{e[n]=t[n]}),e},t.pluck=function(t,n){return G(t,t=>Mt(t,n))},t.pluckObject=Mt,t.promise=function(t){return new Promise(t)},t.property=function(t){return n=>hn(t,n)},t.propertyMatch=(t,n,e=Z(t))=>d(e,e=>W(t[e],n[e])),t.propertyOf=function(t){return n=>hn(n,t)},t.randomFloat=function(t,n=0){return wn()*(t-n)+n},t.randomInt=nt,t.randomString=function(t,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"){const e=n.length;let r="";for(let o=0;o<t;o++)r+=n[Math.floor(Math.random()*e)];return r},t.range=function(t,n,e=1,r=[]){return h(e)?r:t<n?p(t,n,e,r):g(t,n,e,r)},t.rangeDown=g,t.rangeUp=p,t.rawURLDecode=Xn,t.reArg=function(t,n){return(...e)=>t(...n.map(t=>e[t]))},t.regexTestFactory=jt,t.remainder=function(t,n){return t%n},t.remove=function(t,n){let e=t.length;for(let r=0;r<e;r++){const o=t[r];n.includes(o)&&(t.splice(r,1),r--,e--)}return t},t.removeBy=function(t,n){let e=t.length;for(let r=0;r<e;r++){n(t[r],r)&&(t.splice(r,1),r--,e--)}return t},t.replaceList=function(t,n,e){return t.replace(new RegExp(`\\b${n.join("|")}\\b`,"gi"),e)},t.rest=function(t){return t.slice(1,t.length)},t.restString=Wn,t.retry=async function(t,{attempts:n=3,wait:e=0,factor:r=1}={}){let o,i=e;for(let e=0;e<n;e++)try{return await t(e)}catch(t){o=t,e<n-1&&i>0&&(await hr(i),i*=r)}throw o},t.returnValue=s,t.right=function(t,n){return t[t.length-1-n]},t.rightString=function(t,n=1){return t[t.length-n]},t.roundTo=function(t,n=0){return On(vn,t,n)},t.sameClass=function(t,n){const e=L(t),r=L(n);return Boolean(e)&&e===r},t.sameType=function(t,n){return typeof t==typeof n},t.sample=function(t,n){if(!t)return!1;const e=t.length;if(e===n||n>e)return ot(t);if(1===n)return[t[nt(e-1,0)]];const r=[],o={};let i,s=0;for(;s<n;)i=nt(t.length-1,0),o[i]||(r.push(t[i]),o[i]=!0,s++);return r},t.sanitize=function(t){return Yn(Xn(t))},t.set=function(t,n,e){if(!t)return t;const r=b(n)?n:ln(n),o=r.length-1;let i=t;for(let t=0;t<o;t++){const n=r[t];if(void 0===i[n]||null===i[n]){const e=r[t+1];i[n]=/^\d+$/.test(e)?[]:{}}i=i[n]}return i[r[o]]=e,t},t.setKey=function(t,n,e){return n&&k(t)||ht(n)&&b(t)?t[n]=e:t.set?t.set(n,e):t.push?t.push(e):t.add?t.add(e):t[n]=e,t},t.setValue=function(t,n,e){return ht(e)&&b(t)?t[e]=n:t.push?t.push(n):t.add?t.add(n):t[e]=n,t},t.shuffle=ot,t.slugify=function(t,n="-"){const e=t.normalize("NFKD").replace(te,"").toLowerCase().replace(ne,n);if("-"===n)return e.replace(ee,"");const r=n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return e.replace(new RegExp(`^${r}+|${r}+$`,"g"),"")},t.smallest=function(t){return it(...t)},t.snakeCase=function(t){return t.replace(/([A-Z]+)/g," $1").replace(zn," ").trim().toLowerCase().replace(Kn,"_")},t.sortBy=function(t,n){const e="function"==typeof n;return[...t].sort((t,r)=>function(t,n){return t<n?-1:t>n?1:0}(e?n(t):t[n],e?n(r):r[n]))},t.sortCollectionAlphabetically=function(t,n="id",e){return t.sort((t,r)=>It(t,r,n,e))},t.sortCollectionAlphabeticallyReverse=function(t,n="id",e){return t.sort((t,r)=>Et(t,r,n,e))},t.sortCollectionAscending=Ot,t.sortCollectionAscendingFilter=Ct,t.sortCollectionDescending=xt,t.sortCollectionDescendingFilter=vt,t.sortNumberAscending=function(t){return t.sort(Q)},t.sortNumberDescending=function(t){return t.sort(X)},t.sortObjectsAlphabetically=It,t.sortObjectsAlphabeticallyReverse=Et,t.sortUnique=ct,t.stringify=er,t.stubArray=function(){return[]},t.stubFalse=function(){return!1},t.stubObject=()=>({}),t.stubString=()=>"",t.stubTrue=()=>!0,t.subtract=Q,t.subtractAll=function(t){return t.reduce((t,n)=>t-n)},t.subtractReverse=X,t.sumAll=function(t){return t.reduce((t,n)=>t+n,0)},t.take=function(t,n=1){return t.slice(0,n)},t.takeRight=function(t,n=1){const e=t.length;return t.slice(e-n,e)},t.throttle=function(t,n){function e(...t){e.id?e.shouldThrottle=!0:(e.callable(...t),e.id=Gt(()=>{e.shouldThrottle&&e.callable(...t),e.id=!1},n))}return e.id=!1,e.callable=t.bind(e),e.clear=()=>{_t.remove(e.id),e.id=!1},e},t.timer=Gt,t.timers=_t,t.times=function(t,n,e){for(let r=0;r<t;r++)e&&n.call(e,r)||n(r)},t.timesAsync=async function(t,n,e){for(let r=0;r<t;r++)e&&await n.call(e,r)||await n(r)},t.timesMap=function(t,n,e=[]){for(let r=0;r<t;r++)e[r]=n(t);return e},t.timesMapAsync=async function(t,n,e=[]){for(let r=0;r<t;r++)e[r]=await n(t);return e},t.toArray=rt,t.toPath=ln,t.toggle=function(t,n=!0,e=!1){return W(n,t)?e:n},t.tokenize=function(t){return t.match(re)||[]},t.truncate=function(t,n){const e=t.length;return e>n?((t,n,e)=>{const r=t.split(""),o=r.length;let i,s=e-n;for(;s<o&&s>=0&&(i=r[s]," "!==i);s--);return t.slice(0,s).trim()})(t,n,e):t},t.truncateRight=function(t,n){const e=t.length;return e>n?((t,n,e)=>{const r=t.split(""),o=r.length;let i,s=n;for(;s<o&&s>0&&(i=r[s]," "!==i);s++);return t.substring(s,e).trim()})(t,n,e):t},t.unZip=function(t){return t[0].map((n,e)=>t.map(t=>t[e]))},t.unZipObject=t=>{const n=[],e=[];return Nt(t,(t,r)=>{n.push(r),e.push(t)}),[n,e]},t.union=function(...t){return ut(x(t))},t.uniqID=Tr,t.unique=ut,t.untilFalseArray=function(t,n){const e=t.length;for(let r=0;r<e;r++)if(!1===n(t[r],r))return!1;return!0},t.untilTrueArray=function(t,n){const e=t.length;for(let r=0;r<e;r++)if(!0===n(t[r],r))return!1;return!0},t.upperCase=function(t){return t.replace(/([A-Z]+)/g," $1").replace(Vn," ").trim().toUpperCase()},t.upperFirst=ce,t.upperFirstAll=function(t){return t.replace(ie,t=>ce(t))},t.upperFirstLetter=se,t.upperFirstOnly=ue,t.upperFirstOnlyAll=function(t){return t.replace(ie,t=>ue(t))},t.uuid=function(){return Br?Fr.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const n=16*Math.random()|0;return("x"===t?n:3&n|8).toString(16)})},t.virtualStorage=function(t){return new Sr(t)},t.whileCompactMap=function(t,n,e=[],r){let o=0;for(;o<t.length;){const s=n(t[o],o,t,t.length,r);i(s)&&e.push(s),o++}return e},t.whileEachArray=function(t,n,e){let r=0;for(;r<t.length;)n(t[r],r,t,t.length,e),r++;return t},t.whileMapArray=function(t,n,e=[],r){let o=0;for(;o<t.length;)e.push(n(t[o],o,t,t.length,r)),o++;return t},t.withTimeout=function(t,n,e="Timed out"){const r="function"==typeof t?t():t;return new Promise((t,o)=>{const i=setTimeout(()=>o(new Error(e)),n);r.then(n=>{clearTimeout(i),t(n)},t=>{clearTimeout(i),o(t)})})},t.without=function(t,n){if(!n)return t;const e=w(Set,[n]);return t.filter(t=>!e.has(t))},t.words=function(t){return t.match(oe)||[]},t.wrap=function(t,n){return(...e)=>n(t,...e)},t.xor=function(...t){const n=w(Map),e=[];return 2===t.length?O(t[0],t[1]):(c(t,(t,e)=>{c(t,(t,r)=>{let o=n.get(t);if(o){if(o.parentIndex===e)return;o.count++}else o={count:1,parentIndex:e,child:t},n.set(t,o)})}),C(n,t=>{1===t.count&&e.push(t.child)}),e)},t.zip=function(...t){return t[0].map((n,e)=>t.map(t=>t[e]))},t.zipObject=(t,n)=>{const e={};return c(t,(t,r)=>{e[t]=n[r]}),e}});