@quenk/wml 2.13.10 → 2.14.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.
Files changed (60) hide show
  1. package/lib/cli.d.ts +8 -8
  2. package/lib/cli.js +1 -3
  3. package/lib/cli.js.map +1 -1
  4. package/lib/cli.ts +48 -60
  5. package/lib/compile/codegen.d.ts +4 -9
  6. package/lib/compile/codegen.js +164 -369
  7. package/lib/compile/codegen.js.map +1 -1
  8. package/lib/compile/codegen.ts +644 -952
  9. package/lib/compile/index.d.ts +2 -2
  10. package/lib/compile/index.js +4 -4
  11. package/lib/compile/index.js.map +1 -1
  12. package/lib/compile/index.ts +14 -17
  13. package/lib/compile/transform.d.ts +8 -6
  14. package/lib/compile/transform.js +46 -18
  15. package/lib/compile/transform.js.map +1 -1
  16. package/lib/compile/transform.ts +139 -116
  17. package/lib/{dom.d.ts → dom/index.d.ts} +8 -2
  18. package/lib/{dom.js → dom/index.js} +84 -66
  19. package/lib/dom/index.js.map +1 -0
  20. package/lib/dom/index.ts +425 -0
  21. package/lib/dom/monitor.d.ts +33 -0
  22. package/lib/dom/monitor.js +60 -0
  23. package/lib/dom/monitor.js.map +1 -0
  24. package/lib/dom/monitor.ts +75 -0
  25. package/lib/index.d.ts +10 -95
  26. package/lib/index.js +10 -10
  27. package/lib/index.js.map +1 -1
  28. package/lib/index.ts +57 -182
  29. package/lib/main.js +17 -17
  30. package/lib/main.js.map +1 -1
  31. package/lib/main.ts +38 -44
  32. package/lib/parse/ast.d.ts +12 -6
  33. package/lib/parse/ast.js +68 -58
  34. package/lib/parse/ast.js.map +1 -1
  35. package/lib/parse/ast.ts +400 -482
  36. package/lib/parse/generated.d.ts +3 -5
  37. package/lib/parse/generated.js +9504 -9264
  38. package/lib/parse/index.d.ts +2 -3
  39. package/lib/parse/index.js.map +1 -1
  40. package/lib/parse/index.ts +7 -9
  41. package/lib/parse/test.js +194 -192
  42. package/lib/parse/test.js.map +1 -1
  43. package/lib/parse/test.ts +294 -404
  44. package/lib/parse/wml.y +4 -0
  45. package/lib/tsconfig.json +19 -20
  46. package/lib/util.d.ts +10 -0
  47. package/lib/util.js +21 -0
  48. package/lib/util.js.map +1 -0
  49. package/lib/util.ts +39 -0
  50. package/lib/view/frame.d.ts +103 -0
  51. package/lib/view/frame.js +206 -0
  52. package/lib/view/frame.js.map +1 -0
  53. package/lib/view/frame.ts +249 -0
  54. package/lib/view/index.d.ts +58 -0
  55. package/lib/view/index.js +48 -0
  56. package/lib/view/index.js.map +1 -0
  57. package/lib/view/index.ts +97 -0
  58. package/package.json +4 -3
  59. package/lib/dom.js.map +0 -1
  60. package/lib/dom.ts +0 -475
