jostraca 0.33.1 → 0.34.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/README.md CHANGED
@@ -1,354 +1,91 @@
1
1
  # jostraca
2
2
 
3
- A code and project generator that uses React-style components to define
4
- files, folders, and content declaratively. This is the canonical
5
- TypeScript implementation, published to npm as
6
- [`jostraca`](https://www.npmjs.com/package/jostraca). (A feature-parity Go
7
- port lives at [`github.com/jostraca/jostraca/go`](https://pkg.go.dev/github.com/jostraca/jostraca/go).)
3
+ A code and project generator. You describe an output file tree with
4
+ components — `Project`, `Folder`, `File`, `Content` and the rest — inside a
5
+ callback, and Jostraca writes the tree to disk. The callback runs first and
6
+ touches nothing; only then does the build phase write files. That split is why
7
+ a second run over code somebody has edited by hand can preserve, present, diff
8
+ or merge instead of overwriting.
9
+
10
+ This is the canonical TypeScript implementation, published to npm as
11
+ [`jostraca`](https://www.npmjs.com/package/jostraca). A feature-parity Go port
12
+ lives at
13
+ [`github.com/jostraca/jostraca/go`](https://pkg.go.dev/github.com/jostraca/jostraca/go).
8
14
 
9
15
  [![npm version](https://badge.fury.io/js/jostraca.svg)](https://www.npmjs.com/package/jostraca)
10
- [![license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/jostraca/jostraca/blob/master/LICENSE)
16
+ [![license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/jostraca/jostraca/blob/HEAD/LICENSE)
11
17
 
12
18
  ```bash
13
19
  npm install jostraca
14
20
  ```
15
21
 
16
- Peer dependencies (install the ones your usage needs):
22
+ `shape` is the only peer dependency, and npm installs it for you. It
23
+ validates options, on a loose range (`shape >=10`). In-memory generation is
24
+ served by an in-repo filesystem (`src/util/memfs.ts`), so nothing else is
25
+ installed for it.
17
26
 
18
- ```bash
19
- npm install memfs shape
20
- ```
21
-
22
- `memfs` backs in-memory generation; `shape` backs option validation. Both
23
- are loose ranges (`memfs >=4`, `shape >=10`).
24
-
25
- ---
26
-
27
- This README is organised along the four [Diátaxis](https://diataxis.fr)
28
- documentation modes. Jump to the one that fits what you need right now:
29
-
30
- - **[Tutorial](#tutorial)** — learning-oriented. Build your first
31
- generator from scratch.
32
- - **[How-to guides](#how-to-guides)** — task-oriented. Recipes for
33
- specific jobs.
34
- - **[Reference](#reference)** — information-oriented. Every component,
35
- option, and utility.
36
- - **[Explanation](#explanation)** — understanding-oriented. How and why
37
- Jostraca works the way it does.
38
-
39
- ---
27
+ ## A generator, end to end
40
28
 
41
- ## Tutorial
42
-
43
- *A short lesson. Follow it top to bottom and you'll have a working
44
- generator.*
45
-
46
- ### 1. A first file tree
47
-
48
- Create a generator, then describe a tree of components. Nesting the
49
- components mirrors the folders and files you want on disk.
50
-
51
- ```typescript
29
+ ```js
52
30
  import { Jostraca, Project, Folder, File, Content } from 'jostraca'
53
31
 
54
- const jostraca = Jostraca()
32
+ const jostraca = Jostraca({ model: { app: { name: 'acme' } } })
55
33
 
56
34
  await jostraca.generate({ folder: './out' }, () => {
57
- Project({ folder: 'my-app' }, () => {
58
-
59
- Folder({ name: 'src' }, () => {
60
- File({ name: 'index.js' }, () => {
61
- Content('console.log("hello world")\n')
62
- })
63
- })
35
+ Project({ folder: 'acme' }, () => {
64
36
 
65
37
  File({ name: 'package.json' }, () => {
66
- Content('{ "name": "my-app" }\n')
67
- })
68
- })
69
- })
70
- ```
71
-
72
- Run it, and Jostraca writes:
73
-
74
- ```
75
- out/
76
- my-app/
77
- src/
78
- index.js -> console.log("hello world")
79
- package.json -> { "name": "my-app" }
80
- ```
81
-
82
- You declared a tree; Jostraca built it. That is the whole model.
83
-
84
- ### 2. Insert values with a template
85
-
86
- Real generators produce files that vary with input data. Pass a `model`
87
- to `Jostraca()` and reference it in content with `$$path$$`:
88
-
89
- ```typescript
90
- const jostraca = Jostraca({
91
- model: { app: { name: 'Acme', version: '1.0.0' } }
92
- })
93
-
94
- await jostraca.generate({ folder: './out' }, () => {
95
- Project({}, () => {
96
- File({ name: 'config.txt' }, () => {
97
- Content('App: $$app.name$$ v$$app.version$$\n')
98
- })
99
- })
100
- })
101
- // out/config.txt -> App: Acme v1.0.0
102
- ```
103
-
104
- ### 3. Make a reusable component
105
-
106
- When a shape repeats, capture it with `cmp()` — a plain function that
107
- emits content. This is the "React-style" part: components compose.
108
-
109
- ```typescript
110
- import { cmp, Content, each } from 'jostraca'
111
-
112
- const FunctionDef = cmp(function FunctionDef(props: any) {
113
- Content(`function ${props.name}(`)
114
- Content(props.params.join(', '))
115
- Content(') {\n')
116
- each(props.ctx$.model.body, (line) => Content(` ${line}\n`))
117
- Content('}\n')
118
- })
119
-
120
- File({ name: 'utils.js' }, () => {
121
- FunctionDef({ name: 'greet', params: ['name'] })
122
- })
123
- ```
124
-
125
- From here, the **How-to guides** below cover each capability in turn, and
126
- the **Reference** documents every option.
127
-
128
- ## How-to guides
129
-
130
- *Practical recipes. Each one is self-contained — read only the one you
131
- need.*
132
-
133
- ### Read a template file and fill its slots
134
-
135
- Use `Fragment` to read an external template, and `Slot` to replace marked
136
- regions inside it.
137
-
138
- ```typescript
139
- // template.html contains:
140
- // <html>
141
- // <!-- <[SLOT:head]> -->
142
- // <body>
143
- // <!-- <[SLOT:body]> -->
144
- // </body>
145
- // </html>
146
-
147
- File({ name: 'index.html' }, () => {
148
- Fragment({ from: '/templates/template.html' }, () => {
149
- Slot({ name: 'head' }, () => {
150
- Content('<title>My Page</title>')
151
- })
152
- Slot({ name: 'body' }, () => {
153
- Content('<h1>Hello</h1>')
38
+ Content('{ "name": "$$app.name$$" }\n')
154
39
  })
155
- })
156
- })
157
- ```
158
-
159
- An unnamed `<[SLOT]>` marker receives all non-`Slot` children of the
160
- Fragment. Giving a Fragment non-`Slot` children when its source has no
161
- unnamed `<[SLOT]>` marker is an error — there is nowhere for that content
162
- to go, and it would otherwise be discarded silently.
163
-
164
- ### Copy files and directories
165
40
 
166
- `Copy` brings in existing files or whole directory trees, applying
167
- template substitution to text files (binaries pass through untouched):
168
-
169
- ```typescript
170
- const jostraca = Jostraca({ model: { title: 'My App' } })
171
-
172
- await jostraca.generate({ folder: './out' }, () => {
173
- Project({ folder: 'app' }, () => {
174
- Folder({ name: 'static' }, () => {
175
- Copy({ from: '/templates/assets' })
176
- Copy({ from: '/templates/readme.txt', to: 'README.txt' })
41
+ Folder({ name: 'src' }, () => {
42
+ File({ name: 'index.js' }, () => {
43
+ Content('console.log("$$app.name$$")\n')
44
+ })
177
45
  })
178
46
  })
179
47
  })
180
48
  ```
181
49
 
182
- ### Edit an existing file in place
183
-
184
- `Inject` replaces the content between two markers in a file that already
185
- exists, leaving the rest untouched:
186
-
187
- ```typescript
188
- // existing foo.txt:
189
- // HEADER
190
- // #--START--#
191
- // old content
192
- // #--END--#
193
- // FOOTER
194
-
195
- Project({}, () => {
196
- Inject({ name: 'foo.txt' }, () => {
197
- Content('new content')
198
- })
199
- })
200
- // Result: HEADER\n#--START--#\nnew content\n#--END--#\nFOOTER
201
- ```
202
-
203
- ### Regenerate without clobbering hand edits
204
-
205
- By default Jostraca overwrites. When users edit generated files, choose a
206
- gentler mode per file extension:
207
-
208
- ```typescript
209
- await jostraca.generate({
210
- folder: './out',
211
- existing: {
212
- txt: {
213
- write: true, // overwrite existing files (default)
214
- preserve: true, // keep a .old. backup of what was overwritten
215
- present: false, // write to .new. instead of overwriting
216
- diff: false, // write an annotated 2-way diff
217
- merge: false, // 3-way merge with conflict markers
218
- },
219
- bin: {
220
- write: true,
221
- preserve: false,
222
- present: false,
223
- }
224
- }
225
- }, root)
226
- ```
227
-
228
- For files a user should own outright, add the line `# JOSTRACA_PROTECT`
229
- anywhere in the generated file — Jostraca will never overwrite it on
230
- subsequent runs.
231
-
232
- ### Generate in memory (for tests or virtual FS)
233
-
234
- Set `mem: true` and provide any template inputs via `vol`. Nothing touches
235
- disk; read the result back from the returned volume:
236
-
237
- ```typescript
238
- const jostraca = Jostraca({
239
- mem: true,
240
- vol: { '/templates/header.txt': 'HEADER\n' }
241
- })
242
-
243
- const result = await jostraca.generate({ folder: '/' }, root)
244
-
245
- const files = result.vol().toJSON()
246
- // { '/output.txt': '...' }
247
- ```
248
-
249
- ## Reference
250
-
251
- *Information-oriented. Look things up here; don't read it front to back.*
252
-
253
- The complete, authoritative reference for every component, prop, option,
254
- and utility is **[REFERENCE.md](./REFERENCE.md)**.
255
-
256
- ### Components
257
-
258
- `Project`, `Folder`, `File`, `Content`, `Fragment`, `Slot`, `Inject`,
259
- `Copy`, `Line`, `List` — plus custom components via `cmp()`.
260
-
261
- ### `generate()` result
262
-
263
- `generate()` returns a `JostracaResult`:
264
-
265
- ```typescript
266
- {
267
- when: number, // timestamp of generation
268
- files: {
269
- written: string[], // files written to disk
270
- preserved: string[], // backup copies created
271
- presented: string[], // .new. files created
272
- diffed: string[], // diff files created
273
- merged: string[], // merged files created
274
- conflicted: string[], // files with merge conflicts
275
- unchanged: string[], // files left unchanged
276
- },
277
- audit: () => Audit[], // audit trail of operations
278
- vol?: () => any, // virtual volume (mem mode)
279
- fs?: () => FST, // file system (mem mode)
280
- }
281
- ```
282
-
283
- ### Utility exports
284
-
285
- ```typescript
286
- import {
287
- each, // iterate arrays/objects with marking and sorting
288
- get, // simple dot-path property access
289
- getx, // advanced path access with operators
290
- camelify, // 'foo_bar' -> 'FooBar'
291
- snakify, // 'FooBar' -> 'foo_bar'
292
- kebabify, // 'FooBar' -> 'foo-bar'
293
- names, // generate all case variants of a name
294
- template, // process template strings with model data
295
- indent, // indent text content
296
- cmp, // create custom components
297
- deep, // deep merge objects
298
- omap, // map over object entries (sorted key order)
299
- } from 'jostraca'
300
- ```
301
-
302
- See [REFERENCE.md](./REFERENCE.md) for signatures and edge-case behaviour.
303
-
304
- ## Explanation
305
-
306
- *Understanding-oriented. Background and design — read this to build a
307
- mental model, not to accomplish a specific task.*
308
-
309
- ### Two phases: define, then build
310
-
311
- A `generate()` call runs in two distinct phases. First, the **define
312
- phase** executes your callback: every component call (`Project`, `File`,
313
- `Content`, …) records a node in an in-memory tree — nothing is written
314
- yet. Then the **build phase** walks that tree and performs the real file
315
- operations. Separating the two means the whole intended output is known
316
- before a single byte is written, which is what makes existing-file
317
- handling, protection, and merging possible.
318
-
319
- ### Why React-style components
50
+ Run it and `out/acme/` holds `package.json` and `src/index.js`, with
51
+ `$$app.name$$` replaced from the model.
320
52
 
321
- Components nest to mirror the filesystem, and they compose: a component is
322
- just a function that emits more components. That gives you ordinary
323
- language tools — loops, conditionals, parameters, reuse via `cmp()` — for
324
- describing structure, instead of a bespoke templating dialect. The nesting
325
- is kept noise-free by an `AsyncLocalStorage` context, so child components
326
- know their parent without you threading it through by hand.
53
+ ## Documentation
327
54
 
328
- ### The philosophy of existing files
55
+ The documentation set lives in
56
+ [`docs/`](https://github.com/jostraca/jostraca/tree/HEAD/docs) at the
57
+ repository root, and is rendered at [jostraca.org](https://jostraca.org). It
58
+ follows [Diátaxis](https://diataxis.fr):
329
59
 
330
- Generators are run repeatedly against code that humans also edit. Jostraca
331
- treats the already-on-disk file as a first-class input, not an obstacle:
332
- the `write` / `preserve` / `present` / `diff` / `merge` modes and
333
- `# JOSTRACA_PROTECT` exist so that regeneration is safe by policy rather
334
- than by luck. The three-way merge in particular keeps a baseline of what
335
- was last generated, so it can distinguish your edits from generator
336
- changes.
60
+ - **[Tutorial](https://github.com/jostraca/jostraca/blob/HEAD/docs/tutorial.md)**
61
+ — build a generator from nothing, then run it again over hand-edited output.
62
+ - **[How-to guides](https://github.com/jostraca/jostraca/blob/HEAD/docs/how-to/README.md)**
63
+ — one page per task.
64
+ - **Reference** —
65
+ [components](https://github.com/jostraca/jostraca/blob/HEAD/docs/reference-components.md),
66
+ [options](https://github.com/jostraca/jostraca/blob/HEAD/docs/reference-options.md),
67
+ [utilities](https://github.com/jostraca/jostraca/blob/HEAD/docs/reference-utilities.md).
68
+ - **[Explanation](https://github.com/jostraca/jostraca/blob/HEAD/docs/explanation.md)**
69
+ — the two-phase model, and what it costs.
337
70
 
338
- ---
71
+ Every example in those pages is executed by `ts/test/docs.test.ts`, which runs
72
+ each snippet in a temp directory and compares the tree it wrote.
339
73
 
340
- ## Build and test (contributors)
74
+ ## Build and test
341
75
 
342
76
  ```bash
343
77
  cd ts
344
- npm install # also pulls peer deps: memfs, shape
78
+ npm install # also pulls the peer dep: shape
345
79
  npm run build # tsc --build src test
346
80
  npm test # node --test dist-test/**/*.test.js
347
81
  ```
348
82
 
349
- From the repo root, `make all` builds and tests both the TS and Go stacks.
350
- See the top-level [`CLAUDE.md`](../CLAUDE.md) for the full contributor
351
- guide, and [`../go/README.md`](../go/README.md) for the Go port.
83
+ From the repository root, `make all` builds and tests both the TypeScript and
84
+ Go stacks. See
85
+ [`CLAUDE.md`](https://github.com/jostraca/jostraca/blob/HEAD/CLAUDE.md) for
86
+ the contributor guide and
87
+ [`go/README.md`](https://github.com/jostraca/jostraca/blob/HEAD/go/README.md)
88
+ for the port.
352
89
 
353
90
  ## License
354
91
 
package/dist/cmp/List.js CHANGED
@@ -9,8 +9,20 @@ const List = (0, jostraca_1.cmp)(function List(props, children) {
9
9
  const item = props.item;
10
10
  // TODO: after cmp processing children should ALWAYS be an array
11
11
  children = Array.isArray(children) ? children : [children];
12
+ // A STRING child is wrapped in a function that renders it, so it reaches
13
+ // the same per-item `args` a function child does and can interpolate
14
+ // `{item.path}` like one.
15
+ //
16
+ // `src` used to be missing from that Content call, so the string was
17
+ // captured by the typeof test and then dropped on the floor: the wrapper
18
+ // rendered an empty Content and a whole string child emitted nothing at
19
+ // all. `List({item: [...]}, 'n={item.n}\n')` produced just the trailing
20
+ // newline. Nothing caught it because no fixture, test or doc example
21
+ // passes a string child - the component reference documents only the
22
+ // function form. See #44.
12
23
  children = children.map((child) => 'string' === typeof child ?
13
- ({ indent, replace }) => (0, jostraca_1.Content)({ indent, replace }) : child);
24
+ ({ indent, replace }) => (0, jostraca_1.Content)({ src: child, indent, replace }) :
25
+ child);
14
26
  (0, jostraca_1.each)(item, (item) => (0, jostraca_1.each)(children, {
15
27
  call: true, args: {
16
28
  item,
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EAAE,CAAC,EAAE,IAAI,EAAO,EAAE,EAAE,CAAC,IAAA,eAAI,EAAC,IAAI,EAAE,IAAI,CAAC;aACpE;SACF;KACF,CAAC,CAAC,CAAA;IAEH,IAAI,KAAK,KAAK,KAAK,CAAC,IAAI,EAAE,CAAC;QACzB,IAAA,eAAI,EAAC,EAAE,CAAC,CAAA;IACV,CAAC;AACH,CAAC,CAAC,CAAA;QAKA,IAAI"}
@@ -47,9 +47,9 @@ declare const OptionsShape: {
47
47
  };
48
48
  };
49
49
  control: {
50
- dryrun: boolean;
51
- duplicate: boolean;
52
- version: boolean;
50
+ dryrun: any;
51
+ duplicate: any;
52
+ version: any;
53
53
  };
54
54
  };
55
55
  valid: <V>(root?: V | undefined, ctx?: import("shape").Context) => root is V & {
@@ -85,9 +85,9 @@ declare const OptionsShape: {
85
85
  };
86
86
  };
87
87
  control: {
88
- dryrun: boolean;
89
- duplicate: boolean;
90
- version: boolean;
88
+ dryrun: import("shape").Node<BooleanConstructor>;
89
+ duplicate: import("shape").Node<BooleanConstructor>;
90
+ version: import("shape").Node<BooleanConstructor>;
91
91
  };
92
92
  };
93
93
  match: (root?: any, ctx?: import("shape").Context) => boolean;
@@ -163,13 +163,14 @@ declare const OptionsShape: {
163
163
  };
164
164
  };
165
165
  control: {
166
- dryrun: boolean;
167
- duplicate: boolean;
168
- version: boolean;
166
+ dryrun: import("shape").Node<BooleanConstructor>;
167
+ duplicate: import("shape").Node<BooleanConstructor>;
168
+ version: import("shape").Node<BooleanConstructor>;
169
169
  };
170
170
  }>;
171
171
  stringify: (...rest: any[]) => string;
172
172
  jsonify: () => any;
173
+ jsonSchema: () => any;
173
174
  toString: (this: any) => string;
174
175
  shape: {
175
176
  shape$: symbol;
@@ -261,6 +262,7 @@ declare const ExistingShape: {
261
262
  }>;
262
263
  stringify: (...rest: any[]) => string;
263
264
  jsonify: () => any;
265
+ jsonSchema: () => any;
264
266
  toString: (this: any) => string;
265
267
  shape: {
266
268
  shape$: symbol;
package/dist/jostraca.js CHANGED
@@ -43,14 +43,12 @@ exports.cmp = cmp;
43
43
  const Fs = __importStar(require("node:fs"));
44
44
  const node_async_hooks_1 = require("node:async_hooks");
45
45
  const shape_1 = require("shape");
46
- const memfs_1 = require("memfs");
46
+ const memfs_1 = require("./util/memfs");
47
47
  const BuildContext_1 = require("./build/BuildContext");
48
48
  Object.defineProperty(exports, "BuildContext", { enumerable: true, get: function () { return BuildContext_1.BuildContext; } });
49
49
  const basic_1 = require("./util/basic");
50
50
  Object.defineProperty(exports, "each", { enumerable: true, get: function () { return basic_1.each; } });
51
- Object.defineProperty(exports, "get", { enumerable: true, get: function () { return
52
- // select,
53
- basic_1.get; } });
51
+ Object.defineProperty(exports, "get", { enumerable: true, get: function () { return basic_1.get; } });
54
52
  Object.defineProperty(exports, "getx", { enumerable: true, get: function () { return basic_1.getx; } });
55
53
  Object.defineProperty(exports, "camelify", { enumerable: true, get: function () { return basic_1.camelify; } });
56
54
  Object.defineProperty(exports, "snakify", { enumerable: true, get: function () { return basic_1.snakify; } });
@@ -154,13 +152,19 @@ const OptionsShape = (0, shape_1.Shape)({
154
152
  ignore: []
155
153
  }
156
154
  },
155
+ // Each key is Skip so that shape does NOT inject a default here. A literal
156
+ // default would be injected into EVERY per-call options object, including an
157
+ // empty one, and the merge below would then let that injected default beat a
158
+ // global setting -- which silently disabled a global `dryrun: true` and wrote
159
+ // the user's files. Defaults are applied once, after the merge, from
160
+ // CONTROL_DEFAULTS. See PARITY_PLAN.md 1.1.
157
161
  control: {
158
162
  // Do not modify any files or folders.
159
- dryrun: false,
163
+ dryrun: (0, shape_1.Skip)(Boolean),
160
164
  // Create duplicate of generated output (for 3diff).
161
- duplicate: true,
165
+ duplicate: (0, shape_1.Skip)(Boolean),
162
166
  // Allow .jostraca files to be added to git.
163
- version: false,
167
+ version: (0, shape_1.Skip)(Boolean),
164
168
  },
165
169
  }, { name: 'Jostraca Options' });
166
170
  const ExistingShape = (0, shape_1.Shape)({
@@ -180,6 +184,16 @@ const ExistingShape = (0, shape_1.Shape)({
180
184
  }
181
185
  }, { name: 'Jostraca Options (`existing` property)' });
182
186
  const sysFs = () => Fs;
187
+ // Applied once, beneath both the global and the per-call `control`, so that
188
+ // precedence runs defaults < global < per-call. These are NOT declared as
189
+ // literals in OptionsShape: shape would inject them into every validated
190
+ // options object, and an injected default is indistinguishable from a caller's
191
+ // choice at merge time.
192
+ const CONTROL_DEFAULTS = {
193
+ dryrun: false,
194
+ duplicate: true,
195
+ version: false,
196
+ };
183
197
  function Jostraca(gopts_in) {
184
198
  // Global options are shared by calls to `generate`.
185
199
  const gOpts = OptionsShape(gopts_in || {});
@@ -223,7 +237,7 @@ function Jostraca(gopts_in) {
223
237
  bin: (0, basic_1.deep)({}, gOpts.existing.bin, opts.existing.bin),
224
238
  });
225
239
  // console.log('EXISTING', existing)
226
- const control = (0, basic_1.deep)({}, gOpts.control, opts.control);
240
+ const control = (0, basic_1.deep)({}, CONTROL_DEFAULTS, gOpts.control, opts.control);
227
241
  // Component defaults.
228
242
  opts.cmp = (0, basic_1.deep)({
229
243
  Copy: {
@@ -1 +1 @@
1
- {"version":3,"file":"jostraca.js","sourceRoot":"","sources":["../src/jostraca.ts"],"names":[],"mappings":";AAAA,oDAAoD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAogBlD,QAAQ;QAER,GAAG;AApgBL,QAAQ;AACR,iFAAiF;AACjF,8DAA8D;AAE9D,MAAY,EAAE,oCAAe;AAE7B,uDAAoD;AAEpD,iCAAwC;AAExC,iCAAsC;AAWtC,uDAE6B;6FAD3B,2BAAY;AAGd,wCAsBqB;qFArBnB,YAAI;;IACJ,UAAU;IACV,WAAG;qFACH,YAAI;yFACJ,gBAAQ;wFACR,eAAO;yFACP,gBAAQ;qFACR,YAAI;qFACJ,YAAI;qFACJ,YAAI;qFACJ,YAAI;sFACJ,aAAK;yFACL,gBAAQ;sFACR,aAAK;uFACL,cAAM;6FACN,oBAAY;yFACZ,gBAAQ;wFAC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