sonda 0.6.0 → 0.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/README.md +6 -203
- package/dist/index.cjs +2 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.html +4 -4
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/package.json +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.6.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- ff135df: Add `mjs` and `cjs` as accepted asset extensions
|
|
8
|
+
|
|
9
|
+
## 0.6.1
|
|
10
|
+
|
|
11
|
+
Sonda has a new home. You can now visit [https://sonda.dev](https://sonda.dev) for installation and usage instructions, or try it out at [https://sonda.dev/demo](https://sonda.dev/demo).
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- d6e2d76: Add links to Sonda documentation
|
|
16
|
+
|
|
3
17
|
## 0.6.0
|
|
4
18
|
|
|
5
19
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Sonda is a universal visualizer and analyzer for JavaScript and CSS bundles. It analyzes the source maps and shows the size of each module after tree-shaking and minification to get the most accurate report.
|
|
4
4
|
|
|
5
|
-
Sonda works with the following bundlers:
|
|
5
|
+
Sonda is more accurate and detailed than some alternatives and works with the following bundlers:
|
|
6
6
|
|
|
7
7
|
* Vite
|
|
8
8
|
* Rollup
|
|
@@ -10,211 +10,14 @@ Sonda works with the following bundlers:
|
|
|
10
10
|
* webpack
|
|
11
11
|
* Rspack
|
|
12
12
|
|
|
13
|
-

|
|
14
|
-
|
|
15
13
|
## Installation
|
|
16
14
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
```bash
|
|
20
|
-
npm install sonda --save-dev
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
Then register the bundler-specific plugin and enable the source maps. **Remember to use Sonda in development mode only**.
|
|
24
|
-
|
|
25
|
-
<details>
|
|
26
|
-
<summary>Vite</summary>
|
|
27
|
-
|
|
28
|
-
```javascript
|
|
29
|
-
// vite.config.js
|
|
30
|
-
|
|
31
|
-
import { defineConfig } from 'vite';
|
|
32
|
-
import { SondaRollupPlugin } from 'sonda';
|
|
33
|
-
|
|
34
|
-
export default defineConfig( {
|
|
35
|
-
plugins: [
|
|
36
|
-
SondaRollupPlugin(),
|
|
37
|
-
],
|
|
38
|
-
build: {
|
|
39
|
-
sourcemap: true
|
|
40
|
-
}
|
|
41
|
-
} );
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
</details>
|
|
45
|
-
|
|
46
|
-
<details>
|
|
47
|
-
<summary>Rollup</summary>
|
|
48
|
-
|
|
49
|
-
```javascript
|
|
50
|
-
// rollup.config.js
|
|
51
|
-
|
|
52
|
-
import { defineConfig } from 'rollup';
|
|
53
|
-
import { SondaRollupPlugin } from 'sonda';
|
|
54
|
-
|
|
55
|
-
export default defineConfig( {
|
|
56
|
-
output: {
|
|
57
|
-
// Other options are skipped for brevity
|
|
58
|
-
sourcemap: true,
|
|
59
|
-
},
|
|
60
|
-
plugins: [
|
|
61
|
-
SondaRollupPlugin(),
|
|
62
|
-
]
|
|
63
|
-
} );
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
Some Rollup plugins may not support source maps by default. Check their documentation to enable them. Examples for `@rollup/plugin-commonjs` and `rollup-plugin-styles` are shown below.
|
|
67
|
-
|
|
68
|
-
```javascript
|
|
69
|
-
commonjs( {
|
|
70
|
-
sourceMap: true,
|
|
71
|
-
} ),
|
|
72
|
-
styles( {
|
|
73
|
-
mode: 'extract',
|
|
74
|
-
sourceMap: true,
|
|
75
|
-
} )
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
</details>
|
|
79
|
-
|
|
80
|
-
<details>
|
|
81
|
-
<summary>esbuild</summary>
|
|
82
|
-
|
|
83
|
-
```javascript
|
|
84
|
-
import { build } from 'esbuild';
|
|
85
|
-
import { SondaEsbuildPlugin } from 'sonda';
|
|
86
|
-
|
|
87
|
-
build( {
|
|
88
|
-
sourcemap: true,
|
|
89
|
-
plugins: [
|
|
90
|
-
SondaEsbuildPlugin()
|
|
91
|
-
]
|
|
92
|
-
} );
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
Unlike for other bundlers, the esbuild plugin relies not only on source maps but also on the metafile. The plugin should automatically enable the metafile option for you, but if you get the error, be sure to enable it manually (`metafile: true`).
|
|
96
|
-
|
|
97
|
-
</details>
|
|
98
|
-
|
|
99
|
-
<details>
|
|
100
|
-
<summary>webpack</summary>
|
|
101
|
-
|
|
102
|
-
```javascript
|
|
103
|
-
// webpack.config.js
|
|
104
|
-
|
|
105
|
-
const { SondaWebpackPlugin } = require( 'sonda' );
|
|
106
|
-
|
|
107
|
-
module.exports = {
|
|
108
|
-
devtool: 'source-map',
|
|
109
|
-
plugins: [
|
|
110
|
-
new SondaWebpackPlugin(),
|
|
111
|
-
],
|
|
112
|
-
};
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
Internally, Sonda changes the default webpack configuration to output absolute paths in the source maps instead of using the `webpack://` protocol (`devtoolModuleFilenameTemplate: '[absolute-resource-path]'`).
|
|
116
|
-
|
|
117
|
-
</details>
|
|
118
|
-
|
|
119
|
-
<details>
|
|
120
|
-
<summary>Rspack</summary>
|
|
121
|
-
|
|
122
|
-
```javascript
|
|
123
|
-
// rspack.config.js
|
|
124
|
-
|
|
125
|
-
import { SondaWebpackPlugin } from 'sonda';
|
|
126
|
-
|
|
127
|
-
export default {
|
|
128
|
-
devtool: 'source-map',
|
|
129
|
-
plugins: [
|
|
130
|
-
new SondaWebpackPlugin(),
|
|
131
|
-
],
|
|
132
|
-
};
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
Internally, Sonda changes the default Rspack configuration to output absolute paths in the source maps instead of using the `webpack://` protocol (`devtoolModuleFilenameTemplate: '[absolute-resource-path]'`).
|
|
136
|
-
|
|
137
|
-
</details>
|
|
138
|
-
|
|
139
|
-
## Options
|
|
140
|
-
|
|
141
|
-
Each plugin accepts an optional configuration object with the following options. Example:
|
|
142
|
-
|
|
143
|
-
```javascript
|
|
144
|
-
SondaRollupPlugin( {
|
|
145
|
-
format: 'html',
|
|
146
|
-
filename: 'sonda-report.html',
|
|
147
|
-
open: true,
|
|
148
|
-
detailed: true,
|
|
149
|
-
gzip: true,
|
|
150
|
-
brotli: true,
|
|
151
|
-
} )
|
|
152
|
-
```
|
|
153
|
-
|
|
154
|
-
### `format`
|
|
155
|
-
|
|
156
|
-
* **Type:** `string`
|
|
157
|
-
* **Default:** `'html'`
|
|
158
|
-
|
|
159
|
-
Determines the output format of the report. The following formats are supported:
|
|
160
|
-
|
|
161
|
-
* `'html'` - HTML file with treemap
|
|
162
|
-
* `'json'` - JSON file
|
|
163
|
-
|
|
164
|
-
### `filename`
|
|
165
|
-
|
|
166
|
-
* **Type:** `string`
|
|
167
|
-
* **Default:** `'sonda-report.html'` or `'sonda-report.json'` depending on the `format` option
|
|
168
|
-
|
|
169
|
-
Determines the path of the generated report. The values can be either a filename, a relative path, or an absolute path.
|
|
170
|
-
|
|
171
|
-
By default, the report is saved in the current working directory.
|
|
172
|
-
|
|
173
|
-
### `open`
|
|
174
|
-
|
|
175
|
-
* **Type:** `boolean`
|
|
176
|
-
* **Default:** `true`
|
|
177
|
-
|
|
178
|
-
Determines whether to open the report in the default program for given file extension (`.html` or `.json` depending on the `format` option) after the build.
|
|
179
|
-
|
|
180
|
-
### `detailed`
|
|
181
|
-
|
|
182
|
-
* **Type:** `boolean`
|
|
183
|
-
* **Default:** `false`
|
|
184
|
-
|
|
185
|
-
Determines whether to read the source maps of imported modules.
|
|
186
|
-
|
|
187
|
-
By default, external dependencies that are bundled into a single file appear as a single asset in the report. When this option is enabled, the report will instead include the source files of the imported modules, if they have source maps.
|
|
188
|
-
|
|
189
|
-
Enabling this option will increase the time needed to generate the report and reduce the accuracy of estimated GZIP and Brotli sizes for individual files.
|
|
190
|
-
|
|
191
|
-
### `sources`
|
|
192
|
-
|
|
193
|
-
* **Type:** `boolean`
|
|
194
|
-
* **Default:** `false`
|
|
195
|
-
|
|
196
|
-
Determines whether to include the source maps of the assets in the report to visualize which parts of the code contribute to the final bundle size.
|
|
197
|
-
|
|
198
|
-
⚠️ Enabling this option will significantly increase the report size and include it in the **source code** of the assets. If you work with proprietary code, be cautious when sharing the report. ⚠️
|
|
199
|
-
|
|
200
|
-
### `gzip`
|
|
201
|
-
|
|
202
|
-
* **Type:** `boolean`
|
|
203
|
-
* **Default:** `false`
|
|
204
|
-
|
|
205
|
-
Determines whether to calculate the sizes of assets after compression with GZIP.
|
|
206
|
-
|
|
207
|
-
The report will include estimated compressed sizes for each file within an asset. However, unlike the compressed size of the entire asset, these individual file estimates are approximate and should be used as a general reference.
|
|
208
|
-
|
|
209
|
-
Enabling this option will increase the time needed to generate the report.
|
|
210
|
-
|
|
211
|
-
### `brotli`
|
|
15
|
+
For installation and usage instructions, visit [https://sonda.dev](https://sonda.dev).
|
|
212
16
|
|
|
213
|
-
|
|
214
|
-
* **Default:** `false`
|
|
17
|
+
## Demo
|
|
215
18
|
|
|
216
|
-
|
|
19
|
+
You can try Sonda at [https://sonda.dev/demo](https://sonda.dev/demo).
|
|
217
20
|
|
|
218
|
-
|
|
21
|
+
## Screenshot
|
|
219
22
|
|
|
220
|
-
|
|
23
|
+

|
package/dist/index.cjs
CHANGED
|
@@ -284,6 +284,8 @@ function getContributions(sources) {
|
|
|
284
284
|
function generateJsonReport(assets, inputs, options) {
|
|
285
285
|
const acceptedExtensions = [
|
|
286
286
|
'.js',
|
|
287
|
+
'.mjs',
|
|
288
|
+
'.cjs',
|
|
287
289
|
'.css'
|
|
288
290
|
];
|
|
289
291
|
const outputs = assets.filter((asset)=>acceptedExtensions.includes(path.extname(asset))).reduce((carry, asset)=>{
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../load-source-map/dist/index.js","../src/utils.ts","../src/sourcemap/map.ts","../src/sourcemap/bytes.ts","../src/report.ts","../src/report/generate.ts","../src/bundlers/esbuild.ts","../src/bundlers/rollup.ts","../src/bundlers/webpack.ts"],"sourcesContent":["import { existsSync, readFileSync } from 'fs';\nimport { join, dirname, isAbsolute, resolve } from 'path';\n\n/**\n * Strip any JSON XSSI avoidance prefix from the string (as documented in the source maps specification),\n * and parses the string as JSON.\n *\n * https://github.com/mozilla/source-map/blob/3cb92cc3b73bfab27c146bae4ef2bc09dbb4e5ed/lib/util.js#L162-L164\n */ function parseSourceMapInput(str) {\n return JSON.parse(str.replace(/^\\)]}'[^\\n]*\\n/, \"\"));\n}\n/**\n\tsourceMappingURL=data:application/json;charset=utf-8;base64,data\n\tsourceMappingURL=data:application/json;base64,data\n\tsourceMappingURL=data:application/json;uri,data\n\tsourceMappingURL=map-file-comment.css.map\n\tsourceMappingURL=map-file-comment.css.map?query=value\n*/ const sourceMappingRegExp = /[@#]\\s*sourceMappingURL=(\\S+)\\b/g;\nfunction loadCodeAndMap(codePath) {\n if (!existsSync(codePath)) {\n return null;\n }\n const code = readFileSync(codePath, 'utf-8');\n const extractedComment = code.includes('sourceMappingURL') && Array.from(code.matchAll(sourceMappingRegExp)).at(-1);\n if (!extractedComment || !extractedComment.length) {\n return {\n code\n };\n }\n const maybeMap = loadMap(codePath, extractedComment[1]);\n if (!maybeMap) {\n return {\n code\n };\n }\n const { map, mapPath } = maybeMap;\n map.sources = normalizeSourcesPaths(map, mapPath);\n map.sourcesContent = loadMissingSourcesContent(map);\n delete map.sourceRoot;\n return {\n code,\n map\n };\n}\nfunction loadMap(codePath, sourceMappingURL) {\n if (sourceMappingURL.startsWith('data:')) {\n const map = parseDataUrl(sourceMappingURL);\n return {\n map: parseSourceMapInput(map),\n mapPath: codePath\n };\n }\n const sourceMapFilename = new URL(sourceMappingURL, 'file://').pathname;\n const mapPath = join(dirname(codePath), sourceMapFilename);\n if (!existsSync(mapPath)) {\n return null;\n }\n return {\n map: parseSourceMapInput(readFileSync(mapPath, 'utf-8')),\n mapPath\n };\n}\nfunction parseDataUrl(url) {\n const [prefix, payload] = url.split(',');\n const encoding = prefix.split(';').at(-1);\n switch(encoding){\n case 'base64':\n return Buffer.from(payload, 'base64').toString();\n case 'uri':\n return decodeURIComponent(payload);\n default:\n throw new Error('Unsupported source map encoding: ' + encoding);\n }\n}\n/**\n * Normalize the paths of the sources in the source map to be absolute paths.\n */ function normalizeSourcesPaths(map, mapPath) {\n const mapDir = dirname(mapPath);\n return map.sources.map((source)=>{\n if (!source) {\n return source;\n }\n return isAbsolute(source) ? source : resolve(mapDir, map.sourceRoot ?? '.', source);\n });\n}\n/**\n * Loop through the sources and try to load missing `sourcesContent` from the file system.\n */ function loadMissingSourcesContent(map) {\n return map.sources.map((source, index)=>{\n if (map.sourcesContent?.[index]) {\n return map.sourcesContent[index];\n }\n if (source && existsSync(source)) {\n return readFileSync(source, 'utf-8');\n }\n return null;\n });\n}\n\nexport { loadCodeAndMap };\n//# sourceMappingURL=index.js.map\n","import { join, relative, win32, posix, extname, isAbsolute, format, parse } from 'path';\nimport type { Options } from './types';\n\nexport const esmRegex: RegExp = /\\.m[tj]sx?$/;\nexport const cjsRegex: RegExp = /\\.c[tj]sx?$/;\nexport const jsRegexp: RegExp = /\\.[cm]?[tj]s[x]?$/;\n\nexport function normalizeOptions( options?: Partial<Options> ): Options {\n\tconst format = options?.format\n\t\t|| options?.filename?.split( '.' ).at( -1 ) as Options['format']\n\t\t|| 'html';\n\n\tconst defaultOptions: Options = {\n\t\tformat,\n\t\tfilename: 'sonda-report.' + format,\n\t\topen: true,\n\t\tdetailed: false,\n\t\tsources: false,\n\t\tgzip: false,\n\t\tbrotli: false,\n\t};\n\n\t// Merge user options with the defaults\n\tconst normalizedOptions = Object.assign( {}, defaultOptions, options ) satisfies Options;\n\n\tnormalizedOptions.filename = normalizeOutputPath( normalizedOptions );\n\n\treturn normalizedOptions;\n}\n\nexport function normalizePath( pathToNormalize: string ): string {\n\t// Unicode escape sequences used by Rollup and Vite to identify virtual modules\n\tconst normalized = pathToNormalize.replace( /^\\0/, '' )\n\n\t// Transform absolute paths to relative paths\n\tconst relativized = relative( process.cwd(), normalized );\n\n\t// Ensure paths are POSIX-compliant - https://stackoverflow.com/a/63251716/4617687\n\treturn relativized.replaceAll( win32.sep, posix.sep );\n}\n\nfunction normalizeOutputPath( options: Options ): string {\n\tlet path = options.filename;\n\tconst expectedExtension = '.' + options.format;\n\n\t// Ensure the filename is an absolute path\n\tif ( !isAbsolute( path ) ) {\n\t\tpath = join( process.cwd(), path );\n\t}\n\n\t// Ensure that the `filename` extension matches the `format` option\n\tif ( expectedExtension !== extname( path ) ) {\n\t\tconsole.warn(\n\t\t\t'\\x1b[0;33m' + // Make the message yellow\n\t\t\t`Sonda: The file extension specified in the 'filename' does not match the 'format' option. ` +\n\t\t\t`The extension will be changed to '${ expectedExtension }'.`\n\t\t);\n\n\t\tpath = format( { ...parse( path ), base: '', ext: expectedExtension } )\n\t}\n\n\treturn path;\n}\n","import { default as remapping, type DecodedSourceMap, type EncodedSourceMap } from '@ampproject/remapping';\nimport { loadCodeAndMap } from 'load-source-map';\nimport { resolve } from 'path';\nimport { normalizePath } from '../utils';\nimport type { CodeMap, ReportInput } from '../types';\n\nexport function mapSourceMap(\n\tmap: EncodedSourceMap,\n\tdirPath: string,\n\tinputs: Record<string, ReportInput>\n): DecodedSourceMap {\n\tconst alreadyRemapped = new Set<string>();\n\tconst remapped = remapping( map, ( file, ctx ) => {\n\t\tif ( alreadyRemapped.has( file ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\talreadyRemapped.add( file );\n\n\t\tconst codeMap = addSourcesToInputs(\n\t\t\tresolve( dirPath, file ),\n\t\t\tinputs\n\t\t);\n\n\t\tif ( !codeMap ) {\n\t\t\treturn;\n\t\t}\n\n\t\tctx.content ??= codeMap.code;\n\n\t\treturn codeMap.map;\n\t}, { decodedMappings: true } );\n\n\treturn remapped as DecodedSourceMap;\n}\n\n/**\n * Loads the source map of a given file and adds its \"sources\" to the given inputs object.\n */\nexport function addSourcesToInputs(\n\tpath: string,\n\tinputs: Record<string, ReportInput>\n): CodeMap | null {\n\tconst codeMap = loadCodeAndMap( path );\n\n\tif ( !codeMap ) {\n\t\treturn null;\n\t}\n\n\tconst parentPath = normalizePath( path );\n\tconst format = inputs[ parentPath ]?.format ?? 'unknown';\n\n\tcodeMap.map?.sources\n\t\t.filter( source => source !== null )\n\t\t.forEach( ( source, index ) => {\n\t\t\tconst normalizedPath = normalizePath( source );\n\n\t\t\tif ( parentPath === normalizedPath ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tinputs[ normalizedPath ] = {\n\t\t\t\tbytes: Buffer.byteLength( codeMap.map!.sourcesContent?.[ index ] ?? '' ),\n\t\t\t\tformat,\n\t\t\t\timports: [],\n\t\t\t\tbelongsTo: parentPath\n\t\t\t};\n\t\t} );\n\t\n\treturn codeMap;\n}\n","import { gzipSync, brotliCompressSync } from 'zlib';\nimport type { DecodedSourceMap, SourceMapSegment } from '@ampproject/remapping';\nimport type { Options, Sizes } from '../types';\n\nconst UNASSIGNED = '[unassigned]';\n\nexport function getBytesPerSource(\n\tcode: string,\n\tmap: DecodedSourceMap,\n\tassetSizes: Sizes,\n\toptions: Options\n): Map<string, Sizes> {\n\tconst contributions = getContributions( map.sources );\n\n\t// Split the code into lines\n\tconst codeLines = code.split( /(?<=\\r?\\n)/ );\n\n\tfor ( let lineIndex = 0; lineIndex < codeLines.length; lineIndex++ ) {\n\t\tconst lineCode = codeLines[ lineIndex ];\n\t\tconst mappings = map.mappings[ lineIndex ] || [];\n\t\tlet currentColumn = 0;\n\n\t\tfor ( let i = 0; i <= mappings.length; i++ ) {\n\t\t\t// 0: generatedColumn\n\t\t\t// 1: sourceIndex\n\t\t\t// 2: originalLine\n\t\t\t// 3: originalColumn\n\t\t\t// 4: nameIndex\n\n\t\t\tconst mapping: SourceMapSegment | undefined = mappings[ i ];\n\t\t\tconst startColumn = mapping?.[ 0 ] ?? lineCode.length;\n\t\t\tconst endColumn = mappings[ i + 1 ]?.[ 0 ] ?? lineCode.length;\n\n\t\t\t// Slice the code from currentColumn to startColumn for unassigned code\n\t\t\tif ( startColumn > currentColumn ) {\n\t\t\t\tcontributions.set( UNASSIGNED, contributions.get( UNASSIGNED ) + lineCode.slice( currentColumn, startColumn ) );\n\t\t\t}\n\n\t\t\tif ( mapping ) {\n\t\t\t\t// Slice the code from startColumn to endColumn for assigned code\n\t\t\t\tconst sourceIndex = mapping?.[ 1 ];\n\t\t\t\tconst codeSlice = lineCode.slice( startColumn, endColumn );\n\t\t\t\tconst source = sourceIndex !== undefined ? map.sources[ sourceIndex ]! : UNASSIGNED;\n\n\t\t\t\tcontributions.set( source, contributions.get( source ) + codeSlice );\n\t\t\t\tcurrentColumn = endColumn;\n\t\t\t} else {\n\t\t\t\tcurrentColumn = startColumn;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Compute sizes for each source\n\tconst sourceSizes = new Map<string, Sizes>();\n\n\tconst contributionsSum: Sizes = {\n\t\tuncompressed: 0,\n\t\tgzip: 0,\n\t\tbrotli: 0\n\t};\n\n\tfor ( const [ source, codeSegment ] of contributions ) {\n\t\tconst sizes = getSizes( codeSegment, options );\n\n\t\tcontributionsSum.uncompressed += sizes.uncompressed;\n\t\tcontributionsSum.gzip += sizes.gzip;\n\t\tcontributionsSum.brotli += sizes.brotli;\n\n\t\tsourceSizes.set( source, sizes );\n\t}\n\n\treturn adjustSizes( sourceSizes, assetSizes, contributionsSum, options );\n}\n\nexport function getSizes(\n\tcode: string,\n\toptions: Options\n): Sizes {\n\treturn {\n\t\tuncompressed: Buffer.byteLength( code ),\n\t\tgzip: options.gzip ? gzipSync( code ).length : 0,\n\t\tbrotli: options.brotli ? brotliCompressSync( code ).length : 0\n\t};\n}\n\nfunction getContributions( sources: Array<string | null> ): Map<string, string> {\n\tconst contributions = new Map<string, string>();\n\n\t// Populate contributions with sources\n\tsources\n\t\t.filter( source => source !== null )\n\t\t.forEach( source => contributions.set( source, '' ) );\n\n\t// Add entry for the code that is not assigned to any source\n\tcontributions.set( UNASSIGNED, '' );\n\n\treturn contributions;\n}\n\n/**\n * Compression efficiency improves with the size of the file.\n *\n * However, what we have is the compressed size of the entire bundle (`actual`),\n * the sum of all files compressed individually (`sum`) and the compressed\n * size of a given file (`content`). The last value is essentially a “worst-case”\n * scenario, and the actual size of the file in the bundle is likely to be smaller.\n *\n * We use this information to estimate the actual size of the file in the bundle\n * after compression.\n */\nfunction adjustSizes(\n\tsources: Map<string, Sizes>,\n\tasset: Sizes,\n\tsums: Sizes,\n\toptions: Options\n): Map<string, Sizes> {\n\tconst gzipDelta = options.gzip ? asset.gzip / sums.gzip : 0;\n\tconst brotliDelta = options.brotli ? asset.brotli / sums.brotli : 0;\n\n\tfor ( const [ source, sizes ] of sources ) {\n\t\tsources.set( source, {\n\t\t\tuncompressed: sizes.uncompressed,\n\t\t\tgzip: options.gzip ? Math.round( sizes.gzip * gzipDelta ) : 0,\n\t\t\tbrotli: options.brotli ? Math.round( sizes.brotli * brotliDelta ) : 0\n\t\t} );\n\t}\n\n\treturn sources;\n}\n","import { readFileSync } from 'fs';\nimport { fileURLToPath } from 'url';\nimport { dirname, extname, resolve } from 'path';\nimport { loadCodeAndMap } from 'load-source-map';\nimport { decode } from '@jridgewell/sourcemap-codec';\nimport { mapSourceMap } from './sourcemap/map.js';\nimport { getBytesPerSource, getSizes } from './sourcemap/bytes.js';\nimport type {\n JsonReport,\n MaybeCodeMap,\n ReportInput,\n ReportOutput,\n CodeMap,\n ReportOutputInput,\n Options\n} from './types.js';\nimport { normalizePath } from './utils.js';\n\nexport function generateJsonReport(\n assets: Array<string>,\n inputs: Record<string, ReportInput>,\n options: Options\n): JsonReport {\n const acceptedExtensions = [ '.js', '.css' ];\n\n const outputs = assets\n .filter( asset => acceptedExtensions.includes( extname( asset ) ) )\n .reduce( ( carry, asset ) => {\n const data = processAsset( asset, inputs, options );\n\n if ( data ) {\n carry[ normalizePath( asset ) ] = data;\n }\n\n return carry;\n }, {} as Record<string, ReportOutput> );\n\n return {\n inputs: sortObjectKeys( inputs ),\n outputs: sortObjectKeys( outputs )\n };\n}\n\nexport function generateHtmlReport(\n assets: Array<string>,\n inputs: Record<string, ReportInput>,\n options: Options\n): string {\n const json = generateJsonReport( assets, inputs, options );\n const __dirname = dirname( fileURLToPath( import.meta.url ) );\n const template = readFileSync( resolve( __dirname, './index.html' ), 'utf-8' );\n\n return template.replace( '__REPORT_DATA__', encodeURIComponent( JSON.stringify( json ) ) );\n}\n\nfunction processAsset(\n asset: string,\n inputs: Record<string, ReportInput>,\n options: Options\n): ReportOutput | void {\n const maybeCodeMap = loadCodeAndMap( asset );\n\n if ( !hasCodeAndMap( maybeCodeMap ) ) {\n return;\n }\n\n const { code, map } = maybeCodeMap;\n const mapped = options.detailed\n ? mapSourceMap( map, dirname( asset ), inputs )\n : { ...map, mappings: decode( map.mappings ) };\n\n mapped.sources = mapped.sources.map( source => normalizePath( source! ) );\n\n const assetSizes = getSizes( code, options );\n const bytes = getBytesPerSource( code, mapped, assetSizes, options );\n const outputInputs = Array\n .from( bytes )\n .reduce( ( carry, [ source, sizes ] ) => {\n carry[ normalizePath( source ) ] = sizes;\n\n return carry;\n }, {} as Record<string, ReportOutputInput> );\n\n return {\n ...assetSizes,\n inputs: sortObjectKeys( outputInputs ),\n map: options.sources ? {\n version: 3,\n names: [],\n mappings: mapped.mappings,\n sources: mapped.sources,\n sourcesContent: mapped.sourcesContent,\n } : undefined\n };\n}\n\nfunction hasCodeAndMap( result: MaybeCodeMap ): result is Required<CodeMap> {\n return Boolean( result && result.code && result.map );\n}\n\nfunction sortObjectKeys<T extends unknown>( object: Record<string, T> ): Record<string, T> {\n return Object\n .keys( object )\n .sort()\n .reduce( ( carry, key ) => {\n carry[ key ] = object[ key ];\n\n return carry;\n }, {} as Record<string, T> );\n} \n","import { dirname } from 'path';\nimport { existsSync, mkdirSync, writeFileSync } from 'fs';\nimport { generateHtmlReport, generateJsonReport } from '../report.js';\nimport type { Options, JsonReport } from '../types.js';\nimport { normalizeOptions } from '../utils.js';\n\nexport async function generateReportFromAssets(\n\tassets: string[],\n\tinputs: JsonReport[ 'inputs' ],\n\tuserOptions: Partial<Options>\n): Promise<void> {\n\tconst options = normalizeOptions( userOptions );\n\tconst handler = options.format === 'html' ? saveHtml : saveJson;\n\tconst report = handler( assets, inputs, options );\n\tconst outputDirectory = dirname( options.filename );\n\n\t// Ensure the output directory exists\n\tif ( !existsSync( outputDirectory ) ) {\n\t\tmkdirSync( outputDirectory, { recursive: true } );\n\t}\n\n\t// Write the report to the file system\n\twriteFileSync( options.filename, report );\n\n\tif ( !options.open ) {\n\t\treturn;\n\t}\n\n\t/**\n\t * `open` is ESM-only package, so we need to import it\n\t * dynamically to make it work in CommonJS environment.\n\t */\n\tconst { default: open } = await import( 'open' );\n\n\t// Open the report in the default program for the file extension\n\topen( options.filename );\n}\n\nfunction saveHtml(\n\tassets: string[],\n\tinputs: JsonReport[ 'inputs' ],\n\toptions: Options\n): string {\n\treturn generateHtmlReport( assets, inputs, options );\n}\n\nfunction saveJson(\n\tassets: string[],\n\tinputs: JsonReport[ 'inputs' ],\n\toptions: Options\n): string {\n\tconst report = generateJsonReport( assets, inputs, options );\n\n\treturn JSON.stringify( report, null, 2 );\n}\n","import { resolve } from 'path';\nimport { addSourcesToInputs } from '../sourcemap/map';\nimport { generateReportFromAssets } from '../report/generate';\nimport type { Plugin } from 'esbuild';\nimport type { Options, JsonReport } from '../types';\n\nexport function SondaEsbuildPlugin( options: Partial<Options> = {} ): Plugin {\n\treturn {\n\t\tname: 'sonda',\n\t\tsetup( build ) {\n\t\t\tbuild.initialOptions.metafile = true;\n\n\t\t\t// Esbuild already reads the existing source maps, so there's no need to do it again\n\t\t\toptions.detailed = false;\n\n\t\t\tbuild.onEnd( result => {\n\t\t\t\tif ( !result.metafile ) {\n\t\t\t\t\treturn console.error( 'Metafile is required for SondaEsbuildPlugin to work.' );\n\t\t\t\t}\n\n\t\t\t\tconst cwd = process.cwd();\n\t\t\t\tconst inputs = Object\n\t\t\t\t\t.entries( result.metafile.inputs )\n\t\t\t\t\t.reduce( ( acc, [ path, data ] ) => {\n\t\t\t\t\t\tacc[ path ] = {\n\t\t\t\t\t\t\tbytes: data.bytes,\n\t\t\t\t\t\t\tformat: data.format ?? 'unknown',\n\t\t\t\t\t\t\timports: data.imports.map( data => data.path ),\n\t\t\t\t\t\t\tbelongsTo: null,\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * Because esbuild already reads the existing source maps, there may be\n\t\t\t\t\t\t * cases where some report \"outputs\" include \"inputs\" don't exist in the\n\t\t\t\t\t\t * main \"inputs\" object. To avoid this, we parse each esbuild input and\n\t\t\t\t\t\t * add its sources to the \"inputs\" object.\n\t\t\t\t\t\t */\n\t\t\t\t\t\taddSourcesToInputs(\n\t\t\t\t\t\t\tresolve( cwd, path ),\n\t\t\t\t\t\t\tacc\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\treturn acc;\n\t\t\t\t\t}, {} as JsonReport[ 'inputs' ] );\n\n\t\t\t\treturn generateReportFromAssets(\n\t\t\t\t\tObject.keys( result.metafile.outputs ).map( path => resolve( cwd, path ) ),\n\t\t\t\t\tinputs,\n\t\t\t\t\toptions\n\t\t\t\t);\n\t\t\t} );\n\t\t}\n\t};\n}\n","import { join, resolve, dirname } from 'path';\nimport { normalizePath, cjsRegex, jsRegexp } from '../utils.js';\nimport { generateReportFromAssets } from '../report/generate.js';\nimport type { Options, ModuleFormat, JsonReport } from '../types.js';\nimport type { Plugin, ModuleInfo, NormalizedOutputOptions, OutputBundle } from 'rollup';\n\nexport function SondaRollupPlugin( options: Partial<Options> = {} ): Plugin {\n\tlet inputs: JsonReport[ 'inputs' ] = {};\n\n\treturn {\n\t\tname: 'sonda',\n\n\t\twriteBundle(\n\t\t\t{ dir, file }: NormalizedOutputOptions,\n\t\t\tbundle: OutputBundle\n\t\t) {\n\t\t\tconst outputDir = resolve( process.cwd(), dir ?? dirname( file! ) );\n\t\t\tconst assets = Object.keys( bundle ).map( name => join( outputDir, name ) );\n\n\t\t\treturn generateReportFromAssets(\n\t\t\t\tassets,\n\t\t\t\tinputs,\n\t\t\t\toptions\n\t\t\t);\n\t\t},\n\n\t\tmoduleParsed( module: ModuleInfo ) {\n\t\t\tinputs[ normalizePath( module.id ) ] = {\n\t\t\t\tbytes: module.code ? Buffer.byteLength( module.code ) : 0,\n\t\t\t\tformat: getFormat( module.id, module.meta.commonjs?.isCommonJS ),\n\t\t\t\timports: module.importedIds.map( id => normalizePath( id ) ),\n\t\t\t\tbelongsTo: null,\n\t\t\t};\n\t\t}\n\t};\n}\n\nfunction getFormat( moduleId: string, isCommonJS: boolean | undefined ): ModuleFormat {\n\tif ( isCommonJS === true || cjsRegex.test( moduleId ) ) {\n\t\treturn 'cjs';\n\t}\n\n\tif ( isCommonJS === false || jsRegexp.test( moduleId ) ) {\n\t\treturn 'esm';\n\t}\n\n\treturn'unknown';\n}\n","import { join } from 'path';\nimport { normalizePath, jsRegexp } from '../utils';\nimport { generateReportFromAssets } from '../report/generate';\nimport type { Compiler, StatsModule } from 'webpack';\nimport type { Options, ModuleFormat, JsonReport } from '../types';\n\nexport class SondaWebpackPlugin {\n\toptions: Partial<Options>;\n\n\tconstructor ( options: Partial<Options> = {} ) {\n\t\tthis.options = options;\n\t}\n\n\tapply( compiler: Compiler ): void {\n\t\tcompiler.options.output.devtoolModuleFilenameTemplate = '[absolute-resource-path]';\n\n\t\tcompiler.hooks.afterEmit.tapPromise( 'SondaWebpackPlugin', compilation => {\n\t\t\tconst inputs: JsonReport[ 'inputs' ] = {};\n\t\t\tconst stats = compilation.getStats().toJson( {\n\t\t\t\tmodules: true,\n\t\t\t\tprovidedExports: true,\n\t\t\t} );\n\n\t\t\tconst outputPath = stats.outputPath || compiler.outputPath;\n\t\t\tconst modules: Array<StatsModule> = stats.modules\n\t\t\t\t?.flatMap( mod => mod.modules ? [ mod, ...mod.modules ] : mod )\n\t\t\t\t.filter( mod => mod.nameForCondition && !mod.codeGenerated )\n\t\t\t\t.filter( ( mod, index, self ) => self.findIndex( m => m.nameForCondition === mod.nameForCondition ) === index )\n\t\t\t\t|| [];\n\n\t\t\tmodules.forEach( module => {\n\t\t\t\tconst imports = modules.reduce( ( acc, { nameForCondition, issuerName, reasons } ) => {\n\t\t\t\t\tif ( issuerName === module.name || reasons?.some( reason => reason.resolvedModule === module.name ) ) {\n\t\t\t\t\t\tacc.push( normalizePath( nameForCondition! ) );\n\t\t\t\t\t}\n\n\t\t\t\t\treturn acc;\n\t\t\t\t}, [] as Array<string> );\n\n\t\t\t\tinputs[ normalizePath( module.nameForCondition! ) ] = {\n\t\t\t\t\tbytes: module.size || 0,\n\t\t\t\t\tformat: getFormat( module ),\n\t\t\t\t\timports,\n\t\t\t\t\tbelongsTo: null\n\t\t\t\t};\n\t\t\t} );\n\n\t\t\treturn generateReportFromAssets(\n\t\t\t\tstats.assets?.map( asset => join( outputPath, asset.name ) ) || [],\n\t\t\t\tinputs,\n\t\t\t\tthis.options\n\t\t\t);\n\t\t} );\n\t}\n}\n\nfunction getFormat( module: StatsModule ): ModuleFormat {\n\tif ( !jsRegexp.test( module.nameForCondition! ) ) {\n\t\treturn 'unknown';\n\t}\n\n\t/**\n\t * Sometimes ESM modules have `moduleType` set as `javascript/auto`, so we\n\t * also need to check if the module has exports to determine if it's ESM.\n\t */\n\tif ( module.moduleType === 'javascript/esm' || !!module.providedExports?.length ) {\n\t\treturn 'esm';\n\t}\n\n\treturn 'cjs';\n}\n"],"names":["parseSourceMapInput","str","JSON","parse","replace","sourceMappingRegExp","loadCodeAndMap","codePath","existsSync","code","readFileSync","extractedComment","includes","Array","from","matchAll","at","length","maybeMap","loadMap","map","mapPath","sources","normalizeSourcesPaths","sourcesContent","loadMissingSourcesContent","sourceRoot","sourceMappingURL","startsWith","parseDataUrl","sourceMapFilename","URL","pathname","join","dirname","url","prefix","payload","split","encoding","Buffer","toString","decodeURIComponent","Error","mapDir","source","isAbsolute","resolve","index","cjsRegex","jsRegexp","normalizeOptions","options","format","filename","defaultOptions","open","detailed","gzip","brotli","normalizedOptions","Object","assign","normalizeOutputPath","normalizePath","pathToNormalize","normalized","relativized","relative","process","cwd","replaceAll","win32","sep","posix","path","expectedExtension","extname","console","warn","base","ext","mapSourceMap","dirPath","inputs","alreadyRemapped","Set","remapped","remapping","file","ctx","has","add","codeMap","addSourcesToInputs","content","decodedMappings","parentPath","filter","forEach","normalizedPath","bytes","byteLength","imports","belongsTo","UNASSIGNED","getBytesPerSource","assetSizes","contributions","getContributions","codeLines","lineIndex","lineCode","mappings","currentColumn","i","mapping","startColumn","endColumn","set","get","slice","sourceIndex","codeSlice","undefined","sourceSizes","Map","contributionsSum","uncompressed","codeSegment","sizes","getSizes","adjustSizes","gzipSync","brotliCompressSync","asset","sums","gzipDelta","brotliDelta","Math","round","generateJsonReport","assets","acceptedExtensions","outputs","reduce","carry","data","processAsset","sortObjectKeys","generateHtmlReport","json","__dirname","fileURLToPath","template","encodeURIComponent","stringify","maybeCodeMap","hasCodeAndMap","mapped","decode","outputInputs","version","names","result","Boolean","object","keys","sort","key","generateReportFromAssets","userOptions","handler","saveHtml","saveJson","report","outputDirectory","mkdirSync","recursive","writeFileSync","default","SondaEsbuildPlugin","name","setup","build","initialOptions","metafile","onEnd","error","entries","acc","SondaRollupPlugin","writeBundle","dir","bundle","outputDir","moduleParsed","module","id","getFormat","meta","commonjs","isCommonJS","importedIds","moduleId","test","SondaWebpackPlugin","apply","compiler","output","devtoolModuleFilenameTemplate","hooks","afterEmit","tapPromise","compilation","stats","getStats","toJson","modules","providedExports","outputPath","flatMap","mod","nameForCondition","codeGenerated","self","findIndex","m","issuerName","reasons","some","reason","resolvedModule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5CAuL,WAAcvL,CAAAA,OAAAA,GAA4B,EAAE,CAAG;QAC9C,IAAI,CAACA,OAAO,GAAGA,OAAAA;AAChB;AA2CD;AAEA,SAASmJ,UAAWF,MAAmB,EAAA;AACtC,IAAA,IAAK,CAACnJ,QAAS2J,CAAAA,IAAI,CAAER,MAAAA,CAAO0B,gBAAgB,CAAM,EAAA;QACjD,OAAO,SAAA;AACR;AAEA;;;KAIA,IAAK1B,MAAOuC,CAAAA,UAAU,KAAK,gBAAA,IAAoB,CAAC,CAACvC,MAAAA,CAAOsB,eAAe,EAAE1M,MAAS,EAAA;QACjF,OAAO,KAAA;AACR;IAEA,OAAO,KAAA;AACR;;;;;;"}
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../load-source-map/dist/index.js","../src/utils.ts","../src/sourcemap/map.ts","../src/sourcemap/bytes.ts","../src/report.ts","../src/report/generate.ts","../src/bundlers/esbuild.ts","../src/bundlers/rollup.ts","../src/bundlers/webpack.ts"],"sourcesContent":["import { existsSync, readFileSync } from 'fs';\nimport { join, dirname, isAbsolute, resolve } from 'path';\n\n/**\n * Strip any JSON XSSI avoidance prefix from the string (as documented in the source maps specification),\n * and parses the string as JSON.\n *\n * https://github.com/mozilla/source-map/blob/3cb92cc3b73bfab27c146bae4ef2bc09dbb4e5ed/lib/util.js#L162-L164\n */ function parseSourceMapInput(str) {\n return JSON.parse(str.replace(/^\\)]}'[^\\n]*\\n/, \"\"));\n}\n/**\n\tsourceMappingURL=data:application/json;charset=utf-8;base64,data\n\tsourceMappingURL=data:application/json;base64,data\n\tsourceMappingURL=data:application/json;uri,data\n\tsourceMappingURL=map-file-comment.css.map\n\tsourceMappingURL=map-file-comment.css.map?query=value\n*/ const sourceMappingRegExp = /[@#]\\s*sourceMappingURL=(\\S+)\\b/g;\nfunction loadCodeAndMap(codePath) {\n if (!existsSync(codePath)) {\n return null;\n }\n const code = readFileSync(codePath, 'utf-8');\n const extractedComment = code.includes('sourceMappingURL') && Array.from(code.matchAll(sourceMappingRegExp)).at(-1);\n if (!extractedComment || !extractedComment.length) {\n return {\n code\n };\n }\n const maybeMap = loadMap(codePath, extractedComment[1]);\n if (!maybeMap) {\n return {\n code\n };\n }\n const { map, mapPath } = maybeMap;\n map.sources = normalizeSourcesPaths(map, mapPath);\n map.sourcesContent = loadMissingSourcesContent(map);\n delete map.sourceRoot;\n return {\n code,\n map\n };\n}\nfunction loadMap(codePath, sourceMappingURL) {\n if (sourceMappingURL.startsWith('data:')) {\n const map = parseDataUrl(sourceMappingURL);\n return {\n map: parseSourceMapInput(map),\n mapPath: codePath\n };\n }\n const sourceMapFilename = new URL(sourceMappingURL, 'file://').pathname;\n const mapPath = join(dirname(codePath), sourceMapFilename);\n if (!existsSync(mapPath)) {\n return null;\n }\n return {\n map: parseSourceMapInput(readFileSync(mapPath, 'utf-8')),\n mapPath\n };\n}\nfunction parseDataUrl(url) {\n const [prefix, payload] = url.split(',');\n const encoding = prefix.split(';').at(-1);\n switch(encoding){\n case 'base64':\n return Buffer.from(payload, 'base64').toString();\n case 'uri':\n return decodeURIComponent(payload);\n default:\n throw new Error('Unsupported source map encoding: ' + encoding);\n }\n}\n/**\n * Normalize the paths of the sources in the source map to be absolute paths.\n */ function normalizeSourcesPaths(map, mapPath) {\n const mapDir = dirname(mapPath);\n return map.sources.map((source)=>{\n if (!source) {\n return source;\n }\n return isAbsolute(source) ? source : resolve(mapDir, map.sourceRoot ?? '.', source);\n });\n}\n/**\n * Loop through the sources and try to load missing `sourcesContent` from the file system.\n */ function loadMissingSourcesContent(map) {\n return map.sources.map((source, index)=>{\n if (map.sourcesContent?.[index]) {\n return map.sourcesContent[index];\n }\n if (source && existsSync(source)) {\n return readFileSync(source, 'utf-8');\n }\n return null;\n });\n}\n\nexport { loadCodeAndMap };\n//# sourceMappingURL=index.js.map\n","import { join, relative, win32, posix, extname, isAbsolute, format, parse } from 'path';\nimport type { Options } from './types';\n\nexport const esmRegex: RegExp = /\\.m[tj]sx?$/;\nexport const cjsRegex: RegExp = /\\.c[tj]sx?$/;\nexport const jsRegexp: RegExp = /\\.[cm]?[tj]s[x]?$/;\n\nexport function normalizeOptions( options?: Partial<Options> ): Options {\n\tconst format = options?.format\n\t\t|| options?.filename?.split( '.' ).at( -1 ) as Options['format']\n\t\t|| 'html';\n\n\tconst defaultOptions: Options = {\n\t\tformat,\n\t\tfilename: 'sonda-report.' + format,\n\t\topen: true,\n\t\tdetailed: false,\n\t\tsources: false,\n\t\tgzip: false,\n\t\tbrotli: false,\n\t};\n\n\t// Merge user options with the defaults\n\tconst normalizedOptions = Object.assign( {}, defaultOptions, options ) satisfies Options;\n\n\tnormalizedOptions.filename = normalizeOutputPath( normalizedOptions );\n\n\treturn normalizedOptions;\n}\n\nexport function normalizePath( pathToNormalize: string ): string {\n\t// Unicode escape sequences used by Rollup and Vite to identify virtual modules\n\tconst normalized = pathToNormalize.replace( /^\\0/, '' )\n\n\t// Transform absolute paths to relative paths\n\tconst relativized = relative( process.cwd(), normalized );\n\n\t// Ensure paths are POSIX-compliant - https://stackoverflow.com/a/63251716/4617687\n\treturn relativized.replaceAll( win32.sep, posix.sep );\n}\n\nfunction normalizeOutputPath( options: Options ): string {\n\tlet path = options.filename;\n\tconst expectedExtension = '.' + options.format;\n\n\t// Ensure the filename is an absolute path\n\tif ( !isAbsolute( path ) ) {\n\t\tpath = join( process.cwd(), path );\n\t}\n\n\t// Ensure that the `filename` extension matches the `format` option\n\tif ( expectedExtension !== extname( path ) ) {\n\t\tconsole.warn(\n\t\t\t'\\x1b[0;33m' + // Make the message yellow\n\t\t\t`Sonda: The file extension specified in the 'filename' does not match the 'format' option. ` +\n\t\t\t`The extension will be changed to '${ expectedExtension }'.`\n\t\t);\n\n\t\tpath = format( { ...parse( path ), base: '', ext: expectedExtension } )\n\t}\n\n\treturn path;\n}\n","import { default as remapping, type DecodedSourceMap, type EncodedSourceMap } from '@ampproject/remapping';\nimport { loadCodeAndMap } from 'load-source-map';\nimport { resolve } from 'path';\nimport { normalizePath } from '../utils';\nimport type { CodeMap, ReportInput } from '../types';\n\nexport function mapSourceMap(\n\tmap: EncodedSourceMap,\n\tdirPath: string,\n\tinputs: Record<string, ReportInput>\n): DecodedSourceMap {\n\tconst alreadyRemapped = new Set<string>();\n\tconst remapped = remapping( map, ( file, ctx ) => {\n\t\tif ( alreadyRemapped.has( file ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\talreadyRemapped.add( file );\n\n\t\tconst codeMap = addSourcesToInputs(\n\t\t\tresolve( dirPath, file ),\n\t\t\tinputs\n\t\t);\n\n\t\tif ( !codeMap ) {\n\t\t\treturn;\n\t\t}\n\n\t\tctx.content ??= codeMap.code;\n\n\t\treturn codeMap.map;\n\t}, { decodedMappings: true } );\n\n\treturn remapped as DecodedSourceMap;\n}\n\n/**\n * Loads the source map of a given file and adds its \"sources\" to the given inputs object.\n */\nexport function addSourcesToInputs(\n\tpath: string,\n\tinputs: Record<string, ReportInput>\n): CodeMap | null {\n\tconst codeMap = loadCodeAndMap( path );\n\n\tif ( !codeMap ) {\n\t\treturn null;\n\t}\n\n\tconst parentPath = normalizePath( path );\n\tconst format = inputs[ parentPath ]?.format ?? 'unknown';\n\n\tcodeMap.map?.sources\n\t\t.filter( source => source !== null )\n\t\t.forEach( ( source, index ) => {\n\t\t\tconst normalizedPath = normalizePath( source );\n\n\t\t\tif ( parentPath === normalizedPath ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tinputs[ normalizedPath ] = {\n\t\t\t\tbytes: Buffer.byteLength( codeMap.map!.sourcesContent?.[ index ] ?? '' ),\n\t\t\t\tformat,\n\t\t\t\timports: [],\n\t\t\t\tbelongsTo: parentPath\n\t\t\t};\n\t\t} );\n\t\n\treturn codeMap;\n}\n","import { gzipSync, brotliCompressSync } from 'zlib';\nimport type { DecodedSourceMap, SourceMapSegment } from '@ampproject/remapping';\nimport type { Options, Sizes } from '../types';\n\nconst UNASSIGNED = '[unassigned]';\n\nexport function getBytesPerSource(\n\tcode: string,\n\tmap: DecodedSourceMap,\n\tassetSizes: Sizes,\n\toptions: Options\n): Map<string, Sizes> {\n\tconst contributions = getContributions( map.sources );\n\n\t// Split the code into lines\n\tconst codeLines = code.split( /(?<=\\r?\\n)/ );\n\n\tfor ( let lineIndex = 0; lineIndex < codeLines.length; lineIndex++ ) {\n\t\tconst lineCode = codeLines[ lineIndex ];\n\t\tconst mappings = map.mappings[ lineIndex ] || [];\n\t\tlet currentColumn = 0;\n\n\t\tfor ( let i = 0; i <= mappings.length; i++ ) {\n\t\t\t// 0: generatedColumn\n\t\t\t// 1: sourceIndex\n\t\t\t// 2: originalLine\n\t\t\t// 3: originalColumn\n\t\t\t// 4: nameIndex\n\n\t\t\tconst mapping: SourceMapSegment | undefined = mappings[ i ];\n\t\t\tconst startColumn = mapping?.[ 0 ] ?? lineCode.length;\n\t\t\tconst endColumn = mappings[ i + 1 ]?.[ 0 ] ?? lineCode.length;\n\n\t\t\t// Slice the code from currentColumn to startColumn for unassigned code\n\t\t\tif ( startColumn > currentColumn ) {\n\t\t\t\tcontributions.set( UNASSIGNED, contributions.get( UNASSIGNED ) + lineCode.slice( currentColumn, startColumn ) );\n\t\t\t}\n\n\t\t\tif ( mapping ) {\n\t\t\t\t// Slice the code from startColumn to endColumn for assigned code\n\t\t\t\tconst sourceIndex = mapping?.[ 1 ];\n\t\t\t\tconst codeSlice = lineCode.slice( startColumn, endColumn );\n\t\t\t\tconst source = sourceIndex !== undefined ? map.sources[ sourceIndex ]! : UNASSIGNED;\n\n\t\t\t\tcontributions.set( source, contributions.get( source ) + codeSlice );\n\t\t\t\tcurrentColumn = endColumn;\n\t\t\t} else {\n\t\t\t\tcurrentColumn = startColumn;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Compute sizes for each source\n\tconst sourceSizes = new Map<string, Sizes>();\n\n\tconst contributionsSum: Sizes = {\n\t\tuncompressed: 0,\n\t\tgzip: 0,\n\t\tbrotli: 0\n\t};\n\n\tfor ( const [ source, codeSegment ] of contributions ) {\n\t\tconst sizes = getSizes( codeSegment, options );\n\n\t\tcontributionsSum.uncompressed += sizes.uncompressed;\n\t\tcontributionsSum.gzip += sizes.gzip;\n\t\tcontributionsSum.brotli += sizes.brotli;\n\n\t\tsourceSizes.set( source, sizes );\n\t}\n\n\treturn adjustSizes( sourceSizes, assetSizes, contributionsSum, options );\n}\n\nexport function getSizes(\n\tcode: string,\n\toptions: Options\n): Sizes {\n\treturn {\n\t\tuncompressed: Buffer.byteLength( code ),\n\t\tgzip: options.gzip ? gzipSync( code ).length : 0,\n\t\tbrotli: options.brotli ? brotliCompressSync( code ).length : 0\n\t};\n}\n\nfunction getContributions( sources: Array<string | null> ): Map<string, string> {\n\tconst contributions = new Map<string, string>();\n\n\t// Populate contributions with sources\n\tsources\n\t\t.filter( source => source !== null )\n\t\t.forEach( source => contributions.set( source, '' ) );\n\n\t// Add entry for the code that is not assigned to any source\n\tcontributions.set( UNASSIGNED, '' );\n\n\treturn contributions;\n}\n\n/**\n * Compression efficiency improves with the size of the file.\n *\n * However, what we have is the compressed size of the entire bundle (`actual`),\n * the sum of all files compressed individually (`sum`) and the compressed\n * size of a given file (`content`). The last value is essentially a “worst-case”\n * scenario, and the actual size of the file in the bundle is likely to be smaller.\n *\n * We use this information to estimate the actual size of the file in the bundle\n * after compression.\n */\nfunction adjustSizes(\n\tsources: Map<string, Sizes>,\n\tasset: Sizes,\n\tsums: Sizes,\n\toptions: Options\n): Map<string, Sizes> {\n\tconst gzipDelta = options.gzip ? asset.gzip / sums.gzip : 0;\n\tconst brotliDelta = options.brotli ? asset.brotli / sums.brotli : 0;\n\n\tfor ( const [ source, sizes ] of sources ) {\n\t\tsources.set( source, {\n\t\t\tuncompressed: sizes.uncompressed,\n\t\t\tgzip: options.gzip ? Math.round( sizes.gzip * gzipDelta ) : 0,\n\t\t\tbrotli: options.brotli ? Math.round( sizes.brotli * brotliDelta ) : 0\n\t\t} );\n\t}\n\n\treturn sources;\n}\n","import { readFileSync } from 'fs';\nimport { fileURLToPath } from 'url';\nimport { dirname, extname, resolve } from 'path';\nimport { loadCodeAndMap } from 'load-source-map';\nimport { decode } from '@jridgewell/sourcemap-codec';\nimport { mapSourceMap } from './sourcemap/map.js';\nimport { getBytesPerSource, getSizes } from './sourcemap/bytes.js';\nimport type {\n JsonReport,\n MaybeCodeMap,\n ReportInput,\n ReportOutput,\n CodeMap,\n ReportOutputInput,\n Options\n} from './types.js';\nimport { normalizePath } from './utils.js';\n\nexport function generateJsonReport(\n assets: Array<string>,\n inputs: Record<string, ReportInput>,\n options: Options\n): JsonReport {\n const acceptedExtensions = [ '.js', '.mjs', '.cjs', '.css' ];\n\n const outputs = assets\n .filter( asset => acceptedExtensions.includes( extname( asset ) ) )\n .reduce( ( carry, asset ) => {\n const data = processAsset( asset, inputs, options );\n\n if ( data ) {\n carry[ normalizePath( asset ) ] = data;\n }\n\n return carry;\n }, {} as Record<string, ReportOutput> );\n\n return {\n inputs: sortObjectKeys( inputs ),\n outputs: sortObjectKeys( outputs )\n };\n}\n\nexport function generateHtmlReport(\n assets: Array<string>,\n inputs: Record<string, ReportInput>,\n options: Options\n): string {\n const json = generateJsonReport( assets, inputs, options );\n const __dirname = dirname( fileURLToPath( import.meta.url ) );\n const template = readFileSync( resolve( __dirname, './index.html' ), 'utf-8' );\n\n return template.replace( '__REPORT_DATA__', encodeURIComponent( JSON.stringify( json ) ) );\n}\n\nfunction processAsset(\n asset: string,\n inputs: Record<string, ReportInput>,\n options: Options\n): ReportOutput | void {\n const maybeCodeMap = loadCodeAndMap( asset );\n\n if ( !hasCodeAndMap( maybeCodeMap ) ) {\n return;\n }\n\n const { code, map } = maybeCodeMap;\n const mapped = options.detailed\n ? mapSourceMap( map, dirname( asset ), inputs )\n : { ...map, mappings: decode( map.mappings ) };\n\n mapped.sources = mapped.sources.map( source => normalizePath( source! ) );\n\n const assetSizes = getSizes( code, options );\n const bytes = getBytesPerSource( code, mapped, assetSizes, options );\n const outputInputs = Array\n .from( bytes )\n .reduce( ( carry, [ source, sizes ] ) => {\n carry[ normalizePath( source ) ] = sizes;\n\n return carry;\n }, {} as Record<string, ReportOutputInput> );\n\n return {\n ...assetSizes,\n inputs: sortObjectKeys( outputInputs ),\n map: options.sources ? {\n version: 3,\n names: [],\n mappings: mapped.mappings,\n sources: mapped.sources,\n sourcesContent: mapped.sourcesContent,\n } : undefined\n };\n}\n\nfunction hasCodeAndMap( result: MaybeCodeMap ): result is Required<CodeMap> {\n return Boolean( result && result.code && result.map );\n}\n\nfunction sortObjectKeys<T extends unknown>( object: Record<string, T> ): Record<string, T> {\n return Object\n .keys( object )\n .sort()\n .reduce( ( carry, key ) => {\n carry[ key ] = object[ key ];\n\n return carry;\n }, {} as Record<string, T> );\n} \n","import { dirname } from 'path';\nimport { existsSync, mkdirSync, writeFileSync } from 'fs';\nimport { generateHtmlReport, generateJsonReport } from '../report.js';\nimport type { Options, JsonReport } from '../types.js';\nimport { normalizeOptions } from '../utils.js';\n\nexport async function generateReportFromAssets(\n\tassets: string[],\n\tinputs: JsonReport[ 'inputs' ],\n\tuserOptions: Partial<Options>\n): Promise<void> {\n\tconst options = normalizeOptions( userOptions );\n\tconst handler = options.format === 'html' ? saveHtml : saveJson;\n\tconst report = handler( assets, inputs, options );\n\tconst outputDirectory = dirname( options.filename );\n\n\t// Ensure the output directory exists\n\tif ( !existsSync( outputDirectory ) ) {\n\t\tmkdirSync( outputDirectory, { recursive: true } );\n\t}\n\n\t// Write the report to the file system\n\twriteFileSync( options.filename, report );\n\n\tif ( !options.open ) {\n\t\treturn;\n\t}\n\n\t/**\n\t * `open` is ESM-only package, so we need to import it\n\t * dynamically to make it work in CommonJS environment.\n\t */\n\tconst { default: open } = await import( 'open' );\n\n\t// Open the report in the default program for the file extension\n\topen( options.filename );\n}\n\nfunction saveHtml(\n\tassets: string[],\n\tinputs: JsonReport[ 'inputs' ],\n\toptions: Options\n): string {\n\treturn generateHtmlReport( assets, inputs, options );\n}\n\nfunction saveJson(\n\tassets: string[],\n\tinputs: JsonReport[ 'inputs' ],\n\toptions: Options\n): string {\n\tconst report = generateJsonReport( assets, inputs, options );\n\n\treturn JSON.stringify( report, null, 2 );\n}\n","import { resolve } from 'path';\nimport { addSourcesToInputs } from '../sourcemap/map';\nimport { generateReportFromAssets } from '../report/generate';\nimport type { Plugin } from 'esbuild';\nimport type { Options, JsonReport } from '../types';\n\nexport function SondaEsbuildPlugin( options: Partial<Options> = {} ): Plugin {\n\treturn {\n\t\tname: 'sonda',\n\t\tsetup( build ) {\n\t\t\tbuild.initialOptions.metafile = true;\n\n\t\t\t// Esbuild already reads the existing source maps, so there's no need to do it again\n\t\t\toptions.detailed = false;\n\n\t\t\tbuild.onEnd( result => {\n\t\t\t\tif ( !result.metafile ) {\n\t\t\t\t\treturn console.error( 'Metafile is required for SondaEsbuildPlugin to work.' );\n\t\t\t\t}\n\n\t\t\t\tconst cwd = process.cwd();\n\t\t\t\tconst inputs = Object\n\t\t\t\t\t.entries( result.metafile.inputs )\n\t\t\t\t\t.reduce( ( acc, [ path, data ] ) => {\n\t\t\t\t\t\tacc[ path ] = {\n\t\t\t\t\t\t\tbytes: data.bytes,\n\t\t\t\t\t\t\tformat: data.format ?? 'unknown',\n\t\t\t\t\t\t\timports: data.imports.map( data => data.path ),\n\t\t\t\t\t\t\tbelongsTo: null,\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * Because esbuild already reads the existing source maps, there may be\n\t\t\t\t\t\t * cases where some report \"outputs\" include \"inputs\" don't exist in the\n\t\t\t\t\t\t * main \"inputs\" object. To avoid this, we parse each esbuild input and\n\t\t\t\t\t\t * add its sources to the \"inputs\" object.\n\t\t\t\t\t\t */\n\t\t\t\t\t\taddSourcesToInputs(\n\t\t\t\t\t\t\tresolve( cwd, path ),\n\t\t\t\t\t\t\tacc\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\treturn acc;\n\t\t\t\t\t}, {} as JsonReport[ 'inputs' ] );\n\n\t\t\t\treturn generateReportFromAssets(\n\t\t\t\t\tObject.keys( result.metafile.outputs ).map( path => resolve( cwd, path ) ),\n\t\t\t\t\tinputs,\n\t\t\t\t\toptions\n\t\t\t\t);\n\t\t\t} );\n\t\t}\n\t};\n}\n","import { join, resolve, dirname } from 'path';\nimport { normalizePath, cjsRegex, jsRegexp } from '../utils.js';\nimport { generateReportFromAssets } from '../report/generate.js';\nimport type { Options, ModuleFormat, JsonReport } from '../types.js';\nimport type { Plugin, ModuleInfo, NormalizedOutputOptions, OutputBundle } from 'rollup';\n\nexport function SondaRollupPlugin( options: Partial<Options> = {} ): Plugin {\n\tlet inputs: JsonReport[ 'inputs' ] = {};\n\n\treturn {\n\t\tname: 'sonda',\n\n\t\twriteBundle(\n\t\t\t{ dir, file }: NormalizedOutputOptions,\n\t\t\tbundle: OutputBundle\n\t\t) {\n\t\t\tconst outputDir = resolve( process.cwd(), dir ?? dirname( file! ) );\n\t\t\tconst assets = Object.keys( bundle ).map( name => join( outputDir, name ) );\n\n\t\t\treturn generateReportFromAssets(\n\t\t\t\tassets,\n\t\t\t\tinputs,\n\t\t\t\toptions\n\t\t\t);\n\t\t},\n\n\t\tmoduleParsed( module: ModuleInfo ) {\n\t\t\tinputs[ normalizePath( module.id ) ] = {\n\t\t\t\tbytes: module.code ? Buffer.byteLength( module.code ) : 0,\n\t\t\t\tformat: getFormat( module.id, module.meta.commonjs?.isCommonJS ),\n\t\t\t\timports: module.importedIds.map( id => normalizePath( id ) ),\n\t\t\t\tbelongsTo: null,\n\t\t\t};\n\t\t}\n\t};\n}\n\nfunction getFormat( moduleId: string, isCommonJS: boolean | undefined ): ModuleFormat {\n\tif ( isCommonJS === true || cjsRegex.test( moduleId ) ) {\n\t\treturn 'cjs';\n\t}\n\n\tif ( isCommonJS === false || jsRegexp.test( moduleId ) ) {\n\t\treturn 'esm';\n\t}\n\n\treturn'unknown';\n}\n","import { join } from 'path';\nimport { normalizePath, jsRegexp } from '../utils';\nimport { generateReportFromAssets } from '../report/generate';\nimport type { Compiler, StatsModule } from 'webpack';\nimport type { Options, ModuleFormat, JsonReport } from '../types';\n\nexport class SondaWebpackPlugin {\n\toptions: Partial<Options>;\n\n\tconstructor ( options: Partial<Options> = {} ) {\n\t\tthis.options = options;\n\t}\n\n\tapply( compiler: Compiler ): void {\n\t\tcompiler.options.output.devtoolModuleFilenameTemplate = '[absolute-resource-path]';\n\n\t\tcompiler.hooks.afterEmit.tapPromise( 'SondaWebpackPlugin', compilation => {\n\t\t\tconst inputs: JsonReport[ 'inputs' ] = {};\n\t\t\tconst stats = compilation.getStats().toJson( {\n\t\t\t\tmodules: true,\n\t\t\t\tprovidedExports: true,\n\t\t\t} );\n\n\t\t\tconst outputPath = stats.outputPath || compiler.outputPath;\n\t\t\tconst modules: Array<StatsModule> = stats.modules\n\t\t\t\t?.flatMap( mod => mod.modules ? [ mod, ...mod.modules ] : mod )\n\t\t\t\t.filter( mod => mod.nameForCondition && !mod.codeGenerated )\n\t\t\t\t.filter( ( mod, index, self ) => self.findIndex( m => m.nameForCondition === mod.nameForCondition ) === index )\n\t\t\t\t|| [];\n\n\t\t\tmodules.forEach( module => {\n\t\t\t\tconst imports = modules.reduce( ( acc, { nameForCondition, issuerName, reasons } ) => {\n\t\t\t\t\tif ( issuerName === module.name || reasons?.some( reason => reason.resolvedModule === module.name ) ) {\n\t\t\t\t\t\tacc.push( normalizePath( nameForCondition! ) );\n\t\t\t\t\t}\n\n\t\t\t\t\treturn acc;\n\t\t\t\t}, [] as Array<string> );\n\n\t\t\t\tinputs[ normalizePath( module.nameForCondition! ) ] = {\n\t\t\t\t\tbytes: module.size || 0,\n\t\t\t\t\tformat: getFormat( module ),\n\t\t\t\t\timports,\n\t\t\t\t\tbelongsTo: null\n\t\t\t\t};\n\t\t\t} );\n\n\t\t\treturn generateReportFromAssets(\n\t\t\t\tstats.assets?.map( asset => join( outputPath, asset.name ) ) || [],\n\t\t\t\tinputs,\n\t\t\t\tthis.options\n\t\t\t);\n\t\t} );\n\t}\n}\n\nfunction getFormat( module: StatsModule ): ModuleFormat {\n\tif ( !jsRegexp.test( module.nameForCondition! ) ) {\n\t\treturn 'unknown';\n\t}\n\n\t/**\n\t * Sometimes ESM modules have `moduleType` set as `javascript/auto`, so we\n\t * also need to check if the module has exports to determine if it's ESM.\n\t */\n\tif ( module.moduleType === 'javascript/esm' || !!module.providedExports?.length ) {\n\t\treturn 'esm';\n\t}\n\n\treturn 'cjs';\n}\n"],"names":["parseSourceMapInput","str","JSON","parse","replace","sourceMappingRegExp","loadCodeAndMap","codePath","existsSync","code","readFileSync","extractedComment","includes","Array","from","matchAll","at","length","maybeMap","loadMap","map","mapPath","sources","normalizeSourcesPaths","sourcesContent","loadMissingSourcesContent","sourceRoot","sourceMappingURL","startsWith","parseDataUrl","sourceMapFilename","URL","pathname","join","dirname","url","prefix","payload","split","encoding","Buffer","toString","decodeURIComponent","Error","mapDir","source","isAbsolute","resolve","index","cjsRegex","jsRegexp","normalizeOptions","options","format","filename","defaultOptions","open","detailed","gzip","brotli","normalizedOptions","Object","assign","normalizeOutputPath","normalizePath","pathToNormalize","normalized","relativized","relative","process","cwd","replaceAll","win32","sep","posix","path","expectedExtension","extname","console","warn","base","ext","mapSourceMap","dirPath","inputs","alreadyRemapped","Set","remapped","remapping","file","ctx","has","add","codeMap","addSourcesToInputs","content","decodedMappings","parentPath","filter","forEach","normalizedPath","bytes","byteLength","imports","belongsTo","UNASSIGNED","getBytesPerSource","assetSizes","contributions","getContributions","codeLines","lineIndex","lineCode","mappings","currentColumn","i","mapping","startColumn","endColumn","set","get","slice","sourceIndex","codeSlice","undefined","sourceSizes","Map","contributionsSum","uncompressed","codeSegment","sizes","getSizes","adjustSizes","gzipSync","brotliCompressSync","asset","sums","gzipDelta","brotliDelta","Math","round","generateJsonReport","assets","acceptedExtensions","outputs","reduce","carry","data","processAsset","sortObjectKeys","generateHtmlReport","json","__dirname","fileURLToPath","template","encodeURIComponent","stringify","maybeCodeMap","hasCodeAndMap","mapped","decode","outputInputs","version","names","result","Boolean","object","keys","sort","key","generateReportFromAssets","userOptions","handler","saveHtml","saveJson","report","outputDirectory","mkdirSync","recursive","writeFileSync","default","SondaEsbuildPlugin","name","setup","build","initialOptions","metafile","onEnd","error","entries","acc","SondaRollupPlugin","writeBundle","dir","bundle","outputDir","moduleParsed","module","id","getFormat","meta","commonjs","isCommonJS","importedIds","moduleId","test","SondaWebpackPlugin","apply","compiler","output","devtoolModuleFilenameTemplate","hooks","afterEmit","tapPromise","compilation","stats","getStats","toJson","modules","providedExports","outputPath","flatMap","mod","nameForCondition","codeGenerated","self","findIndex","m","issuerName","reasons","some","reason","resolvedModule","push","size","constructor","moduleType"],"mappings":";;;;;;;;;;AAqBA;;;;;IAMA,SAASA,mBAAAA,CAAqBC,GAAW,EAAA;IACxC,OAAOC,IAAAA,CAAKC,KAAK,CAAEF,GAAIG,CAAAA,OAAO,CAAE,gBAAkB,EAAA,EAAA,CAAA,CAAA;AACnD;AAEA;;;;;;AAMA,GACA,MAAMC,mBAAsB,GAAA,kCAAA;AAErB,SAASC,cAAAA,CAAgBC,QAAgB,EAAA;AAC/C,IAAA,IAAK,CAACC,aAAAA,CAAYD,QAAa,CAAA,EAAA;AAC9B,QAAA,OAAO,IAAA;AACR;AAEA,IAAA,MAAME,IAAAA,GAAOC,eAAAA,CAAcH,QAAU,EAAA,OAAA,CAAA;IAErC,MAAMI,gBAAmBF,GAAAA,IAAAA,CAAKG,QAAQ,CAAE,kBAAA,CAAA,IAAwBC,KAAMC,CAAAA,IAAI,CAAEL,IAAAA,CAAKM,QAAQ,CAAEV,mBAAwBW,CAAAA,CAAAA,CAAAA,EAAE,CAAE,CAAC,CAAA,CAAA;AAExH,IAAA,IAAK,CAACL,gBAAAA,IAAoB,CAACA,gBAAAA,CAAiBM,MAAM,EAAG;QACpD,OAAO;AAAER,YAAAA;SAAK;AACf;IAEA,MAAMS,QAAWC,GAAAA,OAAAA,CAASZ,QAAUI,EAAAA,gBAAgB,CAAE,CAAG,CAAA,CAAA;IAEzD,IAA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AA,MAAAA,CAAOqC,IAAI,IAAI,CAAA;AACtBrL,oBAAAA,MAAAA,EAAQkJ,SAAWF,CAAAA,MAAAA,CAAAA;AACnB9F,oBAAAA,OAAAA;oBACAC,SAAW,EAAA;AACZ,iBAAA;AACD,aAAA,CAAA;AAEA,YAAA,OAAOkE,yBACN6C,KAAMzE,CAAAA,MAAM,EAAE1H,GAAAA,CAAKmH,CAAAA,KAAStG,GAAAA,SAAAA,CAAM2L,UAAYrF,EAAAA,KAAAA,CAAM+C,IAAI,CAAQ,CAAA,IAAA,EAAE,EAClElG,MACA,EAAA,IAAI,CAAChC,OAAO,CAAA;AAEd,SAAA,CAAA;AACD;IA5CAuL,WAAcvL,CAAAA,OAAAA,GAA4B,EAAE,CAAG;QAC9C,IAAI,CAACA,OAAO,GAAGA,OAAAA;AAChB;AA2CD;AAEA,SAASmJ,UAAWF,MAAmB,EAAA;AACtC,IAAA,IAAK,CAACnJ,QAAS2J,CAAAA,IAAI,CAAER,MAAAA,CAAO0B,gBAAgB,CAAM,EAAA;QACjD,OAAO,SAAA;AACR;AAEA;;;KAIA,IAAK1B,MAAOuC,CAAAA,UAAU,KAAK,gBAAA,IAAoB,CAAC,CAACvC,MAAAA,CAAOsB,eAAe,EAAE1M,MAAS,EAAA;QACjF,OAAO,KAAA;AACR;IAEA,OAAO,KAAA;AACR;;;;;;"}
|
package/dist/index.html
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
<!doctype html><html lang="en"><head><meta charset="UTF-8"/><link rel="icon" href="data:;base64,iVBORw0KGgo="/><meta name="viewport" content="width=device-width,initial-scale=1"/><title>Sonda report</title><link rel="icon" type="image/svg+xml" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='512' height='512' fill='none'%3E%3Cpath fill='%23FACC15' d='M0 0h512v512H0V0Z'/%3E%3Cpath fill='%23000' d='m264.536 203.704-41.984 89.6-21.504-9.728c-20.139-9.216-35.669-21.504-46.592-36.864-10.923-15.36-16.384-37.717-16.384-67.072 0-37.547 9.728-65.536 29.184-83.968 19.797-18.773 52.395-28.33 97.792-28.672 18.773 0 35.84.853 51.2 2.56s27.648 3.584 36.864 5.632l13.824 2.56-10.24 82.432-12.8-1.536c-8.192-1.024-18.432-1.877-30.72-2.56-12.288-1.024-24.235-1.536-35.84-1.536-12.288 0-21.675 1.877-28.16 5.632-6.144 3.413-9.216 10.069-9.216 19.968 0 5.461 2.219 9.899 6.656 13.312 4.437 3.413 10.411 6.827 17.92 10.24Zm-18.432 100.864 42.496-90.624 22.016 9.728c23.211 10.24 40.107 23.04 50.688 38.4 10.581 15.019 15.872 36.523 15.872 64.512 0 37.888-9.899 67.072-29.696 87.552-19.797 20.48-52.395 30.891-97.792 31.232-22.528 0-43.52-1.536-62.976-4.608-19.456-2.731-36.693-5.973-51.712-9.728l10.24-82.432 12.288 2.048c8.533 1.365 19.797 2.731 33.792 4.096 13.995 1.365 29.355 2.048 46.08 2.048 12.971 0 22.699-1.877 29.184-5.632 6.485-3.755 9.728-9.899 9.728-18.432 0-5.803-1.536-10.411-4.608-13.824-3.072-3.413-8.533-6.827-16.384-10.24l-9.216-4.096Z'/%3E%3C/svg%3E"/><script>window.SONDA_JSON_REPORT = JSON.parse( decodeURIComponent( `__REPORT_DATA__` ) )</script><script type="module" crossorigin>var vn=Object.defineProperty;var ir=t=>{throw TypeError(t)};var hn=(t,e,r)=>e in t?vn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var ke=(t,e,r)=>hn(t,typeof e!="symbol"?e+"":e,r),Ee=(t,e,r)=>e.has(t)||ir("Cannot "+r);var ut=(t,e,r)=>(Ee(t,e,"read from private field"),r?r.call(t):e.get(t)),Ht=(t,e,r)=>e.has(t)?ir("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r),Se=(t,e,r,n)=>(Ee(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r),or=(t,e,r)=>(Ee(t,e,"access private method"),r);var Ue=Array.isArray,Ve=Array.from,pn=Object.defineProperty,Wt=Object.getOwnPropertyDescriptor,wr=Object.getOwnPropertyDescriptors,_n=Object.prototype,gn=Array.prototype,se=Object.getPrototypeOf;function wn(t){return typeof t=="function"}const At=()=>{};function bn(t){return t()}function Ae(t){for(var e=0;e<t.length;e++)t[e]()}const ct=2,br=4,Kt=8,pe=16,at=32,_e=64,Et=128,ae=256,J=512,mt=1024,Jt=2048,nt=4096,Yt=8192,mr=16384,Zt=32768,mn=1<<18,xr=1<<19,wt=Symbol("$state"),xn=Symbol("");function yr(t){return t===this.v}function kr(t,e){return t!=t?e==e:t!==e||t!==null&&typeof t=="object"||typeof t=="function"}function yn(t){return!kr(t,this.v)}function kn(t){throw new Error("effect_in_teardown")}function En(){throw new Error("effect_in_unowned_derived")}function Sn(t){throw new Error("effect_orphan")}function Tn(){throw new Error("effect_update_depth_exceeded")}function On(){throw new Error("state_descriptors_fixed")}function Mn(){throw new Error("state_prototype_fixed")}function An(){throw new Error("state_unsafe_local_read")}function Nn(){throw new Error("state_unsafe_mutation")}function X(t){return{f:0,v:t,reactions:null,equals:yr,version:0}}function U(t){return Dn(X(t))}function Cn(t,e=!1){var n;const r=X(t);return e||(r.equals=yn),L!==null&&L.l!==null&&((n=L.l).s??(n.s=[])).push(r),r}function Dn(t){return C!==null&&C.f&ct&&(it===null?Kn([t]):it.push(t)),t}function R(t,e){return C!==null&&Xe()&&C.f&(ct|pe)&&(it===null||!it.includes(t))&&Nn(),Ne(t,e)}function Ne(t,e){return t.equals(e)||(t.v=e,t.version=Hr(),Er(t,mt),Xe()&&M!==null&&M.f&J&&!(M.f&at)&&(H!==null&&H.includes(t)?(lt(M,mt),be(M)):bt===null?Jn([t]):bt.push(t))),e}function Er(t,e){var r=t.reactions;if(r!==null)for(var n=Xe(),i=r.length,o=0;o<i;o++){var s=r[o],a=s.f;a&mt||!n&&s===M||(lt(s,e),a&(J|Et)&&(a&ct?Er(s,Jt):be(s)))}}const Ge=1,Ke=2,Sr=4,zn=8,In=16,Pn=4,Rn=1,Bn=2,G=Symbol();let Tr=!1;function tt(t,e=null,r){if(typeof t!="object"||t===null||wt in t)return t;const n=se(t);if(n!==_n&&n!==gn)return t;var i=new Map,o=Ue(t),s=X(0);o&&i.set("length",X(t.length));var a;return new Proxy(t,{defineProperty(l,u,f){(!("value"in f)||f.configurable===!1||f.enumerable===!1||f.writable===!1)&&On();var v=i.get(u);return v===void 0?(v=X(f.value),i.set(u,v)):R(v,tt(f.value,a)),!0},deleteProperty(l,u){var f=i.get(u);if(f===void 0)u in l&&i.set(u,X(G));else{if(o&&typeof u=="string"){var v=i.get("length"),c=Number(u);Number.isInteger(c)&&c<v.v&&R(v,c)}R(f,G),sr(s)}return!0},get(l,u,f){var d;if(u===wt)return t;var v=i.get(u),c=u in l;if(v===void 0&&(!c||(d=Wt(l,u))!=null&&d.writable)&&(v=X(tt(c?l[u]:G,a)),i.set(u,v)),v!==void 0){var h=p(v);return h===G?void 0:h}return Reflect.get(l,u,f)},getOwnPropertyDescriptor(l,u){var f=Reflect.getOwnPropertyDescriptor(l,u);if(f&&"value"in f){var v=i.get(u);v&&(f.value=p(v))}else if(f===void 0){var c=i.get(u),h=c==null?void 0:c.v;if(c!==void 0&&h!==G)return{enumerable:!0,configurable:!0,value:h,writable:!0}}return f},has(l,u){var h;if(u===wt)return!0;var f=i.get(u),v=f!==void 0&&f.v!==G||Reflect.has(l,u);if(f!==void 0||M!==null&&(!v||(h=Wt(l,u))!=null&&h.writable)){f===void 0&&(f=X(v?tt(l[u],a):G),i.set(u,f));var c=p(f);if(c===G)return!1}return v},set(l,u,f,v){var k;var c=i.get(u),h=u in l;if(o&&u==="length")for(var d=f;d<c.v;d+=1){var w=i.get(d+"");w!==void 0?R(w,G):d in l&&(w=X(G),i.set(d+"",w))}c===void 0?(!h||(k=Wt(l,u))!=null&&k.writable)&&(c=X(void 0),R(c,tt(f,a)),i.set(u,c)):(h=c.v!==G,R(c,tt(f,a)));var g=Reflect.getOwnPropertyDescriptor(l,u);if(g!=null&&g.set&&g.set.call(v,f),!h){if(o&&typeof u=="string"){var S=i.get("length"),y=Number(u);Number.isInteger(y)&&y>=S.v&&R(S,y+1)}sr(s)}return!0},ownKeys(l){p(s);var u=Reflect.ownKeys(l).filter(c=>{var h=i.get(c);return h===void 0||h.v!==G});for(var[f,v]of i)v.v!==G&&!(f in l)&&u.push(f);return u},setPrototypeOf(){Mn()}})}function sr(t,e=1){R(t,t.v+e)}function ar(t){return t!==null&&typeof t=="object"&&wt in t?t[wt]:t}function Ln(t,e){return Object.is(ar(t),ar(e))}var lr,ft,Or,Mr;function jn(){if(lr===void 0){lr=window,ft=document;var t=Element.prototype,e=Node.prototype;Or=Wt(e,"firstChild").get,Mr=Wt(e,"nextSibling").get,t.__click=void 0,t.__className="",t.__attributes=null,t.__styles=null,t.__e=void 0,Text.prototype.__t=void 0}}function Je(t=""){return document.createTextNode(t)}function It(t){return Or.call(t)}function ge(t){return Mr.call(t)}function b(t,e){return It(t)}function B(t,e){{var r=It(t);return r instanceof Comment&&r.data===""?ge(r):r}}function m(t,e=1,r=!1){let n=t;for(;e--;)n=ge(n);return n}function Fn(t){t.textContent=""}function T(t){var e=ct|mt;M===null?e|=Et:M.f|=xr;const r={children:null,ctx:L,deps:null,equals:yr,f:e,fn:t,reactions:null,v:null,version:0,parent:M};if(C!==null&&C.f&ct){var n=C;(n.children??(n.children=[])).push(r)}return r}function Ar(t){var e=t.children;if(e!==null){t.children=null;for(var r=0;r<e.length;r+=1){var n=e[r];n.f&ct?Ye(n):xt(n)}}}function Nr(t){var e,r=M;st(t.parent);try{Ar(t),e=qr(t)}finally{st(r)}return e}function Cr(t){var e=Nr(t),r=(Nt||t.f&Et)&&t.deps!==null?Jt:J;lt(t,r),t.equals(e)||(t.v=e,t.version=Hr())}function Ye(t){Ar(t),Vt(t,0),lt(t,Yt),t.v=t.children=t.deps=t.ctx=t.reactions=null}function Dr(t){M===null&&C===null&&Sn(),C!==null&&C.f&Et&&En(),Qe&&kn()}function Hn(t,e){var r=e.last;r===null?e.last=e.first=t:(r.next=t,t.prev=r,e.last=t)}function Rt(t,e,r,n=!0){var i=(t&_e)!==0,o=M,s={ctx:L,deps:null,deriveds:null,nodes_start:null,nodes_end:null,f:t|mt,first:null,fn:e,last:null,next:null,parent:i?null:o,prev:null,teardown:null,transitions:null,version:0};if(r){var a=Ct;try{ur(!0),we(s),s.f|=mr}catch(f){throw xt(s),f}finally{ur(a)}}else e!==null&&be(s);var l=r&&s.deps===null&&s.first===null&&s.nodes_start===null&&s.teardown===null&&(s.f&xr)===0;if(!l&&!i&&n&&(o!==null&&Hn(s,o),C!==null&&C.f&ct)){var u=C;(u.children??(u.children=[])).push(s)}return s}function qn(t){const e=Rt(Kt,null,!1);return lt(e,J),e.teardown=t,e}function Ce(t){Dr();var e=M!==null&&(M.f&at)!==0&&L!==null&&!L.m;if(e){var r=L;(r.e??(r.e=[])).push({fn:t,effect:M,reaction:C})}else{var n=Bt(t);return n}}function Wn(t){return Dr(),zr(t)}function Un(t){const e=Rt(_e,t,!0);return()=>{xt(e)}}function Bt(t){return Rt(br,t,!1)}function zr(t){return Rt(Kt,t,!0)}function N(t){return Qt(t)}function Qt(t,e=0){return Rt(Kt|pe|e,t,!0)}function kt(t,e=!0){return Rt(Kt|at,t,!0,e)}function Ir(t){var e=t.teardown;if(e!==null){const r=Qe,n=C;fr(!0),ot(null);try{e.call(null)}finally{fr(r),ot(n)}}}function Pr(t){var e=t.deriveds;if(e!==null){t.deriveds=null;for(var r=0;r<e.length;r+=1)Ye(e[r])}}function Rr(t,e=!1){var r=t.first;for(t.first=t.last=null;r!==null;){var n=r.next;xt(r,e),r=n}}function Vn(t){for(var e=t.first;e!==null;){var r=e.next;e.f&at||xt(e),e=r}}function xt(t,e=!0){var r=!1;if((e||t.f&mn)&&t.nodes_start!==null){for(var n=t.nodes_start,i=t.nodes_end;n!==null;){var o=n===i?null:ge(n);n.remove(),n=o}r=!0}Rr(t,e&&!r),Pr(t),Vt(t,0),lt(t,Yt);var s=t.transitions;if(s!==null)for(const l of s)l.stop();Ir(t);var a=t.parent;a!==null&&a.first!==null&&Br(t),t.next=t.prev=t.teardown=t.ctx=t.deps=t.parent=t.fn=t.nodes_start=t.nodes_end=null}function Br(t){var e=t.parent,r=t.prev,n=t.next;r!==null&&(r.next=n),n!==null&&(n.prev=r),e!==null&&(e.first===t&&(e.first=n),e.last===t&&(e.last=r))}function le(t,e){var r=[];Ze(t,r,!0),Lr(r,()=>{xt(t),e&&e()})}function Lr(t,e){var r=t.length;if(r>0){var n=()=>--r||e();for(var i of t)i.out(n)}else e()}function Ze(t,e,r){if(!(t.f&nt)){if(t.f^=nt,t.transitions!==null)for(const s of t.transitions)(s.is_global||r)&&e.push(s);for(var n=t.first;n!==null;){var i=n.next,o=(n.f&Zt)!==0||(n.f&at)!==0;Ze(n,e,o?r:!1),n=i}}}function ue(t){jr(t,!0)}function jr(t,e){if(t.f&nt){Xt(t)&&we(t),t.f^=nt;for(var r=t.first;r!==null;){var n=r.next,i=(r.f&Zt)!==0||(r.f&at)!==0;jr(r,i?e:!1),r=n}if(t.transitions!==null)for(const o of t.transitions)(o.is_global||e)&&o.in()}}let De=!1,ze=[];function Gn(){De=!1;const t=ze.slice();ze=[],Ae(t)}function Lt(t){De||(De=!0,queueMicrotask(Gn)),ze.push(t)}let fe=!1,Ct=!1,Qe=!1;function ur(t){Ct=t}function fr(t){Qe=t}let Ie=[],Ut=0;let C=null;function ot(t){C=t}let M=null;function st(t){M=t}let it=null;function Kn(t){it=t}let H=null,Q=0,bt=null;function Jn(t){bt=t}let Fr=0,Nt=!1,L=null;function Hr(){return++Fr}function Xe(){return L!==null&&L.l===null}function Xt(t){var s,a;var e=t.f;if(e&mt)return!0;if(e&Jt){var r=t.deps,n=(e&Et)!==0;if(r!==null){var i;if(e&ae){for(i=0;i<r.length;i++)((s=r[i]).reactions??(s.reactions=[])).push(t);t.f^=ae}for(i=0;i<r.length;i++){var o=r[i];if(Xt(o)&&Cr(o),n&&M!==null&&!Nt&&!((a=o==null?void 0:o.reactions)!=null&&a.includes(t))&&(o.reactions??(o.reactions=[])).push(t),o.version>t.version)return!0}}n||lt(t,J)}return!1}function Yn(t,e,r){throw t}function qr(t){var c;var e=H,r=Q,n=bt,i=C,o=Nt,s=it,a=L,l=t.f;H=null,Q=0,bt=null,C=l&(at|_e)?null:t,Nt=!Ct&&(l&Et)!==0,it=null,L=t.ctx;try{var u=(0,t.fn)(),f=t.deps;if(H!==null){var v;if(Vt(t,Q),f!==null&&Q>0)for(f.length=Q+H.length,v=0;v<H.length;v++)f[Q+v]=H[v];else t.deps=f=H;if(!Nt)for(v=Q;v<f.length;v++)((c=f[v]).reactions??(c.reactions=[])).push(t)}else f!==null&&Q<f.length&&(Vt(t,Q),f.length=Q);return u}finally{H=e,Q=r,bt=n,C=i,Nt=o,it=s,L=a}}function Zn(t,e){let r=e.reactions;if(r!==null){var n=r.indexOf(t);if(n!==-1){var i=r.length-1;i===0?r=e.reactions=null:(r[n]=r[i],r.pop())}}r===null&&e.f&ct&&(H===null||!H.includes(e))&&(lt(e,Jt),e.f&(Et|ae)||(e.f^=ae),Vt(e,0))}function Vt(t,e){var r=t.deps;if(r!==null)for(var n=e;n<r.length;n++)Zn(t,r[n])}function we(t){var e=t.f;if(!(e&Yt)){lt(t,J);var r=M;M=t;try{e&pe?Vn(t):Rr(t),Pr(t),Ir(t);var n=qr(t);t.teardown=typeof n=="function"?n:null,t.version=Fr}catch(i){Yn(i)}finally{M=r}}}function Qn(){Ut>1e3&&(Ut=0,Tn()),Ut++}function Xn(t){var e=t.length;if(e!==0){Qn();var r=Ct;Ct=!0;try{for(var n=0;n<e;n++){var i=t[n];i.f&J||(i.f^=J);var o=[];Wr(i,o),$n(o)}}finally{Ct=r}}}function $n(t){var e=t.length;if(e!==0)for(var r=0;r<e;r++){var n=t[r];!(n.f&(Yt|nt))&&Xt(n)&&(we(n),n.deps===null&&n.first===null&&n.nodes_start===null&&(n.teardown===null?Br(n):n.fn=null))}}function ti(){if(fe=!1,Ut>1001)return;const t=Ie;Ie=[],Xn(t),fe||(Ut=0)}function be(t){fe||(fe=!0,queueMicrotask(ti));for(var e=t;e.parent!==null;){e=e.parent;var r=e.f;if(r&(_e|at)){if(!(r&J))return;e.f^=J}}Ie.push(e)}function Wr(t,e){var r=t.first,n=[];t:for(;r!==null;){var i=r.f,o=(i&at)!==0,s=o&&(i&J)!==0;if(!s&&!(i&nt))if(i&Kt){o?r.f^=J:Xt(r)&&we(r);var a=r.first;if(a!==null){r=a;continue}}else i&br&&n.push(r);var l=r.next;if(l===null){let v=r.parent;for(;v!==null;){if(t===v)break t;var u=v.next;if(u!==null){r=u;continue t}v=v.parent}}r=l}for(var f=0;f<n.length;f++)a=n[f],e.push(a),Wr(a,e)}function p(t){var a;var e=t.f,r=(e&ct)!==0;if(r&&e&Yt){var n=Nr(t);return Ye(t),n}if(C!==null){it!==null&&it.includes(t)&&An();var i=C.deps;H===null&&i!==null&&i[Q]===t?Q++:H===null?H=[t]:H.push(t),bt!==null&&M!==null&&M.f&J&&!(M.f&at)&&bt.includes(t)&&(lt(M,mt),be(M))}else if(r&&t.deps===null){var o=t,s=o.parent;s!==null&&!((a=s.deriveds)!=null&&a.includes(o))&&(s.deriveds??(s.deriveds=[])).push(o)}return r&&(o=t,Xt(o)&&Cr(o)),t.v}function $t(t){const e=C;try{return C=null,t()}finally{C=e}}const ei=~(mt|Jt|J);function lt(t,e){t.f=t.f&ei|e}function q(t,e=!1,r){L={p:L,c:null,e:null,m:!1,s:t,x:null,l:null},e||(L.l={s:null,u:null,r1:[],r2:X(!1)})}function W(t){const e=L;if(e!==null){const s=e.e;if(s!==null){var r=M,n=C;e.e=null;try{for(var i=0;i<s.length;i++){var o=s[i];st(o.effect),ot(o.reaction),Bt(o.fn)}}finally{st(r),ot(n)}}L=e.p,e.m=!0}return{}}function ri(t){if(!(typeof t!="object"||!t||t instanceof EventTarget)){if(wt in t)Pe(t);else if(!Array.isArray(t))for(let e in t){const r=t[e];typeof r=="object"&&r&&wt in r&&Pe(r)}}}function Pe(t,e=new Set){if(typeof t=="object"&&t!==null&&!(t instanceof EventTarget)&&!e.has(t)){e.add(t),t instanceof Date&&t.getTime();for(let n in t)try{Pe(t[n],e)}catch{}const r=se(t);if(r!==Object.prototype&&r!==Array.prototype&&r!==Map.prototype&&r!==Set.prototype&&r!==Date.prototype){const n=wr(r);for(let i in n){const o=n[i].get;if(o)try{o.call(t)}catch{}}}}}const Ur=new Set,Re=new Set;function Be(t,e,r,n){function i(o){if(n.capture||qt.call(e,o),!o.cancelBubble){var s=C,a=M;ot(null),st(null);try{return r.call(this,o)}finally{ot(s),st(a)}}}return t.startsWith("pointer")||t.startsWith("touch")||t==="wheel"?Lt(()=>{e.addEventListener(t,i,n)}):e.addEventListener(t,i,n),i}function Dt(t,e,r,n,i){var o={capture:n,passive:i},s=Be(t,e,r,o);(e===document.body||e===window||e===document)&&qn(()=>{e.removeEventListener(t,s,o)})}function St(t){for(var e=0;e<t.length;e++)Ur.add(t[e]);for(var r of Re)r(t)}function qt(t){var y;var e=this,r=e.ownerDocument,n=t.type,i=((y=t.composedPath)==null?void 0:y.call(t))||[],o=i[0]||t.target,s=0,a=t.__root;if(a){var l=i.indexOf(a);if(l!==-1&&(e===document||e===window)){t.__root=e;return}var u=i.indexOf(e);if(u===-1)return;l<=u&&(s=l)}if(o=i[s]||t.target,o!==e){pn(t,"currentTarget",{configurable:!0,get(){return o||r}});var f=C,v=M;ot(null),st(null);try{for(var c,h=[];o!==null;){var d=o.assignedSlot||o.parentNode||o.host||null;try{var w=o["__"+n];if(w!==void 0&&!o.disabled)if(Ue(w)){var[g,...S]=w;g.apply(o,[t,...S])}else w.call(o,t)}catch(k){c?h.push(k):c=k}if(t.cancelBubble||d===e||d===null)break;o=d}if(c){for(let k of h)queueMicrotask(()=>{throw k});throw c}}finally{t.__root=e,delete t.currentTarget,ot(f),st(v)}}}function Vr(t){var e=document.createElement("template");return e.innerHTML=t,e.content}function ce(t,e){var r=M;r.nodes_start===null&&(r.nodes_start=t,r.nodes_end=e)}function A(t,e){var r=(e&Rn)!==0,n=(e&Bn)!==0,i,o=!t.startsWith("<!>");return()=>{i===void 0&&(i=Vr(o?t:"<!>"+t),r||(i=It(i)));var s=n?document.importNode(i,!0):i.cloneNode(!0);if(r){var a=It(s),l=s.lastChild;ce(a,l)}else ce(s,s);return s}}function te(t,e,r="svg"){var n=!t.startsWith("<!>"),i=`<${r}>${n?t:"<!>"+t}</${r}>`,o;return()=>{if(!o){var s=Vr(i),a=It(s);o=It(a)}var l=o.cloneNode(!0);return ce(l,l),l}}function jt(){var t=document.createDocumentFragment(),e=document.createComment(""),r=Je();return t.append(e,r),ce(e,r),t}function E(t,e){t!==null&&t.before(e)}function ni(t){return t.endsWith("capture")&&t!=="gotpointercapture"&&t!=="lostpointercapture"}const ii=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function oi(t){return ii.includes(t)}const si={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly"};function ai(t){return t=t.toLowerCase(),si[t]??t}const li=["touchstart","touchmove"];function ui(t){return li.includes(t)}let Le=!0;function D(t,e){var r=e==null?"":typeof e=="object"?e+"":e;r!==(t.__t??(t.__t=t.nodeValue))&&(t.__t=r,t.nodeValue=r==null?"":r+"")}function fi(t,e){return ci(t,e)}const Mt=new Map;function ci(t,{target:e,anchor:r,props:n={},events:i,context:o,intro:s=!0}){jn();var a=new Set,l=v=>{for(var c=0;c<v.length;c++){var h=v[c];if(!a.has(h)){a.add(h);var d=ui(h);e.addEventListener(h,qt,{passive:d});var w=Mt.get(h);w===void 0?(document.addEventListener(h,qt,{passive:d}),Mt.set(h,1)):Mt.set(h,w+1)}}};l(Ve(Ur)),Re.add(l);var u=void 0,f=Un(()=>{var v=r??e.appendChild(Je());return kt(()=>{if(o){q({});var c=L;c.c=o}i&&(n.$$events=i),Le=s,u=t(v,n)||{},Le=!0,o&&W()}),()=>{var d;for(var c of a){e.removeEventListener(c,qt);var h=Mt.get(c);--h===0?(document.removeEventListener(c,qt),Mt.delete(c)):Mt.set(c,h)}Re.delete(l),cr.delete(u),v!==r&&((d=v.parentNode)==null||d.removeChild(v))}});return cr.set(u,f),u}let cr=new WeakMap;function P(t,e,r,n=null,i=!1){var o=t,s=null,a=null,l=null,u=i?Zt:0;Qt(()=>{l!==(l=!!e())&&(l?(s?ue(s):s=kt(()=>r(o)),a&&le(a,()=>{a=null})):(a?ue(a):n&&(a=kt(()=>n(o))),s&&le(s,()=>{s=null})))},u)}function di(t,e,r){var n=t,i=G,o;Qt(()=>{kr(i,i=e())&&(o&&le(o),o=kt(()=>r(n)))})}let Te=null;function Gr(t,e){return e}function vi(t,e,r,n){for(var i=[],o=e.length,s=0;s<o;s++)Ze(e[s].e,i,!0);var a=o>0&&i.length===0&&r!==null;if(a){var l=r.parentNode;Fn(l),l.append(r),n.clear(),ht(t,e[0].prev,e[o-1].next)}Lr(i,()=>{for(var u=0;u<o;u++){var f=e[u];a||(n.delete(f.k),ht(t,f.prev,f.next)),xt(f.e,!a)}})}function me(t,e,r,n,i,o=null){var s=t,a={flags:e,items:new Map,first:null},l=(e&Sr)!==0;if(l){var u=t;s=u.appendChild(Je())}var f=null,v=!1;Qt(()=>{var c=r(),h=Ue(c)?c:c==null?[]:Ve(c),d=h.length;if(!(v&&d===0)){v=d===0;{var w=C;hi(h,a,s,i,e,(w.f&nt)!==0,n)}o!==null&&(d===0?f?ue(f):f=kt(()=>o(s)):f!==null&&le(f,()=>{f=null})),r()}})}function hi(t,e,r,n,i,o,s){var re,ne,rt,V;var a=(i&zn)!==0,l=(i&(Ge|Ke))!==0,u=t.length,f=e.items,v=e.first,c=v,h,d=null,w,g=[],S=[],y,k,_,x;if(a)for(x=0;x<u;x+=1)y=t[x],k=s(y,x),_=f.get(k),_!==void 0&&((re=_.a)==null||re.measure(),(w??(w=new Set)).add(_));for(x=0;x<u;x+=1){if(y=t[x],k=s(y,x),_=f.get(k),_===void 0){var O=c?c.e.nodes_start:r;d=_i(O,e,d,d===null?e.first:d.next,y,k,x,n,i),f.set(k,d),g=[],S=[],c=d.next;continue}if(l&&pi(_,y,x,i),_.e.f&nt&&(ue(_.e),a&&((ne=_.a)==null||ne.unfix(),(w??(w=new Set)).delete(_))),_!==c){if(h!==void 0&&h.has(_)){if(g.length<S.length){var z=S[0],I;d=z.prev;var Y=g[0],$=g[g.length-1];for(I=0;I<g.length;I+=1)dr(g[I],z,r);for(I=0;I<S.length;I+=1)h.delete(S[I]);ht(e,Y.prev,$.next),ht(e,d,Y),ht(e,$,z),c=z,d=$,x-=1,g=[],S=[]}else h.delete(_),dr(_,c,r),ht(e,_.prev,_.next),ht(e,_,d===null?e.first:d.next),ht(e,d,_),d=_;continue}for(g=[],S=[];c!==null&&c.k!==k;)(o||!(c.e.f&nt))&&(h??(h=new Set)).add(c),S.push(c),c=c.next;if(c===null)continue;_=c}g.push(_),d=_,c=_.next}if(c!==null||h!==void 0){for(var dt=h===void 0?[]:Ve(h);c!==null;)(o||!(c.e.f&nt))&&dt.push(c),c=c.next;var Tt=dt.length;if(Tt>0){var ye=i&Sr&&u===0?r:null;if(a){for(x=0;x<Tt;x+=1)(rt=dt[x].a)==null||rt.measure();for(x=0;x<Tt;x+=1)(V=dt[x].a)==null||V.fix()}vi(e,dt,ye,f)}}a&&Lt(()=>{var Z;if(w!==void 0)for(_ of w)(Z=_.a)==null||Z.apply()}),M.first=e.first&&e.first.e,M.last=d&&d.e}function pi(t,e,r,n){n&Ge&&Ne(t.v,e),n&Ke?Ne(t.i,r):t.i=r}function _i(t,e,r,n,i,o,s,a,l){var u=Te;try{var f=(l&Ge)!==0,v=(l&In)===0,c=f?v?Cn(i):X(i):i,h=l&Ke?X(s):s,d={i:h,v:c,k:o,a:null,e:null,prev:r,next:n};return Te=d,d.e=kt(()=>a(t,c,h),Tr),d.e.prev=r&&r.e,d.e.next=n&&n.e,r===null?e.first=d:(r.next=d,r.e.next=d.e),n!==null&&(n.prev=d,n.e.prev=d.e),d}finally{Te=u}}function dr(t,e,r){for(var n=t.next?t.next.e.nodes_start:r,i=e?e.e.nodes_start:r,o=t.e.nodes_start;o!==n;){var s=ge(o);i.before(o),o=s}}function ht(t,e,r){e===null?t.first=r:(e.next=r,e.e.next=r&&r.e),r!==null&&(r.prev=e,r.e.prev=e&&e.e)}function gi(t,e,...r){var n=t,i=At,o;Qt(()=>{i!==(i=e())&&(o&&(xt(o),o=null),o=kt(()=>i(n,...r)))},Zt)}function wi(t,e){if(e){const r=document.body;t.autofocus=!0,Lt(()=>{document.activeElement===r&&t.focus()})}}function j(t,e,r,n){var i=t.__attributes??(t.__attributes={});i[e]!==(i[e]=r)&&(e==="style"&&"__styles"in t&&(t.__styles={}),e==="loading"&&(t[xn]=r),r==null?t.removeAttribute(e):typeof r!="string"&&Kr(t).includes(e)?t[e]=r:t.setAttribute(e,r))}function $e(t,e,r,n,i=!1,o=!1,s=!1){var a=e||{},l=t.tagName==="OPTION";for(var u in e)u in r||(r[u]=null);var f=Kr(t),v=t.__attributes??(t.__attributes={}),c=[];for(const y in r){let k=r[y];if(l&&y==="value"&&k==null){t.value=t.__value="",a[y]=k;continue}var h=a[y];if(k!==h){a[y]=k;var d=y[0]+y[1];if(d!=="$$"){if(d==="on"){const _={},x="$$"+y;let O=y.slice(2);var w=oi(O);if(ni(O)&&(O=O.slice(0,-7),_.capture=!0),!w&&h){if(k!=null)continue;t.removeEventListener(O,a[x],_),a[x]=null}if(k!=null)if(w)t[`__${O}`]=k,St([O]);else{let z=function(I){a[y].call(this,I)};var S=z;e?a[x]=Be(O,t,z,_):c.push([y,k,()=>a[x]=Be(O,t,z,_)])}}else if(y==="style"&&k!=null)t.style.cssText=k+"";else if(y==="autofocus")wi(t,!!k);else if(y==="__value"||y==="value"&&k!=null)t.value=t[y]=t.__value=k;else{var g=y;i||(g=ai(g)),k==null&&!o?(v[y]=null,t.removeAttribute(y)):f.includes(g)&&(o||typeof k!="string")?t[g]=k:typeof k!="function"&&j(t,g,k)}y==="style"&&"__styles"in t&&(t.__styles={})}}}return e||Lt(()=>{if(t.isConnected)for(const[y,k,_]of c)a[y]===k&&_()}),a}var vr=new Map;function Kr(t){var e=vr.get(t.nodeName);if(e)return e;vr.set(t.nodeName,e=[]);for(var r,n=se(t),i=Element.prototype;i!==n;){r=wr(n);for(var o in r)r[o].set&&e.push(o);n=se(n)}return e}function bi(t,e){var r=t.__className,n=mi(e);(r!==n||Tr)&&(n===""?t.removeAttribute("class"):t.setAttribute("class",n),t.__className=n)}function mi(t){return t??""}function de(t,e,r){if(r){if(t.classList.contains(e))return;t.classList.add(e)}else{if(!t.classList.contains(e))return;t.classList.remove(e)}}function je(t,e,r,n){var i=t.__styles??(t.__styles={});i[e]!==r&&(i[e]=r,r==null?t.style.removeProperty(e):t.style.setProperty(e,r,""))}const xi=()=>performance.now(),_t={tick:t=>requestAnimationFrame(t),now:()=>xi(),tasks:new Set};function Jr(t){_t.tasks.forEach(e=>{e.c(t)||(_t.tasks.delete(e),e.f())}),_t.tasks.size!==0&&_t.tick(Jr)}function yi(t){let e;return _t.tasks.size===0&&_t.tick(Jr),{promise:new Promise(r=>{_t.tasks.add(e={c:t,f:r})}),abort(){_t.tasks.delete(e)}}}function ie(t,e){t.dispatchEvent(new CustomEvent(e))}function ki(t){if(t==="float")return"cssFloat";if(t==="offset")return"cssOffset";if(t.startsWith("--"))return t;const e=t.split("-");return e.length===1?e[0]:e[0]+e.slice(1).map(r=>r[0].toUpperCase()+r.slice(1)).join("")}function hr(t){const e={},r=t.split(";");for(const n of r){const[i,o]=n.split(":");if(!i||o===void 0)break;const s=ki(i.trim());e[s]=o.trim()}return e}const Ei=t=>t;function Si(t,e,r,n){var i=(t&Pn)!==0,o="both",s,a=e.inert,l,u;function f(){var w=C,g=M;ot(null),st(null);try{return s??(s=r()(e,(n==null?void 0:n())??{},{direction:o}))}finally{ot(w),st(g)}}var v={is_global:i,in(){e.inert=a,ie(e,"introstart"),l=Fe(e,f(),u,1,()=>{ie(e,"introend"),l==null||l.abort(),l=s=void 0})},out(w){e.inert=!0,ie(e,"outrostart"),u=Fe(e,f(),l,0,()=>{ie(e,"outroend"),w==null||w()})},stop:()=>{l==null||l.abort(),u==null||u.abort()}},c=M;if((c.transitions??(c.transitions=[])).push(v),Le){var h=i;if(!h){for(var d=c.parent;d&&d.f&Zt;)for(;(d=d.parent)&&!(d.f&pe););h=!d||(d.f&mr)!==0}h&&Bt(()=>{$t(()=>v.in())})}}function Fe(t,e,r,n,i){var o=n===1;if(wn(e)){var s,a=!1;return Lt(()=>{if(!a){var g=e({direction:o?"in":"out"});s=Fe(t,g,r,n,i)}}),{abort:()=>{a=!0,s==null||s.abort()},deactivate:()=>s.deactivate(),reset:()=>s.reset(),t:()=>s.t()}}if(r==null||r.deactivate(),!(e!=null&&e.duration))return i(),{abort:At,deactivate:At,reset:At,t:()=>n};const{delay:l=0,css:u,tick:f,easing:v=Ei}=e;var c=[];if(o&&r===void 0&&(f&&f(0,1),u)){var h=hr(u(0,1));c.push(h,h)}var d=()=>1-n,w=t.animate(c,{duration:l});return w.onfinish=()=>{var g=(r==null?void 0:r.t())??1-n;r==null||r.abort();var S=n-g,y=e.duration*Math.abs(S),k=[];if(y>0){if(u)for(var _=Math.ceil(y/16.666666666666668),x=0;x<=_;x+=1){var O=g+S*v(x/_),z=u(O,1-O);k.push(hr(z))}d=()=>{var I=w.currentTime;return g+S*v(I/y)},f&&yi(()=>{if(w.playState!=="running")return!1;var I=d();return f(I,1-I),!0})}w=t.animate(k,{duration:y,fill:"forwards"}),w.onfinish=()=>{d=()=>n,f==null||f(n,1-n),i()}},{abort:()=>{w&&(w.cancel(),w.effect=null,w.onfinish=At)},deactivate:()=>{i=At},reset:()=>{n===0&&(f==null||f(1,0))},t:()=>d()}}function He(t,e,r){if(t.multiple)return Oi(t,e);for(var n of t.options){var i=Yr(n);if(Ln(i,e)){n.selected=!0;return}}(!r||e!==void 0)&&(t.selectedIndex=-1)}function Ti(t,e){let r=!0;Bt(()=>{e&&He(t,$t(e),r),r=!1;var n=new MutationObserver(()=>{var i=t.__value;He(t,i)});return n.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),()=>{n.disconnect()}})}function Oi(t,e){for(var r of t.options)r.selected=~e.indexOf(Yr(r))}function Yr(t){return"__value"in t?t.__value:t.value}var pt,zt,Gt,ve,Zr;const he=class he{constructor(e){Ht(this,ve);Ht(this,pt,new WeakMap);Ht(this,zt);Ht(this,Gt);Se(this,Gt,e)}observe(e,r){var n=ut(this,pt).get(e)||new Set;return n.add(r),ut(this,pt).set(e,n),or(this,ve,Zr).call(this).observe(e,ut(this,Gt)),()=>{var i=ut(this,pt).get(e);i.delete(r),i.size===0&&(ut(this,pt).delete(e),ut(this,zt).unobserve(e))}}};pt=new WeakMap,zt=new WeakMap,Gt=new WeakMap,ve=new WeakSet,Zr=function(){return ut(this,zt)??Se(this,zt,new ResizeObserver(e=>{for(var r of e){he.entries.set(r.target,r);for(var n of ut(this,pt).get(r.target)||[])n(r)}}))},ke(he,"entries",new WeakMap);let qe=he;var Mi=new qe({box:"border-box"});function gt(t,e,r){var n=Mi.observe(t,()=>r(t[e]));Bt(()=>($t(()=>r(t[e])),n))}function pr(t,e){return t===e||(t==null?void 0:t[wt])===e}function Qr(t={},e,r,n){return Bt(()=>{var i,o;return zr(()=>{i=o,o=[],$t(()=>{t!==r(...o)&&(e(t,...o),i&&pr(r(...i),t)&&e(null,...i))})}),()=>{Lt(()=>{o&&pr(r(...o),t)&&e(null,...o)})}}),t}function xe(t=!1){const e=L,r=e.l.u;if(!r)return;let n=()=>ri(e.s);if(t){let i=0,o={};const s=T(()=>{let a=!1;const l=e.s;for(const u in l)l[u]!==o[u]&&(o[u]=l[u],a=!0);return a&&i++,i});n=()=>p(s)}r.b.length&&Wn(()=>{_r(e,n),Ae(r.b)}),Ce(()=>{const i=$t(()=>r.m.map(bn));return()=>{for(const o of i)typeof o=="function"&&o()}}),r.a.length&&Ce(()=>{_r(e,n),Ae(r.a)})}function _r(t,e){if(t.l.s)for(const r of t.l.s)p(r);e()}const Ai={get(t,e){if(!t.exclude.includes(e))return t.props[e]},set(t,e){return!1},getOwnPropertyDescriptor(t,e){if(!t.exclude.includes(e)&&e in t.props)return{enumerable:!0,configurable:!0,value:t.props[e]}},has(t,e){return t.exclude.includes(e)?!1:e in t.props},ownKeys(t){return Reflect.ownKeys(t.props).filter(e=>!t.exclude.includes(e))}};function tr(t,e,r){return new Proxy({props:t,exclude:e},Ai)}const Ni="5";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(Ni);var Ci=te('<svg><path d="M0 0h24v24H0z" stroke="none"></path><path d="M18 6 6 18M6 6l12 12"></path></svg>');function Di(t,e){let r=tr(e,["$$slots","$$events","$$legacy"]);var n=Ci();let i;N(()=>i=$e(n,i,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",...r},void 0,!0)),E(t,n)}const zi=t=>t;function Ii(t,{delay:e=0,duration:r=400,easing:n=zi}={}){const i=+getComputedStyle(t).opacity;return{delay:e,duration:r,easing:n,css:o=>`opacity: ${o*i}`}}function Pi(){let t=U("uncompressed");return{get type(){return p(t)},setType(e){R(t,tt(e))}}}function Ri(){let t=tt({file:null,folder:null,output:null,duplicates:null,code:null}),e=tt([]);return{get file(){return t.file},get folder(){return t.folder},get output(){return t.output},get duplicates(){return t.duplicates},get code(){return t.code},open(r,n){e.push(r),t[r]=n},close(){e.length!==0&&(t[e.pop()]=null)}}}function Bi(t){return Object.entries(t.outputs).map(([e,r])=>{const n=new Li;return Object.entries(r.inputs).forEach(([i,o])=>n.insert(i,o)),n.root.name=e,n.root.map=r.map,n.root.uncompressed=r.uncompressed,n.root.gzip=r.gzip,n.root.brotli=r.brotli,n.optimize(),n})}function yt(t){return"items"in t}class Li{constructor(){ke(this,"root");this.root=this.createNode("","")}createNode(e,r){return{name:e,path:r,uncompressed:0,gzip:0,brotli:0,items:[]}}insert(e,r){const n=e.split("/"),i=n.pop();let o=this.root;n.forEach(s=>{let a=o.items.find(l=>yt(l)&&l.name===s);a||(a=this.createNode(s,o.path?`${o.path}/${s}`:s),o.items.push(a)),o=a,o.uncompressed+=r.uncompressed,o.gzip+=r.gzip,o.brotli+=r.brotli}),o.items.push({name:i,path:o.path?`${o.path}/${i}`:i,uncompressed:r.uncompressed,gzip:r.gzip,brotli:r.brotli})}optimize(){const e=[this.root];for(;e.length;){const r=e.pop();for(;r.items.length===1&&yt(r.items[0]);){const n=r.items[0];r.name=`${r.name}/${n.name}`,r.path=n.path,r.items=n.items}r.items.sort((n,i)=>i.uncompressed-n.uncompressed),r.items.forEach(n=>yt(n)&&e.push(n))}}get(e){let r=this.root;for(;r&&r.path!==e;)r=yt(r)&&r.items.find(n=>e.startsWith(n.path))||null;return r}}const We=Bi(window.SONDA_JSON_REPORT);function ji(){let t=U(0);const e=T(()=>We.at(p(t)));return{get index(){return p(t)},get output(){return p(e)},setIndex(r){R(t,tt(r))}}}const Fi=/(.*)(?:.*node_modules\/)(@[^\/]+\/[^\/]+|[^\/]+)/,Hi=Object.keys(window.SONDA_JSON_REPORT.inputs).map(t=>Fi.exec(t)).filter(t=>t!==null).reduce((t,e)=>{const[r,,n]=e;return t.has(n)||t.set(n,new Set),t.get(n).add(r),t},new Map),oe=new Map(Array.from(Hi).filter(([,t])=>t.size>1).map(([t,e])=>[t,Array.from(e)])),K=ji(),Pt=Pi(),F=Ri();var qi=()=>F.close(),Wi=A('<div class="fixed top-0 right-0 left-0 bottom-0 flex justify-center items-center"><div class="fixed bg-gray-200/70 w-full h-full backdrop-blur-sm" aria-hidden="true"></div> <div class="bg-white relative flex flex-col rounded-lg border p-6 shadow-lg overflow-hidden max-h-[95vh] max-w-[95vw]"><div class="mb-4"><h2 class="py-2 pr-6 block align-text-bottom font-semibold leading-none tracking-tight text-base border-b-2 border-gray-300 border-dashed"> </h2> <button aria-label="Close dialog" class="absolute top-0 right-0 mt-2 mr-2 flex justify-center items-center border border-transparent rounded-full w-10 h-10 text-gray-600 hover:text-gray-900"><!></button></div> <!></div></div>');function ee(t,e){q(e,!0);let r=U(void 0);function n(h){h.target===p(r)&&F.close()}var i=Wi();Dt("click",ft.body,n);var o=b(i);Qr(o,h=>R(r,h),()=>p(r));var s=m(o,2),a=b(s),l=b(a),u=b(l),f=m(l,2);f.__click=[qi];var v=b(f);Di(v,{});var c=m(a,2);gi(c,()=>e.children),N(()=>{de(s,"w-[95vw]",e.large),de(s,"h-[95vh]",e.large),D(u,e.heading)}),Si(3,i,()=>Ii,()=>({duration:150})),E(t,i),W()}St(["click"]);var Ui=A('<div class="p-4 mb-8 text-sm text-red-800 rounded-lg bg-red-50 svelte-ls0uun" role="alert"><p class="font-bold svelte-ls0uun">Your browser does not support the <a class="underline svelte-ls0uun" href="https://developer.mozilla.org/en-US/docs/Web/API/CSS_Custom_Highlight_API">CSS Custom Highlight API</a>.</p> <p class="mt-4 svelte-ls0uun">To use this feature, please update your browser to a version that supports it, or use a different browser. See the <a class="underline svelte-ls0uun" href="https://developer.mozilla.org/en-US/docs/Web/API/CSS_Custom_Highlight_API#browser_compatibility">Browser Compatibility page</a> for more information.</p></div>'),Vi=A(`
|
|
1
|
+
<!doctype html><html lang="en"><head><meta charset="UTF-8"/><link rel="icon" href="data:;base64,iVBORw0KGgo="/><meta name="viewport" content="width=device-width,initial-scale=1"/><title>Sonda report</title><link rel="icon" type="image/svg+xml" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='512' height='512' fill='none'%3E%3Cpath fill='%23FACC15' d='M0 0h512v512H0V0Z'/%3E%3Cpath fill='%23000' d='m264.536 203.704-41.984 89.6-21.504-9.728c-20.139-9.216-35.669-21.504-46.592-36.864-10.923-15.36-16.384-37.717-16.384-67.072 0-37.547 9.728-65.536 29.184-83.968 19.797-18.773 52.395-28.33 97.792-28.672 18.773 0 35.84.853 51.2 2.56s27.648 3.584 36.864 5.632l13.824 2.56-10.24 82.432-12.8-1.536c-8.192-1.024-18.432-1.877-30.72-2.56-12.288-1.024-24.235-1.536-35.84-1.536-12.288 0-21.675 1.877-28.16 5.632-6.144 3.413-9.216 10.069-9.216 19.968 0 5.461 2.219 9.899 6.656 13.312 4.437 3.413 10.411 6.827 17.92 10.24Zm-18.432 100.864 42.496-90.624 22.016 9.728c23.211 10.24 40.107 23.04 50.688 38.4 10.581 15.019 15.872 36.523 15.872 64.512 0 37.888-9.899 67.072-29.696 87.552-19.797 20.48-52.395 30.891-97.792 31.232-22.528 0-43.52-1.536-62.976-4.608-19.456-2.731-36.693-5.973-51.712-9.728l10.24-82.432 12.288 2.048c8.533 1.365 19.797 2.731 33.792 4.096 13.995 1.365 29.355 2.048 46.08 2.048 12.971 0 22.699-1.877 29.184-5.632 6.485-3.755 9.728-9.899 9.728-18.432 0-5.803-1.536-10.411-4.608-13.824-3.072-3.413-8.533-6.827-16.384-10.24l-9.216-4.096Z'/%3E%3C/svg%3E"/><script>window.SONDA_JSON_REPORT = JSON.parse( decodeURIComponent( `__REPORT_DATA__` ) )</script><script type="module" crossorigin>var mn=Object.defineProperty;var cr=t=>{throw TypeError(t)};var xn=(t,e,r)=>e in t?mn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var Ce=(t,e,r)=>xn(t,typeof e!="symbol"?e+"":e,r),De=(t,e,r)=>e.has(t)||cr("Cannot "+r);var vt=(t,e,r)=>(De(t,e,"read from private field"),r?r.call(t):e.get(t)),Wt=(t,e,r)=>e.has(t)?cr("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r),ze=(t,e,r,n)=>(De(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r),dr=(t,e,r)=>(De(t,e,"access private method"),r);var Qe=Array.isArray,Xe=Array.from,yn=Object.defineProperty,Ut=Object.getOwnPropertyDescriptor,Er=Object.getOwnPropertyDescriptors,kn=Object.prototype,En=Array.prototype,$e=Object.getPrototypeOf;function Sn(t){return typeof t=="function"}const Nt=()=>{};function Tn(t){return t()}function Re(t){for(var e=0;e<t.length;e++)t[e]()}const it=2,Sr=4,Zt=8,me=16,ct=32,xe=64,Be=128,Tt=256,de=512,X=1024,kt=2048,Qt=4096,at=8192,Bt=16384,Tr=32768,Xt=65536,On=1<<19,Or=1<<20,xt=Symbol("$state"),An=Symbol("");function Ar(t){return t===this.v}function Mr(t,e){return t!=t?e==e:t!==e||t!==null&&typeof t=="object"||typeof t=="function"}function Mn(t,e){return t!==e}function Nn(t){return!Mr(t,this.v)}function Cn(t){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Dn(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function zn(t){throw new Error("https://svelte.dev/e/effect_orphan")}function In(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Pn(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Rn(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Bn(){throw new Error("https://svelte.dev/e/state_unsafe_local_read")}function jn(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}let ye=!1;function Ln(){ye=!0}const tr=1,er=2,Nr=4,Fn=8,Hn=16,qn=4,Wn=1,Vn=2,Y=Symbol();function tt(t,e){var r={f:0,v:t,reactions:null,equals:Ar,version:0};return r}function Z(t){return Gn(tt(t))}function Un(t,e=!1){var n;const r=tt(t);return e||(r.equals=Nn),ye&&F!==null&&F.l!==null&&((n=F.l).s??(n.s=[])).push(r),r}function Gn(t){return D!==null&&D.f&it&&(lt===null?ni([t]):lt.push(t)),t}function B(t,e){return D!==null&&Ee()&&D.f&(it|me)&&(lt===null||!lt.includes(t))&&jn(),je(t,e)}function je(t,e){return t.equals(e)||(t.v=e,t.version=Kr(),Cr(t,kt),Ee()&&M!==null&&M.f&X&&!(M.f&ct)&&(U!==null&&U.includes(t)?(dt(M,kt),Oe(M)):yt===null?ii([t]):yt.push(t))),e}function Cr(t,e){var r=t.reactions;if(r!==null)for(var n=Ee(),i=r.length,o=0;o<i;o++){var s=r[o],c=s.f;c&kt||!n&&s===M||(dt(s,e),c&(X|Tt)&&(c&it?Cr(s,Qt):Oe(s)))}}let Dr=!1;function et(t,e=null,r){if(typeof t!="object"||t===null||xt in t)return t;const n=$e(t);if(n!==kn&&n!==En)return t;var i=new Map,o=Qe(t),s=tt(0);o&&i.set("length",tt(t.length));var c;return new Proxy(t,{defineProperty(a,u,l){(!("value"in l)||l.configurable===!1||l.enumerable===!1||l.writable===!1)&&Pn();var d=i.get(u);return d===void 0?(d=tt(l.value),i.set(u,d)):B(d,et(l.value,c)),!0},deleteProperty(a,u){var l=i.get(u);if(l===void 0)u in a&&i.set(u,tt(Y));else{if(o&&typeof u=="string"){var d=i.get("length"),v=Number(u);Number.isInteger(v)&&v<d.v&&B(d,v)}B(l,Y),vr(s)}return!0},get(a,u,l){var h;if(u===xt)return t;var d=i.get(u),v=u in a;if(d===void 0&&(!v||(h=Ut(a,u))!=null&&h.writable)&&(d=tt(et(v?a[u]:Y,c)),i.set(u,d)),d!==void 0){var f=_(d);return f===Y?void 0:f}return Reflect.get(a,u,l)},getOwnPropertyDescriptor(a,u){var l=Reflect.getOwnPropertyDescriptor(a,u);if(l&&"value"in l){var d=i.get(u);d&&(l.value=_(d))}else if(l===void 0){var v=i.get(u),f=v==null?void 0:v.v;if(v!==void 0&&f!==Y)return{enumerable:!0,configurable:!0,value:f,writable:!0}}return l},has(a,u){var f;if(u===xt)return!0;var l=i.get(u),d=l!==void 0&&l.v!==Y||Reflect.has(a,u);if(l!==void 0||M!==null&&(!d||(f=Ut(a,u))!=null&&f.writable)){l===void 0&&(l=tt(d?et(a[u],c):Y),i.set(u,l));var v=_(l);if(v===Y)return!1}return d},set(a,u,l,d){var y;var v=i.get(u),f=u in a;if(o&&u==="length")for(var h=l;h<v.v;h+=1){var p=i.get(h+"");p!==void 0?B(p,Y):h in a&&(p=tt(Y),i.set(h+"",p))}v===void 0?(!f||(y=Ut(a,u))!=null&&y.writable)&&(v=tt(void 0),B(v,et(l,c)),i.set(u,v)):(f=v.v!==Y,B(v,et(l,c)));var w=Reflect.getOwnPropertyDescriptor(a,u);if(w!=null&&w.set&&w.set.call(d,l),!f){if(o&&typeof u=="string"){var E=i.get("length"),g=Number(u);Number.isInteger(g)&&g>=E.v&&B(E,g+1)}vr(s)}return!0},ownKeys(a){_(s);var u=Reflect.ownKeys(a).filter(v=>{var f=i.get(v);return f===void 0||f.v!==Y});for(var[l,d]of i)d.v!==Y&&!(l in a)&&u.push(l);return u},setPrototypeOf(){Rn()}})}function vr(t,e=1){B(t,t.v+e)}function hr(t){return t!==null&&typeof t=="object"&&xt in t?t[xt]:t}function Kn(t,e){return Object.is(hr(t),hr(e))}var pr,ht,zr,Ir;function Jn(){if(pr===void 0){pr=window,ht=document;var t=Element.prototype,e=Node.prototype;zr=Ut(e,"firstChild").get,Ir=Ut(e,"nextSibling").get,t.__click=void 0,t.__className="",t.__attributes=null,t.__styles=null,t.__e=void 0,Text.prototype.__t=void 0}}function rr(t=""){return document.createTextNode(t)}function Pt(t){return zr.call(t)}function ke(t){return Ir.call(t)}function b(t,e){return Pt(t)}function j(t,e){{var r=Pt(t);return r instanceof Comment&&r.data===""?ke(r):r}}function m(t,e=1,r=!1){let n=t;for(;e--;)n=ke(n);return n}function Yn(t){t.textContent=""}function A(t){var e=it|kt;M===null?e|=Tt:M.f|=Or;var r=D!==null&&D.f&it?D:null;const n={children:null,ctx:F,deps:null,equals:Ar,f:e,fn:t,reactions:null,v:null,version:0,parent:r??M};return r!==null&&(r.children??(r.children=[])).push(n),n}function Pr(t){var e=t.children;if(e!==null){t.children=null;for(var r=0;r<e.length;r+=1){var n=e[r];n.f&it?nr(n):_t(n)}}}function Zn(t){for(var e=t.parent;e!==null;){if(!(e.f&it))return e;e=e.parent}return null}function Rr(t){var e,r=M;ft(Zn(t));try{Pr(t),e=Jr(t)}finally{ft(r)}return e}function Br(t){var e=Rr(t),r=(Ct||t.f&Tt)&&t.deps!==null?Qt:X;dt(t,r),t.equals(e)||(t.v=e,t.version=Kr())}function nr(t){Pr(t),Jt(t,0),dt(t,Bt),t.v=t.children=t.deps=t.ctx=t.reactions=null}function jr(t){M===null&&D===null&&zn(),D!==null&&D.f&Tt&&Dn(),or&&Cn()}function Qn(t,e){var r=e.last;r===null?e.last=e.first=t:(r.next=t,t.prev=r,e.last=t)}function jt(t,e,r,n=!0){var i=(t&xe)!==0,o=M,s={ctx:F,deps:null,deriveds:null,nodes_start:null,nodes_end:null,f:t|kt,first:null,fn:e,last:null,next:null,parent:i?null:o,prev:null,teardown:null,transitions:null,version:0};if(r){var c=Dt;try{_r(!0),Te(s),s.f|=Tr}catch(l){throw _t(s),l}finally{_r(c)}}else e!==null&&Oe(s);var a=r&&s.deps===null&&s.first===null&&s.nodes_start===null&&s.teardown===null&&(s.f&Or)===0;if(!a&&!i&&n&&(o!==null&&Qn(s,o),D!==null&&D.f&it)){var u=D;(u.children??(u.children=[])).push(s)}return s}function Xn(t){const e=jt(Zt,null,!1);return dt(e,X),e.teardown=t,e}function Le(t){jr();var e=M!==null&&(M.f&ct)!==0&&F!==null&&!F.m;if(e){var r=F;(r.e??(r.e=[])).push({fn:t,effect:M,reaction:D})}else{var n=Lt(t);return n}}function $n(t){return jr(),Lr(t)}function ti(t){const e=jt(xe,t,!0);return(r={})=>new Promise(n=>{r.outro?Kt(e,()=>{_t(e),n(void 0)}):(_t(e),n(void 0))})}function Lt(t){return jt(Sr,t,!1)}function Lr(t){return jt(Zt,t,!0)}function C(t){return $t(t)}function $t(t,e=0){return jt(Zt|me|e,t,!0)}function St(t,e=!0){return jt(Zt|ct,t,!0,e)}function Fr(t){var e=t.teardown;if(e!==null){const r=or,n=D;gr(!0),ut(null);try{e.call(null)}finally{gr(r),ut(n)}}}function Hr(t){var e=t.deriveds;if(e!==null){t.deriveds=null;for(var r=0;r<e.length;r+=1)nr(e[r])}}function qr(t,e=!1){var r=t.first;for(t.first=t.last=null;r!==null;){var n=r.next;_t(r,e),r=n}}function ei(t){for(var e=t.first;e!==null;){var r=e.next;e.f&ct||_t(e),e=r}}function _t(t,e=!0){var r=!1;if((e||t.f&On)&&t.nodes_start!==null){for(var n=t.nodes_start,i=t.nodes_end;n!==null;){var o=n===i?null:ke(n);n.remove(),n=o}r=!0}qr(t,e&&!r),Hr(t),Jt(t,0),dt(t,Bt);var s=t.transitions;if(s!==null)for(const a of s)a.stop();Fr(t);var c=t.parent;c!==null&&c.first!==null&&Wr(t),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes_start=t.nodes_end=null}function Wr(t){var e=t.parent,r=t.prev,n=t.next;r!==null&&(r.next=n),n!==null&&(n.prev=r),e!==null&&(e.first===t&&(e.first=n),e.last===t&&(e.last=r))}function Kt(t,e){var r=[];ir(t,r,!0),Vr(r,()=>{_t(t),e&&e()})}function Vr(t,e){var r=t.length;if(r>0){var n=()=>--r||e();for(var i of t)i.out(n)}else e()}function ir(t,e,r){if(!(t.f&at)){if(t.f^=at,t.transitions!==null)for(const s of t.transitions)(s.is_global||r)&&e.push(s);for(var n=t.first;n!==null;){var i=n.next,o=(n.f&Xt)!==0||(n.f&ct)!==0;ir(n,e,o?r:!1),n=i}}}function ve(t){Ur(t,!0)}function Ur(t,e){if(t.f&at){ee(t)&&Te(t),t.f^=at;for(var r=t.first;r!==null;){var n=r.next,i=(r.f&Xt)!==0||(r.f&ct)!==0;Ur(r,i?e:!1),r=n}if(t.transitions!==null)for(const o of t.transitions)(o.is_global||e)&&o.in()}}let Fe=!1,He=[];function ri(){Fe=!1;const t=He.slice();He=[],Re(t)}function te(t){Fe||(Fe=!0,queueMicrotask(ri)),He.push(t)}let fe=!1,he=!1,pe=null,Dt=!1,or=!1;function _r(t){Dt=t}function gr(t){or=t}let qe=[],Gt=0;let D=null;function ut(t){D=t}let M=null;function ft(t){M=t}let lt=null;function ni(t){lt=t}let U=null,$=0,yt=null;function ii(t){yt=t}let Gr=0,Ct=!1,F=null;function Kr(){return++Gr}function Ee(){return!ye||F!==null&&F.l===null}function ee(t){var s,c;var e=t.f;if(e&kt)return!0;if(e&Qt){var r=t.deps,n=(e&Tt)!==0;if(r!==null){var i;if(e&de){for(i=0;i<r.length;i++)((s=r[i]).reactions??(s.reactions=[])).push(t);t.f^=de}for(i=0;i<r.length;i++){var o=r[i];if(ee(o)&&Br(o),n&&M!==null&&!Ct&&!((c=o==null?void 0:o.reactions)!=null&&c.includes(t))&&(o.reactions??(o.reactions=[])).push(t),o.version>t.version)return!0}}n||dt(t,X)}return!1}function oi(t,e){for(var r=e;r!==null;){if(r.f&Be)try{r.fn(t);return}catch{r.f^=Be}r=r.parent}throw fe=!1,t}function si(t){return(t.f&Bt)===0&&(t.parent===null||(t.parent.f&Be)===0)}function Se(t,e,r,n){if(fe){if(r===null&&(fe=!1),si(e))throw t;return}r!==null&&(fe=!0);{oi(t,e);return}}function Jr(t){var v;var e=U,r=$,n=yt,i=D,o=Ct,s=lt,c=F,a=t.f;U=null,$=0,yt=null,D=a&(ct|xe)?null:t,Ct=!Dt&&(a&Tt)!==0,lt=null,F=t.ctx;try{var u=(0,t.fn)(),l=t.deps;if(U!==null){var d;if(Jt(t,$),l!==null&&$>0)for(l.length=$+U.length,d=0;d<U.length;d++)l[$+d]=U[d];else t.deps=l=U;if(!Ct)for(d=$;d<l.length;d++)((v=l[d]).reactions??(v.reactions=[])).push(t)}else l!==null&&$<l.length&&(Jt(t,$),l.length=$);return u}finally{U=e,$=r,yt=n,D=i,Ct=o,lt=s,F=c}}function ai(t,e){let r=e.reactions;if(r!==null){var n=r.indexOf(t);if(n!==-1){var i=r.length-1;i===0?r=e.reactions=null:(r[n]=r[i],r.pop())}}r===null&&e.f&it&&(U===null||!U.includes(e))&&(dt(e,Qt),e.f&(Tt|de)||(e.f^=de),Jt(e,0))}function Jt(t,e){var r=t.deps;if(r!==null)for(var n=e;n<r.length;n++)ai(t,r[n])}function Te(t){var e=t.f;if(!(e&Bt)){dt(t,X);var r=M,n=F;M=t;try{e&me?ei(t):qr(t),Hr(t),Fr(t);var i=Jr(t);t.teardown=typeof i=="function"?i:null,t.version=Gr}catch(o){Se(o,t,r,n||t.ctx)}finally{M=r}}}function li(){if(Gt>1e3){Gt=0;try{In()}catch(t){if(pe!==null)Se(t,pe,null);else throw t}}Gt++}function ui(t){var e=t.length;if(e!==0){li();var r=Dt;Dt=!0;try{for(var n=0;n<e;n++){var i=t[n];i.f&X||(i.f^=X);var o=[];Yr(i,o),fi(o)}}finally{Dt=r}}}function fi(t){var e=t.length;if(e!==0)for(var r=0;r<e;r++){var n=t[r];if(!(n.f&(Bt|at)))try{ee(n)&&(Te(n),n.deps===null&&n.first===null&&n.nodes_start===null&&(n.teardown===null?Wr(n):n.fn=null))}catch(i){Se(i,n,null,n.ctx)}}}function ci(){if(he=!1,Gt>1001)return;const t=qe;qe=[],ui(t),he||(Gt=0,pe=null)}function Oe(t){he||(he=!0,queueMicrotask(ci)),pe=t;for(var e=t;e.parent!==null;){e=e.parent;var r=e.f;if(r&(xe|ct)){if(!(r&X))return;e.f^=X}}qe.push(e)}function Yr(t,e){var r=t.first,n=[];t:for(;r!==null;){var i=r.f,o=(i&ct)!==0,s=o&&(i&X)!==0,c=r.next;if(!s&&!(i&at))if(i&Zt){if(o)r.f^=X;else try{ee(r)&&Te(r)}catch(d){Se(d,r,null,r.ctx)}var a=r.first;if(a!==null){r=a;continue}}else i&Sr&&n.push(r);if(c===null){let d=r.parent;for(;d!==null;){if(t===d)break t;var u=d.next;if(u!==null){r=u;continue t}d=d.parent}}r=c}for(var l=0;l<n.length;l++)a=n[l],e.push(a),Yr(a,e)}function _(t){var l;var e=t.f,r=(e&it)!==0;if(r&&e&Bt){var n=Rr(t);return nr(t),n}if(D!==null){lt!==null&<.includes(t)&&Bn();var i=D.deps;U===null&&i!==null&&i[$]===t?$++:U===null?U=[t]:U.push(t),yt!==null&&M!==null&&M.f&X&&!(M.f&ct)&&yt.includes(t)&&(dt(M,kt),Oe(M))}else if(r&&t.deps===null)for(var o=t,s=o.parent,c=o;s!==null;)if(s.f&it){var a=s;c=a,s=a.parent}else{var u=s;(l=u.deriveds)!=null&&l.includes(c)||(u.deriveds??(u.deriveds=[])).push(c);break}return r&&(o=t,ee(o)&&Br(o)),t.v}function re(t){const e=D;try{return D=null,t()}finally{D=e}}const di=~(kt|Qt|X);function dt(t,e){t.f=t.f&di|e}function G(t,e=!1,r){F={p:F,c:null,e:null,m:!1,s:t,x:null,l:null},ye&&!e&&(F.l={s:null,u:null,r1:[],r2:tt(!1)})}function K(t){const e=F;if(e!==null){const s=e.e;if(s!==null){var r=M,n=D;e.e=null;try{for(var i=0;i<s.length;i++){var o=s[i];ft(o.effect),ut(o.reaction),Lt(o.fn)}}finally{ft(r),ut(n)}}F=e.p,e.m=!0}return{}}function vi(t){if(!(typeof t!="object"||!t||t instanceof EventTarget)){if(xt in t)We(t);else if(!Array.isArray(t))for(let e in t){const r=t[e];typeof r=="object"&&r&&xt in r&&We(r)}}}function We(t,e=new Set){if(typeof t=="object"&&t!==null&&!(t instanceof EventTarget)&&!e.has(t)){e.add(t),t instanceof Date&&t.getTime();for(let n in t)try{We(t[n],e)}catch{}const r=$e(t);if(r!==Object.prototype&&r!==Array.prototype&&r!==Map.prototype&&r!==Set.prototype&&r!==Date.prototype){const n=Er(r);for(let i in n){const o=n[i].get;if(o)try{o.call(t)}catch{}}}}}function hi(t){return t.endsWith("capture")&&t!=="gotpointercapture"&&t!=="lostpointercapture"}const pi=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function _i(t){return pi.includes(t)}const gi={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject"};function wi(t){return t=t.toLowerCase(),gi[t]??t}const bi=["touchstart","touchmove"];function mi(t){return bi.includes(t)}function xi(t,e){if(e){const r=document.body;t.autofocus=!0,te(()=>{document.activeElement===r&&t.focus()})}}function yi(t){var e=D,r=M;ut(null),ft(null);try{return t()}finally{ut(e),ft(r)}}const Zr=new Set,Ve=new Set;function Qr(t,e,r,n){function i(o){if(n.capture||Vt.call(e,o),!o.cancelBubble)return yi(()=>r.call(this,o))}return t.startsWith("pointer")||t.startsWith("touch")||t==="wheel"?te(()=>{e.addEventListener(t,i,n)}):e.addEventListener(t,i,n),i}function zt(t,e,r,n,i){var o={capture:n,passive:i},s=Qr(t,e,r,o);(e===document.body||e===window||e===document)&&Xn(()=>{e.removeEventListener(t,s,o)})}function Ot(t){for(var e=0;e<t.length;e++)Zr.add(t[e]);for(var r of Ve)r(t)}function Vt(t){var g;var e=this,r=e.ownerDocument,n=t.type,i=((g=t.composedPath)==null?void 0:g.call(t))||[],o=i[0]||t.target,s=0,c=t.__root;if(c){var a=i.indexOf(c);if(a!==-1&&(e===document||e===window)){t.__root=e;return}var u=i.indexOf(e);if(u===-1)return;a<=u&&(s=a)}if(o=i[s]||t.target,o!==e){yn(t,"currentTarget",{configurable:!0,get(){return o||r}});var l=D,d=M;ut(null),ft(null);try{for(var v,f=[];o!==null;){var h=o.assignedSlot||o.parentNode||o.host||null;try{var p=o["__"+n];if(p!==void 0&&!o.disabled)if(Qe(p)){var[w,...E]=p;w.apply(o,[t,...E])}else p.call(o,t)}catch(y){v?f.push(y):v=y}if(t.cancelBubble||h===e||h===null)break;o=h}if(v){for(let y of f)queueMicrotask(()=>{throw y});throw v}}finally{t.__root=e,delete t.currentTarget,ut(l),ft(d)}}}function Xr(t){var e=document.createElement("template");return e.innerHTML=t,e.content}function _e(t,e){var r=M;r.nodes_start===null&&(r.nodes_start=t,r.nodes_end=e)}function N(t,e){var r=(e&Wn)!==0,n=(e&Vn)!==0,i,o=!t.startsWith("<!>");return()=>{i===void 0&&(i=Xr(o?t:"<!>"+t),r||(i=Pt(i)));var s=n?document.importNode(i,!0):i.cloneNode(!0);if(r){var c=Pt(s),a=s.lastChild;_e(c,a)}else _e(s,s);return s}}function ne(t,e,r="svg"){var n=!t.startsWith("<!>"),i=`<${r}>${n?t:"<!>"+t}</${r}>`,o;return()=>{if(!o){var s=Xr(i),c=Pt(s);o=Pt(c)}var a=o.cloneNode(!0);return _e(a,a),a}}function Ft(){var t=document.createDocumentFragment(),e=document.createComment(""),r=rr();return t.append(e,r),_e(e,r),t}function T(t,e){t!==null&&t.before(e)}let Ue=!0;function z(t,e){var r=e==null?"":typeof e=="object"?e+"":e;r!==(t.__t??(t.__t=t.nodeValue))&&(t.__t=r,t.nodeValue=r==null?"":r+"")}function ki(t,e){return Ei(t,e)}const Mt=new Map;function Ei(t,{target:e,anchor:r,props:n={},events:i,context:o,intro:s=!0}){Jn();var c=new Set,a=d=>{for(var v=0;v<d.length;v++){var f=d[v];if(!c.has(f)){c.add(f);var h=mi(f);e.addEventListener(f,Vt,{passive:h});var p=Mt.get(f);p===void 0?(document.addEventListener(f,Vt,{passive:h}),Mt.set(f,1)):Mt.set(f,p+1)}}};a(Xe(Zr)),Ve.add(a);var u=void 0,l=ti(()=>{var d=r??e.appendChild(rr());return St(()=>{if(o){G({});var v=F;v.c=o}i&&(n.$$events=i),Ue=s,u=t(d,n)||{},Ue=!0,o&&K()}),()=>{var h;for(var v of c){e.removeEventListener(v,Vt);var f=Mt.get(v);--f===0?(document.removeEventListener(v,Vt),Mt.delete(v)):Mt.set(v,f)}Ve.delete(a),d!==r&&((h=d.parentNode)==null||h.removeChild(d))}});return Si.set(u,l),u}let Si=new WeakMap;function R(t,e,r=!1){var n=t,i=null,o=null,s=Y,c=r?Xt:0,a=!1;const u=(d,v=!0)=>{a=!0,l(v,d)},l=(d,v)=>{s!==(s=d)&&(s?(i?ve(i):v&&(i=St(()=>v(n))),o&&Kt(o,()=>{o=null})):(o?ve(o):v&&(o=St(()=>v(n))),i&&Kt(i,()=>{i=null})))};$t(()=>{a=!1,e(u),a||l(null,null)},c)}function Ti(t,e,r){var n=t,i=Y,o,s=Ee()?Mn:Mr;$t(()=>{s(i,i=e())&&(o&&Kt(o),o=St(()=>r(n)))})}function $r(t,e){return e}function Oi(t,e,r,n){for(var i=[],o=e.length,s=0;s<o;s++)ir(e[s].e,i,!0);var c=o>0&&i.length===0&&r!==null;if(c){var a=r.parentNode;Yn(a),a.append(r),n.clear(),wt(t,e[0].prev,e[o-1].next)}Vr(i,()=>{for(var u=0;u<o;u++){var l=e[u];c||(n.delete(l.k),wt(t,l.prev,l.next)),_t(l.e,!c)}})}function Ae(t,e,r,n,i,o=null){var s=t,c={flags:e,items:new Map,first:null},a=(e&Nr)!==0;if(a){var u=t;s=u.appendChild(rr())}var l=null,d=!1;$t(()=>{var v=r(),f=Qe(v)?v:v==null?[]:Xe(v),h=f.length;if(!(d&&h===0)){d=h===0;{var p=D;Ai(f,c,s,i,e,(p.f&at)!==0,n)}o!==null&&(h===0?l?ve(l):l=St(()=>o(s)):l!==null&&Kt(l,()=>{l=null})),r()}})}function Ai(t,e,r,n,i,o,s,c){var Ht,oe,se,ae;var a=(i&Fn)!==0,u=(i&(tr|er))!==0,l=t.length,d=e.items,v=e.first,f=v,h,p=null,w,E=[],g=[],y,S,x,k;if(a)for(k=0;k<l;k+=1)y=t[k],S=s(y,k),x=d.get(S),x!==void 0&&((Ht=x.a)==null||Ht.measure(),(w??(w=new Set)).add(x));for(k=0;k<l;k+=1){if(y=t[k],S=s(y,k),x=d.get(S),x===void 0){var L=f?f.e.nodes_start:r;p=Ni(L,e,p,p===null?e.first:p.next,y,S,k,n,i),d.set(S,p),E=[],g=[],f=p.next;continue}if(u&&Mi(x,y,k,i),x.e.f&at&&(ve(x.e),a&&((oe=x.a)==null||oe.unfix(),(w??(w=new Set)).delete(x))),x!==f){if(h!==void 0&&h.has(x)){if(E.length<g.length){var P=g[0],O;p=P.prev;var I=E[0],H=E[E.length-1];for(O=0;O<E.length;O+=1)wr(E[O],P,r);for(O=0;O<g.length;O+=1)h.delete(g[O]);wt(e,I.prev,H.next),wt(e,p,I),wt(e,H,P),f=P,p=H,k-=1,E=[],g=[]}else h.delete(x),wr(x,f,r),wt(e,x.prev,x.next),wt(e,x,p===null?e.first:p.next),wt(e,p,x),p=x;continue}for(E=[],g=[];f!==null&&f.k!==S;)(o||!(f.e.f&at))&&(h??(h=new Set)).add(f),g.push(f),f=f.next;if(f===null)continue;x=f}E.push(x),p=x,f=x.next}if(f!==null||h!==void 0){for(var q=h===void 0?[]:Xe(h);f!==null;)(o||!(f.e.f&at))&&q.push(f),f=f.next;var ot=q.length;if(ot>0){var Ne=i&Nr&&l===0?r:null;if(a){for(k=0;k<ot;k+=1)(se=q[k].a)==null||se.measure();for(k=0;k<ot;k+=1)(ae=q[k].a)==null||ae.fix()}Oi(e,q,Ne,d)}}a&&te(()=>{var le;if(w!==void 0)for(x of w)(le=x.a)==null||le.apply()}),M.first=e.first&&e.first.e,M.last=p&&p.e}function Mi(t,e,r,n){n&tr&&je(t.v,e),n&er?je(t.i,r):t.i=r}function Ni(t,e,r,n,i,o,s,c,a,u){var l=(a&tr)!==0,d=(a&Hn)===0,v=l?d?Un(i):tt(i):i,f=a&er?tt(s):s,h={i:f,v,k:o,a:null,e:null,prev:r,next:n};try{return h.e=St(()=>c(t,v,f),Dr),h.e.prev=r&&r.e,h.e.next=n&&n.e,r===null?e.first=h:(r.next=h,r.e.next=h.e),n!==null&&(n.prev=h,n.e.prev=h.e),h}finally{}}function wr(t,e,r){for(var n=t.next?t.next.e.nodes_start:r,i=e?e.e.nodes_start:r,o=t.e.nodes_start;o!==n;){var s=ke(o);i.before(o),o=s}}function wt(t,e,r){e===null?t.first=r:(e.next=r,e.e.next=r&&r.e),r!==null&&(r.prev=e,r.e.prev=e&&e.e)}function Ci(t,e,...r){var n=t,i=Nt,o;$t(()=>{i!==(i=e())&&(o&&(_t(o),o=null),o=St(()=>i(n,...r)))},Xt)}function Di(t,e){e?t.hasAttribute("selected")||t.setAttribute("selected",""):t.removeAttribute("selected")}function W(t,e,r,n){var i=t.__attributes??(t.__attributes={});i[e]!==(i[e]=r)&&(e==="style"&&"__styles"in t&&(t.__styles={}),e==="loading"&&(t[An]=r),r==null?t.removeAttribute(e):typeof r!="string"&&tn(t).includes(e)?t[e]=r:t.setAttribute(e,r))}function sr(t,e,r,n,i=!1,o=!1,s=!1){var c=e||{},a=t.tagName==="OPTION";for(var u in e)u in r||(r[u]=null);var l=tn(t),d=t.__attributes??(t.__attributes={});for(const g in r){let y=r[g];if(a&&g==="value"&&y==null){t.value=t.__value="",c[g]=y;continue}var v=c[g];if(y!==v){c[g]=y;var f=g[0]+g[1];if(f!=="$$"){if(f==="on"){const S={},x="$$"+g;let k=g.slice(2);var h=_i(k);if(hi(k)&&(k=k.slice(0,-7),S.capture=!0),!h&&v){if(y!=null)continue;t.removeEventListener(k,c[x],S),c[x]=null}if(y!=null)if(h)t[`__${k}`]=y,Ot([k]);else{let L=function(P){c[g].call(this,P)};var E=L;c[x]=Qr(k,t,L,S)}else h&&(t[`__${k}`]=void 0)}else if(g==="style"&&y!=null)t.style.cssText=y+"";else if(g==="autofocus")xi(t,!!y);else if(g==="__value"||g==="value"&&y!=null)t.value=t[g]=t.__value=y;else if(g==="selected"&&a)Di(t,y);else{var p=g;i||(p=wi(p));var w=p==="defaultValue"||p==="defaultChecked";if(y==null&&!o&&!w)if(d[g]=null,p==="value"||p==="checked"){let S=t;if(p==="value"){let x=S.defaultValue;S.removeAttribute(p),S.defaultValue=x}else{let x=S.defaultChecked;S.removeAttribute(p),S.defaultChecked=x}}else t.removeAttribute(g);else w||l.includes(p)&&(o||typeof y!="string")?t[p]=y:typeof y!="function"&&W(t,p,y)}g==="style"&&"__styles"in t&&(t.__styles={})}}}return c}var br=new Map;function tn(t){var e=br.get(t.nodeName);if(e)return e;br.set(t.nodeName,e=[]);for(var r,n=t,i=Element.prototype;i!==n;){r=Er(n);for(var o in r)r[o].set&&e.push(o);n=$e(n)}return e}function zi(t,e){var r=t.__className,n=Ii(e);(r!==n||Dr)&&(n===""?t.removeAttribute("class"):t.setAttribute("class",n),t.__className=n)}function Ii(t){return t??""}function ge(t,e,r){if(r){if(t.classList.contains(e))return;t.classList.add(e)}else{if(!t.classList.contains(e))return;t.classList.remove(e)}}function Ge(t,e,r,n){var i=t.__styles??(t.__styles={});i[e]!==r&&(i[e]=r,r==null?t.style.removeProperty(e):t.style.setProperty(e,r,""))}const Pi=()=>performance.now(),pt={tick:t=>requestAnimationFrame(t),now:()=>Pi(),tasks:new Set};function en(){const t=pt.now();pt.tasks.forEach(e=>{e.c(t)||(pt.tasks.delete(e),e.f())}),pt.tasks.size!==0&&pt.tick(en)}function Ri(t){let e;return pt.tasks.size===0&&pt.tick(en),{promise:new Promise(r=>{pt.tasks.add(e={c:t,f:r})}),abort(){pt.tasks.delete(e)}}}function ue(t,e){t.dispatchEvent(new CustomEvent(e))}function Bi(t){if(t==="float")return"cssFloat";if(t==="offset")return"cssOffset";if(t.startsWith("--"))return t;const e=t.split("-");return e.length===1?e[0]:e[0]+e.slice(1).map(r=>r[0].toUpperCase()+r.slice(1)).join("")}function mr(t){const e={},r=t.split(";");for(const n of r){const[i,o]=n.split(":");if(!i||o===void 0)break;const s=Bi(i.trim());e[s]=o.trim()}return e}const ji=t=>t;function Li(t,e,r,n){var i=(t&qn)!==0,o="both",s,c=e.inert,a,u;function l(){var p=D,w=M;ut(null),ft(null);try{return s??(s=r()(e,(n==null?void 0:n())??{},{direction:o}))}finally{ut(p),ft(w)}}var d={is_global:i,in(){e.inert=c,ue(e,"introstart"),a=Ke(e,l(),u,1,()=>{ue(e,"introend"),a==null||a.abort(),a=s=void 0})},out(p){e.inert=!0,ue(e,"outrostart"),u=Ke(e,l(),a,0,()=>{ue(e,"outroend"),p==null||p()})},stop:()=>{a==null||a.abort(),u==null||u.abort()}},v=M;if((v.transitions??(v.transitions=[])).push(d),Ue){var f=i;if(!f){for(var h=v.parent;h&&h.f&Xt;)for(;(h=h.parent)&&!(h.f&me););f=!h||(h.f&Tr)!==0}f&&Lt(()=>{re(()=>d.in())})}}function Ke(t,e,r,n,i){var o=n===1;if(Sn(e)){var s,c=!1;return te(()=>{if(!c){var w=e({direction:o?"in":"out"});s=Ke(t,w,r,n,i)}}),{abort:()=>{c=!0,s==null||s.abort()},deactivate:()=>s.deactivate(),reset:()=>s.reset(),t:()=>s.t()}}if(r==null||r.deactivate(),!(e!=null&&e.duration))return i(),{abort:Nt,deactivate:Nt,reset:Nt,t:()=>n};const{delay:a=0,css:u,tick:l,easing:d=ji}=e;var v=[];if(o&&r===void 0&&(l&&l(0,1),u)){var f=mr(u(0,1));v.push(f,f)}var h=()=>1-n,p=t.animate(v,{duration:a});return p.onfinish=()=>{var w=(r==null?void 0:r.t())??1-n;r==null||r.abort();var E=n-w,g=e.duration*Math.abs(E),y=[];if(g>0){if(u)for(var S=Math.ceil(g/16.666666666666668),x=0;x<=S;x+=1){var k=w+E*d(x/S),L=u(k,1-k);y.push(mr(L))}h=()=>{var P=p.currentTime;return w+E*d(P/g)},l&&Ri(()=>{if(p.playState!=="running")return!1;var P=h();return l(P,1-P),!0})}p=t.animate(y,{duration:g,fill:"forwards"}),p.onfinish=()=>{h=()=>n,l==null||l(n,1-n),i()}},{abort:()=>{p&&(p.cancel(),p.effect=null,p.onfinish=Nt)},deactivate:()=>{i=Nt},reset:()=>{n===0&&(l==null||l(1,0))},t:()=>h()}}function Je(t,e,r){if(t.multiple)return Hi(t,e);for(var n of t.options){var i=rn(n);if(Kn(i,e)){n.selected=!0;return}}(!r||e!==void 0)&&(t.selectedIndex=-1)}function Fi(t,e){let r=!0;Lt(()=>{e&&Je(t,re(e),r),r=!1;var n=new MutationObserver(()=>{var i=t.__value;Je(t,i)});return n.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),()=>{n.disconnect()}})}function Hi(t,e){for(var r of t.options)r.selected=~e.indexOf(rn(r))}function rn(t){return"__value"in t?t.__value:t.value}var bt,It,Yt,we,nn;const be=class be{constructor(e){Wt(this,we);Wt(this,bt,new WeakMap);Wt(this,It);Wt(this,Yt);ze(this,Yt,e)}observe(e,r){var n=vt(this,bt).get(e)||new Set;return n.add(r),vt(this,bt).set(e,n),dr(this,we,nn).call(this).observe(e,vt(this,Yt)),()=>{var i=vt(this,bt).get(e);i.delete(r),i.size===0&&(vt(this,bt).delete(e),vt(this,It).unobserve(e))}}};bt=new WeakMap,It=new WeakMap,Yt=new WeakMap,we=new WeakSet,nn=function(){return vt(this,It)??ze(this,It,new ResizeObserver(e=>{for(var r of e){be.entries.set(r.target,r);for(var n of vt(this,bt).get(r.target)||[])n(r)}}))},Ce(be,"entries",new WeakMap);let Ye=be;var qi=new Ye({box:"border-box"});function mt(t,e,r){var n=qi.observe(t,()=>r(t[e]));Lt(()=>(re(()=>r(t[e])),n))}function xr(t,e){return t===e||(t==null?void 0:t[xt])===e}function on(t={},e,r,n){return Lt(()=>{var i,o;return Lr(()=>{i=o,o=[],re(()=>{t!==r(...o)&&(e(t,...o),i&&xr(r(...i),t)&&e(null,...i))})}),()=>{te(()=>{o&&xr(r(...o),t)&&e(null,...o)})}}),t}function Me(t=!1){const e=F,r=e.l.u;if(!r)return;let n=()=>vi(e.s);if(t){let i=0,o={};const s=A(()=>{let c=!1;const a=e.s;for(const u in a)a[u]!==o[u]&&(o[u]=a[u],c=!0);return c&&i++,i});n=()=>_(s)}r.b.length&&$n(()=>{yr(e,n),Re(r.b)}),Le(()=>{const i=re(()=>r.m.map(Tn));return()=>{for(const o of i)typeof o=="function"&&o()}}),r.a.length&&Le(()=>{yr(e,n),Re(r.a)})}function yr(t,e){if(t.l.s)for(const r of t.l.s)_(r);e()}const Wi={get(t,e){if(!t.exclude.includes(e))return t.props[e]},set(t,e){return!1},getOwnPropertyDescriptor(t,e){if(!t.exclude.includes(e)&&e in t.props)return{enumerable:!0,configurable:!0,value:t.props[e]}},has(t,e){return t.exclude.includes(e)?!1:e in t.props},ownKeys(t){return Reflect.ownKeys(t.props).filter(e=>!t.exclude.includes(e))}};function ar(t,e,r){return new Proxy({props:t,exclude:e},Wi)}const Vi="5";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(Vi);Ln();var Ui=ne('<svg><path d="M0 0h24v24H0z" stroke="none"></path><path d="M18 6 6 18M6 6l12 12"></path></svg>');function Gi(t,e){let r=ar(e,["$$slots","$$events","$$legacy"]);var n=Ui();let i;C(()=>i=sr(n,i,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",...r},void 0,!0)),T(t,n)}const Ki=t=>t;function Ji(t,{delay:e=0,duration:r=400,easing:n=Ki}={}){const i=+getComputedStyle(t).opacity;return{delay:e,duration:r,easing:n,css:o=>`opacity: ${o*i}`}}function Yi(){let t=Z("uncompressed");return{get type(){return _(t)},setType(e){B(t,et(e))}}}function Zi(){let t=et({file:null,folder:null,output:null,duplicates:null,code:null}),e=et([]);return{get file(){return t.file},get folder(){return t.folder},get output(){return t.output},get duplicates(){return t.duplicates},get code(){return t.code},open(r,n){e.push(r),t[r]=n},close(){e.length!==0&&(t[e.pop()]=null)}}}function Qi(t){return Object.entries(t.outputs).map(([e,r])=>{const n=new Xi;return Object.entries(r.inputs).forEach(([i,o])=>n.insert(i,o)),n.root.name=e,n.root.map=r.map,n.root.uncompressed=r.uncompressed,n.root.gzip=r.gzip,n.root.brotli=r.brotli,n.optimize(),n})}function Et(t){return"items"in t}class Xi{constructor(){Ce(this,"root");this.root=this.createNode("","")}createNode(e,r){return{name:e,path:r,uncompressed:0,gzip:0,brotli:0,items:[]}}insert(e,r){const n=e.split("/"),i=n.pop();let o=this.root;n.forEach(s=>{let c=o.items.find(a=>Et(a)&&a.name===s);c||(c=this.createNode(s,o.path?`${o.path}/${s}`:s),o.items.push(c)),o=c,o.uncompressed+=r.uncompressed,o.gzip+=r.gzip,o.brotli+=r.brotli}),o.items.push({name:i,path:o.path?`${o.path}/${i}`:i,uncompressed:r.uncompressed,gzip:r.gzip,brotli:r.brotli})}optimize(){const e=[this.root];for(;e.length;){const r=e.pop();for(;r.items.length===1&&Et(r.items[0]);){const n=r.items[0];r.name=`${r.name}/${n.name}`,r.path=n.path,r.items=n.items}r.items.sort((n,i)=>i.uncompressed-n.uncompressed),r.items.forEach(n=>Et(n)&&e.push(n))}}get(e){let r=this.root;for(;r&&r.path!==e;)r=Et(r)&&r.items.find(n=>e.startsWith(n.path))||null;return r}}const Ze=Qi(window.SONDA_JSON_REPORT);function $i(){let t=Z(0);const e=A(()=>Ze.at(_(t)));return{get index(){return _(t)},get output(){return _(e)},setIndex(r){B(t,et(r))}}}const to=/(.*)(?:.*node_modules\/)(@[^\/]+\/[^\/]+|[^\/]+)/,eo=Object.keys(window.SONDA_JSON_REPORT.inputs).map(t=>to.exec(t)).filter(t=>t!==null).reduce((t,e)=>{const[r,,n]=e;return t.has(n)||t.set(n,new Set),t.get(n).add(r),t},new Map),ce=new Map(Array.from(eo).filter(([,t])=>t.size>1).map(([t,e])=>[t,Array.from(e)])),Q=$i(),Rt=Yi(),V=Zi();var ro=()=>V.close(),no=N('<div class="fixed top-0 right-0 left-0 bottom-0 flex justify-center items-center"><div class="fixed bg-gray-200/70 w-full h-full backdrop-blur-sm" aria-hidden="true"></div> <div class="bg-white relative flex flex-col rounded-lg border p-6 shadow-lg overflow-hidden max-h-[95vh] max-w-[95vw]"><div class="mb-4"><h2 class="py-2 pr-6 block align-text-bottom font-semibold leading-none tracking-tight text-base border-b-2 border-gray-300 border-dashed"> </h2> <button aria-label="Close dialog" class="absolute top-0 right-0 mt-2 mr-2 flex justify-center items-center border border-transparent rounded-full w-10 h-10 text-gray-600 hover:text-gray-900"><!></button></div> <!></div></div>');function ie(t,e){G(e,!0);let r=Z(void 0);function n(f){f.target===_(r)&&V.close()}var i=no();zt("click",ht.body,n);var o=b(i);on(o,f=>B(r,f),()=>_(r));var s=m(o,2),c=b(s),a=b(c),u=b(a),l=m(a,2);l.__click=[ro];var d=b(l);Gi(d,{});var v=m(c,2);Ci(v,()=>e.children),C(()=>{ge(s,"w-[95vw]",e.large),ge(s,"h-[95vh]",e.large),z(u,e.heading)}),Li(3,i,()=>Ji,()=>({duration:150})),T(t,i),K()}Ot(["click"]);var io=N('<div class="p-4 mb-8 text-sm text-red-800 rounded-lg bg-red-50 svelte-ls0uun" role="alert"><p class="font-bold svelte-ls0uun">Your browser does not support the <a class="underline svelte-ls0uun" href="https://developer.mozilla.org/en-US/docs/Web/API/CSS_Custom_Highlight_API" target="_blank">CSS Custom Highlight API</a>.</p> <p class="mt-4 svelte-ls0uun">To use this feature, please update your browser to a version that supports it, or use a different browser. See the <a class="underline svelte-ls0uun" href="https://developer.mozilla.org/en-US/docs/Web/API/CSS_Custom_Highlight_API#browser_compatibility" target="_blank">Browser Compatibility page</a> for more information.</p></div>'),oo=N(`
|
|
2
2
|
<span class="border-r border-slate-300 text-right pr-2 svelte-ls0uun"></span>
|
|
3
|
-
`,1),
|
|
3
|
+
`,1),so=N(`<p class="svelte-ls0uun">Code included in the bundle is highlighted</p> <pre class="h-full mt-2 p-4 w-full leading-5 bg-slate-100 text-slate-600 rounded overflow-auto text-xs flex svelte-ls0uun">
|
|
4
4
|
<div class="line-numbers flex flex-col flex-shrink mr-2 select-none text-slate-400 svelte-ls0uun">
|
|
5
5
|
<!>
|
|
6
6
|
</div>
|
|
7
7
|
<code class="svelte-ls0uun"> </code>
|
|
8
|
-
</pre>`,1),
|
|
9
|
-
`).trim()}static processItems(e,r=null,n=""){const i=[],o=e.length-1;return e.forEach((s,a)=>{const l=a===o,u=l?"└── ":"├── ",[f,v]=typeof s=="string"?[s,s]:s,c=r==null?void 0:r(f,e);if(i.push(n+u+v),c){const h=l?" ":"│ ";return i.push(...this.processItems(c,r,n+h))}if(l)return i.push(n)}),i}}var Yi=A('<p>The following dependencies are duplicated:</p> <pre class="mt-2 p-4 w-max leading-5 bg-slate-100 rounded overflow-auto min-w-full"><code> </code></pre>',1);function Zi(t,e){q(e,!0);const r=T(()=>er.generate(Array.from(oe.keys()),n=>oe.get(n)));ee(t,{heading:"Duplicated modules found in the build",children:i=>{var o=jt(),s=B(o);P(s,()=>oe.size>0,a=>{var l=Yi(),u=m(B(l),2),f=b(u),v=b(f);N(()=>D(v,p(r))),E(a,l)}),E(i,o)},$$slots:{default:!0}}),W()}const Qi=["b","KiB","MiB","GiB","TiB","PiB"],Xi=["ms","s"];function Xr(t,e,r){let n=r,i=0;for(;n>e&&t.length>i+1;)n=n/e,i++;return`${i?n.toFixed(2):n} ${t[i]}`}function et(t){return Xr(Qi,1024,t)}function Oe(t){return Xr(Xi,1e3,t)}var $i=A('<span>File format</span> <span class="font-bold text-right"> </span>',1),to=A('<span>Approx. GZIP size</span> <span class="font-bold text-right"> </span>',1),eo=A('<span>Approx. Brotli size</span> <span class="font-bold text-right"> </span>',1),ro=A('<p class="mt-8">This file is in the bundle, because it is:</p> <pre class="mt-2 p-4 w-full leading-5 bg-slate-100 rounded overflow-auto text-sm"><code> </code></pre>',1),no=(t,e)=>F.open("code",e.file),io=A('<div class="mt-8"><button type="button" class="text-gray-900 bg-white border border-gray-300 focus:outline-none hover:bg-gray-100 focus:ring-1 focus:ring-blue-300 font-medium rounded-lg text-sm px-5 h-10">Show used code</button></div>'),oo=A('<div class="flex flex-col overflow-auto p-1"><div class="grid grid-cols-[auto_1fr] gap-x-12 max-w-[400px]"><!> <span>Original file size</span> <span class="font-bold text-right"> </span> <span>Bundled size</span> <span class="font-bold text-right"> </span> <!> <!></div> <!> <!></div>');function so(t,e){q(e,!0);const r=T(()=>window.SONDA_JSON_REPORT.inputs[e.file.path]),n=T(()=>{var a;return((a=p(r))==null?void 0:a.format.toUpperCase())??"UNKNOWN"}),i=T(()=>{var a;return(a=K.output.root.map)==null?void 0:a.sources.includes(e.file.path)});function o(a,l){return l.length>1?[]:Object.entries(window.SONDA_JSON_REPORT.inputs).filter(([,u])=>u.imports.includes(a)).map(([u])=>[u,`imported by ${u}`])}const s=T(()=>{if(!p(r))return null;const a=p(r).belongsTo?[[p(r).belongsTo,`part of the ${p(r).belongsTo} bundle`]]:o(e.file.path,[]);return er.generate(a,o)});ee(t,{get heading(){return e.file.path},children:l=>{var u=oo(),f=b(u),v=b(f);P(v,()=>p(n)!=="UNKNOWN",_=>{var x=$i(),O=m(B(x),2),z=b(O);N(()=>D(z,p(n))),E(_,x)});var c=m(v,4),h=b(c);N(()=>{var _;return D(h,et(((_=p(r))==null?void 0:_.bytes)||0))});var d=m(c,4),w=b(d);N(()=>D(w,et(e.file.uncompressed)));var g=m(d,2);P(g,()=>e.file.gzip,_=>{var x=to(),O=m(B(x),2),z=b(O);N(()=>D(z,et(e.file.gzip))),E(_,x)});var S=m(g,2);P(S,()=>e.file.brotli,_=>{var x=eo(),O=m(B(x),2),z=b(O);N(()=>D(z,et(e.file.brotli))),E(_,x)});var y=m(f,2);P(y,()=>p(s),_=>{var x=ro(),O=m(B(x),2),z=b(O),I=b(z);N(()=>D(I,p(s))),E(_,x)});var k=m(y,2);P(k,()=>p(i),_=>{var x=io(),O=b(x);O.__click=[no,e],E(_,x)}),E(l,u)},$$slots:{default:!0}}),W()}St(["click"]);var ao=A('<span class="text-gray-900"> </span> <span class="text-gray-600"> </span>',1),lo=te('<g><rect shape-rendering="crispEdges" vector-effect="non-scaling-stroke"></rect><foreignObject class="pointer-events-none"><p xmlns="http://www.w3.org/1999/xhtml" class="p-1 size-full text-center text-xs truncate"><!></p></foreignObject><!></g>');function uo(t,e){q(e,!0);const r=20,n=6,i=22,o=T(()=>e.tile.width-n*2),s=T(()=>e.tile.height-n-i),a=T(()=>et(e.content[Pt.type])),l=T(()=>Math.min(e.content[Pt.type]/e.totalBytes*100,100)),u=T(()=>`${e.content.name} - ${p(a)} (${p(l).toFixed(2)}%)`),f=T(()=>Math.round(p(l))+"%"),v=T(()=>e.tile.width>=i*1.75&&e.tile.height>=i),c=T(()=>!yt(e.content)||p(s)<=r||p(o)<=r?[]:e.content.items);var h=lo(),d=b(h);const w=T(()=>`stroke-gray-500 ${(yt(e.content)?"cursor-zoom-in":"cursor-pointer")??""} svelte-xusoaq`);var g=m(d),S=b(g),y=b(S);P(y,()=>p(v),_=>{var x=ao(),O=B(x),z=b(O),I=m(O,2),Y=b(I);N(()=>{D(z,e.content.name),D(Y,`- ${p(a)??""}`)}),E(_,x)});var k=m(g);P(k,()=>p(c).length,_=>{var x=T(()=>e.tile.x+n),O=T(()=>e.tile.y+i);$r(_,{get content(){return p(c)},get totalBytes(){return e.totalBytes},get width(){return p(o)},get height(){return p(s)},get xStart(){return p(x)},get yStart(){return p(O)}})}),N(()=>{j(d,"data-tile",e.content.path),j(d,"data-hover",p(u)),j(d,"x",e.tile.x),j(d,"y",e.tile.y),j(d,"width",e.tile.width),j(d,"height",e.tile.height),bi(d,p(w)),je(d,"--percentage",p(f)),j(g,"x",e.tile.x),j(g,"y",e.tile.y),j(g,"width",e.tile.width),j(g,"height",e.tile.height)}),E(t,h),W()}function fo(t,e,r,n=0,i=0){const o=[],s=new Float32Array(t.length),a=t.reduce((_,x)=>_+x,0),l=e*r/a;for(let _=0;_<t.length;_++)s[_]=t[_]*l;let u=n,f=i,v=e,c=r,h=v>=c,d=h?c:v,w=0,g=s[0],S=s[0],y=s[0],k=Me(d,g,S,y);for(let _=1;_<s.length;_++){const x=s[_],O=g+x,z=Math.min(S,x),I=Math.max(y,x),Y=Me(d,O,z,I);if(k<Y){gr(s,w,_-1,g/d,h,u,f,o);const $=g/d;h?(u+=$,v-=$):(f+=$,c-=$),h=v>=c,d=h?c:v,w=_,g=x,S=x,y=x,k=Me(d,g,S,y)}else g=O,S=z,y=I,k=Y}return gr(s,w,s.length-1,g/d,h,u,f,o),o}function Me(t,e,r,n){const i=t*t,o=e*e;return Math.max(i*n/o,o/(i*r))}function gr(t,e,r,n,i,o,s,a){let l=i?s:o;for(let u=e;u<=r;u++){const v=t[u]/n;i?a.push({x:o,y:l,width:n,height:v}):a.push({x:l,y:s,width:v,height:n}),l+=v}}function $r(t,e){q(e,!0);const r=T(()=>Array.isArray(e.content)?Object.values(e.content):[e.content]),n=T(()=>fo(p(r).map(s=>s[Pt.type]),e.width,e.height,e.xStart,e.yStart));var i=jt(),o=B(i);me(o,18,()=>p(n),s=>s,(s,a,l)=>{uo(s,{get tile(){return a},get content(){return p(r)[p(l)]},get totalBytes(){return e.totalBytes}})}),E(t,i),W()}var co=te('<svg xmlns="http://www.w3.org/2000/svg" role="img"><!></svg>');function tn(t,e){q(e,!0);var r=jt(),n=B(r);di(n,()=>[e.content.path,e.width,e.height],i=>{var o=co(),s=b(o),a=T(()=>e.width-1),l=T(()=>e.height-1);$r(s,{get content(){return e.content},get totalBytes(){return e.content[Pt.type]},get width(){return p(a)},get height(){return p(l)},xStart:.5,yStart:.5}),N(()=>{j(o,"width",e.width),j(o,"height",e.height)}),E(i,o)}),E(t,r),W()}var vo=A('<span>Approx. GZIP size</span> <span class="font-bold"> </span>',1),ho=A('<span>Approx. Brotli size</span> <span class="font-bold"> </span>',1),po=A('<div class="mb-4 grid grid-cols-[auto_1fr] gap-x-8"><span>Bundled size</span> <span class="font-bold"> </span> <!> <!></div> <div class="flex-grow overflow-hidden"><!></div>',1);function _o(t,e){q(e,!0);let r=U(0),n=U(0);ee(t,{get heading(){return e.folder.path},large:!0,children:o=>{var s=po(),a=B(s),l=m(b(a),2),u=b(l);N(()=>D(u,et(e.folder.uncompressed)));var f=m(l,2);P(f,()=>e.folder.gzip,d=>{var w=vo(),g=m(B(w),2),S=b(g);N(()=>D(S,et(e.folder.gzip))),E(d,w)});var v=m(f,2);P(v,()=>e.folder.brotli,d=>{var w=ho(),g=m(B(w),2),S=b(g);N(()=>D(S,et(e.folder.brotli))),E(d,w)});var c=m(a,2),h=b(c);tn(h,{get content(){return e.folder},get width(){return p(r)},get height(){return p(n)}}),gt(c,"clientWidth",d=>R(r,d)),gt(c,"clientHeight",d=>R(n,d)),E(o,s)},$$slots:{default:!0}}),W()}var go=te('<svg><path d="M0 0h24v24H0z" stroke="none"></path><path d="M3 12a9 9 0 1 0 18 0 9 9 0 0 0-18 0M12 9h.01"></path><path d="M11 12h1v4h1"></path></svg>');function wo(t,e){let r=tr(e,["$$slots","$$events","$$legacy"]);var n=go();let i;N(()=>i=$e(n,i,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",...r},void 0,!0)),E(t,n)}var bo=A('<span class="font-bold">GZIP</span> <span class="text-right"> </span> <span class="text-right"> </span>',1),mo=A('<span class="font-bold">Brotli</span> <span class="text-right"> </span> <span class="text-right"> </span>',1),xo=A('<p class="mt-12">Module types</p> <div class="mt-2 h-10 w-[40rem] max-w-full flex rounded-lg overflow-hidden"><div class="bg-yellow-300 h-full"></div> <div class="bg-blue-300 h-full"></div> <div class="bg-gray-200 h-full"></div></div> <div class="flex justify-between mt-2"><div class="flex items-center space-x-2"><div class="inline-block w-4 h-4 bg-yellow-300"></div> <p>ESM: <span class="font-semibold"> </span></p></div> <div class="flex items-center space-x-2"><div class="inline-block w-4 h-4 bg-blue-300"></div> <p>CJS: <span class="font-semibold"> </span></p></div> <div class="flex items-center space-x-2"><div class="inline-block w-4 h-4 bg-gray-300"></div> <p>Unknown: <span class="font-semibold"> </span></p></div></div>',1),yo=A('<pre class="mt-2 p-4 w-max leading-5 bg-slate-100 rounded overflow-auto min-w-full"><code> </code></pre>'),ko=A('<div class="flex flex-col overflow-y-auto max-w-[500px]"><div class="grid grid-cols-[auto_auto_auto] gap-x-12"><span class="font-bold">Type</span> <span class="font-bold text-right">Size</span> <span class="font-bold text-right">Download time <span data-hover="Estimations for a slow 3G connection"><!></span></span> <span class="font-bold">Uncompressed</span> <span class="text-right"> </span> <span class="text-right"> </span> <!> <!></div></div> <!> <p class="mt-12">This asset includes <span class="font-semibold"> </span> external dependencies</p> <!>',1);function Eo(t,e){q(e,!0);const r=50*1024*8,n=T(()=>window.SONDA_JSON_REPORT.outputs[e.output.root.name]),i=T(()=>Oe(Math.round(e.output.root.uncompressed/r*1e3))),o=T(()=>Oe(Math.round(e.output.root.gzip/r*1e3))),s=T(()=>Oe(Math.round(e.output.root.brotli/r*1e3))),a=T(()=>{const h={esm:0,cjs:0,unknown:0},d=window.SONDA_JSON_REPORT.inputs;return Object.entries(p(n).inputs).forEach(([w,g])=>{var y;const S=((y=d[w])==null?void 0:y.format)??"unknown";h[S]+=g.uncompressed}),h}),l=T(()=>Math.round(p(a).esm/p(n).uncompressed*1e4)/100),u=T(()=>Math.round(p(a).cjs/p(n).uncompressed*1e4)/100),f=T(()=>Math.round(p(a).unknown/p(n).uncompressed*1e4)/100),v=T(()=>{const h=/(?:.*node_modules\/)(@[^\/]+\/[^\/]+|[^\/]+)/;return Object.keys(p(n).inputs).map(d=>{var w;return((w=d.match(h))==null?void 0:w[1])??null}).filter((d,w,g)=>d!==null&&g.indexOf(d)===w).sort()}),c=T(()=>er.generate(p(v)));ee(t,{get heading(){return e.output.root.name},children:d=>{var w=ko(),g=B(w),S=b(g),y=m(b(S),4),k=m(b(y)),_=b(k);wo(_,{width:20,height:20,class:"inline-block pointer-events-none"});var x=m(y,4),O=b(x);N(()=>D(O,et(e.output.root.uncompressed)));var z=m(x,2),I=b(z),Y=m(z,2);P(Y,()=>e.output.root.gzip,rt=>{var V=bo(),Z=m(B(V),2),vt=b(Z);N(()=>D(vt,et(e.output.root.gzip)));var Ot=m(Z,2),Ft=b(Ot);N(()=>D(Ft,p(o))),E(rt,V)});var $=m(Y,2);P($,()=>e.output.root.brotli,rt=>{var V=mo(),Z=m(B(V),2),vt=b(Z);N(()=>D(vt,et(e.output.root.brotli)));var Ot=m(Z,2),Ft=b(Ot);N(()=>D(Ft,p(s))),E(rt,V)});var dt=m(g,2);P(dt,()=>p(f)<100,rt=>{var V=xo(),Z=m(B(V),2),vt=b(Z),Ot=m(vt,2),Ft=m(Ot,2),en=m(Z,2),rr=b(en),rn=m(b(rr),2),nn=m(b(rn)),on=b(nn),nr=m(rr,2),sn=m(b(nr),2),an=m(b(sn)),ln=b(an),un=m(nr,2),fn=m(b(un),2),cn=m(b(fn)),dn=b(cn);N(()=>{j(vt,"style",`width: ${p(l)}%`),j(Ot,"style",`width: ${p(u)}%`),j(Ft,"style",`width: ${p(f)}%`),D(on,`${p(l)??""}%`),D(ln,`${p(u)??""}%`),D(dn,`${p(f)??""}%`)}),E(rt,V)});var Tt=m(dt,2),ye=m(b(Tt)),re=b(ye),ne=m(Tt,2);P(ne,()=>p(v).length>0,rt=>{var V=yo(),Z=b(V),vt=b(Z);N(()=>D(vt,p(c))),E(rt,V)}),N(()=>{D(I,p(i)),D(re,p(v).length)}),E(d,w)},$$slots:{default:!0}}),W()}var So=A("<!> <!> <!> <!> <!>",1);function To(t,e){q(e,!1),xe();var r=So(),n=B(r);P(n,()=>F.folder,l=>{_o(l,{get folder(){return F.folder}})});var i=m(n,2);P(i,()=>F.file,l=>{so(l,{get file(){return F.file}})});var o=m(i,2);P(o,()=>F.output,l=>{Eo(l,{get output(){return F.output}})});var s=m(o,2);P(s,()=>F.duplicates,l=>{Zi(l,{})});var a=m(s,2);P(a,()=>F.code,l=>{Ji(l,{get file(){return F.code}})}),E(t,r),W()}var Oo=(t,e)=>Pt.setType(e()),Mo=A('<button type="button" class="px-4 py-2 text-sm font-medium bg-white hover:bg-gray-100 text-gray-900 border border-gray-300 first:rounded-s-lg last:rounded-e-lg focus:ring-1 focus:ring-blue-300 focus:z-10 svelte-2f0583"> </button>'),Ao=A('<div class="inline-flex space-x-[-1px]" role="group"></div>');function No(t,e){q(e,!0);const r=T(()=>{var a;return((a=K.output)==null?void 0:a.root.gzip)??!1}),n=T(()=>{var a;return((a=K.output)==null?void 0:a.root.brotli)??!1}),i=T(()=>{const a=[["uncompressed","Uncompressed"]];return p(r)&&a.push(["gzip","GZIP"]),p(n)&&a.push(["brotli","Brotli"]),a});var o=jt(),s=B(o);P(s,()=>p(i).length>1,a=>{var l=Ao();me(l,21,()=>p(i),([u,f])=>u,(u,f)=>{let v=()=>p(f)[0],c=()=>p(f)[1];var h=Mo();h.__click=[Oo,v];var d=b(h);N(()=>{j(h,"title",`Show the ${c()} file size in diagram`),de(h,"active",v()===Pt.type),D(d,c())}),E(u,h)}),E(a,l)}),E(t,o),W()}St(["click"]);function Co(){F.open("output",K.output)}var Do=A('<button title="Show details of the active output" aria-label="Details of the entire build output" class="text-gray-900 bg-white border border-gray-300 focus:outline-none hover:bg-gray-100 focus:ring-1 focus:ring-blue-300 font-medium rounded-lg text-sm px-5 h-10"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="text-gray-900 pointer-events-none"><path d="M0 0h24v24H0z" stroke="none" shape-rendering="geometricPrecision"></path><path d="M8 5H6a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h5.697M18 12V7a2 2 0 0 0-2-2h-2" shape-rendering="geometricPrecision"></path><path d="M8 5a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v0a2 2 0 0 1-2 2h-2a2 2 0 0 1-2-2zM8 11h4M8 15h3M14 17.5a2.5 2.5 0 1 0 5 0 2.5 2.5 0 1 0-5 0M18.5 19.5 21 22" shape-rendering="geometricPrecision"></path></svg></button>');function zo(t,e){q(e,!1),xe();var r=Do();r.__click=[Co],E(t,r),W()}St(["click"]);function Io(){F.open("duplicates",!0)}var Po=A('<button title="See duplicated modules found in the build" aria-label="List of duplicated modules found in the build output" class="text-gray-900 bg-red-50 border border-red-400 focus:outline-none hover:bg-red-100 focus:ring-1 focus:ring-blue-300 font-medium rounded-lg text-sm px-5 h-10"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="text-red-600"><path stroke="none" d="M0 0h24v24H0z" shape-rendering="geometricPrecision"></path><path d="M3 12a9 9 0 1 0 18 0 9 9 0 0 0-18 0M12 8v4M12 16h.01" shape-rendering="geometricPrecision"></path></svg></button>');function Ro(t,e){q(e,!1),xe();var r=jt(),n=B(r);P(n,()=>oe.size>1,i=>{var o=Po();o.__click=[Io],E(i,o)}),E(t,r),W()}St(["click"]);function Bo(t){K.setIndex(Number(t.target.value))}var Lo=A("<option> </option>"),jo=A('<select class="text-gray-900 bg-white border border-gray-300 focus:outline-none hover:bg-gray-100 focus:ring-1 focus:ring-blue-300 font-medium rounded-lg text-sm pl-4 pr-8 h-10 min-w-80 svelte-yqayp2" title="Select the active output"></select>'),Fo=A('<div class="flex items-center justify-center space-x-2 max-w-sm"><!></div>');function Ho(t,e){q(e,!1),xe();var r=Fo(),n=b(r);P(n,()=>We.length>0,i=>{var o=jo();Ti(o,()=>K.index);var s;o.__change=[Bo],me(o,5,()=>We,Gr,(a,l,u)=>{var f=Lo();f.value=(f.__value=u)==null?"":u;var v=b(f);N(()=>D(v,`${u+1}. ${p(l).root.name??""}`)),E(a,f)}),N(()=>{s!==(s=K.index)&&(o.value=(o.__value=K.index)==null?"":K.index,He(o,K.index))}),E(i,o)}),E(t,r),W()}St(["change"]);var qo=A('<a href="https://github.com/filipsobol/sonda" target="_blank" title="Open Sonda repository on GitHub" aria-label="GitHub repository" class="flex items-center text-gray-900 bg-white border border-gray-300 focus:outline-none hover:bg-gray-100 focus:ring-1 focus:ring-blue-300 font-medium rounded-lg text-sm px-5 h-10"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="text-gray-900 pointer-events-none"><path d="M0 0h24v24H0z" stroke="none" shape-rendering="geometricPrecision"></path><path d="M9 19c-4.3 1.4-4.3-2.5-6-3m12 5v-3.5c0-1 .1-1.4-.5-2 2.8-.3 5.5-1.4 5.5-6a4.6 4.6 0 0 0-1.3-3.2 4.2 4.2 0 0 0-.1-3.2s-1.1-.3-3.5 1.3a12.3 12.3 0 0 0-6.2 0C6.5 2.8 5.4 3.1 5.4 3.1a4.2 4.2 0 0 0-.1 3.2A4.6 4.6 0 0 0 4 9.5c0 4.6 2.7 5.7 5.5 6-.6.6-.6 1.2-.5 2V21" shape-rendering="geometricPrecision"></path></svg></a>');function Wo(t){var e=qo();E(t,e)}var Uo=A('<div class="flex flex-row p-4 items-center space-y-0 h-16 justify-between bg-gray-50 shadow"><div class="flex flex-row space-x-2"><!> <!> <!></div> <div class="flex flex-row space-x-2"><!> <!></div></div>');function Vo(t){var e=Uo(),r=b(e),n=b(r);Ho(n,{});var i=m(n,2);zo(i,{});var o=m(i,2);Ro(o,{});var s=m(r,2),a=b(s);No(a,{});var l=m(a,2);Wo(l),E(t,e)}var Go=te('<svg><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M12 21a9 9 0 1 1 0 -18a9 9 0 0 1 0 18z"></path><path d="M8 16l1 -1l1.5 1l1.5 -1l1.5 1l1.5 -1l1 1"></path><path d="M8.5 11.5l1.5 -1.5l-1.5 -1.5"></path><path d="M15.5 11.5l-1.5 -1.5l1.5 -1.5"></path></svg>');function Ko(t,e){let r=tr(e,["$$slots","$$events","$$legacy"]);var n=Go();let i;N(()=>i=$e(n,i,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round",...r},void 0,!0)),E(t,n)}var Jo=A('<div class="flex-grow flex flex-col mt-24 items-center w-full h-full"><!> <h2 class="mt-8 text-3xl font-semibold text-gray-800">No data to display</h2> <p class="mt-4 text-lg text-gray-500">Did you enable source maps in the bundler configuration?</p></div>');function Yo(t){var e=Jo(),r=b(e);Ko(r,{width:96,height:96,class:"text-yellow-400 fill-yellow-100"}),E(t,e)}var Zo=A('<div role="tooltip" class="fixed z-10 px-2 py-1 bg-gray-800 text-gray-100 rounded-md whitespace-nowrap pointer-events-none svelte-1r0gq6x"> </div>');function Qo(t){let r=U(0),n=U(0),i=U(0),o=U(0),s=U(""),a=U("0px"),l=U("0px");function u({target:c,clientX:h,clientY:d}){R(s,tt(c instanceof Element&&c.getAttribute("data-hover")||"")),p(s)&&(R(a,(h+p(r)+12>p(i)?h-p(r)-12:h+12)+"px"),R(l,(d+p(n)+12>p(o)?d-p(n):d+12)+"px"))}var f=Zo();Dt("mouseover",ft.body,u),Dt("mousemove",ft.body,u),Dt("mouseleave",ft.body,()=>R(s,""));var v=b(f);N(()=>{de(f,"invisible",!p(s)),je(f,"--x",p(a)),je(f,"--y",p(l)),D(v,p(s))}),gt(ft.body,"clientWidth",c=>R(i,tt(c))),gt(ft.body,"clientHeight",c=>R(o,tt(c))),gt(f,"clientWidth",c=>R(r,c)),gt(f,"clientHeight",c=>R(n,c)),E(t,f)}var Xo=A('<div role="application" class="wrapper relative flex flex-col overflow-hidden h-screen w-screen"><!> <div class="flex-grow overflow-hidden"><!></div></div> <!> <!>',1);function $o(t,e){q(e,!0);let r=U(0),n=U(0);function i({target:h}){var g;const d=h instanceof Element&&h.getAttribute("data-tile");if(!d)return;const w=(g=K.output)==null?void 0:g.get(d);w&&F.open(yt(w)?"folder":"file",w)}function o(h){h.key==="Escape"&&(h.stopPropagation(),F.close())}var s=Xo();Dt("click",ft.body,i),Dt("keydown",ft.body,o);var a=B(s),l=b(a);Vo(l);var u=m(l,2),f=b(u);P(f,()=>K.output,h=>{tn(h,{get content(){return K.output.root},get width(){return p(r)},get height(){return p(n)}})},h=>{Yo(h)});var v=m(a,2);To(v,{});var c=m(v,2);Qo(c),gt(u,"clientWidth",h=>R(r,h)),gt(u,"clientHeight",h=>R(n,h)),E(t,s),W()}fi($o,{target:document.getElementById("app")});</script><style rel="stylesheet" crossorigin>.svelte-ls0uun::highlight(used-code){background-color:#fed7aa;color:#7c2d12}rect.svelte-xusoaq{fill:color-mix(in oklch,#fca5a5 var(--percentage),#86efac)}rect.svelte-xusoaq:hover{fill:color-mix(in oklch,#fecaca var(--percentage),#bbf7d0)}button.active.svelte-2f0583,button.active.svelte-2f0583:hover{background-color:#e5e7eb}select.svelte-yqayp2{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="%236b7280" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path stroke="none" d="M0 0h24v24H0z"/><path d="m8 9 4-4 4 4M16 15l-4 4-4-4"/></svg>');background-position:right .5rem center;background-repeat:no-repeat}div[role=tooltip].svelte-1r0gq6x{transform:translate(var(--x),var(--y));will-change:transform,contents}*{scrollbar-width:thin}*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgb(59 130 246 / .5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgb(59 130 246 / .5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:after,:before{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.pointer-events-none{pointer-events:none}.invisible{visibility:hidden}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.bottom-0{bottom:0}.left-0{left:0}.right-0{right:0}.top-0{top:0}.z-10{z-index:10}.mb-4{margin-bottom:1rem}.mb-8{margin-bottom:2rem}.mr-2{margin-right:.5rem}.mt-12{margin-top:3rem}.mt-2{margin-top:.5rem}.mt-24{margin-top:6rem}.mt-4{margin-top:1rem}.mt-8{margin-top:2rem}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.contents{display:contents}.size-full{width:100%;height:100%}.h-10{height:2.5rem}.h-16{height:4rem}.h-4{height:1rem}.h-\[95vh\]{height:95vh}.h-full{height:100%}.h-screen{height:100vh}.max-h-\[95vh\]{max-height:95vh}.min-h-screen{min-height:100vh}.w-10{width:2.5rem}.w-4{width:1rem}.w-\[40rem\]{width:40rem}.w-\[95vw\]{width:95vw}.w-full{width:100%}.w-max{width:-moz-max-content;width:max-content}.w-screen{width:100vw}.min-w-80{min-width:20rem}.min-w-full{min-width:100%}.max-w-\[400px\]{max-width:400px}.max-w-\[500px\]{max-width:500px}.max-w-\[95vw\]{max-width:95vw}.max-w-full{max-width:100%}.max-w-sm{max-width:24rem}.flex-shrink{flex-shrink:1}.flex-grow{flex-grow:1}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.cursor-pointer{cursor:pointer}.cursor-zoom-in{cursor:zoom-in}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.grid-cols-\[auto_1fr\]{grid-template-columns:auto 1fr}.grid-cols-\[auto_auto_auto\]{grid-template-columns:auto auto auto}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-x-12{-moz-column-gap:3rem;column-gap:3rem}.gap-x-8{-moz-column-gap:2rem;column-gap:2rem}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-\[-1px\]>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(-1px * var(--tw-space-x-reverse));margin-left:calc(-1px * calc(1 - var(--tw-space-x-reverse)))}.space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(0px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0px * var(--tw-space-y-reverse))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.border{border-width:1px}.border-b-2{border-bottom-width:2px}.border-r{border-right-width:1px}.border-dashed{border-style:dashed}.border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.border-red-400{--tw-border-opacity:1;border-color:rgb(248 113 113 / var(--tw-border-opacity))}.border-slate-300{--tw-border-opacity:1;border-color:rgb(203 213 225 / var(--tw-border-opacity))}.border-transparent{border-color:transparent}.bg-blue-300{--tw-bg-opacity:1;background-color:rgb(147 197 253 / var(--tw-bg-opacity))}.bg-gray-200{--tw-bg-opacity:1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.bg-gray-200\/70{background-color:#e5e7ebb3}.bg-gray-300{--tw-bg-opacity:1;background-color:rgb(209 213 219 / var(--tw-bg-opacity))}.bg-gray-50{--tw-bg-opacity:1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.bg-gray-800{--tw-bg-opacity:1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.bg-red-50{--tw-bg-opacity:1;background-color:rgb(254 242 242 / var(--tw-bg-opacity))}.bg-slate-100{--tw-bg-opacity:1;background-color:rgb(241 245 249 / var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-yellow-300{--tw-bg-opacity:1;background-color:rgb(253 224 71 / var(--tw-bg-opacity))}.fill-yellow-100{fill:#fef9c3}.stroke-gray-500{stroke:#6b7280}.p-1{padding:.25rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.pl-4{padding-left:1rem}.pr-2{padding-right:.5rem}.pr-6{padding-right:1.5rem}.pr-8{padding-right:2rem}.text-center{text-align:center}.text-right{text-align:right}.align-text-bottom{vertical-align:text-bottom}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.leading-5{line-height:1.25rem}.leading-none{line-height:1}.tracking-tight{letter-spacing:-.025em}.text-gray-100{--tw-text-opacity:1;color:rgb(243 244 246 / var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128 / var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99 / var(--tw-text-opacity))}.text-gray-800{--tw-text-opacity:1;color:rgb(31 41 55 / var(--tw-text-opacity))}.text-gray-900{--tw-text-opacity:1;color:rgb(17 24 39 / var(--tw-text-opacity))}.text-red-600{--tw-text-opacity:1;color:rgb(220 38 38 / var(--tw-text-opacity))}.text-red-800{--tw-text-opacity:1;color:rgb(153 27 27 / var(--tw-text-opacity))}.text-slate-400{--tw-text-opacity:1;color:rgb(148 163 184 / var(--tw-text-opacity))}.text-slate-600{--tw-text-opacity:1;color:rgb(71 85 105 / var(--tw-text-opacity))}.text-yellow-400{--tw-text-opacity:1;color:rgb(250 204 21 / var(--tw-text-opacity))}.underline{text-decoration-line:underline}.shadow{--tw-shadow:0 1px 3px 0 rgb(0 0 0 / .1),0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px rgb(0 0 0 / .1),0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur-sm{--tw-backdrop-blur:blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}pre{line-height:1.125}.first\:rounded-s-lg:first-child{border-start-start-radius:.5rem;border-end-start-radius:.5rem}.last\:rounded-e-lg:last-child{border-start-end-radius:.5rem;border-end-end-radius:.5rem}.hover\:bg-gray-100:hover{--tw-bg-opacity:1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.hover\:bg-red-100:hover{--tw-bg-opacity:1;background-color:rgb(254 226 226 / var(--tw-bg-opacity))}.hover\:text-gray-900:hover{--tw-text-opacity:1;color:rgb(17 24 39 / var(--tw-text-opacity))}.focus\:z-10:focus{z-index:10}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-1:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\:ring-blue-300:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(147 197 253 / var(--tw-ring-opacity))}</style></head><body class="flex w-screen h-screen font-mono"><div id="app" class="flex w-screen min-h-screen"></div></body></html>
|
|
8
|
+
</pre>`,1),ao=N('<div class="h-full flex flex-col overflow-auto p-1 svelte-ls0uun"><!></div>');function lo(t,e){G(e,!0);let r=Z(void 0);const n=A(()=>Q.output.root.map),i=A(()=>{var a;return((a=_(n))==null?void 0:a.sources.indexOf(e.file.path))??-1}),o=A(()=>_(i)>=0?_(n).sourcesContent[_(i)]:null),s=A(()=>{var a;return((a=_(o))==null?void 0:a.split(new RegExp("(?<=\\r?\\n)")))??[]}),c=A(()=>"CSS"in window&&"highlights"in window.CSS);Le(()=>{if(!_(o)||!_(c))return;const a=new Highlight,u=_(r).firstChild,l=_(s).reduce((d,v)=>(d.push(d[d.length-1]+v.length),d),[0]);_(n).mappings.flat().filter(d=>d[1]===_(i)).forEach((d,v,f)=>{const[,,h,p]=d,w=f[v+1],E=l[h],g=E+p,y=h===(w==null?void 0:w[2])?w[3]+E:l[h+1],S=new Range;S.setStart(u,g),S.setEnd(u,y),a.add(S)}),CSS.highlights.set("used-code",a)}),ie(t,{get heading(){return e.file.path},large:!0,children:u=>{var l=ao(),d=b(l);{var v=h=>{var p=io();T(h,p)},f=h=>{var p=Ft(),w=j(p);{var E=g=>{var y=so(),S=m(j(y),2),x=m(b(S)),k=m(b(x));Ae(k,17,()=>_(s),$r,(O,I,H)=>{var q=oo(),ot=m(j(q));ot.textContent=H,T(O,q)});var L=m(x,2),P=b(L);on(L,O=>B(r,O),()=>_(r)),C(()=>z(P,_(o))),T(g,y)};R(w,g=>{_(o)&&g(E)},!0)}T(h,p)};R(d,h=>{_(c)?h(f,!1):h(v)})}T(u,l)},$$slots:{default:!0}}),K()}class lr{static generate(e,r){return this.processItems(e,r).join(`
|
|
9
|
+
`).trim()}static processItems(e,r=null,n=""){const i=[],o=e.length-1;return e.forEach((s,c)=>{const a=c===o,u=a?"└── ":"├── ",[l,d]=typeof s=="string"?[s,s]:s,v=r==null?void 0:r(l,e);if(i.push(n+u+d),v){const f=a?" ":"│ ";return i.push(...this.processItems(v,r,n+f))}if(a)return i.push(n)}),i}}var uo=N('<p>The following dependencies are duplicated:</p> <pre class="mt-2 p-4 w-max leading-5 bg-slate-100 rounded overflow-auto min-w-full"><code> </code></pre>',1);function fo(t,e){G(e,!0);const r=A(()=>lr.generate(Array.from(ce.keys()),n=>ce.get(n)));ie(t,{heading:"Duplicated modules found in the build",children:i=>{var o=Ft(),s=j(o);{var c=a=>{var u=uo(),l=m(j(u),2),d=b(l),v=b(d);C(()=>z(v,_(r))),T(a,u)};R(s,a=>{ce.size>0&&a(c)})}T(i,o)},$$slots:{default:!0}}),K()}const co=["b","KiB","MiB","GiB","TiB","PiB"],vo=["ms","s"];function sn(t,e,r){let n=r,i=0;for(;n>e&&t.length>i+1;)n=n/e,i++;return`${i?n.toFixed(2):n} ${t[i]}`}function nt(t){return sn(co,1024,t)}function Ie(t){return sn(vo,1e3,t)}var ho=N('<span>File format</span> <span class="font-bold text-right"> </span>',1),po=N('<span>Approx. GZIP size</span> <span class="font-bold text-right"> </span>',1),_o=N('<span>Approx. Brotli size</span> <span class="font-bold text-right"> </span>',1),go=N('<p class="mt-8">This file is in the bundle, because it is:</p> <pre class="mt-2 p-4 w-full leading-5 bg-slate-100 rounded overflow-auto text-sm"><code> </code></pre>',1),wo=(t,e)=>V.open("code",e.file),bo=N('<div class="mt-8"><button type="button" class="text-gray-900 bg-white border border-gray-300 focus:outline-none hover:bg-gray-100 focus:ring-1 focus:ring-blue-300 font-medium rounded-lg text-sm px-5 h-10">Show used code</button></div>'),mo=N('<div class="flex flex-col overflow-auto p-1"><div class="grid grid-cols-[auto_1fr] gap-x-12 max-w-[400px]"><!> <span>Original file size</span> <span class="font-bold text-right"> </span> <span>Bundled size</span> <span class="font-bold text-right"> </span> <!> <!></div> <!> <!></div>');function xo(t,e){G(e,!0);const r=A(()=>window.SONDA_JSON_REPORT.inputs[e.file.path]),n=A(()=>{var c;return((c=_(r))==null?void 0:c.format.toUpperCase())??"UNKNOWN"}),i=A(()=>{var c;return(c=Q.output.root.map)==null?void 0:c.sources.includes(e.file.path)});function o(c,a){return a.length>1?[]:Object.entries(window.SONDA_JSON_REPORT.inputs).filter(([,u])=>u.imports.includes(c)).map(([u])=>[u,`imported by ${u}`])}const s=A(()=>{if(!_(r))return null;const c=_(r).belongsTo?[[_(r).belongsTo,`part of the ${_(r).belongsTo} bundle`]]:o(e.file.path,[]);return lr.generate(c,o)});ie(t,{get heading(){return e.file.path},children:a=>{var u=mo(),l=b(u),d=b(l);{var v=O=>{var I=ho(),H=m(j(I),2),q=b(H);C(()=>z(q,_(n))),T(O,I)};R(d,O=>{_(n)!=="UNKNOWN"&&O(v)})}var f=m(d,4),h=b(f);C(()=>{var O;return z(h,nt(((O=_(r))==null?void 0:O.bytes)||0))});var p=m(f,4),w=b(p);C(()=>z(w,nt(e.file.uncompressed)));var E=m(p,2);{var g=O=>{var I=po(),H=m(j(I),2),q=b(H);C(()=>z(q,nt(e.file.gzip))),T(O,I)};R(E,O=>{e.file.gzip&&O(g)})}var y=m(E,2);{var S=O=>{var I=_o(),H=m(j(I),2),q=b(H);C(()=>z(q,nt(e.file.brotli))),T(O,I)};R(y,O=>{e.file.brotli&&O(S)})}var x=m(l,2);{var k=O=>{var I=go(),H=m(j(I),2),q=b(H),ot=b(q);C(()=>z(ot,_(s))),T(O,I)};R(x,O=>{_(s)&&O(k)})}var L=m(x,2);{var P=O=>{var I=bo(),H=b(I);H.__click=[wo,e],T(O,I)};R(L,O=>{_(i)&&O(P)})}T(a,u)},$$slots:{default:!0}}),K()}Ot(["click"]);var yo=N('<span class="text-gray-900"> </span> <span class="text-gray-600"> </span>',1),ko=ne('<g><rect shape-rendering="crispEdges" vector-effect="non-scaling-stroke"></rect><foreignObject class="pointer-events-none"><p xmlns="http://www.w3.org/1999/xhtml" class="p-1 size-full text-center text-xs truncate"><!></p></foreignObject><!></g>');function Eo(t,e){G(e,!0);const r=20,n=6,i=22,o=A(()=>e.tile.width-n*2),s=A(()=>e.tile.height-n-i),c=A(()=>nt(e.content[Rt.type])),a=A(()=>Math.min(e.content[Rt.type]/e.totalBytes*100,100)),u=A(()=>`${e.content.name} - ${_(c)} (${_(a).toFixed(2)}%)`),l=A(()=>Math.round(_(a))+"%"),d=A(()=>e.tile.width>=i*1.75&&e.tile.height>=i),v=A(()=>!Et(e.content)||_(s)<=r||_(o)<=r?[]:e.content.items);var f=ko(),h=b(f);const p=A(()=>`stroke-gray-500 ${(Et(e.content)?"cursor-zoom-in":"cursor-pointer")??""} svelte-xusoaq`);var w=m(h),E=b(w),g=b(E);{var y=k=>{var L=yo(),P=j(L),O=b(P),I=m(P,2),H=b(I);C(()=>{z(O,e.content.name),z(H,`- ${_(c)??""}`)}),T(k,L)};R(g,k=>{_(d)&&k(y)})}var S=m(w);{var x=k=>{var L=A(()=>e.tile.x+n),P=A(()=>e.tile.y+i);an(k,{get content(){return _(v)},get totalBytes(){return e.totalBytes},get width(){return _(o)},get height(){return _(s)},get xStart(){return _(L)},get yStart(){return _(P)}})};R(S,k=>{_(v).length&&k(x)})}C(()=>{W(h,"data-tile",e.content.path),W(h,"data-hover",_(u)),W(h,"x",e.tile.x),W(h,"y",e.tile.y),W(h,"width",e.tile.width),W(h,"height",e.tile.height),zi(h,_(p)),Ge(h,"--percentage",_(l)),W(w,"x",e.tile.x),W(w,"y",e.tile.y),W(w,"width",e.tile.width),W(w,"height",e.tile.height)}),T(t,f),K()}function So(t,e,r,n=0,i=0){const o=[],s=new Float32Array(t.length),c=t.reduce((S,x)=>S+x,0),a=e*r/c;for(let S=0;S<t.length;S++)s[S]=t[S]*a;let u=n,l=i,d=e,v=r,f=d>=v,h=f?v:d,p=0,w=s[0],E=s[0],g=s[0],y=Pe(h,w,E,g);for(let S=1;S<s.length;S++){const x=s[S],k=w+x,L=Math.min(E,x),P=Math.max(g,x),O=Pe(h,k,L,P);if(y<O){kr(s,p,S-1,w/h,f,u,l,o);const I=w/h;f?(u+=I,d-=I):(l+=I,v-=I),f=d>=v,h=f?v:d,p=S,w=x,E=x,g=x,y=Pe(h,w,E,g)}else w=k,E=L,g=P,y=O}return kr(s,p,s.length-1,w/h,f,u,l,o),o}function Pe(t,e,r,n){const i=t*t,o=e*e;return Math.max(i*n/o,o/(i*r))}function kr(t,e,r,n,i,o,s,c){let a=i?s:o;for(let u=e;u<=r;u++){const d=t[u]/n;i?c.push({x:o,y:a,width:n,height:d}):c.push({x:a,y:s,width:d,height:n}),a+=d}}function an(t,e){G(e,!0);const r=A(()=>Array.isArray(e.content)?Object.values(e.content):[e.content]),n=A(()=>So(_(r).map(s=>s[Rt.type]),e.width,e.height,e.xStart,e.yStart));var i=Ft(),o=j(i);Ae(o,18,()=>_(n),s=>s,(s,c,a)=>{Eo(s,{get tile(){return c},get content(){return _(r)[_(a)]},get totalBytes(){return e.totalBytes}})}),T(t,i),K()}var To=ne('<svg xmlns="http://www.w3.org/2000/svg" role="img"><!></svg>');function ln(t,e){G(e,!0);var r=Ft(),n=j(r);Ti(n,()=>[e.content.path,e.width,e.height],i=>{var o=To(),s=b(o),c=A(()=>e.width-1),a=A(()=>e.height-1);an(s,{get content(){return e.content},get totalBytes(){return e.content[Rt.type]},get width(){return _(c)},get height(){return _(a)},xStart:.5,yStart:.5}),C(()=>{W(o,"width",e.width),W(o,"height",e.height)}),T(i,o)}),T(t,r),K()}var Oo=N('<span>Approx. GZIP size</span> <span class="font-bold"> </span>',1),Ao=N('<span>Approx. Brotli size</span> <span class="font-bold"> </span>',1),Mo=N('<div class="mb-4 grid grid-cols-[auto_1fr] gap-x-8"><span>Bundled size</span> <span class="font-bold"> </span> <!> <!></div> <div class="flex-grow overflow-hidden"><!></div>',1);function No(t,e){G(e,!0);let r=Z(0),n=Z(0);ie(t,{get heading(){return e.folder.path},large:!0,children:o=>{var s=Mo(),c=j(s),a=m(b(c),2),u=b(a);C(()=>z(u,nt(e.folder.uncompressed)));var l=m(a,2);{var d=w=>{var E=Oo(),g=m(j(E),2),y=b(g);C(()=>z(y,nt(e.folder.gzip))),T(w,E)};R(l,w=>{e.folder.gzip&&w(d)})}var v=m(l,2);{var f=w=>{var E=Ao(),g=m(j(E),2),y=b(g);C(()=>z(y,nt(e.folder.brotli))),T(w,E)};R(v,w=>{e.folder.brotli&&w(f)})}var h=m(c,2),p=b(h);ln(p,{get content(){return e.folder},get width(){return _(r)},get height(){return _(n)}}),mt(h,"clientWidth",w=>B(r,w)),mt(h,"clientHeight",w=>B(n,w)),T(o,s)},$$slots:{default:!0}}),K()}var Co=ne('<svg><path d="M0 0h24v24H0z" stroke="none"></path><path d="M3 12a9 9 0 1 0 18 0 9 9 0 0 0-18 0M12 9h.01"></path><path d="M11 12h1v4h1"></path></svg>');function Do(t,e){let r=ar(e,["$$slots","$$events","$$legacy"]);var n=Co();let i;C(()=>i=sr(n,i,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",...r},void 0,!0)),T(t,n)}var zo=N('<span class="font-bold">GZIP</span> <span class="text-right"> </span> <span class="text-right"> </span>',1),Io=N('<span class="font-bold">Brotli</span> <span class="text-right"> </span> <span class="text-right"> </span>',1),Po=N('<p class="mt-12">Module types</p> <div class="mt-2 h-10 w-[40rem] max-w-full flex rounded-lg overflow-hidden"><div class="bg-yellow-300 h-full"></div> <div class="bg-blue-300 h-full"></div> <div class="bg-gray-200 h-full"></div></div> <div class="flex justify-between mt-2"><div class="flex items-center space-x-2"><div class="inline-block w-4 h-4 bg-yellow-300"></div> <p>ESM: <span class="font-semibold"> </span></p></div> <div class="flex items-center space-x-2"><div class="inline-block w-4 h-4 bg-blue-300"></div> <p>CJS: <span class="font-semibold"> </span></p></div> <div class="flex items-center space-x-2"><div class="inline-block w-4 h-4 bg-gray-300"></div> <p>Unknown: <span class="font-semibold"> </span></p></div></div>',1),Ro=N('<pre class="mt-2 p-4 w-max leading-5 bg-slate-100 rounded overflow-auto min-w-full"><code> </code></pre>'),Bo=N('<div class="flex flex-col overflow-y-auto max-w-[500px]"><div class="grid grid-cols-[auto_auto_auto] gap-x-12"><span class="font-bold">Type</span> <span class="font-bold text-right">Size</span> <span class="font-bold text-right">Download time <span data-hover="Estimations for a slow 3G connection"><!></span></span> <span class="font-bold">Uncompressed</span> <span class="text-right"> </span> <span class="text-right"> </span> <!> <!></div></div> <!> <p class="mt-12">This asset includes <span class="font-semibold"> </span> external dependencies</p> <!>',1);function jo(t,e){G(e,!0);const r=50*1024*8,n=A(()=>window.SONDA_JSON_REPORT.outputs[e.output.root.name]),i=A(()=>Ie(Math.round(e.output.root.uncompressed/r*1e3))),o=A(()=>Ie(Math.round(e.output.root.gzip/r*1e3))),s=A(()=>Ie(Math.round(e.output.root.brotli/r*1e3))),c=A(()=>{const f={esm:0,cjs:0,unknown:0},h=window.SONDA_JSON_REPORT.inputs;return Object.entries(_(n).inputs).forEach(([p,w])=>{var g;const E=((g=h[p])==null?void 0:g.format)??"unknown";f[E]+=w.uncompressed}),f}),a=A(()=>Math.round(_(c).esm/_(n).uncompressed*1e4)/100),u=A(()=>Math.round(_(c).cjs/_(n).uncompressed*1e4)/100),l=A(()=>Math.round(_(c).unknown/_(n).uncompressed*1e4)/100),d=A(()=>{const f=/(?:.*node_modules\/)(@[^\/]+\/[^\/]+|[^\/]+)/;return Object.keys(_(n).inputs).map(h=>{var p;return((p=h.match(f))==null?void 0:p[1])??null}).filter((h,p,w)=>h!==null&&w.indexOf(h)===p).sort()}),v=A(()=>lr.generate(_(d)));ie(t,{get heading(){return e.output.root.name},children:h=>{var p=Bo(),w=j(p),E=b(w),g=m(b(E),4),y=m(b(g)),S=b(y);Do(S,{width:20,height:20,class:"inline-block pointer-events-none"});var x=m(g,4),k=b(x);C(()=>z(k,nt(e.output.root.uncompressed)));var L=m(x,2),P=b(L),O=m(L,2);{var I=J=>{var rt=zo(),st=m(j(rt),2),gt=b(st);C(()=>z(gt,nt(e.output.root.gzip)));var At=m(st,2),qt=b(At);C(()=>z(qt,_(o))),T(J,rt)};R(O,J=>{e.output.root.gzip&&J(I)})}var H=m(O,2);{var q=J=>{var rt=Io(),st=m(j(rt),2),gt=b(st);C(()=>z(gt,nt(e.output.root.brotli)));var At=m(st,2),qt=b(At);C(()=>z(qt,_(s))),T(J,rt)};R(H,J=>{e.output.root.brotli&&J(q)})}var ot=m(w,2);{var Ne=J=>{var rt=Po(),st=m(j(rt),2),gt=b(st),At=m(gt,2),qt=m(At,2),un=m(st,2),ur=b(un),fn=m(b(ur),2),cn=m(b(fn)),dn=b(cn),fr=m(ur,2),vn=m(b(fr),2),hn=m(b(vn)),pn=b(hn),_n=m(fr,2),gn=m(b(_n),2),wn=m(b(gn)),bn=b(wn);C(()=>{W(gt,"style",`width: ${_(a)}%`),W(At,"style",`width: ${_(u)}%`),W(qt,"style",`width: ${_(l)}%`),z(dn,`${_(a)??""}%`),z(pn,`${_(u)??""}%`),z(bn,`${_(l)??""}%`)}),T(J,rt)};R(ot,J=>{_(l)<100&&J(Ne)})}var Ht=m(ot,2),oe=m(b(Ht)),se=b(oe),ae=m(Ht,2);{var le=J=>{var rt=Ro(),st=b(rt),gt=b(st);C(()=>z(gt,_(v))),T(J,rt)};R(ae,J=>{_(d).length>0&&J(le)})}C(()=>{z(P,_(i)),z(se,_(d).length)}),T(h,p)},$$slots:{default:!0}}),K()}var Lo=N("<!> <!> <!> <!> <!>",1);function Fo(t,e){G(e,!1),Me();var r=Lo(),n=j(r);{var i=f=>{No(f,{get folder(){return V.folder}})};R(n,f=>{V.folder&&f(i)})}var o=m(n,2);{var s=f=>{xo(f,{get file(){return V.file}})};R(o,f=>{V.file&&f(s)})}var c=m(o,2);{var a=f=>{jo(f,{get output(){return V.output}})};R(c,f=>{V.output&&f(a)})}var u=m(c,2);{var l=f=>{fo(f,{})};R(u,f=>{V.duplicates&&f(l)})}var d=m(u,2);{var v=f=>{lo(f,{get file(){return V.code}})};R(d,f=>{V.code&&f(v)})}T(t,r),K()}var Ho=(t,e)=>Rt.setType(e()),qo=N('<button type="button" class="px-4 py-2 text-sm font-medium bg-white hover:bg-gray-100 text-gray-900 border border-gray-300 first:rounded-s-lg last:rounded-e-lg focus:ring-1 focus:ring-blue-300 focus:z-10 svelte-2f0583"> </button>'),Wo=N('<div class="inline-flex space-x-[-1px]" role="group"></div>');function Vo(t,e){G(e,!0);const r=A(()=>{var a;return((a=Q.output)==null?void 0:a.root.gzip)??!1}),n=A(()=>{var a;return((a=Q.output)==null?void 0:a.root.brotli)??!1}),i=A(()=>{const a=[["uncompressed","Uncompressed"]];return _(r)&&a.push(["gzip","GZIP"]),_(n)&&a.push(["brotli","Brotli"]),a});var o=Ft(),s=j(o);{var c=a=>{var u=Wo();Ae(u,21,()=>_(i),([l,d])=>l,(l,d)=>{let v=()=>_(d)[0],f=()=>_(d)[1];var h=qo();h.__click=[Ho,v];var p=b(h);C(()=>{W(h,"title",`Show the ${f()} file size in diagram`),ge(h,"active",v()===Rt.type),z(p,f())}),T(l,h)}),T(a,u)};R(s,a=>{_(i).length>1&&a(c)})}T(t,o),K()}Ot(["click"]);function Uo(){V.open("output",Q.output)}var Go=N('<button title="Show details of the active output" aria-label="Details of the entire build output" class="text-gray-900 bg-white border border-gray-300 focus:outline-none hover:bg-gray-100 focus:ring-1 focus:ring-blue-300 font-medium rounded-lg text-sm px-5 h-10"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="text-gray-900 pointer-events-none"><path d="M0 0h24v24H0z" stroke="none" shape-rendering="geometricPrecision"></path><path d="M8 5H6a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h5.697M18 12V7a2 2 0 0 0-2-2h-2" shape-rendering="geometricPrecision"></path><path d="M8 5a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v0a2 2 0 0 1-2 2h-2a2 2 0 0 1-2-2zM8 11h4M8 15h3M14 17.5a2.5 2.5 0 1 0 5 0 2.5 2.5 0 1 0-5 0M18.5 19.5 21 22" shape-rendering="geometricPrecision"></path></svg></button>');function Ko(t,e){G(e,!1),Me();var r=Go();r.__click=[Uo],T(t,r),K()}Ot(["click"]);function Jo(){V.open("duplicates",!0)}var Yo=N('<button title="See duplicated modules found in the build" aria-label="List of duplicated modules found in the build output" class="text-gray-900 bg-red-50 border border-red-400 focus:outline-none hover:bg-red-100 focus:ring-1 focus:ring-blue-300 font-medium rounded-lg text-sm px-5 h-10"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="text-red-600"><path stroke="none" d="M0 0h24v24H0z" shape-rendering="geometricPrecision"></path><path d="M3 12a9 9 0 1 0 18 0 9 9 0 0 0-18 0M12 8v4M12 16h.01" shape-rendering="geometricPrecision"></path></svg></button>');function Zo(t,e){G(e,!1),Me();var r=Ft(),n=j(r);{var i=o=>{var s=Yo();s.__click=[Jo],T(o,s)};R(n,o=>{ce.size>1&&o(i)})}T(t,r),K()}Ot(["click"]);function Qo(t){Q.setIndex(Number(t.target.value))}var Xo=N("<option> </option>"),$o=N('<select class="text-gray-900 bg-white border border-gray-300 focus:outline-none hover:bg-gray-100 focus:ring-1 focus:ring-blue-300 font-medium rounded-lg text-sm pl-4 pr-8 h-10 min-w-80 svelte-yqayp2" title="Select the active output"></select>'),ts=N('<div class="flex items-center justify-center space-x-2 max-w-sm"><!></div>');function es(t,e){G(e,!1),Me();var r=ts(),n=b(r);{var i=o=>{var s=$o();Fi(s,()=>Q.index);var c;s.__change=[Qo],Ae(s,5,()=>Ze,$r,(a,u,l)=>{var d=Xo();d.value=(d.__value=l)==null?"":l;var v=b(d);C(()=>z(v,`${l+1}. ${_(u).root.name??""}`)),T(a,d)}),C(()=>{c!==(c=Q.index)&&(s.value=(s.__value=Q.index)==null?"":Q.index,Je(s,Q.index))}),T(o,s)};R(n,o=>{Ze.length>0&&o(i)})}T(t,r),K()}Ot(["change"]);var rs=N('<a href="https://github.com/filipsobol/sonda" target="_blank" title="Open Sonda repository on GitHub" aria-label="GitHub repository" class="flex items-center text-gray-900 bg-white border border-gray-300 focus:outline-none hover:bg-gray-100 focus:ring-1 focus:ring-blue-300 font-medium rounded-lg text-sm px-5 h-10"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="text-gray-900 pointer-events-none"><path d="M0 0h24v24H0z" stroke="none" shape-rendering="geometricPrecision"></path><path d="M9 19c-4.3 1.4-4.3-2.5-6-3m12 5v-3.5c0-1 .1-1.4-.5-2 2.8-.3 5.5-1.4 5.5-6a4.6 4.6 0 0 0-1.3-3.2 4.2 4.2 0 0 0-.1-3.2s-1.1-.3-3.5 1.3a12.3 12.3 0 0 0-6.2 0C6.5 2.8 5.4 3.1 5.4 3.1a4.2 4.2 0 0 0-.1 3.2A4.6 4.6 0 0 0 4 9.5c0 4.6 2.7 5.7 5.5 6-.6.6-.6 1.2-.5 2V21" shape-rendering="geometricPrecision"></path></svg></a>');function ns(t){var e=rs();T(t,e)}var is=N('<div class="flex flex-row p-4 items-center space-y-0 h-16 justify-between bg-gray-50 shadow"><div class="flex flex-row space-x-2"><!> <!> <!></div> <div class="flex flex-row space-x-2"><!> <!></div></div>');function os(t){var e=is(),r=b(e),n=b(r);es(n,{});var i=m(n,2);Ko(i,{});var o=m(i,2);Zo(o,{});var s=m(r,2),c=b(s);Vo(c,{});var a=m(c,2);ns(a),T(t,e)}var ss=ne('<svg><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M12 21a9 9 0 1 1 0 -18a9 9 0 0 1 0 18z"></path><path d="M8 16l1 -1l1.5 1l1.5 -1l1.5 1l1.5 -1l1 1"></path><path d="M8.5 11.5l1.5 -1.5l-1.5 -1.5"></path><path d="M15.5 11.5l-1.5 -1.5l1.5 -1.5"></path></svg>');function as(t,e){let r=ar(e,["$$slots","$$events","$$legacy"]);var n=ss();let i;C(()=>i=sr(n,i,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round",...r},void 0,!0)),T(t,n)}var ls=N('<div class="flex-grow flex flex-col mt-24 items-center w-full h-full"><!> <h2 class="mt-8 text-3xl font-semibold text-gray-800">No data to display</h2> <p class="mt-4 text-lg text-gray-500">Did you enable source maps in the bundler configuration?</p></div>');function us(t){var e=ls(),r=b(e);as(r,{width:96,height:96,class:"text-yellow-400 fill-yellow-100"}),T(t,e)}var fs=N('<div role="tooltip" class="fixed z-10 px-2 py-1 bg-gray-800 text-gray-100 rounded-md whitespace-nowrap pointer-events-none svelte-1r0gq6x"> </div>');function cs(t){let r=Z(0),n=Z(0),i=Z(0),o=Z(0),s=Z(""),c=Z("0px"),a=Z("0px");function u({target:v,clientX:f,clientY:h}){B(s,et(v instanceof Element&&v.getAttribute("data-hover")||"")),_(s)&&(B(c,(f+_(r)+12>_(i)?f-_(r)-12:f+12)+"px"),B(a,(h+_(n)+12>_(o)?h-_(n):h+12)+"px"))}var l=fs();zt("mouseover",ht.body,u),zt("mousemove",ht.body,u),zt("mouseleave",ht.body,()=>B(s,""));var d=b(l);C(()=>{ge(l,"invisible",!_(s)),Ge(l,"--x",_(c)),Ge(l,"--y",_(a)),z(d,_(s))}),mt(ht.body,"clientWidth",v=>B(i,et(v))),mt(ht.body,"clientHeight",v=>B(o,et(v))),mt(l,"clientWidth",v=>B(r,v)),mt(l,"clientHeight",v=>B(n,v)),T(t,l)}var ds=N('<div role="application" class="wrapper relative flex flex-col overflow-hidden h-screen w-screen"><!> <div class="flex-grow overflow-hidden"><!></div></div> <!> <!>',1);function vs(t,e){G(e,!0);let r=Z(0),n=Z(0);function i({target:p}){var g;const w=p instanceof Element&&p.getAttribute("data-tile");if(!w)return;const E=(g=Q.output)==null?void 0:g.get(w);E&&V.open(Et(E)?"folder":"file",E)}function o(p){p.key==="Escape"&&(p.stopPropagation(),V.close())}var s=ds();zt("click",ht.body,i),zt("keydown",ht.body,o);var c=j(s),a=b(c);os(a);var u=m(a,2),l=b(u);{var d=p=>{ln(p,{get content(){return Q.output.root},get width(){return _(r)},get height(){return _(n)}})},v=p=>{us(p)};R(l,p=>{Q.output?p(d):p(v,!1)})}var f=m(c,2);Fo(f,{});var h=m(f,2);cs(h),mt(u,"clientWidth",p=>B(r,p)),mt(u,"clientHeight",p=>B(n,p)),T(t,s),K()}ki(vs,{target:document.getElementById("app")});</script><style rel="stylesheet" crossorigin>.svelte-ls0uun::highlight(used-code){background-color:#fed7aa;color:#7c2d12}rect.svelte-xusoaq{fill:color-mix(in oklch,#fca5a5 var(--percentage),#86efac)}rect.svelte-xusoaq:hover{fill:color-mix(in oklch,#fecaca var(--percentage),#bbf7d0)}button.active.svelte-2f0583,button.active.svelte-2f0583:hover{background-color:#e5e7eb}select.svelte-yqayp2{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="%236b7280" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path stroke="none" d="M0 0h24v24H0z"/><path d="m8 9 4-4 4 4M16 15l-4 4-4-4"/></svg>');background-position:right .5rem center;background-repeat:no-repeat}div[role=tooltip].svelte-1r0gq6x{transform:translate(var(--x),var(--y));will-change:transform,contents}*{scrollbar-width:thin}*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgb(59 130 246 / .5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgb(59 130 246 / .5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:after,:before{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.pointer-events-none{pointer-events:none}.invisible{visibility:hidden}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.bottom-0{bottom:0}.left-0{left:0}.right-0{right:0}.top-0{top:0}.z-10{z-index:10}.mb-4{margin-bottom:1rem}.mb-8{margin-bottom:2rem}.mr-2{margin-right:.5rem}.mt-12{margin-top:3rem}.mt-2{margin-top:.5rem}.mt-24{margin-top:6rem}.mt-4{margin-top:1rem}.mt-8{margin-top:2rem}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.contents{display:contents}.size-full{width:100%;height:100%}.h-10{height:2.5rem}.h-16{height:4rem}.h-4{height:1rem}.h-\[95vh\]{height:95vh}.h-full{height:100%}.h-screen{height:100vh}.max-h-\[95vh\]{max-height:95vh}.min-h-screen{min-height:100vh}.w-10{width:2.5rem}.w-4{width:1rem}.w-\[40rem\]{width:40rem}.w-\[95vw\]{width:95vw}.w-full{width:100%}.w-max{width:-moz-max-content;width:max-content}.w-screen{width:100vw}.min-w-80{min-width:20rem}.min-w-full{min-width:100%}.max-w-\[400px\]{max-width:400px}.max-w-\[500px\]{max-width:500px}.max-w-\[95vw\]{max-width:95vw}.max-w-full{max-width:100%}.max-w-sm{max-width:24rem}.flex-shrink{flex-shrink:1}.flex-grow{flex-grow:1}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.cursor-pointer{cursor:pointer}.cursor-zoom-in{cursor:zoom-in}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.grid-cols-\[auto_1fr\]{grid-template-columns:auto 1fr}.grid-cols-\[auto_auto_auto\]{grid-template-columns:auto auto auto}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-x-12{-moz-column-gap:3rem;column-gap:3rem}.gap-x-8{-moz-column-gap:2rem;column-gap:2rem}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-\[-1px\]>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(-1px * var(--tw-space-x-reverse));margin-left:calc(-1px * calc(1 - var(--tw-space-x-reverse)))}.space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(0px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0px * var(--tw-space-y-reverse))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.border{border-width:1px}.border-b-2{border-bottom-width:2px}.border-r{border-right-width:1px}.border-dashed{border-style:dashed}.border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219 / var(--tw-border-opacity,1))}.border-red-400{--tw-border-opacity:1;border-color:rgb(248 113 113 / var(--tw-border-opacity,1))}.border-slate-300{--tw-border-opacity:1;border-color:rgb(203 213 225 / var(--tw-border-opacity,1))}.border-transparent{border-color:transparent}.bg-blue-300{--tw-bg-opacity:1;background-color:rgb(147 197 253 / var(--tw-bg-opacity,1))}.bg-gray-200{--tw-bg-opacity:1;background-color:rgb(229 231 235 / var(--tw-bg-opacity,1))}.bg-gray-200\/70{background-color:#e5e7ebb3}.bg-gray-300{--tw-bg-opacity:1;background-color:rgb(209 213 219 / var(--tw-bg-opacity,1))}.bg-gray-50{--tw-bg-opacity:1;background-color:rgb(249 250 251 / var(--tw-bg-opacity,1))}.bg-gray-800{--tw-bg-opacity:1;background-color:rgb(31 41 55 / var(--tw-bg-opacity,1))}.bg-red-50{--tw-bg-opacity:1;background-color:rgb(254 242 242 / var(--tw-bg-opacity,1))}.bg-slate-100{--tw-bg-opacity:1;background-color:rgb(241 245 249 / var(--tw-bg-opacity,1))}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255 / var(--tw-bg-opacity,1))}.bg-yellow-300{--tw-bg-opacity:1;background-color:rgb(253 224 71 / var(--tw-bg-opacity,1))}.fill-yellow-100{fill:#fef9c3}.stroke-gray-500{stroke:#6b7280}.p-1{padding:.25rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.pl-4{padding-left:1rem}.pr-2{padding-right:.5rem}.pr-6{padding-right:1.5rem}.pr-8{padding-right:2rem}.text-center{text-align:center}.text-right{text-align:right}.align-text-bottom{vertical-align:text-bottom}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.leading-5{line-height:1.25rem}.leading-none{line-height:1}.tracking-tight{letter-spacing:-.025em}.text-gray-100{--tw-text-opacity:1;color:rgb(243 244 246 / var(--tw-text-opacity,1))}.text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128 / var(--tw-text-opacity,1))}.text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99 / var(--tw-text-opacity,1))}.text-gray-800{--tw-text-opacity:1;color:rgb(31 41 55 / var(--tw-text-opacity,1))}.text-gray-900{--tw-text-opacity:1;color:rgb(17 24 39 / var(--tw-text-opacity,1))}.text-red-600{--tw-text-opacity:1;color:rgb(220 38 38 / var(--tw-text-opacity,1))}.text-red-800{--tw-text-opacity:1;color:rgb(153 27 27 / var(--tw-text-opacity,1))}.text-slate-400{--tw-text-opacity:1;color:rgb(148 163 184 / var(--tw-text-opacity,1))}.text-slate-600{--tw-text-opacity:1;color:rgb(71 85 105 / var(--tw-text-opacity,1))}.text-yellow-400{--tw-text-opacity:1;color:rgb(250 204 21 / var(--tw-text-opacity,1))}.underline{text-decoration-line:underline}.shadow{--tw-shadow:0 1px 3px 0 rgb(0 0 0 / .1),0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px rgb(0 0 0 / .1),0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur-sm{--tw-backdrop-blur:blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}pre{line-height:1.125}.first\:rounded-s-lg:first-child{border-start-start-radius:.5rem;border-end-start-radius:.5rem}.last\:rounded-e-lg:last-child{border-start-end-radius:.5rem;border-end-end-radius:.5rem}.hover\:bg-gray-100:hover{--tw-bg-opacity:1;background-color:rgb(243 244 246 / var(--tw-bg-opacity,1))}.hover\:bg-red-100:hover{--tw-bg-opacity:1;background-color:rgb(254 226 226 / var(--tw-bg-opacity,1))}.hover\:text-gray-900:hover{--tw-text-opacity:1;color:rgb(17 24 39 / var(--tw-text-opacity,1))}.focus\:z-10:focus{z-index:10}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-1:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\:ring-blue-300:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(147 197 253 / var(--tw-ring-opacity, 1))}</style></head><body class="flex w-screen h-screen font-mono"><div id="app" class="flex w-screen min-h-screen"></div></body></html>
|
package/dist/index.js
CHANGED
|
@@ -281,6 +281,8 @@ function getContributions(sources) {
|
|
|
281
281
|
function generateJsonReport(assets, inputs, options) {
|
|
282
282
|
const acceptedExtensions = [
|
|
283
283
|
'.js',
|
|
284
|
+
'.mjs',
|
|
285
|
+
'.cjs',
|
|
284
286
|
'.css'
|
|
285
287
|
];
|
|
286
288
|
const outputs = assets.filter((asset)=>acceptedExtensions.includes(extname(asset))).reduce((carry, asset)=>{
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../load-source-map/dist/index.js","../src/utils.ts","../src/sourcemap/map.ts","../src/sourcemap/bytes.ts","../src/report.ts","../src/report/generate.ts","../src/bundlers/esbuild.ts","../src/bundlers/rollup.ts","../src/bundlers/webpack.ts"],"sourcesContent":["import { existsSync, readFileSync } from 'fs';\nimport { join, dirname, isAbsolute, resolve } from 'path';\n\n/**\n * Strip any JSON XSSI avoidance prefix from the string (as documented in the source maps specification),\n * and parses the string as JSON.\n *\n * https://github.com/mozilla/source-map/blob/3cb92cc3b73bfab27c146bae4ef2bc09dbb4e5ed/lib/util.js#L162-L164\n */ function parseSourceMapInput(str) {\n return JSON.parse(str.replace(/^\\)]}'[^\\n]*\\n/, \"\"));\n}\n/**\n\tsourceMappingURL=data:application/json;charset=utf-8;base64,data\n\tsourceMappingURL=data:application/json;base64,data\n\tsourceMappingURL=data:application/json;uri,data\n\tsourceMappingURL=map-file-comment.css.map\n\tsourceMappingURL=map-file-comment.css.map?query=value\n*/ const sourceMappingRegExp = /[@#]\\s*sourceMappingURL=(\\S+)\\b/g;\nfunction loadCodeAndMap(codePath) {\n if (!existsSync(codePath)) {\n return null;\n }\n const code = readFileSync(codePath, 'utf-8');\n const extractedComment = code.includes('sourceMappingURL') && Array.from(code.matchAll(sourceMappingRegExp)).at(-1);\n if (!extractedComment || !extractedComment.length) {\n return {\n code\n };\n }\n const maybeMap = loadMap(codePath, extractedComment[1]);\n if (!maybeMap) {\n return {\n code\n };\n }\n const { map, mapPath } = maybeMap;\n map.sources = normalizeSourcesPaths(map, mapPath);\n map.sourcesContent = loadMissingSourcesContent(map);\n delete map.sourceRoot;\n return {\n code,\n map\n };\n}\nfunction loadMap(codePath, sourceMappingURL) {\n if (sourceMappingURL.startsWith('data:')) {\n const map = parseDataUrl(sourceMappingURL);\n return {\n map: parseSourceMapInput(map),\n mapPath: codePath\n };\n }\n const sourceMapFilename = new URL(sourceMappingURL, 'file://').pathname;\n const mapPath = join(dirname(codePath), sourceMapFilename);\n if (!existsSync(mapPath)) {\n return null;\n }\n return {\n map: parseSourceMapInput(readFileSync(mapPath, 'utf-8')),\n mapPath\n };\n}\nfunction parseDataUrl(url) {\n const [prefix, payload] = url.split(',');\n const encoding = prefix.split(';').at(-1);\n switch(encoding){\n case 'base64':\n return Buffer.from(payload, 'base64').toString();\n case 'uri':\n return decodeURIComponent(payload);\n default:\n throw new Error('Unsupported source map encoding: ' + encoding);\n }\n}\n/**\n * Normalize the paths of the sources in the source map to be absolute paths.\n */ function normalizeSourcesPaths(map, mapPath) {\n const mapDir = dirname(mapPath);\n return map.sources.map((source)=>{\n if (!source) {\n return source;\n }\n return isAbsolute(source) ? source : resolve(mapDir, map.sourceRoot ?? '.', source);\n });\n}\n/**\n * Loop through the sources and try to load missing `sourcesContent` from the file system.\n */ function loadMissingSourcesContent(map) {\n return map.sources.map((source, index)=>{\n if (map.sourcesContent?.[index]) {\n return map.sourcesContent[index];\n }\n if (source && existsSync(source)) {\n return readFileSync(source, 'utf-8');\n }\n return null;\n });\n}\n\nexport { loadCodeAndMap };\n//# sourceMappingURL=index.js.map\n","import { join, relative, win32, posix, extname, isAbsolute, format, parse } from 'path';\nimport type { Options } from './types';\n\nexport const esmRegex: RegExp = /\\.m[tj]sx?$/;\nexport const cjsRegex: RegExp = /\\.c[tj]sx?$/;\nexport const jsRegexp: RegExp = /\\.[cm]?[tj]s[x]?$/;\n\nexport function normalizeOptions( options?: Partial<Options> ): Options {\n\tconst format = options?.format\n\t\t|| options?.filename?.split( '.' ).at( -1 ) as Options['format']\n\t\t|| 'html';\n\n\tconst defaultOptions: Options = {\n\t\tformat,\n\t\tfilename: 'sonda-report.' + format,\n\t\topen: true,\n\t\tdetailed: false,\n\t\tsources: false,\n\t\tgzip: false,\n\t\tbrotli: false,\n\t};\n\n\t// Merge user options with the defaults\n\tconst normalizedOptions = Object.assign( {}, defaultOptions, options ) satisfies Options;\n\n\tnormalizedOptions.filename = normalizeOutputPath( normalizedOptions );\n\n\treturn normalizedOptions;\n}\n\nexport function normalizePath( pathToNormalize: string ): string {\n\t// Unicode escape sequences used by Rollup and Vite to identify virtual modules\n\tconst normalized = pathToNormalize.replace( /^\\0/, '' )\n\n\t// Transform absolute paths to relative paths\n\tconst relativized = relative( process.cwd(), normalized );\n\n\t// Ensure paths are POSIX-compliant - https://stackoverflow.com/a/63251716/4617687\n\treturn relativized.replaceAll( win32.sep, posix.sep );\n}\n\nfunction normalizeOutputPath( options: Options ): string {\n\tlet path = options.filename;\n\tconst expectedExtension = '.' + options.format;\n\n\t// Ensure the filename is an absolute path\n\tif ( !isAbsolute( path ) ) {\n\t\tpath = join( process.cwd(), path );\n\t}\n\n\t// Ensure that the `filename` extension matches the `format` option\n\tif ( expectedExtension !== extname( path ) ) {\n\t\tconsole.warn(\n\t\t\t'\\x1b[0;33m' + // Make the message yellow\n\t\t\t`Sonda: The file extension specified in the 'filename' does not match the 'format' option. ` +\n\t\t\t`The extension will be changed to '${ expectedExtension }'.`\n\t\t);\n\n\t\tpath = format( { ...parse( path ), base: '', ext: expectedExtension } )\n\t}\n\n\treturn path;\n}\n","import { default as remapping, type DecodedSourceMap, type EncodedSourceMap } from '@ampproject/remapping';\nimport { loadCodeAndMap } from 'load-source-map';\nimport { resolve } from 'path';\nimport { normalizePath } from '../utils';\nimport type { CodeMap, ReportInput } from '../types';\n\nexport function mapSourceMap(\n\tmap: EncodedSourceMap,\n\tdirPath: string,\n\tinputs: Record<string, ReportInput>\n): DecodedSourceMap {\n\tconst alreadyRemapped = new Set<string>();\n\tconst remapped = remapping( map, ( file, ctx ) => {\n\t\tif ( alreadyRemapped.has( file ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\talreadyRemapped.add( file );\n\n\t\tconst codeMap = addSourcesToInputs(\n\t\t\tresolve( dirPath, file ),\n\t\t\tinputs\n\t\t);\n\n\t\tif ( !codeMap ) {\n\t\t\treturn;\n\t\t}\n\n\t\tctx.content ??= codeMap.code;\n\n\t\treturn codeMap.map;\n\t}, { decodedMappings: true } );\n\n\treturn remapped as DecodedSourceMap;\n}\n\n/**\n * Loads the source map of a given file and adds its \"sources\" to the given inputs object.\n */\nexport function addSourcesToInputs(\n\tpath: string,\n\tinputs: Record<string, ReportInput>\n): CodeMap | null {\n\tconst codeMap = loadCodeAndMap( path );\n\n\tif ( !codeMap ) {\n\t\treturn null;\n\t}\n\n\tconst parentPath = normalizePath( path );\n\tconst format = inputs[ parentPath ]?.format ?? 'unknown';\n\n\tcodeMap.map?.sources\n\t\t.filter( source => source !== null )\n\t\t.forEach( ( source, index ) => {\n\t\t\tconst normalizedPath = normalizePath( source );\n\n\t\t\tif ( parentPath === normalizedPath ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tinputs[ normalizedPath ] = {\n\t\t\t\tbytes: Buffer.byteLength( codeMap.map!.sourcesContent?.[ index ] ?? '' ),\n\t\t\t\tformat,\n\t\t\t\timports: [],\n\t\t\t\tbelongsTo: parentPath\n\t\t\t};\n\t\t} );\n\t\n\treturn codeMap;\n}\n","import { gzipSync, brotliCompressSync } from 'zlib';\nimport type { DecodedSourceMap, SourceMapSegment } from '@ampproject/remapping';\nimport type { Options, Sizes } from '../types';\n\nconst UNASSIGNED = '[unassigned]';\n\nexport function getBytesPerSource(\n\tcode: string,\n\tmap: DecodedSourceMap,\n\tassetSizes: Sizes,\n\toptions: Options\n): Map<string, Sizes> {\n\tconst contributions = getContributions( map.sources );\n\n\t// Split the code into lines\n\tconst codeLines = code.split( /(?<=\\r?\\n)/ );\n\n\tfor ( let lineIndex = 0; lineIndex < codeLines.length; lineIndex++ ) {\n\t\tconst lineCode = codeLines[ lineIndex ];\n\t\tconst mappings = map.mappings[ lineIndex ] || [];\n\t\tlet currentColumn = 0;\n\n\t\tfor ( let i = 0; i <= mappings.length; i++ ) {\n\t\t\t// 0: generatedColumn\n\t\t\t// 1: sourceIndex\n\t\t\t// 2: originalLine\n\t\t\t// 3: originalColumn\n\t\t\t// 4: nameIndex\n\n\t\t\tconst mapping: SourceMapSegment | undefined = mappings[ i ];\n\t\t\tconst startColumn = mapping?.[ 0 ] ?? lineCode.length;\n\t\t\tconst endColumn = mappings[ i + 1 ]?.[ 0 ] ?? lineCode.length;\n\n\t\t\t// Slice the code from currentColumn to startColumn for unassigned code\n\t\t\tif ( startColumn > currentColumn ) {\n\t\t\t\tcontributions.set( UNASSIGNED, contributions.get( UNASSIGNED ) + lineCode.slice( currentColumn, startColumn ) );\n\t\t\t}\n\n\t\t\tif ( mapping ) {\n\t\t\t\t// Slice the code from startColumn to endColumn for assigned code\n\t\t\t\tconst sourceIndex = mapping?.[ 1 ];\n\t\t\t\tconst codeSlice = lineCode.slice( startColumn, endColumn );\n\t\t\t\tconst source = sourceIndex !== undefined ? map.sources[ sourceIndex ]! : UNASSIGNED;\n\n\t\t\t\tcontributions.set( source, contributions.get( source ) + codeSlice );\n\t\t\t\tcurrentColumn = endColumn;\n\t\t\t} else {\n\t\t\t\tcurrentColumn = startColumn;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Compute sizes for each source\n\tconst sourceSizes = new Map<string, Sizes>();\n\n\tconst contributionsSum: Sizes = {\n\t\tuncompressed: 0,\n\t\tgzip: 0,\n\t\tbrotli: 0\n\t};\n\n\tfor ( const [ source, codeSegment ] of contributions ) {\n\t\tconst sizes = getSizes( codeSegment, options );\n\n\t\tcontributionsSum.uncompressed += sizes.uncompressed;\n\t\tcontributionsSum.gzip += sizes.gzip;\n\t\tcontributionsSum.brotli += sizes.brotli;\n\n\t\tsourceSizes.set( source, sizes );\n\t}\n\n\treturn adjustSizes( sourceSizes, assetSizes, contributionsSum, options );\n}\n\nexport function getSizes(\n\tcode: string,\n\toptions: Options\n): Sizes {\n\treturn {\n\t\tuncompressed: Buffer.byteLength( code ),\n\t\tgzip: options.gzip ? gzipSync( code ).length : 0,\n\t\tbrotli: options.brotli ? brotliCompressSync( code ).length : 0\n\t};\n}\n\nfunction getContributions( sources: Array<string | null> ): Map<string, string> {\n\tconst contributions = new Map<string, string>();\n\n\t// Populate contributions with sources\n\tsources\n\t\t.filter( source => source !== null )\n\t\t.forEach( source => contributions.set( source, '' ) );\n\n\t// Add entry for the code that is not assigned to any source\n\tcontributions.set( UNASSIGNED, '' );\n\n\treturn contributions;\n}\n\n/**\n * Compression efficiency improves with the size of the file.\n *\n * However, what we have is the compressed size of the entire bundle (`actual`),\n * the sum of all files compressed individually (`sum`) and the compressed\n * size of a given file (`content`). The last value is essentially a “worst-case”\n * scenario, and the actual size of the file in the bundle is likely to be smaller.\n *\n * We use this information to estimate the actual size of the file in the bundle\n * after compression.\n */\nfunction adjustSizes(\n\tsources: Map<string, Sizes>,\n\tasset: Sizes,\n\tsums: Sizes,\n\toptions: Options\n): Map<string, Sizes> {\n\tconst gzipDelta = options.gzip ? asset.gzip / sums.gzip : 0;\n\tconst brotliDelta = options.brotli ? asset.brotli / sums.brotli : 0;\n\n\tfor ( const [ source, sizes ] of sources ) {\n\t\tsources.set( source, {\n\t\t\tuncompressed: sizes.uncompressed,\n\t\t\tgzip: options.gzip ? Math.round( sizes.gzip * gzipDelta ) : 0,\n\t\t\tbrotli: options.brotli ? Math.round( sizes.brotli * brotliDelta ) : 0\n\t\t} );\n\t}\n\n\treturn sources;\n}\n","import { readFileSync } from 'fs';\nimport { fileURLToPath } from 'url';\nimport { dirname, extname, resolve } from 'path';\nimport { loadCodeAndMap } from 'load-source-map';\nimport { decode } from '@jridgewell/sourcemap-codec';\nimport { mapSourceMap } from './sourcemap/map.js';\nimport { getBytesPerSource, getSizes } from './sourcemap/bytes.js';\nimport type {\n JsonReport,\n MaybeCodeMap,\n ReportInput,\n ReportOutput,\n CodeMap,\n ReportOutputInput,\n Options\n} from './types.js';\nimport { normalizePath } from './utils.js';\n\nexport function generateJsonReport(\n assets: Array<string>,\n inputs: Record<string, ReportInput>,\n options: Options\n): JsonReport {\n const acceptedExtensions = [ '.js', '.css' ];\n\n const outputs = assets\n .filter( asset => acceptedExtensions.includes( extname( asset ) ) )\n .reduce( ( carry, asset ) => {\n const data = processAsset( asset, inputs, options );\n\n if ( data ) {\n carry[ normalizePath( asset ) ] = data;\n }\n\n return carry;\n }, {} as Record<string, ReportOutput> );\n\n return {\n inputs: sortObjectKeys( inputs ),\n outputs: sortObjectKeys( outputs )\n };\n}\n\nexport function generateHtmlReport(\n assets: Array<string>,\n inputs: Record<string, ReportInput>,\n options: Options\n): string {\n const json = generateJsonReport( assets, inputs, options );\n const __dirname = dirname( fileURLToPath( import.meta.url ) );\n const template = readFileSync( resolve( __dirname, './index.html' ), 'utf-8' );\n\n return template.replace( '__REPORT_DATA__', encodeURIComponent( JSON.stringify( json ) ) );\n}\n\nfunction processAsset(\n asset: string,\n inputs: Record<string, ReportInput>,\n options: Options\n): ReportOutput | void {\n const maybeCodeMap = loadCodeAndMap( asset );\n\n if ( !hasCodeAndMap( maybeCodeMap ) ) {\n return;\n }\n\n const { code, map } = maybeCodeMap;\n const mapped = options.detailed\n ? mapSourceMap( map, dirname( asset ), inputs )\n : { ...map, mappings: decode( map.mappings ) };\n\n mapped.sources = mapped.sources.map( source => normalizePath( source! ) );\n\n const assetSizes = getSizes( code, options );\n const bytes = getBytesPerSource( code, mapped, assetSizes, options );\n const outputInputs = Array\n .from( bytes )\n .reduce( ( carry, [ source, sizes ] ) => {\n carry[ normalizePath( source ) ] = sizes;\n\n return carry;\n }, {} as Record<string, ReportOutputInput> );\n\n return {\n ...assetSizes,\n inputs: sortObjectKeys( outputInputs ),\n map: options.sources ? {\n version: 3,\n names: [],\n mappings: mapped.mappings,\n sources: mapped.sources,\n sourcesContent: mapped.sourcesContent,\n } : undefined\n };\n}\n\nfunction hasCodeAndMap( result: MaybeCodeMap ): result is Required<CodeMap> {\n return Boolean( result && result.code && result.map );\n}\n\nfunction sortObjectKeys<T extends unknown>( object: Record<string, T> ): Record<string, T> {\n return Object\n .keys( object )\n .sort()\n .reduce( ( carry, key ) => {\n carry[ key ] = object[ key ];\n\n return carry;\n }, {} as Record<string, T> );\n} \n","import { dirname } from 'path';\nimport { existsSync, mkdirSync, writeFileSync } from 'fs';\nimport { generateHtmlReport, generateJsonReport } from '../report.js';\nimport type { Options, JsonReport } from '../types.js';\nimport { normalizeOptions } from '../utils.js';\n\nexport async function generateReportFromAssets(\n\tassets: string[],\n\tinputs: JsonReport[ 'inputs' ],\n\tuserOptions: Partial<Options>\n): Promise<void> {\n\tconst options = normalizeOptions( userOptions );\n\tconst handler = options.format === 'html' ? saveHtml : saveJson;\n\tconst report = handler( assets, inputs, options );\n\tconst outputDirectory = dirname( options.filename );\n\n\t// Ensure the output directory exists\n\tif ( !existsSync( outputDirectory ) ) {\n\t\tmkdirSync( outputDirectory, { recursive: true } );\n\t}\n\n\t// Write the report to the file system\n\twriteFileSync( options.filename, report );\n\n\tif ( !options.open ) {\n\t\treturn;\n\t}\n\n\t/**\n\t * `open` is ESM-only package, so we need to import it\n\t * dynamically to make it work in CommonJS environment.\n\t */\n\tconst { default: open } = await import( 'open' );\n\n\t// Open the report in the default program for the file extension\n\topen( options.filename );\n}\n\nfunction saveHtml(\n\tassets: string[],\n\tinputs: JsonReport[ 'inputs' ],\n\toptions: Options\n): string {\n\treturn generateHtmlReport( assets, inputs, options );\n}\n\nfunction saveJson(\n\tassets: string[],\n\tinputs: JsonReport[ 'inputs' ],\n\toptions: Options\n): string {\n\tconst report = generateJsonReport( assets, inputs, options );\n\n\treturn JSON.stringify( report, null, 2 );\n}\n","import { resolve } from 'path';\nimport { addSourcesToInputs } from '../sourcemap/map';\nimport { generateReportFromAssets } from '../report/generate';\nimport type { Plugin } from 'esbuild';\nimport type { Options, JsonReport } from '../types';\n\nexport function SondaEsbuildPlugin( options: Partial<Options> = {} ): Plugin {\n\treturn {\n\t\tname: 'sonda',\n\t\tsetup( build ) {\n\t\t\tbuild.initialOptions.metafile = true;\n\n\t\t\t// Esbuild already reads the existing source maps, so there's no need to do it again\n\t\t\toptions.detailed = false;\n\n\t\t\tbuild.onEnd( result => {\n\t\t\t\tif ( !result.metafile ) {\n\t\t\t\t\treturn console.error( 'Metafile is required for SondaEsbuildPlugin to work.' );\n\t\t\t\t}\n\n\t\t\t\tconst cwd = process.cwd();\n\t\t\t\tconst inputs = Object\n\t\t\t\t\t.entries( result.metafile.inputs )\n\t\t\t\t\t.reduce( ( acc, [ path, data ] ) => {\n\t\t\t\t\t\tacc[ path ] = {\n\t\t\t\t\t\t\tbytes: data.bytes,\n\t\t\t\t\t\t\tformat: data.format ?? 'unknown',\n\t\t\t\t\t\t\timports: data.imports.map( data => data.path ),\n\t\t\t\t\t\t\tbelongsTo: null,\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * Because esbuild already reads the existing source maps, there may be\n\t\t\t\t\t\t * cases where some report \"outputs\" include \"inputs\" don't exist in the\n\t\t\t\t\t\t * main \"inputs\" object. To avoid this, we parse each esbuild input and\n\t\t\t\t\t\t * add its sources to the \"inputs\" object.\n\t\t\t\t\t\t */\n\t\t\t\t\t\taddSourcesToInputs(\n\t\t\t\t\t\t\tresolve( cwd, path ),\n\t\t\t\t\t\t\tacc\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\treturn acc;\n\t\t\t\t\t}, {} as JsonReport[ 'inputs' ] );\n\n\t\t\t\treturn generateReportFromAssets(\n\t\t\t\t\tObject.keys( result.metafile.outputs ).map( path => resolve( cwd, path ) ),\n\t\t\t\t\tinputs,\n\t\t\t\t\toptions\n\t\t\t\t);\n\t\t\t} );\n\t\t}\n\t};\n}\n","import { join, resolve, dirname } from 'path';\nimport { normalizePath, cjsRegex, jsRegexp } from '../utils.js';\nimport { generateReportFromAssets } from '../report/generate.js';\nimport type { Options, ModuleFormat, JsonReport } from '../types.js';\nimport type { Plugin, ModuleInfo, NormalizedOutputOptions, OutputBundle } from 'rollup';\n\nexport function SondaRollupPlugin( options: Partial<Options> = {} ): Plugin {\n\tlet inputs: JsonReport[ 'inputs' ] = {};\n\n\treturn {\n\t\tname: 'sonda',\n\n\t\twriteBundle(\n\t\t\t{ dir, file }: NormalizedOutputOptions,\n\t\t\tbundle: OutputBundle\n\t\t) {\n\t\t\tconst outputDir = resolve( process.cwd(), dir ?? dirname( file! ) );\n\t\t\tconst assets = Object.keys( bundle ).map( name => join( outputDir, name ) );\n\n\t\t\treturn generateReportFromAssets(\n\t\t\t\tassets,\n\t\t\t\tinputs,\n\t\t\t\toptions\n\t\t\t);\n\t\t},\n\n\t\tmoduleParsed( module: ModuleInfo ) {\n\t\t\tinputs[ normalizePath( module.id ) ] = {\n\t\t\t\tbytes: module.code ? Buffer.byteLength( module.code ) : 0,\n\t\t\t\tformat: getFormat( module.id, module.meta.commonjs?.isCommonJS ),\n\t\t\t\timports: module.importedIds.map( id => normalizePath( id ) ),\n\t\t\t\tbelongsTo: null,\n\t\t\t};\n\t\t}\n\t};\n}\n\nfunction getFormat( moduleId: string, isCommonJS: boolean | undefined ): ModuleFormat {\n\tif ( isCommonJS === true || cjsRegex.test( moduleId ) ) {\n\t\treturn 'cjs';\n\t}\n\n\tif ( isCommonJS === false || jsRegexp.test( moduleId ) ) {\n\t\treturn 'esm';\n\t}\n\n\treturn'unknown';\n}\n","import { join } from 'path';\nimport { normalizePath, jsRegexp } from '../utils';\nimport { generateReportFromAssets } from '../report/generate';\nimport type { Compiler, StatsModule } from 'webpack';\nimport type { Options, ModuleFormat, JsonReport } from '../types';\n\nexport class SondaWebpackPlugin {\n\toptions: Partial<Options>;\n\n\tconstructor ( options: Partial<Options> = {} ) {\n\t\tthis.options = options;\n\t}\n\n\tapply( compiler: Compiler ): void {\n\t\tcompiler.options.output.devtoolModuleFilenameTemplate = '[absolute-resource-path]';\n\n\t\tcompiler.hooks.afterEmit.tapPromise( 'SondaWebpackPlugin', compilation => {\n\t\t\tconst inputs: JsonReport[ 'inputs' ] = {};\n\t\t\tconst stats = compilation.getStats().toJson( {\n\t\t\t\tmodules: true,\n\t\t\t\tprovidedExports: true,\n\t\t\t} );\n\n\t\t\tconst outputPath = stats.outputPath || compiler.outputPath;\n\t\t\tconst modules: Array<StatsModule> = stats.modules\n\t\t\t\t?.flatMap( mod => mod.modules ? [ mod, ...mod.modules ] : mod )\n\t\t\t\t.filter( mod => mod.nameForCondition && !mod.codeGenerated )\n\t\t\t\t.filter( ( mod, index, self ) => self.findIndex( m => m.nameForCondition === mod.nameForCondition ) === index )\n\t\t\t\t|| [];\n\n\t\t\tmodules.forEach( module => {\n\t\t\t\tconst imports = modules.reduce( ( acc, { nameForCondition, issuerName, reasons } ) => {\n\t\t\t\t\tif ( issuerName === module.name || reasons?.some( reason => reason.resolvedModule === module.name ) ) {\n\t\t\t\t\t\tacc.push( normalizePath( nameForCondition! ) );\n\t\t\t\t\t}\n\n\t\t\t\t\treturn acc;\n\t\t\t\t}, [] as Array<string> );\n\n\t\t\t\tinputs[ normalizePath( module.nameForCondition! ) ] = {\n\t\t\t\t\tbytes: module.size || 0,\n\t\t\t\t\tformat: getFormat( module ),\n\t\t\t\t\timports,\n\t\t\t\t\tbelongsTo: null\n\t\t\t\t};\n\t\t\t} );\n\n\t\t\treturn generateReportFromAssets(\n\t\t\t\tstats.assets?.map( asset => join( outputPath, asset.name ) ) || [],\n\t\t\t\tinputs,\n\t\t\t\tthis.options\n\t\t\t);\n\t\t} );\n\t}\n}\n\nfunction getFormat( module: StatsModule ): ModuleFormat {\n\tif ( !jsRegexp.test( module.nameForCondition! ) ) {\n\t\treturn 'unknown';\n\t}\n\n\t/**\n\t * Sometimes ESM modules have `moduleType` set as `javascript/auto`, so we\n\t * also need to check if the module has exports to determine if it's ESM.\n\t */\n\tif ( module.moduleType === 'javascript/esm' || !!module.providedExports?.length ) {\n\t\treturn 'esm';\n\t}\n\n\treturn 'cjs';\n}\n"],"names":["parseSourceMapInput","str","JSON","parse","replace","sourceMappingRegExp","loadCodeAndMap","codePath","existsSync","code","readFileSync","extractedComment","includes","Array","from","matchAll","at","length","maybeMap","loadMap","map","mapPath","sources","normalizeSourcesPaths","sourcesContent","loadMissingSourcesContent","sourceRoot","sourceMappingURL","startsWith","parseDataUrl","sourceMapFilename","URL","pathname","join","dirname","url","prefix","payload","split","encoding","Buffer","toString","decodeURIComponent","Error","mapDir","source","isAbsolute","resolve","index","cjsRegex","jsRegexp","normalizeOptions","options","format","filename","defaultOptions","open","detailed","gzip","brotli","normalizedOptions","Object","assign","normalizeOutputPath","normalizePath","pathToNormalize","normalized","relativized","relative","process","cwd","replaceAll","win32","sep","posix","path","expectedExtension","extname","console","warn","base","ext","mapSourceMap","dirPath","inputs","alreadyRemapped","Set","remapped","remapping","file","ctx","has","add","codeMap","addSourcesToInputs","content","decodedMappings","parentPath","filter","forEach","normalizedPath","bytes","byteLength","imports","belongsTo","UNASSIGNED","getBytesPerSource","assetSizes","contributions","getContributions","codeLines","lineIndex","lineCode","mappings","currentColumn","i","mapping","startColumn","endColumn","set","get","slice","sourceIndex","codeSlice","undefined","sourceSizes","Map","contributionsSum","uncompressed","codeSegment","sizes","getSizes","adjustSizes","gzipSync","brotliCompressSync","asset","sums","gzipDelta","brotliDelta","Math","round","generateJsonReport","assets","acceptedExtensions","outputs","reduce","carry","data","processAsset","sortObjectKeys","generateHtmlReport","json","__dirname","fileURLToPath","template","encodeURIComponent","stringify","maybeCodeMap","hasCodeAndMap","mapped","decode","outputInputs","version","names","result","Boolean","object","keys","sort","key","generateReportFromAssets","userOptions","handler","saveHtml","saveJson","report","outputDirectory","mkdirSync","recursive","writeFileSync","default","SondaEsbuildPlugin","name","setup","build","initialOptions","metafile","onEnd","error","entries","acc","SondaRollupPlugin","writeBundle","dir","bundle","outputDir","moduleParsed","module","id","getFormat","meta","commonjs","isCommonJS","importedIds","moduleId","test","SondaWebpackPlugin","apply","compiler","output","devtoolModuleFilenameTemplate","hooks","afterEmit","tapPromise","compilation","stats","getStats","toJson","modules","providedExports","outputPath","flatMap","mod","nameForCondition","codeGenerated","self","findIndex","m","issuerName","reasons","some","reason","resolvedModule","push","size","constructor","moduleType"],"mappings":";;;;;;;AAqBA;;;;;IAMA,SAASA,mBAAAA,CAAqBC,GAAW,EAAA;IACxC,OAAOC,IAAAA,CAAKC,KAAK,CAAEF,GAAIG,CAAAA,OAAO,CAAE,gBAAkB,EAAA,EAAA,CAAA,CAAA;AACnD;AAEA;;;;;;AAMA,GACA,MAAMC,mBAAsB,GAAA,kCAAA;AAErB,SAASC,cAAAA,CAAgBC,QAAgB,EAAA;AAC/C,IAAA,IAAK,CAACC,UAAAA,CAAYD,QAAa,CAAA,EAAA;AAC9B,QAAA,OAAO,IAAA;AACR;AAEA,IAAA,MAAME,IAAAA,GAAOC,YAAAA,CAAcH,QAAU,EAAA,OAAA,CAAA;IAErC,MAAMI,gBAAmBF,GAAAA,IAAAA,CAAKG,QAAQ,CAAE,kBAAA,CAAA,IAAwBC,KAAMC,CAAAA,IAAI,CAAEL,IAAAA,CAAKM,QAAQ,CAAEV,mBAAwBW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AA;wBACrGQ,GAAI2C,CAAAA,IAAI,CAAEzK,aAAe+J,CAAAA,gBAAAA,CAAAA,CAAAA;AAC1B;oBAEA,OAAOjC,GAAAA;AACR,iBAAA,EAAG,EAAE,CAAA;AAEL1G,gBAAAA,MAAM,CAAEpB,aAAAA,CAAeqI,MAAO0B,CAAAA,gBAAgB,EAAK,GAAG;oBACrD1H,KAAOgG,EAAAA,MAAAA,CAAOqC,IAAI,IAAI,CAAA;AACtBrL,oBAAAA,MAAAA,EAAQkJ,SAAWF,CAAAA,MAAAA,CAAAA;AACnB9F,oBAAAA,OAAAA;oBACAC,SAAW,EAAA;AACZ,iBAAA;AACD,aAAA,CAAA;AAEA,YAAA,OAAOkE,yBACN6C,KAAMzE,CAAAA,MAAM,EAAE1H,GAAAA,CAAKmH,CAAAA,KAAStG,GAAAA,IAAAA,CAAM2L,UAAYrF,EAAAA,KAAAA,CAAM+C,IAAI,CAAQ,CAAA,IAAA,EAAE,EAClElG,MACA,EAAA,IAAI,CAAChC,OAAO,CAAA;AAEd,SAAA,CAAA;AACD;IA5CAuL,WAAcvL,CAAAA,OAAAA,GAA4B,EAAE,CAAG;QAC9C,IAAI,CAACA,OAAO,GAAGA,OAAAA;AAChB;AA2CD;AAEA,SAASmJ,UAAWF,MAAmB,EAAA;AACtC,IAAA,IAAK,CAACnJ,QAAS2J,CAAAA,IAAI,CAAER,MAAAA,CAAO0B,gBAAgB,CAAM,EAAA;QACjD,OAAO,SAAA;AACR;AAEA;;;KAIA,IAAK1B,MAAOuC,CAAAA,UAAU,KAAK,gBAAA,IAAoB,CAAC,CAACvC,MAAAA,CAAOsB,eAAe,EAAE1M,MAAS,EAAA;QACjF,OAAO,KAAA;AACR;IAEA,OAAO,KAAA;AACR;;;;"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../load-source-map/dist/index.js","../src/utils.ts","../src/sourcemap/map.ts","../src/sourcemap/bytes.ts","../src/report.ts","../src/report/generate.ts","../src/bundlers/esbuild.ts","../src/bundlers/rollup.ts","../src/bundlers/webpack.ts"],"sourcesContent":["import { existsSync, readFileSync } from 'fs';\nimport { join, dirname, isAbsolute, resolve } from 'path';\n\n/**\n * Strip any JSON XSSI avoidance prefix from the string (as documented in the source maps specification),\n * and parses the string as JSON.\n *\n * https://github.com/mozilla/source-map/blob/3cb92cc3b73bfab27c146bae4ef2bc09dbb4e5ed/lib/util.js#L162-L164\n */ function parseSourceMapInput(str) {\n return JSON.parse(str.replace(/^\\)]}'[^\\n]*\\n/, \"\"));\n}\n/**\n\tsourceMappingURL=data:application/json;charset=utf-8;base64,data\n\tsourceMappingURL=data:application/json;base64,data\n\tsourceMappingURL=data:application/json;uri,data\n\tsourceMappingURL=map-file-comment.css.map\n\tsourceMappingURL=map-file-comment.css.map?query=value\n*/ const sourceMappingRegExp = /[@#]\\s*sourceMappingURL=(\\S+)\\b/g;\nfunction loadCodeAndMap(codePath) {\n if (!existsSync(codePath)) {\n return null;\n }\n const code = readFileSync(codePath, 'utf-8');\n const extractedComment = code.includes('sourceMappingURL') && Array.from(code.matchAll(sourceMappingRegExp)).at(-1);\n if (!extractedComment || !extractedComment.length) {\n return {\n code\n };\n }\n const maybeMap = loadMap(codePath, extractedComment[1]);\n if (!maybeMap) {\n return {\n code\n };\n }\n const { map, mapPath } = maybeMap;\n map.sources = normalizeSourcesPaths(map, mapPath);\n map.sourcesContent = loadMissingSourcesContent(map);\n delete map.sourceRoot;\n return {\n code,\n map\n };\n}\nfunction loadMap(codePath, sourceMappingURL) {\n if (sourceMappingURL.startsWith('data:')) {\n const map = parseDataUrl(sourceMappingURL);\n return {\n map: parseSourceMapInput(map),\n mapPath: codePath\n };\n }\n const sourceMapFilename = new URL(sourceMappingURL, 'file://').pathname;\n const mapPath = join(dirname(codePath), sourceMapFilename);\n if (!existsSync(mapPath)) {\n return null;\n }\n return {\n map: parseSourceMapInput(readFileSync(mapPath, 'utf-8')),\n mapPath\n };\n}\nfunction parseDataUrl(url) {\n const [prefix, payload] = url.split(',');\n const encoding = prefix.split(';').at(-1);\n switch(encoding){\n case 'base64':\n return Buffer.from(payload, 'base64').toString();\n case 'uri':\n return decodeURIComponent(payload);\n default:\n throw new Error('Unsupported source map encoding: ' + encoding);\n }\n}\n/**\n * Normalize the paths of the sources in the source map to be absolute paths.\n */ function normalizeSourcesPaths(map, mapPath) {\n const mapDir = dirname(mapPath);\n return map.sources.map((source)=>{\n if (!source) {\n return source;\n }\n return isAbsolute(source) ? source : resolve(mapDir, map.sourceRoot ?? '.', source);\n });\n}\n/**\n * Loop through the sources and try to load missing `sourcesContent` from the file system.\n */ function loadMissingSourcesContent(map) {\n return map.sources.map((source, index)=>{\n if (map.sourcesContent?.[index]) {\n return map.sourcesContent[index];\n }\n if (source && existsSync(source)) {\n return readFileSync(source, 'utf-8');\n }\n return null;\n });\n}\n\nexport { loadCodeAndMap };\n//# sourceMappingURL=index.js.map\n","import { join, relative, win32, posix, extname, isAbsolute, format, parse } from 'path';\nimport type { Options } from './types';\n\nexport const esmRegex: RegExp = /\\.m[tj]sx?$/;\nexport const cjsRegex: RegExp = /\\.c[tj]sx?$/;\nexport const jsRegexp: RegExp = /\\.[cm]?[tj]s[x]?$/;\n\nexport function normalizeOptions( options?: Partial<Options> ): Options {\n\tconst format = options?.format\n\t\t|| options?.filename?.split( '.' ).at( -1 ) as Options['format']\n\t\t|| 'html';\n\n\tconst defaultOptions: Options = {\n\t\tformat,\n\t\tfilename: 'sonda-report.' + format,\n\t\topen: true,\n\t\tdetailed: false,\n\t\tsources: false,\n\t\tgzip: false,\n\t\tbrotli: false,\n\t};\n\n\t// Merge user options with the defaults\n\tconst normalizedOptions = Object.assign( {}, defaultOptions, options ) satisfies Options;\n\n\tnormalizedOptions.filename = normalizeOutputPath( normalizedOptions );\n\n\treturn normalizedOptions;\n}\n\nexport function normalizePath( pathToNormalize: string ): string {\n\t// Unicode escape sequences used by Rollup and Vite to identify virtual modules\n\tconst normalized = pathToNormalize.replace( /^\\0/, '' )\n\n\t// Transform absolute paths to relative paths\n\tconst relativized = relative( process.cwd(), normalized );\n\n\t// Ensure paths are POSIX-compliant - https://stackoverflow.com/a/63251716/4617687\n\treturn relativized.replaceAll( win32.sep, posix.sep );\n}\n\nfunction normalizeOutputPath( options: Options ): string {\n\tlet path = options.filename;\n\tconst expectedExtension = '.' + options.format;\n\n\t// Ensure the filename is an absolute path\n\tif ( !isAbsolute( path ) ) {\n\t\tpath = join( process.cwd(), path );\n\t}\n\n\t// Ensure that the `filename` extension matches the `format` option\n\tif ( expectedExtension !== extname( path ) ) {\n\t\tconsole.warn(\n\t\t\t'\\x1b[0;33m' + // Make the message yellow\n\t\t\t`Sonda: The file extension specified in the 'filename' does not match the 'format' option. ` +\n\t\t\t`The extension will be changed to '${ expectedExtension }'.`\n\t\t);\n\n\t\tpath = format( { ...parse( path ), base: '', ext: expectedExtension } )\n\t}\n\n\treturn path;\n}\n","import { default as remapping, type DecodedSourceMap, type EncodedSourceMap } from '@ampproject/remapping';\nimport { loadCodeAndMap } from 'load-source-map';\nimport { resolve } from 'path';\nimport { normalizePath } from '../utils';\nimport type { CodeMap, ReportInput } from '../types';\n\nexport function mapSourceMap(\n\tmap: EncodedSourceMap,\n\tdirPath: string,\n\tinputs: Record<string, ReportInput>\n): DecodedSourceMap {\n\tconst alreadyRemapped = new Set<string>();\n\tconst remapped = remapping( map, ( file, ctx ) => {\n\t\tif ( alreadyRemapped.has( file ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\talreadyRemapped.add( file );\n\n\t\tconst codeMap = addSourcesToInputs(\n\t\t\tresolve( dirPath, file ),\n\t\t\tinputs\n\t\t);\n\n\t\tif ( !codeMap ) {\n\t\t\treturn;\n\t\t}\n\n\t\tctx.content ??= codeMap.code;\n\n\t\treturn codeMap.map;\n\t}, { decodedMappings: true } );\n\n\treturn remapped as DecodedSourceMap;\n}\n\n/**\n * Loads the source map of a given file and adds its \"sources\" to the given inputs object.\n */\nexport function addSourcesToInputs(\n\tpath: string,\n\tinputs: Record<string, ReportInput>\n): CodeMap | null {\n\tconst codeMap = loadCodeAndMap( path );\n\n\tif ( !codeMap ) {\n\t\treturn null;\n\t}\n\n\tconst parentPath = normalizePath( path );\n\tconst format = inputs[ parentPath ]?.format ?? 'unknown';\n\n\tcodeMap.map?.sources\n\t\t.filter( source => source !== null )\n\t\t.forEach( ( source, index ) => {\n\t\t\tconst normalizedPath = normalizePath( source );\n\n\t\t\tif ( parentPath === normalizedPath ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tinputs[ normalizedPath ] = {\n\t\t\t\tbytes: Buffer.byteLength( codeMap.map!.sourcesContent?.[ index ] ?? '' ),\n\t\t\t\tformat,\n\t\t\t\timports: [],\n\t\t\t\tbelongsTo: parentPath\n\t\t\t};\n\t\t} );\n\t\n\treturn codeMap;\n}\n","import { gzipSync, brotliCompressSync } from 'zlib';\nimport type { DecodedSourceMap, SourceMapSegment } from '@ampproject/remapping';\nimport type { Options, Sizes } from '../types';\n\nconst UNASSIGNED = '[unassigned]';\n\nexport function getBytesPerSource(\n\tcode: string,\n\tmap: DecodedSourceMap,\n\tassetSizes: Sizes,\n\toptions: Options\n): Map<string, Sizes> {\n\tconst contributions = getContributions( map.sources );\n\n\t// Split the code into lines\n\tconst codeLines = code.split( /(?<=\\r?\\n)/ );\n\n\tfor ( let lineIndex = 0; lineIndex < codeLines.length; lineIndex++ ) {\n\t\tconst lineCode = codeLines[ lineIndex ];\n\t\tconst mappings = map.mappings[ lineIndex ] || [];\n\t\tlet currentColumn = 0;\n\n\t\tfor ( let i = 0; i <= mappings.length; i++ ) {\n\t\t\t// 0: generatedColumn\n\t\t\t// 1: sourceIndex\n\t\t\t// 2: originalLine\n\t\t\t// 3: originalColumn\n\t\t\t// 4: nameIndex\n\n\t\t\tconst mapping: SourceMapSegment | undefined = mappings[ i ];\n\t\t\tconst startColumn = mapping?.[ 0 ] ?? lineCode.length;\n\t\t\tconst endColumn = mappings[ i + 1 ]?.[ 0 ] ?? lineCode.length;\n\n\t\t\t// Slice the code from currentColumn to startColumn for unassigned code\n\t\t\tif ( startColumn > currentColumn ) {\n\t\t\t\tcontributions.set( UNASSIGNED, contributions.get( UNASSIGNED ) + lineCode.slice( currentColumn, startColumn ) );\n\t\t\t}\n\n\t\t\tif ( mapping ) {\n\t\t\t\t// Slice the code from startColumn to endColumn for assigned code\n\t\t\t\tconst sourceIndex = mapping?.[ 1 ];\n\t\t\t\tconst codeSlice = lineCode.slice( startColumn, endColumn );\n\t\t\t\tconst source = sourceIndex !== undefined ? map.sources[ sourceIndex ]! : UNASSIGNED;\n\n\t\t\t\tcontributions.set( source, contributions.get( source ) + codeSlice );\n\t\t\t\tcurrentColumn = endColumn;\n\t\t\t} else {\n\t\t\t\tcurrentColumn = startColumn;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Compute sizes for each source\n\tconst sourceSizes = new Map<string, Sizes>();\n\n\tconst contributionsSum: Sizes = {\n\t\tuncompressed: 0,\n\t\tgzip: 0,\n\t\tbrotli: 0\n\t};\n\n\tfor ( const [ source, codeSegment ] of contributions ) {\n\t\tconst sizes = getSizes( codeSegment, options );\n\n\t\tcontributionsSum.uncompressed += sizes.uncompressed;\n\t\tcontributionsSum.gzip += sizes.gzip;\n\t\tcontributionsSum.brotli += sizes.brotli;\n\n\t\tsourceSizes.set( source, sizes );\n\t}\n\n\treturn adjustSizes( sourceSizes, assetSizes, contributionsSum, options );\n}\n\nexport function getSizes(\n\tcode: string,\n\toptions: Options\n): Sizes {\n\treturn {\n\t\tuncompressed: Buffer.byteLength( code ),\n\t\tgzip: options.gzip ? gzipSync( code ).length : 0,\n\t\tbrotli: options.brotli ? brotliCompressSync( code ).length : 0\n\t};\n}\n\nfunction getContributions( sources: Array<string | null> ): Map<string, string> {\n\tconst contributions = new Map<string, string>();\n\n\t// Populate contributions with sources\n\tsources\n\t\t.filter( source => source !== null )\n\t\t.forEach( source => contributions.set( source, '' ) );\n\n\t// Add entry for the code that is not assigned to any source\n\tcontributions.set( UNASSIGNED, '' );\n\n\treturn contributions;\n}\n\n/**\n * Compression efficiency improves with the size of the file.\n *\n * However, what we have is the compressed size of the entire bundle (`actual`),\n * the sum of all files compressed individually (`sum`) and the compressed\n * size of a given file (`content`). The last value is essentially a “worst-case”\n * scenario, and the actual size of the file in the bundle is likely to be smaller.\n *\n * We use this information to estimate the actual size of the file in the bundle\n * after compression.\n */\nfunction adjustSizes(\n\tsources: Map<string, Sizes>,\n\tasset: Sizes,\n\tsums: Sizes,\n\toptions: Options\n): Map<string, Sizes> {\n\tconst gzipDelta = options.gzip ? asset.gzip / sums.gzip : 0;\n\tconst brotliDelta = options.brotli ? asset.brotli / sums.brotli : 0;\n\n\tfor ( const [ source, sizes ] of sources ) {\n\t\tsources.set( source, {\n\t\t\tuncompressed: sizes.uncompressed,\n\t\t\tgzip: options.gzip ? Math.round( sizes.gzip * gzipDelta ) : 0,\n\t\t\tbrotli: options.brotli ? Math.round( sizes.brotli * brotliDelta ) : 0\n\t\t} );\n\t}\n\n\treturn sources;\n}\n","import { readFileSync } from 'fs';\nimport { fileURLToPath } from 'url';\nimport { dirname, extname, resolve } from 'path';\nimport { loadCodeAndMap } from 'load-source-map';\nimport { decode } from '@jridgewell/sourcemap-codec';\nimport { mapSourceMap } from './sourcemap/map.js';\nimport { getBytesPerSource, getSizes } from './sourcemap/bytes.js';\nimport type {\n JsonReport,\n MaybeCodeMap,\n ReportInput,\n ReportOutput,\n CodeMap,\n ReportOutputInput,\n Options\n} from './types.js';\nimport { normalizePath } from './utils.js';\n\nexport function generateJsonReport(\n assets: Array<string>,\n inputs: Record<string, ReportInput>,\n options: Options\n): JsonReport {\n const acceptedExtensions = [ '.js', '.mjs', '.cjs', '.css' ];\n\n const outputs = assets\n .filter( asset => acceptedExtensions.includes( extname( asset ) ) )\n .reduce( ( carry, asset ) => {\n const data = processAsset( asset, inputs, options );\n\n if ( data ) {\n carry[ normalizePath( asset ) ] = data;\n }\n\n return carry;\n }, {} as Record<string, ReportOutput> );\n\n return {\n inputs: sortObjectKeys( inputs ),\n outputs: sortObjectKeys( outputs )\n };\n}\n\nexport function generateHtmlReport(\n assets: Array<string>,\n inputs: Record<string, ReportInput>,\n options: Options\n): string {\n const json = generateJsonReport( assets, inputs, options );\n const __dirname = dirname( fileURLToPath( import.meta.url ) );\n const template = readFileSync( resolve( __dirname, './index.html' ), 'utf-8' );\n\n return template.replace( '__REPORT_DATA__', encodeURIComponent( JSON.stringify( json ) ) );\n}\n\nfunction processAsset(\n asset: string,\n inputs: Record<string, ReportInput>,\n options: Options\n): ReportOutput | void {\n const maybeCodeMap = loadCodeAndMap( asset );\n\n if ( !hasCodeAndMap( maybeCodeMap ) ) {\n return;\n }\n\n const { code, map } = maybeCodeMap;\n const mapped = options.detailed\n ? mapSourceMap( map, dirname( asset ), inputs )\n : { ...map, mappings: decode( map.mappings ) };\n\n mapped.sources = mapped.sources.map( source => normalizePath( source! ) );\n\n const assetSizes = getSizes( code, options );\n const bytes = getBytesPerSource( code, mapped, assetSizes, options );\n const outputInputs = Array\n .from( bytes )\n .reduce( ( carry, [ source, sizes ] ) => {\n carry[ normalizePath( source ) ] = sizes;\n\n return carry;\n }, {} as Record<string, ReportOutputInput> );\n\n return {\n ...assetSizes,\n inputs: sortObjectKeys( outputInputs ),\n map: options.sources ? {\n version: 3,\n names: [],\n mappings: mapped.mappings,\n sources: mapped.sources,\n sourcesContent: mapped.sourcesContent,\n } : undefined\n };\n}\n\nfunction hasCodeAndMap( result: MaybeCodeMap ): result is Required<CodeMap> {\n return Boolean( result && result.code && result.map );\n}\n\nfunction sortObjectKeys<T extends unknown>( object: Record<string, T> ): Record<string, T> {\n return Object\n .keys( object )\n .sort()\n .reduce( ( carry, key ) => {\n carry[ key ] = object[ key ];\n\n return carry;\n }, {} as Record<string, T> );\n} \n","import { dirname } from 'path';\nimport { existsSync, mkdirSync, writeFileSync } from 'fs';\nimport { generateHtmlReport, generateJsonReport } from '../report.js';\nimport type { Options, JsonReport } from '../types.js';\nimport { normalizeOptions } from '../utils.js';\n\nexport async function generateReportFromAssets(\n\tassets: string[],\n\tinputs: JsonReport[ 'inputs' ],\n\tuserOptions: Partial<Options>\n): Promise<void> {\n\tconst options = normalizeOptions( userOptions );\n\tconst handler = options.format === 'html' ? saveHtml : saveJson;\n\tconst report = handler( assets, inputs, options );\n\tconst outputDirectory = dirname( options.filename );\n\n\t// Ensure the output directory exists\n\tif ( !existsSync( outputDirectory ) ) {\n\t\tmkdirSync( outputDirectory, { recursive: true } );\n\t}\n\n\t// Write the report to the file system\n\twriteFileSync( options.filename, report );\n\n\tif ( !options.open ) {\n\t\treturn;\n\t}\n\n\t/**\n\t * `open` is ESM-only package, so we need to import it\n\t * dynamically to make it work in CommonJS environment.\n\t */\n\tconst { default: open } = await import( 'open' );\n\n\t// Open the report in the default program for the file extension\n\topen( options.filename );\n}\n\nfunction saveHtml(\n\tassets: string[],\n\tinputs: JsonReport[ 'inputs' ],\n\toptions: Options\n): string {\n\treturn generateHtmlReport( assets, inputs, options );\n}\n\nfunction saveJson(\n\tassets: string[],\n\tinputs: JsonReport[ 'inputs' ],\n\toptions: Options\n): string {\n\tconst report = generateJsonReport( assets, inputs, options );\n\n\treturn JSON.stringify( report, null, 2 );\n}\n","import { resolve } from 'path';\nimport { addSourcesToInputs } from '../sourcemap/map';\nimport { generateReportFromAssets } from '../report/generate';\nimport type { Plugin } from 'esbuild';\nimport type { Options, JsonReport } from '../types';\n\nexport function SondaEsbuildPlugin( options: Partial<Options> = {} ): Plugin {\n\treturn {\n\t\tname: 'sonda',\n\t\tsetup( build ) {\n\t\t\tbuild.initialOptions.metafile = true;\n\n\t\t\t// Esbuild already reads the existing source maps, so there's no need to do it again\n\t\t\toptions.detailed = false;\n\n\t\t\tbuild.onEnd( result => {\n\t\t\t\tif ( !result.metafile ) {\n\t\t\t\t\treturn console.error( 'Metafile is required for SondaEsbuildPlugin to work.' );\n\t\t\t\t}\n\n\t\t\t\tconst cwd = process.cwd();\n\t\t\t\tconst inputs = Object\n\t\t\t\t\t.entries( result.metafile.inputs )\n\t\t\t\t\t.reduce( ( acc, [ path, data ] ) => {\n\t\t\t\t\t\tacc[ path ] = {\n\t\t\t\t\t\t\tbytes: data.bytes,\n\t\t\t\t\t\t\tformat: data.format ?? 'unknown',\n\t\t\t\t\t\t\timports: data.imports.map( data => data.path ),\n\t\t\t\t\t\t\tbelongsTo: null,\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * Because esbuild already reads the existing source maps, there may be\n\t\t\t\t\t\t * cases where some report \"outputs\" include \"inputs\" don't exist in the\n\t\t\t\t\t\t * main \"inputs\" object. To avoid this, we parse each esbuild input and\n\t\t\t\t\t\t * add its sources to the \"inputs\" object.\n\t\t\t\t\t\t */\n\t\t\t\t\t\taddSourcesToInputs(\n\t\t\t\t\t\t\tresolve( cwd, path ),\n\t\t\t\t\t\t\tacc\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\treturn acc;\n\t\t\t\t\t}, {} as JsonReport[ 'inputs' ] );\n\n\t\t\t\treturn generateReportFromAssets(\n\t\t\t\t\tObject.keys( result.metafile.outputs ).map( path => resolve( cwd, path ) ),\n\t\t\t\t\tinputs,\n\t\t\t\t\toptions\n\t\t\t\t);\n\t\t\t} );\n\t\t}\n\t};\n}\n","import { join, resolve, dirname } from 'path';\nimport { normalizePath, cjsRegex, jsRegexp } from '../utils.js';\nimport { generateReportFromAssets } from '../report/generate.js';\nimport type { Options, ModuleFormat, JsonReport } from '../types.js';\nimport type { Plugin, ModuleInfo, NormalizedOutputOptions, OutputBundle } from 'rollup';\n\nexport function SondaRollupPlugin( options: Partial<Options> = {} ): Plugin {\n\tlet inputs: JsonReport[ 'inputs' ] = {};\n\n\treturn {\n\t\tname: 'sonda',\n\n\t\twriteBundle(\n\t\t\t{ dir, file }: NormalizedOutputOptions,\n\t\t\tbundle: OutputBundle\n\t\t) {\n\t\t\tconst outputDir = resolve( process.cwd(), dir ?? dirname( file! ) );\n\t\t\tconst assets = Object.keys( bundle ).map( name => join( outputDir, name ) );\n\n\t\t\treturn generateReportFromAssets(\n\t\t\t\tassets,\n\t\t\t\tinputs,\n\t\t\t\toptions\n\t\t\t);\n\t\t},\n\n\t\tmoduleParsed( module: ModuleInfo ) {\n\t\t\tinputs[ normalizePath( module.id ) ] = {\n\t\t\t\tbytes: module.code ? Buffer.byteLength( module.code ) : 0,\n\t\t\t\tformat: getFormat( module.id, module.meta.commonjs?.isCommonJS ),\n\t\t\t\timports: module.importedIds.map( id => normalizePath( id ) ),\n\t\t\t\tbelongsTo: null,\n\t\t\t};\n\t\t}\n\t};\n}\n\nfunction getFormat( moduleId: string, isCommonJS: boolean | undefined ): ModuleFormat {\n\tif ( isCommonJS === true || cjsRegex.test( moduleId ) ) {\n\t\treturn 'cjs';\n\t}\n\n\tif ( isCommonJS === false || jsRegexp.test( moduleId ) ) {\n\t\treturn 'esm';\n\t}\n\n\treturn'unknown';\n}\n","import { join } from 'path';\nimport { normalizePath, jsRegexp } from '../utils';\nimport { generateReportFromAssets } from '../report/generate';\nimport type { Compiler, StatsModule } from 'webpack';\nimport type { Options, ModuleFormat, JsonReport } from '../types';\n\nexport class SondaWebpackPlugin {\n\toptions: Partial<Options>;\n\n\tconstructor ( options: Partial<Options> = {} ) {\n\t\tthis.options = options;\n\t}\n\n\tapply( compiler: Compiler ): void {\n\t\tcompiler.options.output.devtoolModuleFilenameTemplate = '[absolute-resource-path]';\n\n\t\tcompiler.hooks.afterEmit.tapPromise( 'SondaWebpackPlugin', compilation => {\n\t\t\tconst inputs: JsonReport[ 'inputs' ] = {};\n\t\t\tconst stats = compilation.getStats().toJson( {\n\t\t\t\tmodules: true,\n\t\t\t\tprovidedExports: true,\n\t\t\t} );\n\n\t\t\tconst outputPath = stats.outputPath || compiler.outputPath;\n\t\t\tconst modules: Array<StatsModule> = stats.modules\n\t\t\t\t?.flatMap( mod => mod.modules ? [ mod, ...mod.modules ] : mod )\n\t\t\t\t.filter( mod => mod.nameForCondition && !mod.codeGenerated )\n\t\t\t\t.filter( ( mod, index, self ) => self.findIndex( m => m.nameForCondition === mod.nameForCondition ) === index )\n\t\t\t\t|| [];\n\n\t\t\tmodules.forEach( module => {\n\t\t\t\tconst imports = modules.reduce( ( acc, { nameForCondition, issuerName, reasons } ) => {\n\t\t\t\t\tif ( issuerName === module.name || reasons?.some( reason => reason.resolvedModule === module.name ) ) {\n\t\t\t\t\t\tacc.push( normalizePath( nameForCondition! ) );\n\t\t\t\t\t}\n\n\t\t\t\t\treturn acc;\n\t\t\t\t}, [] as Array<string> );\n\n\t\t\t\tinputs[ normalizePath( module.nameForCondition! ) ] = {\n\t\t\t\t\tbytes: module.size || 0,\n\t\t\t\t\tformat: getFormat( module ),\n\t\t\t\t\timports,\n\t\t\t\t\tbelongsTo: null\n\t\t\t\t};\n\t\t\t} );\n\n\t\t\treturn generateReportFromAssets(\n\t\t\t\tstats.assets?.map( asset => join( outputPath, asset.name ) ) || [],\n\t\t\t\tinputs,\n\t\t\t\tthis.options\n\t\t\t);\n\t\t} );\n\t}\n}\n\nfunction getFormat( module: StatsModule ): ModuleFormat {\n\tif ( !jsRegexp.test( module.nameForCondition! ) ) {\n\t\treturn 'unknown';\n\t}\n\n\t/**\n\t * Sometimes ESM modules have `moduleType` set as `javascript/auto`, so we\n\t * also need to check if the module has exports to determine if it's ESM.\n\t */\n\tif ( module.moduleType === 'javascript/esm' || !!module.providedExports?.length ) {\n\t\treturn 'esm';\n\t}\n\n\treturn 'cjs';\n}\n"],"names":["parseSourceMapInput","str","JSON","parse","replace","sourceMappingRegExp","loadCodeAndMap","codePath","existsSync","code","readFileSync","extractedComment","includes","Array","from","matchAll","at","length","maybeMap","loadMap","map","mapPath","sources","normalizeSourcesPaths","sourcesContent","loadMissingSourcesContent","sourceRoot","sourceMappingURL","startsWith","parseDataUrl","sourceMapFilename","URL","pathname","join","dirname","url","prefix","payload","split","encoding","Buffer","toString","decodeURIComponent","Error","mapDir","source","isAbsolute","resolve","index","cjsRegex","jsRegexp","normalizeOptions","options","format","filename","defaultOptions","open","detailed","gzip","brotli","normalizedOptions","Object","assign","normalizeOutputPath","normalizePath","pathToNormalize","normalized","relativized","relative","process","cwd","replaceAll","win32","sep","posix","path","expectedExtension","extname","console","warn","base","ext","mapSourceMap","dirPath","inputs","alreadyRemapped","Set","remapped","remapping","file","ctx","has","add","codeMap","addSourcesToInputs","content","decodedMappings","parentPath","filter","forEach","normalizedPath","bytes","byteLength","imports","belongsTo","UNASSIGNED","getBytesPerSource","assetSizes","contributions","getContributions","codeLines","lineIndex","lineCode","mappings","currentColumn","i","mapping","startColumn","endColumn","set","get","slice","sourceIndex","codeSlice","undefined","sourceSizes","Map","contributionsSum","uncompressed","codeSegment","sizes","getSizes","adjustSizes","gzipSync","brotliCompressSync","asset","sums","gzipDelta","brotliDelta","Math","round","generateJsonReport","assets","acceptedExtensions","outputs","reduce","carry","data","processAsset","sortObjectKeys","generateHtmlReport","json","__dirname","fileURLToPath","template","encodeURIComponent","stringify","maybeCodeMap","hasCodeAndMap","mapped","decode","outputInputs","version","names","result","Boolean","object","keys","sort","key","generateReportFromAssets","userOptions","handler","saveHtml","saveJson","report","outputDirectory","mkdirSync","recursive","writeFileSync","default","SondaEsbuildPlugin","name","setup","build","initialOptions","metafile","onEnd","error","entries","acc","SondaRollupPlugin","writeBundle","dir","bundle","outputDir","moduleParsed","module","id","getFormat","meta","commonjs","isCommonJS","importedIds","moduleId","test","SondaWebpackPlugin","apply","compiler","output","devtoolModuleFilenameTemplate","hooks","afterEmit","tapPromise","compilation","stats","getStats","toJson","modules","providedExports","outputPath","flatMap","mod","nameForCondition","codeGenerated","self","findIndex","m","issuerName","reasons","some","reason","resolvedModule","push","size","constructor","moduleType"],"mappings":";;;;;;;AAqBA;;;;;IAMA,SAASA,mBAAAA,CAAqBC,GAAW,EAAA;IACxC,OAAOC,IAAAA,CAAKC,KAAK,CAAEF,GAAIG,CAAAA,OAAO,CAAE,gBAAkB,EAAA,EAAA,CAAA,CAAA;AACnD;AAEA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tC,IAAA,IAAK,CAACnJ,QAAS2J,CAAAA,IAAI,CAAER,MAAAA,CAAO0B,gBAAgB,CAAM,EAAA;QACjD,OAAO,SAAA;AACR;AAEA;;;KAIA,IAAK1B,MAAOuC,CAAAA,UAAU,KAAK,gBAAA,IAAoB,CAAC,CAACvC,MAAAA,CAAOsB,eAAe,EAAE1M,MAAS,EAAA;QACjF,OAAO,KAAA;AACR;IAEA,OAAO,KAAA;AACR;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sonda",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.2",
|
|
4
4
|
"description": "Universal visualizer and analyzer for JavaScript and CSS bundles. Works with Vite, Rollup, webpack, Rspack, and esbuild",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"bundle analyzer",
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
"url": "git+https://github.com/filipsobol/sonda.git",
|
|
22
22
|
"directory": "packages/sonda"
|
|
23
23
|
},
|
|
24
|
+
"homepage": "https://sonda.dev",
|
|
24
25
|
"exports": {
|
|
25
26
|
".": {
|
|
26
27
|
"types": "./dist/index.d.ts",
|