@@ -0,0 +1,249 @@
1
+ import * as dom from "../dom";
2
+
3
+ import { Maybe } from "@quenk/noni/lib/data/maybe";
4
+
5
+ import { DOMMonitor } from "../dom/monitor";
6
+ import { Attrs, Content, WMLId, Widget } from "..";
7
+ import { View } from ".";
8
+
9
+ /**
10
+ * Index used for lists and other data structures.
11
+ *
12
+ * TODO: migrate to noni.
13
+ */
14
+ export type Index = number;
15
+
16
+ /**
17
+ * Entry contains the DOM node and optional widget for an WMLElement.
18
+ */
19
+ export interface Entry {
20
+ node: Content;
21
+ widget?: Widget;
22
+ }
23
+
24
+ /**
25
+ * SetList is a list like data structure that ensures an object is only added
26
+ * once.
27
+ *
28
+ * This allows for items to be added and their index returned without having
29
+ * to iterate over the members to determine if the item was added already.
30
+ *
31
+ * Instead a map of item -> index values is kept internally allowing for fast
32
+ * lookup of new items being added.
33
+ *
34
+ * TODO:
35
+ * 1. Migrate to noni.
36
+ * 2. Find a way to support nested objects, example: {node, widget}
37
+ */
38
+ class SetList {
39
+ constructor(
40
+ public items: Content[] = [],
41
+ public cache: Map<Content, Index> = new Map(),
42
+ ) {}
43
+
44
+ add(item: Content) {
45
+ let idx = this.cache.get(item) ?? this.items.push(item) - 1;
46
+ this.cache.set(item, idx);
47
+ return idx;
48
+ }
49
+
50
+ set(id: Index, item: Content) {
51
+ let prev = this.items[id];
52
+ this.items[id] = item;
53
+ this.cache.delete(prev);
54
+ this.cache.set(item, id);
55
+ return id;
56
+ }
57
+
58
+ has(id: Index) {
59
+ return Boolean(this.get(id));
60
+ }
61
+
62
+ get(id: Index) {
63
+ return this.items[id];
64
+ }
65
+
66
+ delete(idx: Index) {
67
+ let node = this.items[idx];
68
+ this.items.splice(idx, 1);
69
+ this.cache.delete(node);
70
+ }
71
+ }
72
+
73
+ /**
74
+ * ViewFrame serves as a container for a View's rendered template.
75
+ *
76
+ * This class containers helper methods for retreiving elements by id or
77
+ * group freeing the View class of such logic.
78
+ */
79
+ export class ViewFrame {
80
+ constructor(
81
+ public nodes = new SetList(),
82
+ public widgets = new Map<Index, Widget>(),
83
+ public groups: Map<WMLId, Index[]> = new Map(),
84
+ public ids = new Map<WMLId, Index>(),
85
+ public indexes = new Map<Index, WMLId>(),
86
+ public tree?: Content,
87
+ ) {}
88
+
89
+ _register(id: WMLId, node: Content, widget?: Widget) {
90
+ let idx = this.nodes.add(node);
91
+ this.ids.set(id, idx);
92
+ this.indexes.set(idx, id);
93
+ if (widget) {
94
+ this.widgets.set(idx, widget);
95
+ }
96
+ }
97
+
98
+ _registerGroupMember(id: WMLId, node: Content, widget?: Widget) {
99
+ let group = this.groups.get(id) ?? [];
100
+ let idx = this.nodes.add(node);
101
+ group.push(idx);
102
+
103
+ if (widget) this.widgets.set(idx, widget);
104
+
105
+ this.groups.set(id, group);
106
+ }
107
+
108
+ /**
109
+ * root sets the root element of a View's tree.
110
+ */
111
+ root(el: Content) {
112
+ this.tree = el;
113
+ }
114
+
115
+ /**
116
+ * node constructs a DOM node to be used in the View's tree.
117
+ *
118
+ * Any id or group assignment will be honored.
119
+ */
120
+ node(tag: string, attrs: Attrs, children: Content[]): Content {
121
+ let elm = dom.createElement(
122
+ tag,
123
+ <dom.WMLDOMAttrs>attrs,
124
+ children,
125
+ (attrs.wml && attrs.wml.ns) || "",
126
+ );
127
+
128
+ if (attrs?.wml?.id) this._register(attrs.wml.id, elm);
129
+
130
+ if (attrs?.wml?.group) this._registerGroupMember(attrs.wml.group, elm);
131
+
132
+ return elm;
133
+ }
134
+
135
+ /**
136
+ * widget constructs a DOM sub-tree for a Widget in the View's tree.
137
+ *
138
+ * Any id or group assignment will be honored.
139
+ */
140
+ widget(w: Widget, attrs: Attrs): Content {
141
+ let tree = w.render();
142
+
143
+ DOMMonitor.getInstance().monitor(tree, w);
144
+
145
+ if (attrs?.wml?.id) this._register(attrs.wml.id, tree, w);
146
+
147
+ if (attrs?.wml?.group) this._registerGroupMember(attrs.wml.group, tree, w);
148
+
149
+ return tree;
150
+ }
151
+
152
+ /**
153
+ * view renders the content of another view, saving its ids and groups to
154
+ * this one.
155
+ */
156
+ view(view: View): Content {
157
+ let { root } = this;
158
+ let tree = view.render(this);
159
+ this.root = root;
160
+ return tree;
161
+ }
162
+
163
+ /**
164
+ * findById returns the entry stored for the specified wml element.
165
+ */
166
+ findById(id: WMLId): Maybe<Entry> {
167
+ let idx = this.ids.get(id) ?? -1;
168
+ let node = this.nodes.get(idx);
169
+ if (node == null) return Maybe.nothing();
170
+ return Maybe.just({
171
+ node,
172
+ widget: this.widgets.get(idx),
173
+ });
174
+ }
175
+
176
+ /**
177
+ * findByGroup returns all the entries stored fro a group.
178
+ */
179
+ findByGroup(id: WMLId): Entry[] {
180
+ let result = [];
181
+ for (let idx of this.groups.get(id) ?? []) {
182
+ let node = this.nodes.get(idx);
183
+ let widget = this.widgets.get(idx);
184
+ if (node == null) continue;
185
+ result.push({ node, widget });
186
+ }
187
+ return result;
188
+ }
189
+
190
+ /**
191
+ * replaceByIndex performs the heavy work of replacing a WMLElement
192
+ * with the corresponding index from another ViewFrame.
193
+ *
194
+ * The replaced element will have its DOM content redrawn if a parentNode
195
+ * is detected.
196
+ */
197
+ replaceByIndex(next: ViewFrame, idx: Index) {
198
+ let originalNode = this.nodes.get(idx);
199
+ let id = this.indexes.get(idx) ?? "";
200
+
201
+ if (idx == null || originalNode == null) {
202
+ console.warn(`Not replacing missing WMLElement for id "${id}"!`);
203
+ return;
204
+ }
205
+
206
+ let { parentNode } = originalNode;
207
+
208
+ let node = next.nodes.get(idx);
209
+ let widget = next.widgets.get(idx);
210
+ if (node == null) {
211
+ // Remove references since the node no longer exists.
212
+ this.nodes.delete(idx);
213
+ this.widgets.delete(idx);
214
+ this.ids.delete(id);
215
+ this.indexes.delete(idx);
216
+ if (parentNode) parentNode.removeChild(originalNode);
217
+ return;
218
+ }
219
+
220
+ this.nodes.set(idx, node);
221
+ this.widgets.delete(idx);
222
+
223
+ if (widget) this.widgets.set(idx, widget);
224
+
225
+ if (parentNode) parentNode.replaceChild(node, originalNode);
226
+ }
227
+
228
+ /**
229
+ * replaceById allows WMLElement replacement by using an id.
230
+ */
231
+ replaceById(next: ViewFrame, id: WMLId) {
232
+ this.replaceByIndex(next, this.ids.get(id) ?? -1);
233
+ }
234
+
235
+ /**
236
+ * replaceByGroup allows WMLElement replaced by using a group identifier.
237
+ */
238
+ replaceByGroup(next: ViewFrame, id: WMLId) {
239
+ let group = this.groups.get(id) ?? [];
240
+
241
+ let newGroup = [];
242
+ for (let idx of group) {
243
+ this.replaceByIndex(next, idx);
244
+ if (this.nodes.has(idx)) newGroup.push(idx);
245
+ }
246
+
247
+ this.groups.set(id, newGroup);
248
+ }
249
+ }
@@ -0,0 +1,58 @@
1
+ import { Maybe } from "@quenk/noni/lib/data/maybe";
2
+ import { Content, WMLElement, WMLId } from "..";
3
+ import { ViewFrame } from "./frame";
4
+ /**
5
+ * Renderer is a function that builds up a ViewFrame on behalf of the view.
6
+ */
7
+ export type Renderer = (frame: ViewFrame) => ViewFrame;
8
+ /**
9
+ * View instances are compiled from wml template files.
10
+ *
11
+ * They provide an api for rendering user interfaces and
12
+ * querying individual objects(WMLElement) it is made of.
13
+ */
14
+ export interface View {
15
+ /**
16
+ * render the View.
17
+ *
18
+ * If a ViewFrame is provided, it will be used instead of creating a new one
19
+ * internally. In this case the View itself will not be mutated internally.
20
+ */
21
+ render(frame?: ViewFrame): Content;
22
+ /**
23
+ * invalidate this View causing the DOM to be re-rendered.
24
+ *
25
+ * Re-rendering is done by finding the parentNode of the root of the View's
26
+ * content and replacing it with a new version. If an id or a group prefixed
27
+ * by '$' is passed, then only the corresponding content is invalidated.
28
+ *
29
+ * It is an error to invaldiate a View that has not yet been added to the DOM.
30
+ */
31
+ invalidate(target?: WMLId): void;
32
+ /**
33
+ * findById retrives a WMLElement that has been assigned a `wml:id`
34
+ * attribute matching id.
35
+ */
36
+ findById<E extends WMLElement>(id: string): Maybe<E>;
37
+ /**
38
+ * findGroupById retrives an array of WMLElements that have a `wml:group`
39
+ * attribute matching name.
40
+ */
41
+ findGroupById<E extends WMLElement>(name: string): E[];
42
+ }
43
+ /**
44
+ * BaseView used by generated view code.
45
+ *
46
+ * Previously logic was generated by the compiler but now the compiler
47
+ * generates classes that extend this one.
48
+ */
49
+ export declare class BaseView implements View {
50
+ context: object;
51
+ renderer: Renderer;
52
+ frame: ViewFrame;
53
+ constructor(context: object, renderer: Renderer, frame?: ViewFrame);
54
+ findById<E extends WMLElement>(id: string): Maybe<E>;
55
+ findGroupById<E extends WMLElement>(name: string): E[];
56
+ invalidate(id?: WMLId): void;
57
+ render(frame?: ViewFrame): Content;
58
+ }
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BaseView = void 0;
4
+ const frame_1 = require("./frame");
5
+ /**
6
+ * BaseView used by generated view code.
7
+ *
8
+ * Previously logic was generated by the compiler but now the compiler
9
+ * generates classes that extend this one.
10
+ */
11
+ class BaseView {
12
+ constructor(context, renderer, frame = new frame_1.ViewFrame()) {
13
+ this.context = context;
14
+ this.renderer = renderer;
15
+ this.frame = frame;
16
+ }
17
+ findById(id) {
18
+ return this.frame
19
+ .findById(id)
20
+ .map((ent) => (ent.widget ?? ent.node));
21
+ }
22
+ findGroupById(name) {
23
+ return (this.frame.findByGroup(name).map((entry) => entry.widget ?? entry.node));
24
+ }
25
+ invalidate(id) {
26
+ let { frame } = this;
27
+ if (frame.tree == null || frame.tree.parentNode == null)
28
+ return console.warn("invalidate(): cannot invalidate this view, it has no parent node!");
29
+ if (id) {
30
+ let next = this.renderer(new frame_1.ViewFrame());
31
+ if (id[0] === "$")
32
+ frame.replaceByGroup(next, id.slice(1));
33
+ else
34
+ frame.replaceById(next, id);
35
+ }
36
+ else {
37
+ frame.tree.parentNode.replaceChild(this.render(), frame.tree);
38
+ }
39
+ }
40
+ render(frame) {
41
+ if (frame)
42
+ return this.renderer(frame).tree;
43
+ this.frame = this.renderer(new frame_1.ViewFrame());
44
+ return this.frame.tree;
45
+ }
46
+ }
47
+ exports.BaseView = BaseView;
48
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;AAGA,mCAA2C;AA8C3C;;;;;GAKG;AACH,MAAa,QAAQ;IACnB,YACS,OAAe,EACf,QAAkB,EAClB,QAAQ,IAAI,iBAAS,EAAE;QAFvB,YAAO,GAAP,OAAO,CAAQ;QACf,aAAQ,GAAR,QAAQ,CAAU;QAClB,UAAK,GAAL,KAAK,CAAkB;IAC7B,CAAC;IAEJ,QAAQ,CAAuB,EAAU;QACvC,OAAO,IAAI,CAAC,KAAK;aACd,QAAQ,CAAC,EAAE,CAAC;aACZ,GAAG,CAAC,CAAC,GAAU,EAAE,EAAE,CAAI,CAAC,GAAG,CAAC,MAAM,IAAI,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC;IACtD,CAAC;IAED,aAAa,CAAuB,IAAY;QAC9C,OAAY,CACV,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,IAAI,CAAC,CACxE,CAAC;IACJ,CAAC;IAED,UAAU,CAAC,EAAU;QACnB,IAAI,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC;QAErB,IAAI,KAAK,CAAC,IAAI,IAAI,IAAI,IAAI,KAAK,CAAC,IAAI,CAAC,UAAU,IAAI,IAAI;YACrD,OAAO,OAAO,CAAC,IAAI,CACjB,mEAAmE,CACpE,CAAC;QAEJ,IAAI,EAAE,EAAE,CAAC;YACP,IAAI,IAAI,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,iBAAS,EAAE,CAAC,CAAC;YAC1C,IAAI,EAAE,CAAC,CAAC,CAAC,KAAK,GAAG;gBAAE,KAAK,CAAC,cAAc,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;;gBACtD,KAAK,CAAC,WAAW,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;QACnC,CAAC;aAAM,CAAC;YACN,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,YAAY,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;QAChE,CAAC;IACH,CAAC;IAED,MAAM,CAAC,KAAiB;QACtB,IAAI,KAAK;YAAE,OAAgB,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC;QACrD,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,iBAAS,EAAE,CAAC,CAAC;QAC5C,OAAgB,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC;IAClC,CAAC;CACF;AAzCD,4BAyCC"}
@@ -0,0 +1,97 @@
1
+ import { Maybe } from "@quenk/noni/lib/data/maybe";
2
+
3
+ import { Content, WMLElement, WMLId } from "..";
4
+ import { Entry, ViewFrame } from "./frame";
5
+
6
+ /**
7
+ * Renderer is a function that builds up a ViewFrame on behalf of the view.
8
+ */
9
+ export type Renderer = (frame: ViewFrame) => ViewFrame;
10
+
11
+ /**
12
+ * View instances are compiled from wml template files.
13
+ *
14
+ * They provide an api for rendering user interfaces and
15
+ * querying individual objects(WMLElement) it is made of.
16
+ */
17
+ export interface View {
18
+ /**
19
+ * render the View.
20
+ *
21
+ * If a ViewFrame is provided, it will be used instead of creating a new one
22
+ * internally. In this case the View itself will not be mutated internally.
23
+ */
24
+ render(frame?: ViewFrame): Content;
25
+
26
+ /**
27
+ * invalidate this View causing the DOM to be re-rendered.
28
+ *
29
+ * Re-rendering is done by finding the parentNode of the root of the View's
30
+ * content and replacing it with a new version. If an id or a group prefixed
31
+ * by '$' is passed, then only the corresponding content is invalidated.
32
+ *
33
+ * It is an error to invaldiate a View that has not yet been added to the DOM.
34
+ */
35
+ invalidate(target?: WMLId): void;
36
+
37
+ /**
38
+ * findById retrives a WMLElement that has been assigned a `wml:id`
39
+ * attribute matching id.
40
+ */
41
+ findById<E extends WMLElement>(id: string): Maybe<E>;
42
+
43
+ /**
44
+ * findGroupById retrives an array of WMLElements that have a `wml:group`
45
+ * attribute matching name.
46
+ */
47
+ findGroupById<E extends WMLElement>(name: string): E[];
48
+ }
49
+
50
+ /**
51
+ * BaseView used by generated view code.
52
+ *
53
+ * Previously logic was generated by the compiler but now the compiler
54
+ * generates classes that extend this one.
55
+ */
56
+ export class BaseView implements View {
57
+ constructor(
58
+ public context: object,
59
+ public renderer: Renderer,
60
+ public frame = new ViewFrame(),
61
+ ) {}
62
+
63
+ findById<E extends WMLElement>(id: string): Maybe<E> {
64
+ return this.frame
65
+ .findById(id)
66
+ .map((ent: Entry) => <E>(ent.widget ?? ent.node));
67
+ }
68
+
69
+ findGroupById<E extends WMLElement>(name: string): E[] {
70
+ return <E[]>(
71
+ this.frame.findByGroup(name).map((entry) => entry.widget ?? entry.node)
72
+ );
73
+ }
74
+
75
+ invalidate(id?: WMLId): void {
76
+ let { frame } = this;
77
+
78
+ if (frame.tree == null || frame.tree.parentNode == null)
79
+ return console.warn(
80
+ "invalidate(): cannot invalidate this view, it has no parent node!",
81
+ );
82
+
83
+ if (id) {
84
+ let next = this.renderer(new ViewFrame());
85
+ if (id[0] === "$") frame.replaceByGroup(next, id.slice(1));
86
+ else frame.replaceById(next, id);
87
+ } else {
88
+ frame.tree.parentNode.replaceChild(this.render(), frame.tree);
89
+ }
90
+ }
91
+
92
+ render(frame?: ViewFrame): Content {
93
+ if (frame) return <Content>this.renderer(frame).tree;
94
+ this.frame = this.renderer(new ViewFrame());
95
+ return <Content>this.frame.tree;
96
+ }
97
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quenk/wml",
3
- "version": "2.13.10",
3
+ "version": "2.14.0",
4
4
  "description": "(WML) is a DSL for describing user interfaces in web applications.",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {
@@ -19,11 +19,12 @@
19
19
  "@quenk/test": "^2.4.0",
20
20
  "@types/docopt": "^0.6.31",
21
21
  "@types/mocha": "^8.2.2",
22
- "@types/node": "^15.12.2",
22
+ "@types/node": "^24.3.0",
23
23
  "jison-gho": "^0.6.1-216",
24
24
  "mocha": "^9.0.0",
25
+ "prettier": "^3.5.3",
25
26
  "ts-node": "^10.5.0",
26
- "typescript": "^5.0.4"
27
+ "typescript": "^5.9.2"
27
28
  },
28
29
  "dependencies": {
29
30
  "@quenk/noni": "^1.40.14",
package/lib/dom.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"dom.js","sourceRoot":"","sources":["dom.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;AAEH,wDAAqE;AACrE,oDAAuE;AAEvE,MAAM,OAAO,GAAG,iBAAiB,CAAC;AAElC,MAAM,YAAY,GAA8B;IAE5C,GAAG,EAAE,SAAS;IAEd,GAAG,EAAE,SAAS;IAEd,GAAG,EAAE,SAAS;IAEd,GAAG,EAAE,SAAS;IAEd,GAAG,EAAE,SAAS;IAEd,QAAQ,EAAE,SAAS;IAEnB,QAAQ,EAAE,SAAS;IAEnB,QAAQ,EAAE,SAAS;CAEtB,CAAA;AAED,MAAM,aAAa,GAAG,IAAI,MAAM,CAAC,IAAI,IAAA,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