@fluentic/i18n 0.0.0-stage → 0.1.0-beta.1
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 +10 -0
- package/LICENSE +21 -0
- package/README.md +21 -2
- package/dist/adapter-CWC8rng-.d.ts +178 -0
- package/dist/adapter.d.ts +4 -0
- package/dist/adapter.js +4 -0
- package/dist/analyze-CdXCxQDg.d.ts +14 -0
- package/dist/compact-CJ0OWoIv.d.ts +7 -0
- package/dist/compact-E3zj3Z8d.js +34 -0
- package/dist/compact-E3zj3Z8d.js.map +1 -0
- package/dist/compiled.d.ts +27 -0
- package/dist/compiled.js +51 -0
- package/dist/compiled.js.map +1 -0
- package/dist/compiler-BZtB9WLi.js +365 -0
- package/dist/compiler-BZtB9WLi.js.map +1 -0
- package/dist/compiler.d.ts +35 -0
- package/dist/compiler.js +3 -0
- package/dist/core/index.d.ts +5 -0
- package/dist/core/index.js +4 -0
- package/dist/i18n-CfYNwubL.d.ts +25 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +4 -0
- package/dist/interpreter-Dld8QyOI.js +186 -0
- package/dist/interpreter-Dld8QyOI.js.map +1 -0
- package/dist/manager-BW778X1Y.js +193 -0
- package/dist/manager-BW778X1Y.js.map +1 -0
- package/dist/options-DE7vYj0e.d.ts +7 -0
- package/dist/options-Dxxx0aOz.js +23 -0
- package/dist/options-Dxxx0aOz.js.map +1 -0
- package/dist/plugin/babel.d.ts +11 -0
- package/dist/plugin/babel.js +31 -0
- package/dist/plugin/babel.js.map +1 -0
- package/dist/plugin/esbuild.d.ts +7 -0
- package/dist/plugin/esbuild.js +37 -0
- package/dist/plugin/esbuild.js.map +1 -0
- package/dist/plugin/rollup.d.ts +30 -0
- package/dist/plugin/rollup.js +34 -0
- package/dist/plugin/rollup.js.map +1 -0
- package/dist/plugin/vite.d.ts +31 -0
- package/dist/plugin/vite.js +11 -0
- package/dist/plugin/vite.js.map +1 -0
- package/dist/plugin/webpack-loader.d.ts +3 -0
- package/dist/plugin/webpack-loader.js +21 -0
- package/dist/plugin/webpack-loader.js.map +1 -0
- package/dist/plugin/webpack.d.ts +8 -0
- package/dist/plugin/webpack.js +22 -0
- package/dist/plugin/webpack.js.map +1 -0
- package/dist/react.d.ts +53 -0
- package/dist/react.js +60 -0
- package/dist/react.js.map +1 -0
- package/dist/src-BovRx-mX.js +142 -0
- package/dist/src-BovRx-mX.js.map +1 -0
- package/dist/translation-manager-C79eKu2K.js +213 -0
- package/dist/translation-manager-C79eKu2K.js.map +1 -0
- package/dist/types-BkDsJfVD.js +13 -0
- package/dist/types-BkDsJfVD.js.map +1 -0
- package/dist/types-BuGoCU3P.d.ts +75 -0
- package/dist/types.d.ts +2 -0
- package/dist/types.js +1 -0
- package/dist-cjs/babel.cjs +379 -0
- package/dist-cjs/babel.cjs.map +1 -0
- package/package.json +130 -3
- package/src/adapter.ts +6 -0
- package/src/compiled.ts +116 -0
- package/src/compiler/analyze.ts +182 -0
- package/src/compiler/index.ts +208 -0
- package/src/compiler/message.ts +74 -0
- package/src/core/format.ts +40 -0
- package/src/core/i18n.ts +124 -0
- package/src/core/index.ts +1 -0
- package/src/core/types.ts +121 -0
- package/src/index.ts +9 -0
- package/src/manager.ts +175 -0
- package/src/plugin/babel.ts +34 -0
- package/src/plugin/esbuild.ts +45 -0
- package/src/plugin/options.ts +24 -0
- package/src/plugin/rollup.ts +29 -0
- package/src/plugin/vite.ts +6 -0
- package/src/plugin/webpack-loader.ts +22 -0
- package/src/plugin/webpack.ts +15 -0
- package/src/react.ts +97 -0
- package/src/registry-manager.ts +3 -0
- package/src/shared/compact.ts +51 -0
- package/src/shared/formatting.ts +121 -0
- package/src/shared/interpreter.ts +128 -0
- package/src/shared/runtime.ts +131 -0
- package/src/state-manager.ts +29 -0
- package/src/state.ts +20 -0
- package/src/storage-manager.ts +47 -0
- package/src/translation-manager.ts +82 -0
- package/src/translation.ts +106 -0
- package/src/types.ts +2 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# @fluentic/i18n
|
|
2
|
+
|
|
3
|
+
## 0.1.0-beta.1
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Publish the first public beta of the typed Fluentic i18n runtime and React bindings.
|
|
8
|
+
- Add optional build-time ICU compilation for Babel, Vite, Rollup, esbuild, and webpack.
|
|
9
|
+
- Load JSONL or array catalogs in compiled and uncompiled formats, with locale fallback and deterministic message hashing.
|
|
10
|
+
- Add isolated managers, reactive language state, rich-message rendering, and configurable JSX line breaks.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Fluentic
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,22 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @fluentic/i18n
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Universal message declarations and synchronous rendering. Import `t` and `I18nRegistry` here in shared business/UI modules. Install a platform adapter for rendering and management:
|
|
4
|
+
|
|
5
|
+
- `@fluentic/i18n-web`: React SPA/browser.
|
|
6
|
+
- `@fluentic/i18n-rn`: React Native / Expo.
|
|
7
|
+
- `@fluentic/i18n-nextjs`: Next.js App Router.
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
import { t } from '@fluentic/i18n';
|
|
11
|
+
import { I18nManager } from '@fluentic/i18n-web';
|
|
12
|
+
const greeting = t.msg('Hello {name}', { name: String });
|
|
13
|
+
I18nManager.configure({ languageId: 'en' });
|
|
14
|
+
await I18nManager.init();
|
|
15
|
+
t.text(greeting, { name: 'Ada' });
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
`t.msg` is inert and safe at module scope. `t.text` returns a string; `t.jsx` returns JSX synchronously. Initialize before rendering. Persistence is opt-in.
|
|
19
|
+
|
|
20
|
+
The default runtime uses cached `intl-messageformat`. Set `compiled: true` in your CLI configuration and add `@fluentic/i18n/plugin/{vite,rollup,esbuild,webpack,babel}` to compile messages. The plugin rewrites universal imports to `/compiled`, which interprets compact messages without an ICU parser. Auto/manual files stay unchanged; compiled merged catalogs start with `{"compiled":true}` followed by `[hash, compactMessage]` rows.
|
|
21
|
+
|
|
22
|
+
See [platforms](../../docs/docs/runtime/platforms.md), [compiler](../../docs/docs/runtime/compilation.md), [API](../../docs/docs/api.md), and the projects under `examples/`.
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
import { n as CompactMessage } from "./compact-CJ0OWoIv.js";
|
|
2
|
+
import { C as MessageTagHandler, O as TranslationGetter, f as LanguageId, h as MessageFormatOptions, p as MessageContext } from "./types-BuGoCU3P.js";
|
|
3
|
+
type StateManager<StateData> = {
|
|
4
|
+
get(): StateData;
|
|
5
|
+
subscribe(listener: () => void): () => void;
|
|
6
|
+
set(partial: Partial<StateData>): void;
|
|
7
|
+
};
|
|
8
|
+
declare function createStateManager<StateData extends object>(initial: StateData): StateManager<StateData>;
|
|
9
|
+
type Formats = {
|
|
10
|
+
number: Record<string, Intl.NumberFormatOptions>;
|
|
11
|
+
date: Record<string, Intl.DateTimeFormatOptions>;
|
|
12
|
+
time: Record<string, Intl.DateTimeFormatOptions>;
|
|
13
|
+
};
|
|
14
|
+
type FormatContext = {
|
|
15
|
+
languageId: string;
|
|
16
|
+
};
|
|
17
|
+
type FormatFactory<T> = T | ((context: FormatContext) => T);
|
|
18
|
+
type RegistryConfig = { [K in keyof Formats]: Record<string, FormatFactory<Formats[K][string]>>; };
|
|
19
|
+
type PartsRenderer = (runtime?: Runtime) => unknown[];
|
|
20
|
+
type Runtime = {
|
|
21
|
+
languageId: string;
|
|
22
|
+
ready: boolean;
|
|
23
|
+
translationsEnabled: boolean;
|
|
24
|
+
translationGetter: TranslationGetter | null;
|
|
25
|
+
formats: Partial<Formats>;
|
|
26
|
+
registry: RegistryConfig;
|
|
27
|
+
jsxLineBreak: unknown;
|
|
28
|
+
jsxHandler: ((options: MessageFormatOptions, render: PartsRenderer) => unknown) | null;
|
|
29
|
+
tagElement: ((element: unknown) => (chunks: unknown[]) => unknown) | null;
|
|
30
|
+
subscribe: (listener: () => void) => () => void;
|
|
31
|
+
getSnapshot: () => unknown;
|
|
32
|
+
};
|
|
33
|
+
declare function createRuntime(): Runtime;
|
|
34
|
+
declare const defaultRuntime: Runtime;
|
|
35
|
+
declare function setRuntimeResolver(next: () => Runtime): void;
|
|
36
|
+
declare function getRuntime(): Runtime;
|
|
37
|
+
declare function setTranslationGetter(getter: TranslationGetter | null): void;
|
|
38
|
+
declare function setLanguageId(languageId: string): void;
|
|
39
|
+
declare function setFormats(formats: Partial<Formats>): void;
|
|
40
|
+
declare function setGetJsxHandler(handler: Runtime['jsxHandler']): void;
|
|
41
|
+
declare const I18nRegistry: {
|
|
42
|
+
addNumberFormat(name: string, format: FormatFactory<Intl.NumberFormatOptions>): void;
|
|
43
|
+
addDateFormat(name: string, format: FormatFactory<Intl.DateTimeFormatOptions>): void;
|
|
44
|
+
addTimeFormat(name: string, format: FormatFactory<Intl.DateTimeFormatOptions>): void;
|
|
45
|
+
setLanguageId: typeof setLanguageId;
|
|
46
|
+
getConfig(): RegistryConfig;
|
|
47
|
+
};
|
|
48
|
+
declare function getFormats(runtime: Runtime, languageId: string): Partial<Formats>;
|
|
49
|
+
declare function noTranslate<T>(fn: () => T): T;
|
|
50
|
+
declare function createTagHandler<T, R>(handler: (chunks: Array<string | T>) => R): MessageTagHandler<T, R>;
|
|
51
|
+
/** Synchronous binding only: async callers must keep and use their own instance. */
|
|
52
|
+
declare function withRuntime<T>(runtime: Runtime, fn: () => T): T;
|
|
53
|
+
type StoredState = {
|
|
54
|
+
languageId: LanguageId;
|
|
55
|
+
};
|
|
56
|
+
type I18nStorage = {
|
|
57
|
+
read(): StoredState | null | Promise<StoredState | null>;
|
|
58
|
+
write(state: StoredState): void | Promise<void>;
|
|
59
|
+
};
|
|
60
|
+
declare function createStorageManager(initial?: I18nStorage | null): {
|
|
61
|
+
setStorage(next: I18nStorage | null): void;
|
|
62
|
+
getStorage(): I18nStorage;
|
|
63
|
+
hasStorage(): boolean;
|
|
64
|
+
};
|
|
65
|
+
declare function createLocalStorage(): I18nStorage | null;
|
|
66
|
+
type TranslationItem = {
|
|
67
|
+
id: string;
|
|
68
|
+
translation: string;
|
|
69
|
+
};
|
|
70
|
+
type TranslationRow = [id: string, translation: string] | [context: string, id: string, translation: string];
|
|
71
|
+
type CompiledTranslationItem = [id: string, message: CompactMessage];
|
|
72
|
+
type CompiledCatalogHeader = {
|
|
73
|
+
compiled: true;
|
|
74
|
+
};
|
|
75
|
+
type TranslationJsonl = string;
|
|
76
|
+
type TranslationData = unknown[] | TranslationJsonl | {
|
|
77
|
+
jsonl: TranslationJsonl;
|
|
78
|
+
};
|
|
79
|
+
type Catalog = Record<string, CompactMessage>;
|
|
80
|
+
declare function normalizeCatalog(data: TranslationData): Catalog;
|
|
81
|
+
declare function parseCatalog(data: TranslationData): {
|
|
82
|
+
catalog: Catalog;
|
|
83
|
+
compiled: boolean;
|
|
84
|
+
};
|
|
85
|
+
type TranslationLoaderArgs = {
|
|
86
|
+
languageId: LanguageId;
|
|
87
|
+
};
|
|
88
|
+
type TranslationLookupArgs = {
|
|
89
|
+
languageId: LanguageId;
|
|
90
|
+
context: MessageContext | null;
|
|
91
|
+
message: string;
|
|
92
|
+
};
|
|
93
|
+
type TranslationLoader = (args: TranslationLoaderArgs) => TranslationData | Promise<TranslationData>;
|
|
94
|
+
type TranslationModule = {
|
|
95
|
+
default: TranslationData;
|
|
96
|
+
};
|
|
97
|
+
type TranslationSource = TranslationData | TranslationModule;
|
|
98
|
+
type TranslationLoaderEntry = TranslationSource | Promise<TranslationSource> | (() => TranslationSource | Promise<TranslationSource>);
|
|
99
|
+
type TranslationLoaderMap = Record<string, TranslationLoaderEntry>;
|
|
100
|
+
declare function defineTranslationLoader(loader: TranslationLoader | TranslationLoaderMap): TranslationLoader;
|
|
101
|
+
declare function createTranslationManager(): {
|
|
102
|
+
catalogs: Record<string, Catalog>;
|
|
103
|
+
compiledCatalogs: Record<string, boolean>;
|
|
104
|
+
setTranslationLoader: (next: TranslationLoader | null) => void;
|
|
105
|
+
loadTranslations: (languageId: string) => Promise<void>;
|
|
106
|
+
getTranslation: (args: TranslationLookupArgs) => CompactMessage;
|
|
107
|
+
};
|
|
108
|
+
type StateData = {
|
|
109
|
+
languageId: string;
|
|
110
|
+
isLoading: boolean;
|
|
111
|
+
ready: boolean;
|
|
112
|
+
};
|
|
113
|
+
type I18nManagerOptions = {
|
|
114
|
+
languageId: string;
|
|
115
|
+
fallbackLanguageId?: string;
|
|
116
|
+
};
|
|
117
|
+
type CreateI18nManagerOptions = {
|
|
118
|
+
storage?: I18nStorage | null;
|
|
119
|
+
runtime?: Runtime;
|
|
120
|
+
};
|
|
121
|
+
type GetTranslationArgs = {
|
|
122
|
+
languageId?: string;
|
|
123
|
+
context?: string | null;
|
|
124
|
+
message: string;
|
|
125
|
+
};
|
|
126
|
+
type I18nSnapshot = {
|
|
127
|
+
languageId: string;
|
|
128
|
+
fallbackLanguageId?: string;
|
|
129
|
+
translations: Record<string, Catalog>;
|
|
130
|
+
formats?: Partial<Formats>;
|
|
131
|
+
compiledLanguages?: string[];
|
|
132
|
+
};
|
|
133
|
+
declare function createI18nManager(options?: CreateI18nManagerOptions): {
|
|
134
|
+
manager: {
|
|
135
|
+
configure: (config: I18nManagerOptions) => void;
|
|
136
|
+
setStorage: (next: I18nStorage | null) => void;
|
|
137
|
+
setTranslationLoader: (loader: TranslationLoader | null) => void;
|
|
138
|
+
init: () => Promise<void>;
|
|
139
|
+
setLanguageId: (languageId: string) => Promise<void>;
|
|
140
|
+
getLanguageId: () => string;
|
|
141
|
+
getTranslation: (args: GetTranslationArgs) => CompactMessage | null;
|
|
142
|
+
getSnapshot: () => I18nSnapshot;
|
|
143
|
+
hydrate: (snapshot: I18nSnapshot) => void;
|
|
144
|
+
};
|
|
145
|
+
state: StateManager<StateData>;
|
|
146
|
+
runtime: Runtime;
|
|
147
|
+
};
|
|
148
|
+
type ManagedI18n = ReturnType<typeof createI18nManager>;
|
|
149
|
+
type I18nManager = ManagedI18n['manager'];
|
|
150
|
+
declare const defaultManaged: {
|
|
151
|
+
manager: {
|
|
152
|
+
configure: (config: I18nManagerOptions) => void;
|
|
153
|
+
setStorage: (next: I18nStorage | null) => void;
|
|
154
|
+
setTranslationLoader: (loader: TranslationLoader | null) => void;
|
|
155
|
+
init: () => Promise<void>;
|
|
156
|
+
setLanguageId: (languageId: string) => Promise<void>;
|
|
157
|
+
getLanguageId: () => string;
|
|
158
|
+
getTranslation: (args: GetTranslationArgs) => CompactMessage | null;
|
|
159
|
+
getSnapshot: () => I18nSnapshot;
|
|
160
|
+
hydrate: (snapshot: I18nSnapshot) => void;
|
|
161
|
+
};
|
|
162
|
+
state: StateManager<StateData>;
|
|
163
|
+
runtime: Runtime;
|
|
164
|
+
};
|
|
165
|
+
declare const I18nManager: {
|
|
166
|
+
configure: (config: I18nManagerOptions) => void;
|
|
167
|
+
setStorage: (next: I18nStorage | null) => void;
|
|
168
|
+
setTranslationLoader: (loader: TranslationLoader | null) => void;
|
|
169
|
+
init: () => Promise<void>;
|
|
170
|
+
setLanguageId: (languageId: string) => Promise<void>;
|
|
171
|
+
getLanguageId: () => string;
|
|
172
|
+
getTranslation: (args: GetTranslationArgs) => CompactMessage | null;
|
|
173
|
+
getSnapshot: () => I18nSnapshot;
|
|
174
|
+
hydrate: (snapshot: I18nSnapshot) => void;
|
|
175
|
+
};
|
|
176
|
+
declare const defaultI18nState: StateManager<StateData>;
|
|
177
|
+
export { createStateManager as $, StoredState as A, createRuntime as B, TranslationData as C, normalizeCatalog as D, TranslationRow as E, Formats as F, noTranslate as G, defaultRuntime as H, I18nRegistry as I, setLanguageId as J, setFormats as K, PartsRenderer as L, createStorageManager as M, FormatContext as N, parseCatalog as O, FormatFactory as P, StateManager as Q, RegistryConfig as R, CompiledTranslationItem as S, TranslationJsonl as T, getFormats as U, createTagHandler as V, getRuntime as W, setTranslationGetter as X, setRuntimeResolver as Y, withRuntime as Z, TranslationSource as _, I18nSnapshot as a, Catalog as b, createI18nManager as c, TranslationLoader as d, TranslationLoaderArgs as f, TranslationModule as g, TranslationLookupArgs as h, I18nManagerOptions as i, createLocalStorage as j, I18nStorage as k, defaultI18nState as l, TranslationLoaderMap as m, GetTranslationArgs as n, ManagedI18n as o, TranslationLoaderEntry as p, setGetJsxHandler as q, I18nManager as r, StateData as s, CreateI18nManagerOptions as t, defaultManaged as u, createTranslationManager as v, TranslationItem as w, CompiledCatalogHeader as x, defineTranslationLoader as y, Runtime as z };
|
|
178
|
+
//# sourceMappingURL=adapter-CWC8rng-.d.ts.map
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { i as validateCompact, n as CompactMessage, r as CompactPart, t as COMPACT_VERSION } from "./compact-CJ0OWoIv.js";
|
|
2
|
+
import { A as isMessageDescriptor, C as MessageTagHandler, D as TextRenderer, E as PrimitiveType, M as isMessageTagHandler, N as I18nJsxConfig, O as TranslationGetter, S as MessageSchemaValue, T as MessageValueFactory, _ as MessageMeta, a as I18nJsxOutput, b as MessageRuntimeValue, c as InferMessageSchema, d as JsxRenderer, f as LanguageId, g as MessageInput, h as MessageFormatOptions, i as GetJsxHandler, j as isMessageSchemaValue, k as TryRenderArgs, l as InferRuntimeParams, m as MessageDescriptor, n as CompiledTranslation, o as I18nTagElement, p as MessageContext, r as DescriptorRenderArgs, s as I18nTagValue, t as AnyMessageDescriptor, u as JsonValue, v as MessageParam, w as MessageValueContext, x as MessageSchema, y as MessageParams } from "./types-BuGoCU3P.js";
|
|
3
|
+
import { $ as createStateManager, A as StoredState, B as createRuntime, C as TranslationData, D as normalizeCatalog, E as TranslationRow, F as Formats, G as noTranslate, H as defaultRuntime, I as I18nRegistry, J as setLanguageId, K as setFormats, L as PartsRenderer, M as createStorageManager, N as FormatContext, O as parseCatalog, P as FormatFactory, Q as StateManager, R as RegistryConfig, S as CompiledTranslationItem, T as TranslationJsonl, U as getFormats, V as createTagHandler, W as getRuntime, X as setTranslationGetter, Y as setRuntimeResolver, Z as withRuntime, _ as TranslationSource, a as I18nSnapshot, b as Catalog, c as createI18nManager, d as TranslationLoader, f as TranslationLoaderArgs, g as TranslationModule, h as TranslationLookupArgs, i as I18nManagerOptions, j as createLocalStorage, k as I18nStorage, l as defaultI18nState, m as TranslationLoaderMap, n as GetTranslationArgs, o as ManagedI18n, p as TranslationLoaderEntry, q as setGetJsxHandler, r as I18nManager, s as StateData, t as CreateI18nManagerOptions, u as defaultManaged, v as createTranslationManager, w as TranslationItem, x as CompiledCatalogHeader, y as defineTranslationLoader, z as Runtime } from "./adapter-CWC8rng-.js";
|
|
4
|
+
export { type AnyMessageDescriptor, COMPACT_VERSION, type Catalog, CompactMessage, CompactPart, type CompiledCatalogHeader, type CompiledTranslation, type CompiledTranslationItem, CreateI18nManagerOptions, type DescriptorRenderArgs, FormatContext, FormatFactory, Formats, type GetJsxHandler, GetTranslationArgs, type I18nJsxConfig, type I18nJsxOutput, I18nManager, I18nManagerOptions, I18nRegistry, I18nSnapshot, I18nStorage, type I18nTagElement, type I18nTagValue, type InferMessageSchema, type InferRuntimeParams, type JsonValue, type JsxRenderer, type LanguageId, ManagedI18n, type MessageContext, type MessageDescriptor, type MessageFormatOptions, type MessageInput, type MessageMeta, type MessageParam, type MessageParams, type MessageRuntimeValue, type MessageSchema, type MessageSchemaValue, type MessageTagHandler, type MessageValueContext, type MessageValueFactory, PartsRenderer, type PrimitiveType, RegistryConfig, Runtime, StateData, StateManager, StoredState, type TextRenderer, type TranslationData, type TranslationGetter, type TranslationItem, type TranslationJsonl, type TranslationLoader, type TranslationLoaderArgs, type TranslationLoaderEntry, type TranslationLoaderMap, type TranslationLookupArgs, type TranslationModule, type TranslationRow, type TranslationSource, type TryRenderArgs, createI18nManager, createLocalStorage, createRuntime, createStateManager, createStorageManager, createTagHandler, type createTranslationManager, defaultI18nState, defaultManaged, defaultRuntime, defineTranslationLoader, getFormats, getRuntime, type isMessageDescriptor, type isMessageSchemaValue, type isMessageTagHandler, noTranslate, type normalizeCatalog, type parseCatalog, setFormats, setGetJsxHandler, setLanguageId, setRuntimeResolver, setTranslationGetter, validateCompact, withRuntime };
|
package/dist/adapter.js
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { a as createTagHandler, c as getRuntime, d as setGetJsxHandler, f as setLanguageId, h as withRuntime, i as createRuntime, l as noTranslate, m as setTranslationGetter, n as defineTranslationLoader, o as defaultRuntime, p as setRuntimeResolver, r as I18nRegistry, s as getFormats, u as setFormats } from "./translation-manager-C79eKu2K.js";
|
|
2
|
+
import { n as validateCompact, t as COMPACT_VERSION } from "./compact-E3zj3Z8d.js";
|
|
3
|
+
import { a as createLocalStorage, i as defaultManaged, n as createI18nManager, o as createStorageManager, r as defaultI18nState, s as createStateManager, t as I18nManager } from "./manager-BW778X1Y.js";
|
|
4
|
+
export { COMPACT_VERSION, I18nManager, I18nRegistry, createI18nManager, createLocalStorage, createRuntime, createStateManager, createStorageManager, createTagHandler, defaultI18nState, defaultManaged, defaultRuntime, defineTranslationLoader, getFormats, getRuntime, noTranslate, setFormats, setGetJsxHandler, setLanguageId, setRuntimeResolver, setTranslationGetter, validateCompact, withRuntime };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import "@babel/types";
|
|
2
|
+
import "@babel/traverse";
|
|
3
|
+
type Scope = {
|
|
4
|
+
context: string | null;
|
|
5
|
+
notes: string[];
|
|
6
|
+
meta?: unknown;
|
|
7
|
+
};
|
|
8
|
+
type ExtractedMessage = Scope & {
|
|
9
|
+
id: string;
|
|
10
|
+
source: string;
|
|
11
|
+
};
|
|
12
|
+
declare function collectMessages(code: string, filename: string, imports?: string[]): ExtractedMessage[];
|
|
13
|
+
export { collectMessages as n, ExtractedMessage as t };
|
|
14
|
+
//# sourceMappingURL=analyze-CdXCxQDg.d.ts.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** Compact message format v1. Strings are literal messages or literal parts. */
|
|
2
|
+
type CompactMessage = string | CompactPart[];
|
|
3
|
+
type CompactPart = string | [0, string] | [1, string, string | Record<string, unknown> | null] | [2 | 3, string, string | Record<string, unknown> | null] | [4, string, Record<string, CompactMessage>] | [5, string, number, 0 | 1, Record<string, CompactMessage>] | [6] | [7, string, CompactMessage];
|
|
4
|
+
declare const COMPACT_VERSION = 1;
|
|
5
|
+
declare function validateCompact(value: unknown, depth?: number): asserts value is CompactMessage;
|
|
6
|
+
export { validateCompact as i, CompactMessage as n, CompactPart as r, COMPACT_VERSION as t };
|
|
7
|
+
//# sourceMappingURL=compact-CJ0OWoIv.d.ts.map
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
// src/shared/compact.ts
|
|
2
|
+
const COMPACT_VERSION = 1;
|
|
3
|
+
function validateCompact(value, depth = 0) {
|
|
4
|
+
if (depth > 100) throw new TypeError("[i18n] compact message nesting exceeds 100");
|
|
5
|
+
if (typeof value === "string") return;
|
|
6
|
+
if (!Array.isArray(value)) throw new TypeError("[i18n] invalid compact message");
|
|
7
|
+
for (const part of value) {
|
|
8
|
+
if (typeof part === "string") continue;
|
|
9
|
+
if (!Array.isArray(part)) throw new TypeError("[i18n] invalid compact instruction");
|
|
10
|
+
const [op, name] = part;
|
|
11
|
+
const lengths = {
|
|
12
|
+
0: 2,
|
|
13
|
+
1: 3,
|
|
14
|
+
2: 3,
|
|
15
|
+
3: 3,
|
|
16
|
+
4: 3,
|
|
17
|
+
5: 5,
|
|
18
|
+
6: 1,
|
|
19
|
+
7: 3
|
|
20
|
+
};
|
|
21
|
+
if (!Object.prototype.hasOwnProperty.call(lengths, op) || part.length !== lengths[op] || op !== 6 && typeof name !== "string") throw new TypeError("[i18n] invalid compact opcode");
|
|
22
|
+
if (op >= 1 && op <= 3 && part[2] !== null && typeof part[2] !== "string" && (typeof part[2] !== "object" || Array.isArray(part[2]))) throw new TypeError("[i18n] invalid compact format");
|
|
23
|
+
if (op === 5 && (typeof part[2] !== "number" || !Number.isFinite(part[2]) || ![0, 1].includes(part[3]))) throw new TypeError("[i18n] invalid compact plural");
|
|
24
|
+
if (op === 4 || op === 5) {
|
|
25
|
+
const branches = part[op === 4 ? 2 : 4];
|
|
26
|
+
if (!branches || typeof branches !== "object" || Array.isArray(branches) || !Object.prototype.hasOwnProperty.call(branches, "other")) throw new TypeError("[i18n] missing other branch");
|
|
27
|
+
for (const child of Object.values(branches)) validateCompact(child, depth + 1);
|
|
28
|
+
}
|
|
29
|
+
if (op === 7) validateCompact(part[2], depth + 1);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
export { validateCompact as n, COMPACT_VERSION as t };
|
|
33
|
+
|
|
34
|
+
//# sourceMappingURL=compact-E3zj3Z8d.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compact-E3zj3Z8d.js","names":[],"sources":["../src/shared/compact.ts"],"sourcesContent":["/** Compact message format v1. Strings are literal messages or literal parts. */\nexport type CompactMessage = string | CompactPart[];\n\nexport type CompactPart =\n | string\n | [0, string]\n | [1, string, string | Record<string, unknown> | null]\n | [2 | 3, string, string | Record<string, unknown> | null]\n | [4, string, Record<string, CompactMessage>]\n | [5, string, number, 0 | 1, Record<string, CompactMessage>]\n | [6]\n | [7, string, CompactMessage];\n\nexport const COMPACT_VERSION = 1;\n\nexport function validateCompact(value: unknown, depth = 0): asserts value is CompactMessage {\n if (depth > 100) throw new TypeError('[i18n] compact message nesting exceeds 100');\n if (typeof value === 'string') return;\n if (!Array.isArray(value)) throw new TypeError('[i18n] invalid compact message');\n\n for (const part of value) {\n if (typeof part === 'string') continue;\n if (!Array.isArray(part)) throw new TypeError('[i18n] invalid compact instruction');\n\n const [op, name] = part;\n const lengths: Record<number, number> = { 0: 2, 1: 3, 2: 3, 3: 3, 4: 3, 5: 5, 6: 1, 7: 3 };\n\n if (\n !Object.prototype.hasOwnProperty.call(lengths, op) || part.length !== lengths[op] ||\n (op !== 6 && typeof name !== 'string')\n ) throw new TypeError('[i18n] invalid compact opcode');\n if (\n op >= 1 && op <= 3 && part[2] !== null && typeof part[2] !== 'string' &&\n (typeof part[2] !== 'object' || Array.isArray(part[2]))\n ) throw new TypeError('[i18n] invalid compact format');\n if (op === 5 && (typeof part[2] !== 'number' || !Number.isFinite(part[2]) || ![0, 1].includes(part[3]))) {\n throw new TypeError('[i18n] invalid compact plural');\n }\n if (op === 4 || op === 5) {\n const branches = part[op === 4 ? 2 : 4];\n\n if (\n !branches || typeof branches !== 'object' || Array.isArray(branches) ||\n !Object.prototype.hasOwnProperty.call(branches, 'other')\n ) throw new TypeError('[i18n] missing other branch');\n\n for (const child of Object.values(branches)) validateCompact(child, depth + 1);\n }\n if (op === 7) validateCompact(part[2], depth + 1);\n }\n}\n"],"mappings":";AAaA,MAAa,kBAAkB;AAE/B,SAAgB,gBAAgB,OAAgB,QAAQ,GAAoC;CAC1F,IAAI,QAAQ,KAAK,MAAM,IAAI,UAAU,4CAA4C;CACjF,IAAI,OAAO,UAAU,UAAU;CAC/B,IAAI,CAAC,MAAM,QAAQ,KAAK,GAAG,MAAM,IAAI,UAAU,gCAAgC;CAE/E,KAAK,MAAM,QAAQ,OAAO;EACxB,IAAI,OAAO,SAAS,UAAU;EAC9B,IAAI,CAAC,MAAM,QAAQ,IAAI,GAAG,MAAM,IAAI,UAAU,oCAAoC;EAElF,MAAM,CAAC,IAAI,QAAQ;EACnB,MAAM,UAAkC;GAAE,GAAG;GAAG,GAAG;GAAG,GAAG;GAAG,GAAG;GAAG,GAAG;GAAG,GAAG;GAAG,GAAG;GAAG,GAAG;EAAE;EAEzF,IACE,CAAC,OAAO,UAAU,eAAe,KAAK,SAAS,EAAE,KAAK,KAAK,WAAW,QAAQ,OAC7E,OAAO,KAAK,OAAO,SAAS,UAC7B,MAAM,IAAI,UAAU,+BAA+B;EACrD,IACE,MAAM,KAAK,MAAM,KAAK,KAAK,OAAO,QAAQ,OAAO,KAAK,OAAO,aAC5D,OAAO,KAAK,OAAO,YAAY,MAAM,QAAQ,KAAK,EAAE,IACrD,MAAM,IAAI,UAAU,+BAA+B;EACrD,IAAI,OAAO,MAAM,OAAO,KAAK,OAAO,YAAY,CAAC,OAAO,SAAS,KAAK,EAAE,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,KAAK,EAAE,IACnG,MAAM,IAAI,UAAU,+BAA+B;EAErD,IAAI,OAAO,KAAK,OAAO,GAAG;GACxB,MAAM,WAAW,KAAK,OAAO,IAAI,IAAI;GAErC,IACE,CAAC,YAAY,OAAO,aAAa,YAAY,MAAM,QAAQ,QAAQ,KACnE,CAAC,OAAO,UAAU,eAAe,KAAK,UAAU,OAAO,GACvD,MAAM,IAAI,UAAU,6BAA6B;GAEnD,KAAK,MAAM,SAAS,OAAO,OAAO,QAAQ,GAAG,gBAAgB,OAAO,QAAQ,CAAC;EAC/E;EACA,IAAI,OAAO,GAAG,gBAAgB,KAAK,IAAI,QAAQ,CAAC;CAClD;AACF"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { n as CompactMessage, r as CompactPart } from "./compact-CJ0OWoIv.js";
|
|
2
|
+
import { A as isMessageDescriptor, C as MessageTagHandler, D as TextRenderer, E as PrimitiveType, M as isMessageTagHandler, N as I18nJsxConfig, O as TranslationGetter, S as MessageSchemaValue, T as MessageValueFactory, _ as MessageMeta, a as I18nJsxOutput, b as MessageRuntimeValue, c as InferMessageSchema, d as JsxRenderer, f as LanguageId, g as MessageInput, h as MessageFormatOptions, i as GetJsxHandler, j as isMessageSchemaValue, k as TryRenderArgs, l as InferRuntimeParams, m as MessageDescriptor, n as CompiledTranslation, o as I18nTagElement, p as MessageContext, r as DescriptorRenderArgs, s as I18nTagValue, t as AnyMessageDescriptor, u as JsonValue, v as MessageParam, w as MessageValueContext, x as MessageSchema, y as MessageParams } from "./types-BuGoCU3P.js";
|
|
3
|
+
import { G as noTranslate, I as I18nRegistry, K as setFormats, y as defineTranslationLoader } from "./adapter-CWC8rng-.js";
|
|
4
|
+
import { n as TApi } from "./i18n-CfYNwubL.js";
|
|
5
|
+
type CompiledPayload = readonly [id: string, fallback: CompactMessage];
|
|
6
|
+
type CompiledTextRenderer = {
|
|
7
|
+
(message: CompiledPayload, params?: MessageParams): string;
|
|
8
|
+
<Text extends string, Schema extends MessageSchema | undefined>(message: MessageDescriptor<Text, Schema>, ...args: DescriptorRenderArgs<Schema>): string;
|
|
9
|
+
};
|
|
10
|
+
type CompiledJsxRenderer = {
|
|
11
|
+
(message: CompiledPayload, params?: MessageParams): I18nJsxOutput;
|
|
12
|
+
<Text extends string, Schema extends MessageSchema | undefined>(message: MessageDescriptor<Text, Schema>, ...args: DescriptorRenderArgs<Schema>): I18nJsxOutput;
|
|
13
|
+
};
|
|
14
|
+
type CompiledTApi = Omit<TApi<I18nJsxOutput, I18nTagValue>, 'msg' | 'text' | 'jsx' | 'try' | 'context' | 'note' | 'meta'> & {
|
|
15
|
+
msg<Schema extends MessageSchema | undefined = undefined>(message: CompiledPayload, schema?: Schema): MessageDescriptor<string, Schema>;
|
|
16
|
+
text: CompiledTextRenderer;
|
|
17
|
+
jsx: CompiledJsxRenderer;
|
|
18
|
+
try<T>(renderer: CompiledTextRenderer, value: T, ...args: TryRenderArgs<T>): T extends {
|
|
19
|
+
readonly __fluenticMessage: true;
|
|
20
|
+
} ? string : T;
|
|
21
|
+
try<T>(renderer: CompiledJsxRenderer, value: T, ...args: TryRenderArgs<T>): T extends {
|
|
22
|
+
readonly __fluenticMessage: true;
|
|
23
|
+
} ? I18nJsxOutput : T;
|
|
24
|
+
};
|
|
25
|
+
declare const t: CompiledTApi;
|
|
26
|
+
export { AnyMessageDescriptor, type CompactMessage, type CompactPart, CompiledJsxRenderer, CompiledPayload, CompiledTApi, CompiledTextRenderer, CompiledTranslation, DescriptorRenderArgs, GetJsxHandler, type I18nJsxConfig, I18nJsxOutput, I18nRegistry, I18nTagElement, I18nTagValue, InferMessageSchema, InferRuntimeParams, JsonValue, JsxRenderer, LanguageId, MessageContext, MessageDescriptor, MessageFormatOptions, MessageInput, MessageMeta, MessageParam, MessageParams, MessageRuntimeValue, MessageSchema, MessageSchemaValue, MessageTagHandler, MessageValueContext, MessageValueFactory, PrimitiveType, TextRenderer, TranslationGetter, TryRenderArgs, defineTranslationLoader, isMessageDescriptor, isMessageSchemaValue, isMessageTagHandler, noTranslate, setFormats, t };
|
|
27
|
+
//# sourceMappingURL=compiled.d.ts.map
|
package/dist/compiled.js
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { a as createTagHandler, c as getRuntime, l as noTranslate, n as defineTranslationLoader, r as I18nRegistry, u as setFormats } from "./translation-manager-C79eKu2K.js";
|
|
2
|
+
import { n as isMessageSchemaValue, r as isMessageTagHandler, t as isMessageDescriptor } from "./types-BkDsJfVD.js";
|
|
3
|
+
import { n as createFormatting, t as interpret } from "./interpreter-Dld8QyOI.js";
|
|
4
|
+
// src/compiled.ts
|
|
5
|
+
const formatting = /* @__PURE__ */ createFormatting(interpret, true);
|
|
6
|
+
function descriptor(payload, schema) {
|
|
7
|
+
if (!Array.isArray(payload) || payload.length !== 2 || typeof payload[0] !== "string") throw new TypeError("[i18n] compiled runtime requires compiled messages; enable the Fluentic plugin");
|
|
8
|
+
return Object.freeze({
|
|
9
|
+
__fluenticMessage: true,
|
|
10
|
+
text: payload[0],
|
|
11
|
+
compiled: payload,
|
|
12
|
+
context: null,
|
|
13
|
+
schema: schema ?? {},
|
|
14
|
+
notes: [],
|
|
15
|
+
meta: void 0
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
function options(message, params) {
|
|
19
|
+
return {
|
|
20
|
+
msg: isMessageDescriptor(message) ? message : descriptor(message),
|
|
21
|
+
params
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
const t = {
|
|
25
|
+
msg: descriptor,
|
|
26
|
+
text(message, params) {
|
|
27
|
+
return formatting.getText(options(message, params));
|
|
28
|
+
},
|
|
29
|
+
jsx(message, params) {
|
|
30
|
+
return formatting.getJsx(options(message, params));
|
|
31
|
+
},
|
|
32
|
+
clone(message) {
|
|
33
|
+
return Object.freeze({ ...message });
|
|
34
|
+
},
|
|
35
|
+
params(params = {}) {
|
|
36
|
+
return params ?? {};
|
|
37
|
+
},
|
|
38
|
+
tag(value) {
|
|
39
|
+
if (typeof value === "function") return createTagHandler(value);
|
|
40
|
+
const adapt = getRuntime().tagElement;
|
|
41
|
+
if (!adapt) throw new Error("[i18n] element tags require a platform adapter");
|
|
42
|
+
return createTagHandler(adapt(value));
|
|
43
|
+
},
|
|
44
|
+
try(renderer, value, params) {
|
|
45
|
+
return isMessageDescriptor(value) ? renderer(value, params) : value;
|
|
46
|
+
},
|
|
47
|
+
notranslate: noTranslate
|
|
48
|
+
};
|
|
49
|
+
export { I18nRegistry, defineTranslationLoader, isMessageDescriptor, isMessageSchemaValue, isMessageTagHandler, noTranslate, setFormats, t };
|
|
50
|
+
|
|
51
|
+
//# sourceMappingURL=compiled.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compiled.js","names":[],"sources":["../src/compiled.ts"],"sourcesContent":["import { type TApi } from './core/i18n';\nimport { isMessageDescriptor } from './core/types';\nimport type {\n DescriptorRenderArgs,\n I18nJsxOutput,\n I18nTagValue,\n MessageDescriptor,\n MessageParams,\n MessageSchema,\n TryRenderArgs,\n} from './core/types';\nimport type { CompactMessage } from './shared/compact';\nimport { createFormatting } from './shared/formatting';\nimport { interpret } from './shared/interpreter';\nimport { createTagHandler, getRuntime, noTranslate } from './shared/runtime';\n\nexport type CompiledPayload = readonly [id: string, fallback: CompactMessage];\n\nexport type CompiledTextRenderer = {\n (message: CompiledPayload, params?: MessageParams): string;\n <Text extends string, Schema extends MessageSchema | undefined>(\n message: MessageDescriptor<Text, Schema>,\n ...args: DescriptorRenderArgs<Schema>\n ): string;\n};\n\nexport type CompiledJsxRenderer = {\n (message: CompiledPayload, params?: MessageParams): I18nJsxOutput;\n <Text extends string, Schema extends MessageSchema | undefined>(\n message: MessageDescriptor<Text, Schema>,\n ...args: DescriptorRenderArgs<Schema>\n ): I18nJsxOutput;\n};\n\nexport type CompiledTApi =\n & Omit<TApi<I18nJsxOutput, I18nTagValue>, 'msg' | 'text' | 'jsx' | 'try' | 'context' | 'note' | 'meta'>\n & {\n msg<Schema extends MessageSchema | undefined = undefined>(\n message: CompiledPayload,\n schema?: Schema,\n ): MessageDescriptor<string, Schema>;\n text: CompiledTextRenderer;\n jsx: CompiledJsxRenderer;\n try<T>(\n renderer: CompiledTextRenderer,\n value: T,\n ...args: TryRenderArgs<T>\n ): T extends { readonly __fluenticMessage: true; } ? string\n : T;\n try<T>(\n renderer: CompiledJsxRenderer,\n value: T,\n ...args: TryRenderArgs<T>\n ): T extends { readonly __fluenticMessage: true; } ? I18nJsxOutput : T;\n };\n\nconst formatting = /* @__PURE__ */ createFormatting(interpret, true);\n\nfunction descriptor<Schema extends MessageSchema | undefined = undefined>(\n payload: CompiledPayload,\n schema?: Schema,\n): MessageDescriptor<string, Schema> {\n if (!Array.isArray(payload) || payload.length !== 2 || typeof payload[0] !== 'string') {\n throw new TypeError('[i18n] compiled runtime requires compiled messages; enable the Fluentic plugin');\n }\n\n return Object.freeze({\n __fluenticMessage: true,\n text: payload[0],\n compiled: payload,\n context: null,\n schema: schema ?? {},\n notes: [],\n meta: undefined,\n }) as unknown as MessageDescriptor<string, Schema>;\n}\n\nfunction options(\n message: CompiledPayload | MessageDescriptor<string, MessageSchema | undefined>,\n params?: MessageParams,\n) {\n return { msg: isMessageDescriptor(message) ? message : descriptor(message), params };\n}\n\nexport const t = {\n msg: descriptor,\n text(message: CompiledPayload | MessageDescriptor<string, MessageSchema | undefined>, params?: MessageParams) {\n return formatting.getText(options(message, params));\n },\n jsx(message: CompiledPayload | MessageDescriptor<string, MessageSchema | undefined>, params?: MessageParams) {\n return formatting.getJsx(options(message, params));\n },\n clone(message: MessageDescriptor) {\n return Object.freeze({ ...message });\n },\n params(params: MessageParams | null = {}) {\n return params ?? {};\n },\n tag(value: unknown) {\n if (typeof value === 'function') return createTagHandler(value as (chunks: unknown[]) => unknown);\n\n const adapt = getRuntime().tagElement;\n\n if (!adapt) throw new Error('[i18n] element tags require a platform adapter');\n\n return createTagHandler(adapt(value));\n },\n try(renderer: (message: unknown, params?: MessageParams) => unknown, value: unknown, params?: MessageParams) {\n return isMessageDescriptor(value) ? renderer(value, params) : value;\n },\n notranslate: noTranslate,\n} as unknown as CompiledTApi;\nexport * from './core/types';\nexport type { CompactMessage, CompactPart } from './shared/compact';\nexport { I18nRegistry, noTranslate, setFormats } from './shared/runtime';\nexport { defineTranslationLoader } from './translation-manager';\n"],"mappings":";;;;AAwDA,MAAM,aAA6B,iCAAiB,WAAW,IAAI;AAEnE,SAAS,WACP,SACA,QACmC;CACnC,IAAI,CAAC,MAAM,QAAQ,OAAO,KAAK,QAAQ,WAAW,KAAK,OAAO,QAAQ,OAAO,UAC3E,MAAM,IAAI,UAAU,gFAAgF;CAGtG,OAAO,OAAO,OAAO;EACnB,mBAAmB;EACnB,MAAM,QAAQ;EACd,UAAU;EACV,SAAS;EACT,QAAQ,UAAU,CAAC;EACnB,OAAO,CAAC;EACR,MAAM,KAAA;CACR,CAAC;AACH;AAEA,SAAS,QACP,SACA,QACA;CACA,OAAO;EAAE,KAAK,oBAAoB,OAAO,IAAI,UAAU,WAAW,OAAO;EAAG;CAAO;AACrF;AAEA,MAAa,IAAI;CACf,KAAK;CACL,KAAK,SAAiF,QAAwB;EAC5G,OAAO,WAAW,QAAQ,QAAQ,SAAS,MAAM,CAAC;CACpD;CACA,IAAI,SAAiF,QAAwB;EAC3G,OAAO,WAAW,OAAO,QAAQ,SAAS,MAAM,CAAC;CACnD;CACA,MAAM,SAA4B;EAChC,OAAO,OAAO,OAAO,EAAE,GAAG,QAAQ,CAAC;CACrC;CACA,OAAO,SAA+B,CAAC,GAAG;EACxC,OAAO,UAAU,CAAC;CACpB;CACA,IAAI,OAAgB;EAClB,IAAI,OAAO,UAAU,YAAY,OAAO,iBAAiB,KAAuC;EAEhG,MAAM,QAAQ,WAAW,CAAC,CAAC;EAE3B,IAAI,CAAC,OAAO,MAAM,IAAI,MAAM,gDAAgD;EAE5E,OAAO,iBAAiB,MAAM,KAAK,CAAC;CACtC;CACA,IAAI,UAAiE,OAAgB,QAAwB;EAC3G,OAAO,oBAAoB,KAAK,IAAI,SAAS,OAAO,MAAM,IAAI;CAChE;CACA,aAAa;AACf"}
|