@zinaid/str 0.0.6 → 0.0.8
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/dist/ascii/index.d.ts +16 -0
- package/dist/ascii/index.d.ts.map +1 -1
- package/dist/ascii/index.js +43 -4
- package/dist/base64/index.d.ts +16 -0
- package/dist/base64/index.d.ts.map +1 -1
- package/dist/base64/index.js +52 -51
- package/dist/convertcase/index.d.ts +10 -0
- package/dist/convertcase/index.d.ts.map +1 -1
- package/dist/index.js +113 -112
- package/dist/markdown/index.d.ts +23 -0
- package/dist/markdown/index.d.ts.map +1 -1
- package/dist/pluralizer/index.d.ts +61 -0
- package/dist/pluralizer/index.d.ts.map +1 -1
- package/dist/pluralizer/index.js +36 -27
- package/dist/replacer/index.d.ts +14 -14
- package/dist/{str.d.ts → str/index.d.ts} +297 -66
- package/dist/str/index.d.ts.map +1 -0
- package/dist/str/index.js +939 -0
- package/dist/stringable/index.d.ts +398 -1
- package/dist/stringable/index.d.ts.map +1 -1
- package/dist/stringable/index.js +400 -13
- package/dist/transliterate/index.d.ts +5 -0
- package/dist/transliterate/index.d.ts.map +1 -1
- package/dist/trimmer/index.d.ts +21 -0
- package/dist/trimmer/index.d.ts.map +1 -1
- package/dist/ulid/index.d.ts +38 -0
- package/dist/ulid/index.d.ts.map +1 -1
- package/dist/ulid/index.js +37 -29
- package/dist/uuid/index.d.ts +34 -0
- package/dist/uuid/index.d.ts.map +1 -1
- package/package.json +5 -5
- package/dist/str.d.ts.map +0 -1
- package/dist/str.js +0 -993
|
@@ -0,0 +1,939 @@
|
|
|
1
|
+
import { substr as x, ltrim as q, rtrim as G, randomInt as M, randomString as K, title as P, trim as Z, upper as D } from "@zinaid/str";
|
|
2
|
+
import { isArray as S, toLower as O, isString as N, isFunction as Q } from "@zinaid/utils";
|
|
3
|
+
const R = /* @__PURE__ */ new Map(), E = /* @__PURE__ */ new Map(), C = /* @__PURE__ */ new Map();
|
|
4
|
+
let b = null;
|
|
5
|
+
function T(t, e) {
|
|
6
|
+
if (e === "")
|
|
7
|
+
return t;
|
|
8
|
+
const n = String(e), r = t.indexOf(n);
|
|
9
|
+
return r === -1 ? t : t.slice(r + n.length);
|
|
10
|
+
}
|
|
11
|
+
function ft(t, e) {
|
|
12
|
+
if (e === "")
|
|
13
|
+
return t;
|
|
14
|
+
const n = t.lastIndexOf(String(e));
|
|
15
|
+
return n === -1 ? t : t.slice(n + String(e).length);
|
|
16
|
+
}
|
|
17
|
+
function V(t, e) {
|
|
18
|
+
if (e === "")
|
|
19
|
+
return t;
|
|
20
|
+
const n = t.indexOf(String(e));
|
|
21
|
+
return n === -1 ? t : t.slice(0, n);
|
|
22
|
+
}
|
|
23
|
+
function X(t, e) {
|
|
24
|
+
if (e === "")
|
|
25
|
+
return t;
|
|
26
|
+
const n = t.lastIndexOf(String(e));
|
|
27
|
+
return n === -1 ? t : x(t, 0, n);
|
|
28
|
+
}
|
|
29
|
+
function at(t, e, n) {
|
|
30
|
+
return e === "" || n === "" ? t : X(T(t, e), n);
|
|
31
|
+
}
|
|
32
|
+
function ut(t, e, n) {
|
|
33
|
+
return e === "" || n === "" ? t : V(T(t, e), n);
|
|
34
|
+
}
|
|
35
|
+
function pt(t) {
|
|
36
|
+
if (E.has(t))
|
|
37
|
+
return E.get(t);
|
|
38
|
+
const e = rt(H(t));
|
|
39
|
+
return E.set(t, e), e;
|
|
40
|
+
}
|
|
41
|
+
function gt(t, e) {
|
|
42
|
+
const n = t.length;
|
|
43
|
+
return (e < 0 ? e < -n : e > n - 1) ? !1 : (e < 0 && (e += n), t.charAt(e));
|
|
44
|
+
}
|
|
45
|
+
function mt(t, e) {
|
|
46
|
+
for (const n of S(e) ? e : [e])
|
|
47
|
+
if (n !== "" && t.startsWith(n)) {
|
|
48
|
+
const r = [...t], o = [...n];
|
|
49
|
+
return r.slice(o.length).join("");
|
|
50
|
+
}
|
|
51
|
+
return t;
|
|
52
|
+
}
|
|
53
|
+
function ht(t, e) {
|
|
54
|
+
for (const n of S(e) ? e : [e])
|
|
55
|
+
if (n !== "" && t.endsWith(n)) {
|
|
56
|
+
const r = [...t], o = [...n];
|
|
57
|
+
return r.slice(0, -o.length).join("");
|
|
58
|
+
}
|
|
59
|
+
return t;
|
|
60
|
+
}
|
|
61
|
+
function B(t, e, n = !1) {
|
|
62
|
+
n && (t = t.toLowerCase());
|
|
63
|
+
let r;
|
|
64
|
+
typeof e == "string" ? r = [e] : r = Array.from(e);
|
|
65
|
+
for (let o of r)
|
|
66
|
+
if (n && (o = o.toLowerCase()), o !== "" && t.includes(o))
|
|
67
|
+
return !0;
|
|
68
|
+
return !1;
|
|
69
|
+
}
|
|
70
|
+
function dt(t, e = "", n = {}) {
|
|
71
|
+
const r = n.radius ?? 100, o = n.omission ?? "...", s = String(t ?? ""), c = e ?? "", i = (y) => y.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), l = new RegExp(`^(.*?)(${i(c)})(.*)$`, "iu").exec(s);
|
|
72
|
+
if (!l)
|
|
73
|
+
return null;
|
|
74
|
+
const g = q(l[1] ?? ""), u = Array.from(g).length, m = x(g, Math.max(u - r, 0), r);
|
|
75
|
+
let a = q(m);
|
|
76
|
+
a !== g && (a = o + a);
|
|
77
|
+
const p = G(l[3] ?? ""), h = x(p, 0, r);
|
|
78
|
+
let w = G(h);
|
|
79
|
+
w !== p && (w = w + o);
|
|
80
|
+
const d = l[2] ?? "";
|
|
81
|
+
return a + d + w;
|
|
82
|
+
}
|
|
83
|
+
function yt(t, e, n = !1) {
|
|
84
|
+
for (const r of e)
|
|
85
|
+
if (!B(t, r, n))
|
|
86
|
+
return !1;
|
|
87
|
+
return !0;
|
|
88
|
+
}
|
|
89
|
+
function wt(t, e, n = !1) {
|
|
90
|
+
return !B(t, e, n);
|
|
91
|
+
}
|
|
92
|
+
function xt(t, e = " ") {
|
|
93
|
+
return S(e) ? (e.forEach((n) => {
|
|
94
|
+
t = t.replace(new RegExp(`${n}+`, "g"), n);
|
|
95
|
+
}), t) : t.replace(new RegExp(`${e}+`, "g"), e);
|
|
96
|
+
}
|
|
97
|
+
function W(t, e) {
|
|
98
|
+
if (t === null)
|
|
99
|
+
return !1;
|
|
100
|
+
t = String(t), S(e) ? e = Array.from(e) : e = [String(e)];
|
|
101
|
+
for (const n of e)
|
|
102
|
+
if (n !== "" && t.endsWith(n))
|
|
103
|
+
return !0;
|
|
104
|
+
return !1;
|
|
105
|
+
}
|
|
106
|
+
function St(t, e) {
|
|
107
|
+
return !W(t, e);
|
|
108
|
+
}
|
|
109
|
+
function $t(t, e) {
|
|
110
|
+
const n = e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
111
|
+
return t.replace(new RegExp(`(?:${n})+$`, "u"), "") + e;
|
|
112
|
+
}
|
|
113
|
+
function kt(t, e, n = null) {
|
|
114
|
+
return e + t + (n ?? e);
|
|
115
|
+
}
|
|
116
|
+
function At(t, e, n = null) {
|
|
117
|
+
return U(t, e) && (t = x(t, F(e))), W(t, n ??= e) && (t = x(t, 0, -F(n))), t;
|
|
118
|
+
}
|
|
119
|
+
function bt(t, e, n = !1) {
|
|
120
|
+
e = String(e);
|
|
121
|
+
let r;
|
|
122
|
+
typeof t == "string" ? r = [t] : r = Array.from(t);
|
|
123
|
+
for (let o of r) {
|
|
124
|
+
if (o = String(o), o === e || n && O(o) === O(e))
|
|
125
|
+
return !0;
|
|
126
|
+
o = o.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), o = o.replace(/\\\*/g, ".*");
|
|
127
|
+
const s = n ? "iu" : "u";
|
|
128
|
+
if (new RegExp(`^${o}$`, s).test(e))
|
|
129
|
+
return !0;
|
|
130
|
+
}
|
|
131
|
+
return !1;
|
|
132
|
+
}
|
|
133
|
+
function Lt(t) {
|
|
134
|
+
for (let e = 0; e < t.length; e++)
|
|
135
|
+
if (t.charCodeAt(e) > 127) return !1;
|
|
136
|
+
return !0;
|
|
137
|
+
}
|
|
138
|
+
function Rt(t) {
|
|
139
|
+
if (!N(t))
|
|
140
|
+
return !1;
|
|
141
|
+
try {
|
|
142
|
+
JSON.parse(t);
|
|
143
|
+
} catch {
|
|
144
|
+
return !1;
|
|
145
|
+
}
|
|
146
|
+
return !0;
|
|
147
|
+
}
|
|
148
|
+
function Et(t, e = []) {
|
|
149
|
+
if (!N(t))
|
|
150
|
+
return !1;
|
|
151
|
+
const r = (e.length === 0 ? "aaa|aaas|about|acap|acct|acd|acr|adiumxtra|adt|afp|afs|aim|amss|android|appdata|apt|ark|attachment|aw|barion|beshare|bitcoin|bitcoincash|blob|bolo|browserext|calculator|callto|cap|cast|casts|chrome|chrome-extension|cid|coap|coap+tcp|coap+ws|coaps|coaps+tcp|coaps+ws|com-eventbrite-attendee|content|conti|crid|cvs|dab|data|dav|diaspora|dict|did|dis|dlna-playcontainer|dlna-playsingle|dns|dntp|dpp|drm|drop|dtn|dvb|ed2k|elsi|example|facetime|fax|feed|feedready|file|filesystem|finger|first-run-pen-experience|fish|fm|ftp|fuchsia-pkg|geo|gg|git|gizmoproject|go|gopher|graph|gtalk|h323|ham|hcap|hcp|http|https|hxxp|hxxps|hydrazone|iax|icap|icon|im|imap|info|iotdisco|ipn|ipp|ipps|irc|irc6|ircs|iris|iris.beep|iris.lwz|iris.xpc|iris.xpcs|isostore|itms|jabber|jar|jms|keyparc|lastfm|ldap|ldaps|leaptofrogans|lorawan|lvlt|magnet|mailserver|mailto|maps|market|message|mid|mms|modem|mongodb|moz|ms-access|ms-browser-extension|ms-calculator|ms-drive-to|ms-enrollment|ms-excel|ms-eyecontrolspeech|ms-gamebarservices|ms-gamingoverlay|ms-getoffice|ms-help|ms-infopath|ms-inputapp|ms-lockscreencomponent-config|ms-media-stream-id|ms-mixedrealitycapture|ms-mobileplans|ms-officeapp|ms-people|ms-project|ms-powerpoint|ms-publisher|ms-restoretabcompanion|ms-screenclip|ms-screensketch|ms-search|ms-search-repair|ms-secondary-screen-controller|ms-secondary-screen-setup|ms-settings|ms-settings-airplanemode|ms-settings-bluetooth|ms-settings-camera|ms-settings-cellular|ms-settings-cloudstorage|ms-settings-connectabledevices|ms-settings-displays-topology|ms-settings-emailandaccounts|ms-settings-language|ms-settings-location|ms-settings-lock|ms-settings-nfctransactions|ms-settings-notifications|ms-settings-power|ms-settings-privacy|ms-settings-proximity|ms-settings-screenrotation|ms-settings-wifi|ms-settings-workplace|ms-spd|ms-sttoverlay|ms-transit-to|ms-useractivityset|ms-virtualtouchpad|ms-visio|ms-walk-to|ms-whiteboard|ms-whiteboard-cmd|ms-word|msnim|msrp|msrps|mss|mtqp|mumble|mupdate|mvn|news|nfs|ni|nih|nntp|notes|ocf|oid|onenote|onenote-cmd|opaquelocktoken|openpgp4fpr|pack|palm|paparazzi|payto|pkcs11|platform|pop|pres|prospero|proxy|pwid|psyc|pttp|qb|query|redis|rediss|reload|res|resource|rmi|rsync|rtmfp|rtmp|rtsp|rtsps|rtspu|s3|secondlife|service|session|sftp|sgn|shttp|sieve|simpleledger|sip|sips|skype|smb|sms|smtp|snews|snmp|soap.beep|soap.beeps|soldat|spiffe|spotify|ssh|steam|stun|stuns|submit|svn|tag|teamspeak|tel|teliaeid|telnet|tftp|tg|things|thismessage|tip|tn3270|tool|ts3server|turn|turns|tv|udp|unreal|urn|ut2004|v-event|vemmi|ventrilo|videotex|vnc|view-source|wais|webcal|wpid|ws|wss|wtai|wyciwyg|xcon|xcon-userid|xfire|xmlrpc.beep|xmlrpc.beeps|xmpp|xri|ymsgr|z39.50|z39.50r|z39.50s" : e.join("|")).split("|").map((s) => s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).join("|");
|
|
152
|
+
try {
|
|
153
|
+
const c = new URL(t).protocol.replace(":", "");
|
|
154
|
+
if (r.split("|").includes(c))
|
|
155
|
+
return !0;
|
|
156
|
+
} catch {
|
|
157
|
+
}
|
|
158
|
+
const o = [
|
|
159
|
+
"^(",
|
|
160
|
+
r,
|
|
161
|
+
"):\\/\\/",
|
|
162
|
+
"(?:((?:[_.\\p{L}\\p{N}-]|%[0-9A-Fa-f]{2})+:)?((?:[_.\\p{L}\\p{N}-]|%[0-9A-Fa-f]{2})+)@)?",
|
|
163
|
+
"(",
|
|
164
|
+
"(?:[\\p{L}\\p{N}\\p{S}_\\.-]+(?:\\.?([\\p{L}\\p{N}]|xn--[\\p{L}\\p{N}-]+)+\\.?)",
|
|
165
|
+
"|",
|
|
166
|
+
"(?:\\d{1,3}\\.){3}\\d{1,3}",
|
|
167
|
+
"|",
|
|
168
|
+
"\\[(?:[0-9A-Fa-f:.]+)\\]",
|
|
169
|
+
")",
|
|
170
|
+
"(?::[0-9]+)?",
|
|
171
|
+
'(?:/(?:[\\p{L}\\p{N}\\-._~!$&"()*,;=:@]|%[0-9A-Fa-f]{2})*)*',
|
|
172
|
+
'(?:\\?(?:[\\p{L}\\p{N}\\-._~!$&"()*,;=:@/?\\[\\]]|%[0-9A-Fa-f]{2})*)?',
|
|
173
|
+
'(?:#(?:[\\p{L}\\p{N}\\-._~!$&"()*,;=:@/?]|%[0-9A-Fa-f]{2})*)?',
|
|
174
|
+
"$"
|
|
175
|
+
].join("");
|
|
176
|
+
try {
|
|
177
|
+
return new RegExp(o, "iu").test(t);
|
|
178
|
+
} catch {
|
|
179
|
+
return !1;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
function Ct(t) {
|
|
183
|
+
return nt(t, "-");
|
|
184
|
+
}
|
|
185
|
+
function F(t) {
|
|
186
|
+
return t.length;
|
|
187
|
+
}
|
|
188
|
+
function Ft(t, e = 100, n = "...", r = !1) {
|
|
189
|
+
if (t.length <= e)
|
|
190
|
+
return t;
|
|
191
|
+
if (!r)
|
|
192
|
+
return t.slice(0, e).replace(/\s+$/, "") + n;
|
|
193
|
+
t = et(t).replace(/[\n\r]+/g, " ").trim();
|
|
194
|
+
const o = t.slice(0, e).replace(/\s+$/, "");
|
|
195
|
+
return t.substring(e, e + 1) === " " ? o + n : o.replace(/(.*)\s.*/, "$1") + n;
|
|
196
|
+
}
|
|
197
|
+
function J(t) {
|
|
198
|
+
return O(t);
|
|
199
|
+
}
|
|
200
|
+
function zt(t, e = 100, n = "...") {
|
|
201
|
+
if (e <= 0)
|
|
202
|
+
return t;
|
|
203
|
+
const r = e, o = new RegExp(`^\\s*(?:\\S+\\s*){1,${r}}`, "u"), s = t.match(o);
|
|
204
|
+
return !s || F(t) === F(s[0]) ? t : s[0].replace(/\s+$/, "") + n;
|
|
205
|
+
}
|
|
206
|
+
function _t(t, e, n, r = null) {
|
|
207
|
+
if (e === "")
|
|
208
|
+
return t;
|
|
209
|
+
const o = t.length;
|
|
210
|
+
let s = n;
|
|
211
|
+
n < 0 && (s = n < -o ? 0 : o + n);
|
|
212
|
+
const c = t.slice(
|
|
213
|
+
s,
|
|
214
|
+
r !== null ? s + r : void 0
|
|
215
|
+
);
|
|
216
|
+
if (c === "")
|
|
217
|
+
return t;
|
|
218
|
+
const i = t.slice(0, s), f = c.length, l = t.slice(s + f);
|
|
219
|
+
return i + e.slice(0, 1).repeat(f) + l;
|
|
220
|
+
}
|
|
221
|
+
function Mt(t, e) {
|
|
222
|
+
let n = "u", r = t;
|
|
223
|
+
if (t.length >= 2 && t[0] === "/") {
|
|
224
|
+
let o = -1;
|
|
225
|
+
for (let s = t.length - 1; s > 0; s--)
|
|
226
|
+
if (t[s] === "/") {
|
|
227
|
+
let c = 0;
|
|
228
|
+
for (let i = s - 1; i >= 0 && t[i] === "\\"; i--)
|
|
229
|
+
c++;
|
|
230
|
+
if (c % 2 === 0) {
|
|
231
|
+
o = s;
|
|
232
|
+
break;
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
if (o > 0) {
|
|
236
|
+
r = t.slice(1, o);
|
|
237
|
+
const s = t.slice(o + 1);
|
|
238
|
+
if (s)
|
|
239
|
+
for (const c of s)
|
|
240
|
+
/[imsuy]/.test(c) && !n.includes(c) && (n += c);
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
try {
|
|
244
|
+
const s = new RegExp(r, n).exec(e);
|
|
245
|
+
return s ? s[1] !== void 0 ? s[1] : s[0] : "";
|
|
246
|
+
} catch {
|
|
247
|
+
return "";
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
function Ot(t, e) {
|
|
251
|
+
e = String(e);
|
|
252
|
+
const n = typeof t == "string" ? [t] : Array.from(t);
|
|
253
|
+
for (const r of n) {
|
|
254
|
+
if (typeof r != "string" || r === "") continue;
|
|
255
|
+
let o = "u", s = r;
|
|
256
|
+
if (r.length >= 2 && r[0] === "/") {
|
|
257
|
+
let c = -1;
|
|
258
|
+
for (let i = r.length - 1; i > 0; i--)
|
|
259
|
+
if (r[i] === "/") {
|
|
260
|
+
let f = 0;
|
|
261
|
+
for (let l = i - 1; l >= 0 && r[l] === "\\"; l--)
|
|
262
|
+
f++;
|
|
263
|
+
if (f % 2 === 0) {
|
|
264
|
+
c = i;
|
|
265
|
+
break;
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
if (c > 0) {
|
|
269
|
+
s = r.slice(1, c);
|
|
270
|
+
const i = r.slice(c + 1);
|
|
271
|
+
if (i)
|
|
272
|
+
for (const f of i)
|
|
273
|
+
/[imsuy]/.test(f) && !o.includes(f) && (o += f);
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
try {
|
|
277
|
+
if (new RegExp(s, o).test(e))
|
|
278
|
+
return !0;
|
|
279
|
+
} catch {
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
return !1;
|
|
283
|
+
}
|
|
284
|
+
function Nt(t, e) {
|
|
285
|
+
let n = "u", r = t;
|
|
286
|
+
if (t.length >= 2 && t[0] === "/") {
|
|
287
|
+
let s = -1;
|
|
288
|
+
for (let c = t.length - 1; c > 0; c--)
|
|
289
|
+
if (t[c] === "/") {
|
|
290
|
+
let i = 0;
|
|
291
|
+
for (let f = c - 1; f >= 0 && t[f] === "\\"; f--)
|
|
292
|
+
i++;
|
|
293
|
+
if (i % 2 === 0) {
|
|
294
|
+
s = c;
|
|
295
|
+
break;
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
if (s > 0) {
|
|
299
|
+
r = t.slice(1, s);
|
|
300
|
+
const c = t.slice(s + 1);
|
|
301
|
+
if (c)
|
|
302
|
+
for (const i of c)
|
|
303
|
+
/[imsuy]/.test(i) && !n.includes(i) && (n += i);
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
n.includes("g") || (n += "g");
|
|
307
|
+
let o = [];
|
|
308
|
+
try {
|
|
309
|
+
const s = new RegExp(r, n);
|
|
310
|
+
let c;
|
|
311
|
+
for (; (c = s.exec(e)) !== null; )
|
|
312
|
+
o.push(c[1] !== void 0 ? c[1] : c[0]), c[0] === "" && s.lastIndex++;
|
|
313
|
+
} catch {
|
|
314
|
+
o = [];
|
|
315
|
+
}
|
|
316
|
+
return o;
|
|
317
|
+
}
|
|
318
|
+
function Wt(t) {
|
|
319
|
+
return S(t) ? t.map((e) => e.replace(/[^0-9]/g, "")) : t.replace(/[^0-9]/g, "");
|
|
320
|
+
}
|
|
321
|
+
function Ut(t, e, n = " ") {
|
|
322
|
+
const r = t.length;
|
|
323
|
+
if (e <= r || n === "")
|
|
324
|
+
return t;
|
|
325
|
+
const o = e - r, s = Math.floor(o / 2), c = o - s;
|
|
326
|
+
return z(n, s) + t + z(n, c);
|
|
327
|
+
}
|
|
328
|
+
function It(t, e, n = " ") {
|
|
329
|
+
const r = t.length;
|
|
330
|
+
if (e <= r || n === "")
|
|
331
|
+
return t;
|
|
332
|
+
const s = e - r;
|
|
333
|
+
return z(n, s) + t;
|
|
334
|
+
}
|
|
335
|
+
function qt(t, e, n = " ") {
|
|
336
|
+
const r = t.length;
|
|
337
|
+
if (e <= r || n === "")
|
|
338
|
+
return t;
|
|
339
|
+
const s = e - r;
|
|
340
|
+
return t + z(n, s);
|
|
341
|
+
}
|
|
342
|
+
function z(t, e) {
|
|
343
|
+
if (e <= 0) return "";
|
|
344
|
+
const n = Math.ceil(e / t.length);
|
|
345
|
+
return t.repeat(n).slice(0, e);
|
|
346
|
+
}
|
|
347
|
+
function Gt(t = 32, e = !0, n = !0, r = !0, o = !1) {
|
|
348
|
+
const l = [
|
|
349
|
+
e ? [
|
|
350
|
+
"a",
|
|
351
|
+
"b",
|
|
352
|
+
"c",
|
|
353
|
+
"d",
|
|
354
|
+
"e",
|
|
355
|
+
"f",
|
|
356
|
+
"g",
|
|
357
|
+
"h",
|
|
358
|
+
"i",
|
|
359
|
+
"j",
|
|
360
|
+
"k",
|
|
361
|
+
"l",
|
|
362
|
+
"m",
|
|
363
|
+
"n",
|
|
364
|
+
"o",
|
|
365
|
+
"p",
|
|
366
|
+
"q",
|
|
367
|
+
"r",
|
|
368
|
+
"s",
|
|
369
|
+
"t",
|
|
370
|
+
"u",
|
|
371
|
+
"v",
|
|
372
|
+
"w",
|
|
373
|
+
"x",
|
|
374
|
+
"y",
|
|
375
|
+
"z",
|
|
376
|
+
"A",
|
|
377
|
+
"B",
|
|
378
|
+
"C",
|
|
379
|
+
"D",
|
|
380
|
+
"E",
|
|
381
|
+
"F",
|
|
382
|
+
"G",
|
|
383
|
+
"H",
|
|
384
|
+
"I",
|
|
385
|
+
"J",
|
|
386
|
+
"K",
|
|
387
|
+
"L",
|
|
388
|
+
"M",
|
|
389
|
+
"N",
|
|
390
|
+
"O",
|
|
391
|
+
"P",
|
|
392
|
+
"Q",
|
|
393
|
+
"R",
|
|
394
|
+
"S",
|
|
395
|
+
"T",
|
|
396
|
+
"U",
|
|
397
|
+
"V",
|
|
398
|
+
"W",
|
|
399
|
+
"X",
|
|
400
|
+
"Y",
|
|
401
|
+
"Z"
|
|
402
|
+
] : null,
|
|
403
|
+
n ? ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"] : null,
|
|
404
|
+
r ? [
|
|
405
|
+
"~",
|
|
406
|
+
"!",
|
|
407
|
+
"#",
|
|
408
|
+
"$",
|
|
409
|
+
"%",
|
|
410
|
+
"^",
|
|
411
|
+
"&",
|
|
412
|
+
"*",
|
|
413
|
+
"(",
|
|
414
|
+
")",
|
|
415
|
+
"-",
|
|
416
|
+
"_",
|
|
417
|
+
".",
|
|
418
|
+
",",
|
|
419
|
+
"<",
|
|
420
|
+
">",
|
|
421
|
+
"?",
|
|
422
|
+
"/",
|
|
423
|
+
"\\",
|
|
424
|
+
"{",
|
|
425
|
+
"}",
|
|
426
|
+
"[",
|
|
427
|
+
"]",
|
|
428
|
+
"|",
|
|
429
|
+
":",
|
|
430
|
+
";"
|
|
431
|
+
] : null,
|
|
432
|
+
o ? [" "] : null
|
|
433
|
+
].filter((a) => S(a));
|
|
434
|
+
if (l.length === 0 || t <= 0)
|
|
435
|
+
return "";
|
|
436
|
+
const g = [];
|
|
437
|
+
for (const a of l) {
|
|
438
|
+
const p = M(0, a.length - 1);
|
|
439
|
+
g.push(a[p]);
|
|
440
|
+
}
|
|
441
|
+
const u = Math.max(0, t - g.length), m = l.flat();
|
|
442
|
+
for (let a = 0; a < u; a++) {
|
|
443
|
+
const p = M(0, m.length - 1);
|
|
444
|
+
g.push(m[p]);
|
|
445
|
+
}
|
|
446
|
+
for (let a = g.length - 1; a > 0; a--) {
|
|
447
|
+
const p = M(0, a), h = g[a];
|
|
448
|
+
g[a] = g[p], g[p] = h;
|
|
449
|
+
}
|
|
450
|
+
return g.join("");
|
|
451
|
+
}
|
|
452
|
+
function Pt(t, e, n = 0) {
|
|
453
|
+
if (e === "")
|
|
454
|
+
return !1;
|
|
455
|
+
const r = Array.from(t), o = Array.from(e);
|
|
456
|
+
let s = n >= 0 ? n : r.length + n;
|
|
457
|
+
if (s < 0 && (s = 0), s >= r.length)
|
|
458
|
+
return !1;
|
|
459
|
+
const c = r.length - o.length;
|
|
460
|
+
for (let i = s; i <= c; i++) {
|
|
461
|
+
let f = !0;
|
|
462
|
+
for (let l = 0; l < o.length; l++)
|
|
463
|
+
if (r[i + l] !== o[l]) {
|
|
464
|
+
f = !1;
|
|
465
|
+
break;
|
|
466
|
+
}
|
|
467
|
+
if (f)
|
|
468
|
+
return i;
|
|
469
|
+
}
|
|
470
|
+
return !1;
|
|
471
|
+
}
|
|
472
|
+
function Y(t = 16) {
|
|
473
|
+
return (b ?? ((n) => K(n)))(t);
|
|
474
|
+
}
|
|
475
|
+
function j(t) {
|
|
476
|
+
b = t;
|
|
477
|
+
}
|
|
478
|
+
function Tt(t, e) {
|
|
479
|
+
let n = 0;
|
|
480
|
+
const r = e ?? function(o) {
|
|
481
|
+
const s = b;
|
|
482
|
+
b = null;
|
|
483
|
+
const c = Y(o);
|
|
484
|
+
return b = s, n++, c;
|
|
485
|
+
};
|
|
486
|
+
j((o) => n < t.length ? String(t[n++]) : r(o));
|
|
487
|
+
}
|
|
488
|
+
function Bt() {
|
|
489
|
+
b = null;
|
|
490
|
+
}
|
|
491
|
+
function Jt(t, e) {
|
|
492
|
+
return e <= 0 ? "" : t.repeat(e);
|
|
493
|
+
}
|
|
494
|
+
function Ht(t, e, n) {
|
|
495
|
+
let r;
|
|
496
|
+
typeof e == "object" && !S(e) ? r = Object.values(e) : r = S(e) ? [...e] : Array.from(e);
|
|
497
|
+
const o = n.split(t);
|
|
498
|
+
if (o.length === 1)
|
|
499
|
+
return n;
|
|
500
|
+
let s = o[0];
|
|
501
|
+
for (let c = 1; c < o.length; c++) {
|
|
502
|
+
const i = r.length ? r.shift() : t;
|
|
503
|
+
s += i + o[c];
|
|
504
|
+
}
|
|
505
|
+
return String(s);
|
|
506
|
+
}
|
|
507
|
+
function Kt(t, e) {
|
|
508
|
+
try {
|
|
509
|
+
const n = String(t);
|
|
510
|
+
if (n.length)
|
|
511
|
+
return n;
|
|
512
|
+
throw new Error("Failed to convert value to string");
|
|
513
|
+
} catch {
|
|
514
|
+
return e;
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
function Zt(t, e, n, r = !0) {
|
|
518
|
+
const o = (l) => typeof l == "string" ? [l] : Array.from(l), s = o(t), c = o(e), i = (l) => l.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), f = (l) => s.reduce((g, u, m) => {
|
|
519
|
+
if (u === "") return g;
|
|
520
|
+
const a = c[m] ?? "";
|
|
521
|
+
if (!r)
|
|
522
|
+
return g.split(u).join(a);
|
|
523
|
+
const p = new RegExp(i(u), "gi");
|
|
524
|
+
return g.replace(p, () => a);
|
|
525
|
+
}, l);
|
|
526
|
+
return N(n) ? f(n) : Array.from(n).map(f);
|
|
527
|
+
}
|
|
528
|
+
function v(t, e, n) {
|
|
529
|
+
if (t = String(t), t === "")
|
|
530
|
+
return n;
|
|
531
|
+
const r = n.indexOf(t);
|
|
532
|
+
return r !== -1 ? n.slice(0, r) + e + n.slice(r + t.length) : n;
|
|
533
|
+
}
|
|
534
|
+
function Dt(t, e, n) {
|
|
535
|
+
return t = String(t), t === "" ? n : U(n, t) ? v(t, e, n) : n;
|
|
536
|
+
}
|
|
537
|
+
function tt(t, e, n) {
|
|
538
|
+
if (t = String(t), t === "")
|
|
539
|
+
return n;
|
|
540
|
+
const r = n.lastIndexOf(t);
|
|
541
|
+
return r !== -1 ? n.slice(0, r) + e + n.slice(r + t.length) : n;
|
|
542
|
+
}
|
|
543
|
+
function Qt(t, e, n) {
|
|
544
|
+
return t = String(t), t === "" ? n : W(n, t) ? tt(t, e, n) : n;
|
|
545
|
+
}
|
|
546
|
+
function Vt(t, e, n, r = -1) {
|
|
547
|
+
const o = (u) => S(u) ? u : [u], s = o(t);
|
|
548
|
+
function c(u) {
|
|
549
|
+
try {
|
|
550
|
+
if (u instanceof RegExp) {
|
|
551
|
+
let p = u.flags;
|
|
552
|
+
return p.includes("g") || (p += "g"), p.includes("u") || (p += "u"), new RegExp(u.source, p);
|
|
553
|
+
}
|
|
554
|
+
let m = u, a = "gu";
|
|
555
|
+
if (u.length >= 2 && u[0] === "/") {
|
|
556
|
+
let p = -1;
|
|
557
|
+
for (let h = u.length - 1; h > 0; h--)
|
|
558
|
+
if (u[h] === "/") {
|
|
559
|
+
let w = 0;
|
|
560
|
+
for (let d = h - 1; d >= 0 && u[d] === "\\"; d--)
|
|
561
|
+
w++;
|
|
562
|
+
if (w % 2 === 0) {
|
|
563
|
+
p = h;
|
|
564
|
+
break;
|
|
565
|
+
}
|
|
566
|
+
}
|
|
567
|
+
if (p > 1) {
|
|
568
|
+
m = u.slice(1, p);
|
|
569
|
+
const h = u.slice(p + 1);
|
|
570
|
+
if (h)
|
|
571
|
+
for (const w of h)
|
|
572
|
+
/[imsuy]/.test(w) && !a.includes(w) && (a += w);
|
|
573
|
+
a.includes("g") || (a += "g"), a.includes("u") || (a += "u");
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
return new RegExp(
|
|
577
|
+
m,
|
|
578
|
+
Array.from(new Set(a.split(""))).join("")
|
|
579
|
+
);
|
|
580
|
+
} catch {
|
|
581
|
+
return null;
|
|
582
|
+
}
|
|
583
|
+
}
|
|
584
|
+
const i = [];
|
|
585
|
+
for (const u of s) {
|
|
586
|
+
const m = c(u);
|
|
587
|
+
if (!m) return null;
|
|
588
|
+
i.push(m);
|
|
589
|
+
}
|
|
590
|
+
const f = Q(e), l = f ? [] : o(e), g = (u) => {
|
|
591
|
+
let m = u;
|
|
592
|
+
for (let a = 0; a < i.length; a++) {
|
|
593
|
+
const p = i[a];
|
|
594
|
+
if (f) {
|
|
595
|
+
let h = 0;
|
|
596
|
+
const w = e;
|
|
597
|
+
m = m.replace(
|
|
598
|
+
p,
|
|
599
|
+
(d, ...y) => {
|
|
600
|
+
if (r >= 0 && h >= r) return d;
|
|
601
|
+
h++;
|
|
602
|
+
const L = typeof y[y.length - 1] == "object" && typeof y[y.length - 2] == "number" ? y.length - 3 : y.length - 2, $ = [];
|
|
603
|
+
for (let k = 0; k < L; k++)
|
|
604
|
+
$.push(y[k]);
|
|
605
|
+
const A = [d, ...$];
|
|
606
|
+
return w(A);
|
|
607
|
+
}
|
|
608
|
+
);
|
|
609
|
+
} else {
|
|
610
|
+
const h = l[a] ?? (l.length === 1 ? l[0] : "");
|
|
611
|
+
if (r < 0)
|
|
612
|
+
m = m.replace(p, (w, ...d) => {
|
|
613
|
+
const _ = typeof d[d.length - 1] == "object" && typeof d[d.length - 2] == "number" ? d.length - 3 : d.length - 2, L = d.slice(0, _).map(($) => String($));
|
|
614
|
+
return h.replace(/\$(\d{1,2})/g, ($, A) => {
|
|
615
|
+
const k = parseInt(A, 10);
|
|
616
|
+
return (L[k - 1] ?? "").toUpperCase();
|
|
617
|
+
});
|
|
618
|
+
});
|
|
619
|
+
else {
|
|
620
|
+
let w = 0;
|
|
621
|
+
m = m.replace(p, (d, ...y) => {
|
|
622
|
+
if (w >= r) return d;
|
|
623
|
+
w++;
|
|
624
|
+
const L = typeof y[y.length - 1] == "object" && typeof y[y.length - 2] == "number" ? y.length - 3 : y.length - 2, $ = y.slice(0, L).map((A) => String(A));
|
|
625
|
+
return h.replace(/\$(\d{1,2})/g, (A, k) => {
|
|
626
|
+
const I = parseInt(k, 10);
|
|
627
|
+
return ($[I - 1] ?? "").toUpperCase();
|
|
628
|
+
});
|
|
629
|
+
});
|
|
630
|
+
}
|
|
631
|
+
}
|
|
632
|
+
}
|
|
633
|
+
return m;
|
|
634
|
+
};
|
|
635
|
+
return S(n) ? n.map(g) : g(n);
|
|
636
|
+
}
|
|
637
|
+
function et(t) {
|
|
638
|
+
return t.replace(/<\/?[^>]+(>|$)/g, "");
|
|
639
|
+
}
|
|
640
|
+
function Xt(t, e, n = !0) {
|
|
641
|
+
const r = typeof t == "string" ? [t] : Array.from(t), o = (c) => c.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), s = (c) => {
|
|
642
|
+
let i = c;
|
|
643
|
+
for (const f of r)
|
|
644
|
+
if (f !== "")
|
|
645
|
+
if (n)
|
|
646
|
+
i = i.split(f).join("");
|
|
647
|
+
else {
|
|
648
|
+
const l = new RegExp(o(f), "gi");
|
|
649
|
+
i = i.replace(l, "");
|
|
650
|
+
}
|
|
651
|
+
return i;
|
|
652
|
+
};
|
|
653
|
+
return typeof e == "string" ? s(e) : Array.from(e, (c) => s(String(c)));
|
|
654
|
+
}
|
|
655
|
+
function Yt(t) {
|
|
656
|
+
return Array.from(t).reverse().join("");
|
|
657
|
+
}
|
|
658
|
+
function jt(t, e) {
|
|
659
|
+
const n = e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
660
|
+
return e + t.replace(new RegExp(`^(?:${n})+`, "u"), "");
|
|
661
|
+
}
|
|
662
|
+
function vt(t) {
|
|
663
|
+
const e = String(t).trim();
|
|
664
|
+
if (e === "")
|
|
665
|
+
return "";
|
|
666
|
+
let n = e.split(/\s+/u);
|
|
667
|
+
return n.length > 1 ? n = n.map((o) => P(o)) : n = st(n.join("_")).map((o) => P(o)), n.join("_").replace(/[-_ ]+/gu, "_").split("_").filter((o) => o.length > 0).join(" ");
|
|
668
|
+
}
|
|
669
|
+
function te(t) {
|
|
670
|
+
if (t.trim() === "")
|
|
671
|
+
return t;
|
|
672
|
+
const e = /* @__PURE__ */ new Set([
|
|
673
|
+
"and",
|
|
674
|
+
"as",
|
|
675
|
+
"but",
|
|
676
|
+
"for",
|
|
677
|
+
"if",
|
|
678
|
+
"nor",
|
|
679
|
+
"or",
|
|
680
|
+
"so",
|
|
681
|
+
"yet",
|
|
682
|
+
"a",
|
|
683
|
+
"an",
|
|
684
|
+
"the",
|
|
685
|
+
"at",
|
|
686
|
+
"by",
|
|
687
|
+
"for",
|
|
688
|
+
"in",
|
|
689
|
+
"of",
|
|
690
|
+
"off",
|
|
691
|
+
"on",
|
|
692
|
+
"per",
|
|
693
|
+
"to",
|
|
694
|
+
"up",
|
|
695
|
+
"via",
|
|
696
|
+
"et",
|
|
697
|
+
"ou",
|
|
698
|
+
"un",
|
|
699
|
+
"une",
|
|
700
|
+
"la",
|
|
701
|
+
"le",
|
|
702
|
+
"les",
|
|
703
|
+
"de",
|
|
704
|
+
"du",
|
|
705
|
+
"des",
|
|
706
|
+
"par",
|
|
707
|
+
"à"
|
|
708
|
+
]), n = /* @__PURE__ */ new Set([".", "!", "?", ":", "—", ","]), r = t.split(/\s+/u), o = (s) => {
|
|
709
|
+
if (!s) return s;
|
|
710
|
+
const c = Array.from(s), i = c[0].toLocaleUpperCase(), f = c.slice(1).join("");
|
|
711
|
+
return i + f;
|
|
712
|
+
};
|
|
713
|
+
for (let s = 0; s < r.length; s++) {
|
|
714
|
+
const c = r[s].toLocaleLowerCase();
|
|
715
|
+
if (c.includes("-")) {
|
|
716
|
+
const f = c.split("-").map((l) => e.has(l) && l.length <= 3 ? l : o(l));
|
|
717
|
+
r[s] = f.join("-");
|
|
718
|
+
} else {
|
|
719
|
+
const i = s > 0 ? r[s - 1] : "", f = i ? Array.from(i).slice(-1)[0] : void 0, l = s === 0 || f !== void 0 && n.has(f);
|
|
720
|
+
e.has(c) && c.length <= 3 && !l ? r[s] = c : r[s] = o(c);
|
|
721
|
+
}
|
|
722
|
+
}
|
|
723
|
+
return r.join(" ");
|
|
724
|
+
}
|
|
725
|
+
function nt(t, e = "_") {
|
|
726
|
+
const r = `${t}|${e}`;
|
|
727
|
+
if (R.has(r))
|
|
728
|
+
return R.get(r);
|
|
729
|
+
let o = t;
|
|
730
|
+
return /^[a-z]+$/.test(t) || (o = ot(t).replace(/\s+/gu, ""), o = o.replace(/(.)(?=[A-Z])/g, `$1${e}`), o = J(o)), R.set(r, o), o;
|
|
731
|
+
}
|
|
732
|
+
function ee(t) {
|
|
733
|
+
return Z(t).replace(/[\s\u3164\u1160]+/gu, " ");
|
|
734
|
+
}
|
|
735
|
+
function U(t, e) {
|
|
736
|
+
if (t == null || e == null)
|
|
737
|
+
return !1;
|
|
738
|
+
let n = [
|
|
739
|
+
e
|
|
740
|
+
];
|
|
741
|
+
typeof e == "string" || typeof e == "number" ? n = [e] : Symbol.iterator in Object(e) && (n = Array.from(e));
|
|
742
|
+
const r = String(t);
|
|
743
|
+
for (const o of n) {
|
|
744
|
+
if (o == null)
|
|
745
|
+
continue;
|
|
746
|
+
const s = String(o);
|
|
747
|
+
if (s !== "" && r.startsWith(s))
|
|
748
|
+
return !0;
|
|
749
|
+
}
|
|
750
|
+
return !1;
|
|
751
|
+
}
|
|
752
|
+
function ne(t, e) {
|
|
753
|
+
return !U(t, e);
|
|
754
|
+
}
|
|
755
|
+
function H(t) {
|
|
756
|
+
const e = t;
|
|
757
|
+
if (C.has(e))
|
|
758
|
+
return C.get(e);
|
|
759
|
+
const n = String(t).replace(/[-_]+/g, " "), r = n.trim() === "" ? [] : n.split(/\s+/u), o = (c) => {
|
|
760
|
+
if (!c) return c;
|
|
761
|
+
const i = Array.from(c), f = i[0].toUpperCase(), l = i.slice(1).join("");
|
|
762
|
+
return f + l;
|
|
763
|
+
}, s = r.map(o).join("");
|
|
764
|
+
return C.set(e, s), s;
|
|
765
|
+
}
|
|
766
|
+
function re(t) {
|
|
767
|
+
return H(t);
|
|
768
|
+
}
|
|
769
|
+
function se(t, e) {
|
|
770
|
+
if (!t || Object.keys(t).length === 0)
|
|
771
|
+
return e;
|
|
772
|
+
const n = Object.keys(t).filter((s) => s !== "");
|
|
773
|
+
if (n.length === 0)
|
|
774
|
+
return e;
|
|
775
|
+
n.sort((s, c) => c.length - s.length);
|
|
776
|
+
const r = (s) => s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), o = new RegExp(n.map(r).join("|"), "gu");
|
|
777
|
+
return e.replace(o, (s) => t[s] ?? s);
|
|
778
|
+
}
|
|
779
|
+
function oe(t, e) {
|
|
780
|
+
return e < 0 ? x(t, e) : x(t, 0, e);
|
|
781
|
+
}
|
|
782
|
+
function rt(t) {
|
|
783
|
+
return J(x(t, 0, 1)) + x(t, 1);
|
|
784
|
+
}
|
|
785
|
+
function ie(t) {
|
|
786
|
+
return D(x(t, 0, 1)) + x(t, 1);
|
|
787
|
+
}
|
|
788
|
+
function st(t) {
|
|
789
|
+
return t.split(new RegExp("(?=\\p{Lu})", "u")).filter(Boolean);
|
|
790
|
+
}
|
|
791
|
+
function ot(t, e = ` \r
|
|
792
|
+
\f\v`) {
|
|
793
|
+
const n = S(e) ? e.join("") : e, r = (i) => i.replace(/[-\\^$*+?.()|[\]{}]/g, "\\$&"), o = n.length ? r(n) : "", s = o.length ? `(?:\\s|[${o}])` : "\\s", c = new RegExp(`(^|${s})(\\p{Ll})`, "gu");
|
|
794
|
+
return t.replace(c, (i, f, l) => f + l.toUpperCase());
|
|
795
|
+
}
|
|
796
|
+
function ce(t, e = null) {
|
|
797
|
+
const n = e && e.length > 0 ? e.replace(/[-\\^$*+?.()|[\]{}]/g, "\\$&") : "", r = n.length > 0 ? new RegExp(`[\\p{L}\\p{N}${n}]+`, "gu") : /[\p{L}\p{N}]+/gu, o = t.match(r);
|
|
798
|
+
return o ? o.length : 0;
|
|
799
|
+
}
|
|
800
|
+
function le(t, e = 75, n = `
|
|
801
|
+
`, r = !1) {
|
|
802
|
+
if (t.length === 0 || e < 1 || n === "")
|
|
803
|
+
return t;
|
|
804
|
+
const o = t.split(/\r\n|\n|\r/), s = [];
|
|
805
|
+
for (const c of o) {
|
|
806
|
+
let i = c;
|
|
807
|
+
if (i.length === 0) {
|
|
808
|
+
s.push("");
|
|
809
|
+
continue;
|
|
810
|
+
}
|
|
811
|
+
if (r) {
|
|
812
|
+
for (; i.length > 0 && !(/^\s/u.test(i) && (i = i.replace(/^\s+/u, ""), i.length === 0)); ) {
|
|
813
|
+
if (i.length <= e) {
|
|
814
|
+
s.push(i), i = "";
|
|
815
|
+
break;
|
|
816
|
+
}
|
|
817
|
+
let f = i.slice(0, e);
|
|
818
|
+
f = f.replace(/\s+$/u, ""), s.push(f), i = i.slice(e).replace(/^\s+/u, "");
|
|
819
|
+
}
|
|
820
|
+
continue;
|
|
821
|
+
}
|
|
822
|
+
for (; i.length > e; ) {
|
|
823
|
+
const f = i.replace(/^\s+/u, "");
|
|
824
|
+
if (f.length !== i.length && (i = f, i.length <= e))
|
|
825
|
+
break;
|
|
826
|
+
const l = i.slice(0, e + 1);
|
|
827
|
+
let g = -1;
|
|
828
|
+
for (let m = l.length - 1; m >= 0; m--)
|
|
829
|
+
if (/\s/u.test(l[m])) {
|
|
830
|
+
g = m;
|
|
831
|
+
break;
|
|
832
|
+
}
|
|
833
|
+
if (g > 0) {
|
|
834
|
+
s.push(i.slice(0, g)), i = i.slice(g + 1);
|
|
835
|
+
continue;
|
|
836
|
+
}
|
|
837
|
+
const u = i.search(/\s/u);
|
|
838
|
+
if (u >= 0) {
|
|
839
|
+
s.push(i.slice(0, u)), i = i.slice(u + 1);
|
|
840
|
+
continue;
|
|
841
|
+
}
|
|
842
|
+
s.push(i), i = "";
|
|
843
|
+
break;
|
|
844
|
+
}
|
|
845
|
+
i.length > 0 && s.push(i);
|
|
846
|
+
}
|
|
847
|
+
return s.join(n);
|
|
848
|
+
}
|
|
849
|
+
function fe() {
|
|
850
|
+
return R.size;
|
|
851
|
+
}
|
|
852
|
+
function ae() {
|
|
853
|
+
return E.size;
|
|
854
|
+
}
|
|
855
|
+
function ue() {
|
|
856
|
+
return C.size;
|
|
857
|
+
}
|
|
858
|
+
function pe() {
|
|
859
|
+
R.clear(), E.clear(), C.clear();
|
|
860
|
+
}
|
|
861
|
+
export {
|
|
862
|
+
T as after,
|
|
863
|
+
ft as afterLast,
|
|
864
|
+
te as apa,
|
|
865
|
+
V as before,
|
|
866
|
+
X as beforeLast,
|
|
867
|
+
at as between,
|
|
868
|
+
ut as betweenFirst,
|
|
869
|
+
pt as camel,
|
|
870
|
+
ae as camelCacheSize,
|
|
871
|
+
gt as charAt,
|
|
872
|
+
ht as chopEnd,
|
|
873
|
+
mt as chopStart,
|
|
874
|
+
B as contains,
|
|
875
|
+
yt as containsAll,
|
|
876
|
+
Bt as createRandomStringsNormally,
|
|
877
|
+
j as createRandomStringsUsing,
|
|
878
|
+
Tt as createRandomStringsUsingSequence,
|
|
879
|
+
xt as deduplicate,
|
|
880
|
+
wt as doesntContain,
|
|
881
|
+
St as doesntEndWith,
|
|
882
|
+
ne as doesntStartWith,
|
|
883
|
+
W as endsWith,
|
|
884
|
+
dt as excerpt,
|
|
885
|
+
$t as finish,
|
|
886
|
+
pe as flushCache,
|
|
887
|
+
vt as headline,
|
|
888
|
+
bt as is,
|
|
889
|
+
Lt as isAscii,
|
|
890
|
+
Rt as isJson,
|
|
891
|
+
Ot as isMatch,
|
|
892
|
+
Et as isUrl,
|
|
893
|
+
Ct as kebab,
|
|
894
|
+
rt as lcfirst,
|
|
895
|
+
F as length,
|
|
896
|
+
Ft as limit,
|
|
897
|
+
J as lower,
|
|
898
|
+
z as makePad,
|
|
899
|
+
_t as mask,
|
|
900
|
+
Mt as match,
|
|
901
|
+
Nt as matchAll,
|
|
902
|
+
Wt as numbers,
|
|
903
|
+
Ut as padBoth,
|
|
904
|
+
It as padLeft,
|
|
905
|
+
qt as padRight,
|
|
906
|
+
re as pascal,
|
|
907
|
+
Gt as password,
|
|
908
|
+
Pt as position,
|
|
909
|
+
Y as random,
|
|
910
|
+
Xt as remove,
|
|
911
|
+
Jt as repeat,
|
|
912
|
+
Zt as replace,
|
|
913
|
+
Ht as replaceArray,
|
|
914
|
+
Qt as replaceEnd,
|
|
915
|
+
v as replaceFirst,
|
|
916
|
+
tt as replaceLast,
|
|
917
|
+
Vt as replaceMatches,
|
|
918
|
+
Dt as replaceStart,
|
|
919
|
+
Yt as reverse,
|
|
920
|
+
nt as snake,
|
|
921
|
+
fe as snakeCacheSize,
|
|
922
|
+
ee as squish,
|
|
923
|
+
jt as start,
|
|
924
|
+
U as startsWith,
|
|
925
|
+
et as stripTags,
|
|
926
|
+
H as studly,
|
|
927
|
+
ue as studlyCacheSize,
|
|
928
|
+
se as swap,
|
|
929
|
+
oe as take,
|
|
930
|
+
Kt as toStringOr,
|
|
931
|
+
ie as ucfirst,
|
|
932
|
+
st as ucsplit,
|
|
933
|
+
ot as ucwords,
|
|
934
|
+
At as unwrap,
|
|
935
|
+
ce as wordCount,
|
|
936
|
+
le as wordWrap,
|
|
937
|
+
zt as words,
|
|
938
|
+
kt as wrap
|
|
939
|
+
};
|