@flemist/simple-utils 1.0.1 → 1.0.2
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/build/browser/index.cjs +1 -1
- package/build/browser/index.mjs +1 -1
- package/build/common/index.cjs +1 -1
- package/build/common/index.mjs +1 -1
- package/build/node/index.cjs +1 -1
- package/build/node/index.mjs +1 -1
- package/build/{urlGet-CtceHOCG.js → urlGet-DNatziIW.js} +5 -5
- package/build/{urlGet-DAHy2Rar.mjs → urlGet-eF8fly1y.mjs} +128 -138
- package/package.json +5 -5
package/build/browser/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../urlGet-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../urlGet-DNatziIW.js");exports.ConsoleMessageLevel=e.ConsoleMessageLevel;exports.Lazy=e.Lazy;exports.LazyWithId=e.LazyWithId;exports.Random=e.Random;exports.UNIQUE_PSEUDO_RANDOM_MAX_COUNT=e.UNIQUE_PSEUDO_RANDOM_MAX_COUNT;exports.alertReplace=e.alertReplace;exports.consoleReplace=e.consoleReplace;exports.convertTimeZone=e.convertTimeZone;exports.createUniquePseudoRandom=e.createUniquePseudoRandom;exports.dateNowUnique=e.dateNowUnique;exports.deepCloneJsonLike=e.deepCloneJsonLike;exports.deepEqualJsonLike=e.deepEqualJsonLike;exports.deepEqualJsonLikeMap=e.deepEqualJsonLikeMap;exports.equalArray=e.equalArray;exports.escapeHtml=e.escapeHtml;exports.escapeRegExp=e.escapeRegExp;exports.fixStackTrace=e.fixStackTrace;exports.formatAny=e.formatAny;exports.formatDate=e.formatDate;exports.formatDateFileName=e.formatDateFileName;exports.getDateInet=e.getDateInet;exports.getNormalizedObject=e.getNormalizedObject;exports.getRandomFunc=e.getRandomFunc;exports.getRandomSeed=e.getRandomSeed;exports.getStackTrace=e.getStackTrace;exports.max=e.max;exports.min=e.min;exports.minMax=e.minMax;exports.numberMod=e.numberMod;exports.randomBoolean=e.randomBoolean;exports.randomEnum=e.randomEnum;exports.randomFloat=e.randomFloat;exports.randomIndexWeighted=e.randomIndexWeighted;exports.randomInt=e.randomInt;exports.randomItem=e.randomItem;exports.randomItems=e.randomItems;exports.sha256=e.sha256;exports.sha256Buffer=e.sha256Buffer;exports.timeoutAbortController=e.timeoutAbortController;exports.toHex=e.toHex;exports.urlGetBoolean=e.urlGetBoolean;exports.urlGetFloat=e.urlGetFloat;exports.urlGetInt=e.urlGetInt;exports.urlGetParams=e.urlGetParams;exports.urlGetString=e.urlGetString;exports.urlParamToBoolean=e.urlParamToBoolean;exports.urlParamToFloat=e.urlParamToFloat;exports.urlParamToInt=e.urlParamToInt;exports.withConsoleReplace=e.withConsoleReplace;exports.withTimeout=e.withTimeout;
|
package/build/browser/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as s, M as o, N as t, R as n, U as r, E as m, G as l, q as d, l as u, o as i, z as c, A as p, B as g, C as I, x as R, y as T, I as f, u as x, v as h, w as E, p as L, D as M, d as N, g as P, J as U, b as k, m as q, c as A, n as C, f as D, k as F, r as G, h as S, e as y, i as B, j as O, a as b, s as w, K as z, t as J, V as _, X as v, W as H, O as W, T as j, P as Q, S as X, Q as K, H as V, L as Z } from "../urlGet-
|
|
1
|
+
import { F as s, M as o, N as t, R as n, U as r, E as m, G as l, q as d, l as u, o as i, z as c, A as p, B as g, C as I, x as R, y as T, I as f, u as x, v as h, w as E, p as L, D as M, d as N, g as P, J as U, b as k, m as q, c as A, n as C, f as D, k as F, r as G, h as S, e as y, i as B, j as O, a as b, s as w, K as z, t as J, V as _, X as v, W as H, O as W, T as j, P as Q, S as X, Q as K, H as V, L as Z } from "../urlGet-eF8fly1y.mjs";
|
|
2
2
|
export {
|
|
3
3
|
s as ConsoleMessageLevel,
|
|
4
4
|
o as Lazy,
|
package/build/common/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../urlGet-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../urlGet-DNatziIW.js");exports.ConsoleMessageLevel=e.ConsoleMessageLevel;exports.Lazy=e.Lazy;exports.LazyWithId=e.LazyWithId;exports.Random=e.Random;exports.UNIQUE_PSEUDO_RANDOM_MAX_COUNT=e.UNIQUE_PSEUDO_RANDOM_MAX_COUNT;exports.alertReplace=e.alertReplace;exports.consoleReplace=e.consoleReplace;exports.convertTimeZone=e.convertTimeZone;exports.createUniquePseudoRandom=e.createUniquePseudoRandom;exports.dateNowUnique=e.dateNowUnique;exports.deepCloneJsonLike=e.deepCloneJsonLike;exports.deepEqualJsonLike=e.deepEqualJsonLike;exports.deepEqualJsonLikeMap=e.deepEqualJsonLikeMap;exports.equalArray=e.equalArray;exports.escapeHtml=e.escapeHtml;exports.escapeRegExp=e.escapeRegExp;exports.fixStackTrace=e.fixStackTrace;exports.formatAny=e.formatAny;exports.formatDate=e.formatDate;exports.formatDateFileName=e.formatDateFileName;exports.getDateInet=e.getDateInet;exports.getNormalizedObject=e.getNormalizedObject;exports.getRandomFunc=e.getRandomFunc;exports.getRandomSeed=e.getRandomSeed;exports.getStackTrace=e.getStackTrace;exports.max=e.max;exports.min=e.min;exports.minMax=e.minMax;exports.numberMod=e.numberMod;exports.randomBoolean=e.randomBoolean;exports.randomEnum=e.randomEnum;exports.randomFloat=e.randomFloat;exports.randomIndexWeighted=e.randomIndexWeighted;exports.randomInt=e.randomInt;exports.randomItem=e.randomItem;exports.randomItems=e.randomItems;exports.sha256=e.sha256;exports.sha256Buffer=e.sha256Buffer;exports.timeoutAbortController=e.timeoutAbortController;exports.toHex=e.toHex;exports.urlGetBoolean=e.urlGetBoolean;exports.urlGetFloat=e.urlGetFloat;exports.urlGetInt=e.urlGetInt;exports.urlGetParams=e.urlGetParams;exports.urlGetString=e.urlGetString;exports.urlParamToBoolean=e.urlParamToBoolean;exports.urlParamToFloat=e.urlParamToFloat;exports.urlParamToInt=e.urlParamToInt;exports.withConsoleReplace=e.withConsoleReplace;exports.withTimeout=e.withTimeout;
|
package/build/common/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as s, M as o, N as t, R as n, U as r, E as m, G as l, q as d, l as u, o as i, z as c, A as p, B as g, C as I, x as R, y as T, I as f, u as x, v as h, w as E, p as L, D as M, d as N, g as P, J as U, b as k, m as q, c as A, n as C, f as D, k as F, r as G, h as S, e as y, i as B, j as O, a as b, s as w, K as z, t as J, V as _, X as v, W as H, O as W, T as j, P as Q, S as X, Q as K, H as V, L as Z } from "../urlGet-
|
|
1
|
+
import { F as s, M as o, N as t, R as n, U as r, E as m, G as l, q as d, l as u, o as i, z as c, A as p, B as g, C as I, x as R, y as T, I as f, u as x, v as h, w as E, p as L, D as M, d as N, g as P, J as U, b as k, m as q, c as A, n as C, f as D, k as F, r as G, h as S, e as y, i as B, j as O, a as b, s as w, K as z, t as J, V as _, X as v, W as H, O as W, T as j, P as Q, S as X, Q as K, H as V, L as Z } from "../urlGet-eF8fly1y.mjs";
|
|
2
2
|
export {
|
|
3
3
|
s as ConsoleMessageLevel,
|
|
4
4
|
o as Lazy,
|
package/build/node/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../urlGet-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../urlGet-DNatziIW.js"),N=require("@flemist/async-utils"),S=require("@flemist/time-limits"),b=require("node:os"),V=require("path"),W=require("@flemist/priority-queue"),ee=require("fs"),te=require("picomatch");function j(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const a in e)if(a!=="default"){const i=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(n,a,i.get?i:{enumerable:!0,get:()=>e[a]})}}return n.default=e,Object.freeze(n)}const w=j(V),z=j(ee),g=new S.Pool(b.cpus().length);function x(e){return e.replace(/\\/g,"/")}let I=null;function ne(e){I==null&&(I=new Map);const n=x(e);let a=I.get(n);return a==null&&(a=new N.Locker,I.set(n,a)),a}function re(e){const{filePath:n,func:a}=e;return ne(n).lock(()=>S.poolRunWait({pool:g,count:1,func:a}))}function B(e){return e.match(/^[/\\]?[^/\\]+/)[0]}function H(e,n){return B(e)+"|"+n.ino}function $(e){return e.endsWith(":")&&(e+="/"),w.resolve(e)}function _(e,n){e.totalSize+=n.totalSize,e.maxFileDateModified=Math.max(e.maxFileDateModified,n.maxFileDateModified),e.countFiles+=n.countFiles,e.countDirs+=n.countDirs,e.countLinks+=n.countLinks}const J=function(n){return n.code==="ENOENT"};function Q(e){const n=e.paths;if(!n||n.length===0)return Promise.resolve({totalSize:0,maxFileDateModified:0,countFiles:0,countDirs:0,countLinks:0});const a=e.level??0,i=e.walkedIds??new Set,r=e.abortSignal,u=e.pool??g,p=e.handleError,d=e.priority??W.priorityCreate(0),c=e.walkLinks??!1,m=e.log,F=e.handlePath,C=e.matchPath;async function R(L){if(!(p&&await p(L))&&!J(L))throw L}function Y(L){return!(!m||m.minTotalContentSize!=null&&L<m.minTotalContentSize||m.maxNestedLevel!=null&&a>m.maxNestedLevel)}return N.useAbortController(async L=>{const E=N.combineAbortSignals(r,L),T={totalSize:0,maxFileDateModified:0,countFiles:0,countDirs:0,countLinks:0};function q(f,y){if(Y(y.totalSize)){const s=`${y.totalSize.toLocaleString("en-US").replace(/,/g," ").padStart(19)}: ${f}`;m?.handleLog?m.handleLog(s):console.log(s)}}async function G(f,y,k,s){return F?await S.poolRunWait({pool:u,func:async()=>{try{return await F({level:a,path:f,stat:y,itemStat:k,totalStat:T,abortSignal:E})}catch(l){return await R(l),!1}},count:1,priority:s,abortSignal:E}):!0}async function O(f,y,k,s){s||(s=f);const l=await S.poolRunWait({pool:u,func:()=>z.promises.lstat(f).catch(R),count:1,priority:W.priorityCreate(y,W.priorityCreate(1,d)),abortSignal:E});if(!l||!k&&l.isFile())return null;const U=H(f,l);if(i.has(U))return null;i.add(U);let o={totalSize:l.size,maxFileDateModified:l.isDirectory()?0:l.mtimeMs,countFiles:0,countDirs:0,countLinks:0};const M=W.priorityCreate(y,W.priorityCreate(l.isDirectory()?2:3,d));if(l.isSymbolicLink()){if(c){const h=await S.poolRunWait({pool:u,func:()=>z.promises.readlink(f).catch(R).then(D=>D??null),count:1,priority:M,abortSignal:E});if(h){const D=w.isAbsolute(h)?h:w.resolve(w.dirname(s),h),v=await O(D,y,k,s);v&&(o=v)}}return(k||o.countFiles+o.countDirs+o.countLinks>=1)&&(o.countLinks+=1,await G(s,l,o,M)&&(_(T,o),q(s,o))),o}else if(l.isDirectory()){const h=await S.poolRunWait({pool:u,func:()=>z.promises.readdir(f).catch(R),count:1,priority:d,abortSignal:E});if(h){for(let D=0,v=h.length;D<v;D++)h[D]=w.join(s,h[D]);o=await Q({...e,paths:h,abortSignal:E,priority:M,level:a+1,walkedIds:i})}}return(k||o.countFiles+o.countDirs+o.countLinks>=1)&&(l.isDirectory()?o.countDirs+=1:l.isFile()&&(o.countFiles+=1),await G(s,l,o,M)&&(_(T,o),q(s,o))),o}const A=[];for(let f=0,y=n.length;f<y;f++){const k=$(n[f]),s=C?C(k):!0;s!==!1&&A.push(O(k,f,s))}return await Promise.all(A),T})}function ae(e){return Q(e)}function ie({globs:e,rootDir:n,noCase:a}){const i=[];return e.forEach(r=>{r=x(r).trim();const u=r.startsWith("^");u&&(r=r.substring(1).trim());const p=r.startsWith("!");if(p&&(r=r.substring(1).trim()),r.startsWith("!")||r.startsWith("^"))throw new Error(`Invalid glob pattern: "${r}". The syntax '${r.substring(0,2)}' is not supported. Valid glob patterns use: * (match any characters), ** (match any directories), ? (match single character), [abc] (character class), ! (negate pattern), ^ (exclude if included). Examples of valid patterns: "*.js", "src/**/*.ts", "!node_modules", "^dist". Avoid starting with '!' after '^' or multiple special prefixes.`);r.startsWith("/")&&(r="."+r);const d=x(n?w.resolve(n,r):r);if(!d)return;let c;try{c=te(d,{nocase:a??!1,dot:!0,strictBrackets:!0})}catch(m){throw new Error(`Invalid glob pattern: "${r}". ${m instanceof Error?m.message:"Unknown error"}. Valid glob patterns use: * (match any characters), ** (match any directories), ? (match single character), [abc] (character class with balanced brackets), ! (negate pattern), ^ (exclude if included). Examples: "*.js", "src/**/*.ts", "!node_modules", "[abc]def.txt". Ensure all brackets [ ] are properly closed and balanced.`)}i.push({exclude:u,negative:p,debugInfo:d,match:c})}),function(u){u=x(u);let p=null,d=!1;for(let c=0,m=i.length;c<m;c++){const F=i[c];F.match(u)&&(F.exclude?d=!F.negative:(p=!F.negative,d=!1))}return d?!1:p}}function X(e){const n=e.startsWith("!");return n&&(e=e.substring(1)),e.startsWith("/")?e=e.substring(1):!e.startsWith("**")&&!e.startsWith("../")&&(e=`**/${e}`),n&&(e="!"+e),e}function Z(e,n){if(!n||n===".")return e;const a=e.startsWith("^");a&&(e=e.substring(1));const i=e.startsWith("!");return i&&(e=e.substring(1)),e.startsWith("/")?(n.endsWith("/")&&(n=n.substring(0,n.length-1)),e=n+e):(n.endsWith("/")||(n+="/"),e.startsWith("./")?e=n+e.substring(2):e.startsWith("../")?e=n+e:(n.startsWith("..")&&(n=""),e.startsWith("**")?e=n+e:e=n+"**/"+e)),e=x(w.normalize(e)),i&&(e="!"+e),a&&(e="^"+e),e}function P(e){return"^"+e}async function K(e){const a=(await z.promises.readFile(e,"utf-8")).split(`
|
|
2
2
|
`),i=[];return a.forEach(r=>{r=r.trim(),!(!r||r.startsWith("#"))&&i.push(r)}),i}async function oe(e){const n=e.rootDir??".",a=[];if(!e.globs?.length)return a;const i=[];return e.globs.forEach(r=>{r.value&&(r.valueType==="file-contains-patterns"?i.push(r):r.valueType==="pattern"&&a.push(r.exclude?P(r.value):r.value))}),i.length&&await Promise.all(i.map(async r=>{await S.poolRunWait({pool:g,count:1,func:async()=>{const u=w.resolve(n,r.value),p=await K(u),d=w.relative(n,w.dirname(u));p.forEach(c=>{c=X(c),c=Z(c,d),a.push(r.exclude?P(c):c)})}})})),a}exports.ConsoleMessageLevel=t.ConsoleMessageLevel;exports.Lazy=t.Lazy;exports.LazyWithId=t.LazyWithId;exports.Random=t.Random;exports.UNIQUE_PSEUDO_RANDOM_MAX_COUNT=t.UNIQUE_PSEUDO_RANDOM_MAX_COUNT;exports.alertReplace=t.alertReplace;exports.consoleReplace=t.consoleReplace;exports.convertTimeZone=t.convertTimeZone;exports.createUniquePseudoRandom=t.createUniquePseudoRandom;exports.dateNowUnique=t.dateNowUnique;exports.deepCloneJsonLike=t.deepCloneJsonLike;exports.deepEqualJsonLike=t.deepEqualJsonLike;exports.deepEqualJsonLikeMap=t.deepEqualJsonLikeMap;exports.equalArray=t.equalArray;exports.escapeHtml=t.escapeHtml;exports.escapeRegExp=t.escapeRegExp;exports.fixStackTrace=t.fixStackTrace;exports.formatAny=t.formatAny;exports.formatDate=t.formatDate;exports.formatDateFileName=t.formatDateFileName;exports.getDateInet=t.getDateInet;exports.getNormalizedObject=t.getNormalizedObject;exports.getRandomFunc=t.getRandomFunc;exports.getRandomSeed=t.getRandomSeed;exports.getStackTrace=t.getStackTrace;exports.max=t.max;exports.min=t.min;exports.minMax=t.minMax;exports.numberMod=t.numberMod;exports.randomBoolean=t.randomBoolean;exports.randomEnum=t.randomEnum;exports.randomFloat=t.randomFloat;exports.randomIndexWeighted=t.randomIndexWeighted;exports.randomInt=t.randomInt;exports.randomItem=t.randomItem;exports.randomItems=t.randomItems;exports.sha256=t.sha256;exports.sha256Buffer=t.sha256Buffer;exports.timeoutAbortController=t.timeoutAbortController;exports.toHex=t.toHex;exports.urlGetBoolean=t.urlGetBoolean;exports.urlGetFloat=t.urlGetFloat;exports.urlGetInt=t.urlGetInt;exports.urlGetParams=t.urlGetParams;exports.urlGetString=t.urlGetString;exports.urlParamToBoolean=t.urlParamToBoolean;exports.urlParamToFloat=t.urlParamToFloat;exports.urlParamToInt=t.urlParamToInt;exports.withConsoleReplace=t.withConsoleReplace;exports.withTimeout=t.withTimeout;exports.createMatchPath=ie;exports.fileLock=re;exports.getDrive=B;exports.getFileId=H;exports.globGitIgnoreToPicomatch=X;exports.globToRelative=Z;exports.loadGlobs=oe;exports.loadGlobsFromFile=K;exports.pathNormalize=x;exports.pathResolve=$;exports.poolFs=g;exports.walkPathHandleErrorDefault=J;exports.walkPaths=ae;
|
package/build/node/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as mt, M as ht, N as pt, R as kt, U as wt, E as yt, G as xt, q as Lt, l as Dt, o as Ft, z as St, A as Et, B as Wt, C as zt, x as vt, y as Mt, I as Tt, u as It, v as Rt, w as Ct, p as Nt, D as At, d as Gt, g as Ut, J as Ot, b as $t, m as qt, c as Bt, n as _t, f as jt, k as Ht, r as Jt, h as Pt, e as Qt, i as Xt, j as gt, a as Kt, s as Zt, K as Yt, t as Vt, V as bt, X as te, W as ee, O as ne, T as se, P as ae, S as re, Q as ie, H as oe, L as ce } from "../urlGet-
|
|
1
|
+
import { F as mt, M as ht, N as pt, R as kt, U as wt, E as yt, G as xt, q as Lt, l as Dt, o as Ft, z as St, A as Et, B as Wt, C as zt, x as vt, y as Mt, I as Tt, u as It, v as Rt, w as Ct, p as Nt, D as At, d as Gt, g as Ut, J as Ot, b as $t, m as qt, c as Bt, n as _t, f as jt, k as Ht, r as Jt, h as Pt, e as Qt, i as Xt, j as gt, a as Kt, s as Zt, K as Yt, t as Vt, V as bt, X as te, W as ee, O as ne, T as se, P as ae, S as re, Q as ie, H as oe, L as ce } from "../urlGet-eF8fly1y.mjs";
|
|
2
2
|
import { Locker as j, useAbortController as H, combineAbortSignals as J } from "@flemist/async-utils";
|
|
3
3
|
import { Pool as P, poolRunWait as F } from "@flemist/time-limits";
|
|
4
4
|
import Q from "node:os";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
"use strict";const B=require("@flemist/abort-controller-fast"),
|
|
1
|
+
"use strict";const B=require("@flemist/abort-controller-fast"),K=require("@flemist/async-utils"),$t=require("@flemist/time-controller");let D=null;function Ut(){if(!D){D=new Array(256);for(let t=0;t<256;t++)D[t]=t.toString(16).padStart(2,"0")}return D}function ot(t){const e=Ut(),r=new Uint8Array(t.buffer,t.byteOffset,t.byteLength);let n="";for(let o=0,i=r.length;o<i;o++)n+=e[r[o]];return n}let Y=null,it=null,q=null,st=null;function Tt(){Y||(Y=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),it=new Uint32Array(64),st=new TextEncoder,q=new Uint8Array(65536))}function ut(t){if(t==null)return null;Tt();const e=Y,r=it,n=st;let o=q,i;if(typeof t=="string"){const m=t.length*3;o.length<m+128&&(o=q=new Uint8Array(m+128));const f=n.encodeInto(t,o);i=o.subarray(0,f.written)}else if(t instanceof Uint8Array)i=t;else if(ArrayBuffer.isView(t))i=new Uint8Array(t.buffer,t.byteOffset,t.byteLength);else throw new Error(`[sha256Buffer] Unsupported content type: ${typeof t}`);const c=i.length,a=c+72>>>6<<6;o.length<a&&(o=q=new Uint8Array(a)),i!==o&&o.set(i),o[c]=128;for(let m=c+1;m<a;m++)o[m]=0;const T=c*8,C=T/4294967296|0,A=T|0;o[a-8]=C>>>24,o[a-7]=C>>>16,o[a-6]=C>>>8,o[a-5]=C,o[a-4]=A>>>24,o[a-3]=A>>>16,o[a-2]=A>>>8,o[a-1]=A;let y=1779033703,s=-1150833019,u=1013904242,l=-1521486534,p=1359893119,d=-1694144372,w=528734635,O=1541459225;for(let m=0;m<a;m+=64){for(let h=0;h<16;h++){const g=m+(h<<2);r[h]=o[g]<<24|o[g+1]<<16|o[g+2]<<8|o[g+3]}for(let h=16;h<64;h++){const g=r[h-15],U=r[h-2],J=(g>>>7|g<<25)^(g>>>18|g<<14)^g>>>3,L=(U>>>17|U<<15)^(U>>>19|U<<13)^U>>>10;r[h]=r[h-16]+J+r[h-7]+L|0}let f=y,S=s,N=u,H=l,_=p,P=d,k=w,W=O;for(let h=0;h<64;h+=4)for(let g=0;g<4;g++){const U=h+g,J=(_>>>6|_<<26)^(_>>>11|_<<21)^(_>>>25|_<<7),L=W+J+(k^_&(P^k))+e[U]+r[U]|0,Ot=((f>>>2|f<<30)^(f>>>13|f<<19)^(f>>>22|f<<10))+(f&S^N&(f^S))|0;W=k,k=P,P=_,_=H+L|0,H=N,N=S,S=f,f=L+Ot|0}y=y+f|0,s=s+S|0,u=u+N|0,l=l+H|0,p=p+_|0,d=d+P|0,w=w+k|0,O=O+W|0}const E=new Uint8Array(32),G=[y,s,u,l,p,d,w,O];for(let m=0;m<8;m++){const f=G[m],S=m<<2;E[S]=f>>>24,E[S+1]=f>>>16&255,E[S+2]=f>>>8&255,E[S+3]=f&255}return E}function At(t){const e=ut(t);return e?ot(e):null}function lt(t,e){return t==null?e:e==null?t:Math.min(t,e)}function at(t,e){return t==null?e:e==null?t:Math.max(t,e)}function Et(t,e,r){return at(lt(t,e),r)}function Rt(t,e){return(t%e+e)%e}function Ct(t){return function(){let r=t+=1831565813;return r=Math.imul(r^r>>>15,r|1),r^=r+Math.imul(r^r>>>7,r|61),(r^r>>>14)/4294967296+.5}}function It(){return Math.random()}function kt(){return Math.random()*2**32>>>0}function ct(t){return t!=null?Ct(t):It}class V{_seed;_rnd;constructor(e){this._seed=e,this._rnd=ct(e)}get seed(){return this._seed}nextSeed(){return this.next()*2**32>>>0}nextRandom(){return new V(this.nextSeed())}next(){return this._rnd()}clone(){return new V(this._seed)}}function b(t,e,r){if(r==null&&(r=e,e=0),r<=e)throw new Error(`[random][randomFloat] toExclusive (${r}) must be greater than from (${e})`);return t.next()*(r-e)+e}function ft(t,e,r){return Math.floor(b(t,e,r))}function xt(t,e){return t.next()<(e??.5)}function Mt(t,e,r){if(Array.isArray(e)){const i=e;e=i.length,r=c=>i[c]}if(!r)throw new Error("[random][randomIndexWeighted] getWeight is required");let n=0;for(let i=0;i<e;i++)n+=r(i);if(n===0)return-1;let o=b(t,n);for(let i=0;i<e;i++)if(o-=r(i),o<0)return i;return e-1}function v(t,e){if(e.length===0)throw new Error("[random][randomItem] items is empty");const r=ft(t,e.length);return e[r]}function Nt(t,e,r){if(e.length===0)throw new Error("[random][randomItems] items is empty");const n=[];for(let o=0;o<r;o++)n.push(v(t,e));return n}function Pt(t,e,r){let n=Object.values(e);return r&&(n=n.filter(r)),v(t,n)}const ht=1073741789,F=(ht>>2)-1;function Lt(t=F,e){if(t<=0)throw new Error(`[random][PseudoRandom] count(${t}) must be > 0`);if(t>F)throw new Error(`[random][PseudoRandom] count(${t}) must be <= ${F}`);if(e==null&&(e=Math.floor(Math.random()*t)),e>=t)throw new Error(`[random][PseudoRandom] startFrom(${e}) must be < count(${t})`);let r=e;return function(){return r=(r+ht)%t,r}}let x=null;function Dt(){const t=Date.now();return x==null||t>x?(x=t,t):(x++,x)}async function qt({url:t,timeout:e}={}){t||(t=typeof window<"u"?"/":"https://google.com");let r;try{const n=new B.AbortControllerFast;r=e?setTimeout(()=>{n.abort()},e):null;const o=await fetch(t,{method:"HEAD",signal:B.toAbortSignal(n.signal)}),i=o.headers.get("date");if(!i)throw new Error(`[Now][getDateInet] No date header in response: ${o.status} ${t}`);return new Date(i).getTime()}finally{r&&clearTimeout(r)}}function j(t,e,r){const n=e==null?t:new Date(t.toLocaleString("en-US",{timeZone:e})),o=r==null?t:new Date(t.toLocaleString("en-US",{timeZone:r}));return new Date(t.getTime()+o.getTime()-n.getTime())}function mt(t,e){t=j(t,"UTC",e);const r=t.getUTCFullYear().toString().padStart(4,"0"),n=(t.getUTCMonth()+1).toString().padStart(2,"0"),o=t.getUTCDate().toString().padStart(2,"0"),i=t.getUTCHours().toString().padStart(2,"0"),c=t.getUTCMinutes().toString().padStart(2,"0"),a=t.getUTCSeconds().toString().padStart(2,"0");return`${r}-${n}-${o} ${i}:${c}:${a}`}let Ft=0;const X=new WeakMap;function $(t){if(X.has(t))return X.get(t);const e=Ft++;return X.set(t,e),e}function Bt(t,e){try{return t[e]}catch(r){return"Error: "+(r?.message||String(r))}}function I(t,e={},r=[],n=new Set){const{pretty:o,filter:i,maxDepth:c,maxItems:a,showObjectId:T,showArrayIndex:C,customToString:A}=e;if(A){const s=A(t,u=>I(u,e,r,n));if(s!=null)return s}const y=r.length;if(typeof t=="string")return JSON.stringify(t);if(t==null||typeof t!="object")return String(t);if(typeof t.byteLength=="number")return`${t.constructor.name}#${$(t)}[${t.byteLength}]`;if(t instanceof RegExp)return String(t);if(t instanceof Error)return t.stack||t.message||String(t);if(t instanceof Date)return mt(t);if(Array.isArray(t)){if(n.has(t)||c!=null&&y>=c)return`#${$(t)}`;const s=o?" ".repeat(y):"";let u="";T&&(u+=`#${$(t)} `),u+="[";const l=a!=null?Math.min(t.length,a):t.length;l>0&&o&&(u+=`
|
|
2
2
|
`);for(let p=0;p<l;p++){const d=[...r,String(p)];if(i!=null&&!i(d,t[p]))continue;const w=t[p],O=I(w,e,d);p>0&&(u+=",",o&&(u+=`
|
|
3
|
-
`)),o&&(u+=`${s} `),
|
|
3
|
+
`)),o&&(u+=`${s} `),C&&(u+=`${p}: `),u+=`${O}`}return l>0&&o&&(u+=`
|
|
4
4
|
`),t.length>l&&(l>0&&(u+=","),u+=o?`${s} ...
|
|
5
5
|
`:"..."),l>0&&o&&(u+=s),u+="]",u}if(t instanceof Map){if(n.has(t)||c!=null&&y>=c)return`#${$(t)}`;let s="";return T&&(s+=`#${$(t)} `),s+="Map",s+=I(Array.from(t.entries()),e,r,n),s}if(t instanceof Set){if(n.has(t)||c!=null&&y>=c)return`#${$(t)}`;let s="";return T&&(s+=`#${$(t)} `),s+="Set",s+=I(Array.from(t.values()),e,r,n),s}{const s=t.prototype?.constructor===Object?"":t.prototype?.constructor.name;if(n.has(t)||c!=null&&y>=c)return`${s}#${$(t)}`;const u=o?" ".repeat(y):"";let l=s?`${s} `:"";T&&(l+=`#${$(t)} `),l+="{";const p=a!=null?Math.min(t.length,a):t.length;let d=0;for(const w in t){if(d===0&&o&&(l+=`
|
|
6
6
|
`),d>=p){d>0&&(l+=","),l+=o?`${u} ...
|
|
7
7
|
`:"...";break}const O=[...r,w];if(i!=null&&!i(O,t[w]))continue;const E=Bt(t,w),G=I(E,e,O);d>0&&(l+=",",o&&(l+=`
|
|
8
8
|
`)),o&&(l+=`${u} `),l+=`${w}: ${G}`,d++}return d>0&&o&&(l+=`
|
|
9
|
-
${u}`),l+="}",l}}function Vt(t,e){t=j(t,"UTC",e);const r=t.getUTCFullYear().toString().padStart(4,"0"),n=(t.getUTCMonth()+1).toString().padStart(2,"0"),o=t.getUTCDate().toString().padStart(2,"0"),i=t.getUTCHours().toString().padStart(2,"0"),c=t.getUTCMinutes().toString().padStart(2,"0"),a=t.getUTCSeconds().toString().padStart(2,"0");return`${r}-${n}-${o}_${i}-${c}-${a}`}function zt(t){return t==null?null:t.replace(/[&<>"']/g,e=>{switch(e){case"&":return"&";case"<":return"<";case">":return"&rt;";case'"':return""";default:return"'"}})}function Gt(t){return t==null?null:t?.replace(/[/\\^$*+?.()|[\]{}]/g,"\\$&")}function
|
|
10
|
-
`);e!=null&&e>=0&&(t=t.substring(e+1))}return t??""}function
|
|
11
|
-
`+r:r,n}}}function gt(t){if(!t||t.timeout==null)return null;const e=new B.AbortControllerFast,r=t.timeController??$t.timeControllerDefault;if(t.timeout){const n=r.setTimeout(()=>{e.abort(new B.AbortError(`[timeoutAbortController] Timeout error: ${t.timeout}ms`))},t.timeout);e.signal.subscribe(()=>{clearTimeout(n)})}return t.abortSignal?.subscribe(n=>{e.abort(n)}),e}async function
|
|
9
|
+
${u}`),l+="}",l}}function Vt(t,e){t=j(t,"UTC",e);const r=t.getUTCFullYear().toString().padStart(4,"0"),n=(t.getUTCMonth()+1).toString().padStart(2,"0"),o=t.getUTCDate().toString().padStart(2,"0"),i=t.getUTCHours().toString().padStart(2,"0"),c=t.getUTCMinutes().toString().padStart(2,"0"),a=t.getUTCSeconds().toString().padStart(2,"0");return`${r}-${n}-${o}_${i}-${c}-${a}`}function zt(t){return t==null?null:t.replace(/[&<>"']/g,e=>{switch(e){case"&":return"&";case"<":return"<";case">":return"&rt;";case'"':return""";default:return"'"}})}function Gt(t){return t==null?null:t?.replace(/[/\\^$*+?.()|[\]{}]/g,"\\$&")}function Q(t){if(t==null)return null;if(Array.isArray(t)){const e=t.length,r=[];for(let n=0;n<e;n++)r.push(Q(t[n]));return r}if(typeof t=="object"){if(t.constructor&&t.constructor!==Object)return t;const e={};for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=Q(t[r]));return e}return t}function M(t,e){if(t===e)return!0;if(t==null)return e==null;if(e==null)return!1;if(Array.isArray(t)){if(!Array.isArray(e))return!1;const r=t.length;if(r!==e.length)return!1;for(let n=0;n<r;n++)if(!M(t[n],e[n]))return!1;return!0}if(typeof t=="object"){if(typeof e!="object"||t.constructor&&t.constructor!==Object||e.constructor&&e.constructor!==Object)return!1;for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&!M(t[r],Object.prototype.hasOwnProperty.call(e,r)?e[r]:null))return!1;for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&!Object.prototype.hasOwnProperty.call(t,r)&&!M(e[r],null))return!1;return!0}return!1}function Ht(t,e){if(t==null||e==null)return t==null==(e==null);if(t.size!==e.size)return!1;for(const[r,n]of t)if(!M(n,e.get(r)))return!1;return!0}function Wt(t,e){const r=t.length;if(r!==e.length)return!1;for(let n=0;n<r;n++)if(t[n]!==e[n])return!1;return!0}function Z(t){return!t||typeof t!="object"?t:Array.isArray(t)?t.map(Z):t&&Object.keys(t).sort().reduce((e,r)=>{const n=Z(t[r]);return n!=null&&(e[r]=n),e},{})}function Jt(t){const e=alert;return window.alert=r=>t(e,r),()=>{window.alert=e}}var tt=(t=>(t.log="log",t.warn="warn",t.error="error",t.info="info",t.debug="debug",t.trace="trace",t.assert="assert",t))(tt||{});const et=Object.values(tt);function R(t){return function(){t.apply(console,arguments)}}const rt={log:R(console.log),warn:R(console.warn),error:R(console.error),info:R(console.info),debug:R(console.debug),trace:R(console.trace),assert:R(console.assert)};function pt(t){return et.forEach(e=>{console[e]=(...r)=>{t(rt,e,r)}}),()=>{et.forEach(e=>{console[e]=rt[e]})}}function Xt(t){return function(r){const n=pt(t);try{const o=r();return K.isPromiseLike(o)?o.then(i=>(n(),i),i=>{throw n(),i}):o}finally{n()}}}function dt(){let t=new Error().stack;if(t!=null){const e=t.indexOf(`
|
|
10
|
+
`);e!=null&&e>=0&&(t=t.substring(e+1))}return t??""}function Yt(t){return function(...e){const r=dt();try{return t.apply(this,e)}catch(n){throw n instanceof Error||(n=new Error(String(n))),n.stack=n.stack?n.stack+`
|
|
11
|
+
`+r:r,n}}}function gt(t){if(!t||t.timeout==null)return null;const e=new B.AbortControllerFast,r=t.timeController??$t.timeControllerDefault;if(t.timeout){const n=r.setTimeout(()=>{e.abort(new B.AbortError(`[timeoutAbortController] Timeout error: ${t.timeout}ms`))},t.timeout);e.signal.subscribe(()=>{clearTimeout(n)})}return t.abortSignal?.subscribe(n=>{e.abort(n)}),e}async function Qt(t,e){const r=gt(e);try{return await t(r?.signal??e?.abortSignal??null)}finally{r?.abort()}}class Zt{_options;_hasValue=!1;_promiseOrValue=null;constructor(e){this._options=e}run(){if(!this._hasValue){let e=this._options.func();const r=o=>(this._options.persist?this._promiseOrValue=o:(this._promiseOrValue=null,this._hasValue=!1),o),n=o=>{throw this._options.persist||(this._promiseOrValue=null,this._hasValue=!1),o};if(K.isPromiseLike(e))e=e.then(r,n);else if(!this._options.persist)return e;this._promiseOrValue=e,this._hasValue=!0}return this._promiseOrValue}set(e){if(!this._options.persist)throw new Error("[Lazy][set] Cannot set value when persist is false");this._hasValue=!0,this._promiseOrValue=e}}class Kt{_options;_promiseOrValues=new Map;constructor(e){this._options=e}run(e){if(this._promiseOrValues.has(e))return this._promiseOrValues.get(e);let r=this._options.func(e);const n=i=>(this._options.persist?this._promiseOrValues.set(e,i):this._promiseOrValues.delete(e),i),o=i=>{throw this._options.persist||this._promiseOrValues.delete(e),i};if(K.isPromiseLike(r))r=r.then(n,o);else if(!this._options.persist)return r;return this._promiseOrValues.set(e,r),r}set(e,r){if(!this._options.persist)throw new Error("[LazyWithId][set] Cannot set value when persist is false");this._promiseOrValues.set(e,r)}}function nt(t){return t.replace(/\W/g,"").toLowerCase()}function yt(t){return t instanceof URL?t.searchParams:t instanceof URLSearchParams?t:typeof t=="string"?new URL(t).searchParams:typeof window<"u"?new URL(window.location.href).searchParams:new URLSearchParams}function wt(t){return t==null?null:(t=t.toLowerCase().trim(),t==="true"||t==="1"||t==="yes"?!0:t==="false"||t==="0"||t==="no"?!1:null)}function St(t){if(t==null)return null;t=t.trim();const e=parseInt(t,10);return isNaN(e)?null:e}function _t(t){if(t==null)return null;t=t.trim();const e=parseFloat(t);return isNaN(e)?null:e}function z(t,e){const r=yt(e),n=nt(t);for(const[o,i]of r.entries())if(nt(o)===n)return i;return null}function bt(t,e){return wt(z(t,e))}function vt(t,e){return St(z(t,e))}function jt(t,e){return _t(z(t,e))}exports.ConsoleMessageLevel=tt;exports.Lazy=Zt;exports.LazyWithId=Kt;exports.Random=V;exports.UNIQUE_PSEUDO_RANDOM_MAX_COUNT=F;exports.alertReplace=Jt;exports.consoleReplace=pt;exports.convertTimeZone=j;exports.createUniquePseudoRandom=Lt;exports.dateNowUnique=Dt;exports.deepCloneJsonLike=Q;exports.deepEqualJsonLike=M;exports.deepEqualJsonLikeMap=Ht;exports.equalArray=Wt;exports.escapeHtml=zt;exports.escapeRegExp=Gt;exports.fixStackTrace=Yt;exports.formatAny=I;exports.formatDate=mt;exports.formatDateFileName=Vt;exports.getDateInet=qt;exports.getNormalizedObject=Z;exports.getRandomFunc=ct;exports.getRandomSeed=kt;exports.getStackTrace=dt;exports.max=at;exports.min=lt;exports.minMax=Et;exports.numberMod=Rt;exports.randomBoolean=xt;exports.randomEnum=Pt;exports.randomFloat=b;exports.randomIndexWeighted=Mt;exports.randomInt=ft;exports.randomItem=v;exports.randomItems=Nt;exports.sha256=At;exports.sha256Buffer=ut;exports.timeoutAbortController=gt;exports.toHex=ot;exports.urlGetBoolean=bt;exports.urlGetFloat=jt;exports.urlGetInt=vt;exports.urlGetParams=yt;exports.urlGetString=z;exports.urlParamToBoolean=wt;exports.urlParamToFloat=_t;exports.urlParamToInt=St;exports.withConsoleReplace=Xt;exports.withTimeout=Qt;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { AbortControllerFast as j, toAbortSignal as lt, AbortError as at } from "@flemist/abort-controller-fast";
|
|
2
2
|
import { isPromiseLike as X } from "@flemist/async-utils";
|
|
3
|
-
import { timeControllerDefault as
|
|
3
|
+
import { timeControllerDefault as ft } from "@flemist/time-controller";
|
|
4
4
|
let P = null;
|
|
5
|
-
function
|
|
5
|
+
function ct() {
|
|
6
6
|
if (!P) {
|
|
7
7
|
P = new Array(256);
|
|
8
8
|
for (let t = 0; t < 256; t++)
|
|
@@ -11,14 +11,14 @@ function ft() {
|
|
|
11
11
|
return P;
|
|
12
12
|
}
|
|
13
13
|
function ht(t) {
|
|
14
|
-
const e =
|
|
14
|
+
const e = ct(), r = new Uint8Array(t.buffer, t.byteOffset, t.byteLength);
|
|
15
15
|
let n = "";
|
|
16
16
|
for (let o = 0, s = r.length; o < s; o++)
|
|
17
17
|
n += e[r[o]];
|
|
18
18
|
return n;
|
|
19
19
|
}
|
|
20
20
|
let G = null, tt = null, L = null, et = null;
|
|
21
|
-
function
|
|
21
|
+
function mt() {
|
|
22
22
|
G || (G = new Uint32Array([
|
|
23
23
|
1116352408,
|
|
24
24
|
1899447441,
|
|
@@ -86,17 +86,17 @@ function pt() {
|
|
|
86
86
|
3329325298
|
|
87
87
|
]), tt = new Uint32Array(64), et = new TextEncoder(), L = new Uint8Array(65536));
|
|
88
88
|
}
|
|
89
|
-
function
|
|
89
|
+
function pt(t) {
|
|
90
90
|
if (t == null)
|
|
91
91
|
return null;
|
|
92
|
-
|
|
92
|
+
mt();
|
|
93
93
|
const e = G, r = tt, n = et;
|
|
94
94
|
let o = L, s;
|
|
95
95
|
if (typeof t == "string") {
|
|
96
|
-
const
|
|
97
|
-
o.length <
|
|
98
|
-
const
|
|
99
|
-
s = o.subarray(0,
|
|
96
|
+
const m = t.length * 3;
|
|
97
|
+
o.length < m + 128 && (o = L = new Uint8Array(m + 128));
|
|
98
|
+
const c = n.encodeInto(t, o);
|
|
99
|
+
s = o.subarray(0, c.written);
|
|
100
100
|
} else if (t instanceof Uint8Array)
|
|
101
101
|
s = t;
|
|
102
102
|
else if (ArrayBuffer.isView(t))
|
|
@@ -109,67 +109,67 @@ function mt(t) {
|
|
|
109
109
|
throw new Error(
|
|
110
110
|
`[sha256Buffer] Unsupported content type: ${typeof t}`
|
|
111
111
|
);
|
|
112
|
-
const
|
|
113
|
-
o.length < a && (o = L = new Uint8Array(a)), s !== o && o.set(s), o[
|
|
114
|
-
for (let
|
|
115
|
-
o[
|
|
116
|
-
const A =
|
|
117
|
-
o[a - 8] =
|
|
118
|
-
let
|
|
119
|
-
for (let
|
|
112
|
+
const f = s.length, a = f + 72 >>> 6 << 6;
|
|
113
|
+
o.length < a && (o = L = new Uint8Array(a)), s !== o && o.set(s), o[f] = 128;
|
|
114
|
+
for (let m = f + 1; m < a; m++)
|
|
115
|
+
o[m] = 0;
|
|
116
|
+
const A = f * 8, R = A / 4294967296 | 0, T = A | 0;
|
|
117
|
+
o[a - 8] = R >>> 24, o[a - 7] = R >>> 16, o[a - 6] = R >>> 8, o[a - 5] = R, o[a - 4] = T >>> 24, o[a - 3] = T >>> 16, o[a - 2] = T >>> 8, o[a - 1] = T;
|
|
118
|
+
let d = 1779033703, i = -1150833019, u = 1013904242, l = -1521486534, p = 1359893119, y = -1694144372, w = 528734635, O = 1541459225;
|
|
119
|
+
for (let m = 0; m < a; m += 64) {
|
|
120
120
|
for (let h = 0; h < 16; h++) {
|
|
121
|
-
const
|
|
122
|
-
r[h] = o[
|
|
121
|
+
const g = m + (h << 2);
|
|
122
|
+
r[h] = o[g] << 24 | o[g + 1] << 16 | o[g + 2] << 8 | o[g + 3];
|
|
123
123
|
}
|
|
124
124
|
for (let h = 16; h < 64; h++) {
|
|
125
|
-
const
|
|
125
|
+
const g = r[h - 15], U = r[h - 2], F = (g >>> 7 | g << 25) ^ (g >>> 18 | g << 14) ^ g >>> 3, D = (U >>> 17 | U << 15) ^ (U >>> 19 | U << 13) ^ U >>> 10;
|
|
126
126
|
r[h] = r[h - 16] + F + r[h - 7] + D | 0;
|
|
127
127
|
}
|
|
128
|
-
let
|
|
128
|
+
let c = d, S = i, k = u, z = l, _ = p, N = y, I = w, q = O;
|
|
129
129
|
for (let h = 0; h < 64; h += 4)
|
|
130
|
-
for (let
|
|
131
|
-
const U = h +
|
|
132
|
-
|
|
130
|
+
for (let g = 0; g < 4; g++) {
|
|
131
|
+
const U = h + g, F = (_ >>> 6 | _ << 26) ^ (_ >>> 11 | _ << 21) ^ (_ >>> 25 | _ << 7), D = q + F + (I ^ _ & (N ^ I)) + e[U] + r[U] | 0, ut = ((c >>> 2 | c << 30) ^ (c >>> 13 | c << 19) ^ (c >>> 22 | c << 10)) + (c & S ^ k & (c ^ S)) | 0;
|
|
132
|
+
q = I, I = N, N = _, _ = z + D | 0, z = k, k = S, S = c, c = D + ut | 0;
|
|
133
133
|
}
|
|
134
|
-
|
|
134
|
+
d = d + c | 0, i = i + S | 0, u = u + k | 0, l = l + z | 0, p = p + _ | 0, y = y + N | 0, w = w + I | 0, O = O + q | 0;
|
|
135
135
|
}
|
|
136
|
-
const
|
|
137
|
-
for (let
|
|
138
|
-
const
|
|
139
|
-
|
|
136
|
+
const E = new Uint8Array(32), B = [d, i, u, l, p, y, w, O];
|
|
137
|
+
for (let m = 0; m < 8; m++) {
|
|
138
|
+
const c = B[m], S = m << 2;
|
|
139
|
+
E[S] = c >>> 24, E[S + 1] = c >>> 16 & 255, E[S + 2] = c >>> 8 & 255, E[S + 3] = c & 255;
|
|
140
140
|
}
|
|
141
|
-
return
|
|
141
|
+
return E;
|
|
142
142
|
}
|
|
143
143
|
function Pt(t) {
|
|
144
|
-
const e =
|
|
144
|
+
const e = pt(t);
|
|
145
145
|
return e ? ht(e) : null;
|
|
146
146
|
}
|
|
147
|
-
function
|
|
147
|
+
function yt(t, e) {
|
|
148
148
|
return t == null ? e : e == null ? t : Math.min(t, e);
|
|
149
149
|
}
|
|
150
|
-
function
|
|
150
|
+
function gt(t, e) {
|
|
151
151
|
return t == null ? e : e == null ? t : Math.max(t, e);
|
|
152
152
|
}
|
|
153
153
|
function Lt(t, e, r) {
|
|
154
|
-
return
|
|
154
|
+
return gt(yt(t, e), r);
|
|
155
155
|
}
|
|
156
156
|
function Vt(t, e) {
|
|
157
157
|
return (t % e + e) % e;
|
|
158
158
|
}
|
|
159
|
-
function
|
|
159
|
+
function dt(t) {
|
|
160
160
|
return function() {
|
|
161
161
|
let r = t += 1831565813;
|
|
162
162
|
return r = Math.imul(r ^ r >>> 15, r | 1), r ^= r + Math.imul(r ^ r >>> 7, r | 61), (r ^ r >>> 14) / 4294967296 + 0.5;
|
|
163
163
|
};
|
|
164
164
|
}
|
|
165
|
-
function
|
|
165
|
+
function wt() {
|
|
166
166
|
return Math.random();
|
|
167
167
|
}
|
|
168
|
-
function
|
|
168
|
+
function Bt() {
|
|
169
169
|
return Math.random() * 2 ** 32 >>> 0;
|
|
170
170
|
}
|
|
171
171
|
function St(t) {
|
|
172
|
-
return t != null ?
|
|
172
|
+
return t != null ? dt(t) : wt;
|
|
173
173
|
}
|
|
174
174
|
class J {
|
|
175
175
|
_seed;
|
|
@@ -203,13 +203,13 @@ function rt(t, e, r) {
|
|
|
203
203
|
function _t(t, e, r) {
|
|
204
204
|
return Math.floor(rt(t, e, r));
|
|
205
205
|
}
|
|
206
|
-
function
|
|
206
|
+
function zt(t, e) {
|
|
207
207
|
return t.next() < (e ?? 0.5);
|
|
208
208
|
}
|
|
209
|
-
function
|
|
209
|
+
function qt(t, e, r) {
|
|
210
210
|
if (Array.isArray(e)) {
|
|
211
211
|
const s = e;
|
|
212
|
-
e = s.length, r = (
|
|
212
|
+
e = s.length, r = (f) => s[f];
|
|
213
213
|
}
|
|
214
214
|
if (!r)
|
|
215
215
|
throw new Error("[random][randomIndexWeighted] getWeight is required");
|
|
@@ -259,10 +259,10 @@ function Wt(t = H, e) {
|
|
|
259
259
|
return r = (r + ot) % t, r;
|
|
260
260
|
};
|
|
261
261
|
}
|
|
262
|
-
let
|
|
262
|
+
let x = null;
|
|
263
263
|
function Gt() {
|
|
264
264
|
const t = Date.now();
|
|
265
|
-
return
|
|
265
|
+
return x == null || t > x ? (x = t, t) : (x++, x);
|
|
266
266
|
}
|
|
267
267
|
async function Jt({
|
|
268
268
|
url: t,
|
|
@@ -304,8 +304,8 @@ function st(t, e, r) {
|
|
|
304
304
|
}
|
|
305
305
|
function Ot(t, e) {
|
|
306
306
|
t = st(t, "UTC", e);
|
|
307
|
-
const r = t.getUTCFullYear().toString().padStart(4, "0"), n = (t.getUTCMonth() + 1).toString().padStart(2, "0"), o = t.getUTCDate().toString().padStart(2, "0"), s = t.getUTCHours().toString().padStart(2, "0"),
|
|
308
|
-
return `${r}-${n}-${o} ${s}:${
|
|
307
|
+
const r = t.getUTCFullYear().toString().padStart(4, "0"), n = (t.getUTCMonth() + 1).toString().padStart(2, "0"), o = t.getUTCDate().toString().padStart(2, "0"), s = t.getUTCHours().toString().padStart(2, "0"), f = t.getUTCMinutes().toString().padStart(2, "0"), a = t.getUTCSeconds().toString().padStart(2, "0");
|
|
308
|
+
return `${r}-${n}-${o} ${s}:${f}:${a}`;
|
|
309
309
|
}
|
|
310
310
|
let $t = 0;
|
|
311
311
|
const W = /* @__PURE__ */ new WeakMap();
|
|
@@ -322,22 +322,22 @@ function Ut(t, e) {
|
|
|
322
322
|
return "Error: " + (r?.message || String(r));
|
|
323
323
|
}
|
|
324
324
|
}
|
|
325
|
-
function
|
|
325
|
+
function M(t, e = {}, r = [], n = /* @__PURE__ */ new Set()) {
|
|
326
326
|
const {
|
|
327
327
|
pretty: o,
|
|
328
328
|
filter: s,
|
|
329
|
-
maxDepth:
|
|
329
|
+
maxDepth: f,
|
|
330
330
|
maxItems: a,
|
|
331
331
|
showObjectId: A,
|
|
332
|
-
showArrayIndex:
|
|
333
|
-
customToString:
|
|
332
|
+
showArrayIndex: R,
|
|
333
|
+
customToString: T
|
|
334
334
|
} = e;
|
|
335
|
-
if (
|
|
336
|
-
const i =
|
|
335
|
+
if (T) {
|
|
336
|
+
const i = T(t, (u) => M(u, e, r, n));
|
|
337
337
|
if (i != null)
|
|
338
338
|
return i;
|
|
339
339
|
}
|
|
340
|
-
const
|
|
340
|
+
const d = r.length;
|
|
341
341
|
if (typeof t == "string")
|
|
342
342
|
return JSON.stringify(t);
|
|
343
343
|
if (t == null || typeof t != "object")
|
|
@@ -351,69 +351,69 @@ function k(t, e = {}, r = [], n = /* @__PURE__ */ new Set()) {
|
|
|
351
351
|
if (t instanceof Date)
|
|
352
352
|
return Ot(t);
|
|
353
353
|
if (Array.isArray(t)) {
|
|
354
|
-
if (n.has(t) ||
|
|
354
|
+
if (n.has(t) || f != null && d >= f)
|
|
355
355
|
return `#${$(t)}`;
|
|
356
|
-
const i = o ? " ".repeat(
|
|
356
|
+
const i = o ? " ".repeat(d) : "";
|
|
357
357
|
let u = "";
|
|
358
358
|
A && (u += `#${$(t)} `), u += "[";
|
|
359
359
|
const l = a != null ? Math.min(t.length, a) : t.length;
|
|
360
360
|
l > 0 && o && (u += `
|
|
361
361
|
`);
|
|
362
|
-
for (let
|
|
363
|
-
const
|
|
364
|
-
if (s != null && !s(
|
|
362
|
+
for (let p = 0; p < l; p++) {
|
|
363
|
+
const y = [...r, String(p)];
|
|
364
|
+
if (s != null && !s(y, t[p]))
|
|
365
365
|
continue;
|
|
366
|
-
const
|
|
367
|
-
|
|
368
|
-
`)), o && (u += `${i} `),
|
|
366
|
+
const w = t[p], O = M(w, e, y);
|
|
367
|
+
p > 0 && (u += ",", o && (u += `
|
|
368
|
+
`)), o && (u += `${i} `), R && (u += `${p}: `), u += `${O}`;
|
|
369
369
|
}
|
|
370
370
|
return l > 0 && o && (u += `
|
|
371
371
|
`), t.length > l && (l > 0 && (u += ","), u += o ? `${i} ...
|
|
372
372
|
` : "..."), l > 0 && o && (u += i), u += "]", u;
|
|
373
373
|
}
|
|
374
374
|
if (t instanceof Map) {
|
|
375
|
-
if (n.has(t) ||
|
|
375
|
+
if (n.has(t) || f != null && d >= f)
|
|
376
376
|
return `#${$(t)}`;
|
|
377
377
|
let i = "";
|
|
378
|
-
return A && (i += `#${$(t)} `), i += "Map", i +=
|
|
378
|
+
return A && (i += `#${$(t)} `), i += "Map", i += M(Array.from(t.entries()), e, r, n), i;
|
|
379
379
|
}
|
|
380
380
|
if (t instanceof Set) {
|
|
381
|
-
if (n.has(t) ||
|
|
381
|
+
if (n.has(t) || f != null && d >= f)
|
|
382
382
|
return `#${$(t)}`;
|
|
383
383
|
let i = "";
|
|
384
|
-
return A && (i += `#${$(t)} `), i += "Set", i +=
|
|
384
|
+
return A && (i += `#${$(t)} `), i += "Set", i += M(Array.from(t.values()), e, r, n), i;
|
|
385
385
|
}
|
|
386
386
|
{
|
|
387
387
|
const i = t.prototype?.constructor === Object ? "" : t.prototype?.constructor.name;
|
|
388
|
-
if (n.has(t) ||
|
|
388
|
+
if (n.has(t) || f != null && d >= f)
|
|
389
389
|
return `${i}#${$(t)}`;
|
|
390
|
-
const u = o ? " ".repeat(
|
|
390
|
+
const u = o ? " ".repeat(d) : "";
|
|
391
391
|
let l = i ? `${i} ` : "";
|
|
392
392
|
A && (l += `#${$(t)} `), l += "{";
|
|
393
|
-
const
|
|
394
|
-
let
|
|
395
|
-
for (const
|
|
396
|
-
if (
|
|
397
|
-
`),
|
|
398
|
-
|
|
393
|
+
const p = a != null ? Math.min(t.length, a) : t.length;
|
|
394
|
+
let y = 0;
|
|
395
|
+
for (const w in t) {
|
|
396
|
+
if (y === 0 && o && (l += `
|
|
397
|
+
`), y >= p) {
|
|
398
|
+
y > 0 && (l += ","), l += o ? `${u} ...
|
|
399
399
|
` : "...";
|
|
400
400
|
break;
|
|
401
401
|
}
|
|
402
|
-
const O = [...r,
|
|
403
|
-
if (s != null && !s(O, t[
|
|
402
|
+
const O = [...r, w];
|
|
403
|
+
if (s != null && !s(O, t[w]))
|
|
404
404
|
continue;
|
|
405
|
-
const
|
|
406
|
-
|
|
407
|
-
`)), o && (l += `${u} `), l += `${
|
|
405
|
+
const E = Ut(t, w), B = M(E, e, O);
|
|
406
|
+
y > 0 && (l += ",", o && (l += `
|
|
407
|
+
`)), o && (l += `${u} `), l += `${w}: ${B}`, y++;
|
|
408
408
|
}
|
|
409
|
-
return
|
|
409
|
+
return y > 0 && o && (l += `
|
|
410
410
|
${u}`), l += "}", l;
|
|
411
411
|
}
|
|
412
412
|
}
|
|
413
413
|
function Xt(t, e) {
|
|
414
414
|
t = st(t, "UTC", e);
|
|
415
|
-
const r = t.getUTCFullYear().toString().padStart(4, "0"), n = (t.getUTCMonth() + 1).toString().padStart(2, "0"), o = t.getUTCDate().toString().padStart(2, "0"), s = t.getUTCHours().toString().padStart(2, "0"),
|
|
416
|
-
return `${r}-${n}-${o}_${s}-${
|
|
415
|
+
const r = t.getUTCFullYear().toString().padStart(4, "0"), n = (t.getUTCMonth() + 1).toString().padStart(2, "0"), o = t.getUTCDate().toString().padStart(2, "0"), s = t.getUTCHours().toString().padStart(2, "0"), f = t.getUTCMinutes().toString().padStart(2, "0"), a = t.getUTCSeconds().toString().padStart(2, "0");
|
|
416
|
+
return `${r}-${n}-${o}_${s}-${f}-${a}`;
|
|
417
417
|
}
|
|
418
418
|
function Yt(t) {
|
|
419
419
|
return t == null ? null : t.replace(/[&<>"']/g, (e) => {
|
|
@@ -431,26 +431,24 @@ function Yt(t) {
|
|
|
431
431
|
}
|
|
432
432
|
});
|
|
433
433
|
}
|
|
434
|
-
function
|
|
434
|
+
function Kt(t) {
|
|
435
435
|
return t == null ? null : t?.replace(/[/\\^$*+?.()|[\]{}]/g, "\\$&");
|
|
436
436
|
}
|
|
437
|
-
function
|
|
437
|
+
function K(t) {
|
|
438
438
|
if (t == null)
|
|
439
439
|
return null;
|
|
440
440
|
if (Array.isArray(t)) {
|
|
441
441
|
const e = t.length, r = [];
|
|
442
442
|
for (let n = 0; n < e; n++)
|
|
443
|
-
r.push(
|
|
443
|
+
r.push(K(t[n]));
|
|
444
444
|
return r;
|
|
445
445
|
}
|
|
446
446
|
if (typeof t == "object") {
|
|
447
447
|
if (t.constructor && t.constructor !== Object)
|
|
448
|
-
|
|
449
|
-
`[deepCloneJsonLike] unexpected behavior: value.constructor (${t.constructor}) !== Object`
|
|
450
|
-
);
|
|
448
|
+
return t;
|
|
451
449
|
const e = {};
|
|
452
450
|
for (const r in t)
|
|
453
|
-
Object.prototype.hasOwnProperty.call(t, r) && (e[r] =
|
|
451
|
+
Object.prototype.hasOwnProperty.call(t, r) && (e[r] = K(t[r]));
|
|
454
452
|
return e;
|
|
455
453
|
}
|
|
456
454
|
return t;
|
|
@@ -474,16 +472,8 @@ function V(t, e) {
|
|
|
474
472
|
return !0;
|
|
475
473
|
}
|
|
476
474
|
if (typeof t == "object") {
|
|
477
|
-
if (typeof e != "object")
|
|
475
|
+
if (typeof e != "object" || t.constructor && t.constructor !== Object || e.constructor && e.constructor !== Object)
|
|
478
476
|
return !1;
|
|
479
|
-
if (t.constructor && t.constructor !== Object)
|
|
480
|
-
throw new Error(
|
|
481
|
-
`[deepEqual] unexpected behavior: a.constructor (${t.constructor}) !== Object`
|
|
482
|
-
);
|
|
483
|
-
if (e.constructor && e.constructor !== Object)
|
|
484
|
-
throw new Error(
|
|
485
|
-
`[deepEqual] unexpected behavior: b.constructor (${e.constructor}) !== Object`
|
|
486
|
-
);
|
|
487
477
|
for (const r in t)
|
|
488
478
|
if (Object.prototype.hasOwnProperty.call(t, r) && !V(
|
|
489
479
|
t[r],
|
|
@@ -497,7 +487,7 @@ function V(t, e) {
|
|
|
497
487
|
}
|
|
498
488
|
return !1;
|
|
499
489
|
}
|
|
500
|
-
function
|
|
490
|
+
function Qt(t, e) {
|
|
501
491
|
if (t == null || e == null)
|
|
502
492
|
return t == null == (e == null);
|
|
503
493
|
if (t.size !== e.size)
|
|
@@ -507,7 +497,7 @@ function Kt(t, e) {
|
|
|
507
497
|
return !1;
|
|
508
498
|
return !0;
|
|
509
499
|
}
|
|
510
|
-
function
|
|
500
|
+
function Zt(t, e) {
|
|
511
501
|
const r = t.length;
|
|
512
502
|
if (r !== e.length)
|
|
513
503
|
return !1;
|
|
@@ -516,26 +506,26 @@ function Qt(t, e) {
|
|
|
516
506
|
return !1;
|
|
517
507
|
return !0;
|
|
518
508
|
}
|
|
519
|
-
function
|
|
520
|
-
return !t || typeof t != "object" ? t : Array.isArray(t) ? t.map(
|
|
521
|
-
const n =
|
|
509
|
+
function Q(t) {
|
|
510
|
+
return !t || typeof t != "object" ? t : Array.isArray(t) ? t.map(Q) : t && Object.keys(t).sort().reduce((e, r) => {
|
|
511
|
+
const n = Q(t[r]);
|
|
522
512
|
return n != null && (e[r] = n), e;
|
|
523
513
|
}, {});
|
|
524
514
|
}
|
|
525
|
-
function
|
|
515
|
+
function bt(t) {
|
|
526
516
|
const e = alert;
|
|
527
517
|
return window.alert = (r) => t(e, r), () => {
|
|
528
518
|
window.alert = e;
|
|
529
519
|
};
|
|
530
520
|
}
|
|
531
521
|
var it = /* @__PURE__ */ ((t) => (t.log = "log", t.warn = "warn", t.error = "error", t.info = "info", t.debug = "debug", t.trace = "trace", t.assert = "assert", t))(it || {});
|
|
532
|
-
const
|
|
522
|
+
const Z = Object.values(it);
|
|
533
523
|
function C(t) {
|
|
534
524
|
return function() {
|
|
535
525
|
t.apply(console, arguments);
|
|
536
526
|
};
|
|
537
527
|
}
|
|
538
|
-
const
|
|
528
|
+
const b = {
|
|
539
529
|
log: C(console.log),
|
|
540
530
|
warn: C(console.warn),
|
|
541
531
|
error: C(console.error),
|
|
@@ -545,13 +535,13 @@ const Z = {
|
|
|
545
535
|
assert: C(console.assert)
|
|
546
536
|
};
|
|
547
537
|
function At(t) {
|
|
548
|
-
return
|
|
538
|
+
return Z.forEach((e) => {
|
|
549
539
|
console[e] = (...r) => {
|
|
550
|
-
t(
|
|
540
|
+
t(b, e, r);
|
|
551
541
|
};
|
|
552
542
|
}), () => {
|
|
553
|
-
|
|
554
|
-
console[e] =
|
|
543
|
+
Z.forEach((e) => {
|
|
544
|
+
console[e] = b[e];
|
|
555
545
|
});
|
|
556
546
|
};
|
|
557
547
|
}
|
|
@@ -571,7 +561,7 @@ function vt(t) {
|
|
|
571
561
|
}
|
|
572
562
|
};
|
|
573
563
|
}
|
|
574
|
-
function
|
|
564
|
+
function Tt() {
|
|
575
565
|
let t = new Error().stack;
|
|
576
566
|
if (t != null) {
|
|
577
567
|
const e = t.indexOf(`
|
|
@@ -582,7 +572,7 @@ function Et() {
|
|
|
582
572
|
}
|
|
583
573
|
function jt(t) {
|
|
584
574
|
return function(...e) {
|
|
585
|
-
const r =
|
|
575
|
+
const r = Tt();
|
|
586
576
|
try {
|
|
587
577
|
return t.apply(this, e);
|
|
588
578
|
} catch (n) {
|
|
@@ -591,10 +581,10 @@ function jt(t) {
|
|
|
591
581
|
}
|
|
592
582
|
};
|
|
593
583
|
}
|
|
594
|
-
function
|
|
584
|
+
function Et(t) {
|
|
595
585
|
if (!t || t.timeout == null)
|
|
596
586
|
return null;
|
|
597
|
-
const e = new j(), r = t.timeController ??
|
|
587
|
+
const e = new j(), r = t.timeController ?? ft;
|
|
598
588
|
if (t.timeout) {
|
|
599
589
|
const n = r.setTimeout(() => {
|
|
600
590
|
e.abort(
|
|
@@ -612,7 +602,7 @@ function Tt(t) {
|
|
|
612
602
|
}), e;
|
|
613
603
|
}
|
|
614
604
|
async function te(t, e) {
|
|
615
|
-
const r =
|
|
605
|
+
const r = Et(e);
|
|
616
606
|
try {
|
|
617
607
|
return await t(r?.signal ?? e?.abortSignal ?? null);
|
|
618
608
|
} finally {
|
|
@@ -679,17 +669,17 @@ function v(t) {
|
|
|
679
669
|
function Ct(t) {
|
|
680
670
|
return t instanceof URL ? t.searchParams : t instanceof URLSearchParams ? t : typeof t == "string" ? new URL(t).searchParams : typeof window < "u" ? new URL(window.location.href).searchParams : new URLSearchParams();
|
|
681
671
|
}
|
|
682
|
-
function
|
|
672
|
+
function Rt(t) {
|
|
683
673
|
return t == null ? null : (t = t.toLowerCase().trim(), t === "true" || t === "1" || t === "yes" ? !0 : t === "false" || t === "0" || t === "no" ? !1 : null);
|
|
684
674
|
}
|
|
685
|
-
function
|
|
675
|
+
function It(t) {
|
|
686
676
|
if (t == null)
|
|
687
677
|
return null;
|
|
688
678
|
t = t.trim();
|
|
689
679
|
const e = parseInt(t, 10);
|
|
690
680
|
return isNaN(e) ? null : e;
|
|
691
681
|
}
|
|
692
|
-
function
|
|
682
|
+
function xt(t) {
|
|
693
683
|
if (t == null)
|
|
694
684
|
return null;
|
|
695
685
|
t = t.trim();
|
|
@@ -704,63 +694,63 @@ function Y(t, e) {
|
|
|
704
694
|
return null;
|
|
705
695
|
}
|
|
706
696
|
function ne(t, e) {
|
|
707
|
-
return
|
|
697
|
+
return Rt(Y(t, e));
|
|
708
698
|
}
|
|
709
699
|
function oe(t, e) {
|
|
710
|
-
return
|
|
700
|
+
return It(Y(t, e));
|
|
711
701
|
}
|
|
712
702
|
function se(t, e) {
|
|
713
|
-
return
|
|
703
|
+
return xt(Y(t, e));
|
|
714
704
|
}
|
|
715
705
|
export {
|
|
716
706
|
V as A,
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
707
|
+
Qt as B,
|
|
708
|
+
Zt as C,
|
|
709
|
+
Q as D,
|
|
710
|
+
bt as E,
|
|
721
711
|
it as F,
|
|
722
712
|
At as G,
|
|
723
713
|
vt as H,
|
|
724
714
|
jt as I,
|
|
725
|
-
|
|
726
|
-
|
|
715
|
+
Tt as J,
|
|
716
|
+
Et as K,
|
|
727
717
|
te as L,
|
|
728
718
|
ee as M,
|
|
729
719
|
re as N,
|
|
730
720
|
Ct as O,
|
|
731
|
-
|
|
732
|
-
|
|
721
|
+
Rt as P,
|
|
722
|
+
It as Q,
|
|
733
723
|
J as R,
|
|
734
|
-
|
|
724
|
+
xt as S,
|
|
735
725
|
Y as T,
|
|
736
726
|
H as U,
|
|
737
727
|
ne as V,
|
|
738
728
|
oe as W,
|
|
739
729
|
se as X,
|
|
740
730
|
Pt as a,
|
|
741
|
-
|
|
731
|
+
gt as b,
|
|
742
732
|
Lt as c,
|
|
743
733
|
St as d,
|
|
744
734
|
_t as e,
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
735
|
+
zt as f,
|
|
736
|
+
Bt as g,
|
|
737
|
+
qt as h,
|
|
748
738
|
nt as i,
|
|
749
739
|
Ft as j,
|
|
750
740
|
Ht as k,
|
|
751
741
|
Wt as l,
|
|
752
|
-
|
|
742
|
+
yt as m,
|
|
753
743
|
Vt as n,
|
|
754
744
|
Gt as o,
|
|
755
745
|
Jt as p,
|
|
756
746
|
st as q,
|
|
757
747
|
rt as r,
|
|
758
|
-
|
|
748
|
+
pt as s,
|
|
759
749
|
ht as t,
|
|
760
|
-
|
|
750
|
+
M as u,
|
|
761
751
|
Ot as v,
|
|
762
752
|
Xt as w,
|
|
763
753
|
Yt as x,
|
|
764
|
-
|
|
765
|
-
|
|
754
|
+
Kt as y,
|
|
755
|
+
K as z
|
|
766
756
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flemist/simple-utils",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Simple simple utils",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"types": "build/common/index.d.ts",
|
|
@@ -119,10 +119,10 @@
|
|
|
119
119
|
"check:types": "tsc --noEmit",
|
|
120
120
|
"check": "run-p audit check:types lint",
|
|
121
121
|
"========================= test =========================": "",
|
|
122
|
-
"test:node": "vitest --run --config
|
|
123
|
-
"test:browser": "vitest --run --config
|
|
124
|
-
"test:chrome": "vitest --run --config
|
|
125
|
-
"test:all": "vitest --run --config
|
|
122
|
+
"test:node": "vitest --run --config vite.projects.ts --project node --bail 3",
|
|
123
|
+
"test:browser": "vitest --run --config vite.projects.ts --project browser --bail 3",
|
|
124
|
+
"test:chrome": "vitest --run --config vite.projects.ts --project browser --browser chromium --bail 3",
|
|
125
|
+
"test:all": "vitest --run --config vite.projects.ts --bail 3",
|
|
126
126
|
"test": "run-s test:node test:browser",
|
|
127
127
|
"========================= dev =========================": "",
|
|
128
128
|
"kill-node": "taskkill /F /IM node.exe",
|