@umijs/utils 4.0.53 → 4.0.55
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/compiled/@ampproject/remapping/@jridgewell/gen-mapping/dist/types/gen-mapping.d.ts +70 -0
- package/compiled/@ampproject/remapping/@jridgewell/gen-mapping/dist/types/sourcemap-segment.d.ts +12 -0
- package/compiled/@ampproject/remapping/@jridgewell/gen-mapping/dist/types/types.d.ts +35 -0
- package/compiled/@ampproject/remapping/@jridgewell/trace-mapping/dist/types/sourcemap-segment.d.ts +16 -0
- package/compiled/@ampproject/remapping/@jridgewell/trace-mapping/dist/types/trace-mapping.d.ts +74 -0
- package/compiled/@ampproject/remapping/@jridgewell/trace-mapping/dist/types/types.d.ts +92 -0
- package/compiled/@ampproject/remapping/LICENSE +202 -0
- package/compiled/@ampproject/remapping/dist/types/remapping.d.ts +19 -0
- package/compiled/@ampproject/remapping/dist/types/source-map.d.ts +17 -0
- package/compiled/@ampproject/remapping/dist/types/types.d.ts +14 -0
- package/compiled/@ampproject/remapping/index.js +1 -0
- package/compiled/@ampproject/remapping/package.json +1 -0
- package/compiled/magic-string/LICENSE +7 -0
- package/compiled/magic-string/index.d.ts +250 -0
- package/compiled/magic-string/index.js +1 -0
- package/compiled/magic-string/package.json +1 -0
- package/compiled/tsconfig-paths/LICENSE +21 -0
- package/compiled/tsconfig-paths/index.js +1 -0
- package/compiled/tsconfig-paths/lib/index.d.ts +5 -0
- package/compiled/tsconfig-paths/package.json +1 -0
- package/dist/BaseGenerator/BaseGenerator.js +0 -4
- package/dist/Generator/Generator.js +0 -4
- package/dist/index.d.ts +5 -1
- package/dist/index.js +10 -0
- package/dist/logger.js +8 -3
- package/dist/npmClient.js +0 -4
- package/dist/readDirFiles.d.ts +9 -0
- package/dist/readDirFiles.js +62 -0
- package/dist/register.js +0 -2
- package/dist/updatePackageJSON.js +7 -4
- package/package.json +11 -4
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import type { DecodedSourceMap, EncodedSourceMap, Pos, Mapping } from './types';
|
|
2
|
+
export type { DecodedSourceMap, EncodedSourceMap, Mapping };
|
|
3
|
+
export declare type Options = {
|
|
4
|
+
file?: string | null;
|
|
5
|
+
sourceRoot?: string | null;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* A low-level API to associate a generated position with an original source position. Line and
|
|
9
|
+
* column here are 0-based, unlike `addMapping`.
|
|
10
|
+
*/
|
|
11
|
+
export declare let addSegment: {
|
|
12
|
+
(map: GenMapping, genLine: number, genColumn: number, source?: null, sourceLine?: null, sourceColumn?: null, name?: null): void;
|
|
13
|
+
(map: GenMapping, genLine: number, genColumn: number, source: string, sourceLine: number, sourceColumn: number, name?: null): void;
|
|
14
|
+
(map: GenMapping, genLine: number, genColumn: number, source: string, sourceLine: number, sourceColumn: number, name: string): void;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* A high-level API to associate a generated position with an original source position. Line is
|
|
18
|
+
* 1-based, but column is 0-based, due to legacy behavior in `source-map` library.
|
|
19
|
+
*/
|
|
20
|
+
export declare let addMapping: {
|
|
21
|
+
(map: GenMapping, mapping: {
|
|
22
|
+
generated: Pos;
|
|
23
|
+
source?: null;
|
|
24
|
+
original?: null;
|
|
25
|
+
name?: null;
|
|
26
|
+
}): void;
|
|
27
|
+
(map: GenMapping, mapping: {
|
|
28
|
+
generated: Pos;
|
|
29
|
+
source: string;
|
|
30
|
+
original: Pos;
|
|
31
|
+
name?: null;
|
|
32
|
+
}): void;
|
|
33
|
+
(map: GenMapping, mapping: {
|
|
34
|
+
generated: Pos;
|
|
35
|
+
source: string;
|
|
36
|
+
original: Pos;
|
|
37
|
+
name: string;
|
|
38
|
+
}): void;
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* Adds/removes the content of the source file to the source map.
|
|
42
|
+
*/
|
|
43
|
+
export declare let setSourceContent: (map: GenMapping, source: string, content: string | null) => void;
|
|
44
|
+
/**
|
|
45
|
+
* Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects
|
|
46
|
+
* a sourcemap, or to JSON.stringify.
|
|
47
|
+
*/
|
|
48
|
+
export declare let decodedMap: (map: GenMapping) => DecodedSourceMap;
|
|
49
|
+
/**
|
|
50
|
+
* Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects
|
|
51
|
+
* a sourcemap, or to JSON.stringify.
|
|
52
|
+
*/
|
|
53
|
+
export declare let encodedMap: (map: GenMapping) => EncodedSourceMap;
|
|
54
|
+
/**
|
|
55
|
+
* Returns an array of high-level mapping objects for every recorded segment, which could then be
|
|
56
|
+
* passed to the `source-map` library.
|
|
57
|
+
*/
|
|
58
|
+
export declare let allMappings: (map: GenMapping) => Mapping[];
|
|
59
|
+
/**
|
|
60
|
+
* Provides the state to generate a sourcemap.
|
|
61
|
+
*/
|
|
62
|
+
export declare class GenMapping {
|
|
63
|
+
private _names;
|
|
64
|
+
private _sources;
|
|
65
|
+
private _sourcesContent;
|
|
66
|
+
private _mappings;
|
|
67
|
+
file: string | null | undefined;
|
|
68
|
+
sourceRoot: string | null | undefined;
|
|
69
|
+
constructor({ file, sourceRoot }?: Options);
|
|
70
|
+
}
|
package/compiled/@ampproject/remapping/@jridgewell/gen-mapping/dist/types/sourcemap-segment.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
declare type GeneratedColumn = number;
|
|
2
|
+
declare type SourcesIndex = number;
|
|
3
|
+
declare type SourceLine = number;
|
|
4
|
+
declare type SourceColumn = number;
|
|
5
|
+
declare type NamesIndex = number;
|
|
6
|
+
export declare type SourceMapSegment = [GeneratedColumn] | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn] | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn, NamesIndex];
|
|
7
|
+
export declare const COLUMN = 0;
|
|
8
|
+
export declare const SOURCES_INDEX = 1;
|
|
9
|
+
export declare const SOURCE_LINE = 2;
|
|
10
|
+
export declare const SOURCE_COLUMN = 3;
|
|
11
|
+
export declare const NAMES_INDEX = 4;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { SourceMapSegment } from './sourcemap-segment';
|
|
2
|
+
export interface SourceMapV3 {
|
|
3
|
+
file?: string | null;
|
|
4
|
+
names: readonly string[];
|
|
5
|
+
sourceRoot?: string;
|
|
6
|
+
sources: readonly (string | null)[];
|
|
7
|
+
sourcesContent?: readonly (string | null)[];
|
|
8
|
+
version: 3;
|
|
9
|
+
}
|
|
10
|
+
export interface EncodedSourceMap extends SourceMapV3 {
|
|
11
|
+
mappings: string;
|
|
12
|
+
}
|
|
13
|
+
export interface DecodedSourceMap extends SourceMapV3 {
|
|
14
|
+
mappings: readonly SourceMapSegment[][];
|
|
15
|
+
}
|
|
16
|
+
export interface Pos {
|
|
17
|
+
line: number;
|
|
18
|
+
column: number;
|
|
19
|
+
}
|
|
20
|
+
export declare type Mapping = {
|
|
21
|
+
generated: Pos;
|
|
22
|
+
source: undefined;
|
|
23
|
+
original: undefined;
|
|
24
|
+
name: undefined;
|
|
25
|
+
} | {
|
|
26
|
+
generated: Pos;
|
|
27
|
+
source: string;
|
|
28
|
+
original: Pos;
|
|
29
|
+
name: string;
|
|
30
|
+
} | {
|
|
31
|
+
generated: Pos;
|
|
32
|
+
source: string;
|
|
33
|
+
original: Pos;
|
|
34
|
+
name: undefined;
|
|
35
|
+
};
|
package/compiled/@ampproject/remapping/@jridgewell/trace-mapping/dist/types/sourcemap-segment.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
declare type GeneratedColumn = number;
|
|
2
|
+
declare type SourcesIndex = number;
|
|
3
|
+
declare type SourceLine = number;
|
|
4
|
+
declare type SourceColumn = number;
|
|
5
|
+
declare type NamesIndex = number;
|
|
6
|
+
declare type GeneratedLine = number;
|
|
7
|
+
export declare type SourceMapSegment = [GeneratedColumn] | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn] | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn, NamesIndex];
|
|
8
|
+
export declare type ReverseSegment = [SourceColumn, GeneratedLine, GeneratedColumn];
|
|
9
|
+
export declare const COLUMN = 0;
|
|
10
|
+
export declare const SOURCES_INDEX = 1;
|
|
11
|
+
export declare const SOURCE_LINE = 2;
|
|
12
|
+
export declare const SOURCE_COLUMN = 3;
|
|
13
|
+
export declare const NAMES_INDEX = 4;
|
|
14
|
+
export declare const REV_GENERATED_LINE = 1;
|
|
15
|
+
export declare const REV_GENERATED_COLUMN = 2;
|
|
16
|
+
export {};
|
package/compiled/@ampproject/remapping/@jridgewell/trace-mapping/dist/types/trace-mapping.d.ts
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import type { SourceMapSegment } from './sourcemap-segment';
|
|
2
|
+
import type { SourceMapV3, DecodedSourceMap, EncodedSourceMap, InvalidOriginalMapping, OriginalMapping, InvalidGeneratedMapping, GeneratedMapping, SourceMapInput, Needle, SourceNeedle, SourceMap, EachMapping } from './types';
|
|
3
|
+
export type { SourceMapSegment } from './sourcemap-segment';
|
|
4
|
+
export type { SourceMapInput, SectionedSourceMapInput, DecodedSourceMap, EncodedSourceMap, SectionedSourceMap, InvalidOriginalMapping, OriginalMapping as Mapping, OriginalMapping, InvalidGeneratedMapping, GeneratedMapping, EachMapping, } from './types';
|
|
5
|
+
export declare const LEAST_UPPER_BOUND = -1;
|
|
6
|
+
export declare const GREATEST_LOWER_BOUND = 1;
|
|
7
|
+
/**
|
|
8
|
+
* Returns the encoded (VLQ string) form of the SourceMap's mappings field.
|
|
9
|
+
*/
|
|
10
|
+
export declare let encodedMappings: (map: TraceMap) => EncodedSourceMap['mappings'];
|
|
11
|
+
/**
|
|
12
|
+
* Returns the decoded (array of lines of segments) form of the SourceMap's mappings field.
|
|
13
|
+
*/
|
|
14
|
+
export declare let decodedMappings: (map: TraceMap) => Readonly<DecodedSourceMap['mappings']>;
|
|
15
|
+
/**
|
|
16
|
+
* A low-level API to find the segment associated with a generated line/column (think, from a
|
|
17
|
+
* stack trace). Line and column here are 0-based, unlike `originalPositionFor`.
|
|
18
|
+
*/
|
|
19
|
+
export declare let traceSegment: (map: TraceMap, line: number, column: number) => Readonly<SourceMapSegment> | null;
|
|
20
|
+
/**
|
|
21
|
+
* A higher-level API to find the source/line/column associated with a generated line/column
|
|
22
|
+
* (think, from a stack trace). Line is 1-based, but column is 0-based, due to legacy behavior in
|
|
23
|
+
* `source-map` library.
|
|
24
|
+
*/
|
|
25
|
+
export declare let originalPositionFor: (map: TraceMap, needle: Needle) => OriginalMapping | InvalidOriginalMapping;
|
|
26
|
+
/**
|
|
27
|
+
* Finds the generated line/column position of the provided source/line/column source position.
|
|
28
|
+
*/
|
|
29
|
+
export declare let generatedPositionFor: (map: TraceMap, needle: SourceNeedle) => GeneratedMapping | InvalidGeneratedMapping;
|
|
30
|
+
/**
|
|
31
|
+
* Finds all generated line/column positions of the provided source/line/column source position.
|
|
32
|
+
*/
|
|
33
|
+
export declare let allGeneratedPositionsFor: (map: TraceMap, needle: SourceNeedle) => GeneratedMapping[];
|
|
34
|
+
/**
|
|
35
|
+
* Iterates each mapping in generated position order.
|
|
36
|
+
*/
|
|
37
|
+
export declare let eachMapping: (map: TraceMap, cb: (mapping: EachMapping) => void) => void;
|
|
38
|
+
/**
|
|
39
|
+
* Retrieves the source content for a particular source, if its found. Returns null if not.
|
|
40
|
+
*/
|
|
41
|
+
export declare let sourceContentFor: (map: TraceMap, source: string) => string | null;
|
|
42
|
+
/**
|
|
43
|
+
* A helper that skips sorting of the input map's mappings array, which can be expensive for larger
|
|
44
|
+
* maps.
|
|
45
|
+
*/
|
|
46
|
+
export declare let presortedDecodedMap: (map: DecodedSourceMap, mapUrl?: string) => TraceMap;
|
|
47
|
+
/**
|
|
48
|
+
* Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects
|
|
49
|
+
* a sourcemap, or to JSON.stringify.
|
|
50
|
+
*/
|
|
51
|
+
export declare let decodedMap: (map: TraceMap) => Omit<DecodedSourceMap, 'mappings'> & {
|
|
52
|
+
mappings: readonly SourceMapSegment[][];
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects
|
|
56
|
+
* a sourcemap, or to JSON.stringify.
|
|
57
|
+
*/
|
|
58
|
+
export declare let encodedMap: (map: TraceMap) => EncodedSourceMap;
|
|
59
|
+
export { AnyMap } from './any-map';
|
|
60
|
+
export declare class TraceMap implements SourceMap {
|
|
61
|
+
version: SourceMapV3['version'];
|
|
62
|
+
file: SourceMapV3['file'];
|
|
63
|
+
names: SourceMapV3['names'];
|
|
64
|
+
sourceRoot: SourceMapV3['sourceRoot'];
|
|
65
|
+
sources: SourceMapV3['sources'];
|
|
66
|
+
sourcesContent: SourceMapV3['sourcesContent'];
|
|
67
|
+
resolvedSources: string[];
|
|
68
|
+
private _encoded;
|
|
69
|
+
private _decoded;
|
|
70
|
+
private _decodedMemo;
|
|
71
|
+
private _bySources;
|
|
72
|
+
private _bySourceMemos;
|
|
73
|
+
constructor(map: SourceMapInput, mapUrl?: string | null);
|
|
74
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import type { SourceMapSegment } from './sourcemap-segment';
|
|
2
|
+
import type { GREATEST_LOWER_BOUND, LEAST_UPPER_BOUND, TraceMap } from './trace-mapping';
|
|
3
|
+
export interface SourceMapV3 {
|
|
4
|
+
file?: string | null;
|
|
5
|
+
names: string[];
|
|
6
|
+
sourceRoot?: string;
|
|
7
|
+
sources: (string | null)[];
|
|
8
|
+
sourcesContent?: (string | null)[];
|
|
9
|
+
version: 3;
|
|
10
|
+
}
|
|
11
|
+
export interface EncodedSourceMap extends SourceMapV3 {
|
|
12
|
+
mappings: string;
|
|
13
|
+
}
|
|
14
|
+
export interface DecodedSourceMap extends SourceMapV3 {
|
|
15
|
+
mappings: SourceMapSegment[][];
|
|
16
|
+
}
|
|
17
|
+
export interface Section {
|
|
18
|
+
offset: {
|
|
19
|
+
line: number;
|
|
20
|
+
column: number;
|
|
21
|
+
};
|
|
22
|
+
map: EncodedSourceMap | DecodedSourceMap | SectionedSourceMap;
|
|
23
|
+
}
|
|
24
|
+
export interface SectionedSourceMap {
|
|
25
|
+
file?: string | null;
|
|
26
|
+
sections: Section[];
|
|
27
|
+
version: 3;
|
|
28
|
+
}
|
|
29
|
+
export declare type OriginalMapping = {
|
|
30
|
+
source: string | null;
|
|
31
|
+
line: number;
|
|
32
|
+
column: number;
|
|
33
|
+
name: string | null;
|
|
34
|
+
};
|
|
35
|
+
export declare type InvalidOriginalMapping = {
|
|
36
|
+
source: null;
|
|
37
|
+
line: null;
|
|
38
|
+
column: null;
|
|
39
|
+
name: null;
|
|
40
|
+
};
|
|
41
|
+
export declare type GeneratedMapping = {
|
|
42
|
+
line: number;
|
|
43
|
+
column: number;
|
|
44
|
+
};
|
|
45
|
+
export declare type InvalidGeneratedMapping = {
|
|
46
|
+
line: null;
|
|
47
|
+
column: null;
|
|
48
|
+
};
|
|
49
|
+
export declare type Bias = typeof GREATEST_LOWER_BOUND | typeof LEAST_UPPER_BOUND;
|
|
50
|
+
export declare type SourceMapInput = string | Ro<EncodedSourceMap> | Ro<DecodedSourceMap> | TraceMap;
|
|
51
|
+
export declare type SectionedSourceMapInput = SourceMapInput | Ro<SectionedSourceMap>;
|
|
52
|
+
export declare type Needle = {
|
|
53
|
+
line: number;
|
|
54
|
+
column: number;
|
|
55
|
+
bias?: Bias;
|
|
56
|
+
};
|
|
57
|
+
export declare type SourceNeedle = {
|
|
58
|
+
source: string;
|
|
59
|
+
line: number;
|
|
60
|
+
column: number;
|
|
61
|
+
bias?: Bias;
|
|
62
|
+
};
|
|
63
|
+
export declare type EachMapping = {
|
|
64
|
+
generatedLine: number;
|
|
65
|
+
generatedColumn: number;
|
|
66
|
+
source: null;
|
|
67
|
+
originalLine: null;
|
|
68
|
+
originalColumn: null;
|
|
69
|
+
name: null;
|
|
70
|
+
} | {
|
|
71
|
+
generatedLine: number;
|
|
72
|
+
generatedColumn: number;
|
|
73
|
+
source: string | null;
|
|
74
|
+
originalLine: number;
|
|
75
|
+
originalColumn: number;
|
|
76
|
+
name: string | null;
|
|
77
|
+
};
|
|
78
|
+
export declare abstract class SourceMap {
|
|
79
|
+
version: SourceMapV3['version'];
|
|
80
|
+
file: SourceMapV3['file'];
|
|
81
|
+
names: SourceMapV3['names'];
|
|
82
|
+
sourceRoot: SourceMapV3['sourceRoot'];
|
|
83
|
+
sources: SourceMapV3['sources'];
|
|
84
|
+
sourcesContent: SourceMapV3['sourcesContent'];
|
|
85
|
+
resolvedSources: SourceMapV3['sources'];
|
|
86
|
+
}
|
|
87
|
+
export declare type Ro<T> = T extends Array<infer V> ? V[] | Readonly<V[]> | RoArray<V> | Readonly<RoArray<V>> : T extends object ? T | Readonly<T> | RoObject<T> | Readonly<RoObject<T>> : T;
|
|
88
|
+
declare type RoArray<T> = Ro<T>[];
|
|
89
|
+
declare type RoObject<T> = {
|
|
90
|
+
[K in keyof T]: T[K] | Ro<T[K]>;
|
|
91
|
+
};
|
|
92
|
+
export {};
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright 2019 Google LLC
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import SourceMap from './source-map';
|
|
2
|
+
import type { SourceMapInput, SourceMapLoader, Options } from './types';
|
|
3
|
+
export type { SourceMapSegment, EncodedSourceMap, EncodedSourceMap as RawSourceMap, DecodedSourceMap, SourceMapInput, SourceMapLoader, LoaderContext, Options, } from './types';
|
|
4
|
+
/**
|
|
5
|
+
* Traces through all the mappings in the root sourcemap, through the sources
|
|
6
|
+
* (and their sourcemaps), all the way back to the original source location.
|
|
7
|
+
*
|
|
8
|
+
* `loader` will be called every time we encounter a source file. If it returns
|
|
9
|
+
* a sourcemap, we will recurse into that sourcemap to continue the trace. If
|
|
10
|
+
* it returns a falsey value, that source file is treated as an original,
|
|
11
|
+
* unmodified source file.
|
|
12
|
+
*
|
|
13
|
+
* Pass `excludeContent` to exclude any self-containing source file content
|
|
14
|
+
* from the output sourcemap.
|
|
15
|
+
*
|
|
16
|
+
* Pass `decodedMappings` to receive a SourceMap with decoded (instead of
|
|
17
|
+
* VLQ encoded) mappings.
|
|
18
|
+
*/
|
|
19
|
+
export default function remapping(input: SourceMapInput | SourceMapInput[], loader: SourceMapLoader, options?: boolean | Options): SourceMap;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { GenMapping } from '../../@jridgewell/gen-mapping';
|
|
2
|
+
import type { DecodedSourceMap, EncodedSourceMap, Options } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* A SourceMap v3 compatible sourcemap, which only includes fields that were
|
|
5
|
+
* provided to it.
|
|
6
|
+
*/
|
|
7
|
+
export default class SourceMap {
|
|
8
|
+
file?: string | null;
|
|
9
|
+
mappings: EncodedSourceMap['mappings'] | DecodedSourceMap['mappings'];
|
|
10
|
+
sourceRoot?: string;
|
|
11
|
+
names: string[];
|
|
12
|
+
sources: (string | null)[];
|
|
13
|
+
sourcesContent?: (string | null)[];
|
|
14
|
+
version: 3;
|
|
15
|
+
constructor(map: GenMapping, options: Options);
|
|
16
|
+
toString(): string;
|
|
17
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { SourceMapInput } from '../../@jridgewell/trace-mapping';
|
|
2
|
+
export type { SourceMapSegment, DecodedSourceMap, EncodedSourceMap, } from '@jridgewell/trace-mapping';
|
|
3
|
+
export type { SourceMapInput };
|
|
4
|
+
export declare type LoaderContext = {
|
|
5
|
+
readonly importer: string;
|
|
6
|
+
readonly depth: number;
|
|
7
|
+
source: string;
|
|
8
|
+
content: string | null | undefined;
|
|
9
|
+
};
|
|
10
|
+
export declare type SourceMapLoader = (file: string, ctx: LoaderContext) => SourceMapInput | null | undefined | void;
|
|
11
|
+
export declare type Options = {
|
|
12
|
+
excludeContent?: boolean;
|
|
13
|
+
decodedMappings?: boolean;
|
|
14
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(){var e={514:function(e,n,t){(function(n,o){true?e.exports=o(t(974),t(721)):0})(this,(function(e,n){"use strict";const t={source:null,column:null,line:null,name:null,content:null};const o=[];function Source(e,n,t,o){return{map:e,sources:n,source:t,content:o}}function MapSource(e,n){return Source(e,n,"",null)}function OriginalSource(e,n){return Source(null,o,e,n)}function traceMappings(o){const r=new n.GenMapping({file:o.map.file});const{sources:s,map:i}=o;const c=i.names;const u=e.decodedMappings(i);for(let e=0;e<u.length;e++){const o=u[e];let i=null;let l=null;let a=null;for(let u=0;u<o.length;u++){const d=o[u];const f=d[0];let p=t;if(d.length!==1){const e=s[d[1]];p=originalPositionFor(e,d[2],d[3],d.length===5?c[d[4]]:"");if(p==null)continue}const{column:h,line:g,name:m,content:_,source:y}=p;if(g===l&&h===a&&y===i){continue}l=g;a=h;i=y;n.addSegment(r,e,f,y,g,h,m);if(_!=null)n.setSourceContent(r,y,_)}}return r}function originalPositionFor(n,o,r,s){if(!n.map){return{column:r,line:o,name:s,source:n.source,content:n.content}}const i=e.traceSegment(n.map,o,r);if(i==null)return null;if(i.length===1)return t;return originalPositionFor(n.sources[i[1]],i[2],i[3],i.length===5?n.map.names[i[4]]:s)}function asArray(e){if(Array.isArray(e))return e;return[e]}function buildSourceMapTree(n,t){const o=asArray(n).map((n=>new e.TraceMap(n,"")));const r=o.pop();for(let e=0;e<o.length;e++){if(o[e].sources.length>1){throw new Error(`Transformation map ${e} must have exactly one source file.\n`+"Did you specify these with the most recent transformation maps first?")}}let s=build(r,t,"",0);for(let e=o.length-1;e>=0;e--){s=MapSource(o[e],[s])}return s}function build(n,t,o,r){const{resolvedSources:s,sourcesContent:i}=n;const c=r+1;const u=s.map(((n,r)=>{const s={importer:o,depth:c,source:n||"",content:undefined};const u=t(s.source,s);const{source:l,content:a}=s;if(u)return build(new e.TraceMap(u,l),t,l,c);const d=a!==undefined?a:i?i[r]:null;return OriginalSource(l,d)}));return MapSource(n,u)}class SourceMap{constructor(e,t){const o=t.decodedMappings?n.decodedMap(e):n.encodedMap(e);this.version=o.version;this.file=o.file;this.mappings=o.mappings;this.names=o.names;this.sourceRoot=o.sourceRoot;this.sources=o.sources;if(!t.excludeContent){this.sourcesContent=o.sourcesContent}}toString(){return JSON.stringify(this)}}function remapping(e,n,t){const o=typeof t==="object"?t:{excludeContent:!!t,decodedMappings:false};const r=buildSourceMapTree(e,n);return new SourceMap(traceMappings(r),o)}return remapping}))},721:function(e,n,t){(function(e,o){true?o(n,t(465),t(248)):0})(this,(function(e,n,t){"use strict";e.addSegment=void 0;e.addMapping=void 0;e.setSourceContent=void 0;e.decodedMap=void 0;e.encodedMap=void 0;e.allMappings=void 0;class GenMapping{constructor({file:e,sourceRoot:t}={}){this._names=new n.SetArray;this._sources=new n.SetArray;this._sourcesContent=[];this._mappings=[];this.file=e;this.sourceRoot=t}}(()=>{e.addSegment=(e,t,o,r,s,i,c)=>{const{_mappings:u,_sources:l,_sourcesContent:a,_names:d}=e;const f=getLine(u,t);if(r==null){const e=[o];const n=getColumnIndex(f,o,e);return insert(f,n,e)}const p=n.put(l,r);const h=c?[o,p,s,i,n.put(d,c)]:[o,p,s,i];const g=getColumnIndex(f,o,h);if(p===a.length)a[p]=null;insert(f,g,h)};e.addMapping=(n,t)=>{const{generated:o,source:r,original:s,name:i}=t;return e.addSegment(n,o.line-1,o.column,r,s==null?undefined:s.line-1,s===null||s===void 0?void 0:s.column,i)};e.setSourceContent=(e,t,o)=>{const{_sources:r,_sourcesContent:s}=e;s[n.put(r,t)]=o};e.decodedMap=e=>{const{file:n,sourceRoot:t,_mappings:o,_sources:r,_sourcesContent:s,_names:i}=e;return{version:3,file:n,names:i.array,sourceRoot:t||undefined,sources:r.array,sourcesContent:s,mappings:o}};e.encodedMap=n=>{const o=e.decodedMap(n);return Object.assign(Object.assign({},o),{mappings:t.encode(o.mappings)})};e.allMappings=e=>{const n=[];const{_mappings:t,_sources:o,_names:r}=e;for(let e=0;e<t.length;e++){const s=t[e];for(let t=0;t<s.length;t++){const i=s[t];const c={line:e+1,column:i[0]};let u=undefined;let l=undefined;let a=undefined;if(i.length!==1){u=o.array[i[1]];l={line:i[2]+1,column:i[3]};if(i.length===5)a=r.array[i[4]]}n.push({generated:c,source:u,original:l,name:a})}}return n}})();function getLine(e,n){for(let t=e.length;t<=n;t++){e[t]=[]}return e[n]}function getColumnIndex(e,n,t){let o=e.length;for(let r=o-1;r>=0;r--,o--){const s=e[r];const i=s[0];if(i>n)continue;if(i<n)break;const c=compare(s,t);if(c===0)return o;if(c<0)break}return o}function compare(e,n){let t=compareNum(e.length,n.length);if(t!==0)return t;if(e.length===1)return 0;t=compareNum(e[1],n[1]);if(t!==0)return t;t=compareNum(e[2],n[2]);if(t!==0)return t;t=compareNum(e[3],n[3]);if(t!==0)return t;if(e.length===4)return 0;return compareNum(e[4],n[4])}function compareNum(e,n){return e-n}function insert(e,n,t){if(n===-1)return;for(let t=e.length;t>n;t--){e[t]=e[t-1]}e[n]=t}e.GenMapping=GenMapping;Object.defineProperty(e,"__esModule",{value:true})}))},413:function(e){(function(n,t){true?e.exports=t():0})(this,(function(){"use strict";const e=/^[\w+.-]+:\/\//;const n=/^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/;const t=/^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i;var o;(function(e){e[e["Empty"]=1]="Empty";e[e["Hash"]=2]="Hash";e[e["Query"]=3]="Query";e[e["RelativePath"]=4]="RelativePath";e[e["AbsolutePath"]=5]="AbsolutePath";e[e["SchemeRelative"]=6]="SchemeRelative";e[e["Absolute"]=7]="Absolute"})(o||(o={}));function isAbsoluteUrl(n){return e.test(n)}function isSchemeRelativeUrl(e){return e.startsWith("//")}function isAbsolutePath(e){return e.startsWith("/")}function isFileUrl(e){return e.startsWith("file:")}function isRelative(e){return/^[.?#]/.test(e)}function parseAbsoluteUrl(e){const t=n.exec(e);return makeUrl(t[1],t[2]||"",t[3],t[4]||"",t[5]||"/",t[6]||"",t[7]||"")}function parseFileUrl(e){const n=t.exec(e);const o=n[2];return makeUrl("file:","",n[1]||"","",isAbsolutePath(o)?o:"/"+o,n[3]||"",n[4]||"")}function makeUrl(e,n,t,r,s,i,c){return{scheme:e,user:n,host:t,port:r,path:s,query:i,hash:c,type:o.Absolute}}function parseUrl(e){if(isSchemeRelativeUrl(e)){const n=parseAbsoluteUrl("http:"+e);n.scheme="";n.type=o.SchemeRelative;return n}if(isAbsolutePath(e)){const n=parseAbsoluteUrl("http://foo.com"+e);n.scheme="";n.host="";n.type=o.AbsolutePath;return n}if(isFileUrl(e))return parseFileUrl(e);if(isAbsoluteUrl(e))return parseAbsoluteUrl(e);const n=parseAbsoluteUrl("http://foo.com/"+e);n.scheme="";n.host="";n.type=e?e.startsWith("?")?o.Query:e.startsWith("#")?o.Hash:o.RelativePath:o.Empty;return n}function stripPathFilename(e){if(e.endsWith("/.."))return e;const n=e.lastIndexOf("/");return e.slice(0,n+1)}function mergePaths(e,n){normalizePath(n,n.type);if(e.path==="/"){e.path=n.path}else{e.path=stripPathFilename(n.path)+e.path}}function normalizePath(e,n){const t=n<=o.RelativePath;const r=e.path.split("/");let s=1;let i=0;let c=false;for(let e=1;e<r.length;e++){const n=r[e];if(!n){c=true;continue}c=false;if(n===".")continue;if(n===".."){if(i){c=true;i--;s--}else if(t){r[s++]=n}continue}r[s++]=n;i++}let u="";for(let e=1;e<s;e++){u+="/"+r[e]}if(!u||c&&!u.endsWith("/..")){u+="/"}e.path=u}function resolve(e,n){if(!e&&!n)return"";const t=parseUrl(e);let r=t.type;if(n&&r!==o.Absolute){const e=parseUrl(n);const s=e.type;switch(r){case o.Empty:t.hash=e.hash;case o.Hash:t.query=e.query;case o.Query:case o.RelativePath:mergePaths(t,e);case o.AbsolutePath:t.user=e.user;t.host=e.host;t.port=e.port;case o.SchemeRelative:t.scheme=e.scheme}if(s>r)r=s}normalizePath(t,r);const s=t.query+t.hash;switch(r){case o.Hash:case o.Query:return s;case o.RelativePath:{const o=t.path.slice(1);if(!o)return s||".";if(isRelative(n||e)&&!isRelative(o)){return"./"+o+s}return o+s}case o.AbsolutePath:return t.path+s;default:return t.scheme+"//"+t.user+t.host+t.port+t.path+s}}return resolve}))},465:function(e,n){(function(e,t){true?t(n):0})(this,(function(e){"use strict";e.get=void 0;e.put=void 0;e.pop=void 0;class SetArray{constructor(){this._indexes={__proto__:null};this.array=[]}}(()=>{e.get=(e,n)=>e._indexes[n];e.put=(n,t)=>{const o=e.get(n,t);if(o!==undefined)return o;const{array:r,_indexes:s}=n;return s[t]=r.push(t)-1};e.pop=e=>{const{array:n,_indexes:t}=e;if(n.length===0)return;const o=n.pop();t[o]=undefined}})();e.SetArray=SetArray;Object.defineProperty(e,"__esModule",{value:true})}))},248:function(e,n){(function(e,t){true?t(n):0})(this,(function(e){"use strict";const n=",".charCodeAt(0);const t=";".charCodeAt(0);const o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";const r=new Uint8Array(64);const s=new Uint8Array(128);for(let e=0;e<o.length;e++){const n=o.charCodeAt(e);r[e]=n;s[n]=e}const i=typeof TextDecoder!=="undefined"?new TextDecoder:typeof Buffer!=="undefined"?{decode(e){const n=Buffer.from(e.buffer,e.byteOffset,e.byteLength);return n.toString()}}:{decode(e){let n="";for(let t=0;t<e.length;t++){n+=String.fromCharCode(e[t])}return n}};function decode(e){const n=new Int32Array(5);const t=[];let o=0;do{const r=indexOf(e,o);const s=[];let i=true;let c=0;n[0]=0;for(let t=o;t<r;t++){let o;t=decodeInteger(e,t,n,0);const u=n[0];if(u<c)i=false;c=u;if(hasMoreVlq(e,t,r)){t=decodeInteger(e,t,n,1);t=decodeInteger(e,t,n,2);t=decodeInteger(e,t,n,3);if(hasMoreVlq(e,t,r)){t=decodeInteger(e,t,n,4);o=[u,n[1],n[2],n[3],n[4]]}else{o=[u,n[1],n[2],n[3]]}}else{o=[u]}s.push(o)}if(!i)sort(s);t.push(s);o=r+1}while(o<=e.length);return t}function indexOf(e,n){const t=e.indexOf(";",n);return t===-1?e.length:t}function decodeInteger(e,n,t,o){let r=0;let i=0;let c=0;do{const t=e.charCodeAt(n++);c=s[t];r|=(c&31)<<i;i+=5}while(c&32);const u=r&1;r>>>=1;if(u){r=-2147483648|-r}t[o]+=r;return n}function hasMoreVlq(e,t,o){if(t>=o)return false;return e.charCodeAt(t)!==n}function sort(e){e.sort(sortComparator)}function sortComparator(e,n){return e[0]-n[0]}function encode(e){const o=new Int32Array(5);const r=1024*16;const s=r-36;const c=new Uint8Array(r);const u=c.subarray(0,s);let l=0;let a="";for(let d=0;d<e.length;d++){const f=e[d];if(d>0){if(l===r){a+=i.decode(c);l=0}c[l++]=t}if(f.length===0)continue;o[0]=0;for(let e=0;e<f.length;e++){const t=f[e];if(l>s){a+=i.decode(u);c.copyWithin(0,s,l);l-=s}if(e>0)c[l++]=n;l=encodeInteger(c,l,o,t,0);if(t.length===1)continue;l=encodeInteger(c,l,o,t,1);l=encodeInteger(c,l,o,t,2);l=encodeInteger(c,l,o,t,3);if(t.length===4)continue;l=encodeInteger(c,l,o,t,4)}}return a+i.decode(c.subarray(0,l))}function encodeInteger(e,n,t,o,s){const i=o[s];let c=i-t[s];t[s]=i;c=c<0?-c<<1|1:c<<1;do{let t=c&31;c>>>=5;if(c>0)t|=32;e[n++]=r[t]}while(c>0);return n}e.decode=decode;e.encode=encode;Object.defineProperty(e,"__esModule",{value:true})}))},974:function(e,n,t){(function(e,o){true?o(n,t(248),t(413)):0})(this,(function(e,n,t){"use strict";function _interopDefaultLegacy(e){return e&&typeof e==="object"&&"default"in e?e:{default:e}}var o=_interopDefaultLegacy(t);function resolve(e,n){if(n&&!n.endsWith("/"))n+="/";return o["default"](e,n)}function stripFilename(e){if(!e)return"";const n=e.lastIndexOf("/");return e.slice(0,n+1)}const r=0;const s=1;const i=2;const c=3;const u=4;const l=1;const a=2;function maybeSort(e,n){const t=nextUnsortedSegmentLine(e,0);if(t===e.length)return e;if(!n)e=e.slice();for(let o=t;o<e.length;o=nextUnsortedSegmentLine(e,o+1)){e[o]=sortSegments(e[o],n)}return e}function nextUnsortedSegmentLine(e,n){for(let t=n;t<e.length;t++){if(!isSorted(e[t]))return t}return e.length}function isSorted(e){for(let n=1;n<e.length;n++){if(e[n][r]<e[n-1][r]){return false}}return true}function sortSegments(e,n){if(!n)e=e.slice();return e.sort(sortComparator)}function sortComparator(e,n){return e[r]-n[r]}let d=false;function binarySearch(e,n,t,o){while(t<=o){const s=t+(o-t>>1);const i=e[s][r]-n;if(i===0){d=true;return s}if(i<0){t=s+1}else{o=s-1}}d=false;return t-1}function upperBound(e,n,t){for(let o=t+1;o<e.length;t=o++){if(e[o][r]!==n)break}return t}function lowerBound(e,n,t){for(let o=t-1;o>=0;t=o--){if(e[o][r]!==n)break}return t}function memoizedState(){return{lastKey:-1,lastNeedle:-1,lastIndex:-1}}function memoizedBinarySearch(e,n,t,o){const{lastKey:s,lastNeedle:i,lastIndex:c}=t;let u=0;let l=e.length-1;if(o===s){if(n===i){d=c!==-1&&e[c][r]===n;return c}if(n>=i){u=c===-1?0:c}else{l=c}}t.lastKey=o;t.lastNeedle=n;return t.lastIndex=binarySearch(e,n,u,l)}function buildBySources(e,n){const t=n.map(buildNullArray);for(let o=0;o<e.length;o++){const u=e[o];for(let e=0;e<u.length;e++){const l=u[e];if(l.length===1)continue;const a=l[s];const d=l[i];const f=l[c];const p=t[a];const h=p[d]||(p[d]=[]);const g=n[a];const m=upperBound(h,f,memoizedBinarySearch(h,f,g,d));insert(h,g.lastIndex=m+1,[f,o,l[r]])}}return t}function insert(e,n,t){for(let t=e.length;t>n;t--){e[t]=e[t-1]}e[n]=t}function buildNullArray(){return{__proto__:null}}const AnyMap=function(n,t){const o=typeof n==="string"?JSON.parse(n):n;if(!("sections"in o))return new TraceMap(o,t);const r=[];const s=[];const i=[];const c=[];recurse(o,t,r,s,i,c,0,0,Infinity,Infinity);const u={version:3,file:o.file,names:c,sources:s,sourcesContent:i,mappings:r};return e.presortedDecodedMap(u)};function recurse(e,n,t,o,r,s,i,c,u,l){const{sections:a}=e;for(let e=0;e<a.length;e++){const{map:d,offset:f}=a[e];let p=u;let h=l;if(e+1<a.length){const n=a[e+1].offset;p=Math.min(u,i+n.line);if(p===u){h=Math.min(l,c+n.column)}else if(p<u){h=c+n.column}}addSection(d,n,t,o,r,s,i+f.line,c+f.column,p,h)}}function addSection(n,t,o,l,a,d,f,p,h,g){if("sections"in n)return recurse(...arguments);const m=new TraceMap(n,t);const _=l.length;const y=d.length;const M=e.decodedMappings(m);const{resolvedSources:S,sourcesContent:v}=m;append(l,S);append(d,m.names);if(v)append(a,v);else for(let e=0;e<S.length;e++)a.push(null);for(let e=0;e<M.length;e++){const n=f+e;if(n>h)return;const t=getLine(o,n);const l=e===0?p:0;const a=M[e];for(let e=0;e<a.length;e++){const o=a[e];const d=l+o[r];if(n===h&&d>=g)return;if(o.length===1){t.push([d]);continue}const f=_+o[s];const p=o[i];const m=o[c];t.push(o.length===4?[d,f,p,m]:[d,f,p,m,y+o[u]])}}}function append(e,n){for(let t=0;t<n.length;t++)e.push(n[t])}function getLine(e,n){for(let t=e.length;t<=n;t++)e[t]=[];return e[n]}const f="`line` must be greater than 0 (lines start at line 1)";const p="`column` must be greater than or equal to 0 (columns start at column 0)";const h=-1;const g=1;e.encodedMappings=void 0;e.decodedMappings=void 0;e.traceSegment=void 0;e.originalPositionFor=void 0;e.generatedPositionFor=void 0;e.allGeneratedPositionsFor=void 0;e.eachMapping=void 0;e.sourceContentFor=void 0;e.presortedDecodedMap=void 0;e.decodedMap=void 0;e.encodedMap=void 0;class TraceMap{constructor(e,n){const t=typeof e==="string";if(!t&&e._decodedMemo)return e;const o=t?JSON.parse(e):e;const{version:r,file:s,names:i,sourceRoot:c,sources:u,sourcesContent:l}=o;this.version=r;this.file=s;this.names=i;this.sourceRoot=c;this.sources=u;this.sourcesContent=l;const a=resolve(c||"",stripFilename(n));this.resolvedSources=u.map((e=>resolve(e||"",a)));const{mappings:d}=o;if(typeof d==="string"){this._encoded=d;this._decoded=undefined}else{this._encoded=undefined;this._decoded=maybeSort(d,t)}this._decodedMemo=memoizedState();this._bySources=undefined;this._bySourceMemos=undefined}}(()=>{e.encodedMappings=e=>{var t;return(t=e._encoded)!==null&&t!==void 0?t:e._encoded=n.encode(e._decoded)};e.decodedMappings=e=>e._decoded||(e._decoded=n.decode(e._encoded));e.traceSegment=(n,t,o)=>{const r=e.decodedMappings(n);if(t>=r.length)return null;const s=r[t];const i=traceSegmentInternal(s,n._decodedMemo,t,o,g);return i===-1?null:s[i]};e.originalPositionFor=(n,{line:t,column:o,bias:r})=>{t--;if(t<0)throw new Error(f);if(o<0)throw new Error(p);const l=e.decodedMappings(n);if(t>=l.length)return OMapping(null,null,null,null);const a=l[t];const d=traceSegmentInternal(a,n._decodedMemo,t,o,r||g);if(d===-1)return OMapping(null,null,null,null);const h=a[d];if(h.length===1)return OMapping(null,null,null,null);const{names:m,resolvedSources:_}=n;return OMapping(_[h[s]],h[i]+1,h[c],h.length===5?m[h[u]]:null)};e.allGeneratedPositionsFor=(e,{source:n,line:t,column:o,bias:r})=>generatedPosition(e,n,t,o,r||h,true);e.generatedPositionFor=(e,{source:n,line:t,column:o,bias:r})=>generatedPosition(e,n,t,o,r||g,false);e.eachMapping=(n,t)=>{const o=e.decodedMappings(n);const{names:r,resolvedSources:s}=n;for(let e=0;e<o.length;e++){const n=o[e];for(let o=0;o<n.length;o++){const i=n[o];const c=e+1;const u=i[0];let l=null;let a=null;let d=null;let f=null;if(i.length!==1){l=s[i[1]];a=i[2]+1;d=i[3]}if(i.length===5)f=r[i[4]];t({generatedLine:c,generatedColumn:u,source:l,originalLine:a,originalColumn:d,name:f})}}};e.sourceContentFor=(e,n)=>{const{sources:t,resolvedSources:o,sourcesContent:r}=e;if(r==null)return null;let s=t.indexOf(n);if(s===-1)s=o.indexOf(n);return s===-1?null:r[s]};e.presortedDecodedMap=(e,n)=>{const t=new TraceMap(clone(e,[]),n);t._decoded=e.mappings;return t};e.decodedMap=n=>clone(n,e.decodedMappings(n));e.encodedMap=n=>clone(n,e.encodedMappings(n));function generatedPosition(n,t,o,r,s,i){o--;if(o<0)throw new Error(f);if(r<0)throw new Error(p);const{sources:c,resolvedSources:u}=n;let d=c.indexOf(t);if(d===-1)d=u.indexOf(t);if(d===-1)return i?[]:GMapping(null,null);const h=n._bySources||(n._bySources=buildBySources(e.decodedMappings(n),n._bySourceMemos=c.map(memoizedState)));const g=h[d][o];if(g==null)return i?[]:GMapping(null,null);const m=n._bySourceMemos[d];if(i)return sliceGeneratedPositions(g,m,o,r,s);const _=traceSegmentInternal(g,m,o,r,s);if(_===-1)return GMapping(null,null);const y=g[_];return GMapping(y[l]+1,y[a])}})();function clone(e,n){return{version:e.version,file:e.file,names:e.names,sourceRoot:e.sourceRoot,sources:e.sources,sourcesContent:e.sourcesContent,mappings:n}}function OMapping(e,n,t,o){return{source:e,line:n,column:t,name:o}}function GMapping(e,n){return{line:e,column:n}}function traceSegmentInternal(e,n,t,o,r){let s=memoizedBinarySearch(e,o,n,t);if(d){s=(r===h?upperBound:lowerBound)(e,o,s)}else if(r===h)s++;if(s===-1||s===e.length)return-1;return s}function sliceGeneratedPositions(e,n,t,o,s){let i=traceSegmentInternal(e,n,t,o,g);if(!d&&s===h)i++;if(i===-1||i===e.length)return[];const c=d?o:e[i][r];if(!d)i=lowerBound(e,c,i);const u=upperBound(e,c,i);const f=[];for(;i<=u;i++){const n=e[i];f.push(GMapping(n[l]+1,n[a]))}return f}e.AnyMap=AnyMap;e.GREATEST_LOWER_BOUND=g;e.LEAST_UPPER_BOUND=h;e.TraceMap=TraceMap;Object.defineProperty(e,"__esModule",{value:true})}))}};var n={};function __nccwpck_require__(t){var o=n[t];if(o!==undefined){return o.exports}var r=n[t]={exports:{}};var s=true;try{e[t].call(r.exports,r,r.exports,__nccwpck_require__);s=false}finally{if(s)delete n[t]}return r.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var t=__nccwpck_require__(514);module.exports=t})();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"name":"@ampproject/remapping","version":"2.2.0","author":"Justin Ridgewell <jridgewell@google.com>","license":"Apache-2.0","typings":"dist/types/remapping.d.ts"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
Copyright 2018 Rich Harris
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
4
|
+
|
|
5
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
6
|
+
|
|
7
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|