@wuchale/svelte 0.8.0

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/README.md ADDED
@@ -0,0 +1,359 @@
1
+ # `wuchale` svelte
2
+
3
+ [![npm version](https://img.shields.io/npm/v/wuchale)](https://www.npmjs.com/package/wuchale) ![License](https://img.shields.io/github/license/K1DV5/wuchale)
4
+
5
+ A non-invasive compile-time internationalization (i18n) toolkit.
6
+ Inspired by Lingui, built from scratch with performance, clarity, and
7
+ simplicity in mind.
8
+
9
+ > 🎯 **Smart translations, tiny runtime, full HMR.** Extract strings at build
10
+ > time, generate optimized translation catalogs, support live translations
11
+ > (even with Gemini AI), and ship minimal code to production.
12
+
13
+ ## Why `wuchale`?
14
+
15
+ Traditional i18n solutions require you to wrap every translatable string with
16
+ function calls or components. `wuchale` doesn't.
17
+
18
+ ```svelte
19
+ <!-- Traditional i18n -->
20
+ <p>{t('Hello')}</p>
21
+ <p><Trans>Welcome {userName}</Trans></p>
22
+
23
+ <!-- With wuchale -->
24
+ <p>Hello</p>
25
+ <p>Welcome {userName}</p>
26
+ ```
27
+
28
+ Write your Svelte code naturally. No imports, no wrappers, no annotations.
29
+ `wuchale` handles everything at compile time.
30
+
31
+ Try live examples in your browser, no setup required:
32
+
33
+ - Svelte: [![Svelte example on StackBlitz](https://img.shields.io/badge/StackBlitz-Demo-blue?logo=stackblitz)](https://stackblitz.com/github/K1DV5/wuchale/tree/main/examples/svelte)
34
+ - SvelteKit: [![SvelteKit example on StackBlitz](https://img.shields.io/badge/StackBlitz-Demo-blue?logo=stackblitz)](https://stackblitz.com/github/K1DV5/wuchale/tree/main/examples/sveltekit)
35
+
36
+ ## ✨ Key Features
37
+
38
+ - **🔧 Zero-effort integration** - Add i18n to existing projects without rewriting code
39
+ - **🚀 Compile-time optimization** - All transformations happen during build, minimal runtime overhead
40
+ - **🔄 Full, granular HMR support** - Live updates during development, including auto-translation
41
+ - **📦 Tiny footprint** - Only 2 additional dependencies (`wuchale` + `pofile`), no bloated `node_modules`
42
+ - **🎯 Smart extraction** - Uses AST analysis: handles nested markup, conditionals, loops, and complex interpolations
43
+ - **🌍 Standard .po files** - Compatible with existing translation tools and workflows
44
+ - **🤖 Optional AI translation** - Gemini integration for automatic translations during development
45
+ - **⚡ Svelte 5 ready** - Built for the future with runes and snippets support
46
+
47
+ ## 🚀 Quick Start
48
+
49
+ ### 1. Install
50
+
51
+ ```bash
52
+ npm install wuchale @wuchale/svelte
53
+ ```
54
+
55
+ ### 2. Configure Vite
56
+
57
+ ```javascript
58
+ // vite.config.js
59
+ import { svelte } from '@sveltejs/vite-plugin-svelte'
60
+ import { wuchale } from 'wuchale'
61
+
62
+ export default {
63
+ plugins: [
64
+ wuchale(),
65
+ svelte(),
66
+ ]
67
+ }
68
+ ```
69
+
70
+ ### 3. Create Configuration
71
+
72
+ Create `wuchale.config.js` in your project root:
73
+
74
+ ```javascript
75
+ // @ts-check
76
+ import { adapter as svelte } from "@wuchale/svelte"
77
+ import { defineConfig } from "wuchale"
78
+
79
+ export default defineConfig({
80
+ locales: {
81
+ // English included by default
82
+ es: { name: 'Spanish' },
83
+ fr: { name: 'French' }
84
+ },
85
+ adapters: {
86
+ main: svelte(),
87
+ }
88
+ })
89
+ ```
90
+
91
+ ### 4. Create the locales directory
92
+
93
+ ```bash
94
+ mkdir src/locales
95
+ ```
96
+
97
+ ### 5. Add CLI Scripts (Optional)
98
+
99
+ ```jsonc
100
+ // package.json
101
+ {
102
+ "scripts": {
103
+ "extract": "wuchale",
104
+ "clean": "wuchale --clean"
105
+ }
106
+ }
107
+ ```
108
+
109
+ ### 6. Setup in Your App
110
+
111
+ #### For SvelteKit (SSR/SSG)
112
+
113
+ ```typescript
114
+ // src/routes/+layout.js
115
+ import { setCatalog } from 'wuchale/runtime.svelte.js'
116
+
117
+ export async function load({ url }) {
118
+ const locale = url.searchParams.get('locale') ?? 'en'
119
+ // or you can use [locale] in your dir names to get something like /en/path as params here
120
+ setCatalog(await import(`../locales/${locale}.svelte.js`))
121
+ return { locale }
122
+ }
123
+ ```
124
+
125
+ ```typescript
126
+ // src/hooks.server.js
127
+ import { runWithCatalog } from 'wuchale/runtime-server'
128
+
129
+ export async function handle({ event, resolve }) {
130
+ const locale = event.url.searchParams.get('locale') ?? 'en'
131
+ const catalog = await import(`./locales/${locale}.svelte.js`)
132
+ const response = await runWithCatalog(catalog, async () => await resolve(event))
133
+ return response;
134
+ }
135
+ ```
136
+
137
+ #### For Svelte (SPA)
138
+
139
+ ```svelte
140
+ <!-- src/App.svelte -->
141
+ <script>
142
+ import { setCatalog } from 'wuchale/runtime.svelte.js'
143
+
144
+ let locale = $state('en')
145
+
146
+ async function loadTranslations(locale) {
147
+ setCatalog(await import(`./locales/${locale}.svelte.js`))
148
+ }
149
+ </script>
150
+
151
+ {#await loadTranslations(locale)}
152
+ <!-- @wc-ignore -->
153
+ Loading translations...
154
+ {:then}
155
+ <!-- Your app content -->
156
+ {/await}
157
+ ```
158
+
159
+ ### 7. Start Coding!
160
+
161
+ Write your Svelte components naturally. `wuchale` will extract and compile translations automatically:
162
+
163
+ ```svelte
164
+ <h1>Welcome to our store!</h1>
165
+ <p>Hello {userName}, you have {itemCount} items in your cart.</p>
166
+ ```
167
+
168
+ For full usage examples, look inside the **[examples directory](https://github.com/K1DV5/wuchale/tree/main/examples)**.
169
+
170
+ ## 📖 How It Works
171
+
172
+ [See main README](https://github.com/K1DV5/wuchale)
173
+
174
+
175
+ ### AI Translation
176
+
177
+ Enable Gemini translations by setting `GEMINI_API_KEY`:
178
+
179
+ ```bash
180
+ GEMINI_API_KEY=your-key npm run dev
181
+ ```
182
+
183
+ ## 📁 File Structure
184
+
185
+ ```
186
+ src/
187
+ ├── locales/
188
+ │ ├── en.po # Source catalog (commit this)
189
+ │ ├── en.svelte.js # Compiled data module (gitignore)
190
+ │ ├── es.po # Translation catalog (commit this)
191
+ │ └── es.svelte.js # Compiled data module (gitignore)
192
+ └── App.svelte # Your components
193
+ ```
194
+
195
+ ## 🧠 Behavior Explanation (Svelte adapter)
196
+
197
+ ### What Gets Extracted?
198
+
199
+ This is decided by the heuristic function which you can customize. A sensible
200
+ default heuristic function is provided out of the box. Here's how it works:
201
+
202
+ #### General rule (applies everywhere):
203
+ - If the text contains no letters used in any natural language (e.g., just numbers or symbols), it is ignored.
204
+
205
+ #### In `markup` (`<p>Text</p>`):
206
+ - All textual content is extracted.
207
+
208
+ Examples:
209
+
210
+ ```svelte
211
+ <p>This is extracted</p>
212
+ <!-- @wc-ignore -->
213
+ <p>This is not extracted</p>
214
+ ```
215
+
216
+ #### In `attribute` (`<div title="Info">`):
217
+ - If the first character is a lowercase English letter (`[a-z]`), it is ignored.
218
+ - If the element is a `<path>`, it is ignored (e.g., for SVG `d="M10 10..."` attributes).
219
+ - Otherwise, it is extracted.
220
+
221
+ Examples:
222
+
223
+ ```svelte
224
+ <img alt="Profile Picture" class="not-extracted" />
225
+ ```
226
+
227
+ #### In `script` (`<script>` and `.svelte.js/ts`):
228
+
229
+ `script` is handled by the ES adapter of the core package with some additional restrictions.
230
+ - If it doesn't pass the base heuristic from the ES adapter, it is ignored.
231
+ - If it's not inside `$derived` or `$derived.by`, it is ignored.
232
+ - If the value is inside `$inspect()` calls, it is ignored.
233
+ - Otherwise, it is extracted.
234
+
235
+ Examples:
236
+
237
+ ```javascript
238
+ // In $derived or functions
239
+ const message = $derived('This is extracted')
240
+ const lowercase = $derived('not extracted')
241
+
242
+ // Force extraction with comment
243
+ const forced = $derived(/* @wc-include */ 'force extracted')
244
+ ```
245
+ ```svelte
246
+ <p title={'Extracted'}>{/* @wc-ignore */ 'Ignore this'}</p>
247
+ ```
248
+
249
+ If you need more control, you can supply your own heuristic function in the
250
+ configuration. Custom heuristics can return `undefined` or `null` to fall back
251
+ to the default. For convenience, the default heuristic is exported by the
252
+ package.
253
+
254
+ > 💡 You can override extraction with comment directives:
255
+ > - `@wc-ignore` — skips extraction
256
+ > - `@wc-include` — forces extraction
257
+ > These always take precedence.
258
+
259
+ ### Nested Content
260
+
261
+ Complex nested structures are preserved:
262
+
263
+ ```svelte
264
+ <p>Welcome to <strong>{appName}</strong>, {userName}!</p>
265
+ ```
266
+
267
+ Extracted as:
268
+ ```
269
+ Welcome to <0/>, {0}!
270
+ ```
271
+
272
+ ### Pluralization
273
+
274
+ Define your function
275
+ ```javascript
276
+ // in e.g. src/utils.js
277
+ export function plural(num, candidates, rule = n => n === 1 ? 0 : 1) {
278
+ const index = rule(num)
279
+ return candidates[index].replace('#', num)
280
+ }
281
+ ```
282
+
283
+ Use it
284
+
285
+ ```svelte
286
+ <script>
287
+ import {plural} from '/src/utils.js'
288
+ let itemCount = 5
289
+ </script>
290
+
291
+ <p>{plural(itemCount, ['One item', '# items'])}</p>
292
+ ```
293
+
294
+ ### Context
295
+
296
+ Disambiguate identical texts:
297
+
298
+ ```svelte
299
+ <!-- @wc-context: navigation -->
300
+ <button>Home</button>
301
+
302
+ <!-- @wc-context: building -->
303
+ <span>Home</span>
304
+
305
+ ```
306
+
307
+ ### Useful Usage Pattern
308
+
309
+ A common scenario is needing to prevent string extraction inside functions, but
310
+ you may not want to modify the global heuristic or litter your code with
311
+ comment directives. A cleaner approach is to extract constants to the top
312
+ level, which are ignored by default:
313
+
314
+ ```js
315
+ const keys = {
316
+ Escape: 'Escape',
317
+ ArrowUp: 'ArrowUp',
318
+ // ...
319
+ };
320
+
321
+ function eventHandler(event) {
322
+ if (event.key === keys.Escape) {
323
+ // ...
324
+ }
325
+ }
326
+ ```
327
+
328
+ ## 🛠️ Configuration Reference (Svelte Adapter)
329
+
330
+ For the main plugin configuration, lood at the main README.
331
+
332
+ ```javascript
333
+
334
+ import { adapter as svelte } from "@wuchale/svelte"
335
+
336
+ const svelteAdapter = {
337
+ // Where to store translation files. {locale} will be replaced with the respective locale.
338
+ catalog: './src/locales/{locale}',
339
+
340
+ // Files to scan for translations
341
+ // You can technically specify non svelte js/ts files, but they would not be reactive
342
+ files: ['src/**/*.svelte', 'src/**/*.svelte.{js,ts}'],
343
+
344
+ // Custom extraction logic
345
+ // signature should be: (text: string, details: object) => boolean | undefined
346
+ // details has the following properties:
347
+ // scope: "markup" | "attribute" | "script",
348
+ // topLevel?: "variable" | "function" | "expression",
349
+ // topLevelCall?: string,
350
+ // call?: string,
351
+ // element?: string,
352
+ // attribute?: string,
353
+ // file?: string,
354
+ heuristic: defaultHeuristic,
355
+
356
+ // Your plural function name
357
+ pluralFunc: 'plural',
358
+ }
359
+ ```
@@ -0,0 +1,37 @@
1
+ import type { AnyNode } from "acorn";
2
+ import { type AST } from "svelte/compiler";
3
+ import { NestText } from 'wuchale/adapter';
4
+ import { Transformer } from 'wuchale/adapter-vanilla';
5
+ import type { IndexTracker, HeuristicFunc, TransformOutput, AdapterFunc, CommentDirectives } from 'wuchale/adapter';
6
+ export declare class SvelteTransformer extends Transformer {
7
+ currentElement?: string;
8
+ inCompoundText: boolean;
9
+ commentDirectivesStack: CommentDirectives[];
10
+ lastVisitIsComment: boolean;
11
+ currentSnippet: number;
12
+ constructor(key: string, content: string, filename: string, index: IndexTracker, heuristic: HeuristicFunc, pluralsFunc: string);
13
+ visitExpressionTag: (node: AST.ExpressionTag) => NestText[];
14
+ nonWhitespaceText: (node: AST.Text) => [number, string, number];
15
+ separatelyVisitChildren: (node: AST.Fragment) => [boolean, boolean, boolean, NestText[]];
16
+ visitFragment: (node: AST.Fragment) => NestText[];
17
+ visitRegularElement: (node: AST.ElementLike) => NestText[];
18
+ visitComponent: (node: AST.ElementLike) => NestText[];
19
+ visitText: (node: AST.Text) => NestText[];
20
+ visitSpreadAttribute: (node: AST.SpreadAttribute) => NestText[];
21
+ visitAttribute: (node: AST.Attribute) => NestText[];
22
+ visitSnippetBlock: (node: AST.SnippetBlock) => NestText[];
23
+ visitIfBlock: (node: AST.IfBlock) => NestText[];
24
+ visitEachBlock: (node: AST.EachBlock) => NestText[];
25
+ visitKeyBlock: (node: AST.KeyBlock) => NestText[];
26
+ visitAwaitBlock: (node: AST.AwaitBlock) => NestText[];
27
+ visitSvelteBody: (node: AST.SvelteBody) => NestText[];
28
+ visitSvelteDocument: (node: AST.SvelteDocument) => NestText[];
29
+ visitSvelteElement: (node: AST.SvelteElement) => NestText[];
30
+ visitSvelteBoundary: (node: AST.SvelteBoundary) => NestText[];
31
+ visitSvelteHead: (node: AST.SvelteHead) => NestText[];
32
+ visitSvelteWindow: (node: AST.SvelteWindow) => NestText[];
33
+ visitRoot: (node: AST.Root) => NestText[];
34
+ visitSv: (node: AST.SvelteNode | AnyNode) => NestText[];
35
+ transform: () => TransformOutput;
36
+ }
37
+ export declare const adapter: AdapterFunc;
@@ -0,0 +1,441 @@
1
+ import MagicString from "magic-string";
2
+ import { parse } from "svelte/compiler";
3
+ import { defaultHeuristic, NestText } from 'wuchale/adapter';
4
+ import { deepMergeObjects } from 'wuchale/config';
5
+ import { Transformer, parseScript, proxyModuleHotUpdate, proxyModuleDefault, runtimeConst } from 'wuchale/adapter-vanilla';
6
+ const nodesWithChildren = ['RegularElement', 'Component'];
7
+ const topLevelDeclarationsInside = ['$derived', '$derived.by'];
8
+ const ignoreElements = ['path'];
9
+ const svelteHeuristic = (text, details) => {
10
+ if (!defaultHeuristic(text, details)) {
11
+ return false;
12
+ }
13
+ if (ignoreElements.includes(details.element)) {
14
+ return false;
15
+ }
16
+ if (details.scope !== 'script') {
17
+ return true;
18
+ }
19
+ if (details.topLevel === 'variable' && !topLevelDeclarationsInside.includes(details.topLevelCall)) {
20
+ return false;
21
+ }
22
+ if (details.call === '$inspect') {
23
+ return false;
24
+ }
25
+ return true;
26
+ };
27
+ const rtComponent = 'WuchaleTrans';
28
+ const snipPrefix = 'wuchaleSnippet';
29
+ const rtFuncCtx = `${runtimeConst}.cx`;
30
+ const rtFuncCtxTrans = `${runtimeConst}.tx`;
31
+ export class SvelteTransformer extends Transformer {
32
+ // state
33
+ currentElement;
34
+ inCompoundText = false;
35
+ commentDirectivesStack = [];
36
+ lastVisitIsComment = false;
37
+ currentSnippet = 0;
38
+ constructor(key, content, filename, index, heuristic, pluralsFunc) {
39
+ super(key, content, filename, index, heuristic, pluralsFunc);
40
+ }
41
+ visitExpressionTag = (node) => this.visit(node.expression);
42
+ nonWhitespaceText = (node) => {
43
+ let trimmedS = node.data.trimStart();
44
+ const startWh = node.data.length - trimmedS.length;
45
+ let trimmed = trimmedS.trimEnd();
46
+ const endWh = trimmedS.length - trimmed.length;
47
+ return [startWh, trimmed, endWh];
48
+ };
49
+ separatelyVisitChildren = (node) => {
50
+ let hasTextChild = false;
51
+ let hasNonTextChild = false;
52
+ let heurTxt = '';
53
+ let hasCommentDirectives = false;
54
+ for (const child of node.nodes) {
55
+ if (child.type === 'Text') {
56
+ const txt = child.data.trim();
57
+ if (!txt) {
58
+ continue;
59
+ }
60
+ hasTextChild = true;
61
+ heurTxt += child.data + ' ';
62
+ }
63
+ else if (child.type === 'Comment') {
64
+ if (child.data.trim().startsWith('@wc-')) {
65
+ hasCommentDirectives = true;
66
+ }
67
+ }
68
+ else {
69
+ hasNonTextChild = true;
70
+ heurTxt += `# `;
71
+ }
72
+ }
73
+ heurTxt = heurTxt.trimEnd();
74
+ const [passHeuristic] = this.checkHeuristic(heurTxt, { scope: 'markup', element: this.currentElement });
75
+ let hasCompoundText = hasTextChild && hasNonTextChild;
76
+ const visitAsOne = passHeuristic && !hasCommentDirectives;
77
+ if (this.inCompoundText || hasCompoundText && visitAsOne) {
78
+ return [false, hasTextChild, hasCompoundText, []];
79
+ }
80
+ const txts = [];
81
+ // can't be extracted as one; visitSv each separately
82
+ for (const child of node.nodes) {
83
+ txts.push(...this.visitSv(child));
84
+ }
85
+ return [true, false, false, txts];
86
+ };
87
+ visitFragment = (node) => {
88
+ if (node.nodes.length === 0) {
89
+ return [];
90
+ }
91
+ const [visitedSeparately, hasTextChild, hasCompoundText, separateTxts] = this.separatelyVisitChildren(node);
92
+ if (visitedSeparately) {
93
+ return separateTxts;
94
+ }
95
+ let txt = '';
96
+ let iArg = 0;
97
+ let iTag = 0;
98
+ const lastChildEnd = node.nodes.slice(-1)[0].end;
99
+ const childrenForSnippets = [];
100
+ let hasTextDescendants = false;
101
+ const txts = [];
102
+ for (const child of node.nodes) {
103
+ if (child.type === 'Comment') {
104
+ continue;
105
+ }
106
+ if (child.type === 'Text') {
107
+ const [startWh, trimmed, endWh] = this.nonWhitespaceText(child);
108
+ const nTxt = new NestText(trimmed, 'markup', this.commentDirectives.context);
109
+ if (startWh && !txt.endsWith(' ')) {
110
+ txt += ' ';
111
+ }
112
+ if (!trimmed) { // whitespace
113
+ continue;
114
+ }
115
+ txt += nTxt.text;
116
+ if (endWh) {
117
+ txt += ' ';
118
+ }
119
+ this.mstr.remove(child.start, child.end);
120
+ continue;
121
+ }
122
+ if (child.type === 'ExpressionTag') {
123
+ txts.push(...this.visitExpressionTag(child));
124
+ if (!hasCompoundText) {
125
+ continue;
126
+ }
127
+ txt += `{${iArg}}`;
128
+ let moveStart = child.start;
129
+ if (iArg > 0) {
130
+ this.mstr.update(child.start, child.start + 1, ', ');
131
+ }
132
+ else {
133
+ moveStart++;
134
+ this.mstr.remove(child.start, child.start + 1);
135
+ }
136
+ this.mstr.move(moveStart, child.end - 1, lastChildEnd);
137
+ this.mstr.remove(child.end - 1, child.end);
138
+ iArg++;
139
+ continue;
140
+ }
141
+ // elements, components and other things as well
142
+ const nestedTextSupported = nodesWithChildren.includes(child.type);
143
+ const inCompoundTextPrev = this.inCompoundText;
144
+ this.inCompoundText = nestedTextSupported;
145
+ const childTxts = this.visitSv(child);
146
+ this.inCompoundText = inCompoundTextPrev; // restore
147
+ let snippNeedsCtx = false;
148
+ let chTxt = '';
149
+ for (const txt of childTxts) {
150
+ if (nodesWithChildren.includes(child.type) && txt.scope === 'markup') {
151
+ chTxt += txt.text[0];
152
+ hasTextDescendants = true;
153
+ snippNeedsCtx = true;
154
+ }
155
+ else { // attributes, blocks
156
+ txts.push(txt);
157
+ }
158
+ }
159
+ childrenForSnippets.push([child.start, child.end, snippNeedsCtx]);
160
+ if (nodesWithChildren.includes(child.type) && chTxt) {
161
+ chTxt = `<${iTag}>${chTxt}</${iTag}>`;
162
+ }
163
+ else {
164
+ // childless elements and everything else
165
+ chTxt = `<${iTag}/>`;
166
+ }
167
+ iTag++;
168
+ txt += chTxt;
169
+ }
170
+ txt = txt.trim();
171
+ if (!txt) {
172
+ return txts;
173
+ }
174
+ const nTxt = new NestText(txt, 'markup', this.commentDirectives.context);
175
+ if (hasTextChild || hasTextDescendants) {
176
+ txts.push(nTxt);
177
+ }
178
+ else {
179
+ return txts;
180
+ }
181
+ if (childrenForSnippets.length) {
182
+ const snippets = [];
183
+ // create and reference snippets
184
+ for (const [childStart, childEnd, haveCtx] of childrenForSnippets) {
185
+ const snippetName = `${snipPrefix}${this.currentSnippet}`;
186
+ snippets.push(snippetName);
187
+ this.currentSnippet++;
188
+ const snippetBegin = `\n{#snippet ${snippetName}(${haveCtx ? 'ctx' : ''})}\n`;
189
+ this.mstr.appendRight(childStart, snippetBegin);
190
+ this.mstr.prependLeft(childEnd, '\n{/snippet}');
191
+ }
192
+ let begin = `\n<${rtComponent} tags={[${snippets.join(', ')}]} ctx=`;
193
+ if (this.inCompoundText) {
194
+ begin += `{ctx} nest`;
195
+ }
196
+ else {
197
+ const index = this.index.get(nTxt.toKey());
198
+ begin += `{${rtFuncCtx}(${index})}`;
199
+ }
200
+ let end = ' />\n';
201
+ if (iArg > 0) {
202
+ begin += ' args={[';
203
+ end = ']}' + end;
204
+ }
205
+ this.mstr.appendLeft(lastChildEnd, begin);
206
+ this.mstr.appendRight(lastChildEnd, end);
207
+ }
208
+ else if (hasTextChild) {
209
+ // no need for component use
210
+ let begin = '{';
211
+ let end = ')}';
212
+ if (this.inCompoundText) {
213
+ begin += `${rtFuncCtxTrans}(ctx`;
214
+ }
215
+ else {
216
+ begin += `${this.rtFunc}(${this.index.get(nTxt.toKey())}`;
217
+ }
218
+ if (iArg) {
219
+ begin += ', [';
220
+ end = ']' + end;
221
+ }
222
+ this.mstr.appendLeft(lastChildEnd, begin);
223
+ this.mstr.appendRight(lastChildEnd, end);
224
+ }
225
+ return txts;
226
+ };
227
+ visitRegularElement = (node) => {
228
+ const currentElement = this.currentElement;
229
+ this.currentElement = node.name;
230
+ const txts = [];
231
+ for (const attrib of node.attributes) {
232
+ txts.push(...this.visitSv(attrib));
233
+ }
234
+ txts.push(...this.visitFragment(node.fragment));
235
+ this.currentElement = currentElement;
236
+ return txts;
237
+ };
238
+ visitComponent = this.visitRegularElement;
239
+ visitText = (node) => {
240
+ const [startWh, trimmed, endWh] = this.nonWhitespaceText(node);
241
+ const [pass, txt] = this.checkHeuristic(trimmed, { scope: 'markup' });
242
+ if (!pass) {
243
+ return [];
244
+ }
245
+ this.mstr.update(node.start + startWh, node.end - endWh, `{${this.rtFunc}(${this.index.get(txt.toKey())})}`);
246
+ return [txt];
247
+ };
248
+ visitSpreadAttribute = (node) => this.visit(node.expression);
249
+ visitAttribute = (node) => {
250
+ if (node.value === true) {
251
+ return [];
252
+ }
253
+ const txts = [];
254
+ let values;
255
+ if (Array.isArray(node.value)) {
256
+ values = node.value;
257
+ }
258
+ else {
259
+ values = [node.value];
260
+ }
261
+ for (const value of values) {
262
+ if (value.type !== 'Text') { // ExpressionTag
263
+ txts.push(...this.visitSv(value));
264
+ continue;
265
+ }
266
+ // Text
267
+ const { start, end } = value;
268
+ const [pass, txt] = this.checkHeuristic(value.data, {
269
+ scope: 'attribute',
270
+ element: this.currentElement,
271
+ attribute: node.name,
272
+ });
273
+ if (!pass) {
274
+ continue;
275
+ }
276
+ txts.push(txt);
277
+ this.mstr.update(value.start, value.end, `{${this.rtFunc}(${this.index.get(txt.toKey())})}`);
278
+ if (!`'"`.includes(this.content[start - 1])) {
279
+ continue;
280
+ }
281
+ this.mstr.remove(start - 1, start);
282
+ this.mstr.remove(end, end + 1);
283
+ }
284
+ return txts;
285
+ };
286
+ visitSnippetBlock = (node) => this.visitFragment(node.body);
287
+ visitIfBlock = (node) => {
288
+ const txts = this.visit(node.test);
289
+ txts.push(...this.visitSv(node.consequent));
290
+ if (node.alternate) {
291
+ txts.push(...this.visitSv(node.alternate));
292
+ }
293
+ return txts;
294
+ };
295
+ visitEachBlock = (node) => {
296
+ const txts = [
297
+ ...this.visit(node.expression),
298
+ ...this.visitSv(node.body),
299
+ ];
300
+ if (node.key) {
301
+ txts.push(...this.visit(node.key));
302
+ }
303
+ if (node.fallback) {
304
+ txts.push(...this.visitSv(node.fallback));
305
+ }
306
+ return txts;
307
+ };
308
+ visitKeyBlock = (node) => {
309
+ return [
310
+ ...this.visit(node.expression),
311
+ ...this.visitSv(node.fragment),
312
+ ];
313
+ };
314
+ visitAwaitBlock = (node) => {
315
+ const txts = [
316
+ ...this.visit(node.expression),
317
+ ...this.visitFragment(node.then),
318
+ ];
319
+ if (node.pending) {
320
+ txts.push(...this.visitFragment(node.pending));
321
+ }
322
+ if (node.catch) {
323
+ txts.push(...this.visitFragment(node.catch));
324
+ }
325
+ return txts;
326
+ };
327
+ visitSvelteBody = (node) => node.attributes.map(this.visitSv).flat();
328
+ visitSvelteDocument = (node) => node.attributes.map(this.visitSv).flat();
329
+ visitSvelteElement = (node) => node.attributes.map(this.visitSv).flat();
330
+ visitSvelteBoundary = (node) => [
331
+ ...node.attributes.map(this.visitSv).flat(),
332
+ ...this.visitSv(node.fragment),
333
+ ];
334
+ visitSvelteHead = (node) => this.visitSv(node.fragment);
335
+ visitSvelteWindow = (node) => node.attributes.map(this.visitSv).flat();
336
+ visitRoot = (node) => {
337
+ const txts = this.visitFragment(node.fragment);
338
+ if (node.instance) {
339
+ this.commentDirectives = {}; // reset
340
+ txts.push(...this.visitProgram(node.instance.content));
341
+ }
342
+ // @ts-ignore: module is a reserved keyword, not sure how to specify the type
343
+ if (node.module) {
344
+ this.commentDirectives = {}; // reset
345
+ // @ts-ignore
346
+ txts.push(...this.visitProgram(node.module.content));
347
+ }
348
+ return txts;
349
+ };
350
+ visitSv = (node) => {
351
+ if (node.type === 'Comment') {
352
+ const directives = this.processCommentDirectives(node.data.trim());
353
+ if (this.lastVisitIsComment) {
354
+ this.commentDirectivesStack[this.commentDirectivesStack.length - 1] = directives;
355
+ }
356
+ else {
357
+ this.commentDirectivesStack.push(directives);
358
+ }
359
+ this.lastVisitIsComment = true;
360
+ return [];
361
+ }
362
+ let txts = [];
363
+ const commentDirectivesPrev = this.commentDirectives;
364
+ if (this.lastVisitIsComment) {
365
+ this.commentDirectives = this.commentDirectivesStack.pop();
366
+ }
367
+ if (this.commentDirectives.forceInclude !== false) {
368
+ txts = this.visit(node);
369
+ }
370
+ this.commentDirectives = commentDirectivesPrev;
371
+ this.lastVisitIsComment = false;
372
+ return txts;
373
+ };
374
+ transform = () => {
375
+ const isComponent = this.filename.endsWith('.svelte');
376
+ let ast;
377
+ if (isComponent) {
378
+ ast = parse(this.content, { modern: true });
379
+ }
380
+ else {
381
+ ast = parseScript(this.content);
382
+ }
383
+ this.mstr = new MagicString(this.content);
384
+ const txts = this.visitSv(ast);
385
+ if (!txts.length) {
386
+ return this.finalize(txts);
387
+ }
388
+ const getCtxFunc = '_wrs_';
389
+ const importComponent = `import ${rtComponent} from "@wuchale/svelte/runtime.svelte"`;
390
+ const importStmt = `
391
+ import { ${getCtxFunc} } from "@wuchale/svelte/runtime.svelte.js"
392
+ ${ast.type === 'Root' ? importComponent : ''}
393
+ const ${runtimeConst} = $derived(${getCtxFunc}("${this.key}"))
394
+ `;
395
+ if (ast.type === 'Program') {
396
+ this.mstr.appendRight(0, importStmt + '\n');
397
+ return this.finalize(txts);
398
+ }
399
+ if (ast.module) {
400
+ // @ts-ignore
401
+ this.mstr.appendRight(ast.module.content.start, importStmt);
402
+ }
403
+ else if (ast.instance) {
404
+ // @ts-ignore
405
+ this.mstr.appendRight(ast.instance.content.start, importStmt);
406
+ }
407
+ else {
408
+ this.mstr.prepend(`<script>${importStmt}</script>\n`);
409
+ }
410
+ return this.finalize(txts);
411
+ };
412
+ }
413
+ const proxyModuleDev = (virtModEvent) => `
414
+ import defaultData, {key, pluralsRule} from '${virtModEvent}'
415
+ const data = $state(defaultData)
416
+ ${proxyModuleHotUpdate(virtModEvent)}
417
+ export {key, pluralsRule}
418
+ export default data
419
+ `;
420
+ const defaultArgs = {
421
+ files: ['src/**/*.svelte', 'src/**/*.svelte.{js,ts}'],
422
+ catalog: './src/locales/{locale}',
423
+ pluralsFunc: 'plural',
424
+ heuristic: svelteHeuristic,
425
+ };
426
+ export const adapter = (args = defaultArgs) => {
427
+ const { heuristic, pluralsFunc, files, catalog } = deepMergeObjects(args, defaultArgs);
428
+ return {
429
+ transform: (content, filename, index, key) => {
430
+ return new SvelteTransformer(key, content, filename, index, heuristic, pluralsFunc).transform();
431
+ },
432
+ files,
433
+ catalog,
434
+ compiledExt: '.svelte.js',
435
+ proxyModule: {
436
+ dev: proxyModuleDev,
437
+ default: proxyModuleDefault,
438
+ }
439
+ };
440
+ };
441
+ //# sourceMappingURL=adapter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"adapter.js","sourceRoot":"","sources":["../../src/adapter.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,cAAc,CAAA;AAEtC,OAAO,EAAE,KAAK,EAAY,MAAM,iBAAiB,CAAA;AACjD,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAC5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AACjD,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AAW1H,MAAM,iBAAiB,GAAG,CAAC,gBAAgB,EAAE,WAAW,CAAC,CAAA;AACzD,MAAM,0BAA0B,GAAG,CAAC,UAAU,EAAE,aAAa,CAAC,CAAA;AAC9D,MAAM,cAAc,GAAG,CAAC,MAAM,CAAC,CAAA;AAE/B,MAAM,eAAe,GAAkB,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE;IACrD,IAAI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AAE,GAAG,gBAAgB,CAAC,IAAI,EAAE,WAAW,CAAC,CAAA;IACtF,OAAO;QACH,SAAS,EAAE,CAAC,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE;YACzC,OAAO,IAAI,iBAAiB,CAAC,GAAG,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,WAAW,CAAC,CAAC,SAAS,EAAE,CAAA;QACnG,CAAC;QACD,KAAK;QACL,OAAO;QACP,WAAW,EAAE,YAAY;QACzB,WAAW,EAAE;YACT,GAAG,EAAE,cAAc;YACnB,OAAO,EAAE,kBAAkB;SAC9B;KACJ,CAAA;AACL,CAAC,CAAA"}
@@ -0,0 +1 @@
1
+ export { adapter } from './adapter.js';
@@ -0,0 +1,2 @@
1
+ export { adapter } from './adapter.js';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA"}
@@ -0,0 +1,4 @@
1
+ import { Runtime, runWithCatalog, type CatalogModule } from "wuchale/runtime";
2
+ export { runWithCatalog };
3
+ export declare let _wrs_: (key: string) => Runtime;
4
+ export declare function setCatalog(mod: CatalogModule): void;
@@ -0,0 +1,16 @@
1
+ import { Runtime, runWithCatalog, _wre_ } from "wuchale/runtime";
2
+ export { runWithCatalog };
3
+ export let _wrs_;
4
+ const dataCollection = $state({});
5
+ // no $app/environment.browser because it must work without sveltekit
6
+ if (globalThis.window) {
7
+ _wrs_ = key => dataCollection[key] ?? fallback;
8
+ }
9
+ else {
10
+ _wrs_ = _wre_;
11
+ }
12
+ const fallback = new Runtime();
13
+ export function setCatalog(mod) {
14
+ dataCollection[mod.key] = new Runtime(mod);
15
+ }
16
+ //# sourceMappingURL=runtime.svelte.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtime.svelte.js","sourceRoot":"","sources":["../../src/runtime.svelte.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,KAAK,EAAsB,MAAM,iBAAiB,CAAA;AAEpF,OAAO,EAAE,cAAc,EAAE,CAAA;AAEzB,MAAM,CAAC,IAAI,KAA+B,CAAA;AAE1C,MAAM,cAAc,GAA6B,MAAM,CAAC,EAAE,CAAC,CAAA;AAE3D,qEAAqE;AACrE,IAAI,UAAU,CAAC,MAAM,EAAE,CAAC;IACpB,KAAK,GAAG,GAAG,CAAC,EAAE,CAAC,cAAc,CAAC,GAAG,CAAC,IAAI,QAAQ,CAAA;AAClD,CAAC;KAAM,CAAC;IACJ,KAAK,GAAG,KAAK,CAAA;AACjB,CAAC;AAED,MAAM,QAAQ,GAAG,IAAI,OAAO,EAAE,CAAA;AAE9B,MAAM,UAAU,UAAU,CAAC,GAAkB;IACzC,cAAc,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,IAAI,OAAO,CAAC,GAAG,CAAC,CAAA;AAC9C,CAAC"}
@@ -0,0 +1 @@
1
+ {"fileNames":["../../../node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/typescript/lib/lib.es2021.d.ts","../../../node_modules/typescript/lib/lib.es2022.d.ts","../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../../node_modules/typescript/lib/lib.es2017.date.d.ts","../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../node_modules/typescript/lib/lib.es2022.array.d.ts","../../../node_modules/typescript/lib/lib.es2022.error.d.ts","../../../node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../node_modules/typescript/lib/lib.es2022.object.d.ts","../../../node_modules/typescript/lib/lib.es2022.string.d.ts","../../../node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../../node_modules/typescript/lib/lib.esnext.disposable.d.ts","../../../node_modules/typescript/lib/lib.esnext.float16.d.ts","../../../node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../../node_modules/magic-string/dist/magic-string.es.d.mts","../../../node_modules/acorn/dist/acorn.d.mts","../../../node_modules/@types/estree/index.d.ts","../../../node_modules/locate-character/types/index.d.ts","../../../node_modules/svelte/types/index.d.ts","../../../node_modules/pofile/pofile.d.ts","../../wuchale/dist/src/gemini.d.ts","../../wuchale/dist/src/adapter.d.ts","../../wuchale/dist/src/config.d.ts","../../wuchale/dist/src/adapter-vanilla.d.ts","../src/adapter.ts","../src/index.ts","../../wuchale/dist/src/runtime.d.ts","../src/runtime.svelte.ts","../../../node_modules/@types/node/compatibility/iterators.d.ts","../../../node_modules/@types/node/globals.typedarray.d.ts","../../../node_modules/@types/node/buffer.buffer.d.ts","../../../node_modules/undici-types/utility.d.ts","../../../node_modules/undici-types/header.d.ts","../../../node_modules/undici-types/readable.d.ts","../../../node_modules/undici-types/fetch.d.ts","../../../node_modules/undici-types/formdata.d.ts","../../../node_modules/undici-types/connector.d.ts","../../../node_modules/undici-types/client.d.ts","../../../node_modules/undici-types/errors.d.ts","../../../node_modules/undici-types/dispatcher.d.ts","../../../node_modules/undici-types/global-dispatcher.d.ts","../../../node_modules/undici-types/global-origin.d.ts","../../../node_modules/undici-types/pool-stats.d.ts","../../../node_modules/undici-types/pool.d.ts","../../../node_modules/undici-types/handlers.d.ts","../../../node_modules/undici-types/balanced-pool.d.ts","../../../node_modules/undici-types/h2c-client.d.ts","../../../node_modules/undici-types/agent.d.ts","../../../node_modules/undici-types/mock-interceptor.d.ts","../../../node_modules/undici-types/mock-call-history.d.ts","../../../node_modules/undici-types/mock-agent.d.ts","../../../node_modules/undici-types/mock-client.d.ts","../../../node_modules/undici-types/mock-pool.d.ts","../../../node_modules/undici-types/mock-errors.d.ts","../../../node_modules/undici-types/proxy-agent.d.ts","../../../node_modules/undici-types/env-http-proxy-agent.d.ts","../../../node_modules/undici-types/retry-handler.d.ts","../../../node_modules/undici-types/retry-agent.d.ts","../../../node_modules/undici-types/api.d.ts","../../../node_modules/undici-types/cache-interceptor.d.ts","../../../node_modules/undici-types/interceptors.d.ts","../../../node_modules/undici-types/util.d.ts","../../../node_modules/undici-types/cookies.d.ts","../../../node_modules/undici-types/patch.d.ts","../../../node_modules/undici-types/websocket.d.ts","../../../node_modules/undici-types/eventsource.d.ts","../../../node_modules/undici-types/diagnostics-channel.d.ts","../../../node_modules/undici-types/content-type.d.ts","../../../node_modules/undici-types/cache.d.ts","../../../node_modules/undici-types/index.d.ts","../../../node_modules/@types/node/globals.d.ts","../../../node_modules/@types/node/assert.d.ts","../../../node_modules/@types/node/assert/strict.d.ts","../../../node_modules/@types/node/async_hooks.d.ts","../../../node_modules/@types/node/buffer.d.ts","../../../node_modules/@types/node/child_process.d.ts","../../../node_modules/@types/node/cluster.d.ts","../../../node_modules/@types/node/console.d.ts","../../../node_modules/@types/node/constants.d.ts","../../../node_modules/@types/node/crypto.d.ts","../../../node_modules/@types/node/dgram.d.ts","../../../node_modules/@types/node/diagnostics_channel.d.ts","../../../node_modules/@types/node/dns.d.ts","../../../node_modules/@types/node/dns/promises.d.ts","../../../node_modules/@types/node/domain.d.ts","../../../node_modules/@types/node/dom-events.d.ts","../../../node_modules/@types/node/events.d.ts","../../../node_modules/@types/node/fs.d.ts","../../../node_modules/@types/node/fs/promises.d.ts","../../../node_modules/@types/node/http.d.ts","../../../node_modules/@types/node/http2.d.ts","../../../node_modules/@types/node/https.d.ts","../../../node_modules/@types/node/inspector.d.ts","../../../node_modules/@types/node/module.d.ts","../../../node_modules/@types/node/net.d.ts","../../../node_modules/@types/node/os.d.ts","../../../node_modules/@types/node/path.d.ts","../../../node_modules/@types/node/perf_hooks.d.ts","../../../node_modules/@types/node/process.d.ts","../../../node_modules/@types/node/punycode.d.ts","../../../node_modules/@types/node/querystring.d.ts","../../../node_modules/@types/node/readline.d.ts","../../../node_modules/@types/node/readline/promises.d.ts","../../../node_modules/@types/node/repl.d.ts","../../../node_modules/@types/node/sea.d.ts","../../../node_modules/@types/node/sqlite.d.ts","../../../node_modules/@types/node/stream.d.ts","../../../node_modules/@types/node/stream/promises.d.ts","../../../node_modules/@types/node/stream/consumers.d.ts","../../../node_modules/@types/node/stream/web.d.ts","../../../node_modules/@types/node/string_decoder.d.ts","../../../node_modules/@types/node/test.d.ts","../../../node_modules/@types/node/timers.d.ts","../../../node_modules/@types/node/timers/promises.d.ts","../../../node_modules/@types/node/tls.d.ts","../../../node_modules/@types/node/trace_events.d.ts","../../../node_modules/@types/node/tty.d.ts","../../../node_modules/@types/node/url.d.ts","../../../node_modules/@types/node/util.d.ts","../../../node_modules/@types/node/v8.d.ts","../../../node_modules/@types/node/vm.d.ts","../../../node_modules/@types/node/wasi.d.ts","../../../node_modules/@types/node/worker_threads.d.ts","../../../node_modules/@types/node/zlib.d.ts","../../../node_modules/@types/node/index.d.ts","../../../node_modules/@types/picomatch/lib/constants.d.ts","../../../node_modules/@types/picomatch/lib/parse.d.ts","../../../node_modules/@types/picomatch/lib/scan.d.ts","../../../node_modules/@types/picomatch/lib/picomatch.d.ts","../../../node_modules/@types/picomatch/index.d.ts"],"fileIdsList":[[76,120],[76,117,120],[76,119,120],[120],[76,120,125,155],[76,120,121,126,132,133,140,152,163],[76,120,121,122,132,140],[76,120,123,164],[76,120,124,125,133,141],[76,120,125,152,160],[76,120,126,128,132,140],[76,119,120,127],[76,120,128,129],[76,120,130,132],[76,119,120,132],[76,120,132,133,134,152,163],[76,120,132,133,134,147,152,155],[76,115,120],[76,115,120,128,132,135,140,152,163],[76,120,132,133,135,136,140,152,160,163],[76,120,135,137,152,160,163],[74,75,76,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169],[76,120,132,138],[76,120,139,163],[76,120,128,132,140,152],[76,120,141],[76,120,142],[76,119,120,143],[76,117,118,119,120,121,122,123,124,125,126,127,128,129,130,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169],[76,120,145],[76,120,146],[76,120,132,147,148],[76,120,147,149,164,166],[76,120,132,152,153,155],[76,120,154,155],[76,120,152,153],[76,120,155],[76,120,156],[76,117,120,152,157],[76,120,132,158,159],[76,120,158,159],[76,120,125,140,152,160],[76,120,161],[76,120,140,162],[76,120,135,146,163],[76,120,125,164],[76,120,152,165],[76,120,139,166],[76,120,167],[76,120,132,134,143,152,155,163,165,166,168],[76,120,152,169],[76,120,174],[76,120,171,172,173],[60,62,63,64,76,120],[76,85,89,120,163],[76,85,120,152,163],[76,120,152],[76,80,120],[76,82,85,120,163],[76,120,140,160],[76,120,170],[76,80,120,170],[76,82,85,120,140,163],[76,77,78,79,81,84,120,132,152,163],[76,85,93,120],[76,78,83,120],[76,85,109,110,120],[76,78,81,85,120,155,163,170],[76,85,120],[76,77,120],[76,80,81,82,83,84,85,86,87,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,110,111,112,113,114,120],[76,85,102,105,120,128],[76,85,93,94,95,120],[76,83,85,94,96,120],[76,84,120],[76,78,80,85,120],[76,85,89,94,96,120],[76,89,120],[76,83,85,88,120,163],[76,78,82,85,93,120],[76,85,102,120],[76,80,85,109,120,155,168,170],[60,61,64,67,68,69,76,120],[70,76,120],[72,76,120],[60,61,62,67,76,120],[66,76,120],[67,76,120],[65,76,120]],"fileInfos":[{"version":"69684132aeb9b5642cbcd9e22dff7818ff0ee1aa831728af0ecf97d3364d5546","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"e44bb8bbac7f10ecc786703fe0a6a4b952189f908707980ba8f3c8975a760962","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","impliedFormat":1},{"version":"ee7bad0c15b58988daa84371e0b89d313b762ab83cb5b31b8a2d1162e8eb41c2","impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"0559b1f683ac7505ae451f9a96ce4c3c92bdc71411651ca6ddb0e88baaaad6a3","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"936e80ad36a2ee83fc3caf008e7c4c5afe45b3cf3d5c24408f039c1d47bdc1df","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"fef8cfad2e2dc5f5b3d97a6f4f2e92848eb1b88e897bb7318cef0e2820bceaab","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"d6d7ae4d1f1f3772e2a3cde568ed08991a8ae34a080ff1151af28b7f798e22ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"52ada8e0b6e0482b728070b7639ee42e83a9b1c22d205992756fe020fd9f4a47","affectsGlobalScope":true,"impliedFormat":1},{"version":"3bdefe1bfd4d6dee0e26f928f93ccc128f1b64d5d501ff4a8cf3c6371200e5e6","affectsGlobalScope":true,"impliedFormat":1},{"version":"59fb2c069260b4ba00b5643b907ef5d5341b167e7d1dbf58dfd895658bda2867","affectsGlobalScope":true,"impliedFormat":1},{"version":"639e512c0dfc3fad96a84caad71b8834d66329a1f28dc95e3946c9b58176c73a","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true,"impliedFormat":1},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true,"impliedFormat":1},{"version":"959d36cddf5e7d572a65045b876f2956c973a586da58e5d26cde519184fd9b8a","affectsGlobalScope":true,"impliedFormat":1},{"version":"965f36eae237dd74e6cca203a43e9ca801ce38824ead814728a2807b1910117d","affectsGlobalScope":true,"impliedFormat":1},{"version":"3925a6c820dcb1a06506c90b1577db1fdbf7705d65b62b99dce4be75c637e26b","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a3d63ef2b853447ec4f749d3f368ce642264246e02911fcb1590d8c161b8005","affectsGlobalScope":true,"impliedFormat":1},{"version":"b5ce7a470bc3628408429040c4e3a53a27755022a32fd05e2cb694e7015386c7","affectsGlobalScope":true,"impliedFormat":1},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true,"impliedFormat":1},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true,"impliedFormat":1},{"version":"b4b67b1a91182421f5df999988c690f14d813b9850b40acd06ed44691f6727ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"51ad4c928303041605b4d7ae32e0c1ee387d43a24cd6f1ebf4a2699e1076d4fa","affectsGlobalScope":true,"impliedFormat":1},{"version":"4245fee526a7d1754529d19227ecbf3be066ff79ebb6a380d78e41648f2f224d","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"2be2227c3810dfd84e46674fd33b8d09a4a28ad9cb633ed536effd411665ea1e","impliedFormat":99},{"version":"a4abbf5d5ecd7367532921a52e2a2762a6f5f38c3e4ad6c25e6e90152c403804","impliedFormat":99},{"version":"151ff381ef9ff8da2da9b9663ebf657eac35c4c9a19183420c05728f31a6761d","impliedFormat":1},{"version":"ecd7b4429a2b12f50ef619043fca298eb99a9b7f9e8edabd60c9bbb7fa8f036b","impliedFormat":99},{"version":"712c5b7b332ed93cc342e7792a2e60330b356c62771758fb7cdd612ac2785f05","affectsGlobalScope":true,"impliedFormat":99},{"version":"0545365b9b1d3ed6a65c2355e56c0f23d950025880e6f2f83fcc506ff65ac90f","impliedFormat":1},{"version":"5282c01f7d92263e963554ecdedcfcb9ff2ffc587f9580e4bc502f9d7f7f3fe3","impliedFormat":99},{"version":"76c5c2381ad4e34150aa60196f856de8e23285fdef05f0116418c0e0cf9d2ab9","impliedFormat":99},{"version":"e8f237d822da908c1db797f57f98d8cd8807d2fdee3716a7b22ebc2809c73ca9","impliedFormat":99},{"version":"2541bd3910d656ee71c60eb8a5fd2405e98ec404883b95a75062d9f6bb6daebb","impliedFormat":99},{"version":"3b8ec0376fd43c1528bbcbd1244ec203de6228ff8d0416ba365d2c71983ac64c","signature":"18fe198fb4b80d0abc08165020e8d8d87b03f141ec98776e5e70efff938faec4","impliedFormat":99},{"version":"f0340cdcdb720d55a8e4b731dd3128da5292704672806c907a4c87267bb07af0","signature":"4eaa6f9d10dfacdea6ba7b4a526a63b5d36c7418d27d8973809645da2a03302e","impliedFormat":99},{"version":"3e1150569b38440f9b7f05057136fc3aa0c7172f619fa41fdf010c7aa999788e","impliedFormat":99},{"version":"d533ddc65c71fcbdd4010d9612313f733c09af7a1710733b70a592c75ba0446a","signature":"6fdfaf77eea16d08f1033adaa4ae7e37f7937fb1410948ce0d9ba08618135646","impliedFormat":99},{"version":"d153a11543fd884b596587ccd97aebbeed950b26933ee000f94009f1ab142848","affectsGlobalScope":true,"impliedFormat":1},{"version":"c0671b50bb99cc7ad46e9c68fa0e7f15ba4bc898b59c31a17ea4611fab5095da","affectsGlobalScope":true,"impliedFormat":1},{"version":"d802f0e6b5188646d307f070d83512e8eb94651858de8a82d1e47f60fb6da4e2","affectsGlobalScope":true,"impliedFormat":1},{"version":"cdcf9ea426ad970f96ac930cd176d5c69c6c24eebd9fc580e1572d6c6a88f62c","impliedFormat":1},{"version":"23cd712e2ce083d68afe69224587438e5914b457b8acf87073c22494d706a3d0","impliedFormat":1},{"version":"487b694c3de27ddf4ad107d4007ad304d29effccf9800c8ae23c2093638d906a","impliedFormat":1},{"version":"e525f9e67f5ddba7b5548430211cae2479070b70ef1fd93550c96c10529457bd","impliedFormat":1},{"version":"ccf4552357ce3c159ef75f0f0114e80401702228f1898bdc9402214c9499e8c0","impliedFormat":1},{"version":"c6fd2c5a395f2432786c9cb8deb870b9b0e8ff7e22c029954fabdd692bff6195","impliedFormat":1},{"version":"17fe9131bec653b07b0a1a8b99a830216e3e43fe0ea2605be318dc31777c8bbf","impliedFormat":1},{"version":"3c8e93af4d6ce21eb4c8d005ad6dc02e7b5e6781f429d52a35290210f495a674","impliedFormat":1},{"version":"2c9875466123715464539bfd69bcaccb8ff6f3e217809428e0d7bd6323416d01","impliedFormat":1},{"version":"ea6bc8de8b59f90a7a3960005fd01988f98fd0784e14bc6922dde2e93305ec7d","impliedFormat":1},{"version":"36107995674b29284a115e21a0618c4c2751b32a8766dd4cb3ba740308b16d59","impliedFormat":1},{"version":"914a0ae30d96d71915fc519ccb4efbf2b62c0ddfb3a3fc6129151076bc01dc60","impliedFormat":1},{"version":"2472ef4c28971272a897fdb85d4155df022e1f5d9a474a526b8fc2ef598af94e","impliedFormat":1},{"version":"6c8e442ba33b07892169a14f7757321e49ab0f1032d676d321a1fdab8a67d40c","impliedFormat":1},{"version":"b41767d372275c154c7ea6c9d5449d9a741b8ce080f640155cc88ba1763e35b3","impliedFormat":1},{"version":"1cd673d367293fc5cb31cd7bf03d598eb368e4f31f39cf2b908abbaf120ab85a","impliedFormat":1},{"version":"19851a6596401ca52d42117108d35e87230fc21593df5c4d3da7108526b6111c","impliedFormat":1},{"version":"3825bf209f1662dfd039010a27747b73d0ef379f79970b1d05601ec8e8a4249f","impliedFormat":1},{"version":"0b6e25234b4eec6ed96ab138d96eb70b135690d7dd01f3dd8a8ab291c35a683a","impliedFormat":1},{"version":"40bfc70953be2617dc71979c14e9e99c5e65c940a4f1c9759ddb90b0f8ff6b1a","impliedFormat":1},{"version":"da52342062e70c77213e45107921100ba9f9b3a30dd019444cf349e5fb3470c4","impliedFormat":1},{"version":"e9ace91946385d29192766bf783b8460c7dbcbfc63284aa3c9cae6de5155c8bc","impliedFormat":1},{"version":"40b463c6766ca1b689bfcc46d26b5e295954f32ad43e37ee6953c0a677e4ae2b","impliedFormat":1},{"version":"561c60d8bfe0fec2c08827d09ff039eca0c1f9b50ef231025e5a549655ed0298","impliedFormat":1},{"version":"1e30c045732e7db8f7a82cf90b516ebe693d2f499ce2250a977ec0d12e44a529","impliedFormat":1},{"version":"84b736594d8760f43400202859cda55607663090a43445a078963031d47e25e7","impliedFormat":1},{"version":"499e5b055a5aba1e1998f7311a6c441a369831c70905cc565ceac93c28083d53","impliedFormat":1},{"version":"54c3e2371e3d016469ad959697fd257e5621e16296fa67082c2575d0bf8eced0","impliedFormat":1},{"version":"beb8233b2c220cfa0feea31fbe9218d89fa02faa81ef744be8dce5acb89bb1fd","impliedFormat":1},{"version":"78b29846349d4dfdd88bd6650cc5d2baaa67f2e89dc8a80c8e26ef7995386583","impliedFormat":1},{"version":"5d0375ca7310efb77e3ef18d068d53784faf62705e0ad04569597ae0e755c401","impliedFormat":1},{"version":"59af37caec41ecf7b2e76059c9672a49e682c1a2aa6f9d7dc78878f53aa284d6","impliedFormat":1},{"version":"addf417b9eb3f938fddf8d81e96393a165e4be0d4a8b6402292f9c634b1cb00d","impliedFormat":1},{"version":"e38d4fdf79e1eadd92ed7844c331dbaa40f29f21541cfee4e1acff4db09cda33","impliedFormat":1},{"version":"8bd86b8e8f6a6aa6c49b71e14c4ffe1211a0e97c80f08d2c8cc98838006e4b88","impliedFormat":1},{"version":"7c10a32ae6f3962672e6869ee2c794e8055d8225ef35c91c0228e354b4e5d2d3","impliedFormat":1},{"version":"2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","impliedFormat":1},{"version":"c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","impliedFormat":1},{"version":"99f569b42ea7e7c5fe404b2848c0893f3e1a56e0547c1cd0f74d5dbb9a9de27e","impliedFormat":1},{"version":"f4b4faedc57701ae727d78ba4a83e466a6e3bdcbe40efbf913b17e860642897c","affectsGlobalScope":true,"impliedFormat":1},{"version":"bbcfd9cd76d92c3ee70475270156755346c9086391e1b9cb643d072e0cf576b8","impliedFormat":1},{"version":"7394959e5a741b185456e1ef5d64599c36c60a323207450991e7a42e08911419","impliedFormat":1},{"version":"72c1f5e0a28e473026074817561d1bc9647909cf253c8d56c41d1df8d95b85f7","impliedFormat":1},{"version":"003ec918ec442c3a4db2c36dc0c9c766977ea1c8bcc1ca7c2085868727c3d3f6","affectsGlobalScope":true,"impliedFormat":1},{"version":"938f94db8400d0b479626b9006245a833d50ce8337f391085fad4af540279567","impliedFormat":1},{"version":"c4e8e8031808b158cfb5ac5c4b38d4a26659aec4b57b6a7e2ba0a141439c208c","impliedFormat":1},{"version":"2c91d8366ff2506296191c26fd97cc1990bab3ee22576275d28b654a21261a44","affectsGlobalScope":true,"impliedFormat":1},{"version":"5524481e56c48ff486f42926778c0a3cce1cc85dc46683b92b1271865bcf015a","impliedFormat":1},{"version":"12fb9c13f24845000d7bd9660d11587e27ef967cbd64bd9df19ae3e6aa9b52d4","affectsGlobalScope":true,"impliedFormat":1},{"version":"289e9894a4668c61b5ffed09e196c1f0c2f87ca81efcaebdf6357cfb198dac14","impliedFormat":1},{"version":"25a1105595236f09f5bce42398be9f9ededc8d538c258579ab662d509aa3b98e","impliedFormat":1},{"version":"5078cd62dbdf91ae8b1dc90b1384dec71a9c0932d62bdafb1a811d2a8e26bef2","impliedFormat":1},{"version":"a2e2bbde231b65c53c764c12313897ffdfb6c49183dd31823ee2405f2f7b5378","impliedFormat":1},{"version":"ad1cc0ed328f3f708771272021be61ab146b32ecf2b78f3224959ff1e2cd2a5c","impliedFormat":1},{"version":"71450bbc2d82821d24ca05699a533e72758964e9852062c53b30f31c36978ab8","affectsGlobalScope":true,"impliedFormat":1},{"version":"62f572306e0b173cc5dfc4c583471151f16ef3779cf27ab96922c92ec82a3bc8","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f32444438ecb1fa4519f6ec3977d69ce0e3acfa18b803e5cd725c204501f350","impliedFormat":1},{"version":"0ab3c844f1eb5a1d94c90edc346a25eb9d3943af7a7812f061bf2d627d8afac0","impliedFormat":1},{"version":"b0a84d9348601dbc217017c0721d6064c3b1af9b392663348ba146fdae0c7afd","impliedFormat":1},{"version":"161f09445a8b4ba07f62ae54b27054e4234e7957062e34c6362300726dabd315","impliedFormat":1},{"version":"77fced47f495f4ff29bb49c52c605c5e73cd9b47d50080133783032769a9d8a6","impliedFormat":1},{"version":"e6057f9e7b0c64d4527afeeada89f313f96a53291705f069a9193c18880578cb","impliedFormat":1},{"version":"34ecb9596317c44dab586118fb62c1565d3dad98d201cd77f3e6b0dde453339c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0f5cda0282e1d18198e2887387eb2f026372ebc4e11c4e4516fef8a19ee4d514","impliedFormat":1},{"version":"e99b0e71f07128fc32583e88ccd509a1aaa9524c290efb2f48c22f9bf8ba83b1","impliedFormat":1},{"version":"76957a6d92b94b9e2852cf527fea32ad2dc0ef50f67fe2b14bd027c9ceef2d86","impliedFormat":1},{"version":"237581f5ec4620a17e791d3bb79bad3af01e27a274dbee875ac9b0721a4fe97d","affectsGlobalScope":true,"impliedFormat":1},{"version":"a8a99a5e6ed33c4a951b67cc1fd5b64fd6ad719f5747845c165ca12f6c21ba16","affectsGlobalScope":true,"impliedFormat":1},{"version":"a58a15da4c5ba3df60c910a043281256fa52d36a0fcdef9b9100c646282e88dd","impliedFormat":1},{"version":"b36beffbf8acdc3ebc58c8bb4b75574b31a2169869c70fc03f82895b93950a12","impliedFormat":1},{"version":"de263f0089aefbfd73c89562fb7254a7468b1f33b61839aafc3f035d60766cb4","impliedFormat":1},{"version":"70b57b5529051497e9f6482b76d91c0dcbb103d9ead8a0549f5bab8f65e5d031","impliedFormat":1},{"version":"e6d81b1f7ab11dc1b1ad7ad29fcfad6904419b36baf55ed5e80df48d56ac3aff","impliedFormat":1},{"version":"1013eb2e2547ad8c100aca52ef9df8c3f209edee32bb387121bb3227f7c00088","impliedFormat":1},{"version":"b6b8e3736383a1d27e2592c484a940eeb37ec4808ba9e74dd57679b2453b5865","impliedFormat":1},{"version":"d6f36b683c59ac0d68a1d5ee906e578e2f5e9a285bca80ff95ce61cdc9ddcdeb","impliedFormat":1},{"version":"37ba7b45141a45ce6e80e66f2a96c8a5ab1bcef0fc2d0f56bb58df96ec67e972","impliedFormat":1},{"version":"125d792ec6c0c0f657d758055c494301cc5fdb327d9d9d5960b3f129aff76093","impliedFormat":1},{"version":"12aad38de6f0594dc21efa78a2c1f67bf6a7ef5a389e05417fe9945284450908","affectsGlobalScope":true,"impliedFormat":1},{"version":"ea713aa14a670b1ea0fbaaca4fd204e645f71ca7653a834a8ec07ee889c45de6","impliedFormat":1},{"version":"b338a6e6c1d456e65a6ea78da283e3077fe8edf7202ae10490abbba5b952b05e","impliedFormat":1},{"version":"2918b7c516051c30186a1055ebcdb3580522be7190f8a2fff4100ea714c7c366","affectsGlobalScope":true,"impliedFormat":1},{"version":"ae86f30d5d10e4f75ce8dcb6e1bd3a12ecec3d071a21e8f462c5c85c678efb41","impliedFormat":1},{"version":"982efeb2573605d4e6d5df4dc7e40846bda8b9e678e058fc99522ab6165c479e","impliedFormat":1},{"version":"e03460fe72b259f6d25ad029f085e4bedc3f90477da4401d8fbc1efa9793230e","impliedFormat":1},{"version":"4286a3a6619514fca656089aee160bb6f2e77f4dd53dc5a96b26a0b4fc778055","impliedFormat":1},{"version":"d67fc92a91171632fc74f413ce42ff1aa7fbcc5a85b127101f7ec446d2039a1f","affectsGlobalScope":true,"impliedFormat":1},{"version":"d40e4631100dbc067268bce96b07d7aff7f28a541b1bfb7ef791c64a696b3d33","affectsGlobalScope":true,"impliedFormat":1},{"version":"784490137935e1e38c49b9289110e74a1622baf8a8907888dcbe9e476d7c5e44","impliedFormat":1},{"version":"42180b657831d1b8fead051698618b31da623fb71ff37f002cb9d932cfa775f1","impliedFormat":1},{"version":"4f98d6fb4fe7cbeaa04635c6eaa119d966285d4d39f0eb55b2654187b0b27446","impliedFormat":1},{"version":"e4c653466d0497d87fa9ffd00e59a95f33bc1c1722c3f5c84dab2e950c18da70","affectsGlobalScope":true,"impliedFormat":1},{"version":"e6dcc3b933e864e91d4bea94274ad69854d5d2a1311a4b0e20408a57af19e95d","impliedFormat":1},{"version":"a51f786b9f3c297668f8f322a6c58f85d84948ef69ade32069d5d63ec917221c","impliedFormat":1},{"version":"ff9590ea90db4a3c6d194f50582160b52ef78f83a93145a3d9d25541b03bccad","impliedFormat":1},{"version":"b90c23a457c16f77a282531a5caba5c911d2252eb097f3193a8ee2df6a3f21a2","impliedFormat":1},{"version":"18a78c980596d0c645668abcdeb14ea32b119f5535f0cb6ee28e7e16b61844e5","impliedFormat":1},{"version":"5ff1b426023eafdf4d725222cb5c111e612761735bca62ec7e22dde3e526f0af","impliedFormat":1},{"version":"d5be608b445099a10fdacb72200005012ac87982a1802eea12df7ac3c632f705","impliedFormat":1}],"root":[70,71,73],"options":{"checkJs":true,"composite":true,"declaration":true,"esModuleInterop":true,"module":199,"noImplicitAny":false,"outDir":"./","skipLibCheck":true,"sourceMap":true,"target":9,"verbatimModuleSyntax":true},"referencedMap":[[62,1],[117,2],[118,2],[119,3],[76,4],[120,5],[121,6],[122,7],[74,1],[123,8],[124,9],[125,10],[126,11],[127,12],[128,13],[129,13],[131,1],[130,14],[132,15],[133,16],[134,17],[116,18],[75,1],[135,19],[136,20],[137,21],[170,22],[138,23],[139,24],[140,25],[141,26],[142,27],[143,28],[144,29],[145,30],[146,31],[147,32],[148,32],[149,33],[150,1],[151,1],[152,34],[154,35],[153,36],[155,37],[156,38],[157,39],[158,40],[159,41],[160,42],[161,43],[162,44],[163,45],[164,46],[165,47],[166,48],[167,49],[168,50],[169,51],[175,52],[171,1],[172,1],[174,53],[173,1],[61,1],[63,1],[60,1],[65,1],[64,54],[58,1],[59,1],[11,1],[10,1],[2,1],[12,1],[13,1],[14,1],[15,1],[16,1],[17,1],[18,1],[19,1],[3,1],[20,1],[21,1],[4,1],[22,1],[26,1],[23,1],[24,1],[25,1],[27,1],[28,1],[29,1],[5,1],[30,1],[31,1],[32,1],[33,1],[6,1],[37,1],[34,1],[35,1],[36,1],[38,1],[7,1],[39,1],[44,1],[45,1],[40,1],[41,1],[42,1],[43,1],[8,1],[49,1],[46,1],[47,1],[48,1],[50,1],[9,1],[51,1],[52,1],[53,1],[55,1],[54,1],[1,1],[56,1],[57,1],[93,55],[104,56],[91,55],[105,57],[114,58],[83,59],[82,60],[113,61],[108,62],[112,63],[85,64],[101,65],[84,66],[111,67],[80,68],[81,62],[86,69],[87,1],[92,59],[90,69],[78,70],[115,71],[106,72],[96,73],[95,69],[97,74],[99,75],[94,76],[98,77],[109,61],[88,78],[89,79],[100,80],[79,57],[103,81],[102,69],[107,1],[77,1],[110,82],[70,83],[71,84],[73,85],[69,86],[67,87],[68,88],[66,89],[72,1]],"latestChangedDtsFile":"./src/runtime.svelte.d.ts","version":"5.8.3"}
package/package.json ADDED
@@ -0,0 +1,64 @@
1
+ {
2
+ "name": "@wuchale/svelte",
3
+ "version": "0.8.0",
4
+ "description": "i18n for svelte without turning your codebase upside down",
5
+ "scripts": {
6
+ "dev": "tsc --watch",
7
+ "build": "tsc",
8
+ "test": "node tests"
9
+ },
10
+ "keywords": [
11
+ "i18n",
12
+ "internationalization",
13
+ "translation",
14
+ "gettext",
15
+ "svelte",
16
+ "sveltekit",
17
+ "vite",
18
+ "po",
19
+ "svelte-i18n",
20
+ "vite-plugin",
21
+ "compile-time",
22
+ "ast",
23
+ "gemini",
24
+ "translation-tooling",
25
+ "multilingual",
26
+ "localization",
27
+ "l10n",
28
+ "lingui",
29
+ "automatic-i18n",
30
+ "lightweight",
31
+ "svelte-plugin"
32
+ ],
33
+ "files": [
34
+ "dist",
35
+ "runtime.svelte"
36
+ ],
37
+ "exports": {
38
+ ".": {
39
+ "types": "./dist/src/index.d.ts",
40
+ "import": "./dist/src/index.js"
41
+ },
42
+ "./runtime.svelte.js": {
43
+ "types": "./dist/src/runtime.svelte.d.ts",
44
+ "import": "./dist/src/runtime.svelte.js"
45
+ },
46
+ "./runtime.svelte": "./src/runtime.svelte"
47
+ },
48
+ "repository": {
49
+ "type": "git",
50
+ "url": "git+https://github.com/K1DV5/wuchale.git"
51
+ },
52
+ "homepage": "https://github.com/K1DV5/wuchale",
53
+ "bugs": "https://github.com/K1DV5/wuchale/issues",
54
+ "author": "K1DV5",
55
+ "license": "MIT",
56
+ "dependencies": {
57
+ "wuchale": "^0.8.0",
58
+ "svelte": "^5.28.1"
59
+ },
60
+ "devDependencies": {
61
+ "typescript": "^5.8.3"
62
+ },
63
+ "type": "module"
64
+ }