@tamagui/style-grammar 3.0.0-beta.924.1 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/ast/payloadShape.cjs +45 -17
- package/dist/cjs/ast/payloadShape.native.cjs +45 -17
- package/dist/cjs/ast/payloadShape.native.js +45 -17
- package/dist/cjs/ast/payloadShape.native.js.map +1 -1
- package/dist/cjs/ast/resolvePayload.cjs +16 -9
- package/dist/cjs/ast/resolvePayload.native.cjs +16 -9
- package/dist/cjs/ast/resolvePayload.native.js +16 -9
- package/dist/cjs/ast/resolvePayload.native.js.map +1 -1
- package/dist/cjs/programs/lowerProgram.cjs +2 -2
- package/dist/cjs/programs/lowerProgram.native.cjs +2 -2
- package/dist/cjs/programs/lowerProgram.native.js +2 -2
- package/dist/cjs/programs/lowerProgram.native.js.map +1 -1
- package/dist/cjs/runtime/clauseIdentity.cjs +9 -28
- package/dist/cjs/runtime/clauseIdentity.native.cjs +9 -28
- package/dist/cjs/runtime/clauseIdentity.native.js +9 -28
- package/dist/cjs/runtime/clauseIdentity.native.js.map +1 -1
- package/dist/cjs/runtime/clausePrecedence.cjs +2 -2
- package/dist/cjs/runtime/clausePrecedence.native.cjs +3 -10
- package/dist/cjs/runtime/clausePrecedence.native.js +3 -10
- package/dist/cjs/runtime/clausePrecedence.native.js.map +1 -1
- package/dist/cjs/runtime/modifierVocabulary.native.cjs +1 -8
- package/dist/cjs/runtime/modifierVocabulary.native.js +1 -8
- package/dist/cjs/runtime/modifierVocabulary.native.js.map +1 -1
- package/dist/cjs/runtime/scanFlatValue.cjs +58 -7
- package/dist/cjs/runtime/scanFlatValue.native.cjs +58 -7
- package/dist/cjs/runtime/scanFlatValue.native.js +58 -7
- package/dist/cjs/runtime/scanFlatValue.native.js.map +1 -1
- package/dist/cjs/runtime/spring.cjs +123 -0
- package/dist/cjs/runtime/spring.native.cjs +131 -0
- package/dist/cjs/runtime/spring.native.js +133 -0
- package/dist/cjs/runtime/spring.native.js.map +1 -0
- package/dist/cjs/runtime/stateModifiers.cjs +23 -1
- package/dist/cjs/runtime/stateModifiers.native.cjs +23 -1
- package/dist/cjs/runtime/stateModifiers.native.js +23 -1
- package/dist/cjs/runtime/stateModifiers.native.js.map +1 -1
- package/dist/cjs/runtime/tokenCategories.cjs +3 -0
- package/dist/cjs/runtime/tokenCategories.native.cjs +3 -0
- package/dist/cjs/runtime/tokenCategories.native.js +3 -0
- package/dist/cjs/runtime/tokenCategories.native.js.map +1 -1
- package/dist/cjs/runtime/unitlessNumbers.cjs +0 -5
- package/dist/cjs/runtime/unitlessNumbers.native.cjs +0 -5
- package/dist/cjs/runtime/unitlessNumbers.native.js +0 -5
- package/dist/cjs/runtime/unitlessNumbers.native.js.map +1 -1
- package/dist/cjs/runtime.cjs +11 -0
- package/dist/cjs/runtime.native.cjs +11 -0
- package/dist/cjs/runtime.native.js +11 -0
- package/dist/cjs/runtime.native.js.map +1 -1
- package/dist/cjs/shorthands/transition.cjs +111 -36
- package/dist/cjs/shorthands/transition.native.cjs +113 -36
- package/dist/cjs/shorthands/transition.native.js +113 -36
- package/dist/cjs/shorthands/transition.native.js.map +1 -1
- package/dist/cjs/shorthands/transitionAlign.cjs +13 -10
- package/dist/cjs/shorthands/transitionAlign.native.cjs +14 -11
- package/dist/cjs/shorthands/transitionAlign.native.js +14 -11
- package/dist/cjs/shorthands/transitionAlign.native.js.map +1 -1
- package/dist/cjs/shorthands/transitionLegacy.cjs +263 -126
- package/dist/cjs/shorthands/transitionLegacy.native.cjs +333 -155
- package/dist/cjs/shorthands/transitionLegacy.native.js +333 -155
- package/dist/cjs/shorthands/transitionLegacy.native.js.map +1 -1
- package/dist/cjs/shorthands/transitionNative.cjs +5 -5
- package/dist/cjs/shorthands/transitionNative.native.cjs +8 -7
- package/dist/cjs/shorthands/transitionNative.native.js +8 -7
- package/dist/cjs/shorthands/transitionNative.native.js.map +1 -1
- package/dist/cjs/shorthands/transitionObject.cjs +302 -0
- package/dist/cjs/shorthands/transitionObject.native.cjs +347 -0
- package/dist/cjs/shorthands/transitionObject.native.js +349 -0
- package/dist/cjs/shorthands/transitionObject.native.js.map +1 -0
- package/dist/cjs/tooling/candidate.cjs +254 -15
- package/dist/cjs/tooling/candidate.native.cjs +314 -62
- package/dist/cjs/tooling/candidate.native.js +314 -62
- package/dist/cjs/tooling/candidate.native.js.map +1 -1
- package/dist/cjs/tooling/config.cjs +19 -9
- package/dist/cjs/tooling/config.native.cjs +25 -26
- package/dist/cjs/tooling/config.native.js +25 -26
- package/dist/cjs/tooling/config.native.js.map +1 -1
- package/dist/cjs/tooling/registry.cjs +579 -11
- package/dist/cjs/tooling/registry.native.cjs +579 -11
- package/dist/cjs/tooling/registry.native.js +579 -11
- package/dist/cjs/tooling/registry.native.js.map +1 -1
- package/dist/cjs/tooling/toolingDiagnostics.cjs +306 -10
- package/dist/cjs/tooling/toolingDiagnostics.native.cjs +408 -48
- package/dist/cjs/tooling/toolingDiagnostics.native.js +408 -48
- package/dist/cjs/tooling/toolingDiagnostics.native.js.map +1 -1
- package/dist/cjs/tooling/toolingRegistry.cjs +6 -1
- package/dist/cjs/tooling/toolingRegistry.native.cjs +9 -1
- package/dist/cjs/tooling/toolingRegistry.native.js +9 -1
- package/dist/cjs/tooling/toolingRegistry.native.js.map +1 -1
- package/dist/cjs/tooling.cjs +1 -0
- package/dist/cjs/tooling.native.cjs +1 -0
- package/dist/cjs/tooling.native.js +1 -0
- package/dist/cjs/tooling.native.js.map +1 -1
- package/dist/cjs/transitions.cjs +38 -0
- package/dist/cjs/transitions.native.cjs +40 -0
- package/dist/cjs/transitions.native.js +42 -0
- package/dist/cjs/transitions.native.js.map +1 -0
- package/dist/esm/ast/payloadShape.mjs +45 -17
- package/dist/esm/ast/payloadShape.mjs.map +1 -1
- package/dist/esm/ast/payloadShape.native.js +45 -17
- package/dist/esm/ast/payloadShape.native.js.map +1 -1
- package/dist/esm/ast/resolvePayload.mjs +16 -9
- package/dist/esm/ast/resolvePayload.mjs.map +1 -1
- package/dist/esm/ast/resolvePayload.native.js +16 -9
- package/dist/esm/ast/resolvePayload.native.js.map +1 -1
- package/dist/esm/programs/lowerProgram.mjs +2 -2
- package/dist/esm/programs/lowerProgram.mjs.map +1 -1
- package/dist/esm/programs/lowerProgram.native.js +2 -2
- package/dist/esm/programs/lowerProgram.native.js.map +1 -1
- package/dist/esm/runtime/clauseIdentity.mjs +2 -22
- package/dist/esm/runtime/clauseIdentity.mjs.map +1 -1
- package/dist/esm/runtime/clauseIdentity.native.js +2 -22
- package/dist/esm/runtime/clauseIdentity.native.js.map +1 -1
- package/dist/esm/runtime/clausePrecedence.mjs +2 -2
- package/dist/esm/runtime/clausePrecedence.mjs.map +1 -1
- package/dist/esm/runtime/clausePrecedence.native.js +3 -10
- package/dist/esm/runtime/clausePrecedence.native.js.map +1 -1
- package/dist/esm/runtime/modifierVocabulary.native.js +1 -8
- package/dist/esm/runtime/modifierVocabulary.native.js.map +1 -1
- package/dist/esm/runtime/scanFlatValue.mjs +59 -7
- package/dist/esm/runtime/scanFlatValue.mjs.map +1 -1
- package/dist/esm/runtime/scanFlatValue.native.js +59 -7
- package/dist/esm/runtime/scanFlatValue.native.js.map +1 -1
- package/dist/esm/runtime/spring.mjs +93 -0
- package/dist/esm/runtime/spring.mjs.map +1 -0
- package/dist/esm/runtime/spring.native.js +99 -0
- package/dist/esm/runtime/spring.native.js.map +1 -0
- package/dist/esm/runtime/stateModifiers.mjs +22 -2
- package/dist/esm/runtime/stateModifiers.mjs.map +1 -1
- package/dist/esm/runtime/stateModifiers.native.js +22 -2
- package/dist/esm/runtime/stateModifiers.native.js.map +1 -1
- package/dist/esm/runtime/tokenCategories.mjs +3 -0
- package/dist/esm/runtime/tokenCategories.mjs.map +1 -1
- package/dist/esm/runtime/tokenCategories.native.js +3 -0
- package/dist/esm/runtime/tokenCategories.native.js.map +1 -1
- package/dist/esm/runtime/unitlessNumbers.mjs +0 -5
- package/dist/esm/runtime/unitlessNumbers.mjs.map +1 -1
- package/dist/esm/runtime/unitlessNumbers.native.js +0 -5
- package/dist/esm/runtime/unitlessNumbers.native.js.map +1 -1
- package/dist/esm/runtime.mjs +4 -2
- package/dist/esm/runtime.native.js +4 -2
- package/dist/esm/shorthands/transition.mjs +111 -36
- package/dist/esm/shorthands/transition.mjs.map +1 -1
- package/dist/esm/shorthands/transition.native.js +113 -36
- package/dist/esm/shorthands/transition.native.js.map +1 -1
- package/dist/esm/shorthands/transitionAlign.mjs +13 -10
- package/dist/esm/shorthands/transitionAlign.mjs.map +1 -1
- package/dist/esm/shorthands/transitionAlign.native.js +14 -11
- package/dist/esm/shorthands/transitionAlign.native.js.map +1 -1
- package/dist/esm/shorthands/transitionLegacy.mjs +260 -126
- package/dist/esm/shorthands/transitionLegacy.mjs.map +1 -1
- package/dist/esm/shorthands/transitionLegacy.native.js +330 -155
- package/dist/esm/shorthands/transitionLegacy.native.js.map +1 -1
- package/dist/esm/shorthands/transitionNative.mjs +5 -5
- package/dist/esm/shorthands/transitionNative.mjs.map +1 -1
- package/dist/esm/shorthands/transitionNative.native.js +8 -7
- package/dist/esm/shorthands/transitionNative.native.js.map +1 -1
- package/dist/esm/shorthands/transitionObject.mjs +280 -0
- package/dist/esm/shorthands/transitionObject.mjs.map +1 -0
- package/dist/esm/shorthands/transitionObject.native.js +323 -0
- package/dist/esm/shorthands/transitionObject.native.js.map +1 -0
- package/dist/esm/tooling/candidate.mjs +250 -16
- package/dist/esm/tooling/candidate.mjs.map +1 -1
- package/dist/esm/tooling/candidate.native.js +310 -63
- package/dist/esm/tooling/candidate.native.js.map +1 -1
- package/dist/esm/tooling/config.mjs +18 -9
- package/dist/esm/tooling/config.mjs.map +1 -1
- package/dist/esm/tooling/config.native.js +24 -26
- package/dist/esm/tooling/config.native.js.map +1 -1
- package/dist/esm/tooling/registry.mjs +579 -11
- package/dist/esm/tooling/registry.mjs.map +1 -1
- package/dist/esm/tooling/registry.native.js +579 -11
- package/dist/esm/tooling/registry.native.js.map +1 -1
- package/dist/esm/tooling/toolingDiagnostics.mjs +306 -11
- package/dist/esm/tooling/toolingDiagnostics.mjs.map +1 -1
- package/dist/esm/tooling/toolingDiagnostics.native.js +408 -49
- package/dist/esm/tooling/toolingDiagnostics.native.js.map +1 -1
- package/dist/esm/tooling/toolingRegistry.mjs +6 -1
- package/dist/esm/tooling/toolingRegistry.mjs.map +1 -1
- package/dist/esm/tooling/toolingRegistry.native.js +9 -1
- package/dist/esm/tooling/toolingRegistry.native.js.map +1 -1
- package/dist/esm/tooling.mjs +2 -0
- package/dist/esm/tooling.native.js +2 -0
- package/dist/esm/transitions.mjs +5 -0
- package/dist/esm/transitions.native.js +5 -0
- package/package.json +21 -3
- package/src/ast/payloadShape.ts +44 -16
- package/src/ast/resolvePayload.ts +28 -13
- package/src/programs/lowerProgram.ts +9 -4
- package/src/runtime/clauseIdentity.ts +8 -31
- package/src/runtime/clausePrecedence.ts +2 -10
- package/src/runtime/scanFlatValue.ts +81 -9
- package/src/runtime/spring.ts +208 -0
- package/src/runtime/stateModifiers.ts +31 -1
- package/src/runtime/tokenCategories.ts +3 -0
- package/src/runtime/unitlessNumbers.ts +0 -5
- package/src/runtime.ts +13 -0
- package/src/shorthands/transition.ts +159 -44
- package/src/shorthands/transitionAlign.ts +22 -12
- package/src/shorthands/transitionLegacy.ts +376 -156
- package/src/shorthands/transitionNative.ts +8 -11
- package/src/shorthands/transitionObject.ts +369 -0
- package/src/tooling/candidate.ts +269 -14
- package/src/tooling/config.ts +25 -9
- package/src/tooling/registry.ts +339 -12
- package/src/tooling/toolingDiagnostics.ts +474 -9
- package/src/tooling/toolingRegistry.ts +6 -1
- package/src/tooling.ts +1 -0
- package/src/transitions.ts +42 -0
- package/types/ast/payloadShape.d.ts.map +2 -2
- package/types/ast/resolvePayload.d.ts +5 -4
- package/types/ast/resolvePayload.d.ts.map +2 -2
- package/types/programs/lowerProgram.d.ts +4 -2
- package/types/programs/lowerProgram.d.ts.map +2 -2
- package/types/runtime/clauseIdentity.d.ts +1 -4
- package/types/runtime/clauseIdentity.d.ts.map +2 -2
- package/types/runtime/clausePrecedence.d.ts.map +2 -2
- package/types/runtime/scanFlatValue.d.ts +1 -1
- package/types/runtime/scanFlatValue.d.ts.map +2 -2
- package/types/runtime/spring.d.ts +61 -0
- package/types/runtime/spring.d.ts.map +11 -0
- package/types/runtime/stateModifiers.d.ts +4 -0
- package/types/runtime/stateModifiers.d.ts.map +2 -2
- package/types/runtime/tokenCategories.d.ts.map +2 -2
- package/types/runtime/unitlessNumbers.d.ts.map +2 -2
- package/types/runtime.d.ts +3 -1
- package/types/runtime.d.ts.map +2 -2
- package/types/shorthands/transition.d.ts +26 -5
- package/types/shorthands/transition.d.ts.map +2 -2
- package/types/shorthands/transitionAlign.d.ts.map +2 -2
- package/types/shorthands/transitionLegacy.d.ts +19 -4
- package/types/shorthands/transitionLegacy.d.ts.map +2 -2
- package/types/shorthands/transitionNative.d.ts.map +1 -1
- package/types/shorthands/transitionObject.d.ts +49 -0
- package/types/shorthands/transitionObject.d.ts.map +11 -0
- package/types/tooling/candidate.d.ts +13 -0
- package/types/tooling/candidate.d.ts.map +2 -2
- package/types/tooling/config.d.ts +8 -1
- package/types/tooling/config.d.ts.map +2 -2
- package/types/tooling/registry.d.ts +4 -2
- package/types/tooling/registry.d.ts.map +2 -2
- package/types/tooling/toolingDiagnostics.d.ts +3 -1
- package/types/tooling/toolingDiagnostics.d.ts.map +2 -2
- package/types/tooling/toolingRegistry.d.ts.map +2 -2
- package/types/tooling.d.ts +1 -0
- package/types/tooling.d.ts.map +2 -2
- package/types/transitions.d.ts +5 -0
- package/types/transitions.d.ts.map +11 -0
|
@@ -38,13 +38,6 @@ module.exports = __toCommonJS(modifierVocabulary_exports);
|
|
|
38
38
|
var import_config = require("../tooling/config.native.js");
|
|
39
39
|
var import_clauseIdentity = require("./clauseIdentity.native.js");
|
|
40
40
|
var import_stateModifiers = require("./stateModifiers.native.js");
|
|
41
|
-
function _instanceof(left, right) {
|
|
42
|
-
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
43
|
-
return !!right[Symbol.hasInstance](left);
|
|
44
|
-
} else {
|
|
45
|
-
return left instanceof right;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
41
|
var configRevisionSymbol = /* @__PURE__ */ Symbol.for("tamagui.configRevision");
|
|
49
42
|
var modifierKindState = 1;
|
|
50
43
|
var modifierKindMedia = 2;
|
|
@@ -79,7 +72,7 @@ function forEachModifierName(source, visit) {
|
|
|
79
72
|
}
|
|
80
73
|
return;
|
|
81
74
|
}
|
|
82
|
-
if (
|
|
75
|
+
if (source instanceof Set) {
|
|
83
76
|
var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = void 0;
|
|
84
77
|
try {
|
|
85
78
|
for (var _iterator1 = source[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modifierVocabulary.native.js","names":[],"sources":["cjs/runtime/modifierVocabulary.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar modifierVocabulary_exports = {};\n__export(modifierVocabulary_exports, {\n compileModifierVocabulary: () => compileModifierVocabulary,\n configRevisionSymbol: () => configRevisionSymbol,\n forEachModifierName: () => forEachModifierName,\n isRootThemeName: () => isRootThemeName,\n modifierKindMedia: () => modifierKindMedia,\n modifierKindPlatform: () => modifierKindPlatform,\n modifierKindState: () => modifierKindState,\n modifierKindTheme: () => modifierKindTheme,\n modifierRefusalKindCollision: () => modifierRefusalKindCollision,\n modifierRefusalReservedContainerPrefix: () => modifierRefusalReservedContainerPrefix,\n modifierRefusalReservedGroupPrefix: () => modifierRefusalReservedGroupPrefix\n});\nmodule.exports = __toCommonJS(modifierVocabulary_exports);\nvar import_config = require(\"../tooling/config\");\nvar import_clauseIdentity = require(\"./clauseIdentity\");\nvar import_stateModifiers = require(\"./stateModifiers\");\nfunction _instanceof(left, right) {\n if (right != null && typeof Symbol !== \"undefined\" && right[Symbol.hasInstance]) {\n return !!right[Symbol.hasInstance](left);\n } else {\n return left instanceof right;\n }\n}\nvar configRevisionSymbol = /* @__PURE__ */ Symbol.for(\"tamagui.configRevision\");\nvar modifierKindState = 1;\nvar modifierKindMedia = 2;\nvar modifierKindPlatform = 3;\nvar modifierKindTheme = 4;\nvar modifierRefusalReservedContainerPrefix = 1;\nvar modifierRefusalReservedGroupPrefix = 2;\nvar modifierRefusalKindCollision = 3;\nfunction forEachModifierName(source, visit) {\n if (!source) return;\n var rank = 0;\n if (Array.isArray(source)) {\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = source[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var name = _step.value;\n visit(name, rank++);\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n return;\n }\n if (_instanceof(source, Set)) {\n var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = void 0;\n try {\n for (var _iterator1 = source[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) {\n var name1 = _step1.value;\n visit(name1, rank++);\n }\n } catch (err) {\n _didIteratorError1 = true;\n _iteratorError1 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion1 && _iterator1.return != null) {\n _iterator1.return();\n }\n } finally {\n if (_didIteratorError1) {\n throw _iteratorError1;\n }\n }\n }\n return;\n }\n for (var name2 in source) {\n visit(name2, rank++);\n }\n}\nfunction isRootThemeName(name) {\n return name.length > 0 && !name.includes(\"_\");\n}\nfunction compileModifierVocabulary(view, onRefusal, onRegistered) {\n var names = /* @__PURE__ */ Object.create(null);\n var register = function(name2, code) {\n var kind = code & 7;\n if (name2.charCodeAt(0) === 64) {\n onRefusal === null || onRefusal === void 0 ? void 0 : onRefusal(modifierRefusalReservedContainerPrefix, name2, kind, 0);\n return;\n }\n if (name2.startsWith(\"group-\")) {\n onRefusal === null || onRefusal === void 0 ? void 0 : onRefusal(modifierRefusalReservedGroupPrefix, name2, kind, 0);\n return;\n }\n var existing = names[name2];\n if (existing !== void 0) {\n if ((existing & 7) !== kind) {\n onRefusal === null || onRefusal === void 0 ? void 0 : onRefusal(modifierRefusalKindCollision, name2, kind, existing & 7);\n }\n return;\n }\n names[name2] = code;\n onRegistered === null || onRegistered === void 0 ? void 0 : onRegistered(name2);\n };\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = import_clauseIdentity.stateModifierNames[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var name = _step.value;\n var rank = import_stateModifiers.canonicalStateModifierNames.indexOf((0, import_clauseIdentity.canonicalClauseModifier)(name));\n register(name, modifierKindState | rank << 3);\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n forEachModifierName(view.mediaNames, function(name2, rank2) {\n return register(name2, modifierKindMedia | rank2 << 3);\n });\n var _view_platformNames;\n forEachModifierName((_view_platformNames = view.platformNames) !== null && _view_platformNames !== void 0 ? _view_platformNames : import_config.grammarPlatformNames, function(name2) {\n return register(name2, modifierKindPlatform | (0, import_config.grammarPlatformRank)(name2) << 3);\n });\n forEachModifierName(view.themeNames, function(name2) {\n if (isRootThemeName(name2)) register(name2, modifierKindTheme);\n });\n return names;\n}\n//# sourceMappingURL=modifierVocabulary.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,6BAA6B,CAAC;AAClC,SAAS,4BAA4B;CACnC,iCAAiC;CACjC,4BAA4B;CAC5B,2BAA2B;CAC3B,uBAAuB;CACvB,yBAAyB;CACzB,4BAA4B;CAC5B,yBAAyB;CACzB,yBAAyB;CACzB,oCAA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AA4B,MAAM,oBAAoB,OAAO,iBAAiB,KAAK;CACvF,IAAI;EACF,KAAK,IAAI,YAAY,sBAAsB,mBAAmB,OAAO,SAAS,CAAC,GAAG,OAAO,EAAE,6BAA6B,QAAQ,UAAU,KAAK,EAAC,CAAE,OAAO,4BAA4B,MAAM;GACzL,IAAI,OAAO,MAAM;GACjB,IAAI,OAAO,sBAAsB,4BAA4B,SAAS,GAAG,sBAAsB,wBAAuB,CAAE,IAAI,CAAC;GAC7H,SAAS,MAAM,oBAAoB,QAAQ,CAAC;EAC9C;CACF,SAAS,KAAK;EACZ,oBAAoB;EACpB,iBAAiB;CACnB,UAAU;EACR,IAAI;GACF,IAAI,CAAC,6BAA6B,UAAU,UAAU,MAAM;IAC1D,UAAU,OAAO;GACnB;EACF,UAAU;GACR,IAAI,mBAAmB;IACrB,MAAM;GACR;EACF;CACF;CACA,oBAAoB,KAAK,YAAY,SAAS,OAAO,OAAO;EAC1D,OAAO,SAAS,OAAO,oBAAoB,SAAS,CAAC;CACvD,CAAC;CACD,IAAI;CACJ,qBAAqB,sBAAsB,KAAK,mBAAmB,QAAQ,wBAAwB,KAAK,IAAI,sBAAsB,cAAc,sBAAsB,SAAS,OAAO;EACpL,OAAO,SAAS,OAAO,wBAAwB,GAAG,cAAc,oBAAmB,CAAE,KAAK,KAAK,CAAC;CAClG,CAAC;CACD,oBAAoB,KAAK,YAAY,SAAS,OAAO;EACnD,IAAI,gBAAgB,KAAK,GAAG,SAAS,OAAO,iBAAiB;CAC/D,CAAC;CACD,OAAO;AACT"}
|
|
1
|
+
{"version":3,"file":"modifierVocabulary.native.js","names":[],"sources":["cjs/runtime/modifierVocabulary.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar modifierVocabulary_exports = {};\n__export(modifierVocabulary_exports, {\n compileModifierVocabulary: () => compileModifierVocabulary,\n configRevisionSymbol: () => configRevisionSymbol,\n forEachModifierName: () => forEachModifierName,\n isRootThemeName: () => isRootThemeName,\n modifierKindMedia: () => modifierKindMedia,\n modifierKindPlatform: () => modifierKindPlatform,\n modifierKindState: () => modifierKindState,\n modifierKindTheme: () => modifierKindTheme,\n modifierRefusalKindCollision: () => modifierRefusalKindCollision,\n modifierRefusalReservedContainerPrefix: () => modifierRefusalReservedContainerPrefix,\n modifierRefusalReservedGroupPrefix: () => modifierRefusalReservedGroupPrefix\n});\nmodule.exports = __toCommonJS(modifierVocabulary_exports);\nvar import_config = require(\"../tooling/config\");\nvar import_clauseIdentity = require(\"./clauseIdentity\");\nvar import_stateModifiers = require(\"./stateModifiers\");\nvar configRevisionSymbol = /* @__PURE__ */ Symbol.for(\"tamagui.configRevision\");\nvar modifierKindState = 1;\nvar modifierKindMedia = 2;\nvar modifierKindPlatform = 3;\nvar modifierKindTheme = 4;\nvar modifierRefusalReservedContainerPrefix = 1;\nvar modifierRefusalReservedGroupPrefix = 2;\nvar modifierRefusalKindCollision = 3;\nfunction forEachModifierName(source, visit) {\n if (!source) return;\n var rank = 0;\n if (Array.isArray(source)) {\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = source[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var name = _step.value;\n visit(name, rank++);\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n return;\n }\n if (source instanceof Set) {\n var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = void 0;\n try {\n for (var _iterator1 = source[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) {\n var name1 = _step1.value;\n visit(name1, rank++);\n }\n } catch (err) {\n _didIteratorError1 = true;\n _iteratorError1 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion1 && _iterator1.return != null) {\n _iterator1.return();\n }\n } finally {\n if (_didIteratorError1) {\n throw _iteratorError1;\n }\n }\n }\n return;\n }\n for (var name2 in source) {\n visit(name2, rank++);\n }\n}\nfunction isRootThemeName(name) {\n return name.length > 0 && !name.includes(\"_\");\n}\nfunction compileModifierVocabulary(view, onRefusal, onRegistered) {\n var names = /* @__PURE__ */ Object.create(null);\n var register = function(name2, code) {\n var kind = code & 7;\n if (name2.charCodeAt(0) === 64) {\n onRefusal === null || onRefusal === void 0 ? void 0 : onRefusal(modifierRefusalReservedContainerPrefix, name2, kind, 0);\n return;\n }\n if (name2.startsWith(\"group-\")) {\n onRefusal === null || onRefusal === void 0 ? void 0 : onRefusal(modifierRefusalReservedGroupPrefix, name2, kind, 0);\n return;\n }\n var existing = names[name2];\n if (existing !== void 0) {\n if ((existing & 7) !== kind) {\n onRefusal === null || onRefusal === void 0 ? void 0 : onRefusal(modifierRefusalKindCollision, name2, kind, existing & 7);\n }\n return;\n }\n names[name2] = code;\n onRegistered === null || onRegistered === void 0 ? void 0 : onRegistered(name2);\n };\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = import_clauseIdentity.stateModifierNames[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var name = _step.value;\n var rank = import_stateModifiers.canonicalStateModifierNames.indexOf((0, import_clauseIdentity.canonicalClauseModifier)(name));\n register(name, modifierKindState | rank << 3);\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n forEachModifierName(view.mediaNames, function(name2, rank2) {\n return register(name2, modifierKindMedia | rank2 << 3);\n });\n var _view_platformNames;\n forEachModifierName((_view_platformNames = view.platformNames) !== null && _view_platformNames !== void 0 ? _view_platformNames : import_config.grammarPlatformNames, function(name2) {\n return register(name2, modifierKindPlatform | (0, import_config.grammarPlatformRank)(name2) << 3);\n });\n forEachModifierName(view.themeNames, function(name2) {\n if (isRootThemeName(name2)) register(name2, modifierKindTheme);\n });\n return names;\n}\n//# sourceMappingURL=modifierVocabulary.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc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;CACA,IAAI,4BAA4B,MAAM,oBAAoB,OAAO,iBAAiB,KAAK;CACvF,IAAI;EACF,KAAK,IAAI,YAAY,sBAAsB,mBAAmB,OAAO,SAAS,CAAC,GAAG,OAAO,EAAE,6BAA6B,QAAQ,UAAU,KAAK,EAAC,CAAE,OAAO,4BAA4B,MAAM;GACzL,IAAI,OAAO,MAAM;GACjB,IAAI,OAAO,sBAAsB,4BAA4B,SAAS,GAAG,sBAAsB,wBAAuB,CAAE,IAAI,CAAC;GAC7H,SAAS,MAAM,oBAAoB,QAAQ,CAAC;EAC9C;CACF,SAAS,KAAK;EACZ,oBAAoB;EACpB,iBAAiB;CACnB,UAAU;EACR,IAAI;GACF,IAAI,CAAC,6BAA6B,UAAU,UAAU,MAAM;IAC1D,UAAU,OAAO;GACnB;EACF,UAAU;GACR,IAAI,mBAAmB;IACrB,MAAM;GACR;EACF;CACF;CACA,oBAAoB,KAAK,YAAY,SAAS,OAAO,OAAO;EAC1D,OAAO,SAAS,OAAO,oBAAoB,SAAS,CAAC;CACvD,CAAC;CACD,IAAI;CACJ,qBAAqB,sBAAsB,KAAK,mBAAmB,QAAQ,wBAAwB,KAAK,IAAI,sBAAsB,cAAc,sBAAsB,SAAS,OAAO;EACpL,OAAO,SAAS,OAAO,wBAAwB,GAAG,cAAc,oBAAmB,CAAE,KAAK,KAAK,CAAC;CAClG,CAAC;CACD,oBAAoB,KAAK,YAAY,SAAS,OAAO;EACnD,IAAI,gBAAgB,KAAK,GAAG,SAAS,OAAO,iBAAiB;CAC/D,CAAC;CACD,OAAO;AACT"}
|
|
@@ -26,6 +26,9 @@ __export(scanFlatValue_exports, {
|
|
|
26
26
|
scanFlatValue: () => scanFlatValue
|
|
27
27
|
});
|
|
28
28
|
module.exports = __toCommonJS(scanFlatValue_exports);
|
|
29
|
+
var import_valueTypes = require("../ast/valueTypes.cjs");
|
|
30
|
+
var import_config = require("../tooling/config.cjs");
|
|
31
|
+
var import_stateModifiers = require("./stateModifiers.cjs");
|
|
29
32
|
function opensUrlToken(source, index) {
|
|
30
33
|
if (index < 3 || (source.charCodeAt(index - 3) | 32) !== 117 || (source.charCodeAt(index - 2) | 32) !== 114 || (source.charCodeAt(index - 1) | 32) !== 108) {
|
|
31
34
|
return false;
|
|
@@ -40,7 +43,7 @@ function opensUrlToken(source, index) {
|
|
|
40
43
|
}
|
|
41
44
|
function scanFlatValue(source, handler, ctx, a, b, c, d) {
|
|
42
45
|
const length = source.length;
|
|
43
|
-
let failure = null, failureIndex = -1, sawChain = false, chainCount = 0, chainStart = -1, chainEnd = -1, chainValid = true, result = 0, lastAcceptedStart = 0, segmentValid = true, segmentStart = 0, comment = false, commentStart = -1, quote = 0, quoteStart = -1, url = false, depth = 0, parenStart = -1, wordStart = -1, lastColon = -1, modifierStart = -1, wordErrorMin = length, wordErrorMax = -1;
|
|
46
|
+
let failure = null, failureIndex = -1, sawChain = false, chainCount = 0, chainStart = -1, chainEnd = -1, chainValid = true, result = 0, lastAcceptedStart = 0, segmentValid = true, segmentStart = 0, comment = false, commentStart = -1, quote = 0, quoteStart = -1, url = false, depth = 0, parenStart = -1, wordStart = -1, lastColon = -1, modifierStart = -1, wordErrorMin = length, wordErrorMax = -1, chainNonPlatformModifiers = null;
|
|
44
47
|
const report = (code, at) => {
|
|
45
48
|
if (failureIndex === -1) failureIndex = at;
|
|
46
49
|
failure ??= code;
|
|
@@ -74,6 +77,7 @@ function scanFlatValue(source, handler, ctx, a, b, c, d) {
|
|
|
74
77
|
if (lastColon === -1 && wordErrorMax !== -1) segmentValid = false;
|
|
75
78
|
wordStart = lastColon = modifierStart = wordErrorMax = -1;
|
|
76
79
|
wordErrorMin = length;
|
|
80
|
+
chainNonPlatformModifiers = null;
|
|
77
81
|
return true;
|
|
78
82
|
};
|
|
79
83
|
for (let index = 0; index < length; index++) {
|
|
@@ -135,7 +139,22 @@ function scanFlatValue(source, handler, ctx, a, b, c, d) {
|
|
|
135
139
|
} else if (code === 58) {
|
|
136
140
|
const first = modifierStart === -1;
|
|
137
141
|
const start = first ? wordStart : modifierStart;
|
|
138
|
-
if (first)
|
|
142
|
+
if (first) {
|
|
143
|
+
closeSegment(wordStart);
|
|
144
|
+
chainNonPlatformModifiers = /* @__PURE__ */ new Set();
|
|
145
|
+
}
|
|
146
|
+
if (start < index) {
|
|
147
|
+
const canonical = (0, import_stateModifiers.canonicalClauseModifier)(source.slice(start, index));
|
|
148
|
+
if (!import_config.grammarPlatformNames.has(canonical)) {
|
|
149
|
+
chainNonPlatformModifiers?.add(canonical);
|
|
150
|
+
if (chainNonPlatformModifiers && chainNonPlatformModifiers.size > import_valueTypes.grammarMaxNonPlatformDepth) {
|
|
151
|
+
if (failureIndex === -1) failureIndex = start;
|
|
152
|
+
failure ??= "over-deep-clause";
|
|
153
|
+
if (start < wordErrorMin) wordErrorMin = start;
|
|
154
|
+
if (start > wordErrorMax) wordErrorMax = start;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
139
158
|
if (handler.modifier?.(ctx, start, index, wordErrorMax < start, first, source, a, b, c, d) === false) {
|
|
140
159
|
return "refused-chain";
|
|
141
160
|
}
|
|
@@ -165,12 +184,12 @@ function parseFlatValue(source) {
|
|
|
165
184
|
function parseFlatValueProduction(source) {
|
|
166
185
|
const length = source.length;
|
|
167
186
|
const segments = [];
|
|
168
|
-
let sawChain = false, chainStart = -1, chainEnd = -1, segmentStart = 0, wordStart = -1, lastColon = -1, quote = 0, comment = false, depth = 0, valid = true;
|
|
187
|
+
let sawChain = false, chainStart = -1, chainEnd = -1, segmentStart = 0, wordStart = -1, lastColon = -1, quote = 0, comment = false, depth = 0, valid = true, clauseChainValid = true, currentChainValid = true, chainNonPlatformModifiers = null;
|
|
169
188
|
const close = (end) => {
|
|
170
189
|
let start = segmentStart;
|
|
171
190
|
while (start < end && source.charCodeAt(start) <= 32) start++;
|
|
172
191
|
while (end > start && source.charCodeAt(end - 1) <= 32) end--;
|
|
173
|
-
segments.push(start, end, chainStart, chainEnd, (!sawChain ? 1 : 0) | 6);
|
|
192
|
+
segments.push(start, end, chainStart, chainEnd, (!sawChain ? 1 : 0) | (clauseChainValid ? 6 : 0));
|
|
174
193
|
};
|
|
175
194
|
const flush = () => {
|
|
176
195
|
if (wordStart !== -1 && lastColon !== -1) {
|
|
@@ -178,8 +197,11 @@ function parseFlatValueProduction(source) {
|
|
|
178
197
|
chainEnd = lastColon;
|
|
179
198
|
sawChain = true;
|
|
180
199
|
segmentStart = lastColon + 1;
|
|
200
|
+
clauseChainValid = currentChainValid;
|
|
181
201
|
}
|
|
182
202
|
wordStart = lastColon = -1;
|
|
203
|
+
currentChainValid = true;
|
|
204
|
+
chainNonPlatformModifiers = null;
|
|
183
205
|
};
|
|
184
206
|
for (let index = 0; index < length; index++) {
|
|
185
207
|
const code = source.charCodeAt(index);
|
|
@@ -228,7 +250,22 @@ function parseFlatValueProduction(source) {
|
|
|
228
250
|
if (wordStart === -1) wordStart = index;
|
|
229
251
|
if (code === 59 || code === 123 || code === 125) valid = false;
|
|
230
252
|
else if (code === 58) {
|
|
231
|
-
if (lastColon === -1)
|
|
253
|
+
if (lastColon === -1) {
|
|
254
|
+
close(wordStart);
|
|
255
|
+
clauseChainValid = true;
|
|
256
|
+
currentChainValid = true;
|
|
257
|
+
chainNonPlatformModifiers = /* @__PURE__ */ new Set();
|
|
258
|
+
}
|
|
259
|
+
const modStart = lastColon === -1 ? wordStart : lastColon + 1;
|
|
260
|
+
if (modStart < index && currentChainValid) {
|
|
261
|
+
const canonical = (0, import_stateModifiers.canonicalClauseModifier)(source.slice(modStart, index));
|
|
262
|
+
if (!import_config.grammarPlatformNames.has(canonical)) {
|
|
263
|
+
chainNonPlatformModifiers?.add(canonical);
|
|
264
|
+
if (chainNonPlatformModifiers && chainNonPlatformModifiers.size > import_valueTypes.grammarMaxNonPlatformDepth) {
|
|
265
|
+
currentChainValid = false;
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
}
|
|
232
269
|
lastColon = index;
|
|
233
270
|
}
|
|
234
271
|
}
|
|
@@ -247,7 +284,7 @@ function parseFlatValueProduction(source) {
|
|
|
247
284
|
function parseFlatValueChecked(source) {
|
|
248
285
|
const length = source.length;
|
|
249
286
|
const segments = [];
|
|
250
|
-
let failure = null, failureIndex = -1, sawChain = false, chainStart = -1, chainEnd = -1, chainValid = true, segmentValid = true, segmentStart = 0, comment = false, commentStart = -1, quote = 0, quoteStart = -1, url = false, depth = 0, parenStart = -1, wordStart = -1, lastColon = -1, wordErrorMin = length, wordErrorMax = -1;
|
|
287
|
+
let failure = null, failureIndex = -1, sawChain = false, chainStart = -1, chainEnd = -1, chainValid = true, segmentValid = true, segmentStart = 0, comment = false, commentStart = -1, quote = 0, quoteStart = -1, url = false, depth = 0, parenStart = -1, wordStart = -1, lastColon = -1, wordErrorMin = length, wordErrorMax = -1, chainNonPlatformModifiers = null;
|
|
251
288
|
const report = (code, index) => {
|
|
252
289
|
if (failureIndex === -1) failureIndex = index;
|
|
253
290
|
failure ??= code;
|
|
@@ -273,6 +310,7 @@ function parseFlatValueChecked(source) {
|
|
|
273
310
|
}
|
|
274
311
|
wordStart = lastColon = wordErrorMax = -1;
|
|
275
312
|
wordErrorMin = length;
|
|
313
|
+
chainNonPlatformModifiers = null;
|
|
276
314
|
};
|
|
277
315
|
for (let index = 0; index < length; index++) {
|
|
278
316
|
const code = source.charCodeAt(index);
|
|
@@ -331,7 +369,20 @@ function parseFlatValueChecked(source) {
|
|
|
331
369
|
if (code === 59 || code === 123 || code === 125) {
|
|
332
370
|
report("invalid-character", index);
|
|
333
371
|
} else if (code === 58) {
|
|
334
|
-
if (lastColon === -1)
|
|
372
|
+
if (lastColon === -1) {
|
|
373
|
+
close(wordStart);
|
|
374
|
+
chainNonPlatformModifiers = /* @__PURE__ */ new Set();
|
|
375
|
+
}
|
|
376
|
+
const modStart = lastColon === -1 ? wordStart : lastColon + 1;
|
|
377
|
+
if (modStart < index) {
|
|
378
|
+
const canonical = (0, import_stateModifiers.canonicalClauseModifier)(source.slice(modStart, index));
|
|
379
|
+
if (!import_config.grammarPlatformNames.has(canonical)) {
|
|
380
|
+
chainNonPlatformModifiers?.add(canonical);
|
|
381
|
+
if (chainNonPlatformModifiers && chainNonPlatformModifiers.size > import_valueTypes.grammarMaxNonPlatformDepth) {
|
|
382
|
+
report("over-deep-clause", modStart);
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
}
|
|
335
386
|
lastColon = index;
|
|
336
387
|
}
|
|
337
388
|
}
|
|
@@ -28,6 +28,9 @@ __export(scanFlatValue_exports, {
|
|
|
28
28
|
scanFlatValue: () => scanFlatValue
|
|
29
29
|
});
|
|
30
30
|
module.exports = __toCommonJS(scanFlatValue_exports);
|
|
31
|
+
var import_valueTypes = require("../ast/valueTypes.native.js");
|
|
32
|
+
var import_config = require("../tooling/config.native.js");
|
|
33
|
+
var import_stateModifiers = require("./stateModifiers.native.js");
|
|
31
34
|
function opensUrlToken(source, index) {
|
|
32
35
|
if (index < 3 || (source.charCodeAt(index - 3) | 32) !== 117 || (source.charCodeAt(index - 2) | 32) !== 114 || (source.charCodeAt(index - 1) | 32) !== 108) {
|
|
33
36
|
return false;
|
|
@@ -43,7 +46,7 @@ function opensUrlToken(source, index) {
|
|
|
43
46
|
function scanFlatValue(source, handler, ctx, a, b, c, d) {
|
|
44
47
|
var _handler_end;
|
|
45
48
|
var length = source.length;
|
|
46
|
-
var failure = null, failureIndex = -1, sawChain = false, chainCount = 0, chainStart = -1, chainEnd = -1, chainValid = true, result = 0, lastAcceptedStart = 0, segmentValid = true, segmentStart = 0, comment = false, commentStart = -1, quote = 0, quoteStart = -1, url = false, depth = 0, parenStart = -1, wordStart = -1, lastColon = -1, modifierStart = -1, wordErrorMin = length, wordErrorMax = -1;
|
|
49
|
+
var failure = null, failureIndex = -1, sawChain = false, chainCount = 0, chainStart = -1, chainEnd = -1, chainValid = true, result = 0, lastAcceptedStart = 0, segmentValid = true, segmentStart = 0, comment = false, commentStart = -1, quote = 0, quoteStart = -1, url = false, depth = 0, parenStart = -1, wordStart = -1, lastColon = -1, modifierStart = -1, wordErrorMin = length, wordErrorMax = -1, chainNonPlatformModifiers = null;
|
|
47
50
|
var report = function(code2, at) {
|
|
48
51
|
var _handler_error;
|
|
49
52
|
if (failureIndex === -1) failureIndex = at;
|
|
@@ -79,6 +82,7 @@ function scanFlatValue(source, handler, ctx, a, b, c, d) {
|
|
|
79
82
|
if (lastColon === -1 && wordErrorMax !== -1) segmentValid = false;
|
|
80
83
|
wordStart = lastColon = modifierStart = wordErrorMax = -1;
|
|
81
84
|
wordErrorMin = length;
|
|
85
|
+
chainNonPlatformModifiers = null;
|
|
82
86
|
return true;
|
|
83
87
|
};
|
|
84
88
|
for (var index = 0; index < length; index++) {
|
|
@@ -141,7 +145,22 @@ function scanFlatValue(source, handler, ctx, a, b, c, d) {
|
|
|
141
145
|
var _handler_modifier;
|
|
142
146
|
var first = modifierStart === -1;
|
|
143
147
|
var start = first ? wordStart : modifierStart;
|
|
144
|
-
if (first)
|
|
148
|
+
if (first) {
|
|
149
|
+
closeSegment(wordStart);
|
|
150
|
+
chainNonPlatformModifiers = /* @__PURE__ */ new Set();
|
|
151
|
+
}
|
|
152
|
+
if (start < index) {
|
|
153
|
+
var canonical = (0, import_stateModifiers.canonicalClauseModifier)(source.slice(start, index));
|
|
154
|
+
if (!import_config.grammarPlatformNames.has(canonical)) {
|
|
155
|
+
chainNonPlatformModifiers === null || chainNonPlatformModifiers === void 0 ? void 0 : chainNonPlatformModifiers.add(canonical);
|
|
156
|
+
if (chainNonPlatformModifiers && chainNonPlatformModifiers.size > import_valueTypes.grammarMaxNonPlatformDepth) {
|
|
157
|
+
if (failureIndex === -1) failureIndex = start;
|
|
158
|
+
failure !== null && failure !== void 0 ? failure : failure = "over-deep-clause";
|
|
159
|
+
if (start < wordErrorMin) wordErrorMin = start;
|
|
160
|
+
if (start > wordErrorMax) wordErrorMax = start;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
145
164
|
if (((_handler_modifier = handler.modifier) === null || _handler_modifier === void 0 ? void 0 : _handler_modifier.call(handler, ctx, start, index, wordErrorMax < start, first, source, a, b, c, d)) === false) {
|
|
146
165
|
return "refused-chain";
|
|
147
166
|
}
|
|
@@ -171,12 +190,12 @@ function parseFlatValue(source) {
|
|
|
171
190
|
function parseFlatValueProduction(source) {
|
|
172
191
|
var length = source.length;
|
|
173
192
|
var segments = [];
|
|
174
|
-
var sawChain = false, chainStart = -1, chainEnd = -1, segmentStart = 0, wordStart = -1, lastColon = -1, quote = 0, comment = false, depth = 0, valid = true;
|
|
193
|
+
var sawChain = false, chainStart = -1, chainEnd = -1, segmentStart = 0, wordStart = -1, lastColon = -1, quote = 0, comment = false, depth = 0, valid = true, clauseChainValid = true, currentChainValid = true, chainNonPlatformModifiers = null;
|
|
175
194
|
var close = function(end) {
|
|
176
195
|
var start = segmentStart;
|
|
177
196
|
while (start < end && source.charCodeAt(start) <= 32) start++;
|
|
178
197
|
while (end > start && source.charCodeAt(end - 1) <= 32) end--;
|
|
179
|
-
segments.push(start, end, chainStart, chainEnd, (!sawChain ? 1 : 0) | 6);
|
|
198
|
+
segments.push(start, end, chainStart, chainEnd, (!sawChain ? 1 : 0) | (clauseChainValid ? 6 : 0));
|
|
180
199
|
};
|
|
181
200
|
var flush = function() {
|
|
182
201
|
if (wordStart !== -1 && lastColon !== -1) {
|
|
@@ -184,8 +203,11 @@ function parseFlatValueProduction(source) {
|
|
|
184
203
|
chainEnd = lastColon;
|
|
185
204
|
sawChain = true;
|
|
186
205
|
segmentStart = lastColon + 1;
|
|
206
|
+
clauseChainValid = currentChainValid;
|
|
187
207
|
}
|
|
188
208
|
wordStart = lastColon = -1;
|
|
209
|
+
currentChainValid = true;
|
|
210
|
+
chainNonPlatformModifiers = null;
|
|
189
211
|
};
|
|
190
212
|
for (var index = 0; index < length; index++) {
|
|
191
213
|
var code = source.charCodeAt(index);
|
|
@@ -234,7 +256,22 @@ function parseFlatValueProduction(source) {
|
|
|
234
256
|
if (wordStart === -1) wordStart = index;
|
|
235
257
|
if (code === 59 || code === 123 || code === 125) valid = false;
|
|
236
258
|
else if (code === 58) {
|
|
237
|
-
if (lastColon === -1)
|
|
259
|
+
if (lastColon === -1) {
|
|
260
|
+
close(wordStart);
|
|
261
|
+
clauseChainValid = true;
|
|
262
|
+
currentChainValid = true;
|
|
263
|
+
chainNonPlatformModifiers = /* @__PURE__ */ new Set();
|
|
264
|
+
}
|
|
265
|
+
var modStart = lastColon === -1 ? wordStart : lastColon + 1;
|
|
266
|
+
if (modStart < index && currentChainValid) {
|
|
267
|
+
var canonical = (0, import_stateModifiers.canonicalClauseModifier)(source.slice(modStart, index));
|
|
268
|
+
if (!import_config.grammarPlatformNames.has(canonical)) {
|
|
269
|
+
chainNonPlatformModifiers === null || chainNonPlatformModifiers === void 0 ? void 0 : chainNonPlatformModifiers.add(canonical);
|
|
270
|
+
if (chainNonPlatformModifiers && chainNonPlatformModifiers.size > import_valueTypes.grammarMaxNonPlatformDepth) {
|
|
271
|
+
currentChainValid = false;
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
}
|
|
238
275
|
lastColon = index;
|
|
239
276
|
}
|
|
240
277
|
}
|
|
@@ -253,7 +290,7 @@ function parseFlatValueProduction(source) {
|
|
|
253
290
|
function parseFlatValueChecked(source) {
|
|
254
291
|
var length = source.length;
|
|
255
292
|
var segments = [];
|
|
256
|
-
var failure = null, failureIndex = -1, sawChain = false, chainStart = -1, chainEnd = -1, chainValid = true, segmentValid = true, segmentStart = 0, comment = false, commentStart = -1, quote = 0, quoteStart = -1, url = false, depth = 0, parenStart = -1, wordStart = -1, lastColon = -1, wordErrorMin = length, wordErrorMax = -1;
|
|
293
|
+
var failure = null, failureIndex = -1, sawChain = false, chainStart = -1, chainEnd = -1, chainValid = true, segmentValid = true, segmentStart = 0, comment = false, commentStart = -1, quote = 0, quoteStart = -1, url = false, depth = 0, parenStart = -1, wordStart = -1, lastColon = -1, wordErrorMin = length, wordErrorMax = -1, chainNonPlatformModifiers = null;
|
|
257
294
|
var report = function(code2, index2) {
|
|
258
295
|
if (failureIndex === -1) failureIndex = index2;
|
|
259
296
|
failure !== null && failure !== void 0 ? failure : failure = code2;
|
|
@@ -279,6 +316,7 @@ function parseFlatValueChecked(source) {
|
|
|
279
316
|
}
|
|
280
317
|
wordStart = lastColon = wordErrorMax = -1;
|
|
281
318
|
wordErrorMin = length;
|
|
319
|
+
chainNonPlatformModifiers = null;
|
|
282
320
|
};
|
|
283
321
|
for (var index = 0; index < length; index++) {
|
|
284
322
|
var code = source.charCodeAt(index);
|
|
@@ -337,7 +375,20 @@ function parseFlatValueChecked(source) {
|
|
|
337
375
|
if (code === 59 || code === 123 || code === 125) {
|
|
338
376
|
report("invalid-character", index);
|
|
339
377
|
} else if (code === 58) {
|
|
340
|
-
if (lastColon === -1)
|
|
378
|
+
if (lastColon === -1) {
|
|
379
|
+
close(wordStart);
|
|
380
|
+
chainNonPlatformModifiers = /* @__PURE__ */ new Set();
|
|
381
|
+
}
|
|
382
|
+
var modStart = lastColon === -1 ? wordStart : lastColon + 1;
|
|
383
|
+
if (modStart < index) {
|
|
384
|
+
var canonical = (0, import_stateModifiers.canonicalClauseModifier)(source.slice(modStart, index));
|
|
385
|
+
if (!import_config.grammarPlatformNames.has(canonical)) {
|
|
386
|
+
chainNonPlatformModifiers === null || chainNonPlatformModifiers === void 0 ? void 0 : chainNonPlatformModifiers.add(canonical);
|
|
387
|
+
if (chainNonPlatformModifiers && chainNonPlatformModifiers.size > import_valueTypes.grammarMaxNonPlatformDepth) {
|
|
388
|
+
report("over-deep-clause", modStart);
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
}
|
|
341
392
|
lastColon = index;
|
|
342
393
|
}
|
|
343
394
|
}
|
|
@@ -28,6 +28,9 @@ __export(scanFlatValue_exports, {
|
|
|
28
28
|
scanFlatValue: () => scanFlatValue
|
|
29
29
|
});
|
|
30
30
|
module.exports = __toCommonJS(scanFlatValue_exports);
|
|
31
|
+
var import_valueTypes = require("../ast/valueTypes.native.js");
|
|
32
|
+
var import_config = require("../tooling/config.native.js");
|
|
33
|
+
var import_stateModifiers = require("./stateModifiers.native.js");
|
|
31
34
|
function opensUrlToken(source, index) {
|
|
32
35
|
if (index < 3 || (source.charCodeAt(index - 3) | 32) !== 117 || (source.charCodeAt(index - 2) | 32) !== 114 || (source.charCodeAt(index - 1) | 32) !== 108) {
|
|
33
36
|
return false;
|
|
@@ -43,7 +46,7 @@ function opensUrlToken(source, index) {
|
|
|
43
46
|
function scanFlatValue(source, handler, ctx, a, b, c, d) {
|
|
44
47
|
var _handler_end;
|
|
45
48
|
var length = source.length;
|
|
46
|
-
var failure = null, failureIndex = -1, sawChain = false, chainCount = 0, chainStart = -1, chainEnd = -1, chainValid = true, result = 0, lastAcceptedStart = 0, segmentValid = true, segmentStart = 0, comment = false, commentStart = -1, quote = 0, quoteStart = -1, url = false, depth = 0, parenStart = -1, wordStart = -1, lastColon = -1, modifierStart = -1, wordErrorMin = length, wordErrorMax = -1;
|
|
49
|
+
var failure = null, failureIndex = -1, sawChain = false, chainCount = 0, chainStart = -1, chainEnd = -1, chainValid = true, result = 0, lastAcceptedStart = 0, segmentValid = true, segmentStart = 0, comment = false, commentStart = -1, quote = 0, quoteStart = -1, url = false, depth = 0, parenStart = -1, wordStart = -1, lastColon = -1, modifierStart = -1, wordErrorMin = length, wordErrorMax = -1, chainNonPlatformModifiers = null;
|
|
47
50
|
var report = function(code2, at) {
|
|
48
51
|
var _handler_error;
|
|
49
52
|
if (failureIndex === -1) failureIndex = at;
|
|
@@ -79,6 +82,7 @@ function scanFlatValue(source, handler, ctx, a, b, c, d) {
|
|
|
79
82
|
if (lastColon === -1 && wordErrorMax !== -1) segmentValid = false;
|
|
80
83
|
wordStart = lastColon = modifierStart = wordErrorMax = -1;
|
|
81
84
|
wordErrorMin = length;
|
|
85
|
+
chainNonPlatformModifiers = null;
|
|
82
86
|
return true;
|
|
83
87
|
};
|
|
84
88
|
for (var index = 0; index < length; index++) {
|
|
@@ -141,7 +145,22 @@ function scanFlatValue(source, handler, ctx, a, b, c, d) {
|
|
|
141
145
|
var _handler_modifier;
|
|
142
146
|
var first = modifierStart === -1;
|
|
143
147
|
var start = first ? wordStart : modifierStart;
|
|
144
|
-
if (first)
|
|
148
|
+
if (first) {
|
|
149
|
+
closeSegment(wordStart);
|
|
150
|
+
chainNonPlatformModifiers = /* @__PURE__ */ new Set();
|
|
151
|
+
}
|
|
152
|
+
if (start < index) {
|
|
153
|
+
var canonical = (0, import_stateModifiers.canonicalClauseModifier)(source.slice(start, index));
|
|
154
|
+
if (!import_config.grammarPlatformNames.has(canonical)) {
|
|
155
|
+
chainNonPlatformModifiers === null || chainNonPlatformModifiers === void 0 ? void 0 : chainNonPlatformModifiers.add(canonical);
|
|
156
|
+
if (chainNonPlatformModifiers && chainNonPlatformModifiers.size > import_valueTypes.grammarMaxNonPlatformDepth) {
|
|
157
|
+
if (failureIndex === -1) failureIndex = start;
|
|
158
|
+
failure !== null && failure !== void 0 ? failure : failure = "over-deep-clause";
|
|
159
|
+
if (start < wordErrorMin) wordErrorMin = start;
|
|
160
|
+
if (start > wordErrorMax) wordErrorMax = start;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
145
164
|
if (((_handler_modifier = handler.modifier) === null || _handler_modifier === void 0 ? void 0 : _handler_modifier.call(handler, ctx, start, index, wordErrorMax < start, first, source, a, b, c, d)) === false) {
|
|
146
165
|
return "refused-chain";
|
|
147
166
|
}
|
|
@@ -171,12 +190,12 @@ function parseFlatValue(source) {
|
|
|
171
190
|
function parseFlatValueProduction(source) {
|
|
172
191
|
var length = source.length;
|
|
173
192
|
var segments = [];
|
|
174
|
-
var sawChain = false, chainStart = -1, chainEnd = -1, segmentStart = 0, wordStart = -1, lastColon = -1, quote = 0, comment = false, depth = 0, valid = true;
|
|
193
|
+
var sawChain = false, chainStart = -1, chainEnd = -1, segmentStart = 0, wordStart = -1, lastColon = -1, quote = 0, comment = false, depth = 0, valid = true, clauseChainValid = true, currentChainValid = true, chainNonPlatformModifiers = null;
|
|
175
194
|
var close = function(end) {
|
|
176
195
|
var start = segmentStart;
|
|
177
196
|
while (start < end && source.charCodeAt(start) <= 32) start++;
|
|
178
197
|
while (end > start && source.charCodeAt(end - 1) <= 32) end--;
|
|
179
|
-
segments.push(start, end, chainStart, chainEnd, (!sawChain ? 1 : 0) | 6);
|
|
198
|
+
segments.push(start, end, chainStart, chainEnd, (!sawChain ? 1 : 0) | (clauseChainValid ? 6 : 0));
|
|
180
199
|
};
|
|
181
200
|
var flush = function() {
|
|
182
201
|
if (wordStart !== -1 && lastColon !== -1) {
|
|
@@ -184,8 +203,11 @@ function parseFlatValueProduction(source) {
|
|
|
184
203
|
chainEnd = lastColon;
|
|
185
204
|
sawChain = true;
|
|
186
205
|
segmentStart = lastColon + 1;
|
|
206
|
+
clauseChainValid = currentChainValid;
|
|
187
207
|
}
|
|
188
208
|
wordStart = lastColon = -1;
|
|
209
|
+
currentChainValid = true;
|
|
210
|
+
chainNonPlatformModifiers = null;
|
|
189
211
|
};
|
|
190
212
|
for (var index = 0; index < length; index++) {
|
|
191
213
|
var code = source.charCodeAt(index);
|
|
@@ -234,7 +256,22 @@ function parseFlatValueProduction(source) {
|
|
|
234
256
|
if (wordStart === -1) wordStart = index;
|
|
235
257
|
if (code === 59 || code === 123 || code === 125) valid = false;
|
|
236
258
|
else if (code === 58) {
|
|
237
|
-
if (lastColon === -1)
|
|
259
|
+
if (lastColon === -1) {
|
|
260
|
+
close(wordStart);
|
|
261
|
+
clauseChainValid = true;
|
|
262
|
+
currentChainValid = true;
|
|
263
|
+
chainNonPlatformModifiers = /* @__PURE__ */ new Set();
|
|
264
|
+
}
|
|
265
|
+
var modStart = lastColon === -1 ? wordStart : lastColon + 1;
|
|
266
|
+
if (modStart < index && currentChainValid) {
|
|
267
|
+
var canonical = (0, import_stateModifiers.canonicalClauseModifier)(source.slice(modStart, index));
|
|
268
|
+
if (!import_config.grammarPlatformNames.has(canonical)) {
|
|
269
|
+
chainNonPlatformModifiers === null || chainNonPlatformModifiers === void 0 ? void 0 : chainNonPlatformModifiers.add(canonical);
|
|
270
|
+
if (chainNonPlatformModifiers && chainNonPlatformModifiers.size > import_valueTypes.grammarMaxNonPlatformDepth) {
|
|
271
|
+
currentChainValid = false;
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
}
|
|
238
275
|
lastColon = index;
|
|
239
276
|
}
|
|
240
277
|
}
|
|
@@ -253,7 +290,7 @@ function parseFlatValueProduction(source) {
|
|
|
253
290
|
function parseFlatValueChecked(source) {
|
|
254
291
|
var length = source.length;
|
|
255
292
|
var segments = [];
|
|
256
|
-
var failure = null, failureIndex = -1, sawChain = false, chainStart = -1, chainEnd = -1, chainValid = true, segmentValid = true, segmentStart = 0, comment = false, commentStart = -1, quote = 0, quoteStart = -1, url = false, depth = 0, parenStart = -1, wordStart = -1, lastColon = -1, wordErrorMin = length, wordErrorMax = -1;
|
|
293
|
+
var failure = null, failureIndex = -1, sawChain = false, chainStart = -1, chainEnd = -1, chainValid = true, segmentValid = true, segmentStart = 0, comment = false, commentStart = -1, quote = 0, quoteStart = -1, url = false, depth = 0, parenStart = -1, wordStart = -1, lastColon = -1, wordErrorMin = length, wordErrorMax = -1, chainNonPlatformModifiers = null;
|
|
257
294
|
var report = function(code2, index2) {
|
|
258
295
|
if (failureIndex === -1) failureIndex = index2;
|
|
259
296
|
failure !== null && failure !== void 0 ? failure : failure = code2;
|
|
@@ -279,6 +316,7 @@ function parseFlatValueChecked(source) {
|
|
|
279
316
|
}
|
|
280
317
|
wordStart = lastColon = wordErrorMax = -1;
|
|
281
318
|
wordErrorMin = length;
|
|
319
|
+
chainNonPlatformModifiers = null;
|
|
282
320
|
};
|
|
283
321
|
for (var index = 0; index < length; index++) {
|
|
284
322
|
var code = source.charCodeAt(index);
|
|
@@ -337,7 +375,20 @@ function parseFlatValueChecked(source) {
|
|
|
337
375
|
if (code === 59 || code === 123 || code === 125) {
|
|
338
376
|
report("invalid-character", index);
|
|
339
377
|
} else if (code === 58) {
|
|
340
|
-
if (lastColon === -1)
|
|
378
|
+
if (lastColon === -1) {
|
|
379
|
+
close(wordStart);
|
|
380
|
+
chainNonPlatformModifiers = /* @__PURE__ */ new Set();
|
|
381
|
+
}
|
|
382
|
+
var modStart = lastColon === -1 ? wordStart : lastColon + 1;
|
|
383
|
+
if (modStart < index) {
|
|
384
|
+
var canonical = (0, import_stateModifiers.canonicalClauseModifier)(source.slice(modStart, index));
|
|
385
|
+
if (!import_config.grammarPlatformNames.has(canonical)) {
|
|
386
|
+
chainNonPlatformModifiers === null || chainNonPlatformModifiers === void 0 ? void 0 : chainNonPlatformModifiers.add(canonical);
|
|
387
|
+
if (chainNonPlatformModifiers && chainNonPlatformModifiers.size > import_valueTypes.grammarMaxNonPlatformDepth) {
|
|
388
|
+
report("over-deep-clause", modStart);
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
}
|
|
341
392
|
lastColon = index;
|
|
342
393
|
}
|
|
343
394
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scanFlatValue.native.js","names":[],"sources":["cjs/runtime/scanFlatValue.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar scanFlatValue_exports = {};\n__export(scanFlatValue_exports, {\n parseFlatValue: () => parseFlatValue,\n parseFlatValueChecked: () => parseFlatValueChecked,\n parseFlatValueProduction: () => parseFlatValueProduction,\n scanFlatValue: () => scanFlatValue\n});\nmodule.exports = __toCommonJS(scanFlatValue_exports);\nfunction opensUrlToken(source, index) {\n if (index < 3 || (source.charCodeAt(index - 3) | 32) !== 117 || (source.charCodeAt(index - 2) | 32) !== 114 || (source.charCodeAt(index - 1) | 32) !== 108) {\n return false;\n }\n var b = index > 3 ? source.charCodeAt(index - 4) : 0;\n if (b === 45 || b === 95 || b > 127 || b > 47 && b < 58 || b > 64 && b < 91 || b > 96 && b < 123) {\n return false;\n }\n while (source.charCodeAt(++index) <= 32) ;\n var q = source.charCodeAt(index);\n return q !== 34 && q !== 39;\n}\nfunction scanFlatValue(source, handler, ctx, a, b, c, d) {\n var _handler_end;\n var length = source.length;\n var failure = null, failureIndex = -1, sawChain = false, chainCount = 0, chainStart = -1, chainEnd = -1, chainValid = true, result = 0, lastAcceptedStart = 0, segmentValid = true, segmentStart = 0, comment = false, commentStart = -1, quote = 0, quoteStart = -1, url = false, depth = 0, parenStart = -1, wordStart = -1, lastColon = -1, modifierStart = -1, wordErrorMin = length, wordErrorMax = -1;\n var report = function(code2, at) {\n var _handler_error;\n if (failureIndex === -1) failureIndex = at;\n failure !== null && failure !== void 0 ? failure : failure = code2;\n (_handler_error = handler.error) === null || _handler_error === void 0 ? void 0 : _handler_error.call(handler, ctx, code2, at);\n if (at < wordErrorMin) wordErrorMin = at;\n if (at > wordErrorMax) wordErrorMax = at;\n };\n var closeSegment = function(end) {\n var start2 = segmentStart, stop = end;\n while (start2 < stop && source.charCodeAt(start2) <= 32) start2++;\n while (stop > start2 && source.charCodeAt(stop - 1) <= 32) stop--;\n var bits = handler.segment(ctx, start2, stop, !sawChain, segmentValid, source, chainStart, chainEnd, chainValid, chainCount, result, failure, failureIndex, a, b, c, d) || 0;\n result |= bits;\n if (bits & 4) lastAcceptedStart = start2;\n };\n var flushWord = function(end) {\n if (wordStart !== -1) {\n var _handler_word;\n (_handler_word = handler.word) === null || _handler_word === void 0 ? void 0 : _handler_word.call(handler, ctx, wordStart, end, lastColon !== -1);\n if (lastColon !== -1) {\n var nextChainValid = wordErrorMin >= lastColon;\n if (!handler.chain(ctx, wordStart, lastColon, nextChainValid)) return false;\n chainStart = wordStart;\n chainEnd = lastColon;\n chainValid = nextChainValid;\n chainCount++;\n sawChain = true;\n segmentStart = lastColon + 1;\n segmentValid = nextChainValid && wordErrorMax < lastColon;\n }\n }\n if (lastColon === -1 && wordErrorMax !== -1) segmentValid = false;\n wordStart = lastColon = modifierStart = wordErrorMax = -1;\n wordErrorMin = length;\n return true;\n };\n for (var index = 0; index < length; index++) {\n var code = source.charCodeAt(index);\n if (code === 42 && source.charCodeAt(index + 1) === 47) {\n if (comment) comment = false;\n else report(\"stray-comment-close\", index);\n index++;\n continue;\n }\n if (comment) continue;\n if (code === 92) {\n index++;\n continue;\n }\n if (quote) {\n if (code === quote) quote = 0;\n else if (code === 10 || code === 13 || code === 12) {\n report(\"unterminated-string\", quoteStart);\n quote = 0;\n index--;\n }\n continue;\n }\n if (url) {\n if (code === 41) {\n url = false;\n depth--;\n }\n continue;\n }\n if (code === 47 && source.charCodeAt(index + 1) === 42) {\n comment = true;\n commentStart = index++;\n continue;\n }\n if (code === 34 || code === 39) {\n quote = code;\n quoteStart = index;\n continue;\n }\n if (code === 40) {\n if (opensUrlToken(source, index)) url = true;\n if (!depth) parenStart = index;\n depth++;\n continue;\n }\n if (depth) {\n if (code === 41) depth--;\n continue;\n }\n if (code <= 32) {\n if (wordStart !== -1 && !flushWord(index)) return \"refused-chain\";\n continue;\n }\n if (wordStart === -1) wordStart = index;\n if (code === 59 || code === 123 || code === 125) {\n report(\"invalid-character\", index);\n } else if (code === 58) {\n var _handler_modifier;\n var first = modifierStart === -1;\n var start = first ? wordStart : modifierStart;\n if (first) closeSegment(wordStart);\n if (((_handler_modifier = handler.modifier) === null || _handler_modifier === void 0 ? void 0 : _handler_modifier.call(handler, ctx, start, index, wordErrorMax < start, first, source, a, b, c, d)) === false) {\n return \"refused-chain\";\n }\n modifierStart = (lastColon = index) + 1;\n }\n }\n if (comment) report(\"unterminated-comment\", commentStart);\n if (quote) report(\"unterminated-string\", quoteStart);\n if (depth) report(\"unterminated-function\", parenStart);\n if (!flushWord(length)) return \"refused-chain\";\n closeSegment(length);\n (_handler_end = handler.end) === null || _handler_end === void 0 ? void 0 : _handler_end.call(handler, ctx, source, result, lastAcceptedStart, chainCount, a, b, c, d, failure, failureIndex);\n return failure;\n}\nvar parsedValues = /* @__PURE__ */ new Map();\nvar parsedValuesLimit = 4096;\nfunction parseFlatValue(source) {\n var known = parsedValues.get(source);\n if (known) return known;\n var context = process.env.NODE_ENV === \"production\" ? parseFlatValueProduction(source) : parseFlatValueChecked(source);\n if (parsedValues.size >= parsedValuesLimit) {\n parsedValues.delete(parsedValues.keys().next().value);\n }\n parsedValues.set(source, context);\n return context;\n}\nfunction parseFlatValueProduction(source) {\n var length = source.length;\n var segments = [];\n var sawChain = false, chainStart = -1, chainEnd = -1, segmentStart = 0, wordStart = -1, lastColon = -1, quote = 0, comment = false, depth = 0, valid = true;\n var close = function(end) {\n var start = segmentStart;\n while (start < end && source.charCodeAt(start) <= 32) start++;\n while (end > start && source.charCodeAt(end - 1) <= 32) end--;\n segments.push(start, end, chainStart, chainEnd, (!sawChain ? 1 : 0) | 6);\n };\n var flush = function() {\n if (wordStart !== -1 && lastColon !== -1) {\n chainStart = wordStart;\n chainEnd = lastColon;\n sawChain = true;\n segmentStart = lastColon + 1;\n }\n wordStart = lastColon = -1;\n };\n for (var index = 0; index < length; index++) {\n var code = source.charCodeAt(index);\n if (comment) {\n if (code === 42 && source.charCodeAt(index + 1) === 47) {\n comment = false;\n index++;\n }\n continue;\n }\n if (code === 92) {\n index++;\n continue;\n }\n if (quote) {\n if (code === quote) quote = 0;\n else if (code === 10 || code === 13 || code === 12) valid = false;\n continue;\n }\n if (code === 47 && source.charCodeAt(index + 1) === 42) {\n comment = true;\n index++;\n continue;\n }\n if (code === 42 && source.charCodeAt(index + 1) === 47) {\n valid = false;\n index++;\n continue;\n }\n if (code === 34 || code === 39) {\n quote = code;\n continue;\n }\n if (code === 40) {\n depth++;\n continue;\n }\n if (depth) {\n if (code === 41) depth--;\n continue;\n }\n if (code <= 32) {\n if (wordStart !== -1) flush();\n continue;\n }\n if (wordStart === -1) wordStart = index;\n if (code === 59 || code === 123 || code === 125) valid = false;\n else if (code === 58) {\n if (lastColon === -1) close(wordStart);\n lastColon = index;\n }\n }\n if (comment || quote || depth) valid = false;\n flush();\n close(length);\n if (!valid) {\n for (var index1 = 4; index1 < segments.length; index1 += 5) segments[index1] &= 1;\n }\n return [\n segments,\n null,\n -1\n ];\n}\nfunction parseFlatValueChecked(source) {\n var length = source.length;\n var segments = [];\n var failure = null, failureIndex = -1, sawChain = false, chainStart = -1, chainEnd = -1, chainValid = true, segmentValid = true, segmentStart = 0, comment = false, commentStart = -1, quote = 0, quoteStart = -1, url = false, depth = 0, parenStart = -1, wordStart = -1, lastColon = -1, wordErrorMin = length, wordErrorMax = -1;\n var report = function(code2, index2) {\n if (failureIndex === -1) failureIndex = index2;\n failure !== null && failure !== void 0 ? failure : failure = code2;\n wordErrorMin = Math.min(wordErrorMin, index2);\n wordErrorMax = Math.max(wordErrorMax, index2);\n };\n var close = function(end) {\n var start = segmentStart;\n while (start < end && source.charCodeAt(start) <= 32) start++;\n while (end > start && source.charCodeAt(end - 1) <= 32) end--;\n segments.push(start, end, chainStart, chainEnd, (!sawChain ? 1 : 0) | (segmentValid ? 2 : 0) | (chainValid ? 4 : 0));\n };\n var flush = function(end) {\n if (wordStart !== -1 && lastColon !== -1) {\n chainStart = wordStart;\n chainEnd = lastColon;\n chainValid = wordErrorMin >= lastColon;\n sawChain = true;\n segmentStart = lastColon + 1;\n segmentValid = chainValid && wordErrorMax < lastColon;\n } else if (wordErrorMax !== -1) {\n segmentValid = false;\n }\n wordStart = lastColon = wordErrorMax = -1;\n wordErrorMin = length;\n };\n for (var index = 0; index < length; index++) {\n var code = source.charCodeAt(index);\n if (code === 42 && source.charCodeAt(index + 1) === 47) {\n if (comment) comment = false;\n else report(\"stray-comment-close\", index);\n index++;\n continue;\n }\n if (comment) continue;\n if (code === 92) {\n index++;\n continue;\n }\n if (quote) {\n if (code === quote) quote = 0;\n else if (code === 10 || code === 13 || code === 12) {\n report(\"unterminated-string\", quoteStart);\n quote = 0;\n index--;\n }\n continue;\n }\n if (url) {\n if (code === 41) {\n url = false;\n depth--;\n }\n continue;\n }\n if (code === 47 && source.charCodeAt(index + 1) === 42) {\n comment = true;\n commentStart = index++;\n continue;\n }\n if (code === 34 || code === 39) {\n quote = code;\n quoteStart = index;\n continue;\n }\n if (code === 40) {\n if (opensUrlToken(source, index)) url = true;\n if (!depth) parenStart = index;\n depth++;\n continue;\n }\n if (depth) {\n if (code === 41) depth--;\n continue;\n }\n if (code <= 32) {\n if (wordStart !== -1) flush(index);\n continue;\n }\n if (wordStart === -1) wordStart = index;\n if (code === 59 || code === 123 || code === 125) {\n report(\"invalid-character\", index);\n } else if (code === 58) {\n if (lastColon === -1) close(wordStart);\n lastColon = index;\n }\n }\n if (comment) report(\"unterminated-comment\", commentStart);\n if (quote) report(\"unterminated-string\", quoteStart);\n if (depth) report(\"unterminated-function\", parenStart);\n flush(length);\n close(length);\n return [\n segments,\n failure,\n failureIndex\n ];\n}\n//# sourceMappingURL=scanFlatValue.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAA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AC,GAAG,MAAM,KAAK;GACjC;EACF;EACA,IAAI,cAAc,CAAC,GAAG,YAAY;EAClC,IAAI,SAAS,MAAM,SAAS,OAAO,SAAS,KAAK;GAC/C,OAAO,qBAAqB,KAAK;EACnC,OAAO,IAAI,SAAS,IAAI;GACtB,IAAI,cAAc,CAAC,GAAG,MAAM,SAAS;GACrC,YAAY;EACd;CACF;CACA,IAAI,SAAS,OAAO,wBAAwB,YAAY;CACxD,IAAI,OAAO,OAAO,uBAAuB,UAAU;CACnD,IAAI,OAAO,OAAO,yBAAyB,UAAU;CACrD,MAAM,MAAM;CACZ,MAAM,MAAM;CACZ,OAAO;EACL;EACA;EACA;CACF;AACF"}
|
|
1
|
+
{"version":3,"file":"scanFlatValue.native.js","names":[],"sources":["cjs/runtime/scanFlatValue.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar scanFlatValue_exports = {};\n__export(scanFlatValue_exports, {\n parseFlatValue: () => parseFlatValue,\n parseFlatValueChecked: () => parseFlatValueChecked,\n parseFlatValueProduction: () => parseFlatValueProduction,\n scanFlatValue: () => scanFlatValue\n});\nmodule.exports = __toCommonJS(scanFlatValue_exports);\nvar import_valueTypes = require(\"../ast/valueTypes\");\nvar import_config = require(\"../tooling/config\");\nvar import_stateModifiers = require(\"./stateModifiers\");\nfunction opensUrlToken(source, index) {\n if (index < 3 || (source.charCodeAt(index - 3) | 32) !== 117 || (source.charCodeAt(index - 2) | 32) !== 114 || (source.charCodeAt(index - 1) | 32) !== 108) {\n return false;\n }\n var b = index > 3 ? source.charCodeAt(index - 4) : 0;\n if (b === 45 || b === 95 || b > 127 || b > 47 && b < 58 || b > 64 && b < 91 || b > 96 && b < 123) {\n return false;\n }\n while (source.charCodeAt(++index) <= 32) ;\n var q = source.charCodeAt(index);\n return q !== 34 && q !== 39;\n}\nfunction scanFlatValue(source, handler, ctx, a, b, c, d) {\n var _handler_end;\n var length = source.length;\n var failure = null, failureIndex = -1, sawChain = false, chainCount = 0, chainStart = -1, chainEnd = -1, chainValid = true, result = 0, lastAcceptedStart = 0, segmentValid = true, segmentStart = 0, comment = false, commentStart = -1, quote = 0, quoteStart = -1, url = false, depth = 0, parenStart = -1, wordStart = -1, lastColon = -1, modifierStart = -1, wordErrorMin = length, wordErrorMax = -1, chainNonPlatformModifiers = null;\n var report = function(code2, at) {\n var _handler_error;\n if (failureIndex === -1) failureIndex = at;\n failure !== null && failure !== void 0 ? failure : failure = code2;\n (_handler_error = handler.error) === null || _handler_error === void 0 ? void 0 : _handler_error.call(handler, ctx, code2, at);\n if (at < wordErrorMin) wordErrorMin = at;\n if (at > wordErrorMax) wordErrorMax = at;\n };\n var closeSegment = function(end) {\n var start2 = segmentStart, stop = end;\n while (start2 < stop && source.charCodeAt(start2) <= 32) start2++;\n while (stop > start2 && source.charCodeAt(stop - 1) <= 32) stop--;\n var bits = handler.segment(ctx, start2, stop, !sawChain, segmentValid, source, chainStart, chainEnd, chainValid, chainCount, result, failure, failureIndex, a, b, c, d) || 0;\n result |= bits;\n if (bits & 4) lastAcceptedStart = start2;\n };\n var flushWord = function(end) {\n if (wordStart !== -1) {\n var _handler_word;\n (_handler_word = handler.word) === null || _handler_word === void 0 ? void 0 : _handler_word.call(handler, ctx, wordStart, end, lastColon !== -1);\n if (lastColon !== -1) {\n var nextChainValid = wordErrorMin >= lastColon;\n if (!handler.chain(ctx, wordStart, lastColon, nextChainValid)) return false;\n chainStart = wordStart;\n chainEnd = lastColon;\n chainValid = nextChainValid;\n chainCount++;\n sawChain = true;\n segmentStart = lastColon + 1;\n segmentValid = nextChainValid && wordErrorMax < lastColon;\n }\n }\n if (lastColon === -1 && wordErrorMax !== -1) segmentValid = false;\n wordStart = lastColon = modifierStart = wordErrorMax = -1;\n wordErrorMin = length;\n chainNonPlatformModifiers = null;\n return true;\n };\n for (var index = 0; index < length; index++) {\n var code = source.charCodeAt(index);\n if (code === 42 && source.charCodeAt(index + 1) === 47) {\n if (comment) comment = false;\n else report(\"stray-comment-close\", index);\n index++;\n continue;\n }\n if (comment) continue;\n if (code === 92) {\n index++;\n continue;\n }\n if (quote) {\n if (code === quote) quote = 0;\n else if (code === 10 || code === 13 || code === 12) {\n report(\"unterminated-string\", quoteStart);\n quote = 0;\n index--;\n }\n continue;\n }\n if (url) {\n if (code === 41) {\n url = false;\n depth--;\n }\n continue;\n }\n if (code === 47 && source.charCodeAt(index + 1) === 42) {\n comment = true;\n commentStart = index++;\n continue;\n }\n if (code === 34 || code === 39) {\n quote = code;\n quoteStart = index;\n continue;\n }\n if (code === 40) {\n if (opensUrlToken(source, index)) url = true;\n if (!depth) parenStart = index;\n depth++;\n continue;\n }\n if (depth) {\n if (code === 41) depth--;\n continue;\n }\n if (code <= 32) {\n if (wordStart !== -1 && !flushWord(index)) return \"refused-chain\";\n continue;\n }\n if (wordStart === -1) wordStart = index;\n if (code === 59 || code === 123 || code === 125) {\n report(\"invalid-character\", index);\n } else if (code === 58) {\n var _handler_modifier;\n var first = modifierStart === -1;\n var start = first ? wordStart : modifierStart;\n if (first) {\n closeSegment(wordStart);\n chainNonPlatformModifiers = /* @__PURE__ */ new Set();\n }\n if (start < index) {\n var canonical = (0, import_stateModifiers.canonicalClauseModifier)(source.slice(start, index));\n if (!import_config.grammarPlatformNames.has(canonical)) {\n chainNonPlatformModifiers === null || chainNonPlatformModifiers === void 0 ? void 0 : chainNonPlatformModifiers.add(canonical);\n if (chainNonPlatformModifiers && chainNonPlatformModifiers.size > import_valueTypes.grammarMaxNonPlatformDepth) {\n if (failureIndex === -1) failureIndex = start;\n failure !== null && failure !== void 0 ? failure : failure = \"over-deep-clause\";\n if (start < wordErrorMin) wordErrorMin = start;\n if (start > wordErrorMax) wordErrorMax = start;\n }\n }\n }\n if (((_handler_modifier = handler.modifier) === null || _handler_modifier === void 0 ? void 0 : _handler_modifier.call(handler, ctx, start, index, wordErrorMax < start, first, source, a, b, c, d)) === false) {\n return \"refused-chain\";\n }\n modifierStart = (lastColon = index) + 1;\n }\n }\n if (comment) report(\"unterminated-comment\", commentStart);\n if (quote) report(\"unterminated-string\", quoteStart);\n if (depth) report(\"unterminated-function\", parenStart);\n if (!flushWord(length)) return \"refused-chain\";\n closeSegment(length);\n (_handler_end = handler.end) === null || _handler_end === void 0 ? void 0 : _handler_end.call(handler, ctx, source, result, lastAcceptedStart, chainCount, a, b, c, d, failure, failureIndex);\n return failure;\n}\nvar parsedValues = /* @__PURE__ */ new Map();\nvar parsedValuesLimit = 4096;\nfunction parseFlatValue(source) {\n var known = parsedValues.get(source);\n if (known) return known;\n var context = process.env.NODE_ENV === \"production\" ? parseFlatValueProduction(source) : parseFlatValueChecked(source);\n if (parsedValues.size >= parsedValuesLimit) {\n parsedValues.delete(parsedValues.keys().next().value);\n }\n parsedValues.set(source, context);\n return context;\n}\nfunction parseFlatValueProduction(source) {\n var length = source.length;\n var segments = [];\n var sawChain = false, chainStart = -1, chainEnd = -1, segmentStart = 0, wordStart = -1, lastColon = -1, quote = 0, comment = false, depth = 0, valid = true, clauseChainValid = true, currentChainValid = true, chainNonPlatformModifiers = null;\n var close = function(end) {\n var start = segmentStart;\n while (start < end && source.charCodeAt(start) <= 32) start++;\n while (end > start && source.charCodeAt(end - 1) <= 32) end--;\n segments.push(start, end, chainStart, chainEnd, (!sawChain ? 1 : 0) | (clauseChainValid ? 6 : 0));\n };\n var flush = function() {\n if (wordStart !== -1 && lastColon !== -1) {\n chainStart = wordStart;\n chainEnd = lastColon;\n sawChain = true;\n segmentStart = lastColon + 1;\n clauseChainValid = currentChainValid;\n }\n wordStart = lastColon = -1;\n currentChainValid = true;\n chainNonPlatformModifiers = null;\n };\n for (var index = 0; index < length; index++) {\n var code = source.charCodeAt(index);\n if (comment) {\n if (code === 42 && source.charCodeAt(index + 1) === 47) {\n comment = false;\n index++;\n }\n continue;\n }\n if (code === 92) {\n index++;\n continue;\n }\n if (quote) {\n if (code === quote) quote = 0;\n else if (code === 10 || code === 13 || code === 12) valid = false;\n continue;\n }\n if (code === 47 && source.charCodeAt(index + 1) === 42) {\n comment = true;\n index++;\n continue;\n }\n if (code === 42 && source.charCodeAt(index + 1) === 47) {\n valid = false;\n index++;\n continue;\n }\n if (code === 34 || code === 39) {\n quote = code;\n continue;\n }\n if (code === 40) {\n depth++;\n continue;\n }\n if (depth) {\n if (code === 41) depth--;\n continue;\n }\n if (code <= 32) {\n if (wordStart !== -1) flush();\n continue;\n }\n if (wordStart === -1) wordStart = index;\n if (code === 59 || code === 123 || code === 125) valid = false;\n else if (code === 58) {\n if (lastColon === -1) {\n close(wordStart);\n clauseChainValid = true;\n currentChainValid = true;\n chainNonPlatformModifiers = /* @__PURE__ */ new Set();\n }\n var modStart = lastColon === -1 ? wordStart : lastColon + 1;\n if (modStart < index && currentChainValid) {\n var canonical = (0, import_stateModifiers.canonicalClauseModifier)(source.slice(modStart, index));\n if (!import_config.grammarPlatformNames.has(canonical)) {\n chainNonPlatformModifiers === null || chainNonPlatformModifiers === void 0 ? void 0 : chainNonPlatformModifiers.add(canonical);\n if (chainNonPlatformModifiers && chainNonPlatformModifiers.size > import_valueTypes.grammarMaxNonPlatformDepth) {\n currentChainValid = false;\n }\n }\n }\n lastColon = index;\n }\n }\n if (comment || quote || depth) valid = false;\n flush();\n close(length);\n if (!valid) {\n for (var index1 = 4; index1 < segments.length; index1 += 5) segments[index1] &= 1;\n }\n return [\n segments,\n null,\n -1\n ];\n}\nfunction parseFlatValueChecked(source) {\n var length = source.length;\n var segments = [];\n var failure = null, failureIndex = -1, sawChain = false, chainStart = -1, chainEnd = -1, chainValid = true, segmentValid = true, segmentStart = 0, comment = false, commentStart = -1, quote = 0, quoteStart = -1, url = false, depth = 0, parenStart = -1, wordStart = -1, lastColon = -1, wordErrorMin = length, wordErrorMax = -1, chainNonPlatformModifiers = null;\n var report = function(code2, index2) {\n if (failureIndex === -1) failureIndex = index2;\n failure !== null && failure !== void 0 ? failure : failure = code2;\n wordErrorMin = Math.min(wordErrorMin, index2);\n wordErrorMax = Math.max(wordErrorMax, index2);\n };\n var close = function(end) {\n var start = segmentStart;\n while (start < end && source.charCodeAt(start) <= 32) start++;\n while (end > start && source.charCodeAt(end - 1) <= 32) end--;\n segments.push(start, end, chainStart, chainEnd, (!sawChain ? 1 : 0) | (segmentValid ? 2 : 0) | (chainValid ? 4 : 0));\n };\n var flush = function(end) {\n if (wordStart !== -1 && lastColon !== -1) {\n chainStart = wordStart;\n chainEnd = lastColon;\n chainValid = wordErrorMin >= lastColon;\n sawChain = true;\n segmentStart = lastColon + 1;\n segmentValid = chainValid && wordErrorMax < lastColon;\n } else if (wordErrorMax !== -1) {\n segmentValid = false;\n }\n wordStart = lastColon = wordErrorMax = -1;\n wordErrorMin = length;\n chainNonPlatformModifiers = null;\n };\n for (var index = 0; index < length; index++) {\n var code = source.charCodeAt(index);\n if (code === 42 && source.charCodeAt(index + 1) === 47) {\n if (comment) comment = false;\n else report(\"stray-comment-close\", index);\n index++;\n continue;\n }\n if (comment) continue;\n if (code === 92) {\n index++;\n continue;\n }\n if (quote) {\n if (code === quote) quote = 0;\n else if (code === 10 || code === 13 || code === 12) {\n report(\"unterminated-string\", quoteStart);\n quote = 0;\n index--;\n }\n continue;\n }\n if (url) {\n if (code === 41) {\n url = false;\n depth--;\n }\n continue;\n }\n if (code === 47 && source.charCodeAt(index + 1) === 42) {\n comment = true;\n commentStart = index++;\n continue;\n }\n if (code === 34 || code === 39) {\n quote = code;\n quoteStart = index;\n continue;\n }\n if (code === 40) {\n if (opensUrlToken(source, index)) url = true;\n if (!depth) parenStart = index;\n depth++;\n continue;\n }\n if (depth) {\n if (code === 41) depth--;\n continue;\n }\n if (code <= 32) {\n if (wordStart !== -1) flush(index);\n continue;\n }\n if (wordStart === -1) wordStart = index;\n if (code === 59 || code === 123 || code === 125) {\n report(\"invalid-character\", index);\n } else if (code === 58) {\n if (lastColon === -1) {\n close(wordStart);\n chainNonPlatformModifiers = /* @__PURE__ */ new Set();\n }\n var modStart = lastColon === -1 ? wordStart : lastColon + 1;\n if (modStart < index) {\n var canonical = (0, import_stateModifiers.canonicalClauseModifier)(source.slice(modStart, index));\n if (!import_config.grammarPlatformNames.has(canonical)) {\n chainNonPlatformModifiers === null || chainNonPlatformModifiers === void 0 ? void 0 : chainNonPlatformModifiers.add(canonical);\n if (chainNonPlatformModifiers && chainNonPlatformModifiers.size > import_valueTypes.grammarMaxNonPlatformDepth) {\n report(\"over-deep-clause\", modStart);\n }\n }\n }\n lastColon = index;\n }\n }\n if (comment) report(\"unterminated-comment\", commentStart);\n if (quote) report(\"unterminated-string\", quoteStart);\n if (depth) report(\"unterminated-function\", parenStart);\n flush(length);\n close(length);\n return [\n segments,\n failure,\n failureIndex\n ];\n}\n//# sourceMappingURL=scanFlatValue.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAA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