mol_regexp 0.0.1839 → 0.0.1841
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/node.d.ts +38 -0
- package/node.d.ts.map +1 -1
- package/node.deps.json +1 -1
- package/node.js +14 -0
- package/node.js.map +1 -1
- package/node.mjs +14 -0
- package/node.test.js +263 -9
- package/node.test.js.map +1 -1
- package/package.json +1 -1
- package/web.d.ts +38 -0
- package/web.d.ts.map +1 -1
- package/web.deps.json +1 -1
- package/web.js +14 -0
- package/web.js.map +1 -1
- package/web.mjs +14 -0
- package/web.test.js +70 -1
- package/web.test.js.map +1 -1
package/node.d.ts
CHANGED
|
@@ -15,25 +15,49 @@ declare namespace $ {
|
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
declare namespace $ {
|
|
18
|
+
/**
|
|
19
|
+
* Return `unknown` when `A` and `B` are the same type. `never` otherwise.
|
|
20
|
+
*
|
|
21
|
+
* $mol_type_equals< unknown , any > & number // never
|
|
22
|
+
* $mol_type_equals< never , never > & number // number
|
|
23
|
+
*/
|
|
18
24
|
type $mol_type_equals<A, B> = (<X>() => X extends A ? 1 : 2) extends (<X>() => X extends B ? 1 : 2) ? unknown : never;
|
|
19
25
|
}
|
|
20
26
|
|
|
21
27
|
declare namespace $ {
|
|
28
|
+
/**
|
|
29
|
+
* Reqursive converts intersection of records to record of intersections
|
|
30
|
+
*
|
|
31
|
+
* // { a : { x : 1 , y : 2 } }
|
|
32
|
+
* $mol_type_merge< { a : { x : 1 } }&{ a : { y : 2 } } >
|
|
33
|
+
*/
|
|
22
34
|
type $mol_type_merge<Intersection> = Intersection extends (...a: any[]) => any ? Intersection : Intersection extends new (...a: any[]) => any ? Intersection : Intersection extends object ? $mol_type_merge_object<Intersection> extends Intersection ? unknown extends $mol_type_equals<{
|
|
23
35
|
[Key in keyof Intersection]: Intersection[Key];
|
|
24
36
|
}, Intersection> ? Intersection : {
|
|
25
37
|
[Key in keyof Intersection]: $mol_type_merge<Intersection[Key]>;
|
|
26
38
|
} : Intersection : Intersection;
|
|
39
|
+
/**
|
|
40
|
+
* Flat converts intersection of records to record of intersections
|
|
41
|
+
*
|
|
42
|
+
* // { a: 1, b: 2 }
|
|
43
|
+
* $mol_type_merge< { a: 1 } & { b: 2 } >
|
|
44
|
+
*/
|
|
27
45
|
type $mol_type_merge_object<Intersection> = {
|
|
28
46
|
[Key in keyof Intersection]: Intersection[Key];
|
|
29
47
|
};
|
|
30
48
|
}
|
|
31
49
|
|
|
32
50
|
declare namespace $ {
|
|
51
|
+
/**
|
|
52
|
+
* Converts union of types to intersection of same types
|
|
53
|
+
*
|
|
54
|
+
* $mol_type_intersect< number | string > // number & string
|
|
55
|
+
*/
|
|
33
56
|
type $mol_type_intersect<Union> = (Union extends any ? (_: Union) => void : never) extends ((_: infer Intersection) => void) ? Intersection : never;
|
|
34
57
|
}
|
|
35
58
|
|
|
36
59
|
declare namespace $ {
|
|
60
|
+
/** Replaces properties of `Base` record by properties from `Over`. */
|
|
37
61
|
type $mol_type_override<Base, Over> = Omit<Base, keyof Over> & Over;
|
|
38
62
|
}
|
|
39
63
|
|
|
@@ -70,15 +94,19 @@ declare namespace $ {
|
|
|
70
94
|
readonly [k in key]: Source[key] extends string ? Source[key] : string;
|
|
71
95
|
}> & $mol_regexp_groups<Source[key]>>;
|
|
72
96
|
}[keyof Source]>> : never;
|
|
97
|
+
/** Type safe reguar expression builder */
|
|
73
98
|
export class $mol_regexp<Groups extends Record<string, string>> extends RegExp {
|
|
74
99
|
readonly groups: (Extract<keyof Groups, string>)[];
|
|
100
|
+
/** Prefer to use $mol_regexp.from */
|
|
75
101
|
constructor(source: string, flags?: string, groups?: (Extract<keyof Groups, string>)[]);
|
|
76
102
|
[Symbol.matchAll](str: string): RegExpStringIterator<RegExpExecArray & $mol_type_override<RegExpExecArray, {
|
|
77
103
|
groups?: {
|
|
78
104
|
[key in keyof Groups]: string;
|
|
79
105
|
};
|
|
80
106
|
}>>;
|
|
107
|
+
/** Parses input and returns found capture groups or null */
|
|
81
108
|
[Symbol.match](str: string): null | RegExpMatchArray;
|
|
109
|
+
/** Splits string by regexp edges */
|
|
82
110
|
[Symbol.split](str: string): string[];
|
|
83
111
|
test(str: string): boolean;
|
|
84
112
|
exec(str: string): RegExpExecArray & $mol_type_override<RegExpExecArray, {
|
|
@@ -88,6 +116,7 @@ declare namespace $ {
|
|
|
88
116
|
}> | null;
|
|
89
117
|
generate(params: Groups_to_params<Groups>): string | null;
|
|
90
118
|
get native(): RegExp;
|
|
119
|
+
/** Makes regexp that greedy repeats this pattern with delimiter */
|
|
91
120
|
static separated<Chunk extends $mol_regexp_source, Sep extends $mol_regexp_source>(chunk: Chunk, sep: Sep): $mol_regexp<[$mol_regexp<[[Chunk], Sep] extends infer T ? T extends [[Chunk], Sep] ? T extends $mol_regexp_source[] ? $mol_type_merge<$mol_type_intersect<{ [key in Extract<keyof T, number>]: $mol_regexp_groups<T[key]>; }[Extract<keyof T, number>]>> : T extends RegExp ? Record<string, string> extends NonNullable<NonNullable<ReturnType<T["exec"]>>["groups"]> ? {} : NonNullable<NonNullable<ReturnType<T["exec"]>>["groups"]> : T extends {
|
|
92
121
|
readonly [x: string]: $mol_regexp_source;
|
|
93
122
|
} ? $mol_type_merge<$mol_type_intersect<{ [key_1 in keyof T]: $mol_type_merge<Omit<{ readonly [k in Extract<keyof T, string>]: string; }, key_1> & { readonly [k_1 in key_1]: T[key_1] extends string ? T[key_1] : string; } & $mol_regexp_groups<T[key_1]>>; }[keyof T]>> : never : never : never>, Chunk] extends infer T_1 ? T_1 extends [$mol_regexp<[[Chunk], Sep] extends infer T_2 ? T_2 extends [[Chunk], Sep] ? T_2 extends $mol_regexp_source[] ? $mol_type_merge<$mol_type_intersect<{ [key_4 in Extract<keyof T_2, number>]: $mol_regexp_groups<T_2[key_4]>; }[Extract<keyof T_2, number>]>> : T_2 extends RegExp ? Record<string, string> extends NonNullable<NonNullable<ReturnType<T_2["exec"]>>["groups"]> ? {} : NonNullable<NonNullable<ReturnType<T_2["exec"]>>["groups"]> : T_2 extends {
|
|
@@ -95,14 +124,23 @@ declare namespace $ {
|
|
|
95
124
|
} ? $mol_type_merge<$mol_type_intersect<{ [key_5 in keyof T_2]: $mol_type_merge<Omit<{ readonly [k in Extract<keyof T_2, string>]: string; }, key_5> & { readonly [k_1 in key_5]: T_2[key_5] extends string ? T_2[key_5] : string; } & $mol_regexp_groups<T_2[key_5]>>; }[keyof T_2]>> : never : never : never>, Chunk] ? T_1 extends $mol_regexp_source[] ? $mol_type_merge<$mol_type_intersect<{ [key_2 in Extract<keyof T_1, number>]: $mol_regexp_groups<T_1[key_2]>; }[Extract<keyof T_1, number>]>> : T_1 extends RegExp ? Record<string, string> extends NonNullable<NonNullable<ReturnType<T_1["exec"]>>["groups"]> ? {} : NonNullable<NonNullable<ReturnType<T_1["exec"]>>["groups"]> : T_1 extends {
|
|
96
125
|
readonly [x: string]: $mol_regexp_source;
|
|
97
126
|
} ? $mol_type_merge<$mol_type_intersect<{ [key_3 in keyof T_1]: $mol_type_merge<Omit<{ readonly [k in Extract<keyof T_1, string>]: string; }, key_3> & { readonly [k_1 in key_3]: T_1[key_3] extends string ? T_1[key_3] : string; } & $mol_regexp_groups<T_1[key_3]>>; }[keyof T_1]>> : never : never : never>;
|
|
127
|
+
/** Makes regexp that non-greedy repeats this pattern from min to max count */
|
|
98
128
|
static repeat<Source extends $mol_regexp_source>(source: Source, min?: number, max?: number): $mol_regexp<$mol_regexp_groups<Source>>;
|
|
129
|
+
/** Makes regexp that greedy repeats this pattern from min to max count */
|
|
99
130
|
static repeat_greedy<Source extends $mol_regexp_source>(source: Source, min?: number, max?: number): $mol_regexp<$mol_regexp_groups<Source>>;
|
|
131
|
+
/** Makes regexp that match any of options */
|
|
100
132
|
static vary<Sources extends readonly $mol_regexp_source[]>(sources: Sources, flags?: string): $mol_regexp<$mol_regexp_groups<Sources[number]>>;
|
|
133
|
+
/** Makes regexp that allow absent of this pattern */
|
|
101
134
|
static optional<Source extends $mol_regexp_source>(source: Source): $mol_regexp<$mol_regexp_groups<Source>>;
|
|
135
|
+
/** Makes regexp that look ahead for pattern */
|
|
102
136
|
static force_after(source: $mol_regexp_source): $mol_regexp<Record<string, string>>;
|
|
137
|
+
/** Makes regexp that look ahead for pattern */
|
|
103
138
|
static forbid_after(source: $mol_regexp_source): $mol_regexp<Record<string, string>>;
|
|
139
|
+
/** Converts some js values to regexp */
|
|
104
140
|
static from<Source extends $mol_regexp_source>(source: Source, { ignoreCase, multiline }?: Partial<Pick<RegExp, 'ignoreCase' | 'multiline'>>): $mol_regexp<$mol_regexp_groups<Source>>;
|
|
141
|
+
/** Makes regexp which includes only unicode category */
|
|
105
142
|
static unicode_only(...category: $mol_unicode_category): $mol_regexp<Record<string, string>>;
|
|
143
|
+
/** Makes regexp which excludes unicode category */
|
|
106
144
|
static unicode_except(...category: $mol_unicode_category): $mol_regexp<Record<string, string>>;
|
|
107
145
|
static char_range(from: number, to: number): $mol_regexp<{}>;
|
|
108
146
|
static char_only(...allowed: readonly [$mol_regexp_source, ...$mol_regexp_source[]]): $mol_regexp<{}>;
|
package/node.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../mam.d.ts","../../type/equals/equals.d.ts","../../type/merge/merge.d.ts","../../type/intersect/intersect.d.ts","../../type/override/override.d.ts","../../fail/fail.d.ts","../../unicode/unicode.d.ts","../regexp.d.ts"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACfA;AACA;AACA;AACA;
|
|
1
|
+
{"version":3,"sources":["../../../mam.d.ts","../../type/equals/equals.d.ts","../../type/merge/merge.d.ts","../../type/intersect/intersect.d.ts","../../type/override/override.d.ts","../../fail/fail.d.ts","../../unicode/unicode.d.ts","../regexp.d.ts"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACRA;AACA;AACA;AACA;AACA;ACJA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","sourcesContent":[null,null,null,null,null,null,null,null]}
|
package/node.deps.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"files":["mam.ts","LICENSE","README.md","mam.jam.js","tsfmt.json","package.json","tsconfig.json","lang.lang.tree","meta.lang.tree","sandbox.config.json","mol/CNAME","mol/LICENSE","mol/readme.md","mol/mol.meta.tree","mol/CONTRIBUTING.md","mol/CODE_OF_CONDUCT.md","mol/type/README.md","mol/type/equals/equals.ts","mol/type/merge/merge.ts","mol/type/intersect/intersect.ts","mol/type/override/override.ts","mol/fail/fail.ts","mol/unicode/unicode.ts","mol/regexp/README.md","mol/regexp/regexp.ts"],"mods":{},"deps_in":{"mol":{"mol/regexp":-999,"mol/type":-999,"mol/fail":-999,"mol/unicode":-1},"":{"mol":-999},"mol/type/merge":{"mol/regexp":-2},"mol/type":{"mol/type/merge":-999,"mol/type/equals":-999,"mol/type/intersect":-999,"mol/type/override":-999},"mol/type/equals":{"mol/type/merge":-3},"mol/type/intersect":{"mol/regexp":-2},"mol/type/override":{"mol/regexp":-2},"mol/fail":{"mol/regexp":-4},"mol/unicode":{"mol/regexp":-2}},"deps_out":{"mol/regexp":{"mol":-999,"mol/type/merge":-2,"mol/type/intersect":-2,"mol/type/override":-2,"mol/fail":-4,"mol/unicode":-2},"mol":{"":-999},"mol/type/merge":{"mol/type":-999,"mol/type/equals":-3},"mol/type":{"mol":-999},"mol/type/equals":{"mol/type":-999},"mol/type/intersect":{"mol/type":-999},"mol/type/override":{"mol/type":-999},"mol/fail":{"mol":-999},"mol/unicode":{"mol":-1}},"sloc":{"ts":
|
|
1
|
+
{"files":["mam.ts","LICENSE","README.md","mam.jam.js","tsfmt.json","package.json","tsconfig.json","lang.lang.tree","meta.lang.tree","sandbox.config.json","mol/CNAME","mol/LICENSE","mol/readme.md","mol/mol.meta.tree","mol/CONTRIBUTING.md","mol/CODE_OF_CONDUCT.md","mol/type/README.md","mol/type/equals/equals.ts","mol/type/merge/merge.ts","mol/type/intersect/intersect.ts","mol/type/override/override.ts","mol/fail/fail.ts","mol/unicode/unicode.ts","mol/regexp/README.md","mol/regexp/regexp.ts"],"mods":{},"deps_in":{"mol":{"mol/regexp":-999,"mol/type":-999,"mol/fail":-999,"mol/unicode":-1},"":{"mol":-999},"mol/type/merge":{"mol/regexp":-2},"mol/type":{"mol/type/merge":-999,"mol/type/equals":-999,"mol/type/intersect":-999,"mol/type/override":-999},"mol/type/equals":{"mol/type/merge":-3},"mol/type/intersect":{"mol/regexp":-2},"mol/type/override":{"mol/regexp":-2},"mol/fail":{"mol/regexp":-4},"mol/unicode":{"mol/regexp":-2}},"deps_out":{"mol/regexp":{"mol":-999,"mol/type/merge":-2,"mol/type/intersect":-2,"mol/type/override":-2,"mol/fail":-4,"mol/unicode":-2},"mol":{"":-999},"mol/type/merge":{"mol/type":-999,"mol/type/equals":-3},"mol/type":{"mol":-999},"mol/type/equals":{"mol/type":-999},"mol/type/intersect":{"mol/type":-999},"mol/type/override":{"mol/type":-999},"mol/fail":{"mol":-999},"mol/unicode":{"mol":-1}},"sloc":{"ts":730,"LICENSE":113,"md":777,"js":9,"json":83,"tree":41,"CNAME":1},"deps":{"mol/regexp":{"..":-999,"/mol/regexp/source":-1,"/mol/regexp/groups":-1,"/mol/type/merge":-2,"/mol/type/intersect":-2,"/mol/type/override":-2,"/mol/regexp":-1,"/mol/regexp/from":-2,"/mol/fail":-4,"/mol/regexp/repeat/greedy":-3,"/mol/regexp/optional":-5,"/mol/unicode/category":-2},"mol":{"..":-999},"":{},"mol/type/merge":{"..":-999,"/mol/type/merge":-1,"/mol/type/merge/object":-1,"/mol/type/equals":-3},"mol/type":{"..":-999},"mol/type/equals":{"..":-999,"/mol/type/equals":-1},"mol/type/intersect":{"..":-999,"/mol/type/intersect":-1},"mol/type/override":{"..":-999,"/mol/type/override":-1},"mol/fail":{"..":-999,"/mol/fail":-1},"mol/unicode":{"..":-999,"/mol/unicode/category":-1,"/mol/unicode/category/binary":-1,"/mol/char/category/general":-1,"/mol/unicode/category/script":-1}}}
|
package/node.js
CHANGED
|
@@ -58,8 +58,10 @@ var $;
|
|
|
58
58
|
var $;
|
|
59
59
|
(function ($) {
|
|
60
60
|
let x = /x/[Symbol.matchAll];
|
|
61
|
+
/** Type safe reguar expression builder */
|
|
61
62
|
class $mol_regexp extends RegExp {
|
|
62
63
|
groups;
|
|
64
|
+
/** Prefer to use $mol_regexp.from */
|
|
63
65
|
constructor(source, flags = 'gsu', groups = []) {
|
|
64
66
|
super(source, flags);
|
|
65
67
|
this.groups = groups;
|
|
@@ -79,12 +81,14 @@ var $;
|
|
|
79
81
|
this.lastIndex = index;
|
|
80
82
|
}
|
|
81
83
|
}
|
|
84
|
+
/** Parses input and returns found capture groups or null */
|
|
82
85
|
[Symbol.match](str) {
|
|
83
86
|
const res = [...this[Symbol.matchAll](str)].filter(r => r.groups).map(r => r[0]);
|
|
84
87
|
if (!res.length)
|
|
85
88
|
return null;
|
|
86
89
|
return res;
|
|
87
90
|
}
|
|
91
|
+
/** Splits string by regexp edges */
|
|
88
92
|
[Symbol.split](str) {
|
|
89
93
|
const res = [];
|
|
90
94
|
let token_last = null;
|
|
@@ -139,12 +143,14 @@ var $;
|
|
|
139
143
|
get native() {
|
|
140
144
|
return new RegExp(this.source, this.flags);
|
|
141
145
|
}
|
|
146
|
+
/** Makes regexp that greedy repeats this pattern with delimiter */
|
|
142
147
|
static separated(chunk, sep) {
|
|
143
148
|
return $mol_regexp.from([
|
|
144
149
|
$mol_regexp.repeat_greedy([[chunk], sep], 0),
|
|
145
150
|
chunk,
|
|
146
151
|
]);
|
|
147
152
|
}
|
|
153
|
+
/** Makes regexp that non-greedy repeats this pattern from min to max count */
|
|
148
154
|
static repeat(source, min = 0, max = Number.POSITIVE_INFINITY) {
|
|
149
155
|
const regexp = $mol_regexp.from(source);
|
|
150
156
|
const upper = Number.isFinite(max) ? max : '';
|
|
@@ -160,6 +166,7 @@ var $;
|
|
|
160
166
|
};
|
|
161
167
|
return regexp2;
|
|
162
168
|
}
|
|
169
|
+
/** Makes regexp that greedy repeats this pattern from min to max count */
|
|
163
170
|
static repeat_greedy(source, min = 0, max = Number.POSITIVE_INFINITY) {
|
|
164
171
|
const regexp = $mol_regexp.from(source);
|
|
165
172
|
const upper = Number.isFinite(max) ? max : '';
|
|
@@ -175,6 +182,7 @@ var $;
|
|
|
175
182
|
};
|
|
176
183
|
return regexp2;
|
|
177
184
|
}
|
|
185
|
+
/** Makes regexp that match any of options */
|
|
178
186
|
static vary(sources, flags = 'gsu') {
|
|
179
187
|
const groups = [];
|
|
180
188
|
const chunks = sources.map(source => {
|
|
@@ -184,17 +192,21 @@ var $;
|
|
|
184
192
|
});
|
|
185
193
|
return new $mol_regexp(`(?:${chunks.join('|')})`, flags, groups);
|
|
186
194
|
}
|
|
195
|
+
/** Makes regexp that allow absent of this pattern */
|
|
187
196
|
static optional(source) {
|
|
188
197
|
return $mol_regexp.repeat_greedy(source, 0, 1);
|
|
189
198
|
}
|
|
199
|
+
/** Makes regexp that look ahead for pattern */
|
|
190
200
|
static force_after(source) {
|
|
191
201
|
const regexp = $mol_regexp.from(source);
|
|
192
202
|
return new $mol_regexp(`(?=${regexp.source})`, regexp.flags, regexp.groups);
|
|
193
203
|
}
|
|
204
|
+
/** Makes regexp that look ahead for pattern */
|
|
194
205
|
static forbid_after(source) {
|
|
195
206
|
const regexp = $mol_regexp.from(source);
|
|
196
207
|
return new $mol_regexp(`(?!${regexp.source})`, regexp.flags, regexp.groups);
|
|
197
208
|
}
|
|
209
|
+
/** Converts some js values to regexp */
|
|
198
210
|
static from(source, { ignoreCase, multiline } = {
|
|
199
211
|
ignoreCase: false,
|
|
200
212
|
multiline: false,
|
|
@@ -295,9 +307,11 @@ var $;
|
|
|
295
307
|
return regexp;
|
|
296
308
|
}
|
|
297
309
|
}
|
|
310
|
+
/** Makes regexp which includes only unicode category */
|
|
298
311
|
static unicode_only(...category) {
|
|
299
312
|
return new $mol_regexp(`\\p{${category.join('=')}}`);
|
|
300
313
|
}
|
|
314
|
+
/** Makes regexp which excludes unicode category */
|
|
301
315
|
static unicode_except(...category) {
|
|
302
316
|
return new $mol_regexp(`\\P{${category.join('=')}}`);
|
|
303
317
|
}
|
package/node.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["-","../../../mam.ts","../../../mol/fail/fail.ts","../../../mol/regexp/regexp.ts"],"names":[],"mappings":";;;AAAA;AACA;AACA;AACA;;ACHA,KAAK,CAAC,eAAe,GAAG,EAAE,CAAC;AAK3B,IAAU,CAAC,CAQV;AARD,WAAU,CAAC;AAQX,CAAC,EARS,CAAC,KAAD,CAAC,QAQV;AAED,MAAM,CAAC,OAAO,GAAG,CAAC,CAAA;;;AD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I,CAAC;YAClC,OAAO,EAAE,CAAE,CAAE,IAAI,CAAE,EAAE,IAAI,CAAE;YAC3B,OAAO,EAAE,IAAI;SACb,CAAC,CAAA;;IAnbU,aAAW,cAqbvB,CAAA;AAEF,CAAC,EA5eS,CAAC,KAAD,CAAC,QA4eV;;","sourcesContent":[null,"Error.stackTraceLimit = 50;\n\ndeclare let _$_: { new(): {} } & typeof globalThis\ndeclare class $ extends _$_ {}\n\nnamespace $ {\n\texport type $ = typeof $$\n\texport declare class $$ extends $ {\n\t\tstatic $: $\n\t}\n\tnamespace $$ {\n\t\texport type $$ = $\n\t}\n}\n\nmodule.exports = $\n","namespace $ {\n\n\texport function $mol_fail( error : any ) : never {\n\t\tthrow error\n\t}\n\n}\n","interface String {\n\t\n\tmatch< RE extends RegExp >( regexp: RE ): ReturnType<\n\t\tRE[ typeof Symbol.match ]\n\t>\n\t\n matchAll< RE extends RegExp >( regexp: RE ): ReturnType<\n\t\tRE[ typeof Symbol.matchAll ]\n\t>\n\t\n}\n\nnamespace $ {\n\t\n\ttype Groups_to_params<T> = {\n\t\t[P in keyof T]?: T[P] | boolean | undefined;\n\t};\t\n\n\texport type $mol_regexp_source =\n\t| number\n\t| string\n\t| RegExp\n\t| { [ key in string ] : $mol_regexp_source }\n\t| readonly[ $mol_regexp_source , ... $mol_regexp_source[] ]\n\n\texport type $mol_regexp_groups< Source extends $mol_regexp_source >\n\t\n\t\t= Source extends number\n\t\t? {}\n\t\t\n\t\t: Source extends string\n\t\t? {}\n\t\t\n\t\t: Source extends $mol_regexp_source[]\n\t\t? $mol_type_merge< $mol_type_intersect< {\n\t\t\t[ key in Extract< keyof Source , number > ] : $mol_regexp_groups< Source[ key ] >\n\t\t}[ Extract< keyof Source , number > ] > >\n\t\t\n\t\t: Source extends RegExp\n\t\t? Record< string, string > extends NonNullable< NonNullable< ReturnType< Source['exec'] > >[ 'groups' ] >\n\t\t\t? {}\n\t\t\t: NonNullable< NonNullable< ReturnType< Source['exec'] > >[ 'groups' ] >\n\t\t\n\t\t: Source extends { readonly [ key in string ] : $mol_regexp_source }\n\t\t? $mol_type_merge< $mol_type_intersect< {\n\t\t\t[ key in keyof Source ] :\n\t\t\t\t$mol_type_merge<\n\t\t\t\t\t& $mol_type_override<\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\treadonly [ k in Extract< keyof Source , string > ]: string\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\treadonly [ k in key ]:\n\t\t\t\t\t\t\t\tSource[ key ] extends string\n\t\t\t\t\t\t\t\t\t? Source[ key ]\n\t\t\t\t\t\t\t\t\t: string\n\t\t\t\t\t\t}\n\t\t\t\t\t>\n\t\t\t\t\t& $mol_regexp_groups< Source[ key ] >\n\t\t\t\t>\n\t\t}[ keyof Source ] > >\n\n\t\t: never\n\tlet x = /x/[Symbol.matchAll]\n\t/** Type safe reguar expression builder */\n\texport class $mol_regexp< Groups extends Record< string , string > > extends RegExp {\n\t\t\n\t\t/** Prefer to use $mol_regexp.from */\n\t\tconstructor( source : string , flags : string = 'gsu' , readonly groups : ( Extract< keyof Groups , string > )[] = [] ) {\n\t\t\tsuper( source , flags )\n\t\t}\n\t\t\n\t\t*[Symbol.matchAll] (str:string): RegExpStringIterator< RegExpExecArray & $mol_type_override< RegExpExecArray, { groups?: { [ key in keyof Groups ] : string } } > > {\n\t\t\tconst index = this.lastIndex\n\t\t\tthis.lastIndex = 0\n\t\t\ttry {\n\t\t\t\twhile ( this.lastIndex < str.length ) {\n\t\t\t\t\tconst found = this.exec(str)\n\t\t\t\t\tif( !found ) break\n\t\t\t\t\tyield found\n\t\t\t\t}\n\t\t\t} finally {\n\t\t\t\tthis.lastIndex = index\n\t\t\t}\n\t\t}\n\t\t\n\t\t/** Parses input and returns found capture groups or null */\n\t\t[ Symbol.match ]( str : string ): null | RegExpMatchArray {\n\t\t\tconst res = [ ... this[Symbol.matchAll]( str ) ].filter( r => r.groups ).map( r => r[0] )\n\t\t\tif( !res.length ) return null\n\t\t\treturn res as RegExpMatchArray\n\t\t}\n\t\t\n\t\t/** Splits string by regexp edges */\n\t\t[ Symbol.split ]( str : string ): string[] {\n\t\t\t\n\t\t\tconst res = [] as string[]\n\t\t\tlet token_last = null\n\t\t\t\n\t\t\tfor( let token of this[Symbol.matchAll]( str ) ) {\n\t\t\t\tif( token.groups && ( token_last ? token_last.groups : true ) ) res.push( '' )\n\t\t\t\tres.push( token[0] )\n\t\t\t\ttoken_last = token\n\t\t\t}\n\t\t\t\n\t\t\tif( !res.length ) res.push( '' )\n\t\t\t\n\t\t\treturn res\n\t\t}\n\t\t\n\t\ttest( str : string ): boolean {\n\t\t\treturn Boolean( str.match( this) )\n\t\t}\n\t\t\n\t\texec( str : string ): RegExpExecArray & $mol_type_override< RegExpExecArray , { groups?: { [ key in keyof Groups ] : string } } > | null {\n\t\t\t\n\t\t\tconst from = this.lastIndex\n\t\t\tif( from >= str.length ) return null\n\t\t\t\n\t\t\tconst res = super.exec( str )\n\t\t\tif( res === null ) {\n\t\t\t\tthis.lastIndex = str.length\n\t\t\t\tif( !str ) return null\n\t\t\t\treturn Object.assign( [ str.slice( from ) ], {\n\t\t\t\t\tindex: from,\n\t\t\t\t\tinput: str,\n\t\t\t\t} ) as any\n\t\t\t}\n\n\t\t\tif( from === this.lastIndex ) {\n\t\t\t\t$mol_fail( new Error( 'Captured empty substring' ) )\n\t\t\t}\n\n\t\t\ttype Token = { [ key in keyof Groups ] : string } & { [ key : number ] : string }\n\t\t\tconst groups = {} as Token\n\t\t\t\n\t\t\tconst skipped = str.slice( from , this.lastIndex - res[0].length )\n\t\t\tif( skipped ) {\n\t\t\t\tthis.lastIndex = this.lastIndex - res[0].length\n\t\t\t\treturn Object.assign( [ skipped ], {\n\t\t\t\t\tindex: from,\n\t\t\t\t\tinput: res.input,\n\t\t\t\t} ) as any\n\t\t\t}\n\t\t\t\n\t\t\tfor( let i = 0 ; i < this.groups.length ; ++i ) {\n\t\t\t\tconst group = this.groups[ i ]\n\t\t\t\tgroups[ group ] = groups[ group ] || res[ i + 1 ] || '' as any\n\t\t\t}\n\n\t\t\treturn Object.assign( res, { groups } )\n\t\t}\n\t\t\n\t\tgenerate(\n\t\t\tparams: Groups_to_params< Groups >\n\t\t): string | null {\n\t\t\treturn null\n\t\t}\n\t\t\n\t\tget native() {\n\t\t\treturn new RegExp( this.source, this.flags )\n\t\t}\n\t\t\n\t\t/** Makes regexp that greedy repeats this pattern with delimiter */\n\t\tstatic separated<\n\t\t\tChunk extends $mol_regexp_source,\n\t\t\tSep extends $mol_regexp_source,\n\t\t>(\n\t\t\tchunk: Chunk,\n\t\t\tsep: Sep,\n\t\t) {\n\t\t\treturn $mol_regexp.from([\n\t\t\t\t$mol_regexp.repeat_greedy([ [chunk], sep ], 0),\n\t\t\t\tchunk,\n\t\t\t])\n\t\t}\n\n\t\t/** Makes regexp that non-greedy repeats this pattern from min to max count */\n\t\tstatic repeat<\n\t\t\tSource extends $mol_regexp_source\n\t\t>(\n\t\t\tsource : Source ,\n\t\t\tmin = 0 ,\n\t\t\tmax = Number.POSITIVE_INFINITY ,\n\t\t) : $mol_regexp< $mol_regexp_groups< Source > > {\n\t\n\t\t\tconst regexp = $mol_regexp.from( source )\n\t\t\tconst upper = Number.isFinite( max ) ? max : ''\n\t\t\t\n\t\t\tconst str = `(?:${ regexp.source }){${ min },${ upper }}?`\n\t\t\tconst regexp2 = new $mol_regexp( str , regexp.flags , regexp.groups )\n\t\t\t\n\t\t\tregexp2.generate = params => {\n\t\t\t\tconst res = regexp.generate( params )\n\t\t\t\tif( res ) return res\n\t\t\t\tif( min > 0 ) return res\n\t\t\t\treturn ''\n\t\t\t}\n\t\n\t\t\treturn regexp2\n\t\n\t\t}\n\n\t\t/** Makes regexp that greedy repeats this pattern from min to max count */\n\t\tstatic repeat_greedy<\n\t\t\tSource extends $mol_regexp_source\n\t\t>(\n\t\t\tsource : Source ,\n\t\t\tmin = 0 ,\n\t\t\tmax = Number.POSITIVE_INFINITY ,\n\t\t) : $mol_regexp< $mol_regexp_groups< Source > > {\n\t\n\t\t\tconst regexp = $mol_regexp.from( source )\n\t\t\tconst upper = Number.isFinite( max ) ? max : ''\n\t\t\t\n\t\t\tconst str = `(?:${ regexp.source }){${ min },${ upper }}`\n\t\t\tconst regexp2 = new $mol_regexp( str , regexp.flags , regexp.groups )\n\t\t\t\n\t\t\tregexp2.generate = params => {\n\t\t\t\tconst res = regexp.generate( params )\n\t\t\t\tif( res ) return res\n\t\t\t\tif( min > 0 ) return res\n\t\t\t\treturn ''\n\t\t\t}\n\t\n\t\t\treturn regexp2\n\t\t}\n\n\t\t/** Makes regexp that match any of options */\n\t\tstatic vary<\n\t\t\tSources extends readonly $mol_regexp_source[]\n\t\t>(\n\t\t\tsources : Sources ,\n\t\t\tflags : string = 'gsu',\n\t\t) {\n\t\t\t\n\t\t\tconst groups = [] as string[]\n\t\t\t\n\t\t\tconst chunks = sources.map( source => {\n\n\t\t\t\tconst regexp = $mol_regexp.from( source )\n\t\t\t\tgroups.push( ... regexp.groups )\n\t\t\t\t\n\t\t\t\treturn regexp.source\n\n\t\t\t} ) as any as readonly[ $mol_regexp_source , ... $mol_regexp_source[] ]\n\t\t\t\n\t\t\treturn new $mol_regexp< $mol_regexp_groups< Sources[number] > >(\n\t\t\t\t`(?:${ chunks.join('|') })` ,\n\t\t\t\tflags ,\n\t\t\t\tgroups as any[] ,\n\t\t\t)\n\t\t\t\n\t\t}\n\n\t\t/** Makes regexp that allow absent of this pattern */\n\t\tstatic optional<\n\t\t\tSource extends $mol_regexp_source\n\t\t>( source : Source ) {\n\t\t\treturn $mol_regexp.repeat_greedy( source , 0 , 1 )\n\t\t}\n\n\t\t/** Makes regexp that look ahead for pattern */\n\t\tstatic force_after( source : $mol_regexp_source ) {\n\n\t\t\tconst regexp = $mol_regexp.from( source )\n\t\t\t\n\t\t\treturn new $mol_regexp(\n\t\t\t\t`(?=${ regexp.source })` ,\n\t\t\t\tregexp.flags ,\n\t\t\t\tregexp.groups ,\n\t\t\t)\n\n\t\t}\n\n\t\t/** Makes regexp that look ahead for pattern */\n\t\tstatic forbid_after( source : $mol_regexp_source ) {\n\n\t\t\tconst regexp = $mol_regexp.from( source )\n\t\t\t\n\t\t\treturn new $mol_regexp(\n\t\t\t\t`(?!${ regexp.source })` ,\n\t\t\t\tregexp.flags ,\n\t\t\t\tregexp.groups ,\n\t\t\t)\n\n\t\t}\n\n\t\t/** Converts some js values to regexp */\n\t\tstatic from<\n\t\t\tSource extends $mol_regexp_source\n\t\t>(\n\t\t\tsource : Source ,\n\t\t\t{ ignoreCase , multiline } : Partial< Pick< RegExp , 'ignoreCase' | 'multiline' > > = {\n\t\t\t\tignoreCase : false ,\n\t\t\t\tmultiline : false ,\n\t\t\t} ,\n\t\t) : $mol_regexp< $mol_regexp_groups< Source > > {\n\n\t\t\tlet flags = 'gsu'\n\t\t\tif( multiline ) flags += 'm'\n\t\t\tif( ignoreCase ) flags += 'i'\n\n\t\t\tif( typeof source === 'number' ) {\n\n\t\t\t\tconst src = `\\\\u{${ source.toString(16) }}`\n\t\t\t\tconst regexp = new $mol_regexp< $mol_regexp_groups< Source > >( src , flags )\n\t\t\t\tregexp.generate = ()=> src\n\t\t\t\treturn regexp\n\n\t\t\t} if( typeof source === 'string' ) {\n\n\t\t\t\tconst src = source.replace( /[.*+?^${}()|[\\]\\\\]/g , '\\\\$&' ) \n\t\t\t\tconst regexp = new $mol_regexp< $mol_regexp_groups< Source > >( src , flags )\n\t\t\t\tregexp.generate = ()=> source\n\t\t\t\treturn regexp\n\n\t\t\t} else if( source instanceof $mol_regexp ) {\n\t\t\t\t\n\t\t\t\tconst regexp = new $mol_regexp<any>( source.source, flags, source.groups )\n\t\t\t\tregexp.generate = params => source.generate( params )\n\t\t\t\treturn regexp\n\t\t\t\t\n\t\t\t} if( source instanceof RegExp ) {\n\n\n\t\t\t\tconst test = new RegExp( '|' + source.source )\n\t\t\t\tconst groups = Array.from(\n\t\t\t\t\t{ length : test.exec('')!.length - 1 } ,\n\t\t\t\t\t( _ , i )=> String( i + 1 ) ,\n\t\t\t\t)\n\n\t\t\t\tconst regexp = new $mol_regexp< $mol_regexp_groups< Source > >(\n\t\t\t\t\tsource.source ,\n\t\t\t\t\tsource.flags ,\n\t\t\t\t\tgroups as any ,\n\t\t\t\t)\n\t\t\t\t\n\t\t\t\tregexp.generate = ()=> ''\n\n\t\t\t\treturn regexp\n\n\t\t\t} if( Array.isArray( source ) ) {\n\n\t\t\t\tconst patterns = source.map( src => Array.isArray( src )\n\t\t\t\t\t? $mol_regexp.optional( src as any )\n\t\t\t\t\t: $mol_regexp.from( src )\n\t\t\t\t)\n\t\t\t\t\n\t\t\t\tconst chunks = patterns.map( pattern => pattern.source )\n\t\t\t\t\n\t\t\t\tconst groups = [] as ( Extract< keyof $mol_regexp_groups< Source > , string > )[]\n\n\t\t\t\tlet index = 0\n\t\t\n\t\t\t\tfor( const pattern of patterns ) {\n\t\t\t\t\t\n\t\t\t\t\tfor( let group of pattern.groups ) {\n\t\t\t\t\t\tif( Number( group ) >= 0 ) {\n\t\t\t\t\t\t\tgroups.push( String( index ++ ) as any )\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tgroups.push( group )\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tconst regexp = new $mol_regexp( chunks.join( '' ) , flags , groups )\n\t\t\t\t\n\t\t\t\tregexp.generate = params => {\n\t\t\t\t\tlet res = ''\n\t\t\t\t\tfor( const pattern of patterns ) {\n\t\t\t\t\t\tlet sub = pattern.generate( params )\n\t\t\t\t\t\tif( sub === null ) return ''\n\t\t\t\t\t\tres += sub\n\t\t\t\t\t}\n\t\t\t\t\treturn res\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn regexp\n\t\t\n\t\t\t} else {\n\n\t\t\t\tconst groups = [] as string[]\n\n\t\t\t\tconst chunks = Object.keys( source ).map( name => {\n\n\t\t\t\t\tgroups.push( name )\n\n\t\t\t\t\tconst regexp = $mol_regexp.from( (source as any)[ name ] )\n\t\t\t\t\tgroups.push( ... regexp.groups )\n\t\t\t\t\t\n\t\t\t\t\treturn `(${regexp.source})`\n\n\t\t\t\t} ) as any as readonly[ $mol_regexp_source , ... $mol_regexp_source[] ]\n\n\t\t\t\tconst regexp = new $mol_regexp< $mol_regexp_groups< Source > >(\n\t\t\t\t\t`(?:${ chunks.join('|') })` ,\n\t\t\t\t\tflags ,\n\t\t\t\t\tgroups as any[] ,\n\t\t\t\t)\n\t\t\t\t\n\t\t\t\tconst validator = new RegExp( '^' + regexp.source + '$', flags )\n\t\t\t\tregexp.generate = (params: any) => {\n\t\t\t\t\t\n\t\t\t\t\tfor( let option in source ) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tif( option in params ) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif( typeof params[ option ] === 'boolean' ) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif( !params[ option as any ] ) continue\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tconst str = String( params[ option ] )\n\t\t\t\t\t\t\t\tif( str.match( validator ) ) return str\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$mol_fail( new Error( `Wrong param: ${option}=${str}` ) )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif( typeof (source as any)[ option ] !== 'object' ) continue\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tconst res = $mol_regexp.from( (source as any)[ option ] ).generate( params )\n\t\t\t\t\t\tif( res ) return res\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\treturn null\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn regexp\n\n\t\t\t}\n\t\n\t\t}\n\n\t\t/** Makes regexp which includes only unicode category */\n\t\tstatic unicode_only( ... category: $mol_unicode_category ) {\n\t\t\treturn new $mol_regexp(\n\t\t\t\t`\\\\p{${ category.join( '=' ) }}`\n\t\t\t)\n\t\t}\n\n\t\t/** Makes regexp which excludes unicode category */\n\t\tstatic unicode_except( ... category: $mol_unicode_category ) {\n\t\t\treturn new $mol_regexp(\n\t\t\t\t`\\\\P{${ category.join( '=' ) }}`\n\t\t\t)\n\t\t}\n\n\t\tstatic char_range(\n\t\t\tfrom: number,\n\t\t\tto: number,\n\t\t): $mol_regexp<{}> {\n\t\t\treturn new $mol_regexp(\n\t\t\t\t`${ $mol_regexp.from( from ).source }-${ $mol_regexp.from( to ).source }`\n\t\t\t)\n\t\t}\n\n\t\tstatic char_only(\n\t\t\t... allowed: readonly [ $mol_regexp_source, ... $mol_regexp_source[] ]\n\t\t): $mol_regexp<{}> {\n\t\t\tconst regexp = allowed.map( f => $mol_regexp.from( f ).source ).join('')\n\t\t\treturn new $mol_regexp( `[${ regexp }]` )\n\t\t}\n\n\t\tstatic char_except(\n\t\t\t... forbidden: readonly [ $mol_regexp_source, ... $mol_regexp_source[] ]\n\t\t): $mol_regexp<{}> {\n\t\t\tconst regexp = forbidden.map( f => $mol_regexp.from( f ).source ).join('')\n\t\t\treturn new $mol_regexp( `[^${ regexp }]` )\n\t\t}\n\t\t\n\t\tstatic decimal_only = $mol_regexp.from( /\\d/gsu )\n\t\tstatic decimal_except = $mol_regexp.from( /\\D/gsu )\n\t\t\n\t\tstatic latin_only = $mol_regexp.from( /\\w/gsu )\n\t\tstatic latin_except = $mol_regexp.from( /\\W/gsu )\n\t\t\n\t\tstatic space_only = $mol_regexp.from( /\\s/gsu )\n\t\tstatic space_except = $mol_regexp.from( /\\S/gsu )\n\t\t\n\t\tstatic word_break_only = $mol_regexp.from( /\\b/gsu )\n\t\tstatic word_break_except = $mol_regexp.from( /\\B/gsu )\n\t\t\n\t\tstatic tab = $mol_regexp.from( /\\t/gsu )\n\t\tstatic slash_back = $mol_regexp.from( /\\\\/gsu )\n\t\tstatic nul = $mol_regexp.from( /\\0/gsu )\n\t\t\n\t\tstatic char_any = $mol_regexp.from( /./gsu )\n\t\tstatic begin = $mol_regexp.from( /^/gsu )\n\t\tstatic end = $mol_regexp.from( /$/gsu )\n\t\tstatic or = $mol_regexp.from( /|/gsu )\n\t\t\n\t\tstatic line_end = $mol_regexp.from({\n\t\t\twin_end: [ [ '\\r' ], '\\n' ],\n\t\t\tmac_end: '\\r',\n\t\t})\n\t\t\n\t}\n\t\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["-","../../../mam.ts","../../../mol/fail/fail.ts","../../../mol/regexp/regexp.ts"],"names":[],"mappings":";;;AAAA;AACA;AACA;AACA;;ACHA,KAAK,CAAC,eAAe,GAAG,EAAE,CAAC;AAK3B,IAAU,CAAC,CAQV;AARD,WAAU,CAAC;AAQX,CAAC,EARS,CAAC,KAAD,CAAC,QAQV;AAED,MAAM,CAAC,OAAO,GAAG,CAAC,CAAA;;;ADflB;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;AEFA,IAAU,CAAC,CAMV;AAND,WAAU,CAAC;IAEV,SAAgB,SAAS,CAAE,KAAW;QACrC,MAAM,KAAK,CAAA;IACZ,CAAC;IAFe,WAAS,YAExB,CAAA;AAEF,CAAC,EANS,CAAC,KAAD,CAAC,QAMV;;;;;;;ACMD,IAAU,CAAC,CA4eV;AA5eD,WAAU,CAAC;IAmDV,IAAI,CAAC,GAAG,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAA;IAC5B,0CAA0C;IAC1C,MAAa,WAAwD,SAAQ,MAAM;QAGjB;QADjE,qCAAqC;QACrC,YAAa,MAAe,EAAG,QAAiB,KAAK,EAAY,SAAkD,EAAE;YACpH,KAAK,CAAE,MAAM,EAAG,KAAK,CAAE,CAAA;YADyC,WAAM,GAAN,MAAM,CAA8C;QAErH,CAAC;QAED,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAE,GAAU;YAC7B,MAAM,KAAK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OAAO,CAAE,CAAA;QAC/C,MAAM,CAAC,YAAY,GAAG,WAAW,CAAC,IAAI,CAAE,OAAO,CAAE,CAAA;QAEjD,MAAM,CAAC,eAAe,GAAG,WAAW,CAAC,IAAI,CAAE,OAAO,CAAE,CAAA;QACpD,MAAM,CAAC,iBAAiB,GAAG,WAAW,CAAC,IAAI,CAAE,OAAO,CAAE,CAAA;QAEtD,MAAM,CAAC,GAAG,GAAG,WAAW,CAAC,IAAI,CAAE,OAAO,CAAE,CAAA;QACxC,MAAM,CAAC,UAAU,GAAG,WAAW,CAAC,IAAI,CAAE,OAAO,CAAE,CAAA;QAC/C,MAAM,CAAC,GAAG,GAAG,WAAW,CAAC,IAAI,CAAE,OAAO,CAAE,CAAA;QAExC,MAAM,CAAC,QAAQ,GAAG,WAAW,CAAC,IAAI,CAAE,MAAM,CAAE,CAAA;QAC5C,MAAM,CAAC,KAAK,GAAG,WAAW,CAAC,IAAI,CAAE,MAAM,CAAE,CAAA;QACzC,MAAM,CAAC,GAAG,GAAG,WAAW,CAAC,IAAI,CAAE,MAAM,CAAE,CAAA;QACvC,MAAM,CAAC,EAAE,GAAG,WAAW,CAAC,IAAI,CAAE,MAAM,CAAE,CAAA;QAEtC,MAAM,CAAC,QAAQ,GAAG,WAAW,CAAC,IAAI,CAAC;YAClC,OAAO,EAAE,CAAE,CAAE,IAAI,CAAE,EAAE,IAAI,CAAE;YAC3B,OAAO,EAAE,IAAI;SACb,CAAC,CAAA;;IAnbU,aAAW,cAqbvB,CAAA;AAEF,CAAC,EA5eS,CAAC,KAAD,CAAC,QA4eV;;","sourcesContent":[null,"Error.stackTraceLimit = 50;\n\ndeclare let _$_: { new(): {} } & typeof globalThis\ndeclare class $ extends _$_ {}\n\nnamespace $ {\n\texport type $ = typeof $$\n\texport declare class $$ extends $ {\n\t\tstatic $: $\n\t}\n\tnamespace $$ {\n\t\texport type $$ = $\n\t}\n}\n\nmodule.exports = $\n","namespace $ {\n\n\texport function $mol_fail( error : any ) : never {\n\t\tthrow error\n\t}\n\n}\n","interface String {\n\t\n\tmatch< RE extends RegExp >( regexp: RE ): ReturnType<\n\t\tRE[ typeof Symbol.match ]\n\t>\n\t\n matchAll< RE extends RegExp >( regexp: RE ): ReturnType<\n\t\tRE[ typeof Symbol.matchAll ]\n\t>\n\t\n}\n\nnamespace $ {\n\t\n\ttype Groups_to_params<T> = {\n\t\t[P in keyof T]?: T[P] | boolean | undefined;\n\t};\t\n\n\texport type $mol_regexp_source =\n\t| number\n\t| string\n\t| RegExp\n\t| { [ key in string ] : $mol_regexp_source }\n\t| readonly[ $mol_regexp_source , ... $mol_regexp_source[] ]\n\n\texport type $mol_regexp_groups< Source extends $mol_regexp_source >\n\t\n\t\t= Source extends number\n\t\t? {}\n\t\t\n\t\t: Source extends string\n\t\t? {}\n\t\t\n\t\t: Source extends $mol_regexp_source[]\n\t\t? $mol_type_merge< $mol_type_intersect< {\n\t\t\t[ key in Extract< keyof Source , number > ] : $mol_regexp_groups< Source[ key ] >\n\t\t}[ Extract< keyof Source , number > ] > >\n\t\t\n\t\t: Source extends RegExp\n\t\t? Record< string, string > extends NonNullable< NonNullable< ReturnType< Source['exec'] > >[ 'groups' ] >\n\t\t\t? {}\n\t\t\t: NonNullable< NonNullable< ReturnType< Source['exec'] > >[ 'groups' ] >\n\t\t\n\t\t: Source extends { readonly [ key in string ] : $mol_regexp_source }\n\t\t? $mol_type_merge< $mol_type_intersect< {\n\t\t\t[ key in keyof Source ] :\n\t\t\t\t$mol_type_merge<\n\t\t\t\t\t& $mol_type_override<\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\treadonly [ k in Extract< keyof Source , string > ]: string\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\treadonly [ k in key ]:\n\t\t\t\t\t\t\t\tSource[ key ] extends string\n\t\t\t\t\t\t\t\t\t? Source[ key ]\n\t\t\t\t\t\t\t\t\t: string\n\t\t\t\t\t\t}\n\t\t\t\t\t>\n\t\t\t\t\t& $mol_regexp_groups< Source[ key ] >\n\t\t\t\t>\n\t\t}[ keyof Source ] > >\n\n\t\t: never\n\tlet x = /x/[Symbol.matchAll]\n\t/** Type safe reguar expression builder */\n\texport class $mol_regexp< Groups extends Record< string , string > > extends RegExp {\n\t\t\n\t\t/** Prefer to use $mol_regexp.from */\n\t\tconstructor( source : string , flags : string = 'gsu' , readonly groups : ( Extract< keyof Groups , string > )[] = [] ) {\n\t\t\tsuper( source , flags )\n\t\t}\n\t\t\n\t\t*[Symbol.matchAll] (str:string): RegExpStringIterator< RegExpExecArray & $mol_type_override< RegExpExecArray, { groups?: { [ key in keyof Groups ] : string } } > > {\n\t\t\tconst index = this.lastIndex\n\t\t\tthis.lastIndex = 0\n\t\t\ttry {\n\t\t\t\twhile ( this.lastIndex < str.length ) {\n\t\t\t\t\tconst found = this.exec(str)\n\t\t\t\t\tif( !found ) break\n\t\t\t\t\tyield found\n\t\t\t\t}\n\t\t\t} finally {\n\t\t\t\tthis.lastIndex = index\n\t\t\t}\n\t\t}\n\t\t\n\t\t/** Parses input and returns found capture groups or null */\n\t\t[ Symbol.match ]( str : string ): null | RegExpMatchArray {\n\t\t\tconst res = [ ... this[Symbol.matchAll]( str ) ].filter( r => r.groups ).map( r => r[0] )\n\t\t\tif( !res.length ) return null\n\t\t\treturn res as RegExpMatchArray\n\t\t}\n\t\t\n\t\t/** Splits string by regexp edges */\n\t\t[ Symbol.split ]( str : string ): string[] {\n\t\t\t\n\t\t\tconst res = [] as string[]\n\t\t\tlet token_last = null\n\t\t\t\n\t\t\tfor( let token of this[Symbol.matchAll]( str ) ) {\n\t\t\t\tif( token.groups && ( token_last ? token_last.groups : true ) ) res.push( '' )\n\t\t\t\tres.push( token[0] )\n\t\t\t\ttoken_last = token\n\t\t\t}\n\t\t\t\n\t\t\tif( !res.length ) res.push( '' )\n\t\t\t\n\t\t\treturn res\n\t\t}\n\t\t\n\t\ttest( str : string ): boolean {\n\t\t\treturn Boolean( str.match( this) )\n\t\t}\n\t\t\n\t\texec( str : string ): RegExpExecArray & $mol_type_override< RegExpExecArray , { groups?: { [ key in keyof Groups ] : string } } > | null {\n\t\t\t\n\t\t\tconst from = this.lastIndex\n\t\t\tif( from >= str.length ) return null\n\t\t\t\n\t\t\tconst res = super.exec( str )\n\t\t\tif( res === null ) {\n\t\t\t\tthis.lastIndex = str.length\n\t\t\t\tif( !str ) return null\n\t\t\t\treturn Object.assign( [ str.slice( from ) ], {\n\t\t\t\t\tindex: from,\n\t\t\t\t\tinput: str,\n\t\t\t\t} ) as any\n\t\t\t}\n\n\t\t\tif( from === this.lastIndex ) {\n\t\t\t\t$mol_fail( new Error( 'Captured empty substring' ) )\n\t\t\t}\n\n\t\t\ttype Token = { [ key in keyof Groups ] : string } & { [ key : number ] : string }\n\t\t\tconst groups = {} as Token\n\t\t\t\n\t\t\tconst skipped = str.slice( from , this.lastIndex - res[0].length )\n\t\t\tif( skipped ) {\n\t\t\t\tthis.lastIndex = this.lastIndex - res[0].length\n\t\t\t\treturn Object.assign( [ skipped ], {\n\t\t\t\t\tindex: from,\n\t\t\t\t\tinput: res.input,\n\t\t\t\t} ) as any\n\t\t\t}\n\t\t\t\n\t\t\tfor( let i = 0 ; i < this.groups.length ; ++i ) {\n\t\t\t\tconst group = this.groups[ i ]\n\t\t\t\tgroups[ group ] = groups[ group ] || res[ i + 1 ] || '' as any\n\t\t\t}\n\n\t\t\treturn Object.assign( res, { groups } )\n\t\t}\n\t\t\n\t\tgenerate(\n\t\t\tparams: Groups_to_params< Groups >\n\t\t): string | null {\n\t\t\treturn null\n\t\t}\n\t\t\n\t\tget native() {\n\t\t\treturn new RegExp( this.source, this.flags )\n\t\t}\n\t\t\n\t\t/** Makes regexp that greedy repeats this pattern with delimiter */\n\t\tstatic separated<\n\t\t\tChunk extends $mol_regexp_source,\n\t\t\tSep extends $mol_regexp_source,\n\t\t>(\n\t\t\tchunk: Chunk,\n\t\t\tsep: Sep,\n\t\t) {\n\t\t\treturn $mol_regexp.from([\n\t\t\t\t$mol_regexp.repeat_greedy([ [chunk], sep ], 0),\n\t\t\t\tchunk,\n\t\t\t])\n\t\t}\n\n\t\t/** Makes regexp that non-greedy repeats this pattern from min to max count */\n\t\tstatic repeat<\n\t\t\tSource extends $mol_regexp_source\n\t\t>(\n\t\t\tsource : Source ,\n\t\t\tmin = 0 ,\n\t\t\tmax = Number.POSITIVE_INFINITY ,\n\t\t) : $mol_regexp< $mol_regexp_groups< Source > > {\n\t\n\t\t\tconst regexp = $mol_regexp.from( source )\n\t\t\tconst upper = Number.isFinite( max ) ? max : ''\n\t\t\t\n\t\t\tconst str = `(?:${ regexp.source }){${ min },${ upper }}?`\n\t\t\tconst regexp2 = new $mol_regexp( str , regexp.flags , regexp.groups )\n\t\t\t\n\t\t\tregexp2.generate = params => {\n\t\t\t\tconst res = regexp.generate( params )\n\t\t\t\tif( res ) return res\n\t\t\t\tif( min > 0 ) return res\n\t\t\t\treturn ''\n\t\t\t}\n\t\n\t\t\treturn regexp2\n\t\n\t\t}\n\n\t\t/** Makes regexp that greedy repeats this pattern from min to max count */\n\t\tstatic repeat_greedy<\n\t\t\tSource extends $mol_regexp_source\n\t\t>(\n\t\t\tsource : Source ,\n\t\t\tmin = 0 ,\n\t\t\tmax = Number.POSITIVE_INFINITY ,\n\t\t) : $mol_regexp< $mol_regexp_groups< Source > > {\n\t\n\t\t\tconst regexp = $mol_regexp.from( source )\n\t\t\tconst upper = Number.isFinite( max ) ? max : ''\n\t\t\t\n\t\t\tconst str = `(?:${ regexp.source }){${ min },${ upper }}`\n\t\t\tconst regexp2 = new $mol_regexp( str , regexp.flags , regexp.groups )\n\t\t\t\n\t\t\tregexp2.generate = params => {\n\t\t\t\tconst res = regexp.generate( params )\n\t\t\t\tif( res ) return res\n\t\t\t\tif( min > 0 ) return res\n\t\t\t\treturn ''\n\t\t\t}\n\t\n\t\t\treturn regexp2\n\t\t}\n\n\t\t/** Makes regexp that match any of options */\n\t\tstatic vary<\n\t\t\tSources extends readonly $mol_regexp_source[]\n\t\t>(\n\t\t\tsources : Sources ,\n\t\t\tflags : string = 'gsu',\n\t\t) {\n\t\t\t\n\t\t\tconst groups = [] as string[]\n\t\t\t\n\t\t\tconst chunks = sources.map( source => {\n\n\t\t\t\tconst regexp = $mol_regexp.from( source )\n\t\t\t\tgroups.push( ... regexp.groups )\n\t\t\t\t\n\t\t\t\treturn regexp.source\n\n\t\t\t} ) as any as readonly[ $mol_regexp_source , ... $mol_regexp_source[] ]\n\t\t\t\n\t\t\treturn new $mol_regexp< $mol_regexp_groups< Sources[number] > >(\n\t\t\t\t`(?:${ chunks.join('|') })` ,\n\t\t\t\tflags ,\n\t\t\t\tgroups as any[] ,\n\t\t\t)\n\t\t\t\n\t\t}\n\n\t\t/** Makes regexp that allow absent of this pattern */\n\t\tstatic optional<\n\t\t\tSource extends $mol_regexp_source\n\t\t>( source : Source ) {\n\t\t\treturn $mol_regexp.repeat_greedy( source , 0 , 1 )\n\t\t}\n\n\t\t/** Makes regexp that look ahead for pattern */\n\t\tstatic force_after( source : $mol_regexp_source ) {\n\n\t\t\tconst regexp = $mol_regexp.from( source )\n\t\t\t\n\t\t\treturn new $mol_regexp(\n\t\t\t\t`(?=${ regexp.source })` ,\n\t\t\t\tregexp.flags ,\n\t\t\t\tregexp.groups ,\n\t\t\t)\n\n\t\t}\n\n\t\t/** Makes regexp that look ahead for pattern */\n\t\tstatic forbid_after( source : $mol_regexp_source ) {\n\n\t\t\tconst regexp = $mol_regexp.from( source )\n\t\t\t\n\t\t\treturn new $mol_regexp(\n\t\t\t\t`(?!${ regexp.source })` ,\n\t\t\t\tregexp.flags ,\n\t\t\t\tregexp.groups ,\n\t\t\t)\n\n\t\t}\n\n\t\t/** Converts some js values to regexp */\n\t\tstatic from<\n\t\t\tSource extends $mol_regexp_source\n\t\t>(\n\t\t\tsource : Source ,\n\t\t\t{ ignoreCase , multiline } : Partial< Pick< RegExp , 'ignoreCase' | 'multiline' > > = {\n\t\t\t\tignoreCase : false ,\n\t\t\t\tmultiline : false ,\n\t\t\t} ,\n\t\t) : $mol_regexp< $mol_regexp_groups< Source > > {\n\n\t\t\tlet flags = 'gsu'\n\t\t\tif( multiline ) flags += 'm'\n\t\t\tif( ignoreCase ) flags += 'i'\n\n\t\t\tif( typeof source === 'number' ) {\n\n\t\t\t\tconst src = `\\\\u{${ source.toString(16) }}`\n\t\t\t\tconst regexp = new $mol_regexp< $mol_regexp_groups< Source > >( src , flags )\n\t\t\t\tregexp.generate = ()=> src\n\t\t\t\treturn regexp\n\n\t\t\t} if( typeof source === 'string' ) {\n\n\t\t\t\tconst src = source.replace( /[.*+?^${}()|[\\]\\\\]/g , '\\\\$&' ) \n\t\t\t\tconst regexp = new $mol_regexp< $mol_regexp_groups< Source > >( src , flags )\n\t\t\t\tregexp.generate = ()=> source\n\t\t\t\treturn regexp\n\n\t\t\t} else if( source instanceof $mol_regexp ) {\n\t\t\t\t\n\t\t\t\tconst regexp = new $mol_regexp<any>( source.source, flags, source.groups )\n\t\t\t\tregexp.generate = params => source.generate( params )\n\t\t\t\treturn regexp\n\t\t\t\t\n\t\t\t} if( source instanceof RegExp ) {\n\n\n\t\t\t\tconst test = new RegExp( '|' + source.source )\n\t\t\t\tconst groups = Array.from(\n\t\t\t\t\t{ length : test.exec('')!.length - 1 } ,\n\t\t\t\t\t( _ , i )=> String( i + 1 ) ,\n\t\t\t\t)\n\n\t\t\t\tconst regexp = new $mol_regexp< $mol_regexp_groups< Source > >(\n\t\t\t\t\tsource.source ,\n\t\t\t\t\tsource.flags ,\n\t\t\t\t\tgroups as any ,\n\t\t\t\t)\n\t\t\t\t\n\t\t\t\tregexp.generate = ()=> ''\n\n\t\t\t\treturn regexp\n\n\t\t\t} if( Array.isArray( source ) ) {\n\n\t\t\t\tconst patterns = source.map( src => Array.isArray( src )\n\t\t\t\t\t? $mol_regexp.optional( src as any )\n\t\t\t\t\t: $mol_regexp.from( src )\n\t\t\t\t)\n\t\t\t\t\n\t\t\t\tconst chunks = patterns.map( pattern => pattern.source )\n\t\t\t\t\n\t\t\t\tconst groups = [] as ( Extract< keyof $mol_regexp_groups< Source > , string > )[]\n\n\t\t\t\tlet index = 0\n\t\t\n\t\t\t\tfor( const pattern of patterns ) {\n\t\t\t\t\t\n\t\t\t\t\tfor( let group of pattern.groups ) {\n\t\t\t\t\t\tif( Number( group ) >= 0 ) {\n\t\t\t\t\t\t\tgroups.push( String( index ++ ) as any )\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tgroups.push( group )\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tconst regexp = new $mol_regexp( chunks.join( '' ) , flags , groups )\n\t\t\t\t\n\t\t\t\tregexp.generate = params => {\n\t\t\t\t\tlet res = ''\n\t\t\t\t\tfor( const pattern of patterns ) {\n\t\t\t\t\t\tlet sub = pattern.generate( params )\n\t\t\t\t\t\tif( sub === null ) return ''\n\t\t\t\t\t\tres += sub\n\t\t\t\t\t}\n\t\t\t\t\treturn res\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn regexp\n\t\t\n\t\t\t} else {\n\n\t\t\t\tconst groups = [] as string[]\n\n\t\t\t\tconst chunks = Object.keys( source ).map( name => {\n\n\t\t\t\t\tgroups.push( name )\n\n\t\t\t\t\tconst regexp = $mol_regexp.from( (source as any)[ name ] )\n\t\t\t\t\tgroups.push( ... regexp.groups )\n\t\t\t\t\t\n\t\t\t\t\treturn `(${regexp.source})`\n\n\t\t\t\t} ) as any as readonly[ $mol_regexp_source , ... $mol_regexp_source[] ]\n\n\t\t\t\tconst regexp = new $mol_regexp< $mol_regexp_groups< Source > >(\n\t\t\t\t\t`(?:${ chunks.join('|') })` ,\n\t\t\t\t\tflags ,\n\t\t\t\t\tgroups as any[] ,\n\t\t\t\t)\n\t\t\t\t\n\t\t\t\tconst validator = new RegExp( '^' + regexp.source + '$', flags )\n\t\t\t\tregexp.generate = (params: any) => {\n\t\t\t\t\t\n\t\t\t\t\tfor( let option in source ) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tif( option in params ) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif( typeof params[ option ] === 'boolean' ) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif( !params[ option as any ] ) continue\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tconst str = String( params[ option ] )\n\t\t\t\t\t\t\t\tif( str.match( validator ) ) return str\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$mol_fail( new Error( `Wrong param: ${option}=${str}` ) )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif( typeof (source as any)[ option ] !== 'object' ) continue\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tconst res = $mol_regexp.from( (source as any)[ option ] ).generate( params )\n\t\t\t\t\t\tif( res ) return res\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\treturn null\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn regexp\n\n\t\t\t}\n\t\n\t\t}\n\n\t\t/** Makes regexp which includes only unicode category */\n\t\tstatic unicode_only( ... category: $mol_unicode_category ) {\n\t\t\treturn new $mol_regexp(\n\t\t\t\t`\\\\p{${ category.join( '=' ) }}`\n\t\t\t)\n\t\t}\n\n\t\t/** Makes regexp which excludes unicode category */\n\t\tstatic unicode_except( ... category: $mol_unicode_category ) {\n\t\t\treturn new $mol_regexp(\n\t\t\t\t`\\\\P{${ category.join( '=' ) }}`\n\t\t\t)\n\t\t}\n\n\t\tstatic char_range(\n\t\t\tfrom: number,\n\t\t\tto: number,\n\t\t): $mol_regexp<{}> {\n\t\t\treturn new $mol_regexp(\n\t\t\t\t`${ $mol_regexp.from( from ).source }-${ $mol_regexp.from( to ).source }`\n\t\t\t)\n\t\t}\n\n\t\tstatic char_only(\n\t\t\t... allowed: readonly [ $mol_regexp_source, ... $mol_regexp_source[] ]\n\t\t): $mol_regexp<{}> {\n\t\t\tconst regexp = allowed.map( f => $mol_regexp.from( f ).source ).join('')\n\t\t\treturn new $mol_regexp( `[${ regexp }]` )\n\t\t}\n\n\t\tstatic char_except(\n\t\t\t... forbidden: readonly [ $mol_regexp_source, ... $mol_regexp_source[] ]\n\t\t): $mol_regexp<{}> {\n\t\t\tconst regexp = forbidden.map( f => $mol_regexp.from( f ).source ).join('')\n\t\t\treturn new $mol_regexp( `[^${ regexp }]` )\n\t\t}\n\t\t\n\t\tstatic decimal_only = $mol_regexp.from( /\\d/gsu )\n\t\tstatic decimal_except = $mol_regexp.from( /\\D/gsu )\n\t\t\n\t\tstatic latin_only = $mol_regexp.from( /\\w/gsu )\n\t\tstatic latin_except = $mol_regexp.from( /\\W/gsu )\n\t\t\n\t\tstatic space_only = $mol_regexp.from( /\\s/gsu )\n\t\tstatic space_except = $mol_regexp.from( /\\S/gsu )\n\t\t\n\t\tstatic word_break_only = $mol_regexp.from( /\\b/gsu )\n\t\tstatic word_break_except = $mol_regexp.from( /\\B/gsu )\n\t\t\n\t\tstatic tab = $mol_regexp.from( /\\t/gsu )\n\t\tstatic slash_back = $mol_regexp.from( /\\\\/gsu )\n\t\tstatic nul = $mol_regexp.from( /\\0/gsu )\n\t\t\n\t\tstatic char_any = $mol_regexp.from( /./gsu )\n\t\tstatic begin = $mol_regexp.from( /^/gsu )\n\t\tstatic end = $mol_regexp.from( /$/gsu )\n\t\tstatic or = $mol_regexp.from( /|/gsu )\n\t\t\n\t\tstatic line_end = $mol_regexp.from({\n\t\t\twin_end: [ [ '\\r' ], '\\n' ],\n\t\t\tmac_end: '\\r',\n\t\t})\n\t\t\n\t}\n\t\n}\n"]}
|
package/node.mjs
CHANGED
|
@@ -58,8 +58,10 @@ var $;
|
|
|
58
58
|
var $;
|
|
59
59
|
(function ($) {
|
|
60
60
|
let x = /x/[Symbol.matchAll];
|
|
61
|
+
/** Type safe reguar expression builder */
|
|
61
62
|
class $mol_regexp extends RegExp {
|
|
62
63
|
groups;
|
|
64
|
+
/** Prefer to use $mol_regexp.from */
|
|
63
65
|
constructor(source, flags = 'gsu', groups = []) {
|
|
64
66
|
super(source, flags);
|
|
65
67
|
this.groups = groups;
|
|
@@ -79,12 +81,14 @@ var $;
|
|
|
79
81
|
this.lastIndex = index;
|
|
80
82
|
}
|
|
81
83
|
}
|
|
84
|
+
/** Parses input and returns found capture groups or null */
|
|
82
85
|
[Symbol.match](str) {
|
|
83
86
|
const res = [...this[Symbol.matchAll](str)].filter(r => r.groups).map(r => r[0]);
|
|
84
87
|
if (!res.length)
|
|
85
88
|
return null;
|
|
86
89
|
return res;
|
|
87
90
|
}
|
|
91
|
+
/** Splits string by regexp edges */
|
|
88
92
|
[Symbol.split](str) {
|
|
89
93
|
const res = [];
|
|
90
94
|
let token_last = null;
|
|
@@ -139,12 +143,14 @@ var $;
|
|
|
139
143
|
get native() {
|
|
140
144
|
return new RegExp(this.source, this.flags);
|
|
141
145
|
}
|
|
146
|
+
/** Makes regexp that greedy repeats this pattern with delimiter */
|
|
142
147
|
static separated(chunk, sep) {
|
|
143
148
|
return $mol_regexp.from([
|
|
144
149
|
$mol_regexp.repeat_greedy([[chunk], sep], 0),
|
|
145
150
|
chunk,
|
|
146
151
|
]);
|
|
147
152
|
}
|
|
153
|
+
/** Makes regexp that non-greedy repeats this pattern from min to max count */
|
|
148
154
|
static repeat(source, min = 0, max = Number.POSITIVE_INFINITY) {
|
|
149
155
|
const regexp = $mol_regexp.from(source);
|
|
150
156
|
const upper = Number.isFinite(max) ? max : '';
|
|
@@ -160,6 +166,7 @@ var $;
|
|
|
160
166
|
};
|
|
161
167
|
return regexp2;
|
|
162
168
|
}
|
|
169
|
+
/** Makes regexp that greedy repeats this pattern from min to max count */
|
|
163
170
|
static repeat_greedy(source, min = 0, max = Number.POSITIVE_INFINITY) {
|
|
164
171
|
const regexp = $mol_regexp.from(source);
|
|
165
172
|
const upper = Number.isFinite(max) ? max : '';
|
|
@@ -175,6 +182,7 @@ var $;
|
|
|
175
182
|
};
|
|
176
183
|
return regexp2;
|
|
177
184
|
}
|
|
185
|
+
/** Makes regexp that match any of options */
|
|
178
186
|
static vary(sources, flags = 'gsu') {
|
|
179
187
|
const groups = [];
|
|
180
188
|
const chunks = sources.map(source => {
|
|
@@ -184,17 +192,21 @@ var $;
|
|
|
184
192
|
});
|
|
185
193
|
return new $mol_regexp(`(?:${chunks.join('|')})`, flags, groups);
|
|
186
194
|
}
|
|
195
|
+
/** Makes regexp that allow absent of this pattern */
|
|
187
196
|
static optional(source) {
|
|
188
197
|
return $mol_regexp.repeat_greedy(source, 0, 1);
|
|
189
198
|
}
|
|
199
|
+
/** Makes regexp that look ahead for pattern */
|
|
190
200
|
static force_after(source) {
|
|
191
201
|
const regexp = $mol_regexp.from(source);
|
|
192
202
|
return new $mol_regexp(`(?=${regexp.source})`, regexp.flags, regexp.groups);
|
|
193
203
|
}
|
|
204
|
+
/** Makes regexp that look ahead for pattern */
|
|
194
205
|
static forbid_after(source) {
|
|
195
206
|
const regexp = $mol_regexp.from(source);
|
|
196
207
|
return new $mol_regexp(`(?!${regexp.source})`, regexp.flags, regexp.groups);
|
|
197
208
|
}
|
|
209
|
+
/** Converts some js values to regexp */
|
|
198
210
|
static from(source, { ignoreCase, multiline } = {
|
|
199
211
|
ignoreCase: false,
|
|
200
212
|
multiline: false,
|
|
@@ -295,9 +307,11 @@ var $;
|
|
|
295
307
|
return regexp;
|
|
296
308
|
}
|
|
297
309
|
}
|
|
310
|
+
/** Makes regexp which includes only unicode category */
|
|
298
311
|
static unicode_only(...category) {
|
|
299
312
|
return new $mol_regexp(`\\p{${category.join('=')}}`);
|
|
300
313
|
}
|
|
314
|
+
/** Makes regexp which excludes unicode category */
|
|
301
315
|
static unicode_except(...category) {
|
|
302
316
|
return new $mol_regexp(`\\P{${category.join('=')}}`);
|
|
303
317
|
}
|