diff options
Diffstat (limited to 'node_modules/@ampproject')
14 files changed, 1193 insertions, 0 deletions
diff --git a/node_modules/@ampproject/remapping/LICENSE b/node_modules/@ampproject/remapping/LICENSE new file mode 100644 index 0000000..f367dfb --- /dev/null +++ b/node_modules/@ampproject/remapping/LICENSE @@ -0,0 +1,202 @@ + +                                 Apache License +                           Version 2.0, January 2004 +                        http://www.apache.org/licenses/ + +   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +   1. Definitions. + +      "License" shall mean the terms and conditions for use, reproduction, +      and distribution as defined by Sections 1 through 9 of this document. + +      "Licensor" shall mean the copyright owner or entity authorized by +      the copyright owner that is granting the License. + +      "Legal Entity" shall mean the union of the acting entity and all +      other entities that control, are controlled by, or are under common +      control with that entity. For the purposes of this definition, +      "control" means (i) the power, direct or indirect, to cause the +      direction or management of such entity, whether by contract or +      otherwise, or (ii) ownership of fifty percent (50%) or more of the +      outstanding shares, or (iii) beneficial ownership of such entity. + +      "You" (or "Your") shall mean an individual or Legal Entity +      exercising permissions granted by this License. + +      "Source" form shall mean the preferred form for making modifications, +      including but not limited to software source code, documentation +      source, and configuration files. + +      "Object" form shall mean any form resulting from mechanical +      transformation or translation of a Source form, including but +      not limited to compiled object code, generated documentation, +      and conversions to other media types. + +      "Work" shall mean the work of authorship, whether in Source or +      Object form, made available under the License, as indicated by a +      copyright notice that is included in or attached to the work +      (an example is provided in the Appendix below). + +      "Derivative Works" shall mean any work, whether in Source or Object +      form, that is based on (or derived from) the Work and for which the +      editorial revisions, annotations, elaborations, or other modifications +      represent, as a whole, an original work of authorship. For the purposes +      of this License, Derivative Works shall not include works that remain +      separable from, or merely link (or bind by name) to the interfaces of, +      the Work and Derivative Works thereof. + +      "Contribution" shall mean any work of authorship, including +      the original version of the Work and any modifications or additions +      to that Work or Derivative Works thereof, that is intentionally +      submitted to Licensor for inclusion in the Work by the copyright owner +      or by an individual or Legal Entity authorized to submit on behalf of +      the copyright owner. For the purposes of this definition, "submitted" +      means any form of electronic, verbal, or written communication sent +      to the Licensor or its representatives, including but not limited to +      communication on electronic mailing lists, source code control systems, +      and issue tracking systems that are managed by, or on behalf of, the +      Licensor for the purpose of discussing and improving the Work, but +      excluding communication that is conspicuously marked or otherwise +      designated in writing by the copyright owner as "Not a Contribution." + +      "Contributor" shall mean Licensor and any individual or Legal Entity +      on behalf of whom a Contribution has been received by Licensor and +      subsequently incorporated within the Work. + +   2. Grant of Copyright License. Subject to the terms and conditions of +      this License, each Contributor hereby grants to You a perpetual, +      worldwide, non-exclusive, no-charge, royalty-free, irrevocable +      copyright license to reproduce, prepare Derivative Works of, +      publicly display, publicly perform, sublicense, and distribute the +      Work and such Derivative Works in Source or Object form. + +   3. Grant of Patent License. Subject to the terms and conditions of +      this License, each Contributor hereby grants to You a perpetual, +      worldwide, non-exclusive, no-charge, royalty-free, irrevocable +      (except as stated in this section) patent license to make, have made, +      use, offer to sell, sell, import, and otherwise transfer the Work, +      where such license applies only to those patent claims licensable +      by such Contributor that are necessarily infringed by their +      Contribution(s) alone or by combination of their Contribution(s) +      with the Work to which such Contribution(s) was submitted. If You +      institute patent litigation against any entity (including a +      cross-claim or counterclaim in a lawsuit) alleging that the Work +      or a Contribution incorporated within the Work constitutes direct +      or contributory patent infringement, then any patent licenses +      granted to You under this License for that Work shall terminate +      as of the date such litigation is filed. + +   4. Redistribution. You may reproduce and distribute copies of the +      Work or Derivative Works thereof in any medium, with or without +      modifications, and in Source or Object form, provided that You +      meet the following conditions: + +      (a) You must give any other recipients of the Work or +          Derivative Works a copy of this License; and + +      (b) You must cause any modified files to carry prominent notices +          stating that You changed the files; and + +      (c) You must retain, in the Source form of any Derivative Works +          that You distribute, all copyright, patent, trademark, and +          attribution notices from the Source form of the Work, +          excluding those notices that do not pertain to any part of +          the Derivative Works; and + +      (d) If the Work includes a "NOTICE" text file as part of its +          distribution, then any Derivative Works that You distribute must +          include a readable copy of the attribution notices contained +          within such NOTICE file, excluding those notices that do not +          pertain to any part of the Derivative Works, in at least one +          of the following places: within a NOTICE text file distributed +          as part of the Derivative Works; within the Source form or +          documentation, if provided along with the Derivative Works; or, +          within a display generated by the Derivative Works, if and +          wherever such third-party notices normally appear. The contents +          of the NOTICE file are for informational purposes only and +          do not modify the License. You may add Your own attribution +          notices within Derivative Works that You distribute, alongside +          or as an addendum to the NOTICE text from the Work, provided +          that such additional attribution notices cannot be construed +          as modifying the License. + +      You may add Your own copyright statement to Your modifications and +      may provide additional or different license terms and conditions +      for use, reproduction, or distribution of Your modifications, or +      for any such Derivative Works as a whole, provided Your use, +      reproduction, and distribution of the Work otherwise complies with +      the conditions stated in this License. + +   5. Submission of Contributions. Unless You explicitly state otherwise, +      any Contribution intentionally submitted for inclusion in the Work +      by You to the Licensor shall be under the terms and conditions of +      this License, without any additional terms or conditions. +      Notwithstanding the above, nothing herein shall supersede or modify +      the terms of any separate license agreement you may have executed +      with Licensor regarding such Contributions. + +   6. Trademarks. This License does not grant permission to use the trade +      names, trademarks, service marks, or product names of the Licensor, +      except as required for reasonable and customary use in describing the +      origin of the Work and reproducing the content of the NOTICE file. + +   7. Disclaimer of Warranty. Unless required by applicable law or +      agreed to in writing, Licensor provides the Work (and each +      Contributor provides its Contributions) on an "AS IS" BASIS, +      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +      implied, including, without limitation, any warranties or conditions +      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A +      PARTICULAR PURPOSE. You are solely responsible for determining the +      appropriateness of using or redistributing the Work and assume any +      risks associated with Your exercise of permissions under this License. + +   8. Limitation of Liability. In no event and under no legal theory, +      whether in tort (including negligence), contract, or otherwise, +      unless required by applicable law (such as deliberate and grossly +      negligent acts) or agreed to in writing, shall any Contributor be +      liable to You for damages, including any direct, indirect, special, +      incidental, or consequential damages of any character arising as a +      result of this License or out of the use or inability to use the +      Work (including but not limited to damages for loss of goodwill, +      work stoppage, computer failure or malfunction, or any and all +      other commercial damages or losses), even if such Contributor +      has been advised of the possibility of such damages. + +   9. Accepting Warranty or Additional Liability. While redistributing +      the Work or Derivative Works thereof, You may choose to offer, +      and charge a fee for, acceptance of support, warranty, indemnity, +      or other liability obligations and/or rights consistent with this +      License. However, in accepting such obligations, You may act only +      on Your own behalf and on Your sole responsibility, not on behalf +      of any other Contributor, and only if You agree to indemnify, +      defend, and hold each Contributor harmless for any liability +      incurred by, or claims asserted against, such Contributor by reason +      of your accepting any such warranty or additional liability. + +   END OF TERMS AND CONDITIONS + +   APPENDIX: How to apply the Apache License to your work. + +      To apply the Apache License to your work, attach the following +      boilerplate notice, with the fields enclosed by brackets "[]" +      replaced with your own identifying information. (Don't include +      the brackets!)  The text should be enclosed in the appropriate +      comment syntax for the file format. We also recommend that a +      file or class name and description of purpose be included on the +      same "printed page" as the copyright notice for easier +      identification within third-party archives. + +   Copyright 2019 Google LLC + +   Licensed under the Apache License, Version 2.0 (the "License"); +   you may not use this file except in compliance with the License. +   You may obtain a copy of the License at + +       http://www.apache.org/licenses/LICENSE-2.0 + +   Unless required by applicable law or agreed to in writing, software +   distributed under the License is distributed on an "AS IS" BASIS, +   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +   See the License for the specific language governing permissions and +   limitations under the License. diff --git a/node_modules/@ampproject/remapping/README.md b/node_modules/@ampproject/remapping/README.md new file mode 100644 index 0000000..1463c9f --- /dev/null +++ b/node_modules/@ampproject/remapping/README.md @@ -0,0 +1,218 @@ +# @ampproject/remapping + +> Remap sequential sourcemaps through transformations to point at the original source code + +Remapping allows you to take the sourcemaps generated through transforming your code and "remap" +them to the original source locations. Think "my minified code, transformed with babel and bundled +with webpack", all pointing to the correct location in your original source code. + +With remapping, none of your source code transformations need to be aware of the input's sourcemap, +they only need to generate an output sourcemap. This greatly simplifies building custom +transformations (think a find-and-replace). + +## Installation + +```sh +npm install @ampproject/remapping +``` + +## Usage + +```typescript +function remapping( +  map: SourceMap | SourceMap[], +  loader: (file: string, ctx: LoaderContext) => (SourceMap | null | undefined), +  options?: { excludeContent: boolean, decodedMappings: boolean } +): SourceMap; + +// LoaderContext gives the loader the importing sourcemap, tree depth, the ability to override the +// "source" location (where child sources are resolved relative to, or the location of original +// source), and the ability to override the "content" of an original source for inclusion in the +// output sourcemap. +type LoaderContext = { + readonly importer: string; + readonly depth: number; + source: string; + content: string | null | undefined; +} +``` + +`remapping` takes the final output sourcemap, and a `loader` function. For every source file pointer +in the sourcemap, the `loader` will be called with the resolved path. If the path itself represents +a transformed file (it has a sourcmap associated with it), then the `loader` should return that +sourcemap. If not, the path will be treated as an original, untransformed source code. + +```js +// Babel transformed "helloworld.js" into "transformed.js" +const transformedMap = JSON.stringify({ +  file: 'transformed.js', +  // 1st column of 2nd line of output file translates into the 1st source +  // file, line 3, column 2 +  mappings: ';CAEE', +  sources: ['helloworld.js'], +  version: 3, +}); + +// Uglify minified "transformed.js" into "transformed.min.js" +const minifiedTransformedMap = JSON.stringify({ +  file: 'transformed.min.js', +  // 0th column of 1st line of output file translates into the 1st source +  // file, line 2, column 1. +  mappings: 'AACC', +  names: [], +  sources: ['transformed.js'], +  version: 3, +}); + +const remapped = remapping( +  minifiedTransformedMap, +  (file, ctx) => { + +    // The "transformed.js" file is an transformed file. +    if (file === 'transformed.js') { +      // The root importer is empty. +      console.assert(ctx.importer === ''); +      // The depth in the sourcemap tree we're currently loading. +      // The root `minifiedTransformedMap` is depth 0, and its source children are depth 1, etc. +      console.assert(ctx.depth === 1); + +      return transformedMap; +    } + +    // Loader will be called to load transformedMap's source file pointers as well. +    console.assert(file === 'helloworld.js'); +    // `transformed.js`'s sourcemap points into `helloworld.js`. +    console.assert(ctx.importer === 'transformed.js'); +    // This is a source child of `transformed`, which is a source child of `minifiedTransformedMap`. +    console.assert(ctx.depth === 2); +    return null; +  } +); + +console.log(remapped); +// { +//   file: 'transpiled.min.js', +//   mappings: 'AAEE', +//   sources: ['helloworld.js'], +//   version: 3, +// }; +``` + +In this example, `loader` will be called twice: + +1. `"transformed.js"`, the first source file pointer in the `minifiedTransformedMap`. We return the +   associated sourcemap for it (its a transformed file, after all) so that sourcemap locations can +   be traced through it into the source files it represents. +2. `"helloworld.js"`, our original, unmodified source code. This file does not have a sourcemap, so +   we return `null`. + +The `remapped` sourcemap now points from `transformed.min.js` into locations in `helloworld.js`. If +you were to read the `mappings`, it says "0th column of the first line output line points to the 1st +column of the 2nd line of the file `helloworld.js`". + +### Multiple transformations of a file + +As a convenience, if you have multiple single-source transformations of a file, you may pass an +array of sourcemap files in the order of most-recent transformation sourcemap first. Note that this +changes the `importer` and `depth` of each call to our loader. So our above example could have been +written as: + +```js +const remapped = remapping( +  [minifiedTransformedMap, transformedMap], +  () => null +); + +console.log(remapped); +// { +//   file: 'transpiled.min.js', +//   mappings: 'AAEE', +//   sources: ['helloworld.js'], +//   version: 3, +// }; +``` + +### Advanced control of the loading graph + +#### `source` + +The `source` property can overridden to any value to change the location of the current load. Eg, +for an original source file, it allows us to change the location to the original source regardless +of what the sourcemap source entry says. And for transformed files, it allows us to change the +relative resolving location for child sources of the loaded sourcemap. + +```js +const remapped = remapping( +  minifiedTransformedMap, +  (file, ctx) => { + +    if (file === 'transformed.js') { +      // We pretend the transformed.js file actually exists in the 'src/' directory. When the nested +      // source files are loaded, they will now be relative to `src/`. +      ctx.source = 'src/transformed.js'; +      return transformedMap; +    } + +    console.assert(file === 'src/helloworld.js'); +    // We could futher change the source of this original file, eg, to be inside a nested directory +    // itself. This will be reflected in the remapped sourcemap. +    ctx.source = 'src/nested/transformed.js'; +    return null; +  } +); + +console.log(remapped); +// { +//   …, +//   sources: ['src/nested/helloworld.js'], +// }; +``` + + +#### `content` + +The `content` property can be overridden when we encounter an original source file. Eg, this allows +you to manually provide the source content of the original file regardless of whether the +`sourcesContent` field is present in the parent sourcemap. It can also be set to `null` to remove +the source content. + +```js +const remapped = remapping( +  minifiedTransformedMap, +  (file, ctx) => { + +    if (file === 'transformed.js') { +      // transformedMap does not include a `sourcesContent` field, so usually the remapped sourcemap +      // would not include any `sourcesContent` values. +      return transformedMap; +    } + +    console.assert(file === 'helloworld.js'); +    // We can read the file to provide the source content. +    ctx.content = fs.readFileSync(file, 'utf8'); +    return null; +  } +); + +console.log(remapped); +// { +//   …, +//   sourcesContent: [ +//     'console.log("Hello world!")', +//   ], +// }; +``` + +### Options + +#### excludeContent + +By default, `excludeContent` is `false`. Passing `{ excludeContent: true }` will exclude the +`sourcesContent` field from the returned sourcemap. This is mainly useful when you want to reduce +the size out the sourcemap. + +#### decodedMappings + +By default, `decodedMappings` is `false`. Passing `{ decodedMappings: true }` will leave the +`mappings` field in a [decoded state](https://github.com/rich-harris/sourcemap-codec) instead of +encoding into a VLQ string. diff --git a/node_modules/@ampproject/remapping/dist/remapping.mjs b/node_modules/@ampproject/remapping/dist/remapping.mjs new file mode 100644 index 0000000..4847e8a --- /dev/null +++ b/node_modules/@ampproject/remapping/dist/remapping.mjs @@ -0,0 +1,276 @@ +import { traceSegment, decodedMappings, presortedDecodedMap, TraceMap, encodedMappings } from '@jridgewell/trace-mapping'; + +/** + * A "leaf" node in the sourcemap tree, representing an original, unmodified + * source file. Recursive segment tracing ends at the `OriginalSource`. + */ +class OriginalSource { +    constructor(source, content) { +        this.source = source; +        this.content = content; +    } +    /** +     * Tracing a `SourceMapSegment` ends when we get to an `OriginalSource`, +     * meaning this line/column location originated from this source file. +     */ +    originalPositionFor(line, column, name) { +        return { column, line, name, source: this.source, content: this.content }; +    } +} + +/** + * Puts `key` into the backing array, if it is not already present. Returns + * the index of the `key` in the backing array. + */ +let put; +/** + * FastStringArray acts like a `Set` (allowing only one occurrence of a string + * `key`), but provides the index of the `key` in the backing array. + * + * This is designed to allow synchronizing a second array with the contents of + * the backing array, like how `sourcesContent[i]` is the source content + * associated with `source[i]`, and there are never duplicates. + */ +class FastStringArray { +    constructor() { +        this.indexes = Object.create(null); +        this.array = []; +    } +} +(() => { +    put = (strarr, key) => { +        const { array, indexes } = strarr; +        // The key may or may not be present. If it is present, it's a number. +        let index = indexes[key]; +        // If it's not yet present, we need to insert it and track the index in the +        // indexes. +        if (index === undefined) { +            index = indexes[key] = array.length; +            array.push(key); +        } +        return index; +    }; +})(); + +const INVALID_MAPPING = undefined; +const SOURCELESS_MAPPING = null; +/** + * traceMappings is only called on the root level SourceMapTree, and begins the process of + * resolving each mapping in terms of the original source files. + */ +let traceMappings; +/** + * SourceMapTree represents a single sourcemap, with the ability to trace + * mappings into its child nodes (which may themselves be SourceMapTrees). + */ +class SourceMapTree { +    constructor(map, sources) { +        this.map = map; +        this.sources = sources; +    } +    /** +     * originalPositionFor is only called on children SourceMapTrees. It recurses down +     * into its own child SourceMapTrees, until we find the original source map. +     */ +    originalPositionFor(line, column, name) { +        const segment = traceSegment(this.map, line, column); +        // If we couldn't find a segment, then this doesn't exist in the sourcemap. +        if (segment == null) +            return INVALID_MAPPING; +        // 1-length segments only move the current generated column, there's no source information +        // to gather from it. +        if (segment.length === 1) +            return SOURCELESS_MAPPING; +        const source = this.sources[segment[1]]; +        return source.originalPositionFor(segment[2], segment[3], segment.length === 5 ? this.map.names[segment[4]] : name); +    } +} +(() => { +    traceMappings = (tree) => { +        const mappings = []; +        const names = new FastStringArray(); +        const sources = new FastStringArray(); +        const sourcesContent = []; +        const { sources: rootSources, map } = tree; +        const rootNames = map.names; +        const rootMappings = decodedMappings(map); +        let lastLineWithSegment = -1; +        for (let i = 0; i < rootMappings.length; i++) { +            const segments = rootMappings[i]; +            const tracedSegments = []; +            let lastSourcesIndex = -1; +            let lastSourceLine = -1; +            let lastSourceColumn = -1; +            for (let j = 0; j < segments.length; j++) { +                const segment = segments[j]; +                let traced = SOURCELESS_MAPPING; +                // 1-length segments only move the current generated column, there's no source information +                // to gather from it. +                if (segment.length !== 1) { +                    const source = rootSources[segment[1]]; +                    traced = source.originalPositionFor(segment[2], segment[3], segment.length === 5 ? rootNames[segment[4]] : ''); +                    // If the trace is invalid, then the trace ran into a sourcemap that doesn't contain a +                    // respective segment into an original source. +                    if (traced === INVALID_MAPPING) +                        continue; +                } +                const genCol = segment[0]; +                if (traced === SOURCELESS_MAPPING) { +                    if (lastSourcesIndex === -1) { +                        // This is a consecutive source-less segment, which doesn't carry any new information. +                        continue; +                    } +                    lastSourcesIndex = lastSourceLine = lastSourceColumn = -1; +                    tracedSegments.push([genCol]); +                    continue; +                } +                // So we traced a segment down into its original source file. Now push a +                // new segment pointing to this location. +                const { column, line, name, content, source } = traced; +                // Store the source location, and ensure we keep sourcesContent up to +                // date with the sources array. +                const sourcesIndex = put(sources, source); +                sourcesContent[sourcesIndex] = content; +                if (lastSourcesIndex === sourcesIndex && +                    lastSourceLine === line && +                    lastSourceColumn === column) { +                    // This is a duplicate mapping pointing at the exact same starting point in the source +                    // file. It doesn't carry any new information, and only bloats the sourcemap. +                    continue; +                } +                lastLineWithSegment = i; +                lastSourcesIndex = sourcesIndex; +                lastSourceLine = line; +                lastSourceColumn = column; +                // This looks like unnecessary duplication, but it noticeably increases performance. If we +                // were to push the nameIndex onto length-4 array, v8 would internally allocate 22 slots! +                // That's 68 wasted bytes! Array literals have the same capacity as their length, saving +                // memory. +                tracedSegments.push(name +                    ? [genCol, sourcesIndex, line, column, put(names, name)] +                    : [genCol, sourcesIndex, line, column]); +            } +            mappings.push(tracedSegments); +        } +        if (mappings.length > lastLineWithSegment + 1) { +            mappings.length = lastLineWithSegment + 1; +        } +        return presortedDecodedMap(Object.assign({}, tree.map, { +            mappings, +            // TODO: Make all sources relative to the sourceRoot. +            sourceRoot: undefined, +            names: names.array, +            sources: sources.array, +            sourcesContent, +        })); +    }; +})(); + +function asArray(value) { +    if (Array.isArray(value)) +        return value; +    return [value]; +} +/** + * Recursively builds a tree structure out of sourcemap files, with each node + * being either an `OriginalSource` "leaf" or a `SourceMapTree` composed of + * `OriginalSource`s and `SourceMapTree`s. + * + * Every sourcemap is composed of a collection of source files and mappings + * into locations of those source files. When we generate a `SourceMapTree` for + * the sourcemap, we attempt to load each source file's own sourcemap. If it + * does not have an associated sourcemap, it is considered an original, + * unmodified source file. + */ +function buildSourceMapTree(input, loader) { +    const maps = asArray(input).map((m) => new TraceMap(m, '')); +    const map = maps.pop(); +    for (let i = 0; i < maps.length; i++) { +        if (maps[i].sources.length > 1) { +            throw new Error(`Transformation map ${i} must have exactly one source file.\n` + +                'Did you specify these with the most recent transformation maps first?'); +        } +    } +    let tree = build(map, loader, '', 0); +    for (let i = maps.length - 1; i >= 0; i--) { +        tree = new SourceMapTree(maps[i], [tree]); +    } +    return tree; +} +function build(map, loader, importer, importerDepth) { +    const { resolvedSources, sourcesContent } = map; +    const depth = importerDepth + 1; +    const children = resolvedSources.map((sourceFile, i) => { +        // The loading context gives the loader more information about why this file is being loaded +        // (eg, from which importer). It also allows the loader to override the location of the loaded +        // sourcemap/original source, or to override the content in the sourcesContent field if it's +        // an unmodified source file. +        const ctx = { +            importer, +            depth, +            source: sourceFile || '', +            content: undefined, +        }; +        // Use the provided loader callback to retrieve the file's sourcemap. +        // TODO: We should eventually support async loading of sourcemap files. +        const sourceMap = loader(ctx.source, ctx); +        const { source, content } = ctx; +        // If there is no sourcemap, then it is an unmodified source file. +        if (!sourceMap) { +            // The contents of this unmodified source file can be overridden via the loader context, +            // allowing it to be explicitly null or a string. If it remains undefined, we fall back to +            // the importing sourcemap's `sourcesContent` field. +            const sourceContent = content !== undefined ? content : sourcesContent ? sourcesContent[i] : null; +            return new OriginalSource(source, sourceContent); +        } +        // Else, it's a real sourcemap, and we need to recurse into it to load its +        // source files. +        return build(new TraceMap(sourceMap, source), loader, source, depth); +    }); +    return new SourceMapTree(map, children); +} + +/** + * A SourceMap v3 compatible sourcemap, which only includes fields that were + * provided to it. + */ +class SourceMap { +    constructor(map, options) { +        this.version = 3; // SourceMap spec says this should be first. +        this.file = map.file; +        this.mappings = options.decodedMappings ? decodedMappings(map) : encodedMappings(map); +        this.names = map.names; +        this.sourceRoot = map.sourceRoot; +        this.sources = map.sources; +        if (!options.excludeContent && 'sourcesContent' in map) { +            this.sourcesContent = map.sourcesContent; +        } +    } +    toString() { +        return JSON.stringify(this); +    } +} + +/** + * Traces through all the mappings in the root sourcemap, through the sources + * (and their sourcemaps), all the way back to the original source location. + * + * `loader` will be called every time we encounter a source file. If it returns + * a sourcemap, we will recurse into that sourcemap to continue the trace. If + * it returns a falsey value, that source file is treated as an original, + * unmodified source file. + * + * Pass `excludeContent` to exclude any self-containing source file content + * from the output sourcemap. + * + * Pass `decodedMappings` to receive a SourceMap with decoded (instead of + * VLQ encoded) mappings. + */ +function remapping(input, loader, options) { +    const opts = typeof options === 'object' ? options : { excludeContent: !!options, decodedMappings: false }; +    const tree = buildSourceMapTree(input, loader); +    return new SourceMap(traceMappings(tree), opts); +} + +export { remapping as default }; +//# sourceMappingURL=remapping.mjs.map diff --git a/node_modules/@ampproject/remapping/dist/remapping.mjs.map b/node_modules/@ampproject/remapping/dist/remapping.mjs.map new file mode 100644 index 0000000..0ca5153 --- /dev/null +++ b/node_modules/@ampproject/remapping/dist/remapping.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"remapping.mjs","sources":["../../src/original-source.ts","../../src/fast-string-array.ts","../../src/source-map-tree.ts","../../src/build-source-map-tree.ts","../../src/source-map.ts","../../src/remapping.ts"],"sourcesContent":[null,null,null,null,null,null],"names":[],"mappings":";;AAEA;;;;MAIqB,cAAc;IAIjC,YAAY,MAAc,EAAE,OAAsB;QAChD,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;KACxB;;;;;IAMD,mBAAmB,CAAC,IAAY,EAAE,MAAc,EAAE,IAAY;QAC5D,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC;KAC3E;;;ACrBH;;;;AAIO,IAAI,GAAqD,CAAC;AAEjE;;;;;;;;MAQa,eAAe;IAA5B;QACE,YAAO,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAA8B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AG,CAAC,IAAI,CAAC;QACrB,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,eAAe,GAAG,eAAe,CAAC,GAAG,CAAC,GAAG,eAAe,CAAC,GAAG,CAAC,CAAC;QACtF,IAAI,CAAC,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC;QAEvB,IAAI,CAAC,UAAU,GAAG,GAAG,CAAC,UAAU,CAAC;QAEjC,IAAI,CAAC,OAAO,GAAG,GAAG,CAAC,OAAO,CAAC;QAC3B,IAAI,CAAC,OAAO,CAAC,cAAc,IAAI,gBAAgB,IAAI,GAAG,EAAE;YACtD,IAAI,CAAC,cAAc,GAAG,GAAG,CAAC,cAAc,CAAC;SAC1C;KACF;IAED,QAAQ;QACN,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;KAC7B;;;ACnBH;;;;;;;;;;;;;;;SAewB,SAAS,CAC/B,KAAwC,EACxC,MAAuB,EACvB,OAA2B;IAE3B,MAAM,IAAI,GACR,OAAO,OAAO,KAAK,QAAQ,GAAG,OAAO,GAAG,EAAE,cAAc,EAAE,CAAC,CAAC,OAAO,EAAE,eAAe,EAAE,KAAK,EAAE,CAAC;IAChG,MAAM,IAAI,GAAG,kBAAkB,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;IAC/C,OAAO,IAAI,SAAS,CAAC,aAAa,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,CAAC;AAClD;;;;"}
\ No newline at end of file diff --git a/node_modules/@ampproject/remapping/dist/remapping.umd.js b/node_modules/@ampproject/remapping/dist/remapping.umd.js new file mode 100644 index 0000000..d4f3df4 --- /dev/null +++ b/node_modules/@ampproject/remapping/dist/remapping.umd.js @@ -0,0 +1,282 @@ +(function (global, factory) { +    typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('@jridgewell/trace-mapping')) : +    typeof define === 'function' && define.amd ? define(['@jridgewell/trace-mapping'], factory) : +    (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.remapping = factory(global.traceMapping)); +})(this, (function (traceMapping) { 'use strict'; + +    /** +     * A "leaf" node in the sourcemap tree, representing an original, unmodified +     * source file. Recursive segment tracing ends at the `OriginalSource`. +     */ +    class OriginalSource { +        constructor(source, content) { +            this.source = source; +            this.content = content; +        } +        /** +         * Tracing a `SourceMapSegment` ends when we get to an `OriginalSource`, +         * meaning this line/column location originated from this source file. +         */ +        originalPositionFor(line, column, name) { +            return { column, line, name, source: this.source, content: this.content }; +        } +    } + +    /** +     * Puts `key` into the backing array, if it is not already present. Returns +     * the index of the `key` in the backing array. +     */ +    let put; +    /** +     * FastStringArray acts like a `Set` (allowing only one occurrence of a string +     * `key`), but provides the index of the `key` in the backing array. +     * +     * This is designed to allow synchronizing a second array with the contents of +     * the backing array, like how `sourcesContent[i]` is the source content +     * associated with `source[i]`, and there are never duplicates. +     */ +    class FastStringArray { +        constructor() { +            this.indexes = Object.create(null); +            this.array = []; +        } +    } +    (() => { +        put = (strarr, key) => { +            const { array, indexes } = strarr; +            // The key may or may not be present. If it is present, it's a number. +            let index = indexes[key]; +            // If it's not yet present, we need to insert it and track the index in the +            // indexes. +            if (index === undefined) { +                index = indexes[key] = array.length; +                array.push(key); +            } +            return index; +        }; +    })(); + +    const INVALID_MAPPING = undefined; +    const SOURCELESS_MAPPING = null; +    /** +     * traceMappings is only called on the root level SourceMapTree, and begins the process of +     * resolving each mapping in terms of the original source files. +     */ +    let traceMappings; +    /** +     * SourceMapTree represents a single sourcemap, with the ability to trace +     * mappings into its child nodes (which may themselves be SourceMapTrees). +     */ +    class SourceMapTree { +        constructor(map, sources) { +            this.map = map; +            this.sources = sources; +        } +        /** +         * originalPositionFor is only called on children SourceMapTrees. It recurses down +         * into its own child SourceMapTrees, until we find the original source map. +         */ +        originalPositionFor(line, column, name) { +            const segment = traceMapping.traceSegment(this.map, line, column); +            // If we couldn't find a segment, then this doesn't exist in the sourcemap. +            if (segment == null) +                return INVALID_MAPPING; +            // 1-length segments only move the current generated column, there's no source information +            // to gather from it. +            if (segment.length === 1) +                return SOURCELESS_MAPPING; +            const source = this.sources[segment[1]]; +            return source.originalPositionFor(segment[2], segment[3], segment.length === 5 ? this.map.names[segment[4]] : name); +        } +    } +    (() => { +        traceMappings = (tree) => { +            const mappings = []; +            const names = new FastStringArray(); +            const sources = new FastStringArray(); +            const sourcesContent = []; +            const { sources: rootSources, map } = tree; +            const rootNames = map.names; +            const rootMappings = traceMapping.decodedMappings(map); +            let lastLineWithSegment = -1; +            for (let i = 0; i < rootMappings.length; i++) { +                const segments = rootMappings[i]; +                const tracedSegments = []; +                let lastSourcesIndex = -1; +                let lastSourceLine = -1; +                let lastSourceColumn = -1; +                for (let j = 0; j < segments.length; j++) { +                    const segment = segments[j]; +                    let traced = SOURCELESS_MAPPING; +                    // 1-length segments only move the current generated column, there's no source information +                    // to gather from it. +                    if (segment.length !== 1) { +                        const source = rootSources[segment[1]]; +                        traced = source.originalPositionFor(segment[2], segment[3], segment.length === 5 ? rootNames[segment[4]] : ''); +                        // If the trace is invalid, then the trace ran into a sourcemap that doesn't contain a +                        // respective segment into an original source. +                        if (traced === INVALID_MAPPING) +                            continue; +                    } +                    const genCol = segment[0]; +                    if (traced === SOURCELESS_MAPPING) { +                        if (lastSourcesIndex === -1) { +                            // This is a consecutive source-less segment, which doesn't carry any new information. +                            continue; +                        } +                        lastSourcesIndex = lastSourceLine = lastSourceColumn = -1; +                        tracedSegments.push([genCol]); +                        continue; +                    } +                    // So we traced a segment down into its original source file. Now push a +                    // new segment pointing to this location. +                    const { column, line, name, content, source } = traced; +                    // Store the source location, and ensure we keep sourcesContent up to +                    // date with the sources array. +                    const sourcesIndex = put(sources, source); +                    sourcesContent[sourcesIndex] = content; +                    if (lastSourcesIndex === sourcesIndex && +                        lastSourceLine === line && +                        lastSourceColumn === column) { +                        // This is a duplicate mapping pointing at the exact same starting point in the source +                        // file. It doesn't carry any new information, and only bloats the sourcemap. +                        continue; +                    } +                    lastLineWithSegment = i; +                    lastSourcesIndex = sourcesIndex; +                    lastSourceLine = line; +                    lastSourceColumn = column; +                    // This looks like unnecessary duplication, but it noticeably increases performance. If we +                    // were to push the nameIndex onto length-4 array, v8 would internally allocate 22 slots! +                    // That's 68 wasted bytes! Array literals have the same capacity as their length, saving +                    // memory. +                    tracedSegments.push(name +                        ? [genCol, sourcesIndex, line, column, put(names, name)] +                        : [genCol, sourcesIndex, line, column]); +                } +                mappings.push(tracedSegments); +            } +            if (mappings.length > lastLineWithSegment + 1) { +                mappings.length = lastLineWithSegment + 1; +            } +            return traceMapping.presortedDecodedMap(Object.assign({}, tree.map, { +                mappings, +                // TODO: Make all sources relative to the sourceRoot. +                sourceRoot: undefined, +                names: names.array, +                sources: sources.array, +                sourcesContent, +            })); +        }; +    })(); + +    function asArray(value) { +        if (Array.isArray(value)) +            return value; +        return [value]; +    } +    /** +     * Recursively builds a tree structure out of sourcemap files, with each node +     * being either an `OriginalSource` "leaf" or a `SourceMapTree` composed of +     * `OriginalSource`s and `SourceMapTree`s. +     * +     * Every sourcemap is composed of a collection of source files and mappings +     * into locations of those source files. When we generate a `SourceMapTree` for +     * the sourcemap, we attempt to load each source file's own sourcemap. If it +     * does not have an associated sourcemap, it is considered an original, +     * unmodified source file. +     */ +    function buildSourceMapTree(input, loader) { +        const maps = asArray(input).map((m) => new traceMapping.TraceMap(m, '')); +        const map = maps.pop(); +        for (let i = 0; i < maps.length; i++) { +            if (maps[i].sources.length > 1) { +                throw new Error(`Transformation map ${i} must have exactly one source file.\n` + +                    'Did you specify these with the most recent transformation maps first?'); +            } +        } +        let tree = build(map, loader, '', 0); +        for (let i = maps.length - 1; i >= 0; i--) { +            tree = new SourceMapTree(maps[i], [tree]); +        } +        return tree; +    } +    function build(map, loader, importer, importerDepth) { +        const { resolvedSources, sourcesContent } = map; +        const depth = importerDepth + 1; +        const children = resolvedSources.map((sourceFile, i) => { +            // The loading context gives the loader more information about why this file is being loaded +            // (eg, from which importer). It also allows the loader to override the location of the loaded +            // sourcemap/original source, or to override the content in the sourcesContent field if it's +            // an unmodified source file. +            const ctx = { +                importer, +                depth, +                source: sourceFile || '', +                content: undefined, +            }; +            // Use the provided loader callback to retrieve the file's sourcemap. +            // TODO: We should eventually support async loading of sourcemap files. +            const sourceMap = loader(ctx.source, ctx); +            const { source, content } = ctx; +            // If there is no sourcemap, then it is an unmodified source file. +            if (!sourceMap) { +                // The contents of this unmodified source file can be overridden via the loader context, +                // allowing it to be explicitly null or a string. If it remains undefined, we fall back to +                // the importing sourcemap's `sourcesContent` field. +                const sourceContent = content !== undefined ? content : sourcesContent ? sourcesContent[i] : null; +                return new OriginalSource(source, sourceContent); +            } +            // Else, it's a real sourcemap, and we need to recurse into it to load its +            // source files. +            return build(new traceMapping.TraceMap(sourceMap, source), loader, source, depth); +        }); +        return new SourceMapTree(map, children); +    } + +    /** +     * A SourceMap v3 compatible sourcemap, which only includes fields that were +     * provided to it. +     */ +    class SourceMap { +        constructor(map, options) { +            this.version = 3; // SourceMap spec says this should be first. +            this.file = map.file; +            this.mappings = options.decodedMappings ? traceMapping.decodedMappings(map) : traceMapping.encodedMappings(map); +            this.names = map.names; +            this.sourceRoot = map.sourceRoot; +            this.sources = map.sources; +            if (!options.excludeContent && 'sourcesContent' in map) { +                this.sourcesContent = map.sourcesContent; +            } +        } +        toString() { +            return JSON.stringify(this); +        } +    } + +    /** +     * Traces through all the mappings in the root sourcemap, through the sources +     * (and their sourcemaps), all the way back to the original source location. +     * +     * `loader` will be called every time we encounter a source file. If it returns +     * a sourcemap, we will recurse into that sourcemap to continue the trace. If +     * it returns a falsey value, that source file is treated as an original, +     * unmodified source file. +     * +     * Pass `excludeContent` to exclude any self-containing source file content +     * from the output sourcemap. +     * +     * Pass `decodedMappings` to receive a SourceMap with decoded (instead of +     * VLQ encoded) mappings. +     */ +    function remapping(input, loader, options) { +        const opts = typeof options === 'object' ? options : { excludeContent: !!options, decodedMappings: false }; +        const tree = buildSourceMapTree(input, loader); +        return new SourceMap(traceMappings(tree), opts); +    } + +    return remapping; + +})); +//# sourceMappingURL=remapping.umd.js.map diff --git a/node_modules/@ampproject/remapping/dist/remapping.umd.js.map b/node_modules/@ampproject/remapping/dist/remapping.umd.js.map new file mode 100644 index 0000000..4002d2c --- /dev/null +++ b/node_modules/@ampproject/remapping/dist/remapping.umd.js.map @@ -0,0 +1 @@ +{"version":3,"file":"remapping.umd.js","sources":["../../src/original-source.ts","../../src/fast-string-array.ts","../../src/source-map-tree.ts","../../src/build-source-map-tree.ts","../../src/source-map.ts","../../src/remapping.ts"],"sourcesContent":[null,null,null,null,null,null],"names":["traceSegment","decodedMappings","presortedDecodedMap","TraceMap","encodedMappings"],"mappings":";;;;;;IAEA;;;;UAIqB,cAAc;QAIjC,YAAY,MAAc,EAAE,OAAsB;YAChD,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;YACrB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;SACxB;;;;;QAMD,mBAAmB,CAAC,IAAY,EAAE,MAAc,EAAE,IAAY;YAC5D,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC;SAC3E;;;ICrBH;;;;IAIO,IAAI,GAAqD,CAAC;IAEjE;;;;;;;;UAQa,eAAe;QAA5B;YACE,YAAO,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAA8B,CAAC;YAC3D,UAAK,GAAG,EAA2B,CAAC;SAkBrC;KAAA;IAhBC;QACE,GAAG,GAAG,CAAC,MAAM,EAAE,GAAG;YAChB,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,MAAM,CAAC;;YAElC,IAAI,KAAK,GAAG,OAAO,CAAC,GAAG,CAAuB,CAAC;;;YAI/C,IAAI,KAAK,KAAK,SAAS,EAAE;gBACvB,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC;gBACnC,KAAkB,CAAC,IAAI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AI,CAAC,OAAO,CAAC,cAAc,IAAI,gBAAgB,IAAI,GAAG,EAAE;gBACtD,IAAI,CAAC,cAAc,GAAG,GAAG,CAAC,cAAc,CAAC;aAC1C;SACF;QAED,QAAQ;YACN,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;SAC7B;;;ICnBH;;;;;;;;;;;;;;;aAewB,SAAS,CAC/B,KAAwC,EACxC,MAAuB,EACvB,OAA2B;QAE3B,MAAM,IAAI,GACR,OAAO,OAAO,KAAK,QAAQ,GAAG,OAAO,GAAG,EAAE,cAAc,EAAE,CAAC,CAAC,OAAO,EAAE,eAAe,EAAE,KAAK,EAAE,CAAC;QAChG,MAAM,IAAI,GAAG,kBAAkB,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;QAC/C,OAAO,IAAI,SAAS,CAAC,aAAa,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,CAAC;IAClD;;;;;;;;"}
\ No newline at end of file diff --git a/node_modules/@ampproject/remapping/dist/types/build-source-map-tree.d.ts b/node_modules/@ampproject/remapping/dist/types/build-source-map-tree.d.ts new file mode 100644 index 0000000..d276667 --- /dev/null +++ b/node_modules/@ampproject/remapping/dist/types/build-source-map-tree.d.ts @@ -0,0 +1,14 @@ +import { SourceMapTree } from './source-map-tree'; +import type { SourceMapInput, SourceMapLoader } from './types'; +/** + * Recursively builds a tree structure out of sourcemap files, with each node + * being either an `OriginalSource` "leaf" or a `SourceMapTree` composed of + * `OriginalSource`s and `SourceMapTree`s. + * + * Every sourcemap is composed of a collection of source files and mappings + * into locations of those source files. When we generate a `SourceMapTree` for + * the sourcemap, we attempt to load each source file's own sourcemap. If it + * does not have an associated sourcemap, it is considered an original, + * unmodified source file. + */ +export default function buildSourceMapTree(input: SourceMapInput | SourceMapInput[], loader: SourceMapLoader): SourceMapTree; diff --git a/node_modules/@ampproject/remapping/dist/types/fast-string-array.d.ts b/node_modules/@ampproject/remapping/dist/types/fast-string-array.d.ts new file mode 100644 index 0000000..760973a --- /dev/null +++ b/node_modules/@ampproject/remapping/dist/types/fast-string-array.d.ts @@ -0,0 +1,19 @@ +/** + * Puts `key` into the backing array, if it is not already present. Returns + * the index of the `key` in the backing array. + */ +export declare let put: (strarr: FastStringArray, key: string) => number; +/** + * FastStringArray acts like a `Set` (allowing only one occurrence of a string + * `key`), but provides the index of the `key` in the backing array. + * + * This is designed to allow synchronizing a second array with the contents of + * the backing array, like how `sourcesContent[i]` is the source content + * associated with `source[i]`, and there are never duplicates. + */ +export declare class FastStringArray { +    indexes: { +        [key: string]: number; +    }; +    array: readonly string[]; +} diff --git a/node_modules/@ampproject/remapping/dist/types/original-source.d.ts b/node_modules/@ampproject/remapping/dist/types/original-source.d.ts new file mode 100644 index 0000000..ce8f924 --- /dev/null +++ b/node_modules/@ampproject/remapping/dist/types/original-source.d.ts @@ -0,0 +1,15 @@ +import type { SourceMapSegmentObject } from './types'; +/** + * A "leaf" node in the sourcemap tree, representing an original, unmodified + * source file. Recursive segment tracing ends at the `OriginalSource`. + */ +export default class OriginalSource { +    content: string | null; +    source: string; +    constructor(source: string, content: string | null); +    /** +     * Tracing a `SourceMapSegment` ends when we get to an `OriginalSource`, +     * meaning this line/column location originated from this source file. +     */ +    originalPositionFor(line: number, column: number, name: string): SourceMapSegmentObject; +} diff --git a/node_modules/@ampproject/remapping/dist/types/remapping.d.ts b/node_modules/@ampproject/remapping/dist/types/remapping.d.ts new file mode 100644 index 0000000..53a56df --- /dev/null +++ b/node_modules/@ampproject/remapping/dist/types/remapping.d.ts @@ -0,0 +1,19 @@ +import SourceMap from './source-map'; +import type { SourceMapInput, SourceMapLoader, Options } from './types'; +export type { SourceMapSegment, RawSourceMap, DecodedSourceMap, SourceMapInput, SourceMapLoader, LoaderContext, Options, } from './types'; +/** + * Traces through all the mappings in the root sourcemap, through the sources + * (and their sourcemaps), all the way back to the original source location. + * + * `loader` will be called every time we encounter a source file. If it returns + * a sourcemap, we will recurse into that sourcemap to continue the trace. If + * it returns a falsey value, that source file is treated as an original, + * unmodified source file. + * + * Pass `excludeContent` to exclude any self-containing source file content + * from the output sourcemap. + * + * Pass `decodedMappings` to receive a SourceMap with decoded (instead of + * VLQ encoded) mappings. + */ +export default function remapping(input: SourceMapInput | SourceMapInput[], loader: SourceMapLoader, options?: boolean | Options): SourceMap; diff --git a/node_modules/@ampproject/remapping/dist/types/source-map-tree.d.ts b/node_modules/@ampproject/remapping/dist/types/source-map-tree.d.ts new file mode 100644 index 0000000..41e0210 --- /dev/null +++ b/node_modules/@ampproject/remapping/dist/types/source-map-tree.d.ts @@ -0,0 +1,27 @@ +import type { TraceMap } from '@jridgewell/trace-mapping'; +import type OriginalSource from './original-source'; +import type { SourceMapSegmentObject } from './types'; +declare type Sources = OriginalSource | SourceMapTree; +declare const INVALID_MAPPING: undefined; +declare const SOURCELESS_MAPPING: null; +declare type MappingSource = SourceMapSegmentObject | typeof INVALID_MAPPING | typeof SOURCELESS_MAPPING; +/** + * traceMappings is only called on the root level SourceMapTree, and begins the process of + * resolving each mapping in terms of the original source files. + */ +export declare let traceMappings: (tree: SourceMapTree) => TraceMap; +/** + * SourceMapTree represents a single sourcemap, with the ability to trace + * mappings into its child nodes (which may themselves be SourceMapTrees). + */ +export declare class SourceMapTree { +    map: TraceMap; +    sources: Sources[]; +    constructor(map: TraceMap, sources: Sources[]); +    /** +     * originalPositionFor is only called on children SourceMapTrees. It recurses down +     * into its own child SourceMapTrees, until we find the original source map. +     */ +    originalPositionFor(line: number, column: number, name: string): MappingSource; +} +export {}; diff --git a/node_modules/@ampproject/remapping/dist/types/source-map.d.ts b/node_modules/@ampproject/remapping/dist/types/source-map.d.ts new file mode 100644 index 0000000..c692dc9 --- /dev/null +++ b/node_modules/@ampproject/remapping/dist/types/source-map.d.ts @@ -0,0 +1,17 @@ +import type { TraceMap } from '@jridgewell/trace-mapping'; +import type { DecodedSourceMap, RawSourceMap, Options } from './types'; +/** + * A SourceMap v3 compatible sourcemap, which only includes fields that were + * provided to it. + */ +export default class SourceMap { +    file?: string | null; +    mappings: RawSourceMap['mappings'] | DecodedSourceMap['mappings']; +    sourceRoot?: string; +    names: string[]; +    sources: (string | null)[]; +    sourcesContent?: (string | null)[]; +    version: 3; +    constructor(map: TraceMap, options: Options); +    toString(): string; +} diff --git a/node_modules/@ampproject/remapping/dist/types/types.d.ts b/node_modules/@ampproject/remapping/dist/types/types.d.ts new file mode 100644 index 0000000..fbda0b3 --- /dev/null +++ b/node_modules/@ampproject/remapping/dist/types/types.d.ts @@ -0,0 +1,40 @@ +interface SourceMapV3 { +    file?: string | null; +    names: string[]; +    sourceRoot?: string; +    sources: (string | null)[]; +    sourcesContent?: (string | null)[]; +    version: 3; +} +declare type Column = number; +declare type SourcesIndex = number; +declare type SourceLine = number; +declare type SourceColumn = number; +declare type NamesIndex = number; +export declare type SourceMapSegment = [Column] | [Column, SourcesIndex, SourceLine, SourceColumn] | [Column, SourcesIndex, SourceLine, SourceColumn, NamesIndex]; +export interface RawSourceMap extends SourceMapV3 { +    mappings: string; +} +export interface DecodedSourceMap extends SourceMapV3 { +    mappings: SourceMapSegment[][]; +} +export interface SourceMapSegmentObject { +    column: number; +    line: number; +    name: string; +    source: string; +    content: string | null; +} +export declare type SourceMapInput = string | RawSourceMap | DecodedSourceMap; +export declare type LoaderContext = { +    readonly importer: string; +    readonly depth: number; +    source: string; +    content: string | null | undefined; +}; +export declare type SourceMapLoader = (file: string, ctx: LoaderContext) => SourceMapInput | null | undefined; +export declare type Options = { +    excludeContent?: boolean; +    decodedMappings?: boolean; +}; +export {}; diff --git a/node_modules/@ampproject/remapping/package.json b/node_modules/@ampproject/remapping/package.json new file mode 100644 index 0000000..0914a04 --- /dev/null +++ b/node_modules/@ampproject/remapping/package.json @@ -0,0 +1,62 @@ +{ +  "name": "@ampproject/remapping", +  "version": "2.1.2", +  "description": "Remap sequential sourcemaps through transformations to point at the original source code", +  "keywords": [ +    "source", +    "map", +    "remap" +  ], +  "main": "dist/remapping.umd.js", +  "module": "dist/remapping.mjs", +  "typings": "dist/types/remapping.d.ts", +  "files": [ +    "dist" +  ], +  "author": "Justin Ridgewell <jridgewell@google.com>", +  "repository": { +    "type": "git", +    "url": "git+https://github.com/ampproject/remapping.git" +  }, +  "license": "Apache-2.0", +  "engines": { +    "node": ">=6.0.0" +  }, +  "scripts": { +    "build": "run-s -n build:*", +    "build:rollup": "rollup -c rollup.config.js", +    "build:ts": "tsc --project tsconfig.build.json", +    "lint": "run-s -n lint:*", +    "lint:prettier": "npm run test:lint:prettier -- --write", +    "lint:ts": "npm run test:lint:ts -- --fix", +    "prebuild": "rm -rf dist", +    "prepublishOnly": "npm run preversion", +    "preversion": "run-s test build", +    "test": "run-s -n test:lint test:only", +    "test:debug": "node --inspect-brk node_modules/.bin/jest --runInBand", +    "test:lint": "run-s -n test:lint:*", +    "test:lint:prettier": "prettier --check '{src,test}/**/*.ts'", +    "test:lint:ts": "eslint '{src,test}/**/*.ts'", +    "test:only": "jest --coverage", +    "test:watch": "jest --coverage --watch" +  }, +  "devDependencies": { +    "@rollup/plugin-typescript": "8.3.0", +    "@types/jest": "27.4.0", +    "@typescript-eslint/eslint-plugin": "5.10.2", +    "@typescript-eslint/parser": "5.10.2", +    "eslint": "8.8.0", +    "eslint-config-prettier": "8.3.0", +    "jest": "27.4.7", +    "jest-config": "27.4.7", +    "npm-run-all": "4.1.5", +    "prettier": "2.5.1", +    "rollup": "2.67.0", +    "ts-jest": "27.1.3", +    "tslib": "2.3.1", +    "typescript": "4.5.5" +  }, +  "dependencies": { +    "@jridgewell/trace-mapping": "^0.3.0" +  } +}  | 
