@jesscss/plugin-less-compat 2.0.0-alpha.5 → 2.0.0-alpha.7
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 +3 -2
- package/lib/index.cjs +844 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.js +800 -9
- package/lib/less-adapter.cjs +216 -0
- package/lib/less-adapter.js +181 -0
- package/lib/less-compat-structures.cjs +378 -0
- package/lib/less-compat-structures.d.ts +2 -2
- package/lib/less-compat-structures.js +367 -512
- package/lib/nodes/at-rule.d.ts +2 -6
- package/lib/nodes/attribute-selector.d.ts +2 -6
- package/lib/nodes/call.d.ts +2 -6
- package/lib/nodes/color.d.ts +1 -5
- package/lib/nodes/combinator.d.ts +1 -5
- package/lib/nodes/comment.d.ts +1 -5
- package/lib/nodes/condition.d.ts +2 -6
- package/lib/nodes/declaration.d.ts +2 -6
- package/lib/nodes/dimension.d.ts +1 -5
- package/lib/nodes/expression.d.ts +2 -6
- package/lib/nodes/extend.d.ts +1 -5
- package/lib/nodes/import.d.ts +2 -6
- package/lib/nodes/keyword.d.ts +1 -5
- package/lib/nodes/list.d.ts +2 -5
- package/lib/nodes/mixin.d.ts +2 -6
- package/lib/nodes/negative.d.ts +2 -6
- package/lib/nodes/operation.d.ts +2 -6
- package/lib/nodes/paren.d.ts +2 -6
- package/lib/nodes/quoted.d.ts +1 -5
- package/lib/nodes/reference.d.ts +1 -8
- package/lib/nodes/ruleset.d.ts +2 -6
- package/lib/nodes/selector.d.ts +2 -7
- package/lib/nodes/sequence.d.ts +2 -9
- package/lib/nodes/url.d.ts +1 -5
- package/lib/nodes/var-declaration.d.ts +2 -6
- package/lib/plugin.d.ts +44 -16
- package/lib/transform/adapter.d.ts +31 -0
- package/lib/transform/index.cjs +13 -0
- package/lib/transform/index.d.ts +1 -1
- package/lib/transform/index.js +3 -8
- package/lib/transform/less-adapter.d.ts +29 -0
- package/lib/transform.cjs +1045 -0
- package/lib/transform.js +1015 -0
- package/lib/types.d.ts +153 -28
- package/package.json +13 -12
- package/lib/index.js.map +0 -1
- package/lib/less-compat-structures.js.map +0 -1
- package/lib/nodes/at-rule.js +0 -72
- package/lib/nodes/at-rule.js.map +0 -1
- package/lib/nodes/attribute-selector.js +0 -54
- package/lib/nodes/attribute-selector.js.map +0 -1
- package/lib/nodes/call.js +0 -83
- package/lib/nodes/call.js.map +0 -1
- package/lib/nodes/color.js +0 -57
- package/lib/nodes/color.js.map +0 -1
- package/lib/nodes/combinator.js +0 -34
- package/lib/nodes/combinator.js.map +0 -1
- package/lib/nodes/comment.js +0 -41
- package/lib/nodes/comment.js.map +0 -1
- package/lib/nodes/condition.js +0 -60
- package/lib/nodes/condition.js.map +0 -1
- package/lib/nodes/declaration.js +0 -81
- package/lib/nodes/declaration.js.map +0 -1
- package/lib/nodes/dimension.js +0 -47
- package/lib/nodes/dimension.js.map +0 -1
- package/lib/nodes/expression.js +0 -44
- package/lib/nodes/expression.js.map +0 -1
- package/lib/nodes/extend.js +0 -57
- package/lib/nodes/extend.js.map +0 -1
- package/lib/nodes/import.js +0 -63
- package/lib/nodes/import.js.map +0 -1
- package/lib/nodes/index.js +0 -308
- package/lib/nodes/index.js.map +0 -1
- package/lib/nodes/keyword.js +0 -36
- package/lib/nodes/keyword.js.map +0 -1
- package/lib/nodes/list.js +0 -150
- package/lib/nodes/list.js.map +0 -1
- package/lib/nodes/mixin.js +0 -62
- package/lib/nodes/mixin.js.map +0 -1
- package/lib/nodes/negative.js +0 -42
- package/lib/nodes/negative.js.map +0 -1
- package/lib/nodes/operation.js +0 -63
- package/lib/nodes/operation.js.map +0 -1
- package/lib/nodes/paren.js +0 -42
- package/lib/nodes/paren.js.map +0 -1
- package/lib/nodes/quoted.js +0 -57
- package/lib/nodes/quoted.js.map +0 -1
- package/lib/nodes/reference.js +0 -80
- package/lib/nodes/reference.js.map +0 -1
- package/lib/nodes/ruleset.js +0 -108
- package/lib/nodes/ruleset.js.map +0 -1
- package/lib/nodes/selector.js +0 -226
- package/lib/nodes/selector.js.map +0 -1
- package/lib/nodes/sequence.js +0 -75
- package/lib/nodes/sequence.js.map +0 -1
- package/lib/nodes/url.js +0 -42
- package/lib/nodes/url.js.map +0 -1
- package/lib/nodes/var-declaration.js +0 -60
- package/lib/nodes/var-declaration.js.map +0 -1
- package/lib/plugin-utils.js +0 -100
- package/lib/plugin-utils.js.map +0 -1
- package/lib/plugin.js +0 -1027
- package/lib/plugin.js.map +0 -1
- package/lib/transform/from-less.js +0 -170
- package/lib/transform/from-less.js.map +0 -1
- package/lib/transform/index.js.map +0 -1
- package/lib/transform/proxy.d.ts +0 -32
- package/lib/transform/proxy.js +0 -138
- package/lib/transform/proxy.js.map +0 -1
- package/lib/transform/to-less.js +0 -128
- package/lib/transform/to-less.js.map +0 -1
- package/lib/transform/type-map.js +0 -105
- package/lib/transform/type-map.js.map +0 -1
- package/lib/types.js +0 -5
- package/lib/types.js.map +0 -1
package/lib/nodes/index.js
DELETED
|
@@ -1,308 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Node transformer registry
|
|
3
|
-
* Maps Jess node types to their Less transformation functions
|
|
4
|
-
*/
|
|
5
|
-
import { transformRulesetToLess } from './ruleset.js';
|
|
6
|
-
import { transformDeclarationToLess } from './declaration.js';
|
|
7
|
-
import { transformMixinToLess } from './mixin.js';
|
|
8
|
-
import { transformDimensionToLess } from './dimension.js';
|
|
9
|
-
import { transformColorToLess } from './color.js';
|
|
10
|
-
import { transformOperationToLess } from './operation.js';
|
|
11
|
-
import { transformExpressionToLess } from './expression.js';
|
|
12
|
-
import { transformSequenceToLess } from './sequence.js';
|
|
13
|
-
import { transformQuotedToLess } from './quoted.js';
|
|
14
|
-
import { transformUrlToLess } from './url.js';
|
|
15
|
-
import { transformCommentToLess } from './comment.js';
|
|
16
|
-
import { transformAtRuleToLess } from './at-rule.js';
|
|
17
|
-
import { transformImportToLess } from './import.js';
|
|
18
|
-
import { transformExtendToLess } from './extend.js';
|
|
19
|
-
import { transformConditionToLess } from './condition.js';
|
|
20
|
-
import { transformParenToLess } from './paren.js';
|
|
21
|
-
import { transformNegativeToLess } from './negative.js';
|
|
22
|
-
import { transformListToLess } from './list.js';
|
|
23
|
-
import { transformVarDeclarationToLess } from './var-declaration.js';
|
|
24
|
-
import { transformKeywordToLess } from './keyword.js';
|
|
25
|
-
import { transformCombinatorToLess } from './combinator.js';
|
|
26
|
-
import { transformAttributeSelectorToLess } from './attribute-selector.js';
|
|
27
|
-
import { transformCallToLess } from './call.js';
|
|
28
|
-
import { transformSelectorToLess } from './selector.js';
|
|
29
|
-
import { transformReferenceToLess } from './reference.js';
|
|
30
|
-
// Type guards for specific node types
|
|
31
|
-
export function isRuleset(node) {
|
|
32
|
-
return node.type === 'Ruleset';
|
|
33
|
-
}
|
|
34
|
-
export function isDeclaration(node) {
|
|
35
|
-
return node.type === 'Declaration';
|
|
36
|
-
}
|
|
37
|
-
export function isMixin(node) {
|
|
38
|
-
return node.type === 'Mixin';
|
|
39
|
-
}
|
|
40
|
-
export function isDimension(node) {
|
|
41
|
-
return node.type === 'Dimension';
|
|
42
|
-
}
|
|
43
|
-
export function isNum(node) {
|
|
44
|
-
return node.type === 'Num';
|
|
45
|
-
}
|
|
46
|
-
export function isColor(node) {
|
|
47
|
-
return node.type === 'Color';
|
|
48
|
-
}
|
|
49
|
-
export function isOperation(node) {
|
|
50
|
-
return node.type === 'Operation';
|
|
51
|
-
}
|
|
52
|
-
export function isExpression(node) {
|
|
53
|
-
return node.type === 'Expression';
|
|
54
|
-
}
|
|
55
|
-
export function isSequence(node) {
|
|
56
|
-
return node.type === 'Sequence';
|
|
57
|
-
}
|
|
58
|
-
export function isQuoted(node) {
|
|
59
|
-
return node.type === 'Quoted';
|
|
60
|
-
}
|
|
61
|
-
export function isUrl(node) {
|
|
62
|
-
return node.type === 'Url';
|
|
63
|
-
}
|
|
64
|
-
export function isComment(node) {
|
|
65
|
-
return node.type === 'Comment';
|
|
66
|
-
}
|
|
67
|
-
export function isAtRule(node) {
|
|
68
|
-
return node.type === 'AtRule';
|
|
69
|
-
}
|
|
70
|
-
export function isStyleImport(node) {
|
|
71
|
-
return node.type === 'StyleImport';
|
|
72
|
-
}
|
|
73
|
-
export function isExtend(node) {
|
|
74
|
-
return node.type === 'Extend';
|
|
75
|
-
}
|
|
76
|
-
export function isCondition(node) {
|
|
77
|
-
return node.type === 'Condition';
|
|
78
|
-
}
|
|
79
|
-
export function isParen(node) {
|
|
80
|
-
return node.type === 'Paren';
|
|
81
|
-
}
|
|
82
|
-
export function isNegative(node) {
|
|
83
|
-
return node.type === 'Negative';
|
|
84
|
-
}
|
|
85
|
-
export function isList(node) {
|
|
86
|
-
return node.type === 'List';
|
|
87
|
-
}
|
|
88
|
-
export function isVarDeclaration(node) {
|
|
89
|
-
return node.type === 'VarDeclaration';
|
|
90
|
-
}
|
|
91
|
-
export function isKeyword(node) {
|
|
92
|
-
return node.type === 'Keyword';
|
|
93
|
-
}
|
|
94
|
-
export function isCombinator(node) {
|
|
95
|
-
return node.type === 'Combinator';
|
|
96
|
-
}
|
|
97
|
-
export function isAttributeSelector(node) {
|
|
98
|
-
return node.type === 'AttributeSelector';
|
|
99
|
-
}
|
|
100
|
-
export function isCall(node) {
|
|
101
|
-
return node.type === 'Call';
|
|
102
|
-
}
|
|
103
|
-
export function isSelector(node) {
|
|
104
|
-
return node.type === 'SelectorList' || node.type === 'ComplexSelector'
|
|
105
|
-
|| node.type === 'CompoundSelector' || node.type === 'BasicSelector';
|
|
106
|
-
}
|
|
107
|
-
export function isReference(node) {
|
|
108
|
-
return node.type === 'Reference';
|
|
109
|
-
}
|
|
110
|
-
/**
|
|
111
|
-
* Registry of node transformers
|
|
112
|
-
*/
|
|
113
|
-
const transformers = new Map();
|
|
114
|
-
// Register all transformers
|
|
115
|
-
transformers.set('Ruleset', (node, cache) => {
|
|
116
|
-
if (isRuleset(node)) {
|
|
117
|
-
return transformRulesetToLess(node, cache);
|
|
118
|
-
}
|
|
119
|
-
throw new Error(`Expected Ruleset node, got ${node.type}`);
|
|
120
|
-
});
|
|
121
|
-
transformers.set('Declaration', (node, cache) => {
|
|
122
|
-
if (isDeclaration(node)) {
|
|
123
|
-
return transformDeclarationToLess(node, cache);
|
|
124
|
-
}
|
|
125
|
-
throw new Error(`Expected Declaration node, got ${node.type}`);
|
|
126
|
-
});
|
|
127
|
-
transformers.set('Mixin', (node, cache) => {
|
|
128
|
-
if (isMixin(node)) {
|
|
129
|
-
return transformMixinToLess(node, cache);
|
|
130
|
-
}
|
|
131
|
-
throw new Error(`Expected Mixin node, got ${node.type}`);
|
|
132
|
-
});
|
|
133
|
-
transformers.set('Dimension', (node, cache) => {
|
|
134
|
-
if (isDimension(node)) {
|
|
135
|
-
return transformDimensionToLess(node, cache);
|
|
136
|
-
}
|
|
137
|
-
throw new Error(`Expected Dimension node, got ${node.type}`);
|
|
138
|
-
});
|
|
139
|
-
transformers.set('Num', (node, cache) => {
|
|
140
|
-
if (isNum(node)) {
|
|
141
|
-
return transformDimensionToLess(node, cache);
|
|
142
|
-
}
|
|
143
|
-
throw new Error(`Expected Num node, got ${node.type}`);
|
|
144
|
-
});
|
|
145
|
-
transformers.set('Color', (node, cache) => {
|
|
146
|
-
if (isColor(node)) {
|
|
147
|
-
return transformColorToLess(node, cache);
|
|
148
|
-
}
|
|
149
|
-
throw new Error(`Expected Color node, got ${node.type}`);
|
|
150
|
-
});
|
|
151
|
-
transformers.set('Operation', (node, cache) => {
|
|
152
|
-
if (isOperation(node)) {
|
|
153
|
-
return transformOperationToLess(node, cache);
|
|
154
|
-
}
|
|
155
|
-
throw new Error(`Expected Operation node, got ${node.type}`);
|
|
156
|
-
});
|
|
157
|
-
transformers.set('Expression', (node, cache) => {
|
|
158
|
-
if (isExpression(node)) {
|
|
159
|
-
return transformExpressionToLess(node, cache);
|
|
160
|
-
}
|
|
161
|
-
throw new Error(`Expected Expression node, got ${node.type}`);
|
|
162
|
-
});
|
|
163
|
-
transformers.set('Sequence', (node, cache) => {
|
|
164
|
-
if (isSequence(node)) {
|
|
165
|
-
return transformSequenceToLess(node, cache);
|
|
166
|
-
}
|
|
167
|
-
throw new Error(`Expected Sequence node, got ${node.type}`);
|
|
168
|
-
});
|
|
169
|
-
transformers.set('Quoted', (node, cache) => {
|
|
170
|
-
if (isQuoted(node)) {
|
|
171
|
-
return transformQuotedToLess(node, cache);
|
|
172
|
-
}
|
|
173
|
-
throw new Error(`Expected Quoted node, got ${node.type}`);
|
|
174
|
-
});
|
|
175
|
-
transformers.set('Url', (node, cache) => {
|
|
176
|
-
if (isUrl(node)) {
|
|
177
|
-
return transformUrlToLess(node, cache);
|
|
178
|
-
}
|
|
179
|
-
throw new Error(`Expected Url node, got ${node.type}`);
|
|
180
|
-
});
|
|
181
|
-
transformers.set('Comment', (node, cache) => {
|
|
182
|
-
if (isComment(node)) {
|
|
183
|
-
return transformCommentToLess(node, cache);
|
|
184
|
-
}
|
|
185
|
-
throw new Error(`Expected Comment node, got ${node.type}`);
|
|
186
|
-
});
|
|
187
|
-
transformers.set('AtRule', (node, cache) => {
|
|
188
|
-
if (isAtRule(node)) {
|
|
189
|
-
return transformAtRuleToLess(node, cache);
|
|
190
|
-
}
|
|
191
|
-
throw new Error(`Expected AtRule node, got ${node.type}`);
|
|
192
|
-
});
|
|
193
|
-
transformers.set('StyleImport', (node, cache) => {
|
|
194
|
-
if (isStyleImport(node)) {
|
|
195
|
-
return transformImportToLess(node, cache);
|
|
196
|
-
}
|
|
197
|
-
throw new Error(`Expected StyleImport node, got ${node.type}`);
|
|
198
|
-
});
|
|
199
|
-
transformers.set('Extend', (node, cache) => {
|
|
200
|
-
if (isExtend(node)) {
|
|
201
|
-
return transformExtendToLess(node, cache);
|
|
202
|
-
}
|
|
203
|
-
throw new Error(`Expected Extend node, got ${node.type}`);
|
|
204
|
-
});
|
|
205
|
-
transformers.set('Condition', (node, cache) => {
|
|
206
|
-
if (isCondition(node)) {
|
|
207
|
-
return transformConditionToLess(node, cache);
|
|
208
|
-
}
|
|
209
|
-
throw new Error(`Expected Condition node, got ${node.type}`);
|
|
210
|
-
});
|
|
211
|
-
transformers.set('Paren', (node, cache) => {
|
|
212
|
-
if (isParen(node)) {
|
|
213
|
-
return transformParenToLess(node, cache);
|
|
214
|
-
}
|
|
215
|
-
throw new Error(`Expected Paren node, got ${node.type}`);
|
|
216
|
-
});
|
|
217
|
-
transformers.set('Negative', (node, cache) => {
|
|
218
|
-
if (isNegative(node)) {
|
|
219
|
-
return transformNegativeToLess(node, cache);
|
|
220
|
-
}
|
|
221
|
-
throw new Error(`Expected Negative node, got ${node.type}`);
|
|
222
|
-
});
|
|
223
|
-
transformers.set('List', (node, cache) => {
|
|
224
|
-
if (isList(node)) {
|
|
225
|
-
return transformListToLess(node, cache);
|
|
226
|
-
}
|
|
227
|
-
throw new Error(`Expected List node, got ${node.type}`);
|
|
228
|
-
});
|
|
229
|
-
transformers.set('VarDeclaration', (node, cache) => {
|
|
230
|
-
if (isVarDeclaration(node)) {
|
|
231
|
-
return transformVarDeclarationToLess(node, cache);
|
|
232
|
-
}
|
|
233
|
-
throw new Error(`Expected VarDeclaration node, got ${node.type}`);
|
|
234
|
-
});
|
|
235
|
-
transformers.set('Keyword', (node, cache) => {
|
|
236
|
-
if (isKeyword(node)) {
|
|
237
|
-
return transformKeywordToLess(node, cache);
|
|
238
|
-
}
|
|
239
|
-
throw new Error(`Expected Keyword node, got ${node.type}`);
|
|
240
|
-
});
|
|
241
|
-
transformers.set('Combinator', (node, cache) => {
|
|
242
|
-
if (isCombinator(node)) {
|
|
243
|
-
return transformCombinatorToLess(node, cache);
|
|
244
|
-
}
|
|
245
|
-
throw new Error(`Expected Combinator node, got ${node.type}`);
|
|
246
|
-
});
|
|
247
|
-
transformers.set('AttributeSelector', (node, cache) => {
|
|
248
|
-
if (isAttributeSelector(node)) {
|
|
249
|
-
return transformAttributeSelectorToLess(node, cache);
|
|
250
|
-
}
|
|
251
|
-
throw new Error(`Expected AttributeSelector node, got ${node.type}`);
|
|
252
|
-
});
|
|
253
|
-
transformers.set('Call', (node, cache) => {
|
|
254
|
-
if (isCall(node)) {
|
|
255
|
-
return transformCallToLess(node, cache);
|
|
256
|
-
}
|
|
257
|
-
throw new Error(`Expected Call node, got ${node.type}`);
|
|
258
|
-
});
|
|
259
|
-
// Selector types
|
|
260
|
-
transformers.set('SelectorList', (node, cache) => {
|
|
261
|
-
if (isSelector(node)) {
|
|
262
|
-
return transformSelectorToLess(node, cache);
|
|
263
|
-
}
|
|
264
|
-
throw new Error(`Expected Selector node, got ${node.type}`);
|
|
265
|
-
});
|
|
266
|
-
transformers.set('ComplexSelector', (node, cache) => {
|
|
267
|
-
if (isSelector(node)) {
|
|
268
|
-
return transformSelectorToLess(node, cache);
|
|
269
|
-
}
|
|
270
|
-
throw new Error(`Expected Selector node, got ${node.type}`);
|
|
271
|
-
});
|
|
272
|
-
transformers.set('CompoundSelector', (node, cache) => {
|
|
273
|
-
if (isSelector(node)) {
|
|
274
|
-
return transformSelectorToLess(node, cache);
|
|
275
|
-
}
|
|
276
|
-
throw new Error(`Expected Selector node, got ${node.type}`);
|
|
277
|
-
});
|
|
278
|
-
transformers.set('BasicSelector', (node, cache) => {
|
|
279
|
-
if (isSelector(node)) {
|
|
280
|
-
return transformSelectorToLess(node, cache);
|
|
281
|
-
}
|
|
282
|
-
throw new Error(`Expected Selector node, got ${node.type}`);
|
|
283
|
-
});
|
|
284
|
-
transformers.set('Reference', (node, cache) => {
|
|
285
|
-
if (isReference(node)) {
|
|
286
|
-
return transformReferenceToLess(node, cache);
|
|
287
|
-
}
|
|
288
|
-
throw new Error(`Expected Reference node, got ${node.type}`);
|
|
289
|
-
});
|
|
290
|
-
/**
|
|
291
|
-
* Get the transformer for a Jess node type
|
|
292
|
-
*/
|
|
293
|
-
export function getTransformer(nodeType) {
|
|
294
|
-
return transformers.get(nodeType);
|
|
295
|
-
}
|
|
296
|
-
/**
|
|
297
|
-
* Check if a transformer exists for a node type
|
|
298
|
-
*/
|
|
299
|
-
export function hasTransformer(nodeType) {
|
|
300
|
-
return transformers.has(nodeType);
|
|
301
|
-
}
|
|
302
|
-
/**
|
|
303
|
-
* Register a new transformer
|
|
304
|
-
*/
|
|
305
|
-
export function registerTransformer(nodeType, transformer) {
|
|
306
|
-
transformers.set(nodeType, transformer);
|
|
307
|
-
}
|
|
308
|
-
//# sourceMappingURL=index.js.map
|
package/lib/nodes/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/nodes/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AACtD,OAAO,EAAE,0BAA0B,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAClD,OAAO,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAClD,OAAO,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAC5D,OAAO,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AACxD,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AACtD,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAClD,OAAO,EAAE,uBAAu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,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;AAC9D,CAAC,CAAC,CAAC;AAEH,YAAY,CAAC,GAAG,CAAC,eAAe,EAAE,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE;IAChD,IAAI,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;QACrB,OAAO,uBAAuB,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC9C,CAAC;IACD,MAAM,IAAI,KAAK,CAAC,+BAA+B,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;AAC9D,CAAC,CAAC,CAAC;AAEH,YAAY,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE;IAC5C,IAAI,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC;QACtB,OAAO,wBAAwB,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC/C,CAAC;IACD,MAAM,IAAI,KAAK,CAAC,gCAAgC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;AAC/D,CAAC,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,UAAU,cAAc,CAAC,QAAgB;IAC7C,OAAO,YAAY,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AACpC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,cAAc,CAAC,QAAgB;IAC7C,OAAO,YAAY,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AACpC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,mBAAmB,CACjC,QAAgB,EAChB,WAA4B;IAE5B,YAAY,CAAC,GAAG,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAC;AAC1C,CAAC"}
|
package/lib/nodes/keyword.js
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { createLessProxy } from '../transform/proxy.js';
|
|
2
|
-
import { mapJessTypeToLessType } from '../transform/type-map.js';
|
|
3
|
-
import { fromLessNode } from '../transform/from-less.js';
|
|
4
|
-
/**
|
|
5
|
-
* Transform a Jess Keyword to a Less-compatible Keyword
|
|
6
|
-
*/
|
|
7
|
-
export function transformKeywordToLess(jessKeyword, cache) {
|
|
8
|
-
return createLessProxy(jessKeyword, cache, (prop, target) => {
|
|
9
|
-
const keyword = target;
|
|
10
|
-
// Map 'type' property
|
|
11
|
-
if (prop === 'type') {
|
|
12
|
-
return mapJessTypeToLessType(keyword.type);
|
|
13
|
-
}
|
|
14
|
-
// Map 'typeIndex'
|
|
15
|
-
if (prop === 'typeIndex') {
|
|
16
|
-
return undefined;
|
|
17
|
-
}
|
|
18
|
-
// Map 'value' property
|
|
19
|
-
if (prop === 'value') {
|
|
20
|
-
return keyword.value;
|
|
21
|
-
}
|
|
22
|
-
// Map 'accept' method for visitor traversal
|
|
23
|
-
if (prop === 'accept') {
|
|
24
|
-
return function (visitor) {
|
|
25
|
-
const lessKeyword = transformKeywordToLess(keyword, cache);
|
|
26
|
-
const result = visitor.visit(lessKeyword);
|
|
27
|
-
if (result !== lessKeyword) {
|
|
28
|
-
return fromLessNode(result, { cache });
|
|
29
|
-
}
|
|
30
|
-
return keyword;
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
return undefined;
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
//# sourceMappingURL=keyword.js.map
|
package/lib/nodes/keyword.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"keyword.js","sourceRoot":"","sources":["../../src/nodes/keyword.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAGzD;;GAEG;AACH,MAAM,UAAU,sBAAsB,CACpC,WAAoB,EACpB,KAAyB;IAEzB,OAAO,eAAe,CAAC,WAAW,EAAE,KAAK,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE;QAC1D,MAAM,OAAO,GAAG,MAAiB,CAAC;QAElC,sBAAsB;QACtB,IAAI,IAAI,KAAK,MAAM,EAAE,CAAC;YACpB,OAAO,qBAAqB,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAC7C,CAAC;QAED,kBAAkB;QAClB,IAAI,IAAI,KAAK,WAAW,EAAE,CAAC;YACzB,OAAO,SAAS,CAAC;QACnB,CAAC;QAED,uBAAuB;QACvB,IAAI,IAAI,KAAK,OAAO,EAAE,CAAC;YACrB,OAAO,OAAO,CAAC,KAAK,CAAC;QACvB,CAAC;QAED,4CAA4C;QAC5C,IAAI,IAAI,KAAK,QAAQ,EAAE,CAAC;YACtB,OAAO,UAAS,OAAY;gBAC1B,MAAM,WAAW,GAAG,sBAAsB,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;gBAC3D,MAAM,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;gBAC1C,IAAI,MAAM,KAAK,WAAW,EAAE,CAAC;oBAC3B,OAAO,YAAY,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC;gBACzC,CAAC;gBACD,OAAO,OAAO,CAAC;YACjB,CAAC,CAAC;QACJ,CAAC;QAED,OAAO,SAAS,CAAC;IACnB,CAAC,CAAC,CAAC;AACL,CAAC"}
|
package/lib/nodes/list.js
DELETED
|
@@ -1,150 +0,0 @@
|
|
|
1
|
-
import { Node } from '@jesscss/core';
|
|
2
|
-
import { createLessProxy } from '../transform/proxy.js';
|
|
3
|
-
import { toLessNode } from '../transform/to-less.js';
|
|
4
|
-
import { mapJessTypeToLessType } from '../transform/type-map.js';
|
|
5
|
-
/**
|
|
6
|
-
* Transform a Jess List to a Less-compatible Value
|
|
7
|
-
*/
|
|
8
|
-
export function transformListToLess(jessList, cache) {
|
|
9
|
-
return createLessProxy(jessList, cache, (prop, target) => {
|
|
10
|
-
const list = target;
|
|
11
|
-
// Map 'type' property
|
|
12
|
-
if (prop === 'type') {
|
|
13
|
-
return mapJessTypeToLessType(list.type);
|
|
14
|
-
}
|
|
15
|
-
// Map 'typeIndex'
|
|
16
|
-
if (prop === 'typeIndex') {
|
|
17
|
-
return undefined;
|
|
18
|
-
}
|
|
19
|
-
// Get filtered, converted value array (used by multiple properties)
|
|
20
|
-
const getFilteredValue = () => {
|
|
21
|
-
const value = list.value;
|
|
22
|
-
if (Array.isArray(value)) {
|
|
23
|
-
return value
|
|
24
|
-
.map((item) => {
|
|
25
|
-
if (!item) {
|
|
26
|
-
return null; // Mark null/undefined for filtering
|
|
27
|
-
}
|
|
28
|
-
if (item instanceof Node) {
|
|
29
|
-
const lessItem = toLessNode(item, { cache });
|
|
30
|
-
// If toLessNode returns undefined, skip it
|
|
31
|
-
return lessItem || null;
|
|
32
|
-
}
|
|
33
|
-
return item;
|
|
34
|
-
})
|
|
35
|
-
.filter((item) => item !== undefined && item !== null); // Filter out undefined/null
|
|
36
|
-
}
|
|
37
|
-
// Single value - wrap in array (if not undefined/null)
|
|
38
|
-
if (value !== undefined && value !== null) {
|
|
39
|
-
if (value && typeof value === 'object' && 'type' in value) {
|
|
40
|
-
// Check if it's a Node-like object
|
|
41
|
-
const lessValue = toLessNode(value, { cache });
|
|
42
|
-
return lessValue ? [lessValue] : [];
|
|
43
|
-
}
|
|
44
|
-
return [value];
|
|
45
|
-
}
|
|
46
|
-
return [];
|
|
47
|
-
};
|
|
48
|
-
// Map 'value' property (Less Value expects array)
|
|
49
|
-
if (prop === 'value') {
|
|
50
|
-
return getFilteredValue();
|
|
51
|
-
}
|
|
52
|
-
// Intercept 'length' property to return filtered array length
|
|
53
|
-
// Less visitor checks node.length to determine if it's array-like
|
|
54
|
-
if (prop === 'length') {
|
|
55
|
-
return getFilteredValue().length;
|
|
56
|
-
}
|
|
57
|
-
// Intercept numeric indices (array access like node[0], node[1])
|
|
58
|
-
// Less visitor may access node[i] directly when node.length exists
|
|
59
|
-
if (typeof prop === 'string' && /^\d+$/.test(prop)) {
|
|
60
|
-
const filtered = getFilteredValue();
|
|
61
|
-
const index = parseInt(prop, 10);
|
|
62
|
-
return filtered[index];
|
|
63
|
-
}
|
|
64
|
-
// Map 'children' method to return filtered, converted items
|
|
65
|
-
// This prevents undefined items from being accessed when Jess core's accept() calls children()
|
|
66
|
-
// children() is a generator function that yields Node instances
|
|
67
|
-
// CRITICAL: When Jess core's accept() calls children(), it uses getValues(this.value)
|
|
68
|
-
// We need to ensure the value property returns clean items, and children() filters them
|
|
69
|
-
if (prop === 'children') {
|
|
70
|
-
return function* (deep, reverse, includePrePost) {
|
|
71
|
-
// Use the filtered value from our value property getter
|
|
72
|
-
// This ensures we get the same filtered array that the value property returns
|
|
73
|
-
const filteredValue = list.value
|
|
74
|
-
.filter((item) => item !== undefined && item !== null)
|
|
75
|
-
.map((item) => {
|
|
76
|
-
if (item instanceof Node) {
|
|
77
|
-
const lessItem = toLessNode(item, { cache });
|
|
78
|
-
return lessItem || null;
|
|
79
|
-
}
|
|
80
|
-
return item;
|
|
81
|
-
})
|
|
82
|
-
.filter((item) => item !== undefined && item !== null);
|
|
83
|
-
// Handle reverse order if needed
|
|
84
|
-
const itemsToIterate = reverse ? [...filteredValue].reverse() : filteredValue;
|
|
85
|
-
for (const item of itemsToIterate) {
|
|
86
|
-
if (item === undefined || item === null) {
|
|
87
|
-
continue; // Skip undefined/null items (shouldn't happen after filtering, but be safe)
|
|
88
|
-
}
|
|
89
|
-
if (item instanceof Node || (item && typeof item === 'object' && 'type' in item)) {
|
|
90
|
-
// It's a node (either Jess node or Less proxy)
|
|
91
|
-
if (includePrePost) {
|
|
92
|
-
// For now, just yield the item (pre/post handling can be added later if needed)
|
|
93
|
-
yield item;
|
|
94
|
-
}
|
|
95
|
-
else {
|
|
96
|
-
yield item;
|
|
97
|
-
}
|
|
98
|
-
if (deep && item instanceof Node) {
|
|
99
|
-
// Recursively yield children if deep is true
|
|
100
|
-
if (item.children) {
|
|
101
|
-
yield* item.children(deep, reverse, includePrePost);
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
else {
|
|
106
|
-
yield item;
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
};
|
|
110
|
-
}
|
|
111
|
-
// Map 'accept' method for visitor traversal
|
|
112
|
-
if (prop === 'accept') {
|
|
113
|
-
return function (visitor) {
|
|
114
|
-
// Less List's accept() should traverse value items if they exist
|
|
115
|
-
// But we don't call visitor.visit() here to avoid infinite loops
|
|
116
|
-
// The visitor's visit() method will handle traversal
|
|
117
|
-
// If value exists, we should traverse items using visitArray
|
|
118
|
-
const value = list.value;
|
|
119
|
-
if (Array.isArray(value) && value.length > 0) {
|
|
120
|
-
const lessItems = value
|
|
121
|
-
.map((item) => {
|
|
122
|
-
if (item instanceof Node) {
|
|
123
|
-
return toLessNode(item, { cache });
|
|
124
|
-
}
|
|
125
|
-
return item;
|
|
126
|
-
})
|
|
127
|
-
.filter((item) => item !== undefined && item !== null); // Filter out undefined/null
|
|
128
|
-
if (lessItems.length > 0) {
|
|
129
|
-
if (visitor.visitArray) {
|
|
130
|
-
visitor.visitArray(lessItems);
|
|
131
|
-
}
|
|
132
|
-
else {
|
|
133
|
-
// Fallback: call accept on each item if visitArray not available
|
|
134
|
-
for (const lessItem of lessItems) {
|
|
135
|
-
if (lessItem && lessItem.accept) {
|
|
136
|
-
lessItem.accept(visitor);
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
// Return the proxy, not the underlying node, to prevent Less visitor from accessing raw Jess node
|
|
143
|
-
// Get the proxy from cache or create it
|
|
144
|
-
return cache && cache.has(list) ? cache.get(list) : transformListToLess(list, cache);
|
|
145
|
-
};
|
|
146
|
-
}
|
|
147
|
-
return undefined;
|
|
148
|
-
});
|
|
149
|
-
}
|
|
150
|
-
//# sourceMappingURL=list.js.map
|
package/lib/nodes/list.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"list.js","sourceRoot":"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,CAAC;4BACH,CAAC;wBACH,CAAC;oBACH,CAAC;gBACH,CAAC;gBACD,kGAAkG;gBAClG,wCAAwC;gBACxC,OAAO,KAAK,IAAI,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,mBAAmB,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;YACvF,CAAC,CAAC;QACJ,CAAC;QAED,OAAO,SAAS,CAAC;IACnB,CAAC,CAAC,CAAC;AACL,CAAC"}
|
package/lib/nodes/mixin.js
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { Node } from '@jesscss/core';
|
|
2
|
-
import { createLessProxy } from '../transform/proxy.js';
|
|
3
|
-
import { toLessNode } from '../transform/to-less.js';
|
|
4
|
-
import { mapJessTypeToLessType } from '../transform/type-map.js';
|
|
5
|
-
import { fromLessNode } from '../transform/from-less.js';
|
|
6
|
-
/**
|
|
7
|
-
* Transform a Jess Mixin to a Less-compatible MixinDefinition
|
|
8
|
-
*/
|
|
9
|
-
export function transformMixinToLess(jessMixin, cache) {
|
|
10
|
-
return createLessProxy(jessMixin, cache, (prop, target) => {
|
|
11
|
-
const mixin = target;
|
|
12
|
-
// Map 'type' property
|
|
13
|
-
if (prop === 'type') {
|
|
14
|
-
return mapJessTypeToLessType(mixin.type);
|
|
15
|
-
}
|
|
16
|
-
// Map 'typeIndex'
|
|
17
|
-
if (prop === 'typeIndex') {
|
|
18
|
-
return undefined;
|
|
19
|
-
}
|
|
20
|
-
// Map 'name' property
|
|
21
|
-
if (prop === 'name') {
|
|
22
|
-
return mixin.value.name;
|
|
23
|
-
}
|
|
24
|
-
// Map 'params' property
|
|
25
|
-
if (prop === 'params') {
|
|
26
|
-
const params = mixin.value.params;
|
|
27
|
-
if (params instanceof Node) {
|
|
28
|
-
return toLessNode(params, { cache });
|
|
29
|
-
}
|
|
30
|
-
return params;
|
|
31
|
-
}
|
|
32
|
-
// Map 'rules' property
|
|
33
|
-
if (prop === 'rules') {
|
|
34
|
-
const rules = mixin.value.rules;
|
|
35
|
-
if (rules && rules.value) {
|
|
36
|
-
return rules.value.map((r) => toLessNode(r, { cache }));
|
|
37
|
-
}
|
|
38
|
-
return [];
|
|
39
|
-
}
|
|
40
|
-
// Map 'condition' property (from guard)
|
|
41
|
-
if (prop === 'condition') {
|
|
42
|
-
const guard = mixin.value.guard;
|
|
43
|
-
if (guard instanceof Node) {
|
|
44
|
-
return toLessNode(guard, { cache });
|
|
45
|
-
}
|
|
46
|
-
return guard;
|
|
47
|
-
}
|
|
48
|
-
// Map 'accept' method for visitor traversal
|
|
49
|
-
if (prop === 'accept') {
|
|
50
|
-
return function (visitor) {
|
|
51
|
-
const lessMixin = transformMixinToLess(mixin, cache);
|
|
52
|
-
const result = visitor.visit(lessMixin);
|
|
53
|
-
if (result !== lessMixin) {
|
|
54
|
-
return fromLessNode(result, { cache });
|
|
55
|
-
}
|
|
56
|
-
return mixin;
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
return undefined;
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
//# sourceMappingURL=mixin.js.map
|
package/lib/nodes/mixin.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mixin.js","sourceRoot":"","sources":["../../src/nodes/mixin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,IAAI,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAGzD;;GAEG;AACH,MAAM,UAAU,oBAAoB,CAClC,SAAgB,EAChB,KAAyB;IAEzB,OAAO,eAAe,CAAC,SAAS,EAAE,KAAK,EA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EAAE,EAAE,KAAK,EAAE,CAAC,CAAC;YACtC,CAAC;YACD,OAAO,KAAK,CAAC;QACf,CAAC;QAED,4CAA4C;QAC5C,IAAI,IAAI,KAAK,QAAQ,EAAE,CAAC;YACtB,OAAO,UAAS,OAAY;gBAC1B,MAAM,SAAS,GAAG,oBAAoB,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;gBACrD,MAAM,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;gBACxC,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;oBACzB,OAAO,YAAY,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC;gBACzC,CAAC;gBACD,OAAO,KAAK,CAAC;YACf,CAAC,CAAC;QACJ,CAAC;QAED,OAAO,SAAS,CAAC;IACnB,CAAC,CAAC,CAAC;AACL,CAAC"}
|
package/lib/nodes/negative.js
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { Node } from '@jesscss/core';
|
|
2
|
-
import { createLessProxy } from '../transform/proxy.js';
|
|
3
|
-
import { toLessNode } from '../transform/to-less.js';
|
|
4
|
-
import { mapJessTypeToLessType } from '../transform/type-map.js';
|
|
5
|
-
import { fromLessNode } from '../transform/from-less.js';
|
|
6
|
-
/**
|
|
7
|
-
* Transform a Jess Negative to a Less-compatible Negative
|
|
8
|
-
*/
|
|
9
|
-
export function transformNegativeToLess(jessNegative, cache) {
|
|
10
|
-
return createLessProxy(jessNegative, cache, (prop, target) => {
|
|
11
|
-
const negative = target;
|
|
12
|
-
// Map 'type' property
|
|
13
|
-
if (prop === 'type') {
|
|
14
|
-
return mapJessTypeToLessType(negative.type);
|
|
15
|
-
}
|
|
16
|
-
// Map 'typeIndex'
|
|
17
|
-
if (prop === 'typeIndex') {
|
|
18
|
-
return undefined;
|
|
19
|
-
}
|
|
20
|
-
// Map 'value' property
|
|
21
|
-
if (prop === 'value') {
|
|
22
|
-
const value = negative.value;
|
|
23
|
-
if (value instanceof Node) {
|
|
24
|
-
return toLessNode(value, { cache });
|
|
25
|
-
}
|
|
26
|
-
return value;
|
|
27
|
-
}
|
|
28
|
-
// Map 'accept' method for visitor traversal
|
|
29
|
-
if (prop === 'accept') {
|
|
30
|
-
return function (visitor) {
|
|
31
|
-
const lessNegative = transformNegativeToLess(negative, cache);
|
|
32
|
-
const result = visitor.visit(lessNegative);
|
|
33
|
-
if (result !== lessNegative) {
|
|
34
|
-
return fromLessNode(result, { cache });
|
|
35
|
-
}
|
|
36
|
-
return negative;
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
return undefined;
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
//# sourceMappingURL=negative.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"negative.js","sourceRoot":"","sources":["../../src/nodes/negative.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,IAAI,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAGzD;;GAEG;AACH,MAAM,UAAU,uBAAuB,CACrC,YAAsB,EACtB,KAAyB;IAEzB,OAAO,eAAe,CAAC,YAAY,EAAE,KAAK,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE;QAC3D,MAAM,QAAQ,GAAG,MAAkB,CAAC;QAEpC,sBAAsB;QACtB,IAAI,IAAI,KAAK,MAAM,EAAE,CAAC;YACpB,OAAO,qBAAqB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QAC9C,CAAC;QAED,kBAAkB;QAClB,IAAI,IAAI,KAAK,WAAW,EAAE,CAAC;YACzB,OAAO,SAAS,CAAC;QACnB,CAAC;QAED,uBAAuB;QACvB,IAAI,IAA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