@plumeria/eslint-plugin 0.19.1 → 0.19.3

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.
@@ -0,0 +1,2073 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.validateValues = void 0;
4
+ const validData_1 = require("../util/validData");
5
+ const unitData_1 = require("../util/unitData");
6
+ const colorData_1 = require("../util/colorData");
7
+ const place_1 = require("../util/place");
8
+ const globalValues = ['inherit', 'initial', 'revert', 'revert-layer', 'unset'];
9
+ const lengthValueProperties = [
10
+ 'width',
11
+ 'maxWidth',
12
+ 'minWidth',
13
+ 'height',
14
+ 'maxHeight',
15
+ 'minHeight',
16
+ 'blockSize',
17
+ 'columnWidth',
18
+ 'flexBasis',
19
+ 'inlineSize',
20
+ 'background',
21
+ 'top',
22
+ 'bottom',
23
+ 'left',
24
+ 'right',
25
+ 'marginTop',
26
+ 'marginBottom',
27
+ 'marginLeft',
28
+ 'marginRight',
29
+ 'paddingTop',
30
+ 'paddingBottom',
31
+ 'paddingLeft',
32
+ 'paddingRight',
33
+ 'fontSize',
34
+ 'lineHeight',
35
+ 'insetBlockEnd',
36
+ 'insetBlockStart',
37
+ 'insetInlineEnd',
38
+ 'insetInlineStart',
39
+ 'marginBlockEnd',
40
+ 'marginBlockStart',
41
+ 'paddingBlockEnd',
42
+ 'paddingBlockStart',
43
+ 'paddingInlineEnd',
44
+ 'paddingInlineStart',
45
+ 'marginInlineEnd',
46
+ 'marginInlineStart',
47
+ 'maxBlockSize',
48
+ 'minBlockSize',
49
+ 'maxInlineSize',
50
+ 'minInlineSize',
51
+ 'offsetDistance',
52
+ 'borderTopWidth',
53
+ 'borderBottomWidth',
54
+ 'borderLeftWidth',
55
+ 'borderRightWidth',
56
+ 'borderBlockStartWidth',
57
+ 'borderBlockEndWidth',
58
+ 'borderInlineStartWidth',
59
+ 'borderInlineEndWidth',
60
+ 'columnRuleWidth',
61
+ 'outlineOffset',
62
+ 'perspective',
63
+ 'letterSpacing',
64
+ 'wordSpacing',
65
+ 'tabSize',
66
+ 'columnGap',
67
+ 'rowGap',
68
+ 'rx',
69
+ 'ry',
70
+ 'scrollMarginBlockEnd',
71
+ 'scrollMarginBlockStart',
72
+ 'scrollMarginInlineEnd',
73
+ 'scrollMarginInlineStart',
74
+ 'scrollMarginBottom',
75
+ 'scrollMarginLeft',
76
+ 'scrollMarginRight',
77
+ 'scrollMarginTop',
78
+ 'scrollPaddingBlockEnd',
79
+ 'scrollPaddingBlockStart',
80
+ 'scrollPaddingInlineEnd',
81
+ 'scrollPaddingInlineStart',
82
+ 'scrollPaddingBottom',
83
+ 'scrollPaddingLeft',
84
+ 'scrollPaddingRight',
85
+ 'scrollPaddingTop',
86
+ 'shapeMargin',
87
+ 'strokeDashoffset',
88
+ 'strokeWidth',
89
+ 'textDecorationThickness',
90
+ 'textUnderlineOffset',
91
+ 'verticalAlign',
92
+ 'x',
93
+ 'y',
94
+ 'zoom',
95
+ ];
96
+ const fitContentString = 'fit-content\\([^()]*\\)';
97
+ const minString = 'min\\([^()]*\\)';
98
+ const maxString = 'max\\([^()]*\\)';
99
+ const minmaxString = 'minmax\\([^()]*\\)';
100
+ const dashedIdentString = '--[a-zA-Z_][a-zA-Z0-9_-]*';
101
+ const varString = `var\\(${dashedIdentString}(,\\s*[^\\)]+)?\\)`;
102
+ const varRegex = new RegExp(`^(${varString})$`);
103
+ const pureNumber = `(-?\\d+(\\.\\d+)?)`;
104
+ const numberPattern = `(${pureNumber}|${varString})`;
105
+ const percentagePattern = `${pureNumber}%`;
106
+ const pureInteger = `(-?\\d+)`;
107
+ const integerPattern = `(${pureInteger}|${varString})`;
108
+ const lengthPattern = `0|${pureNumber}(?:${unitData_1.unitData.join('|')})`;
109
+ const pureAngle = `${pureNumber}(deg|rad|grad|turn)`;
110
+ const anglePattern = `(${pureAngle}|${varString})`;
111
+ const calcString = 'calc\\(.*?\\)';
112
+ const anchorString = 'anchor\\([^()]*\\)';
113
+ const anchorSizeString = 'anchor-size\\([^()]*\\)';
114
+ const clampString = 'clamp\\([^()]*\\)';
115
+ const gradientString = '(?:repeating-)?(?:linear|radial|conic)-gradient\\(.*\\)';
116
+ const urlString = 'url\\([^\\)]+\\)';
117
+ const imageSetString = 'image-set\\([^\\)]+\\)';
118
+ const attrString = 'attr\\([^\\)]+\\)';
119
+ const addString = `add\\(${integerPattern}\\)`;
120
+ const counterString = 'counter\\([^\\)]+\\)';
121
+ const countersString = 'counters\\([^\\)]+\\)';
122
+ const doubleQuoteString = '"[^"]*"';
123
+ const singleQuoteString = "'[^']*'";
124
+ const stringString = `(?:${doubleQuoteString}|${singleQuoteString})`;
125
+ const repeatString = 'repeat\\([^\\)]+\\)';
126
+ const colorSpaces = 'srgb|srgb-linear|display-p3|a98-rgb|prophoto-rgb|rec2020|lab|oklab|xyz|xyz-d50|xyz-d65|hsl|hwb|lch|oklch';
127
+ const hueModifiers = '(?:\\s+(?:shorter|longer|increasing|decreasing)\\s+hue)?';
128
+ const colorSpacePattern = `in\\s+(?:${colorSpaces})${hueModifiers}`;
129
+ function buildPaletteMixPattern() {
130
+ const lastArgPattern = `(?:(${dashedIdentString}|${varString}))(?:\\s+(${percentagePattern}|${varString}))?`;
131
+ return `palette-mix\\(${colorSpacePattern},\\s*${lastArgPattern},\\s*${lastArgPattern}\\)`;
132
+ }
133
+ const paletteMixString = buildPaletteMixPattern();
134
+ function buildColorMixPattern() {
135
+ const lastArgPattern = `(${colorData_1.colorValue}|${varString})(?:\\s+(${percentagePattern}|${varString}))?`;
136
+ return `color-mix\\(${colorSpacePattern},\\s*${lastArgPattern},\\s*${lastArgPattern}\\)`;
137
+ }
138
+ const colorMixString = buildColorMixPattern();
139
+ const lightDarkValue = `${colorData_1.colorValue}|${colorMixString}|${varString}`;
140
+ const lightDarkString = `light-dark\\((?:${lightDarkValue}),\\s*(?:${lightDarkValue})\\)`;
141
+ const colorRegex = new RegExp(`^(${colorData_1.colorValue}|${colorMixString}|${lightDarkString}|${varString})$`);
142
+ const colorSource = colorRegex.source.slice(1, -1);
143
+ const imageRegex = new RegExp(`^(${gradientString}|${urlString})$`);
144
+ const urlRegex = new RegExp(`^(${urlString})$`);
145
+ const sliceValuePattern = '^(?:-?\\d+(?:\\.\\d+)?%?|fill)(?:\\s+(?:-?\\d+(?:\\.\\d+)?%?|fill)){0,3}$';
146
+ const sliceRegex = new RegExp(`^(${sliceValuePattern})$`);
147
+ const otherGroupProperties = [
148
+ 'fontWeight',
149
+ 'opacity',
150
+ 'stopOpacity',
151
+ 'strokeOpacity',
152
+ 'flexGrow',
153
+ 'flexShrink',
154
+ ];
155
+ const integerGroupProperties = [
156
+ 'columnCount',
157
+ 'zIndex',
158
+ 'order',
159
+ 'orphans',
160
+ 'widows',
161
+ ];
162
+ const multipleValueProperties = [
163
+ 'borderSpacing',
164
+ 'borderEndEndRadius',
165
+ 'borderEndStartRadius',
166
+ 'borderStartEndRadius',
167
+ 'borderStartStartRadius',
168
+ 'borderTopLeftRadius',
169
+ 'borderTopRightRadius',
170
+ 'borderBottomLeftRadius',
171
+ 'borderBottomRightRadius',
172
+ 'borderBlockWidth',
173
+ 'borderInlineWidth',
174
+ 'gap',
175
+ 'scale',
176
+ 'inset',
177
+ 'padding',
178
+ 'margin',
179
+ 'borderWidth',
180
+ 'borderImageWidth',
181
+ 'borderImageOutset',
182
+ ];
183
+ const valueCountMap = {
184
+ inset: 4,
185
+ gap: 2,
186
+ padding: 4,
187
+ margin: 4,
188
+ borderSpacing: 2,
189
+ borderWidth: 4,
190
+ borderStartStartRadius: 2,
191
+ borderStartEndRadius: 2,
192
+ borderEndStartRadius: 2,
193
+ borderEndEndRadius: 2,
194
+ borderTopLeftRadius: 2,
195
+ borderTopRightRadius: 2,
196
+ borderBottomRightRadius: 2,
197
+ borderBottomLeftRadius: 2,
198
+ borderImageWidth: 4,
199
+ borderImageOutset: 4,
200
+ borderBlockWidth: 2,
201
+ borderInlineWidth: 2,
202
+ };
203
+ const singleColorProperties = [
204
+ 'accentColor',
205
+ 'color',
206
+ 'borderTopColor',
207
+ 'borderBottomColor',
208
+ 'borderLeftColor',
209
+ 'borderRightColor',
210
+ 'borderBlockColor',
211
+ 'borderBlockStartColor',
212
+ 'borderBlockEndColor',
213
+ 'borderInlineColor',
214
+ 'borderInlineStartColor',
215
+ 'borderInlineEndColor',
216
+ 'backgroundColor',
217
+ 'outlineColor',
218
+ 'textDecorationColor',
219
+ 'caretColor',
220
+ 'columnRuleColor',
221
+ 'sropColor',
222
+ 'textEmphasisColor',
223
+ ];
224
+ const borderColorProperties = ['borderColor'];
225
+ const borderImageProperties = ['borderImage'];
226
+ const borderWidthProperties = [
227
+ 'borderWidth',
228
+ 'borderBlockWidth',
229
+ 'borderInlineWidth',
230
+ 'columnRuleWidth',
231
+ 'outlineWidth',
232
+ ];
233
+ const ImageSourceProperties = [
234
+ 'borderImageSource',
235
+ 'listStyleImage',
236
+ 'maskBorderSource',
237
+ 'maskImage',
238
+ ];
239
+ const borderProperties = [
240
+ 'border',
241
+ 'outline',
242
+ 'columnRule',
243
+ 'borderTop',
244
+ 'borderBottom',
245
+ 'borderLeft',
246
+ 'borderRight',
247
+ 'borderBlock',
248
+ 'borderBlockStart',
249
+ 'borderBlockEnd',
250
+ 'borderInline',
251
+ 'borderInlineStart',
252
+ 'borderInlineEnd',
253
+ ];
254
+ const borderRadiusProperties = ['borderRadius'];
255
+ const borderStyleProperties = ['borderStyle'];
256
+ const borderImageSlice = ['borderImageSlice'];
257
+ const stylisticString = 'stylistic\\([^\\)]+\\)';
258
+ const stylesetString = 'styleset\\([^\\)]+\\)';
259
+ const characterVariantString = 'character-variant\\([^\\)]+\\)';
260
+ const swashString = 'swash\\([^\\)]+\\)';
261
+ const ornamentsString = 'ornaments\\([^\\)]+\\)';
262
+ const annotationString = 'annotation\\([^\\)]+\\)';
263
+ const notationFuncs = [
264
+ stylisticString,
265
+ stylesetString,
266
+ characterVariantString,
267
+ swashString,
268
+ ornamentsString,
269
+ annotationString,
270
+ varString,
271
+ ].join('|');
272
+ function isValidMultipleColorValues(value) {
273
+ const colors = splitColorValues(value);
274
+ if (colors.length > 4)
275
+ return false;
276
+ return colors.every(isValidColorValue);
277
+ }
278
+ function isValidColorValue(value) {
279
+ return colorRegex.test(value);
280
+ }
281
+ function splitColorValues(value) {
282
+ const colors = [];
283
+ const remaining = value.trim();
284
+ let inParentheses = false;
285
+ let currentColor = '';
286
+ for (let i = 0; i < remaining.length; i++) {
287
+ const char = remaining[i];
288
+ if (char === '(') {
289
+ inParentheses = true;
290
+ }
291
+ else if (char === ')') {
292
+ inParentheses = false;
293
+ }
294
+ if (char === ' ' && !inParentheses && currentColor.length > 0) {
295
+ colors.push(currentColor.trim());
296
+ currentColor = '';
297
+ }
298
+ else {
299
+ currentColor += char;
300
+ }
301
+ }
302
+ if (currentColor.length > 0) {
303
+ colors.push(currentColor.trim());
304
+ }
305
+ return colors;
306
+ }
307
+ const lineWidth = ['thin', 'medium', 'thick'].join('|');
308
+ const lineStyle = [
309
+ 'none',
310
+ 'hidden',
311
+ 'dotted',
312
+ 'dashed',
313
+ 'solid',
314
+ 'double',
315
+ 'groove',
316
+ 'ridge',
317
+ 'inset',
318
+ 'outset',
319
+ varString,
320
+ ].join('|');
321
+ const cursorValue = [
322
+ 'auto',
323
+ 'default',
324
+ 'none',
325
+ 'context-menu',
326
+ 'help',
327
+ 'pointer',
328
+ 'progress',
329
+ 'wait',
330
+ 'cell',
331
+ 'crosshair',
332
+ 'text',
333
+ 'vertical-text',
334
+ 'alias',
335
+ 'copy',
336
+ 'move',
337
+ 'no-drop',
338
+ 'not-allowed',
339
+ 'grab',
340
+ 'grabbing',
341
+ 'e-resize',
342
+ 'n-resize',
343
+ 'ne-resize',
344
+ 'nw-resize',
345
+ 's-resize',
346
+ 'se-resize',
347
+ 'sw-resize',
348
+ 'w-resize',
349
+ 'ew-resize',
350
+ 'ns-resize',
351
+ 'nesw-resize',
352
+ 'nwse-resize',
353
+ 'col-resize',
354
+ 'row-resize',
355
+ 'all-scroll',
356
+ 'zoom-in',
357
+ 'zoom-out',
358
+ varString,
359
+ ].join('|');
360
+ const utils_1 = require("@typescript-eslint/utils");
361
+ const createRule = utils_1.ESLintUtils.RuleCreator((name) => name);
362
+ exports.validateValues = createRule({
363
+ name: 'validate-values',
364
+ meta: {
365
+ type: 'problem',
366
+ docs: {
367
+ description: 'Validate camelCase CSS property values in JS objects or JSX',
368
+ },
369
+ messages: {
370
+ validateValue: "'{{key}}' has an invalid value '{{value}}'. Valid values: {{validValues}}",
371
+ },
372
+ schema: [],
373
+ },
374
+ defaultOptions: [],
375
+ create(context) {
376
+ return {
377
+ ObjectExpression(node) {
378
+ node.properties.forEach((property) => {
379
+ if (property.type === 'Property' &&
380
+ property.key &&
381
+ property.value &&
382
+ property.key.type === 'Identifier' &&
383
+ typeof property.key.name === 'string' &&
384
+ property.value.type === 'Literal' &&
385
+ typeof property.value.value === 'string') {
386
+ const key = property.key.name;
387
+ const value = property.value.value;
388
+ if (validData_1.validData[key]) {
389
+ const createReport = (property, key, value) => {
390
+ return () => {
391
+ context.report({
392
+ node: property.value,
393
+ messageId: 'validateValue',
394
+ data: {
395
+ key,
396
+ value,
397
+ validValues: validData_1.validData[key].join(', '),
398
+ },
399
+ });
400
+ };
401
+ };
402
+ const report = createReport(property, key, value);
403
+ const globalValue = !validData_1.validData[key].includes(value) &&
404
+ !globalValues.includes(value) &&
405
+ !varRegex.test(value);
406
+ const isBorderWidth = borderWidthProperties.includes(key);
407
+ const multiAutoProperties = [
408
+ 'borderImageWidth',
409
+ 'margin',
410
+ 'inset',
411
+ 'backgroundSize',
412
+ 'marginBlock',
413
+ 'marginInline',
414
+ 'scrollPaddingBlock',
415
+ 'scrollPaddingInline',
416
+ ];
417
+ const isAuto = multiAutoProperties.includes(key);
418
+ const numberAndLengthValues = [
419
+ 'borderImageWidth',
420
+ 'borderImageOutset',
421
+ 'lineHeight',
422
+ 'strokeDashoffset',
423
+ 'strokeWidth',
424
+ 'tabSize',
425
+ 'zoom',
426
+ ];
427
+ const isNumber = numberAndLengthValues.includes(key);
428
+ const isBackgroundSize = 'backgroundSize'.includes(key);
429
+ const isBackgroundPositionY = 'backgroundPositionY'.includes(key);
430
+ const isBackgroundPositionX = 'backgroundPositionY'.includes(key);
431
+ const isBackgroundPosition = 'backgroundPosition'.includes(key);
432
+ const integerValueRegex = RegExp(`^${integerPattern}$`);
433
+ const percentageValueRegex = RegExp(`^${percentagePattern}$`);
434
+ const lengthPercentage = [
435
+ 'width',
436
+ 'maxWidth',
437
+ 'minWidth',
438
+ 'height',
439
+ 'maxHeight',
440
+ 'minHeight',
441
+ 'flexBasis',
442
+ 'block-size',
443
+ 'columnWidth',
444
+ 'inline-size',
445
+ 'fontSize',
446
+ 'lineHeight',
447
+ 'top',
448
+ 'bottom',
449
+ 'left',
450
+ 'right',
451
+ 'marginTop',
452
+ 'marginBottom',
453
+ 'marginLeft',
454
+ 'marginRight',
455
+ 'paddingTop',
456
+ 'paddingBottom',
457
+ 'paddingLeft',
458
+ 'paddingRight',
459
+ 'inset-block',
460
+ 'maskBorderWidth',
461
+ 'maskPosition',
462
+ 'maskSize',
463
+ 'maxBlockSize',
464
+ 'minBlockSize',
465
+ 'maxInlineSize',
466
+ 'minInlineSize',
467
+ 'offsetDistance',
468
+ 'offset',
469
+ 'paddingBlock',
470
+ 'paddingBlockEnd',
471
+ 'paddingBlockStart',
472
+ 'paddingInline',
473
+ 'paddingInlineEnd',
474
+ 'paddingInlineStart',
475
+ 'columnGap',
476
+ 'rowGap',
477
+ 'rx',
478
+ 'ry',
479
+ 'scrollPadding',
480
+ 'scrollPaddingBlock',
481
+ 'scrollPaddingBlockEnd',
482
+ 'scrollPaddingBlockStart',
483
+ 'scrollPaddingInline',
484
+ 'scrollPaddingInlineEnd',
485
+ 'scrollPaddingInlineStart',
486
+ 'scrollPaddingBottom',
487
+ 'scrollPaddingLeft',
488
+ 'scrollPaddingRight',
489
+ 'scrollPaddingTop',
490
+ 'shapeMargin',
491
+ 'x',
492
+ 'y',
493
+ 'zoom',
494
+ 'gap',
495
+ 'inset',
496
+ 'padding',
497
+ 'margin',
498
+ 'borderRadius',
499
+ 'borderEndEndRadius',
500
+ 'borderEndStartRadius',
501
+ 'borderStartEndRadius',
502
+ 'borderStartStartRadius',
503
+ 'borderTopLeftRadius',
504
+ 'borderTopRightRadius',
505
+ 'borderBottomLeftRadius',
506
+ 'borderBottomRightRadius',
507
+ 'backgroundPosition',
508
+ 'backgroundPositionX',
509
+ 'backgroundPositionY',
510
+ 'background',
511
+ 'backgroundSize',
512
+ 'strokeDasharray',
513
+ 'strokeDashoffset',
514
+ 'strokeWidth',
515
+ 'textDecorationThickness',
516
+ 'textUnderlineOffset',
517
+ 'transformOrigin',
518
+ 'verticalAlign',
519
+ ];
520
+ const isFitContentGroup = [
521
+ 'width',
522
+ 'maxWidth',
523
+ 'minWidth',
524
+ 'height',
525
+ 'maxHeight',
526
+ 'minHeight',
527
+ 'blockSize',
528
+ 'columnWidth',
529
+ 'flexBasis',
530
+ 'inlineSize',
531
+ ];
532
+ const isLengthPercentage = lengthPercentage.includes(key);
533
+ const lengthValuePattern = `${lengthPattern}` +
534
+ (isLengthPercentage ? `|${percentagePattern}` : '') +
535
+ (isFitContentGroup ? `|${fitContentString}` : '') +
536
+ (isNumber ? `|${numberPattern}` : '') +
537
+ (isAuto ? `|auto` : '') +
538
+ (isBorderWidth ? '|thin|medium|thick' : '') +
539
+ (isBackgroundPositionY ? '|top|center|bottom' : '') +
540
+ (isBackgroundPositionX ? '|left|center|right' : '') +
541
+ (isBackgroundPosition ? '|top|bottom|center|left|right' : '') +
542
+ (isBackgroundSize ? '|cover|contain' : '') +
543
+ `|${calcString}|${clampString}|${anchorString}|${anchorSizeString}|${minString}|${maxString}|${varString}`;
544
+ const lengthValueRegex = new RegExp(`^(${lengthValuePattern})$`);
545
+ const isOtherGroups = [
546
+ 'opacity',
547
+ 'stopOpacity',
548
+ 'strokeOpacity',
549
+ ].includes(key);
550
+ const otherSingleValue = `${numberPattern}` + (isOtherGroups ? '%?' : '') + `|0`;
551
+ const otherSingleValueRegex = new RegExp(`^(${otherSingleValue})$`);
552
+ const multipleValueRegex = new RegExp(`^(${lengthValuePattern})( (?!\\s)(${lengthValuePattern})){0,${valueCountMap[key] - 1}}$`);
553
+ const backgroundPairRegex = new RegExp(`^(${lengthValuePattern})(\\s+(${lengthValuePattern}))?(\\s*,\\s*(${lengthValuePattern})(\\s+(${lengthValuePattern}))?)*$`);
554
+ const backgroundPairProperties = [
555
+ 'backgroundSize',
556
+ 'backgroundPositionY',
557
+ 'backgroundPositionX',
558
+ ];
559
+ const backgroundQuadRegex = new RegExp(`^(${lengthValuePattern})(\\s+(${lengthValuePattern}))?(\\s+(${lengthValuePattern}))?(\\s+(${lengthValuePattern}))?(\\s*,\\s*(${lengthValuePattern})(\\s+(${lengthValuePattern}))?(\\s+(${lengthValuePattern}))?(\\s+(${lengthValuePattern}))?)*$`);
560
+ const backgroundQuadProperties = ['backgroundPosition'];
561
+ const visualBox = 'border-box|padding-box|content-box|' + varString;
562
+ const backgroundOriginRegex = new RegExp(`^(${visualBox})(\\s*,\\s*(${visualBox}))*$`);
563
+ const backgroundOriginProperties = [
564
+ 'backgroundOrigin',
565
+ 'backgroundClip',
566
+ ];
567
+ const blendMode = [
568
+ 'normal',
569
+ 'multiply',
570
+ 'screen',
571
+ 'overlay',
572
+ 'darken',
573
+ 'lighten',
574
+ 'color-dodge',
575
+ 'color-burn',
576
+ 'hard-light',
577
+ 'soft-light',
578
+ 'difference',
579
+ 'exclusion',
580
+ 'hue',
581
+ 'saturation',
582
+ 'color',
583
+ 'luminosity',
584
+ varString,
585
+ ].join('|');
586
+ const backgroundBlendModeRegex = new RegExp(`^(${blendMode})(\\s*,\\s*(${blendMode}))*$`);
587
+ const backgroundBlendModeProperties = ['backgroundBlendMode'];
588
+ const attachment = `scroll|fixed|local|${varString}`;
589
+ const backgroundAttachmentProperties = ['backgroundAttachment'];
590
+ const backgroundAttachmentRegex = new RegExp(`^(${attachment})(\\s*,\\s*(${attachment}))*$`);
591
+ const backgroundImageRegex = new RegExp(`^(${gradientString}|${urlString}|${varString}|none)(\\s*,\\s*(${gradientString}|${urlString}|${varString}|none))*$`);
592
+ const backgroundImageProperties = ['backgroundImage'];
593
+ const repeatKeyword = 'repeat|space|round|no-repeat';
594
+ const backgroundRepeatRegex = new RegExp(`^(((?:${repeatKeyword}|${varString})(\\s+(?:${repeatKeyword}|${varString})))?|(repeatX|repeatY))$`);
595
+ const backgroundRepeatProperties = ['backgroundRepeat'];
596
+ const backgroundRepeatSource = backgroundRepeatRegex.source.slice(1, -1);
597
+ const positionKeyword = `top|bottom|center|left|right|${varString}`;
598
+ const sizeKeyword = 'cover|contain';
599
+ const urlPattern = `(?:${urlString}|${gradientString}|${varString}\\s*)?`;
600
+ const positionPattern = `(?:${positionKeyword})(?:\\s+${positionKeyword})?`;
601
+ const singleValuePattern = `(${lengthValuePattern})( (?!\\s)(${lengthValuePattern})){0,2}?`;
602
+ const sizePattern = `(?:\\s*/\\s*(?:${sizeKeyword}|${singleValuePattern}))?`;
603
+ const repeatPattern = `(?:(?:${backgroundRepeatSource})\\s+)?`;
604
+ const attachmentPattern = `(?:${attachment}\\s+)?`;
605
+ const visualBoxPattern = `(?:${visualBox}\\s+)?`;
606
+ const colorValuePattern = `(?:\\s*${colorSource})?`;
607
+ const positionAndSizePattern = `(?:${positionPattern}${sizePattern})?`;
608
+ const flexibleLayerWithoutColor = [
609
+ positionAndSizePattern,
610
+ urlPattern,
611
+ repeatPattern,
612
+ attachmentPattern,
613
+ visualBoxPattern,
614
+ ].join('|');
615
+ const flexibleLayerWithColor = `(?:${flexibleLayerWithoutColor}\\s*)*${colorValuePattern}`;
616
+ const backgroundRegex = new RegExp(`^(?!\\s)(?=\\S)${flexibleLayerWithColor}(?:\\s*,\\s*${flexibleLayerWithColor})*$`);
617
+ const backgroundProperties = ['background'];
618
+ const boxShadowRegex = new RegExp(`^(?:(?:inset\\s+)?(${lengthValuePattern})\\s+(${lengthValuePattern})(?:\\s+(${lengthValuePattern}))?(?:\\s+(${lengthValuePattern}))?\\s+(${colorSource}))(?:\\s*,\\s*(?:(?:inset\\s+)?(${lengthValuePattern})\\s+(${lengthValuePattern})(?:\\s+(${lengthValuePattern}))?(?:\\s+(${lengthValuePattern}))?\\s+(${colorSource})))*$`);
619
+ const boxShadowProperties = ['boxShadow'];
620
+ const borderRadiusRegex = new RegExp(`^(${lengthValuePattern})( (?!\\s)(${lengthValuePattern})){0,3}(\\s*/\\s*(${lengthValuePattern})( (?!\\s)(${lengthValuePattern})){0,3})?$`);
621
+ const borderStyleRegex = new RegExp(`^(${lineStyle})( (?!\\s)(${lineStyle})){0,3}$`);
622
+ function createBorderImageRegex() {
623
+ const varString = `var\\(${dashedIdentString}(,\\s*[^\\)]+)?\\)?`;
624
+ const valueOrVar = `(${varString}|${lengthValuePattern})`;
625
+ const imageSource = `${imageRegex.source.slice(1, -1)}|${varString}`;
626
+ const slicePart = `(?:\\s+fill|${valueOrVar}(?:\\s+fill|${valueOrVar}){0,3})?`;
627
+ const widthPart = `(?:\\s*\\/\\s*auto|${valueOrVar}(?:\\s+auto|${valueOrVar}){0,3})?`;
628
+ const outsetPart = `(?:\\s*\\/\\s*${valueOrVar}(?:\\s+${valueOrVar}){0,3})?`;
629
+ const repeatPart = `(?:\\s+(${varString}|stretch|repeat|round|space)){0,2}?`;
630
+ return new RegExp(`^${imageSource}` +
631
+ `${slicePart}` +
632
+ `${widthPart}` +
633
+ `${outsetPart}` +
634
+ `${repeatPart}$`);
635
+ }
636
+ const borderImageRegex = createBorderImageRegex();
637
+ const aspectRatioRegex = new RegExp(`^(auto\\s+)?(${varString}|${numberPattern}(\\s*\\/\\s*${numberPattern})?|auto)(\\s+auto)?$`);
638
+ const aspectRatioProperties = ['aspectRatio'];
639
+ const timeUnit = '(s|ms)';
640
+ const animationTimeRegex = new RegExp(`^-?(${pureNumber}${timeUnit}|${varString})(,\\s-?(${pureNumber}${timeUnit}|${varString}))*$`);
641
+ const animationTimeProperties = [
642
+ 'animationDelay',
643
+ 'animationDuration',
644
+ 'transitionDelay',
645
+ 'transitionDuration',
646
+ ];
647
+ const animationDirection = [
648
+ 'normal',
649
+ 'reverse',
650
+ 'alternate',
651
+ 'alternate-reverse',
652
+ varString,
653
+ ].join('|');
654
+ const animationDirectionRegex = new RegExp(`^(${animationDirection})(,\\s*(${animationDirection}))*$`);
655
+ const animationDirectionProperties = ['animationDirection'];
656
+ const animationFillMode = [
657
+ 'none',
658
+ 'forwards',
659
+ 'backwards',
660
+ 'both',
661
+ varString,
662
+ ].join('|');
663
+ const animationFillModeRegex = new RegExp(`^(${animationFillMode})(,\\s*(${animationFillMode}))*$`);
664
+ const animationFillModeProperties = ['animationFillMode'];
665
+ const animationPlayState = ['paused', 'running', varString].join('|');
666
+ const animationPlayStateRegex = new RegExp(`^(${animationPlayState})(,\\s*(${animationPlayState}))*$`);
667
+ const animationPlayStateProperties = ['animationPlayState'];
668
+ const animationIterationCountRegex = new RegExp(`^${numberPattern}|infinite(,\\s*${numberPattern}|infinite)*$`);
669
+ const animationIterationCountProperties = [
670
+ 'animationIterationCount',
671
+ ];
672
+ const stringNameRegex = new RegExp('^.*$');
673
+ const stringNameProperties = [
674
+ 'animationName',
675
+ 'counterIncrement',
676
+ 'counterReset',
677
+ 'counterSet',
678
+ 'font',
679
+ 'fontFamily',
680
+ 'gridArea',
681
+ 'gridColumn',
682
+ 'gridColumnEnd',
683
+ 'gridColumnStart',
684
+ 'gridRow',
685
+ 'gridRowEnd',
686
+ 'gridRowStart',
687
+ 'listStyleType',
688
+ 'listStyle',
689
+ 'transitionProperty',
690
+ 'transition',
691
+ 'viewTransitionName',
692
+ 'willChange',
693
+ ];
694
+ const easing = [
695
+ 'ease',
696
+ 'ease-in',
697
+ 'ease-out',
698
+ 'ease-in-out',
699
+ 'linear',
700
+ 'step-start',
701
+ 'step-end',
702
+ ];
703
+ const easingPattern = easing.join('|');
704
+ const zeroToOne = '(0(\\.\\d+)?|1(\\.0+)?|0?\\.\\d+)';
705
+ const cubicBezierPattern = `cubic-bezier\\(\\s*${zeroToOne}\\s*,\\s*(-?\\d+(\\.\\d+)?)\\s*,\\s*${zeroToOne}\\s*,\\s*(-?\\d+(\\.\\d+)?)\\s*\\)`;
706
+ const numberPercentage = `${zeroToOne}(\\s+\\d+(\\.\\d+)?%){0,2}`;
707
+ const linearPattern = `linear\\(\\s*(${numberPercentage}(\\s*,\\s*${numberPercentage})*)+\\s*\\)`;
708
+ const stepPositions = [
709
+ 'jump-start',
710
+ 'jump-end',
711
+ 'jump-none',
712
+ 'jump-both',
713
+ 'start',
714
+ 'end',
715
+ ];
716
+ const stepPositionPattern = stepPositions.join('|');
717
+ const stepPattern = `steps\\(\\s*(\\d+)\\s*,\\s*(${stepPositionPattern})\\s*\\)`;
718
+ const singleTimingFunctionPattern = `(${easingPattern}|${cubicBezierPattern}|${linearPattern}|${stepPattern}|${varString})`;
719
+ const animationTimingFunctionRegex = new RegExp(`^${singleTimingFunctionPattern}(\\s*,\\s*${singleTimingFunctionPattern})*$`);
720
+ const animationTimingFunctionProperties = [
721
+ 'animationTimingFunction',
722
+ 'transitionTimingFunction',
723
+ ];
724
+ const filterNumFunction = [
725
+ 'brightness',
726
+ 'contrast',
727
+ 'grayscale',
728
+ 'invert',
729
+ 'opacity',
730
+ 'sepia',
731
+ 'saturate',
732
+ ].join('|');
733
+ const filterNumFunctionPattern = `(${filterNumFunction})\\(\\s*${numberPattern}%?\\s*\\)`;
734
+ const blurFunctionPattern = `blur\\(\\s*(${lengthPattern}|${calcString}|${clampString}|${minString}|${maxString})\\s*\\)`;
735
+ const angleFunctionPattern = `hue-rotate\\(\\s*${anglePattern}\\s*\\)`;
736
+ const dropShadowPattern = `^drop-shadow\\(\\s*(?:${colorSource}|${lengthValuePattern})(?:\\s+(?:${colorSource}|${lengthValuePattern})){2,3}\\s*\\)$`;
737
+ const filterAllPattern = `${filterNumFunctionPattern}|${blurFunctionPattern}|${angleFunctionPattern}|${dropShadowPattern}|${urlPattern}`;
738
+ const filterPattern = `^(${filterAllPattern}\\s*)+$`;
739
+ const filterRegex = new RegExp(filterPattern);
740
+ function isBorderValue(value) {
741
+ const parts = splitColorValues(value);
742
+ if (parts.length > 3)
743
+ return false;
744
+ let hasWidth = false;
745
+ let hasStyle = false;
746
+ let hasColor = false;
747
+ for (const part of parts) {
748
+ if (varRegex.test(part)) {
749
+ continue;
750
+ }
751
+ if (lineWidth.includes(part) || lengthValueRegex.test(part)) {
752
+ if (hasWidth)
753
+ return false;
754
+ hasWidth = true;
755
+ }
756
+ else if (lineStyle.includes(part)) {
757
+ if (hasStyle)
758
+ return false;
759
+ hasStyle = true;
760
+ }
761
+ else if (isValidColorValue(part)) {
762
+ if (hasColor)
763
+ return false;
764
+ hasColor = true;
765
+ }
766
+ else {
767
+ return false;
768
+ }
769
+ }
770
+ return (hasStyle ||
771
+ hasWidth ||
772
+ hasColor ||
773
+ parts.some((part) => varRegex.test(part)));
774
+ }
775
+ const matrixString = 'matrix\\([^\\)]+\\)';
776
+ const matrix3dString = 'matrix3d\\([^\\)]+\\)';
777
+ const perspectiveString = 'perspective\\([^\\)]+\\)';
778
+ const rotateString = 'rotate\\([^\\)]+\\)';
779
+ const rotate3dString = 'rotate3d\\([^\\)]+\\)';
780
+ const rotateXString = 'rotateX\\([^\\)]+\\)';
781
+ const rotateYString = 'rotateY\\([^\\)]+\\)';
782
+ const rotateZString = 'rotateZ\\([^\\)]+\\)';
783
+ const scaleString = 'scale\\([^\\)]+\\)';
784
+ const scale3dString = 'scale3d\\([^\\)]+\\)';
785
+ const scaleXString = 'scaleX\\([^\\)]+\\)';
786
+ const scaleYString = 'scaleY\\([^\\)]+\\)';
787
+ const scaleZString = 'scaleZ\\([^\\)]+\\)';
788
+ const skewString = 'skew\\([^\\)]+\\)';
789
+ const skewXString = 'skewX\\([^\\)]+\\)';
790
+ const skewYString = 'skewY\\([^\\)]+\\)';
791
+ const translateString = 'translate\\([^\\)]+\\)';
792
+ const translate3dString = 'translate3d\\([^\\)]+\\)';
793
+ const translateXString = 'translateX\\([^\\)]+\\)';
794
+ const translateYString = 'translateY\\([^\\)]+\\)';
795
+ const translateZString = 'translateZ\\([^\\)]+\\)';
796
+ const transformFunctions = [
797
+ matrixString,
798
+ matrix3dString,
799
+ perspectiveString,
800
+ rotateString,
801
+ rotate3dString,
802
+ rotateXString,
803
+ rotateYString,
804
+ rotateZString,
805
+ scaleString,
806
+ scale3dString,
807
+ scaleXString,
808
+ scaleYString,
809
+ scaleZString,
810
+ skewString,
811
+ skewXString,
812
+ skewYString,
813
+ translateString,
814
+ translate3dString,
815
+ translateXString,
816
+ translateYString,
817
+ translateZString,
818
+ ].join('|');
819
+ const filterProperties = ['backdropFilter', 'filter'];
820
+ const geometryBaseSet = 'content-box|padding-box|border-box|fill-box|stroke-box|view-box';
821
+ const geometryBox = geometryBaseSet + '|margin-box';
822
+ const insetString = 'inset\\([^\\)]+\\)';
823
+ const circleString = 'circle\\([^\\)]+\\)';
824
+ const ellipseString = 'ellipse\\([^\\)]+\\)';
825
+ const polygonString = 'polygon\\([^\\)]+\\)';
826
+ const pathString = `path\\(${stringString}\\)`;
827
+ const rectString = 'rect\\([^\\)]+\\)';
828
+ const xywhString = 'xywh\\([^\\)]+\\)';
829
+ const basicShapeWithoutVar = `(${varString}|${insetString}|${circleString}|${ellipseString}|${polygonString}|${pathString}|${rectString}|${xywhString})`;
830
+ const basicShapeString = `(${varString}\\s+${varString}|${varString}|${basicShapeWithoutVar})`;
831
+ const geometryBoxWithVar = `(${geometryBox}|${varString})`;
832
+ const clipPathRegex = new RegExp(`^(${basicShapeString}|${geometryBoxWithVar}|${geometryBoxWithVar}\\s+${basicShapeString}|${basicShapeString}\\s+${geometryBoxWithVar})$`);
833
+ const clipPathProperties = ['clipPath'];
834
+ const columnsRegex = new RegExp(`^(?:auto\\s*(?:auto|${lengthValuePattern}|${numberPattern})?|${numberPattern}\\s*(?:auto|${lengthValuePattern}|${numberPattern})?|${lengthValuePattern}\\s*(?:auto|${lengthValuePattern}|${numberPattern})?)$`);
835
+ const columnsProperties = ['columns'];
836
+ const contentValueRegex = new RegExp(`^(${urlString}|${gradientString}|${imageSetString}|${attrString}|${counterString}|${countersString}|${stringString})$`);
837
+ const contentProperty = ['content'];
838
+ function isValidCursor(value) {
839
+ const urlWithHotspotRegex = `(${urlString}|${varString})(\\s+(${numberPattern})(\\s+(${numberPattern}))?)?`;
840
+ const urlPart = `(${urlWithHotspotRegex})`;
841
+ const standalonePattern = new RegExp(`^(${cursorValue})$`);
842
+ const urlListPattern = new RegExp(`^${urlPart}(\\s*,\\s*${urlPart})*\\s*,\\s*(${cursorValue})$`);
843
+ if (standalonePattern.test(value)) {
844
+ return true;
845
+ }
846
+ if (!urlListPattern.test(value)) {
847
+ return false;
848
+ }
849
+ const parts = value.split(/\s*,\s*/);
850
+ const lastPart = parts[parts.length - 1];
851
+ const isFallbackCursor = standalonePattern.test(lastPart);
852
+ if (!isFallbackCursor)
853
+ return false;
854
+ const urlParts = parts.slice(0, -1);
855
+ return urlParts.every((part) => {
856
+ const urlRegex = new RegExp(`^${urlWithHotspotRegex}$`);
857
+ return urlRegex.test(part);
858
+ });
859
+ }
860
+ const cursorProperty = ['cursor'];
861
+ function isValidFlexValue(value) {
862
+ const cleanValue = value.replace(/\s+/g, ' ').trim();
863
+ if (!cleanValue) {
864
+ return false;
865
+ }
866
+ const parts = cleanValue.split(' ');
867
+ if (parts.length > 3) {
868
+ return false;
869
+ }
870
+ if (parts.length === 1) {
871
+ return (new RegExp(`^${numberPattern}$`).test(parts[0]) ||
872
+ new RegExp(lengthValuePattern).test(parts[0]));
873
+ }
874
+ if (parts.length === 2) {
875
+ if (!new RegExp(`^${numberPattern}$`).test(parts[0])) {
876
+ return false;
877
+ }
878
+ return (new RegExp(`^${numberPattern}$`).test(parts[1]) ||
879
+ new RegExp(lengthValuePattern).test(parts[1]));
880
+ }
881
+ if (parts.length === 3) {
882
+ if (!new RegExp(`^${numberPattern}$`).test(parts[0]) ||
883
+ !new RegExp(`^${numberPattern}$`).test(parts[1])) {
884
+ return false;
885
+ }
886
+ return new RegExp(lengthValuePattern).test(parts[2]);
887
+ }
888
+ return false;
889
+ }
890
+ const flexProperty = ['flex'];
891
+ const tagA_E = [
892
+ 'aalt',
893
+ 'abvf',
894
+ 'abvm',
895
+ 'abvs',
896
+ 'afrc',
897
+ 'akhn',
898
+ 'apkn',
899
+ 'blwf',
900
+ 'blwm',
901
+ 'blws',
902
+ 'calt',
903
+ 'case',
904
+ 'ccmp',
905
+ 'cfar',
906
+ 'chws',
907
+ 'cjct',
908
+ 'clig',
909
+ 'cpct',
910
+ 'cpsp',
911
+ 'cswh',
912
+ 'curs',
913
+ 'cv(0[1-9]|[1-9][0-9])',
914
+ 'c2pc',
915
+ 'c2sc',
916
+ 'dist',
917
+ 'dlig',
918
+ 'dnom',
919
+ 'dtls',
920
+ 'expt',
921
+ ]
922
+ .map((tag) => `'${tag}'|"${tag}"`)
923
+ .join('|');
924
+ const tagF_J = [
925
+ 'falt',
926
+ 'fin2',
927
+ 'fin3',
928
+ 'fina',
929
+ 'flac',
930
+ 'frac',
931
+ 'fwid',
932
+ 'half',
933
+ 'haln',
934
+ 'hist',
935
+ 'hkna',
936
+ 'hlig',
937
+ 'hojo',
938
+ 'hwid',
939
+ 'init',
940
+ 'isol',
941
+ 'ital',
942
+ 'jalt',
943
+ 'jp78',
944
+ 'jp83',
945
+ 'jp90',
946
+ 'jp04',
947
+ ]
948
+ .map((tag) => `'${tag}'|"${tag}"`)
949
+ .join('|');
950
+ const tagsK_O = [
951
+ 'kern',
952
+ 'lfbd',
953
+ 'liga',
954
+ 'ljmo',
955
+ 'lnum',
956
+ 'locl',
957
+ 'ltra',
958
+ 'ltrm',
959
+ 'mark',
960
+ 'med2',
961
+ 'medi',
962
+ 'mgrk',
963
+ 'mkmk',
964
+ 'mset',
965
+ 'nalt',
966
+ 'nlck',
967
+ 'nukt',
968
+ 'numr',
969
+ 'onum',
970
+ 'ordn',
971
+ 'ornm',
972
+ ]
973
+ .map((tag) => `'${tag}'|"${tag}"`)
974
+ .join('|');
975
+ const tagsP_T = [
976
+ 'palt',
977
+ 'pcap',
978
+ 'pkna',
979
+ 'pnum',
980
+ 'pref',
981
+ 'pres',
982
+ 'pstf',
983
+ 'psts',
984
+ 'pwid',
985
+ 'qwid',
986
+ 'rand',
987
+ 'rclt',
988
+ 'rkrf',
989
+ 'rlig',
990
+ 'rphf',
991
+ 'rtbd',
992
+ 'rtla',
993
+ 'rtlm',
994
+ 'ruby',
995
+ 'rvrn',
996
+ 'salt',
997
+ 'sinf',
998
+ 'size',
999
+ 'smcp',
1000
+ 'smpl',
1001
+ 'ss(0[1-9]|1[0-9]|20)',
1002
+ 'ssty',
1003
+ 'stch',
1004
+ 'subs',
1005
+ 'sups',
1006
+ 'swsh',
1007
+ 'titl',
1008
+ 'tjmo',
1009
+ 'tnam',
1010
+ 'tnum',
1011
+ 'trad',
1012
+ 'twid',
1013
+ ]
1014
+ .map((tag) => `'${tag}'|"${tag}"`)
1015
+ .join('|');
1016
+ const tagsU_Z = [
1017
+ 'unic',
1018
+ 'valt',
1019
+ 'vapk',
1020
+ 'vatu',
1021
+ 'vchw',
1022
+ 'vert',
1023
+ 'vhal',
1024
+ 'vjmo',
1025
+ 'vkna',
1026
+ 'vkrn',
1027
+ 'vpal',
1028
+ 'vrt2',
1029
+ 'vrtr',
1030
+ 'zero',
1031
+ ]
1032
+ .map((tag) => `'${tag}'|"${tag}"`)
1033
+ .join('|');
1034
+ const featureTag = [
1035
+ tagA_E,
1036
+ tagF_J,
1037
+ tagsK_O,
1038
+ tagsP_T,
1039
+ tagsU_Z,
1040
+ ].join('|');
1041
+ const singlePair = `(${featureTag}|${varString})(\\s+(-?\\d+|on|off|${varString}))?`;
1042
+ const fontFeatureSettingsRegex = new RegExp(`^${singlePair}(\\s*,\\s*${singlePair})*$`);
1043
+ const fontFeatureSettingsProperties = ['fontFeatureSettings'];
1044
+ const stringValueRegex = RegExp(`^${stringString}$`);
1045
+ const stringStringProperties = [
1046
+ 'fontLanguageOverride',
1047
+ 'hyphenateCharacter',
1048
+ ];
1049
+ const fontPaletteRegex = new RegExp(`^(${dashedIdentString}|${paletteMixString})$`);
1050
+ const fontPaletteProperties = 'fontPalette';
1051
+ const fontMetric = `ex-height|cap-height|ch-width|ic-width|ic-height|${varString}`;
1052
+ function isValidFontSizeAdjust(value) {
1053
+ const cleanValue = value.replace(/\s+/g, ' ').trim();
1054
+ if (!cleanValue) {
1055
+ return false;
1056
+ }
1057
+ const parts = cleanValue.split(' ');
1058
+ if (parts.length > 2) {
1059
+ return false;
1060
+ }
1061
+ if (parts.length === 1) {
1062
+ return new RegExp(`^(${numberPattern})$`).test(parts[0]);
1063
+ }
1064
+ if (parts.length === 2) {
1065
+ const isValidFirstPart = new RegExp(`^(${fontMetric})$`).test(parts[0]);
1066
+ if (!isValidFirstPart) {
1067
+ return false;
1068
+ }
1069
+ return new RegExp(`^(${numberPattern})$`).test(parts[1]);
1070
+ }
1071
+ return false;
1072
+ }
1073
+ const fontSizeAdjustProperties = ['fontSizeAdjust'];
1074
+ const fontStretchProperties = ['fontStretch'];
1075
+ const fontStyleRegex = new RegExp(`^(oblique|${anglePattern})(\\s+(oblique|${anglePattern}))?$`);
1076
+ const fontStyleProperties = ['fontStyle'];
1077
+ const fontSynthesisRegex = new RegExp(`^(?:(weight|style|small-caps|position|${varString})(?:\\s+(?!\\1)(weight|style|small-caps|position|${varString}))*)?$`, 'i');
1078
+ const fontSynthesisProperties = ['fontSynthesis'];
1079
+ const fontVariantAlternatesRegex = new RegExp(`^(?:` +
1080
+ `(?:(?:${notationFuncs})(?:\\s+(?:${notationFuncs})){0,5})` +
1081
+ `|(?:` +
1082
+ `(?:(?:${notationFuncs})\\s+){0,6}(historical-forms|${varString})` +
1083
+ `(?:\\s+(?:${notationFuncs})){0,6})` +
1084
+ `)$`, 'i');
1085
+ const fontVariantAlternatesProperties = ['fontVariantAlternates'];
1086
+ const fontVariantEastAsianRegex = new RegExp('^' +
1087
+ `(?:jis78|jis83|jis90|jis04|simplified|traditional|full-width|proportional-width|ruby|${varString})` +
1088
+ `(?:\\s+(?:jis78|jis83|jis90|jis04|simplified|traditional|full-width|proportional-width|ruby|${varString})){0,2}` +
1089
+ '$', 'i');
1090
+ function isValidFontVariantEastAsian(value) {
1091
+ if (!fontVariantEastAsianRegex.test(value)) {
1092
+ return false;
1093
+ }
1094
+ const values = value.toLowerCase().split(/\s+/);
1095
+ const jisCount = values.filter((value) => [
1096
+ 'jis78',
1097
+ 'jis83',
1098
+ 'jis90',
1099
+ 'jis04',
1100
+ 'simplified',
1101
+ 'traditional',
1102
+ ].includes(value)).length;
1103
+ const widthCount = values.filter((v) => ['full-width', 'proportional-width'].includes(v)).length;
1104
+ const rubyCount = values.filter((v) => v === 'ruby').length;
1105
+ return jisCount <= 1 && widthCount <= 1 && rubyCount <= 1;
1106
+ }
1107
+ const fontVariantEastAsianProperties = ['fontVariantEastAsian'];
1108
+ const commonLig = 'common-ligatures|no-common-ligatures' + `|${varString}`;
1109
+ const discretionaryLig = 'discretionary-ligatures|no-discretionary-ligatures' +
1110
+ `|${varString}`;
1111
+ const historicalLig = 'historical-ligatures|no-historical-ligatures' +
1112
+ `|${varString}`;
1113
+ const contextualAlt = 'contextual|no-contextual' + `|${varString}`;
1114
+ const fontVariantLigaturesRegex = new RegExp(`^(?:(?:(${commonLig})|)(?: (${discretionaryLig})|)(?: (${historicalLig})|)(?: (${contextualAlt})|)){1,4}$`);
1115
+ const fontVariantLigaturesProperties = ['fontVariantLigatures'];
1116
+ const alternatesValues = `(?:${notationFuncs}|historical-forms)`;
1117
+ const numericFigureValues = 'lining-nums|oldstyle-nums';
1118
+ const numericSpacingValues = 'proportional-nums|tabular-nums';
1119
+ const numericFractionValues = 'diagonal-fractions|stacked-fractions';
1120
+ const numericOtherValues = 'normal|ordinal|slashed-zero';
1121
+ const eastAsianVariantValues = 'jis78|jis83|jis90|jis04|simplified|traditional';
1122
+ const eastAsianWidthValues = 'full-width|proportional-width';
1123
+ const eastAsianRuby = 'ruby';
1124
+ const capsValues = 'small-caps|all-small-caps|petite-caps|all-petite-caps|unicase|titling-caps';
1125
+ const emojiValues = 'text|emoji|unicode';
1126
+ const positionValues = 'sub|super';
1127
+ const figureSpacingFractionValues = [
1128
+ numericFigureValues,
1129
+ numericSpacingValues,
1130
+ numericFractionValues,
1131
+ numericOtherValues,
1132
+ varString,
1133
+ ].join('|');
1134
+ const fontVariantNumericRegex = new RegExp(`^(?:(${figureSpacingFractionValues})(?:\\s+(?!\\1)(${figureSpacingFractionValues}))*)?$`, 'i');
1135
+ const fontVariantNumericProperties = ['fontVariantNumeric'];
1136
+ const fontVariantRegex = new RegExp(`^(?:normal|none|` +
1137
+ `(?:` +
1138
+ `(?:(?:${commonLig}|${discretionaryLig}|${historicalLig}|${contextualAlt})` +
1139
+ `(?:\\s+(?:${commonLig}|${discretionaryLig}|${historicalLig}|${contextualAlt})){0,3})|` +
1140
+ `(?:${capsValues})|` +
1141
+ `(?:${alternatesValues}(?:\\s+${alternatesValues})*)|` +
1142
+ `(?:(?:${numericFigureValues}|${numericSpacingValues}|${numericFractionValues}|${numericOtherValues})` +
1143
+ `(?:\\s+(?:${numericFigureValues}|${numericSpacingValues}|${numericFractionValues}|${numericOtherValues})){0,3})|` +
1144
+ `(?:(?:${eastAsianVariantValues}|${eastAsianWidthValues}|${eastAsianRuby})` +
1145
+ `(?:\\s+(?:${eastAsianVariantValues}|${eastAsianWidthValues}|${eastAsianRuby})){0,2})|` +
1146
+ `(?:${positionValues})|` +
1147
+ `(?:${emojiValues})` +
1148
+ `)` +
1149
+ `(?:\\s+` +
1150
+ `(?:` +
1151
+ `(?:(?:${commonLig}|${discretionaryLig}|${historicalLig}|${contextualAlt})` +
1152
+ `(?:\\s+(?:${commonLig}|${discretionaryLig}|${historicalLig}|${contextualAlt})){0,3})|` +
1153
+ `(?:${capsValues})|` +
1154
+ `(?:${alternatesValues}(?:\\s+${alternatesValues})*)|` +
1155
+ `(?:(?:${numericFigureValues}|${numericSpacingValues}|${numericFractionValues}|${numericOtherValues})` +
1156
+ `(?:\\s+(?:${numericFigureValues}|${numericSpacingValues}|${numericFractionValues}|${numericOtherValues})){0,3})|` +
1157
+ `(?:(?:${eastAsianVariantValues}|${eastAsianWidthValues}|${eastAsianRuby})` +
1158
+ `(?:\\s+(?:${eastAsianVariantValues}|${eastAsianWidthValues}|${eastAsianRuby})){0,2})|` +
1159
+ `(?:${positionValues})|` +
1160
+ `(?:${emojiValues})` +
1161
+ `)` +
1162
+ `)*` +
1163
+ `)$`, 'i');
1164
+ const fontVariantProperties = ['fontVariant'];
1165
+ const axisTagDouble = '"wght"|"wdth"|"slnt"|"ital"|"opsz"';
1166
+ const axisTagSingle = "'wght'|'wdth'|'slnt'|'ital'|'opsz'";
1167
+ const fontVariationSettingsRegex = new RegExp(`^(${axisTagDouble}|${axisTagSingle}|${varString})\\s+(${numberPattern})$`);
1168
+ const fontVariationSettingsProperties = ['fontVariationSettings'];
1169
+ const frPattern = `${numberPattern}fr`;
1170
+ const inArrayPattern = '[a-zA-Z][a-zA-Z0-9-_]*';
1171
+ const lineNamesString = `\\[\\s*${inArrayPattern}(?:\\s+${inArrayPattern})*\\s*\\]`;
1172
+ const lineNamesPattern = `(${lineNamesString}|${varString})`;
1173
+ const trackSizeKeywords = 'auto|min-content|max-content|subgrid|masonry|row|column|row dense|column dense';
1174
+ const autoFlowPattern = `(?:auto-flow(?:\\s+dense)?|${varString})?`;
1175
+ const gridTrackListPattern = [
1176
+ trackSizeKeywords,
1177
+ lengthValuePattern,
1178
+ frPattern,
1179
+ percentagePattern,
1180
+ minmaxString,
1181
+ fitContentString,
1182
+ repeatString,
1183
+ varString,
1184
+ ].join('|');
1185
+ const gridAutoColumnsRegex = new RegExp(`^(?:${gridTrackListPattern})(?:\\s+(?:${gridTrackListPattern}))*$`);
1186
+ const gridAutoColumnsRowsProperties = [
1187
+ 'gridAutoColumns',
1188
+ 'gridAutoRows',
1189
+ ];
1190
+ const quoteRegex = new RegExp(`${stringString}`);
1191
+ const gridTemplateAreasProperties = ['gridTemplateAreas'];
1192
+ const gridAreaRowPattern = `(?:${lineNamesPattern}\\s+)?` +
1193
+ `(?:${stringString}|${varString})?` +
1194
+ `(?:\\s+(?:${gridTrackListPattern}))?` +
1195
+ `(?:\\s+${lineNamesPattern})?`;
1196
+ const explicitTrackPattern = `(?:${lineNamesPattern}(?:\\s+|\\s*))?` +
1197
+ `(?:${gridTrackListPattern})` +
1198
+ `(?:\\s+${lineNamesPattern})?`;
1199
+ const gridRegex = new RegExp('^(?:' +
1200
+ `(?:${gridAreaRowPattern}|${autoFlowPattern}\\s*)+?` +
1201
+ `(?:\\s*\\/\\s*(?:${explicitTrackPattern}|${autoFlowPattern}(?:\\s+${explicitTrackPattern}|${autoFlowPattern})*)+)?|` +
1202
+ `(?:${explicitTrackPattern}|${autoFlowPattern}(?:\\s+${explicitTrackPattern}|${autoFlowPattern})*)+` +
1203
+ `(?:\\s*\\/\\s*(?:${explicitTrackPattern}|${autoFlowPattern}(?:\\s+${explicitTrackPattern}|${autoFlowPattern})*)+)?|` +
1204
+ `\\s*\\/\\s*(?:${explicitTrackPattern}|${autoFlowPattern}(?:\\s+${explicitTrackPattern}|${autoFlowPattern})*)+` +
1205
+ ')$');
1206
+ const gridProperties = ['grid'];
1207
+ const isTemplateColumns = 'gridTemplateColumns'.includes(key);
1208
+ const templateTrackListPattern = [
1209
+ trackSizeKeywords,
1210
+ lineNamesPattern,
1211
+ lengthValuePattern,
1212
+ frPattern,
1213
+ percentagePattern,
1214
+ minmaxString,
1215
+ varString,
1216
+ ...(isTemplateColumns ? [fitContentString] : []),
1217
+ ].join('|');
1218
+ const gridTemplateTrackListRegex = new RegExp(`^(?:${templateTrackListPattern})(?:\\s+(?:${templateTrackListPattern}))*$`);
1219
+ const gridTemplateTrackListProperties = [
1220
+ 'gridTemplateColumns',
1221
+ 'gridTemplateRows',
1222
+ ];
1223
+ const isValidateGridTemplate = (value) => {
1224
+ if (typeof value !== 'string')
1225
+ return false;
1226
+ const gridAreaRowPattern = `(?:${lineNamesPattern}\\s+)?` +
1227
+ `(?:${stringString}|${varString})` +
1228
+ `(?:\\s+(?:${templateTrackListPattern}))?` +
1229
+ `(?:\\s+${lineNamesPattern})?`;
1230
+ const explicitTrackPattern = `(?:${lineNamesPattern}(?:\\s+|\\s*))?` +
1231
+ `(?:${templateTrackListPattern}|${repeatString})` +
1232
+ `(?:\\s+${lineNamesPattern})?`;
1233
+ return new RegExp('^(?:' +
1234
+ `(?:${gridAreaRowPattern}\\s*)+?` +
1235
+ `(?:\\s*\\/\\s*(?:${explicitTrackPattern}(?:\\s+${explicitTrackPattern})*)+)?|` +
1236
+ `(?:${explicitTrackPattern}(?:\\s+${explicitTrackPattern})*)+` +
1237
+ `(?:\\s*\\/\\s*(?:${explicitTrackPattern}(?:\\s+${explicitTrackPattern})*)+)?|` +
1238
+ `\\s*\\/\\s*(?:${explicitTrackPattern}(?:\\s+${explicitTrackPattern})*)+` +
1239
+ ')$').test(value);
1240
+ };
1241
+ const gridTemplateProperties = ['gridTemplate'];
1242
+ const hyphenateLimitCharsRegex = new RegExp(`^(${numberPattern}|auto)( (?!\\s)(${numberPattern}|auto)){0,2}$`);
1243
+ const hyphenateLimitCharsProperties = ['hyphenateLimitChars'];
1244
+ const imageOrientationRegex = new RegExp(`^(${anglePattern})( (?!\\s)(flip|${varString})){0,1}$`);
1245
+ const imageOrientationProperties = ['imageOrientation'];
1246
+ const initialLetterRegex = new RegExp(`^(${numberPattern})( (?!\\s)(${integerPattern}|drop|raise)){0,1}$`);
1247
+ const initialLetterProperties = ['initialLetter'];
1248
+ const insetPairRegex = new RegExp(`^(${lengthValuePattern}|auto)(\\s+(${lengthValuePattern}))?$`);
1249
+ const insetPairProperties = ['insetBlock', 'insetInline'];
1250
+ const marginPairRegex = new RegExp(`^(${lengthValuePattern})(\\s+(${lengthValuePattern}))?$`);
1251
+ const marginPairProperties = [
1252
+ 'marginBlock',
1253
+ 'marginInline',
1254
+ 'scrollPaddingBlock',
1255
+ 'scrollPaddingInline',
1256
+ 'paddingBlock',
1257
+ 'paddingInline',
1258
+ 'scrollMarginBlock',
1259
+ 'scrollMarginInline',
1260
+ ];
1261
+ const markerProperties = [
1262
+ 'marker',
1263
+ 'markerEnd',
1264
+ 'markerMid',
1265
+ 'markerStart',
1266
+ ];
1267
+ const maskBorderOutsetRegex = new RegExp(`^(${lengthValuePattern}|${numberPattern})( (?!\\s)(${lengthValuePattern}|${numberPattern})){0,3}$`);
1268
+ const maskBorderOutsetProperties = ['maskBorderOutset'];
1269
+ const maskBorderSliceRegex = new RegExp(`^(${percentagePattern}|${numberPattern}|fill)( (?!\\s)(${percentagePattern}|${numberPattern}|fill)){0,3}$`);
1270
+ const maskBorderSliceProperties = ['maskBorderSlice'];
1271
+ const maskBorderWidthRegex = new RegExp(`^(${lengthValuePattern}|${numberPattern}|auto)( (?!\\s)(${lengthValuePattern}|${numberPattern}|auto)){0,3}$`);
1272
+ const maskBorderWidthProperties = ['maskBorderWidth'];
1273
+ const modeKeyword = `luminance|alpha|${varString}`;
1274
+ const repeatFullSet = `(${repeatKeyword}|${backgroundRepeatRegex.source.slice(1, -1)})`;
1275
+ const maskBorderOutsetSource = maskBorderOutsetRegex.source.slice(1, -1);
1276
+ const maskBorderSliceSource = maskBorderSliceRegex.source.slice(1, -1);
1277
+ const maskBorderWidthSource = maskBorderWidthRegex.source.slice(1, -1);
1278
+ const maskBorderRegex = new RegExp(`^(?:${gradientString}|${urlString})` +
1279
+ `(?:\\s+${maskBorderSliceSource})?` +
1280
+ `(?:\\s?/\\s?${maskBorderWidthSource})?` +
1281
+ `(?:\\s?/\\s?${maskBorderOutsetSource})?` +
1282
+ `(?:\\s+(?:${repeatFullSet}))?` +
1283
+ `(?:\\s+(?:${modeKeyword}))?$`);
1284
+ const maskBorderProperties = ['maskBorder'];
1285
+ const maskClipKeyword = geometryBaseSet +
1286
+ `|no-clip|border|padding|content|text|${varString}`;
1287
+ const maskClipRegex = new RegExp(`^(${maskClipKeyword})(,\\s*(${maskClipKeyword}))*$`);
1288
+ const maskClipProperties = ['maskClip'];
1289
+ const compositeKeyword = `add|subtract|intersect|exclude|${varString}`;
1290
+ const maskCompositeRegex = new RegExp(`^(${compositeKeyword})(,\\s*(${compositeKeyword}))*$`);
1291
+ const maskCompositeProperties = ['maskComposite'];
1292
+ const maskModeKeyword = `alpha|luminance|match-source|${varString}`;
1293
+ const maskModeRegex = new RegExp(`^(${maskModeKeyword})(,\\s*(${maskModeKeyword}))*$`);
1294
+ const maksModeProperties = ['maskMode'];
1295
+ const maskOriginKeyword = geometryBaseSet + `|content|padding|border|${varString}`;
1296
+ const maskOriginRegex = new RegExp(`^(${maskOriginKeyword})(,\\s*(${maskOriginKeyword}))*$`);
1297
+ const maskOriginProperties = ['maskOrigin'];
1298
+ const maskPositionRegex = new RegExp(`^(?:(${lengthValuePattern}|${positionKeyword})( (?!\\s)(${lengthValuePattern}|${positionKeyword})){0,3})(?:,\\s*(${lengthValuePattern}|${positionKeyword})( (?!\\s)(${lengthValuePattern}|${positionKeyword})){0,3})*$`);
1299
+ const maskPositionProperties = ['maskPosition'];
1300
+ const maskRepeatRegex = new RegExp(`^(${backgroundRepeatSource})(,\\s*(${backgroundRepeatSource}))*$`);
1301
+ const maskRepeatProperties = ['maskRepeat'];
1302
+ const maskRepeatKeyword = 'stretch|repeat|round|space';
1303
+ const maskBorderRepeatRegex = new RegExp(`^((?:${maskRepeatKeyword}|${varString})(?:\\s+(?:${maskRepeatKeyword}|${varString}))?)$`);
1304
+ const maskBorderRepeatProperties = [
1305
+ 'maskBorderRepeat',
1306
+ 'borderImageRepeat',
1307
+ ];
1308
+ const maskSizeRegex = new RegExp(`^(${lengthValuePattern}|cover|contain|auto)(\\s+(${lengthValuePattern}|cover|contain|auto))?(,\\s*(${lengthValuePattern}|cover|contain|auto)(\\s+(${lengthValuePattern}|cover|contain|auto))?)*$`);
1309
+ const maskSizeProperties = ['maskSize'];
1310
+ const position = `${positionKeyword}|${lengthValuePattern}`;
1311
+ const bgSize = `${lengthValuePattern}|cover|contain|auto`;
1312
+ const positionPair = `(${position})( (?!\\s)(${position})){0,1}?`;
1313
+ const bgSizePair = `(${bgSize})( (?!\\s)(${bgSize})){0,1}?`;
1314
+ const maskLayerRegex = `(?:${gradientString}|${urlString})` +
1315
+ `(?:\\s+${positionPair})?` +
1316
+ `(?:\\s?/\\s?${bgSizePair})?` +
1317
+ `(?:\\s+${backgroundRepeatSource})?` +
1318
+ `(?:\\s+${maskOriginKeyword})?` +
1319
+ `(?:\\s+${maskClipKeyword})?` +
1320
+ `(?:\\s+${compositeKeyword})?` +
1321
+ `(?:\\s+${maskModeKeyword})?`;
1322
+ const maskRegex = new RegExp(`^${maskLayerRegex}(?:,(?:\\s+${maskLayerRegex}))*$`);
1323
+ const maskProperties = ['mask'];
1324
+ const mathDepthRegex = new RegExp(`^(${addString}|${integerPattern})$`);
1325
+ const mathDepthProperties = ['mathDepth'];
1326
+ const lengthPositionRegex = new RegExp(`^(${lengthValuePattern}|${positionKeyword})( (?!\\s)(${lengthValuePattern}|${positionKeyword})){0,3}$`);
1327
+ const lengthPositionProperties = [
1328
+ 'objectPosition',
1329
+ 'offsetAnchor',
1330
+ 'offsetPosition',
1331
+ 'perspectiveOrigin',
1332
+ ];
1333
+ const rayString = 'ray\\([^\\)]+\\)';
1334
+ const offsetPathRegex = new RegExp(`^(${rayString}|${urlString}|${basicShapeString}|${geometryBaseSet})$`);
1335
+ const offsetPathProperties = ['offsetPath'];
1336
+ const offsetRotateRegex = new RegExp(`^(${anglePattern}|auto|reverse)( (?!\\s)(${anglePattern})){0,1}$`);
1337
+ const offsetRotateProperties = ['offsetRotate'];
1338
+ const offsetPositionSource = lengthPositionRegex.source.slice(1, -1);
1339
+ const offsetRotateSource = offsetRotateRegex.source.slice(1, -1);
1340
+ const offsetPathSource = offsetPathRegex.source.slice(1, -1);
1341
+ const offsetRegex = new RegExp(`^(?!\\s)(?=\\S)(${offsetPositionSource})?\\s*(${offsetPathSource}(\\s(${lengthValuePattern}(\\s+${offsetRotateSource})?|${offsetRotateSource}))?)?\\s*(\\/\\s*${offsetPositionSource})?(?<!\\s)$`);
1342
+ const offsetProperties = ['offset'];
1343
+ const oveflowKeyword = `visible|hidden|clip|scroll|auto|${varString}`;
1344
+ const oveflowRegex = new RegExp(`^(${oveflowKeyword})(\\s+(${oveflowKeyword}))?$`);
1345
+ const oveflowProperties = ['overflow'];
1346
+ const overflowClipMarginRegex = new RegExp(`^(?:${lengthValuePattern}$|${visualBox}$|${lengthValuePattern}\\s+${visualBox}$|${visualBox}\\s+${lengthValuePattern}$)`);
1347
+ const overflowClipMarginProperties = ['overflowClipMargin'];
1348
+ const overscrollBehaviorRegex = new RegExp(`^(auto|contain|${varString})( (?!\\s)(auto|contain|${varString})){0,1}$`);
1349
+ const overscrollBehaviorProperties = ['overscrollBehavior'];
1350
+ const fill = `(fill|${varString})`;
1351
+ const stroke = `(stroke|${varString})`;
1352
+ const markers = `(markers|${varString})`;
1353
+ const paintOrderPattern = `(?:(${fill})(\\s+(${stroke}))?(\\s+(${markers}))?)?` +
1354
+ `(?:(${fill})(\\s+(${markers}))?(\\s+(${stroke}))?)?` +
1355
+ `(?:(${stroke})(\\s+(${fill}))?(\\s+(${markers}))?)?` +
1356
+ `(?:(${stroke})(\\s+(${markers}))?(\\s+(${fill}))?)?` +
1357
+ `(?:(${markers})(\\s+(${fill}))?(\\s+(${stroke}))?)?` +
1358
+ `(?:(${markers})(\\s+(${stroke}))?(\\s+(${fill}))?)?`;
1359
+ const paintOrderRegex = new RegExp(`^(${paintOrderPattern})$`);
1360
+ const paintOrderProperties = ['paintOrder'];
1361
+ const quotesRegex = new RegExp(`^(${stringString}|${varString})(\\s(${stringString}|${varString}))*$`);
1362
+ const quotesProperties = ['quotes'];
1363
+ const rotatePattern = `(?:(x|y|z|${varString})\\s+${anglePattern})?` +
1364
+ `(?:${numberPattern}\\s+${numberPattern}\\s+${numberPattern}\\s+${anglePattern})?` +
1365
+ `(?:${anglePattern})?`;
1366
+ const rotateRegex = new RegExp(`^(${rotatePattern})$`);
1367
+ const rotateProperties = ['rotate'];
1368
+ const numberAndPercentagePattern = `${numberPattern}|${percentagePattern}`;
1369
+ const scaleRegex = new RegExp(`^(${numberAndPercentagePattern})( (?!\\s)(${numberAndPercentagePattern})){0,2}$`);
1370
+ const scaleProperties = ['scale'];
1371
+ const scrollMarginRegex = new RegExp(`^(${lengthValuePattern})( (?!\\s)(${lengthValuePattern})){0,3}$`);
1372
+ const scrollMarginProperties = ['scrollMargin'];
1373
+ const scrollPaddingRegex = new RegExp(`^(${lengthValuePattern}|auto)( (?!\\s)(${lengthValuePattern}|auto)){0,3}$`);
1374
+ const scrollPaddingProperties = ['scrollPadding'];
1375
+ const scrollbarColorRegex = new RegExp(`^(${colorSource}(\\s${colorSource})?)$`);
1376
+ const scrollbarColorProperties = ['scrollbarColor'];
1377
+ const shapeImageThresholdRegex = new RegExp(`^(${numberAndPercentagePattern})$`);
1378
+ const shapeImageThresholdProperties = ['shapeImageThreshold'];
1379
+ const outsideShape = `(${insetString}|${circleString}|${ellipseString}|${polygonString}|${varString})`;
1380
+ const shapeVisualBox = 'margin-box|' + visualBox;
1381
+ const shapeOutsideRegex = new RegExp(`^(?:` +
1382
+ `(?:${outsideShape}(?:\\s+${shapeVisualBox})?)|` +
1383
+ `(?:${shapeVisualBox}(?:\\s+${outsideShape})?)|` +
1384
+ `${gradientString}|${urlString}|${varString}` +
1385
+ `)$`);
1386
+ const shapeOutsideProperties = ['shapeOutside'];
1387
+ const strokeRegex = new RegExp(`^${gradientString}|${urlString}|${colorSource}$`);
1388
+ const strokeProperties = ['stroke'];
1389
+ const strokeDasharrayRegex = new RegExp(`^(${numberPattern}|${lengthValuePattern})(,\\s(${numberPattern}|${lengthValuePattern}))*$`);
1390
+ const strokeDasharrayProperties = ['strokeDasharray'];
1391
+ const strokeMiterlimitRegex = new RegExp(`^(${numberPattern})$`);
1392
+ const strokeMiterlimitProperties = ['strokeMiterlimit'];
1393
+ const isValidTextDecorationLine = (value) => {
1394
+ const decorationValues = [
1395
+ 'underline',
1396
+ 'overline',
1397
+ 'line-through',
1398
+ 'blink',
1399
+ ];
1400
+ const usedValues = new Set();
1401
+ const trimmedValue = value.trim();
1402
+ if (value !== trimmedValue) {
1403
+ return false;
1404
+ }
1405
+ const tokens = value.trim().split(/\s+/);
1406
+ return tokens.every((token) => {
1407
+ if (token.startsWith('var(') && varRegex.test(token)) {
1408
+ return true;
1409
+ }
1410
+ if (decorationValues.includes(token) ||
1411
+ varString.includes(token)) {
1412
+ return !usedValues.has(token) && usedValues.add(token);
1413
+ }
1414
+ return false;
1415
+ });
1416
+ };
1417
+ const textDecorationProperties = ['textDecorationLine'];
1418
+ const textIndentRegex = new RegExp(`^(${lengthValuePattern})(\\s(hanging|${varString})?)?(\\s(each-line|${varString})?)?$`);
1419
+ const textIndentProperties = ['textIndent'];
1420
+ const textShadowRegex = new RegExp(`^(?:(?:(${colorSource})\\s+)?(${lengthValuePattern})\\s+(${lengthValuePattern})(?:\\s+(${lengthValuePattern}))?(?:\\s+(${colorSource}))?(?:\\s*,\\s*(?:(${colorSource})\\s+)?(${lengthValuePattern})\\s+(${lengthValuePattern})(?:\\s+(${lengthValuePattern}))?(?:\\s+(${colorSource}))?)*|none)$`);
1421
+ const textShadowProperties = ['textShadow'];
1422
+ const alignKeyword = `start|end|center|flex-start|flex-end|${varString}`;
1423
+ const firstLast = `first|last|${varString}`;
1424
+ const baseline = `baseline|${varString}`;
1425
+ const touchActionProperties = ['touchAction'];
1426
+ const alignContentRegex = new RegExp(`^(((safe|unsafe|${varString})\\s+(${alignKeyword}))|(${firstLast})\\s+(${baseline}))$`);
1427
+ const alignContentProperties = ['alignContent'];
1428
+ const itemsSelfKeyword = `self-start|self-end|anchor-center|start|end|center|flex-start|flex-end|${varString}`;
1429
+ const alignItemsSelfRegex = new RegExp(`^(((safe|unsafe|${varString})\\s+(${itemsSelfKeyword}))|(${firstLast})\\s+(${baseline}))$`);
1430
+ const alignItemsSelfProperties = ['alignItems', 'alignSelf'];
1431
+ const leftGroup = `block|inline|${varString}`;
1432
+ const rightGroup = `flex|flow|flow-root|table|grid|ruby|math|run-in|${varString}`;
1433
+ const listItem = `list-item|${varString}`;
1434
+ const listItemRightGroup = `block|inline|flow|flow-root|run-in|${varString}`;
1435
+ const displayRegex = new RegExp(`^(((${leftGroup})\\s+(${rightGroup}))|(${listItem})\\s+(${listItemRightGroup}))$`);
1436
+ const displayProperties = ['display'];
1437
+ const direction = 'row|row-reverse|column|column-reverse';
1438
+ const wrap = 'nowrap|wrap|wrap-reverse';
1439
+ const flexFlowRegex = new RegExp(`^((${direction}|${varString})(\\s+(${wrap}|${varString})))$`);
1440
+ const flexFlowProperties = ['flexFlow'];
1441
+ const first = `(first|${varString})`;
1442
+ const last = `(last|${varString})`;
1443
+ const forceAllow = `(force-end|allow-end|${varString})`;
1444
+ const hangingPunctuationPattern = `(?:${first}(?:\\s+${forceAllow})?)?` +
1445
+ `(?:${last}(?:\\s+${forceAllow})?)?` +
1446
+ `(?:${first}\\s+${forceAllow}\\s+${last})?` +
1447
+ `(?:${first}\\s+${last})?`;
1448
+ const hangingPunctuationRegex = new RegExp(`^(${hangingPunctuationPattern})$`);
1449
+ const hangingPunctuationProperties = ['hangingPunctuation'];
1450
+ const justifyContentKeyword = `left|right|stretch|start|end|center|flex-start|flex-end|${varString}`;
1451
+ const justifyContentRegex = new RegExp(`^(((safe|unsafe|${varString})\\s+(${justifyContentKeyword}))|(${firstLast})\\s+(${baseline}))$`);
1452
+ const justifyContentProperties = ['justifyContent'];
1453
+ const justifyItemsSelfKeyword = `left|right|anchor-center|stretch|self-start|self-end|start|end|center|flex-start|flex-end|${varString}`;
1454
+ const justifySelfRegex = new RegExp(`^(((safe|unsafe|${varString})\\s+(${justifyItemsSelfKeyword}))|(${firstLast})\\s+(${baseline}))$`);
1455
+ const justifySelfProperties = ['justifySelf'];
1456
+ const legacyValues = `(legacy|${varString})\\s+(left|right|center|${varString})`;
1457
+ const justifyItemsRegex = new RegExp(`^(((safe|unsafe|${varString})\\s+(${justifyItemsSelfKeyword}))|(${firstLast})\\s+(${baseline})|(${legacyValues}))$`);
1458
+ const justifyItemsProperties = ['justifyItems'];
1459
+ const scrollSnapAlignKeyword = 'start|end|center';
1460
+ const scrollSnapAlignRegex = new RegExp(`^((?:${scrollSnapAlignKeyword}|${varString})(?:\\s+(?:${scrollSnapAlignKeyword}|${varString}))?)$`);
1461
+ const scrollSnapAlignProperties = ['scrollSnapAlign'];
1462
+ const scrollSnapTypeKeyword = 'x|y|block|inline|both';
1463
+ const snapStrictKeyowrd = 'mandatory|proximity';
1464
+ const scrollSnapTypeRegex = new RegExp(`^((?:${scrollSnapTypeKeyword}|${varString})(?:\\s+(?:${snapStrictKeyowrd}|${varString}))?)$`);
1465
+ const scrollSnapTypeProperties = ['scrollSnapType'];
1466
+ const leftRight = `left|right|${varString}`;
1467
+ const overUnder = `over|under|${varString}`;
1468
+ const textEmphasisPositionRegex = new RegExp(`^(((?:${overUnder})(?:\\s+(?:${leftRight}))|(?:${leftRight})(?:\\s+(?:${overUnder})))?)$`);
1469
+ const textEmphasisPositionProperties = ['textEmphasisPosition'];
1470
+ const filledOpen = `filled|open|${varString}`;
1471
+ const emphasisStyleKeyword = `dot|circle|double-circle|triangle|sesame|${varString}`;
1472
+ const textEmphasisStyleRegex = new RegExp(`^(((?:${filledOpen})(?:\\s+(?:${emphasisStyleKeyword})))?|${stringString}?)$`);
1473
+ const textEmphasisStyleProperties = ['textEmphasisStyle'];
1474
+ const textEmphasisStyleSource = textEmphasisStyleRegex.source.slice(1, -1);
1475
+ const textEmphasisRegex = new RegExp(`^(${textEmphasisStyleSource})(\\s(${colorSource}))?$`);
1476
+ const textEmphasisProperties = ['textEmphasis'];
1477
+ const transformValue = `(${lengthValuePattern}|left|center|right|top|bottom)`;
1478
+ const transformOriginRegex = new RegExp(`^(${transformValue})(\\s(${transformValue}))?(\\s(${transformValue}))?$`);
1479
+ const transformOriginProperties = ['transformOrigin'];
1480
+ const transformRegex = new RegExp(`^((${transformFunctions})(\\s+(${transformFunctions}))*)?$`);
1481
+ const transformProperties = ['transform'];
1482
+ const translateRegex = new RegExp(`^(${lengthValuePattern}|${percentagePattern})(\\s(${lengthValuePattern}|${percentagePattern}))?(\\s(${lengthValuePattern}))?$`);
1483
+ const translateProperties = ['translate'];
1484
+ const placeContentProperties = ['placeContent'];
1485
+ const placeItemsProperties = ['placeItems'];
1486
+ const placeSelfProperties = ['placeSelf'];
1487
+ if (translateProperties.includes(key)) {
1488
+ if (!translateRegex.test(value) && globalValue) {
1489
+ report();
1490
+ }
1491
+ }
1492
+ else if (transformProperties.includes(key)) {
1493
+ if (!transformRegex.test(value) && globalValue) {
1494
+ report();
1495
+ }
1496
+ }
1497
+ else if (transformOriginProperties.includes(key)) {
1498
+ if (!transformOriginRegex.test(value) && globalValue) {
1499
+ report();
1500
+ }
1501
+ }
1502
+ else if (textEmphasisProperties.includes(key)) {
1503
+ if (!textEmphasisRegex.test(value) && globalValue) {
1504
+ report();
1505
+ }
1506
+ }
1507
+ else if (textEmphasisStyleProperties.includes(key)) {
1508
+ if (!textEmphasisStyleRegex.test(value) && globalValue) {
1509
+ report();
1510
+ }
1511
+ }
1512
+ else if (textEmphasisPositionProperties.includes(key)) {
1513
+ if (!textEmphasisPositionRegex.test(value) && globalValue) {
1514
+ report();
1515
+ }
1516
+ }
1517
+ else if (scrollSnapTypeProperties.includes(key)) {
1518
+ if (!scrollSnapTypeRegex.test(value) && globalValue) {
1519
+ report();
1520
+ }
1521
+ }
1522
+ else if (scrollSnapAlignProperties.includes(key)) {
1523
+ if (!scrollSnapAlignRegex.test(value) && globalValue) {
1524
+ report();
1525
+ }
1526
+ }
1527
+ else if (maskBorderRepeatProperties.includes(key)) {
1528
+ if (!maskBorderRepeatRegex.test(value) && globalValue) {
1529
+ report();
1530
+ }
1531
+ }
1532
+ else if (justifyItemsProperties.includes(key)) {
1533
+ if (!justifyItemsRegex.test(value) && globalValue) {
1534
+ report();
1535
+ }
1536
+ }
1537
+ else if (justifySelfProperties.includes(key)) {
1538
+ if (!justifySelfRegex.test(value) && globalValue) {
1539
+ report();
1540
+ }
1541
+ }
1542
+ else if (justifyContentProperties.includes(key)) {
1543
+ if (!justifyContentRegex.test(value) && globalValue) {
1544
+ report();
1545
+ }
1546
+ }
1547
+ else if (hangingPunctuationProperties.includes(key)) {
1548
+ if (!hangingPunctuationRegex.test(value) && globalValue) {
1549
+ report();
1550
+ }
1551
+ }
1552
+ else if (flexFlowProperties.includes(key)) {
1553
+ if (!flexFlowRegex.test(value) && globalValue) {
1554
+ report();
1555
+ }
1556
+ }
1557
+ else if (backgroundRepeatProperties.includes(key)) {
1558
+ if (!backgroundRepeatRegex.test(value) && globalValue) {
1559
+ report();
1560
+ }
1561
+ }
1562
+ else if (placeSelfProperties.includes(key)) {
1563
+ if (!(0, place_1.isValidPlaceSelf)(value) && globalValue) {
1564
+ report();
1565
+ }
1566
+ }
1567
+ else if (placeItemsProperties.includes(key)) {
1568
+ if (!(0, place_1.isValidPlaceItems)(value) && globalValue) {
1569
+ report();
1570
+ }
1571
+ }
1572
+ else if (placeContentProperties.includes(key)) {
1573
+ if (!(0, place_1.isValidPlaceContent)(value) && globalValue) {
1574
+ report();
1575
+ }
1576
+ }
1577
+ else if (displayProperties.includes(key)) {
1578
+ if (!displayRegex.test(value) && globalValue) {
1579
+ report();
1580
+ }
1581
+ }
1582
+ else if (alignItemsSelfProperties.includes(key)) {
1583
+ if (!alignItemsSelfRegex.test(value) && globalValue) {
1584
+ report();
1585
+ }
1586
+ }
1587
+ else if (alignContentProperties.includes(key)) {
1588
+ if (!alignContentRegex.test(value) && globalValue) {
1589
+ report();
1590
+ }
1591
+ }
1592
+ else if (touchActionProperties.includes(key)) {
1593
+ if (!(0, place_1.isValidTouchAction)(value) && globalValue) {
1594
+ report();
1595
+ }
1596
+ }
1597
+ else if (textShadowProperties.includes(key)) {
1598
+ if (!textShadowRegex.test(value) && globalValue) {
1599
+ report();
1600
+ }
1601
+ }
1602
+ else if (textIndentProperties.includes(key)) {
1603
+ if (!textIndentRegex.test(value) && globalValue) {
1604
+ report();
1605
+ }
1606
+ }
1607
+ else if (textDecorationProperties.includes(key)) {
1608
+ if (!isValidTextDecorationLine(value) && globalValue) {
1609
+ report();
1610
+ }
1611
+ }
1612
+ else if (strokeMiterlimitProperties.includes(key)) {
1613
+ if (!strokeMiterlimitRegex.test(value) && globalValue) {
1614
+ report();
1615
+ }
1616
+ }
1617
+ else if (strokeDasharrayProperties.includes(key)) {
1618
+ if (!strokeDasharrayRegex.test(value) && globalValue) {
1619
+ report();
1620
+ }
1621
+ }
1622
+ else if (strokeProperties.includes(key)) {
1623
+ if (!strokeRegex.test(value) && globalValue) {
1624
+ report();
1625
+ }
1626
+ }
1627
+ else if (shapeOutsideProperties.includes(key)) {
1628
+ if (!shapeOutsideRegex.test(value) && globalValue) {
1629
+ report();
1630
+ }
1631
+ }
1632
+ else if (shapeImageThresholdProperties.includes(key)) {
1633
+ if (!shapeImageThresholdRegex.test(value) && globalValue) {
1634
+ report();
1635
+ }
1636
+ }
1637
+ else if (scrollbarColorProperties.includes(key)) {
1638
+ if (!scrollbarColorRegex.test(value) && globalValue) {
1639
+ report();
1640
+ }
1641
+ }
1642
+ else if (scrollPaddingProperties.includes(key)) {
1643
+ if (!scrollPaddingRegex.test(value) && globalValue) {
1644
+ report();
1645
+ }
1646
+ }
1647
+ else if (scrollMarginProperties.includes(key)) {
1648
+ if (!scrollMarginRegex.test(value) && globalValue) {
1649
+ report();
1650
+ }
1651
+ }
1652
+ else if (scaleProperties.includes(key)) {
1653
+ if (!scaleRegex.test(value) && globalValue) {
1654
+ report();
1655
+ }
1656
+ }
1657
+ else if (rotateProperties.includes(key)) {
1658
+ if (!rotateRegex.test(value) && globalValue) {
1659
+ report();
1660
+ }
1661
+ }
1662
+ else if (quotesProperties.includes(key)) {
1663
+ if (!quotesRegex.test(value) && globalValue) {
1664
+ report();
1665
+ }
1666
+ }
1667
+ else if (paintOrderProperties.includes(key)) {
1668
+ if (!paintOrderRegex.test(value) && globalValue) {
1669
+ report();
1670
+ }
1671
+ }
1672
+ else if (overscrollBehaviorProperties.includes(key)) {
1673
+ if (!overscrollBehaviorRegex.test(value) && globalValue) {
1674
+ report();
1675
+ }
1676
+ }
1677
+ else if (overflowClipMarginProperties.includes(key)) {
1678
+ if (!overflowClipMarginRegex.test(value) && globalValue) {
1679
+ report();
1680
+ }
1681
+ }
1682
+ else if (oveflowProperties.includes(key)) {
1683
+ if (!oveflowRegex.test(value) && globalValue) {
1684
+ report();
1685
+ }
1686
+ }
1687
+ else if (offsetProperties.includes(key)) {
1688
+ if (!offsetRegex.test(value) && globalValue) {
1689
+ report();
1690
+ }
1691
+ }
1692
+ else if (offsetPathProperties.includes(key)) {
1693
+ if (!offsetPathRegex.test(value) && globalValue) {
1694
+ report();
1695
+ }
1696
+ }
1697
+ else if (offsetRotateProperties.includes(key)) {
1698
+ if (!offsetRotateRegex.test(value) && globalValue) {
1699
+ report();
1700
+ }
1701
+ }
1702
+ else if (lengthPositionProperties.includes(key)) {
1703
+ if (!lengthPositionRegex.test(value)) {
1704
+ report();
1705
+ }
1706
+ }
1707
+ else if (mathDepthProperties.includes(key)) {
1708
+ if (!mathDepthRegex.test(value) && globalValue) {
1709
+ report();
1710
+ }
1711
+ }
1712
+ else if (maskProperties.includes(key)) {
1713
+ if (!maskRegex.test(value) && globalValue) {
1714
+ report();
1715
+ }
1716
+ }
1717
+ else if (maskBorderProperties.includes(key)) {
1718
+ if (!maskBorderRegex.test(value) && globalValue) {
1719
+ report();
1720
+ }
1721
+ }
1722
+ else if (maskSizeProperties.includes(key)) {
1723
+ if (!maskSizeRegex.test(value) && globalValue) {
1724
+ report();
1725
+ }
1726
+ }
1727
+ else if (maskRepeatProperties.includes(key)) {
1728
+ if (!maskRepeatRegex.test(value) && globalValue) {
1729
+ report();
1730
+ }
1731
+ }
1732
+ else if (maskPositionProperties.includes(key)) {
1733
+ if (!maskPositionRegex.test(value) && globalValue) {
1734
+ report();
1735
+ }
1736
+ }
1737
+ else if (maskOriginProperties.includes(key)) {
1738
+ if (!maskOriginRegex.test(value) && globalValue) {
1739
+ report();
1740
+ }
1741
+ }
1742
+ else if (maksModeProperties.includes(key)) {
1743
+ if (!maskModeRegex.test(value) && globalValue) {
1744
+ report();
1745
+ }
1746
+ }
1747
+ else if (maskCompositeProperties.includes(key)) {
1748
+ if (!maskCompositeRegex.test(value) && globalValue) {
1749
+ report();
1750
+ }
1751
+ }
1752
+ else if (maskClipProperties.includes(key)) {
1753
+ if (!maskClipRegex.test(value) && globalValue) {
1754
+ report();
1755
+ }
1756
+ }
1757
+ else if (maskBorderWidthProperties.includes(key)) {
1758
+ if (!maskBorderWidthRegex.test(value) && globalValue) {
1759
+ report();
1760
+ }
1761
+ }
1762
+ else if (maskBorderSliceProperties.includes(key)) {
1763
+ if (!maskBorderSliceRegex.test(value) && globalValue) {
1764
+ report();
1765
+ }
1766
+ }
1767
+ else if (maskBorderOutsetProperties.includes(key)) {
1768
+ if (!maskBorderOutsetRegex.test(value) && globalValue) {
1769
+ report();
1770
+ }
1771
+ }
1772
+ else if (markerProperties.includes(key)) {
1773
+ if (!urlRegex.test(value) && globalValue) {
1774
+ report();
1775
+ }
1776
+ }
1777
+ else if (marginPairProperties.includes(key)) {
1778
+ if (!marginPairRegex.test(value) && globalValue) {
1779
+ report();
1780
+ }
1781
+ }
1782
+ else if (insetPairProperties.includes(key)) {
1783
+ if (!insetPairRegex.test(value) && globalValue) {
1784
+ report();
1785
+ }
1786
+ }
1787
+ else if (initialLetterProperties.includes(key)) {
1788
+ if (!initialLetterRegex.test(value) && globalValue) {
1789
+ report();
1790
+ }
1791
+ }
1792
+ else if (imageOrientationProperties.includes(key)) {
1793
+ if (!imageOrientationRegex.test(value) && globalValue) {
1794
+ report();
1795
+ }
1796
+ }
1797
+ else if (hyphenateLimitCharsProperties.includes(key)) {
1798
+ if (!hyphenateLimitCharsRegex.test(value) && globalValue) {
1799
+ report();
1800
+ }
1801
+ }
1802
+ else if (gridProperties.includes(key)) {
1803
+ if (!gridRegex.test(value)) {
1804
+ report();
1805
+ }
1806
+ }
1807
+ else if (gridTemplateProperties.includes(key)) {
1808
+ if (!isValidateGridTemplate(value) && globalValue) {
1809
+ report();
1810
+ }
1811
+ }
1812
+ else if (gridTemplateTrackListProperties.includes(key)) {
1813
+ if (!gridTemplateTrackListRegex.test(value) && globalValue) {
1814
+ report();
1815
+ }
1816
+ }
1817
+ else if (gridTemplateAreasProperties.includes(key)) {
1818
+ if (!quoteRegex.test(value) && globalValue) {
1819
+ report();
1820
+ }
1821
+ }
1822
+ else if (gridAutoColumnsRowsProperties.includes(key)) {
1823
+ if (!gridAutoColumnsRegex.test(value) && globalValue) {
1824
+ report();
1825
+ }
1826
+ }
1827
+ else if (stringNameProperties.includes(key)) {
1828
+ if (!stringNameRegex.test(value) && globalValue) {
1829
+ report();
1830
+ }
1831
+ }
1832
+ else if (fontFeatureSettingsProperties.includes(key)) {
1833
+ if (!fontFeatureSettingsRegex.test(value) && globalValue) {
1834
+ report();
1835
+ }
1836
+ }
1837
+ else if (fontVariantProperties.includes(key)) {
1838
+ if (!fontVariantRegex.test(value) && globalValue) {
1839
+ report();
1840
+ }
1841
+ }
1842
+ else if (fontVariationSettingsProperties.includes(key)) {
1843
+ if (!fontVariationSettingsRegex.test(value) && globalValue) {
1844
+ report();
1845
+ }
1846
+ }
1847
+ else if (fontVariantNumericProperties.includes(key)) {
1848
+ if (!fontVariantNumericRegex.test(value) && globalValue) {
1849
+ report();
1850
+ }
1851
+ }
1852
+ else if (fontVariantLigaturesProperties.includes(key)) {
1853
+ if (!fontVariantLigaturesRegex.test(value) && globalValue) {
1854
+ report();
1855
+ }
1856
+ }
1857
+ else if (fontVariantEastAsianProperties.includes(key)) {
1858
+ if (!isValidFontVariantEastAsian(value) && globalValue) {
1859
+ report();
1860
+ }
1861
+ }
1862
+ else if (fontVariantAlternatesProperties.includes(key)) {
1863
+ if (!fontVariantAlternatesRegex.test(value) && globalValue) {
1864
+ report();
1865
+ }
1866
+ }
1867
+ else if (fontSynthesisProperties.includes(key)) {
1868
+ if (!fontSynthesisRegex.test(value) && globalValue) {
1869
+ report();
1870
+ }
1871
+ }
1872
+ else if (fontStyleProperties.includes(key)) {
1873
+ if (!fontStyleRegex.test(value) && globalValue) {
1874
+ report();
1875
+ }
1876
+ }
1877
+ else if (fontPaletteProperties.includes(key)) {
1878
+ if (!fontPaletteRegex.test(value) && globalValue) {
1879
+ report();
1880
+ }
1881
+ }
1882
+ else if (fontSizeAdjustProperties.includes(key)) {
1883
+ if (!isValidFontSizeAdjust(value) && globalValue) {
1884
+ report();
1885
+ }
1886
+ }
1887
+ else if (stringStringProperties.includes(key)) {
1888
+ if (!stringValueRegex.test(value) && globalValue) {
1889
+ report();
1890
+ }
1891
+ }
1892
+ else if (fontStretchProperties.includes(key)) {
1893
+ if (!percentageValueRegex.test(value) && globalValue) {
1894
+ report();
1895
+ }
1896
+ }
1897
+ else if (flexProperty.includes(key)) {
1898
+ if (!isValidFlexValue(value) && globalValue) {
1899
+ report();
1900
+ }
1901
+ }
1902
+ else if (cursorProperty.includes(key)) {
1903
+ if (!isValidCursor(value) && globalValue) {
1904
+ report();
1905
+ }
1906
+ }
1907
+ else if (contentProperty.includes(key)) {
1908
+ if (!contentValueRegex.test(value) && globalValue) {
1909
+ report();
1910
+ }
1911
+ }
1912
+ else if (columnsProperties.includes(key)) {
1913
+ if (!columnsRegex.test(value) && globalValue) {
1914
+ report();
1915
+ }
1916
+ }
1917
+ else if (clipPathProperties.includes(key)) {
1918
+ if (!clipPathRegex.test(value) && globalValue) {
1919
+ report();
1920
+ }
1921
+ }
1922
+ else if (boxShadowProperties.includes(key)) {
1923
+ if (!boxShadowRegex.test(value) && globalValue) {
1924
+ report();
1925
+ }
1926
+ }
1927
+ else if (backgroundProperties.includes(key)) {
1928
+ if (!backgroundRegex.test(value) && globalValue) {
1929
+ report();
1930
+ }
1931
+ }
1932
+ else if (backgroundAttachmentProperties.includes(key)) {
1933
+ if (!backgroundAttachmentRegex.test(value) && globalValue) {
1934
+ report();
1935
+ }
1936
+ }
1937
+ else if (backgroundBlendModeProperties.includes(key)) {
1938
+ if (!backgroundBlendModeRegex.test(value) && globalValue) {
1939
+ report();
1940
+ }
1941
+ }
1942
+ else if (backgroundImageProperties.includes(key)) {
1943
+ if (!backgroundImageRegex.test(value) && globalValue) {
1944
+ report();
1945
+ }
1946
+ }
1947
+ else if (backgroundOriginProperties.includes(key)) {
1948
+ if (!backgroundOriginRegex.test(value) && globalValue) {
1949
+ report();
1950
+ }
1951
+ }
1952
+ else if (backgroundQuadProperties.includes(key)) {
1953
+ if (!backgroundQuadRegex.test(value) && globalValue) {
1954
+ report();
1955
+ }
1956
+ }
1957
+ else if (backgroundPairProperties.includes(key)) {
1958
+ if (!backgroundPairRegex.test(value) && globalValue) {
1959
+ report();
1960
+ }
1961
+ }
1962
+ else if (filterProperties.includes(key)) {
1963
+ if (!filterRegex.test(value) && globalValue) {
1964
+ report();
1965
+ }
1966
+ }
1967
+ else if (animationTimingFunctionProperties.includes(key)) {
1968
+ if (!animationTimingFunctionRegex.test(value) && globalValue) {
1969
+ report();
1970
+ }
1971
+ }
1972
+ else if (animationIterationCountProperties.includes(key)) {
1973
+ if (!animationIterationCountRegex.test(value) && globalValue) {
1974
+ report();
1975
+ }
1976
+ }
1977
+ else if (animationPlayStateProperties.includes(key)) {
1978
+ if (!animationPlayStateRegex.test(value) && globalValue) {
1979
+ report();
1980
+ }
1981
+ }
1982
+ else if (animationFillModeProperties.includes(key)) {
1983
+ if (!animationFillModeRegex.test(value) && globalValue) {
1984
+ report();
1985
+ }
1986
+ }
1987
+ else if (animationDirectionProperties.includes(key)) {
1988
+ if (!animationDirectionRegex.test(value) && globalValue) {
1989
+ report();
1990
+ }
1991
+ }
1992
+ else if (animationTimeProperties.includes(key)) {
1993
+ if (!animationTimeRegex.test(value) && globalValue) {
1994
+ report();
1995
+ }
1996
+ }
1997
+ else if (aspectRatioProperties.includes(key)) {
1998
+ if (!aspectRatioRegex.test(value) && globalValue) {
1999
+ report();
2000
+ }
2001
+ }
2002
+ else if (borderImageProperties.includes(key)) {
2003
+ if (!borderImageRegex.test(value) && globalValue) {
2004
+ report();
2005
+ }
2006
+ }
2007
+ else if (borderImageSlice.includes(key)) {
2008
+ if (!sliceRegex.test(value) && globalValue) {
2009
+ report();
2010
+ }
2011
+ }
2012
+ else if (ImageSourceProperties.includes(key)) {
2013
+ if (!imageRegex.test(value) && globalValue) {
2014
+ report();
2015
+ }
2016
+ }
2017
+ else if (borderProperties.includes(key)) {
2018
+ if (!isBorderValue(value) && globalValue) {
2019
+ report();
2020
+ }
2021
+ }
2022
+ else if (singleColorProperties.includes(key)) {
2023
+ if (!colorRegex.test(value) && globalValue) {
2024
+ report();
2025
+ }
2026
+ }
2027
+ else if (borderColorProperties.includes(key)) {
2028
+ if (!isValidMultipleColorValues(value) && globalValue) {
2029
+ report();
2030
+ }
2031
+ }
2032
+ else if (integerGroupProperties.includes(key)) {
2033
+ if (!integerValueRegex.test(value) && globalValue) {
2034
+ report();
2035
+ }
2036
+ }
2037
+ else if (otherGroupProperties.includes(key)) {
2038
+ if (!otherSingleValueRegex.test(value) && globalValue) {
2039
+ report();
2040
+ }
2041
+ }
2042
+ else if (lengthValueProperties.includes(key)) {
2043
+ if (!lengthValueRegex.test(value) && globalValue) {
2044
+ report();
2045
+ }
2046
+ }
2047
+ else if (borderRadiusProperties.includes(key)) {
2048
+ if (!borderRadiusRegex.test(value) && globalValue) {
2049
+ report();
2050
+ }
2051
+ }
2052
+ else if (borderStyleProperties.includes(key)) {
2053
+ if (!borderStyleRegex.test(value) && globalValue) {
2054
+ report();
2055
+ }
2056
+ }
2057
+ else if (multipleValueProperties.includes(key)) {
2058
+ if (!multipleValueRegex.test(value) && globalValue) {
2059
+ report();
2060
+ }
2061
+ }
2062
+ else {
2063
+ if (globalValue) {
2064
+ report();
2065
+ }
2066
+ }
2067
+ }
2068
+ }
2069
+ });
2070
+ },
2071
+ };
2072
+ },
2073
+ });