@fncts/schema 0.0.23 → 0.0.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (146) hide show
  1. package/AST.d.ts +60 -29
  2. package/ASTAnnotationMap.d.ts +4 -1
  3. package/LICENSE +26 -0
  4. package/ParseError/ParseError.d.ts +28 -13
  5. package/_cjs/AST.cjs +1096 -1087
  6. package/_cjs/AST.cjs.map +1 -1
  7. package/_cjs/ASTAnnotation.cjs +114 -83
  8. package/_cjs/ASTAnnotation.cjs.map +1 -1
  9. package/_cjs/ASTAnnotationMap.cjs +43 -32
  10. package/_cjs/ASTAnnotationMap.cjs.map +1 -1
  11. package/_cjs/Eq.cjs +113 -145
  12. package/_cjs/Eq.cjs.map +1 -1
  13. package/_cjs/Gen.cjs +131 -167
  14. package/_cjs/Gen.cjs.map +1 -1
  15. package/_cjs/Guard.cjs +167 -267
  16. package/_cjs/Guard.cjs.map +1 -1
  17. package/_cjs/InvalidInterpretationError.cjs +9 -15
  18. package/_cjs/InvalidInterpretationError.cjs.map +1 -1
  19. package/_cjs/ParseError/ParseError.cjs +285 -209
  20. package/_cjs/ParseError/ParseError.cjs.map +1 -1
  21. package/_cjs/ParseError/ParseErrorFormatter.cjs +0 -2
  22. package/_cjs/ParseError/PathFormatter.cjs +55 -87
  23. package/_cjs/ParseError/PathFormatter.cjs.map +1 -1
  24. package/_cjs/ParseError/TreeFormatter.cjs +70 -102
  25. package/_cjs/ParseError/TreeFormatter.cjs.map +1 -1
  26. package/_cjs/ParseError.cjs +35 -50
  27. package/_cjs/ParseResult.cjs +15 -15
  28. package/_cjs/ParseResult.cjs.map +1 -1
  29. package/_cjs/Parser/api.cjs +54 -50
  30. package/_cjs/Parser/api.cjs.map +1 -1
  31. package/_cjs/Parser/definition.cjs +17 -16
  32. package/_cjs/Parser/definition.cjs.map +1 -1
  33. package/_cjs/Parser/interpreter.cjs +276 -358
  34. package/_cjs/Parser/interpreter.cjs.map +1 -1
  35. package/_cjs/Parser.cjs +12 -39
  36. package/_cjs/Schema/api/conc.cjs +64 -59
  37. package/_cjs/Schema/api/conc.cjs.map +1 -1
  38. package/_cjs/Schema/api/either.cjs +73 -72
  39. package/_cjs/Schema/api/either.cjs.map +1 -1
  40. package/_cjs/Schema/api/hashMap.cjs +85 -85
  41. package/_cjs/Schema/api/hashMap.cjs.map +1 -1
  42. package/_cjs/Schema/api/hashSet.cjs +75 -69
  43. package/_cjs/Schema/api/hashSet.cjs.map +1 -1
  44. package/_cjs/Schema/api/list.cjs +74 -64
  45. package/_cjs/Schema/api/list.cjs.map +1 -1
  46. package/_cjs/Schema/api/map.cjs +81 -83
  47. package/_cjs/Schema/api/map.cjs.map +1 -1
  48. package/_cjs/Schema/api/maybe.cjs +56 -49
  49. package/_cjs/Schema/api/maybe.cjs.map +1 -1
  50. package/_cjs/Schema/api/set.cjs +68 -61
  51. package/_cjs/Schema/api/set.cjs.map +1 -1
  52. package/_cjs/Schema/api.cjs +332 -350
  53. package/_cjs/Schema/api.cjs.map +1 -1
  54. package/_cjs/Schema/definition.cjs +28 -27
  55. package/_cjs/Schema/definition.cjs.map +1 -1
  56. package/_cjs/Schema/derivations.cjs +85 -100
  57. package/_cjs/Schema/derivations.cjs.map +1 -1
  58. package/_cjs/Schema.cjs +95 -127
  59. package/_cjs/Show.cjs +91 -151
  60. package/_cjs/Show.cjs.map +1 -1
  61. package/_cjs/chunk.cjs +28 -0
  62. package/_cjs/global.cjs +0 -2
  63. package/_cjs/index.cjs +0 -2
  64. package/_cjs/utils.cjs +41 -46
  65. package/_cjs/utils.cjs.map +1 -1
  66. package/_mjs/AST.mjs +1007 -1031
  67. package/_mjs/AST.mjs.map +1 -1
  68. package/_mjs/ASTAnnotation.mjs +77 -71
  69. package/_mjs/ASTAnnotation.mjs.map +1 -1
  70. package/_mjs/ASTAnnotationMap.mjs +36 -25
  71. package/_mjs/ASTAnnotationMap.mjs.map +1 -1
  72. package/_mjs/Eq.mjs +101 -134
  73. package/_mjs/Eq.mjs.map +1 -1
  74. package/_mjs/Gen.mjs +117 -157
  75. package/_mjs/Gen.mjs.map +1 -1
  76. package/_mjs/Guard.mjs +154 -257
  77. package/_mjs/Guard.mjs.map +1 -1
  78. package/_mjs/InvalidInterpretationError.mjs +8 -9
  79. package/_mjs/InvalidInterpretationError.mjs.map +1 -1
  80. package/_mjs/ParseError/ParseError.mjs +270 -190
  81. package/_mjs/ParseError/ParseError.mjs.map +1 -1
  82. package/_mjs/ParseError/ParseErrorFormatter.mjs +0 -2
  83. package/_mjs/ParseError/PathFormatter.mjs +51 -80
  84. package/_mjs/ParseError/PathFormatter.mjs.map +1 -1
  85. package/_mjs/ParseError/TreeFormatter.mjs +62 -94
  86. package/_mjs/ParseError/TreeFormatter.mjs.map +1 -1
  87. package/_mjs/ParseError.mjs +5 -6
  88. package/_mjs/ParseResult.mjs +13 -9
  89. package/_mjs/ParseResult.mjs.map +1 -1
  90. package/_mjs/Parser/api.mjs +43 -39
  91. package/_mjs/Parser/api.mjs.map +1 -1
  92. package/_mjs/Parser/definition.mjs +12 -8
  93. package/_mjs/Parser/definition.mjs.map +1 -1
  94. package/_mjs/Parser/interpreter.mjs +262 -348
  95. package/_mjs/Parser/interpreter.mjs.map +1 -1
  96. package/_mjs/Parser.mjs +4 -5
  97. package/_mjs/Schema/api/conc.mjs +41 -45
  98. package/_mjs/Schema/api/conc.mjs.map +1 -1
  99. package/_mjs/Schema/api/either.mjs +55 -61
  100. package/_mjs/Schema/api/either.mjs.map +1 -1
  101. package/_mjs/Schema/api/hashMap.mjs +61 -71
  102. package/_mjs/Schema/api/hashMap.mjs.map +1 -1
  103. package/_mjs/Schema/api/hashSet.mjs +53 -56
  104. package/_mjs/Schema/api/hashSet.mjs.map +1 -1
  105. package/_mjs/Schema/api/list.mjs +50 -51
  106. package/_mjs/Schema/api/list.mjs.map +1 -1
  107. package/_mjs/Schema/api/map.mjs +59 -69
  108. package/_mjs/Schema/api/map.mjs.map +1 -1
  109. package/_mjs/Schema/api/maybe.mjs +34 -36
  110. package/_mjs/Schema/api/maybe.mjs.map +1 -1
  111. package/_mjs/Schema/api/set.mjs +47 -48
  112. package/_mjs/Schema/api/set.mjs.map +1 -1
  113. package/_mjs/Schema/api.mjs +304 -346
  114. package/_mjs/Schema/api.mjs.map +1 -1
  115. package/_mjs/Schema/definition.mjs +21 -18
  116. package/_mjs/Schema/definition.mjs.map +1 -1
  117. package/_mjs/Schema/derivations.mjs +71 -90
  118. package/_mjs/Schema/derivations.mjs.map +1 -1
  119. package/_mjs/Schema.mjs +12 -15
  120. package/_mjs/Show.mjs +79 -139
  121. package/_mjs/Show.mjs.map +1 -1
  122. package/_mjs/global.mjs +0 -2
  123. package/_mjs/index.mjs +0 -2
  124. package/_mjs/utils.mjs +35 -37
  125. package/_mjs/utils.mjs.map +1 -1
  126. package/_src/AST.ts +226 -28
  127. package/_src/ASTAnnotationMap.ts +14 -1
  128. package/_src/ParseError/ParseError.ts +128 -13
  129. package/_src/Schema/api/hashMap.ts +1 -1
  130. package/_src/Schema/api/hashSet.ts +1 -1
  131. package/_src/Schema/api/list.ts +3 -1
  132. package/_src/Schema/api/map.ts +1 -1
  133. package/_src/Schema/api/set.ts +1 -1
  134. package/package.json +7 -3
  135. package/_cjs/ParseError/ParseErrorFormatter.cjs.map +0 -1
  136. package/_cjs/ParseError.cjs.map +0 -1
  137. package/_cjs/Parser.cjs.map +0 -1
  138. package/_cjs/Schema.cjs.map +0 -1
  139. package/_cjs/global.cjs.map +0 -1
  140. package/_cjs/index.cjs.map +0 -1
  141. package/_mjs/ParseError/ParseErrorFormatter.mjs.map +0 -1
  142. package/_mjs/ParseError.mjs.map +0 -1
  143. package/_mjs/Parser.mjs.map +0 -1
  144. package/_mjs/Schema.mjs.map +0 -1
  145. package/_mjs/global.mjs.map +0 -1
  146. package/_mjs/index.mjs.map +0 -1
package/_cjs/AST.cjs CHANGED
@@ -1,1229 +1,1238 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.anyKeyword = exports.VoidKeyword = exports.Validation = exports.UnknownKeyword = exports.UniqueSymbol = exports.Union = exports.UndefinedKeyword = exports.TypeLiteral = exports.Tuple = exports.Transform = exports.TemplateLiteralSpan = exports.TemplateLiteral = exports.SymbolKeyword = exports.StringKeyword = exports.Refinement = exports.PropertySignature = exports.ObjectKeyword = exports.NumberKeyword = exports.NeverKeyword = exports.Literal = exports.Lazy = exports.IndexSignature = exports.Enum = exports.Element = exports.Declaration = exports.BooleanKeyword = exports.BigIntKeyword = exports.AnyKeyword = exports.Annotated = exports.ASTTypeId = exports.AST = void 0;
7
- exports.appendElement = appendElement;
8
- exports.appendRestElement = appendRestElement;
9
- exports.booleanKeyword = exports.bigIntKeyword = void 0;
10
- exports.combineAnnotations = combineAnnotations;
11
- exports.concrete = concrete;
12
- exports.createDeclaration = createDeclaration;
13
- exports.createElement = void 0;
14
- exports.createEnum = createEnum;
15
- exports.createIndexSignature = void 0;
16
- exports.createKey = createKey;
17
- exports.createPropertySignature = exports.createLiteral = exports.createLazy = void 0;
18
- exports.createRecord = createRecord;
19
- exports.createTemplateLiteral = exports.createRefinement = void 0;
20
- exports.createTransform = createTransform;
21
- exports.createUniqueSymbol = exports.createUnion = exports.createTypeLiteral = exports.createTuple = void 0;
22
- exports.createValidation = createValidation;
23
- exports.getAnnotations = getAnnotations;
24
- exports.getCardinality = getCardinality;
25
- exports.getCompiler = getCompiler;
26
- exports.getFormattedExpected = getFormattedExpected;
27
- exports.getFrom = void 0;
28
- exports.getLiterals = getLiterals;
29
- exports.getParameter = getParameter;
30
- exports.getPropertySignatures = void 0;
31
- exports.getSearchTree = getSearchTree;
32
- exports.getTo = void 0;
33
- exports.getWeight = getWeight;
34
- exports.isBigIntKeyword = isBigIntKeyword;
35
- exports.isBooleanKeyword = isBooleanKeyword;
36
- exports.isDeclaration = isDeclaration;
37
- exports.isLazy = isLazy;
38
- exports.isNumberKeyword = exports.isLiteral = void 0;
39
- exports.isRefinement = isRefinement;
40
- exports.isSymbolKeyword = exports.isStringKeyword = void 0;
41
- exports.isTypeLiteral = isTypeLiteral;
42
- exports.isUnion = isUnion;
43
- exports.isUniqueSymbol = void 0;
44
- exports.keyof = keyof;
45
- exports.objectKeyword = exports.numberKeyword = exports.neverKeyword = exports.keysOf = void 0;
46
- exports.omit = omit;
47
- exports.partial = void 0;
48
- exports.pick = pick;
49
- exports.setAnnotation = setAnnotation;
50
- exports.voidKeyword = exports.unknownRecord = exports.unknownKeyword = exports.unknownArray = exports.undefinedKeyword = exports.symbolKeyword = exports.stringKeyword = void 0;
51
- var tsplus_module_1 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/schema/Show"));
52
- var tsplus_module_2 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/schema/ASTAnnotation"));
53
- var tsplus_module_3 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/base/collection/immutable/Vector/api"));
54
- var tsplus_module_4 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/base/data/Maybe/constructors"));
55
- var tsplus_module_5 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/schema/ParseResult"));
56
- var tsplus_module_6 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/schema/ParseError/ParseError"));
57
- var tsplus_module_7 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/base/data/number/instances"));
58
- var tsplus_module_8 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/base/data/Ord/api/contramap"));
59
- var tsplus_module_9 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/base/data/Ord/api"));
60
- var tsplus_module_10 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/base/data/Ord/api/max"));
61
- var tsplus_module_11 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/base/collection/Iterable/api"));
62
- var tsplus_module_12 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/base/data/Maybe/destructors"));
63
- var tsplus_module_13 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/base/data/Maybe/definition"));
64
- var tsplus_module_14 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/base/collection/immutable/Vector/internal"));
65
- var tsplus_module_15 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/base/data/Maybe/api"));
66
- var _Showable = /*#__PURE__*/require("@fncts/base/data/Showable");
67
- var _utils = /*#__PURE__*/require("@fncts/schema/utils");
68
- var _ASTAnnotationMap = /*#__PURE__*/require("./ASTAnnotationMap.cjs");
69
- function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
70
- var _a;
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_chunk = require("./chunk.cjs");
3
+ const require_ASTAnnotationMap = require("./ASTAnnotationMap.cjs");
4
+ let _fncts_base_collection_immutable_Vector_api = require("@fncts/base/collection/immutable/Vector/api");
5
+ _fncts_base_collection_immutable_Vector_api = require_chunk.__toESM(_fncts_base_collection_immutable_Vector_api, 1);
6
+ let _fncts_base_data_Showable = require("@fncts/base/data/Showable");
7
+ let _fncts_base_data_Maybe_api = require("@fncts/base/data/Maybe/api");
8
+ _fncts_base_data_Maybe_api = require_chunk.__toESM(_fncts_base_data_Maybe_api, 1);
9
+ let _fncts_base_data_Maybe_constructors = require("@fncts/base/data/Maybe/constructors");
10
+ _fncts_base_data_Maybe_constructors = require_chunk.__toESM(_fncts_base_data_Maybe_constructors, 1);
11
+ let _fncts_base_data_Maybe_destructors = require("@fncts/base/data/Maybe/destructors");
12
+ _fncts_base_data_Maybe_destructors = require_chunk.__toESM(_fncts_base_data_Maybe_destructors, 1);
13
+ let _fncts_schema_utils = require("@fncts/schema/utils");
14
+ let _fncts_schema_ASTAnnotation = require("@fncts/schema/ASTAnnotation");
15
+ _fncts_schema_ASTAnnotation = require_chunk.__toESM(_fncts_schema_ASTAnnotation, 1);
16
+ let _fncts_schema_ParseResult = require("@fncts/schema/ParseResult");
17
+ _fncts_schema_ParseResult = require_chunk.__toESM(_fncts_schema_ParseResult, 1);
18
+ let _fncts_base_data_Maybe_definition = require("@fncts/base/data/Maybe/definition");
19
+ _fncts_base_data_Maybe_definition = require_chunk.__toESM(_fncts_base_data_Maybe_definition, 1);
20
+ let _fncts_base_data_Equatable_definition = require("@fncts/base/data/Equatable/definition");
21
+ _fncts_base_data_Equatable_definition = require_chunk.__toESM(_fncts_base_data_Equatable_definition, 1);
22
+ let _fncts_schema_Show = require("@fncts/schema/Show");
23
+ _fncts_schema_Show = require_chunk.__toESM(_fncts_schema_Show, 1);
24
+ let _fncts_base_util_predicates = require("@fncts/base/util/predicates");
25
+ _fncts_base_util_predicates = require_chunk.__toESM(_fncts_base_util_predicates, 1);
26
+ let _fncts_base_collection_immutable_Vector_definition = require("@fncts/base/collection/immutable/Vector/definition");
27
+ _fncts_base_collection_immutable_Vector_definition = require_chunk.__toESM(_fncts_base_collection_immutable_Vector_definition, 1);
28
+ let _fncts_schema_ParseError_ParseError = require("@fncts/schema/ParseError/ParseError");
29
+ _fncts_schema_ParseError_ParseError = require_chunk.__toESM(_fncts_schema_ParseError_ParseError, 1);
30
+ let _fncts_base_data_number_instances = require("@fncts/base/data/number/instances");
31
+ _fncts_base_data_number_instances = require_chunk.__toESM(_fncts_base_data_number_instances, 1);
32
+ let _fncts_base_data_Ord_api_contramap = require("@fncts/base/data/Ord/api/contramap");
33
+ _fncts_base_data_Ord_api_contramap = require_chunk.__toESM(_fncts_base_data_Ord_api_contramap, 1);
34
+ let _fncts_base_data_Ord_api = require("@fncts/base/data/Ord/api");
35
+ _fncts_base_data_Ord_api = require_chunk.__toESM(_fncts_base_data_Ord_api, 1);
36
+ let _fncts_base_data_Ord_api_max = require("@fncts/base/data/Ord/api/max");
37
+ _fncts_base_data_Ord_api_max = require_chunk.__toESM(_fncts_base_data_Ord_api_max, 1);
38
+ let _fncts_base_collection_Iterable_api = require("@fncts/base/collection/Iterable/api");
39
+ _fncts_base_collection_Iterable_api = require_chunk.__toESM(_fncts_base_collection_Iterable_api, 1);
40
+ let _fncts_base_collection_immutable_Vector_internal = require("@fncts/base/collection/immutable/Vector/internal");
41
+ _fncts_base_collection_immutable_Vector_internal = require_chunk.__toESM(_fncts_base_collection_immutable_Vector_internal, 1);
42
+ //#region build/esm/AST.js
71
43
  const fileName_1 = "(@fncts/schema) src/AST.ts";
72
- const createLiteral = exports.createLiteral = createLiteral_1;
73
- const isLiteral = exports.isLiteral = isLiteral_1;
74
- const createUniqueSymbol = exports.createUniqueSymbol = createUniqueSymbol_1;
75
- const isUniqueSymbol = exports.isUniqueSymbol = isUniqueSymbol_1;
76
- const isStringKeyword = exports.isStringKeyword = isStringKeyword_1;
77
- const isNumberKeyword = exports.isNumberKeyword = isNumberKeyword_1;
78
- const isSymbolKeyword = exports.isSymbolKeyword = isSymbolKeyword_1;
79
- const createTemplateLiteral = exports.createTemplateLiteral = createTemplateLiteral_1;
80
- const createElement = exports.createElement = createElement_1;
81
- const createTuple = exports.createTuple = createTuple_1;
82
- const createPropertySignature = exports.createPropertySignature = createPropertySignature_1;
83
- const createIndexSignature = exports.createIndexSignature = createIndexSignature_1;
84
- const createTypeLiteral = exports.createTypeLiteral = createTypeLiteral_1;
85
- const createUnion = exports.createUnion = createUnion_1;
86
- const createLazy = exports.createLazy = createLazy_1;
87
- const createRefinement = exports.createRefinement = createRefinement_1;
88
- const getPropertySignatures = exports.getPropertySignatures = getPropertySignatures_1;
89
- const keysOf = exports.keysOf = keysOf_1;
90
- const partial = exports.partial = partial_1;
91
- const getFrom = exports.getFrom = getFrom_1;
92
- const getTo = exports.getTo = getTo_1;
93
- const ASTTypeId = exports.ASTTypeId = /*#__PURE__*/Symbol.for("fncts.schema.AST");
94
- class Annotated {
95
- constructor() {
96
- this.annotations = _ASTAnnotationMap.ASTAnnotationMap.empty;
97
- }
98
- }
44
+ const createLiteral = createLiteral_1;
45
+ const isLiteral = isLiteral_1;
46
+ const createUniqueSymbol = createUniqueSymbol_1;
47
+ const isUniqueSymbol = isUniqueSymbol_1;
48
+ const isStringKeyword = isStringKeyword_1;
49
+ const isNumberKeyword = isNumberKeyword_1;
50
+ const isSymbolKeyword = isSymbolKeyword_1;
51
+ const createTemplateLiteral = createTemplateLiteral_1;
52
+ const createElement = createElement_1;
53
+ const createTuple = createTuple_1;
54
+ const createPropertySignature = createPropertySignature_1;
55
+ const createIndexSignature = createIndexSignature_1;
56
+ const createTypeLiteral = createTypeLiteral_1;
57
+ const createUnion = createUnion_1;
58
+ const createLazy = createLazy_1;
59
+ const createRefinement = createRefinement_1;
60
+ const getPropertySignatures = getPropertySignatures_1;
61
+ const keysOf = keysOf_1;
62
+ const partial = partial_1;
63
+ const getFrom = getFrom_1;
64
+ const getTo = getTo_1;
65
+ const ASTTypeId = Symbol.for("fncts.schema.AST");
66
+ var Annotated = class {
67
+ annotations = require_ASTAnnotationMap.ASTAnnotationMap.empty;
68
+ };
99
69
  /**
100
- * @tsplus type fncts.schema.AST
101
- * @tsplus companion fncts.schema.ASTOps
102
- */
103
- exports.Annotated = Annotated;
104
- class AST extends Annotated {
105
- constructor() {
106
- super(...arguments);
107
- this[_a] = ASTTypeId;
108
- }
109
- toString(verbose = false) {
110
- return tsplus_module_1.showAST(verbose)(this);
111
- }
112
- }
113
- exports.AST = AST;
114
- _a = ASTTypeId;
70
+ * @tsplus type fncts.schema.AST
71
+ * @tsplus companion fncts.schema.ASTOps
72
+ */
73
+ var AST = class extends Annotated {
74
+ [ASTTypeId] = ASTTypeId;
75
+ toString(verbose = false) {
76
+ return _fncts_schema_Show.showAST(verbose)(this);
77
+ }
78
+ };
115
79
  /**
116
- * @tsplus static fncts.schema.ASTOps concrete
117
- * @tsplus macro remove
118
- */
119
- function concrete(_) {
120
- //
80
+ * @tsplus static fncts.schema.ASTOps concrete
81
+ * @tsplus macro remove
82
+ */
83
+ function concrete(_) {}
84
+ function isAST(u) {
85
+ return _fncts_base_util_predicates.isObject(u) && ASTTypeId in u;
86
+ }
87
+ function hasTag(u, tag) {
88
+ return isAST(u) && u._tag === tag;
121
89
  }
122
90
  function getAnnotations(key) {
123
- return self => {
124
- return self.annotations.get(key);
125
- };
91
+ return (self) => {
92
+ return self.annotations.get(key);
93
+ };
126
94
  }
127
- /*
128
- * Declaration
129
- */
130
95
  /**
131
- * @tsplus type fncts.schema.AST.Declaration
132
- */
133
- class Declaration extends AST {
134
- constructor(typeParameters, decode, encode, annotations = _ASTAnnotationMap.ASTAnnotationMap.empty) {
135
- super();
136
- this.typeParameters = typeParameters;
137
- this.decode = decode;
138
- this.encode = encode;
139
- this.annotations = annotations;
140
- this._tag = 0 /* ASTTag.Declaration */;
141
- }
142
- clone(newProperties) {
143
- return new Declaration(newProperties.typeParameters ?? this.typeParameters, newProperties.decode ?? this.decode, newProperties.encode ?? this.encode, newProperties.annotations ?? this.annotations);
144
- }
145
- }
96
+ * @tsplus type fncts.schema.AST.Declaration
97
+ */
98
+ var Declaration = class Declaration extends AST {
99
+ typeParameters;
100
+ decode;
101
+ encode;
102
+ annotations;
103
+ _tag = 0;
104
+ constructor(typeParameters, decode, encode, annotations = require_ASTAnnotationMap.ASTAnnotationMap.empty) {
105
+ super();
106
+ this.typeParameters = typeParameters;
107
+ this.decode = decode;
108
+ this.encode = encode;
109
+ this.annotations = annotations;
110
+ }
111
+ clone(newProperties) {
112
+ return new Declaration(newProperties.typeParameters ?? this.typeParameters, newProperties.decode ?? this.decode, newProperties.encode ?? this.encode, newProperties.annotations ?? this.annotations);
113
+ }
114
+ [_fncts_base_data_Equatable_definition.equalsSymbol](that, context) {
115
+ return hasTag(that, 0) && context.comparator(this.typeParameters, that.typeParameters) && context.comparator(this.decode, that.decode) && context.comparator(this.encode, that.encode) && context.comparator(this.annotations, that.annotations);
116
+ }
117
+ };
146
118
  /**
147
- * @tsplus static fncts.schema.ASTOps createDeclaration
148
- */
149
- exports.Declaration = Declaration;
150
- function createDeclaration(typeParameters, decode, encode, annotations = _ASTAnnotationMap.ASTAnnotationMap.empty) {
151
- return new Declaration(typeParameters, decode, encode, annotations);
119
+ * @tsplus static fncts.schema.ASTOps createDeclaration
120
+ */
121
+ function createDeclaration(typeParameters, decode, encode, annotations = require_ASTAnnotationMap.ASTAnnotationMap.empty) {
122
+ return new Declaration(typeParameters, decode, encode, annotations);
152
123
  }
153
124
  /**
154
- * @tsplus fluent fncts.schema.AST isDeclaration
155
- */
125
+ * @tsplus fluent fncts.schema.AST isDeclaration
126
+ */
156
127
  function isDeclaration(self) {
157
- void 0;
158
- return self._tag === 0 /* ASTTag.Declaration */;
159
- }
160
- class Literal extends AST {
161
- constructor(literal, annotations = _ASTAnnotationMap.ASTAnnotationMap.empty) {
162
- super();
163
- this.literal = literal;
164
- this.annotations = annotations;
165
- this._tag = 1 /* ASTTag.Literal */;
166
- }
167
- clone(newProperties) {
168
- return new Literal(newProperties.literal ?? this.literal, newProperties.annotations ?? this.annotations);
169
- }
170
- }
128
+ return self._tag === 0;
129
+ }
130
+ var Literal = class Literal extends AST {
131
+ literal;
132
+ annotations;
133
+ _tag = 1;
134
+ constructor(literal, annotations = require_ASTAnnotationMap.ASTAnnotationMap.empty) {
135
+ super();
136
+ this.literal = literal;
137
+ this.annotations = annotations;
138
+ }
139
+ clone(newProperties) {
140
+ return new Literal(newProperties.literal ?? this.literal, newProperties.annotations ?? this.annotations);
141
+ }
142
+ [_fncts_base_data_Equatable_definition.equalsSymbol](that, context) {
143
+ return hasTag(that, 1) && context.comparator(this.literal, that.literal) && context.comparator(this.annotations, that.annotations);
144
+ }
145
+ };
171
146
  /**
172
- * @tsplus static fncts.schema.ASTOps createLiteral
173
- */
174
- exports.Literal = Literal;
175
- function createLiteral_1(literal, annotations = _ASTAnnotationMap.ASTAnnotationMap.empty) {
176
- return new Literal(literal, annotations);
147
+ * @tsplus static fncts.schema.ASTOps createLiteral
148
+ */
149
+ function createLiteral_1(literal, annotations = require_ASTAnnotationMap.ASTAnnotationMap.empty) {
150
+ return new Literal(literal, annotations);
177
151
  }
178
152
  /**
179
- * @tsplus fluent fncts.schema.AST isLiteral
180
- */
153
+ * @tsplus fluent fncts.schema.AST isLiteral
154
+ */
181
155
  function isLiteral_1(self) {
182
- void 0;
183
- return self._tag === 1 /* ASTTag.Literal */;
184
- }
185
- /*
186
- * UniqueSymbol
187
- */
188
- class UniqueSymbol extends AST {
189
- constructor(symbol, annotations = _ASTAnnotationMap.ASTAnnotationMap.empty) {
190
- super();
191
- this.symbol = symbol;
192
- this.annotations = annotations;
193
- this._tag = 2 /* ASTTag.UniqueSymbol */;
194
- }
195
- clone(newProperties) {
196
- return new UniqueSymbol(newProperties.symbol ?? this.symbol, newProperties.annotations ?? this.annotations);
197
- }
198
- }
156
+ return self._tag === 1;
157
+ }
158
+ var UniqueSymbol = class UniqueSymbol extends AST {
159
+ symbol;
160
+ annotations;
161
+ _tag = 2;
162
+ constructor(symbol, annotations = require_ASTAnnotationMap.ASTAnnotationMap.empty) {
163
+ super();
164
+ this.symbol = symbol;
165
+ this.annotations = annotations;
166
+ }
167
+ clone(newProperties) {
168
+ return new UniqueSymbol(newProperties.symbol ?? this.symbol, newProperties.annotations ?? this.annotations);
169
+ }
170
+ [_fncts_base_data_Equatable_definition.equalsSymbol](that, context) {
171
+ return hasTag(that, 2) && context.comparator(this.symbol, that.symbol) && context.comparator(this.annotations, that.annotations);
172
+ }
173
+ };
199
174
  /**
200
- * @tsplus static fncts.schema.ASTOps createUniqueSymbol
201
- */
202
- exports.UniqueSymbol = UniqueSymbol;
203
- function createUniqueSymbol_1(symbol, annotations = _ASTAnnotationMap.ASTAnnotationMap.empty) {
204
- return new UniqueSymbol(symbol, annotations);
175
+ * @tsplus static fncts.schema.ASTOps createUniqueSymbol
176
+ */
177
+ function createUniqueSymbol_1(symbol, annotations = require_ASTAnnotationMap.ASTAnnotationMap.empty) {
178
+ return new UniqueSymbol(symbol, annotations);
205
179
  }
206
180
  /**
207
- * @tsplus fluent fncts.schema.AST isUniqueSymbol
208
- */
181
+ * @tsplus fluent fncts.schema.AST isUniqueSymbol
182
+ */
209
183
  function isUniqueSymbol_1(self) {
210
- void 0;
211
- return self._tag === 2 /* ASTTag.UniqueSymbol */;
212
- }
213
- /*
214
- * UndefinedKeyword
215
- */
216
- class UndefinedKeyword extends AST {
217
- constructor(annotations = _ASTAnnotationMap.ASTAnnotationMap.empty) {
218
- super();
219
- this.annotations = annotations;
220
- this._tag = 3 /* ASTTag.UndefinedKeyword */;
221
- }
222
- clone(newProperties) {
223
- return new UndefinedKeyword(newProperties.annotations ?? this.annotations);
224
- }
225
- }
184
+ return self._tag === 2;
185
+ }
186
+ var UndefinedKeyword = class UndefinedKeyword extends AST {
187
+ annotations;
188
+ _tag = 3;
189
+ constructor(annotations = require_ASTAnnotationMap.ASTAnnotationMap.empty) {
190
+ super();
191
+ this.annotations = annotations;
192
+ }
193
+ clone(newProperties) {
194
+ return new UndefinedKeyword(newProperties.annotations ?? this.annotations);
195
+ }
196
+ [_fncts_base_data_Equatable_definition.equalsSymbol](that, context) {
197
+ return hasTag(that, 3) && context.comparator(this.annotations, that.annotations);
198
+ }
199
+ };
226
200
  /**
227
- * @tsplus static fncts.schema.ASTOps undefinedKeyword
228
- */
229
- exports.UndefinedKeyword = UndefinedKeyword;
230
- const undefinedKeyword_1 = /*#__PURE__*/new UndefinedKeyword(/*#__PURE__*/_ASTAnnotationMap.ASTAnnotationMap.empty.annotate(tsplus_module_2.Title, "undefined"));
231
- const undefinedKeyword = exports.undefinedKeyword = undefinedKeyword_1;
232
- /*
233
- * VoidKeyword
234
- */
235
- class VoidKeyword extends AST {
236
- constructor(annotations = _ASTAnnotationMap.ASTAnnotationMap.empty) {
237
- super();
238
- this.annotations = annotations;
239
- this._tag = 4 /* ASTTag.VoidKeyword */;
240
- }
241
- clone(newProperties) {
242
- return new VoidKeyword(newProperties.annotations ?? this.annotations);
243
- }
244
- }
201
+ * @tsplus static fncts.schema.ASTOps undefinedKeyword
202
+ */
203
+ const undefinedKeyword_1 = new UndefinedKeyword(require_ASTAnnotationMap.ASTAnnotationMap.empty.annotate(_fncts_schema_ASTAnnotation.Title, "undefined"));
204
+ const undefinedKeyword = undefinedKeyword_1;
205
+ var VoidKeyword = class VoidKeyword extends AST {
206
+ annotations;
207
+ _tag = 4;
208
+ constructor(annotations = require_ASTAnnotationMap.ASTAnnotationMap.empty) {
209
+ super();
210
+ this.annotations = annotations;
211
+ }
212
+ clone(newProperties) {
213
+ return new VoidKeyword(newProperties.annotations ?? this.annotations);
214
+ }
215
+ [_fncts_base_data_Equatable_definition.equalsSymbol](that, context) {
216
+ return hasTag(that, 4) && context.comparator(this.annotations, that.annotations);
217
+ }
218
+ };
245
219
  /**
246
- * @tsplus static fncts.schema.ASTOps voidKeyword
247
- */
248
- exports.VoidKeyword = VoidKeyword;
249
- const voidKeyword = exports.voidKeyword = /*#__PURE__*/new VoidKeyword(/*#__PURE__*/_ASTAnnotationMap.ASTAnnotationMap.empty.annotate(tsplus_module_2.Title, "void"));
250
- /*
251
- * NeverKeyword
252
- */
253
- class NeverKeyword extends AST {
254
- constructor(annotations = _ASTAnnotationMap.ASTAnnotationMap.empty) {
255
- super();
256
- this.annotations = annotations;
257
- this._tag = 5 /* ASTTag.NeverKeyword */;
258
- }
259
- clone(newProperties) {
260
- return new NeverKeyword(newProperties.annotations ?? this.annotations);
261
- }
262
- }
220
+ * @tsplus static fncts.schema.ASTOps voidKeyword
221
+ */
222
+ const voidKeyword = new VoidKeyword(require_ASTAnnotationMap.ASTAnnotationMap.empty.annotate(_fncts_schema_ASTAnnotation.Title, "void"));
223
+ var NeverKeyword = class NeverKeyword extends AST {
224
+ annotations;
225
+ _tag = 5;
226
+ constructor(annotations = require_ASTAnnotationMap.ASTAnnotationMap.empty) {
227
+ super();
228
+ this.annotations = annotations;
229
+ }
230
+ clone(newProperties) {
231
+ return new NeverKeyword(newProperties.annotations ?? this.annotations);
232
+ }
233
+ [_fncts_base_data_Equatable_definition.equalsSymbol](that, context) {
234
+ return hasTag(that, 5) && context.comparator(this.annotations, that.annotations);
235
+ }
236
+ };
263
237
  /**
264
- * @tsplus static fncts.schema.ASTOps neverKeyword
265
- */
266
- exports.NeverKeyword = NeverKeyword;
267
- const neverKeyword_1 = /*#__PURE__*/new NeverKeyword(/*#__PURE__*/_ASTAnnotationMap.ASTAnnotationMap.empty.annotate(tsplus_module_2.Title, "never"));
268
- const neverKeyword = exports.neverKeyword = neverKeyword_1;
269
- /*
270
- * UnknownKeyword
271
- */
272
- class UnknownKeyword extends AST {
273
- constructor(annotations = _ASTAnnotationMap.ASTAnnotationMap.empty) {
274
- super();
275
- this.annotations = annotations;
276
- this._tag = 6 /* ASTTag.UnknownKeyword */;
277
- }
278
- clone(newProperties) {
279
- return new UnknownKeyword(newProperties.annotations ?? this.annotations);
280
- }
281
- }
238
+ * @tsplus static fncts.schema.ASTOps neverKeyword
239
+ */
240
+ const neverKeyword_1 = new NeverKeyword(require_ASTAnnotationMap.ASTAnnotationMap.empty.annotate(_fncts_schema_ASTAnnotation.Title, "never"));
241
+ const neverKeyword = neverKeyword_1;
242
+ var UnknownKeyword = class UnknownKeyword extends AST {
243
+ annotations;
244
+ _tag = 6;
245
+ constructor(annotations = require_ASTAnnotationMap.ASTAnnotationMap.empty) {
246
+ super();
247
+ this.annotations = annotations;
248
+ }
249
+ clone(newProperties) {
250
+ return new UnknownKeyword(newProperties.annotations ?? this.annotations);
251
+ }
252
+ [_fncts_base_data_Equatable_definition.equalsSymbol](that, context) {
253
+ return hasTag(that, 6) && context.comparator(this.annotations, that.annotations);
254
+ }
255
+ };
282
256
  /**
283
- * @tsplus static fncts.schema.ASTOps unknownKeyword
284
- */
285
- exports.UnknownKeyword = UnknownKeyword;
286
- const unknownKeyword_1 = /*#__PURE__*/new UnknownKeyword(/*#__PURE__*/_ASTAnnotationMap.ASTAnnotationMap.empty.annotate(tsplus_module_2.Title, "unknown"));
287
- const unknownKeyword = exports.unknownKeyword = unknownKeyword_1;
288
- /*
289
- * AnyKeyword
290
- */
291
- class AnyKeyword extends AST {
292
- constructor(annotations = _ASTAnnotationMap.ASTAnnotationMap.empty) {
293
- super();
294
- this.annotations = annotations;
295
- this._tag = 7 /* ASTTag.AnyKeyword */;
296
- }
297
- clone(newProperties) {
298
- return new AnyKeyword(newProperties.annotations ?? this.annotations);
299
- }
300
- }
257
+ * @tsplus static fncts.schema.ASTOps unknownKeyword
258
+ */
259
+ const unknownKeyword_1 = new UnknownKeyword(require_ASTAnnotationMap.ASTAnnotationMap.empty.annotate(_fncts_schema_ASTAnnotation.Title, "unknown"));
260
+ const unknownKeyword = unknownKeyword_1;
261
+ var AnyKeyword = class AnyKeyword extends AST {
262
+ annotations;
263
+ _tag = 7;
264
+ constructor(annotations = require_ASTAnnotationMap.ASTAnnotationMap.empty) {
265
+ super();
266
+ this.annotations = annotations;
267
+ }
268
+ clone(newProperties) {
269
+ return new AnyKeyword(newProperties.annotations ?? this.annotations);
270
+ }
271
+ [_fncts_base_data_Equatable_definition.equalsSymbol](that, context) {
272
+ return hasTag(that, 7) && context.comparator(this.annotations, that.annotations);
273
+ }
274
+ };
301
275
  /**
302
- * @tsplus static fncts.schema.ASTOps anyKeyword
303
- */
304
- exports.AnyKeyword = AnyKeyword;
305
- const anyKeyword = exports.anyKeyword = /*#__PURE__*/new AnyKeyword(/*#__PURE__*/_ASTAnnotationMap.ASTAnnotationMap.empty.annotate(tsplus_module_2.Title, "any"));
306
- /*
307
- * StringKeyword
308
- */
309
- class StringKeyword extends AST {
310
- constructor(annotations = _ASTAnnotationMap.ASTAnnotationMap.empty) {
311
- super();
312
- this.annotations = annotations;
313
- this._tag = 8 /* ASTTag.StringKeyword */;
314
- }
315
- clone(newProperties) {
316
- return new StringKeyword(newProperties.annotations ?? this.annotations);
317
- }
318
- }
276
+ * @tsplus static fncts.schema.ASTOps anyKeyword
277
+ */
278
+ const anyKeyword = new AnyKeyword(require_ASTAnnotationMap.ASTAnnotationMap.empty.annotate(_fncts_schema_ASTAnnotation.Title, "any"));
279
+ var StringKeyword = class StringKeyword extends AST {
280
+ annotations;
281
+ _tag = 8;
282
+ constructor(annotations = require_ASTAnnotationMap.ASTAnnotationMap.empty) {
283
+ super();
284
+ this.annotations = annotations;
285
+ }
286
+ clone(newProperties) {
287
+ return new StringKeyword(newProperties.annotations ?? this.annotations);
288
+ }
289
+ [_fncts_base_data_Equatable_definition.equalsSymbol](that, context) {
290
+ return hasTag(that, 8) && context.comparator(this.annotations, that.annotations);
291
+ }
292
+ };
319
293
  /**
320
- * @tsplus static fncts.schema.ASTOps stringKeyword
321
- */
322
- exports.StringKeyword = StringKeyword;
323
- const stringKeyword_1 = /*#__PURE__*/new StringKeyword(/*#__PURE__*/_ASTAnnotationMap.ASTAnnotationMap.empty.annotate(tsplus_module_2.Title, "string"));
324
- const stringKeyword = exports.stringKeyword = stringKeyword_1;
294
+ * @tsplus static fncts.schema.ASTOps stringKeyword
295
+ */
296
+ const stringKeyword_1 = new StringKeyword(require_ASTAnnotationMap.ASTAnnotationMap.empty.annotate(_fncts_schema_ASTAnnotation.Title, "string"));
297
+ const stringKeyword = stringKeyword_1;
325
298
  /**
326
- * @tsplus fluent fncts.schema.AST isStringKeyword
327
- */
299
+ * @tsplus fluent fncts.schema.AST isStringKeyword
300
+ */
328
301
  function isStringKeyword_1(self) {
329
- void 0;
330
- return self._tag === 8 /* ASTTag.StringKeyword */;
331
- }
332
- /*
333
- * NumberKeyword
334
- */
335
- class NumberKeyword extends AST {
336
- constructor(annotations = _ASTAnnotationMap.ASTAnnotationMap.empty) {
337
- super();
338
- this.annotations = annotations;
339
- this._tag = 9 /* ASTTag.NumberKeyword */;
340
- }
341
- clone(newProperties) {
342
- return new NumberKeyword(newProperties.annotations ?? this.annotations);
343
- }
344
- }
302
+ return self._tag === 8;
303
+ }
304
+ var NumberKeyword = class NumberKeyword extends AST {
305
+ annotations;
306
+ _tag = 9;
307
+ constructor(annotations = require_ASTAnnotationMap.ASTAnnotationMap.empty) {
308
+ super();
309
+ this.annotations = annotations;
310
+ }
311
+ clone(newProperties) {
312
+ return new NumberKeyword(newProperties.annotations ?? this.annotations);
313
+ }
314
+ [_fncts_base_data_Equatable_definition.equalsSymbol](that, context) {
315
+ return hasTag(that, 9) && context.comparator(this.annotations, that.annotations);
316
+ }
317
+ };
345
318
  /**
346
- * @tsplus static fncts.schema.ASTOps numberKeyword
347
- */
348
- exports.NumberKeyword = NumberKeyword;
349
- const numberKeyword_1 = /*#__PURE__*/new NumberKeyword(/*#__PURE__*/_ASTAnnotationMap.ASTAnnotationMap.empty.annotate(tsplus_module_2.Title, "number"));
350
- const numberKeyword = exports.numberKeyword = numberKeyword_1;
319
+ * @tsplus static fncts.schema.ASTOps numberKeyword
320
+ */
321
+ const numberKeyword_1 = new NumberKeyword(require_ASTAnnotationMap.ASTAnnotationMap.empty.annotate(_fncts_schema_ASTAnnotation.Title, "number"));
322
+ const numberKeyword = numberKeyword_1;
351
323
  /**
352
- * @tsplus fluent fncts.schema.AST isNumberKeyword
353
- */
324
+ * @tsplus fluent fncts.schema.AST isNumberKeyword
325
+ */
354
326
  function isNumberKeyword_1(self) {
355
- void 0;
356
- return self._tag === 9 /* ASTTag.NumberKeyword */;
357
- }
358
- /*
359
- * BooleanKeyword
360
- */
361
- class BooleanKeyword extends AST {
362
- constructor(annotations = _ASTAnnotationMap.ASTAnnotationMap.empty) {
363
- super();
364
- this.annotations = annotations;
365
- this._tag = 10 /* ASTTag.BooleanKeyword */;
366
- }
367
- clone(newProperties) {
368
- return new BooleanKeyword(newProperties.annotations ?? this.annotations);
369
- }
370
- }
327
+ return self._tag === 9;
328
+ }
329
+ var BooleanKeyword = class BooleanKeyword extends AST {
330
+ annotations;
331
+ _tag = 10;
332
+ constructor(annotations = require_ASTAnnotationMap.ASTAnnotationMap.empty) {
333
+ super();
334
+ this.annotations = annotations;
335
+ }
336
+ clone(newProperties) {
337
+ return new BooleanKeyword(newProperties.annotations ?? this.annotations);
338
+ }
339
+ [_fncts_base_data_Equatable_definition.equalsSymbol](that, context) {
340
+ return hasTag(that, 10) && context.comparator(this.annotations, that.annotations);
341
+ }
342
+ };
371
343
  /**
372
- * @tsplus static fncts.schema.ASTOps booleanKeyword
373
- */
374
- exports.BooleanKeyword = BooleanKeyword;
375
- const booleanKeyword = exports.booleanKeyword = /*#__PURE__*/new BooleanKeyword(/*#__PURE__*/_ASTAnnotationMap.ASTAnnotationMap.empty.annotate(tsplus_module_2.Title, "boolean"));
344
+ * @tsplus static fncts.schema.ASTOps booleanKeyword
345
+ */
346
+ const booleanKeyword = new BooleanKeyword(require_ASTAnnotationMap.ASTAnnotationMap.empty.annotate(_fncts_schema_ASTAnnotation.Title, "boolean"));
376
347
  /**
377
- * @tsplus fluent fncts.schema.AST isBooleanKeyword
378
- */
348
+ * @tsplus fluent fncts.schema.AST isBooleanKeyword
349
+ */
379
350
  function isBooleanKeyword(self) {
380
- void 0;
381
- return self._tag === 10 /* ASTTag.BooleanKeyword */;
382
- }
383
- /*
384
- * BigIntKeyword
385
- */
386
- class BigIntKeyword extends AST {
387
- constructor(annotations = _ASTAnnotationMap.ASTAnnotationMap.empty) {
388
- super();
389
- this.annotations = annotations;
390
- this._tag = 11 /* ASTTag.BigIntKeyword */;
391
- }
392
- clone(newProperties) {
393
- return new BigIntKeyword(newProperties.annotations ?? this.annotations);
394
- }
395
- }
351
+ return self._tag === 10;
352
+ }
353
+ var BigIntKeyword = class BigIntKeyword extends AST {
354
+ annotations;
355
+ _tag = 11;
356
+ constructor(annotations = require_ASTAnnotationMap.ASTAnnotationMap.empty) {
357
+ super();
358
+ this.annotations = annotations;
359
+ }
360
+ clone(newProperties) {
361
+ return new BigIntKeyword(newProperties.annotations ?? this.annotations);
362
+ }
363
+ [_fncts_base_data_Equatable_definition.equalsSymbol](that, context) {
364
+ return hasTag(that, 11) && context.comparator(this.annotations, that.annotations);
365
+ }
366
+ };
396
367
  /**
397
- * @tsplus static fncts.schema.ASTOps bigIntKeyword
398
- */
399
- exports.BigIntKeyword = BigIntKeyword;
400
- const bigIntKeyword = exports.bigIntKeyword = /*#__PURE__*/new BigIntKeyword(/*#__PURE__*/_ASTAnnotationMap.ASTAnnotationMap.empty.annotate(tsplus_module_2.Title, "bigint"));
368
+ * @tsplus static fncts.schema.ASTOps bigIntKeyword
369
+ */
370
+ const bigIntKeyword = new BigIntKeyword(require_ASTAnnotationMap.ASTAnnotationMap.empty.annotate(_fncts_schema_ASTAnnotation.Title, "bigint"));
401
371
  /**
402
- * @tsplus fluent fncts.schema.AST isBigIntKeyword
403
- */
372
+ * @tsplus fluent fncts.schema.AST isBigIntKeyword
373
+ */
404
374
  function isBigIntKeyword(self) {
405
- void 0;
406
- return self._tag === 11 /* ASTTag.BigIntKeyword */;
407
- }
408
- /*
409
- * SymbolKeyword
410
- */
411
- class SymbolKeyword extends AST {
412
- constructor(annotations = _ASTAnnotationMap.ASTAnnotationMap.empty) {
413
- super();
414
- this.annotations = annotations;
415
- this._tag = 12 /* ASTTag.SymbolKeyword */;
416
- }
417
- clone(newProperties) {
418
- return new SymbolKeyword(newProperties.annotations ?? this.annotations);
419
- }
420
- }
375
+ return self._tag === 11;
376
+ }
377
+ var SymbolKeyword = class SymbolKeyword extends AST {
378
+ annotations;
379
+ _tag = 12;
380
+ constructor(annotations = require_ASTAnnotationMap.ASTAnnotationMap.empty) {
381
+ super();
382
+ this.annotations = annotations;
383
+ }
384
+ clone(newProperties) {
385
+ return new SymbolKeyword(newProperties.annotations ?? this.annotations);
386
+ }
387
+ [_fncts_base_data_Equatable_definition.equalsSymbol](that, context) {
388
+ return hasTag(that, 12) && context.comparator(this.annotations, that.annotations);
389
+ }
390
+ };
421
391
  /**
422
- * @tsplus static fncts.schema.ASTOps symbolKeyword
423
- */
424
- exports.SymbolKeyword = SymbolKeyword;
425
- const symbolKeyword_1 = /*#__PURE__*/new SymbolKeyword(/*#__PURE__*/_ASTAnnotationMap.ASTAnnotationMap.empty.annotate(tsplus_module_2.Title, "symbol"));
426
- const symbolKeyword = exports.symbolKeyword = symbolKeyword_1;
392
+ * @tsplus static fncts.schema.ASTOps symbolKeyword
393
+ */
394
+ const symbolKeyword_1 = new SymbolKeyword(require_ASTAnnotationMap.ASTAnnotationMap.empty.annotate(_fncts_schema_ASTAnnotation.Title, "symbol"));
395
+ const symbolKeyword = symbolKeyword_1;
427
396
  /**
428
- * @tsplus fluent fncts.schema.AST isSymbolKeyword
429
- */
397
+ * @tsplus fluent fncts.schema.AST isSymbolKeyword
398
+ */
430
399
  function isSymbolKeyword_1(self) {
431
- void 0;
432
- return self._tag === 12 /* ASTTag.SymbolKeyword */;
433
- }
434
- /*
435
- * ObjectKeyword
436
- */
437
- class ObjectKeyword extends AST {
438
- constructor(annotations = _ASTAnnotationMap.ASTAnnotationMap.empty) {
439
- super();
440
- this.annotations = annotations;
441
- this._tag = 13 /* ASTTag.ObjectKeyword */;
442
- }
443
- clone(newProperties) {
444
- return new ObjectKeyword(newProperties.annotations ?? this.annotations);
445
- }
446
- }
400
+ return self._tag === 12;
401
+ }
402
+ var ObjectKeyword = class ObjectKeyword extends AST {
403
+ annotations;
404
+ _tag = 13;
405
+ constructor(annotations = require_ASTAnnotationMap.ASTAnnotationMap.empty) {
406
+ super();
407
+ this.annotations = annotations;
408
+ }
409
+ clone(newProperties) {
410
+ return new ObjectKeyword(newProperties.annotations ?? this.annotations);
411
+ }
412
+ [_fncts_base_data_Equatable_definition.equalsSymbol](that, context) {
413
+ return hasTag(that, 13) && context.comparator(this.annotations, that.annotations);
414
+ }
415
+ };
447
416
  /**
448
- * @tsplus static fncts.schema.ASTOps objectKeyword
449
- */
450
- exports.ObjectKeyword = ObjectKeyword;
451
- const objectKeyword = exports.objectKeyword = /*#__PURE__*/new ObjectKeyword(/*#__PURE__*/_ASTAnnotationMap.ASTAnnotationMap.empty.annotate(tsplus_module_2.Title, "object"));
452
- /*
453
- * Enum
454
- */
455
- class Enum extends AST {
456
- constructor(enums, annotations = _ASTAnnotationMap.ASTAnnotationMap.empty) {
457
- super();
458
- this.enums = enums;
459
- this.annotations = annotations;
460
- this._tag = 14 /* ASTTag.Enum */;
461
- }
462
- clone(newProperties) {
463
- return new Enum(newProperties.enums ?? this.enums, newProperties.annotations ?? this.annotations);
464
- }
465
- }
417
+ * @tsplus static fncts.schema.ASTOps objectKeyword
418
+ */
419
+ const objectKeyword = new ObjectKeyword(require_ASTAnnotationMap.ASTAnnotationMap.empty.annotate(_fncts_schema_ASTAnnotation.Title, "object"));
420
+ var Enum = class Enum extends AST {
421
+ enums;
422
+ annotations;
423
+ _tag = 14;
424
+ constructor(enums, annotations = require_ASTAnnotationMap.ASTAnnotationMap.empty) {
425
+ super();
426
+ this.enums = enums;
427
+ this.annotations = annotations;
428
+ }
429
+ clone(newProperties) {
430
+ return new Enum(newProperties.enums ?? this.enums, newProperties.annotations ?? this.annotations);
431
+ }
432
+ [_fncts_base_data_Equatable_definition.equalsSymbol](that, context) {
433
+ return hasTag(that, 14) && _fncts_base_collection_immutable_Vector_definition.corresponds(that.enums, ([leftName, leftValue], [rightName, rightValue]) => context.comparator(leftName, rightName) && context.comparator(leftValue, rightValue))(this.enums) && context.comparator(this.annotations, that.annotations);
434
+ }
435
+ };
466
436
  /**
467
- * @tsplus static fncts.schema.ASTOps createEnum
468
- */
469
- exports.Enum = Enum;
470
- function createEnum(enums, annotations = _ASTAnnotationMap.ASTAnnotationMap.empty) {
471
- return new Enum(enums, annotations);
472
- }
473
- class TemplateLiteralSpan {
474
- constructor(type, literal) {
475
- this.type = type;
476
- this.literal = literal;
477
- }
478
- toString() {
479
- switch (this.type._tag) {
480
- case 8 /* ASTTag.StringKeyword */:
481
- return "${string}";
482
- case 9 /* ASTTag.NumberKeyword */:
483
- return "${number}";
484
- }
485
- }
486
- }
487
- /*
488
- * TemplateLiteral
489
- */
490
- exports.TemplateLiteralSpan = TemplateLiteralSpan;
491
- class TemplateLiteral extends AST {
492
- constructor(head, spans, annotations = _ASTAnnotationMap.ASTAnnotationMap.empty) {
493
- super();
494
- this.head = head;
495
- this.spans = spans;
496
- this.annotations = annotations;
497
- this._tag = 15 /* ASTTag.TemplateLiteral */;
498
- }
499
- clone(newProperties) {
500
- return createTemplateLiteral_1(newProperties.head ?? this.head, newProperties.spans ?? this.spans, newProperties.annotations ?? this.annotations);
501
- }
502
- }
437
+ * @tsplus static fncts.schema.ASTOps createEnum
438
+ */
439
+ function createEnum(enums, annotations = require_ASTAnnotationMap.ASTAnnotationMap.empty) {
440
+ return new Enum(enums, annotations);
441
+ }
442
+ var TemplateLiteralSpan = class TemplateLiteralSpan {
443
+ type;
444
+ literal;
445
+ constructor(type, literal) {
446
+ this.type = type;
447
+ this.literal = literal;
448
+ }
449
+ [_fncts_base_data_Equatable_definition.equalsSymbol](that, context) {
450
+ return that instanceof TemplateLiteralSpan && context.comparator(this.type, that.type) && context.comparator(this.literal, that.literal);
451
+ }
452
+ toString() {
453
+ switch (this.type._tag) {
454
+ case 8: return "${string}";
455
+ case 9: return "${number}";
456
+ }
457
+ }
458
+ };
459
+ var TemplateLiteral = class extends AST {
460
+ head;
461
+ spans;
462
+ annotations;
463
+ _tag = 15;
464
+ constructor(head, spans, annotations = require_ASTAnnotationMap.ASTAnnotationMap.empty) {
465
+ super();
466
+ this.head = head;
467
+ this.spans = spans;
468
+ this.annotations = annotations;
469
+ }
470
+ clone(newProperties) {
471
+ return createTemplateLiteral_1(newProperties.head ?? this.head, newProperties.spans ?? this.spans, newProperties.annotations ?? this.annotations);
472
+ }
473
+ [_fncts_base_data_Equatable_definition.equalsSymbol](that, context) {
474
+ return hasTag(that, 15) && context.comparator(this.head, that.head) && context.comparator(this.spans, that.spans) && context.comparator(this.annotations, that.annotations);
475
+ }
476
+ };
503
477
  /**
504
- * @tsplus static fncts.schema.ASTOps createTemplateLiteral
505
- */
506
- exports.TemplateLiteral = TemplateLiteral;
507
- function createTemplateLiteral_1(head, spans, annotations = _ASTAnnotationMap.ASTAnnotationMap.empty) {
508
- if (tsplus_module_3.isNonEmpty(spans)) {
509
- return new TemplateLiteral(head, spans, annotations);
510
- } else {
511
- return createLiteral_1(head, annotations);
512
- }
513
- }
514
- /*
515
- * Element
516
- */
517
- class Element {
518
- constructor(type, isOptional) {
519
- this.type = type;
520
- this.isOptional = isOptional;
521
- }
522
- toString() {
523
- return String(this.type) + (this.isOptional ? "?" : "");
524
- }
525
- }
478
+ * @tsplus static fncts.schema.ASTOps createTemplateLiteral
479
+ */
480
+ function createTemplateLiteral_1(head, spans, annotations = require_ASTAnnotationMap.ASTAnnotationMap.empty) {
481
+ if (_fncts_base_collection_immutable_Vector_api.isNonEmpty(spans)) return new TemplateLiteral(head, spans, annotations);
482
+ else return createLiteral_1(head, annotations);
483
+ }
484
+ var Element = class Element {
485
+ type;
486
+ isOptional;
487
+ constructor(type, isOptional) {
488
+ this.type = type;
489
+ this.isOptional = isOptional;
490
+ }
491
+ [_fncts_base_data_Equatable_definition.equalsSymbol](that, context) {
492
+ return that instanceof Element && context.comparator(this.type, that.type) && context.comparator(this.isOptional, that.isOptional);
493
+ }
494
+ toString() {
495
+ return String(this.type) + (this.isOptional ? "?" : "");
496
+ }
497
+ };
526
498
  /**
527
- * @tsplus static fncts.schema.ASTOps createElement
528
- */
529
- exports.Element = Element;
499
+ * @tsplus static fncts.schema.ASTOps createElement
500
+ */
530
501
  function createElement_1(type, isOptional) {
531
- return new Element(type, isOptional);
532
- }
533
- /*
534
- * Tuple
535
- */
536
- class Tuple extends AST {
537
- constructor(elements, rest, isReadonly, annotations = _ASTAnnotationMap.ASTAnnotationMap.empty) {
538
- super();
539
- this.elements = elements;
540
- this.rest = rest;
541
- this.isReadonly = isReadonly;
542
- this.annotations = annotations;
543
- this._tag = 16 /* ASTTag.Tuple */;
544
- }
545
- clone(newProperties) {
546
- return new Tuple(newProperties.elements ?? this.elements, newProperties.rest ?? this.rest, newProperties.isReadonly ?? this.isReadonly, newProperties.annotations ?? this.annotations);
547
- }
548
- }
502
+ return new Element(type, isOptional);
503
+ }
504
+ var Tuple = class Tuple extends AST {
505
+ elements;
506
+ rest;
507
+ isReadonly;
508
+ annotations;
509
+ _tag = 16;
510
+ constructor(elements, rest, isReadonly, annotations = require_ASTAnnotationMap.ASTAnnotationMap.empty) {
511
+ super();
512
+ this.elements = elements;
513
+ this.rest = rest;
514
+ this.isReadonly = isReadonly;
515
+ this.annotations = annotations;
516
+ }
517
+ clone(newProperties) {
518
+ return new Tuple(newProperties.elements ?? this.elements, newProperties.rest ?? this.rest, newProperties.isReadonly ?? this.isReadonly, newProperties.annotations ?? this.annotations);
519
+ }
520
+ [_fncts_base_data_Equatable_definition.equalsSymbol](that, context) {
521
+ return hasTag(that, 16) && context.comparator(this.elements, that.elements) && context.comparator(this.rest, that.rest) && context.comparator(this.isReadonly, that.isReadonly) && context.comparator(this.annotations, that.annotations);
522
+ }
523
+ };
549
524
  /**
550
- * @tsplus static fncts.schema.ASTOps createTuple
551
- */
552
- exports.Tuple = Tuple;
553
- function createTuple_1(elements, rest, isReadonly, annotations = _ASTAnnotationMap.ASTAnnotationMap.empty) {
554
- return new Tuple(elements, rest, isReadonly, annotations);
525
+ * @tsplus static fncts.schema.ASTOps createTuple
526
+ */
527
+ function createTuple_1(elements, rest, isReadonly, annotations = require_ASTAnnotationMap.ASTAnnotationMap.empty) {
528
+ return new Tuple(elements, rest, isReadonly, annotations);
555
529
  }
556
530
  /**
557
- * @tsplus static fncts.schema.ASTOps unknownArray
558
- */
559
- const unknownArray = exports.unknownArray = /*#__PURE__*/createTuple_1(/*#__PURE__*/tsplus_module_3.empty(), /*#__PURE__*/tsplus_module_4.just(/*#__PURE__*/tsplus_module_3.vector(unknownKeyword_1), fileName_1 + ":651:65"), true);
560
- /*
561
- * PropertySignature
562
- */
563
- class PropertySignature {
564
- constructor(name, type, isOptional, isReadonly, annotations = _ASTAnnotationMap.ASTAnnotationMap.empty) {
565
- this.name = name;
566
- this.type = type;
567
- this.isOptional = isOptional;
568
- this.isReadonly = isReadonly;
569
- this.annotations = annotations;
570
- }
571
- clone(newProperties) {
572
- return new PropertySignature(newProperties.name ?? this.name, newProperties.type ?? this.type, newProperties.isOptional ?? this.isOptional, newProperties.isReadonly ?? this.isReadonly, newProperties.annotations ?? this.annotations);
573
- }
574
- }
531
+ * @tsplus static fncts.schema.ASTOps unknownArray
532
+ */
533
+ const unknownArray = createTuple_1(_fncts_base_collection_immutable_Vector_api.empty(), _fncts_base_data_Maybe_constructors.just(_fncts_base_collection_immutable_Vector_api.vector(unknownKeyword_1), fileName_1 + ":779:65"), true);
534
+ var PropertySignature = class PropertySignature {
535
+ name;
536
+ type;
537
+ isOptional;
538
+ isReadonly;
539
+ annotations;
540
+ constructor(name, type, isOptional, isReadonly, annotations = require_ASTAnnotationMap.ASTAnnotationMap.empty) {
541
+ this.name = name;
542
+ this.type = type;
543
+ this.isOptional = isOptional;
544
+ this.isReadonly = isReadonly;
545
+ this.annotations = annotations;
546
+ }
547
+ clone(newProperties) {
548
+ return new PropertySignature(newProperties.name ?? this.name, newProperties.type ?? this.type, newProperties.isOptional ?? this.isOptional, newProperties.isReadonly ?? this.isReadonly, newProperties.annotations ?? this.annotations);
549
+ }
550
+ [_fncts_base_data_Equatable_definition.equalsSymbol](that, context) {
551
+ return that instanceof PropertySignature && context.comparator(this.name, that.name) && context.comparator(this.type, that.type) && context.comparator(this.isOptional, that.isOptional) && context.comparator(this.isReadonly, that.isReadonly) && context.comparator(this.annotations, that.annotations);
552
+ }
553
+ };
575
554
  /**
576
- * @tsplus static fncts.schema.ASTOps createPropertySignature
577
- */
578
- exports.PropertySignature = PropertySignature;
579
- function createPropertySignature_1(name, type, isOptional, isReadonly, annotations = _ASTAnnotationMap.ASTAnnotationMap.empty) {
580
- return new PropertySignature(name, type, isOptional, isReadonly, annotations);
581
- }
582
- /*
583
- * IndexSignature
584
- */
585
- class IndexSignature {
586
- constructor(parameter, type, isReadonly) {
587
- this.parameter = parameter;
588
- this.type = type;
589
- this.isReadonly = isReadonly;
590
- }
591
- }
555
+ * @tsplus static fncts.schema.ASTOps createPropertySignature
556
+ */
557
+ function createPropertySignature_1(name, type, isOptional, isReadonly, annotations = require_ASTAnnotationMap.ASTAnnotationMap.empty) {
558
+ return new PropertySignature(name, type, isOptional, isReadonly, annotations);
559
+ }
560
+ var IndexSignature = class IndexSignature {
561
+ parameter;
562
+ type;
563
+ isReadonly;
564
+ constructor(parameter, type, isReadonly) {
565
+ this.parameter = parameter;
566
+ this.type = type;
567
+ this.isReadonly = isReadonly;
568
+ }
569
+ [_fncts_base_data_Equatable_definition.equalsSymbol](that, context) {
570
+ return that instanceof IndexSignature && context.comparator(this.parameter, that.parameter) && context.comparator(this.type, that.type) && context.comparator(this.isReadonly, that.isReadonly);
571
+ }
572
+ };
592
573
  /**
593
- * @tsplus static fncts.schema.ASTOps createIndexSignature
594
- */
595
- exports.IndexSignature = IndexSignature;
574
+ * @tsplus static fncts.schema.ASTOps createIndexSignature
575
+ */
596
576
  function createIndexSignature_1(parameter, type, isReadonly) {
597
- return new IndexSignature(parameter, type, isReadonly);
598
- }
599
- /*
600
- * TypeLiteral
601
- */
602
- class TypeLiteral extends AST {
603
- constructor(propertySignatures, indexSignatures, annotations = _ASTAnnotationMap.ASTAnnotationMap.empty) {
604
- super();
605
- this.annotations = annotations;
606
- this._tag = 17 /* ASTTag.TypeLiteral */;
607
- this.propertySignatures = sortByAscendingCardinality(propertySignatures);
608
- this.indexSignatures = sortByAscendingCardinality(indexSignatures);
609
- }
610
- clone(newProperties) {
611
- return new TypeLiteral(newProperties.propertySignatures ?? this.propertySignatures, newProperties.indexSignatures ?? this.indexSignatures, newProperties.annotations ?? this.annotations);
612
- }
613
- }
577
+ return new IndexSignature(parameter, type, isReadonly);
578
+ }
579
+ var TypeLiteral = class TypeLiteral extends AST {
580
+ annotations;
581
+ _tag = 17;
582
+ propertySignatures;
583
+ indexSignatures;
584
+ constructor(propertySignatures, indexSignatures, annotations = require_ASTAnnotationMap.ASTAnnotationMap.empty) {
585
+ super();
586
+ this.annotations = annotations;
587
+ this.propertySignatures = sortByAscendingCardinality(propertySignatures);
588
+ this.indexSignatures = sortByAscendingCardinality(indexSignatures);
589
+ }
590
+ clone(newProperties) {
591
+ return new TypeLiteral(newProperties.propertySignatures ?? this.propertySignatures, newProperties.indexSignatures ?? this.indexSignatures, newProperties.annotations ?? this.annotations);
592
+ }
593
+ [_fncts_base_data_Equatable_definition.equalsSymbol](that, context) {
594
+ return hasTag(that, 17) && context.comparator(this.propertySignatures, that.propertySignatures) && context.comparator(this.indexSignatures, that.indexSignatures) && context.comparator(this.annotations, that.annotations);
595
+ }
596
+ };
614
597
  /**
615
- * @tsplus static fncts.schema.ASTOps isTypeLiteral
616
- * @tsplus fluent fncts.schema.AST isTypeLiteral
617
- */
618
- exports.TypeLiteral = TypeLiteral;
598
+ * @tsplus static fncts.schema.ASTOps isTypeLiteral
599
+ * @tsplus fluent fncts.schema.AST isTypeLiteral
600
+ */
619
601
  function isTypeLiteral(self) {
620
- void 0;
621
- return self._tag === 17 /* ASTTag.TypeLiteral */;
602
+ return self._tag === 17;
622
603
  }
623
604
  /**
624
- * @tsplus static fncts.schema.ASTOps createTypeLiteral
625
- */
605
+ * @tsplus static fncts.schema.ASTOps createTypeLiteral
606
+ */
626
607
  function createTypeLiteral_1(propertySignatures, indexSignatures, annotations) {
627
- return new TypeLiteral(propertySignatures, indexSignatures, annotations);
608
+ return new TypeLiteral(propertySignatures, indexSignatures, annotations);
628
609
  }
629
610
  /**
630
- * @tsplus static fncts.schema.ASTOps unknownRecord
631
- */
632
- const unknownRecord = exports.unknownRecord = /*#__PURE__*/createTypeLiteral_1(/*#__PURE__*/tsplus_module_3.empty(), /*#__PURE__*/tsplus_module_3.vector(/*#__PURE__*/createIndexSignature_1(stringKeyword_1, unknownKeyword_1, true), /*#__PURE__*/createIndexSignature_1(symbolKeyword_1, unknownKeyword_1, true)));
633
- /*
634
- * Union
635
- */
636
- class Union extends AST {
637
- constructor(types, annotations = _ASTAnnotationMap.ASTAnnotationMap.empty) {
638
- super();
639
- this.types = types;
640
- this.annotations = annotations;
641
- this._tag = 18 /* ASTTag.Union */;
642
- }
643
- clone(newProperties) {
644
- return createUnion_1(newProperties.types ?? this.types, newProperties.annotations ?? this.annotations);
645
- }
646
- }
611
+ * @tsplus static fncts.schema.ASTOps unknownRecord
612
+ */
613
+ const unknownRecord = createTypeLiteral_1(_fncts_base_collection_immutable_Vector_api.empty(), _fncts_base_collection_immutable_Vector_api.vector(createIndexSignature_1(stringKeyword_1, unknownKeyword_1, true), createIndexSignature_1(symbolKeyword_1, unknownKeyword_1, true)));
614
+ var Union = class extends AST {
615
+ types;
616
+ annotations;
617
+ _tag = 18;
618
+ constructor(types, annotations = require_ASTAnnotationMap.ASTAnnotationMap.empty) {
619
+ super();
620
+ this.types = types;
621
+ this.annotations = annotations;
622
+ }
623
+ clone(newProperties) {
624
+ return createUnion_1(newProperties.types ?? this.types, newProperties.annotations ?? this.annotations);
625
+ }
626
+ [_fncts_base_data_Equatable_definition.equalsSymbol](that, context) {
627
+ return hasTag(that, 18) && context.comparator(this.types, that.types) && context.comparator(this.annotations, that.annotations);
628
+ }
629
+ };
647
630
  /**
648
- * @tsplus fluent fncts.schema.AST isUnion
649
- */
650
- exports.Union = Union;
631
+ * @tsplus fluent fncts.schema.AST isUnion
632
+ */
651
633
  function isUnion(self) {
652
- void 0;
653
- return self._tag === 18 /* ASTTag.Union */;
634
+ return self._tag === 18;
654
635
  }
655
636
  /**
656
- * @tsplus static fncts.schema.ASTOps createUnion
657
- */
658
- function createUnion_1(candidates, annotations = _ASTAnnotationMap.ASTAnnotationMap.empty) {
659
- const types = unify(candidates);
660
- switch (types.length) {
661
- case 0:
662
- return neverKeyword_1;
663
- case 1:
664
- return tsplus_module_3.unsafeGet(0)(types);
665
- default:
666
- return new Union(sortByDescendingWeight(types), annotations);
667
- }
668
- }
669
- /*
670
- * Lazy
671
- */
672
- class Lazy extends AST {
673
- constructor(getAST, annotations = _ASTAnnotationMap.ASTAnnotationMap.empty) {
674
- super();
675
- this.getAST = getAST;
676
- this.annotations = annotations;
677
- this._tag = 19 /* ASTTag.Lazy */;
678
- }
679
- clone(newProperties) {
680
- return new Lazy(newProperties.getAST ?? this.getAST, newProperties.annotations ?? this.annotations);
681
- }
682
- }
637
+ * @tsplus static fncts.schema.ASTOps createUnion
638
+ */
639
+ function createUnion_1(candidates, annotations = require_ASTAnnotationMap.ASTAnnotationMap.empty) {
640
+ const types = unify(candidates);
641
+ switch (types.length) {
642
+ case 0: return neverKeyword_1;
643
+ case 1: return _fncts_base_collection_immutable_Vector_api.unsafeGet(0)(types);
644
+ default: return new Union(sortByDescendingWeight(types), annotations);
645
+ }
646
+ }
647
+ var Lazy = class Lazy extends AST {
648
+ getAST;
649
+ annotations;
650
+ _tag = 19;
651
+ constructor(getAST, annotations = require_ASTAnnotationMap.ASTAnnotationMap.empty) {
652
+ super();
653
+ this.getAST = getAST;
654
+ this.annotations = annotations;
655
+ }
656
+ clone(newProperties) {
657
+ return new Lazy(newProperties.getAST ?? this.getAST, newProperties.annotations ?? this.annotations);
658
+ }
659
+ [_fncts_base_data_Equatable_definition.equalsSymbol](that) {
660
+ return this === that;
661
+ }
662
+ };
683
663
  /**
684
- * @tsplus static fncts.schema.ASTOps createLazy
685
- */
686
- exports.Lazy = Lazy;
664
+ * @tsplus static fncts.schema.ASTOps createLazy
665
+ */
687
666
  function createLazy_1(getAST, annotations) {
688
- return new Lazy(getAST, annotations);
667
+ return new Lazy(getAST, annotations);
689
668
  }
690
669
  /**
691
- * @tsplus fluent fncts.schema.AST isLazy
692
- */
670
+ * @tsplus fluent fncts.schema.AST isLazy
671
+ */
693
672
  function isLazy(self) {
694
- void 0;
695
- return self._tag === 19 /* ASTTag.Lazy */;
696
- }
697
- /*
698
- * Refinement
699
- */
700
- class Refinement extends AST {
701
- constructor(from, predicate, annotations = _ASTAnnotationMap.ASTAnnotationMap.empty) {
702
- super();
703
- this.from = from;
704
- this.predicate = predicate;
705
- this.annotations = annotations;
706
- this._tag = 20 /* ASTTag.Refinement */;
707
- }
708
- decode(input, options) {
709
- return this.predicate(input) ? tsplus_module_5.succeed(input) : tsplus_module_5.fail(tsplus_module_6.typeError(this, input));
710
- }
711
- clone(newProperties) {
712
- return new Refinement(newProperties.from ?? this.from, newProperties.predicate ?? this.predicate, newProperties.annotations ?? this.annotations);
713
- }
714
- }
673
+ return self._tag === 19;
674
+ }
675
+ var Refinement = class Refinement extends AST {
676
+ from;
677
+ predicate;
678
+ annotations;
679
+ _tag = 20;
680
+ constructor(from, predicate, annotations = require_ASTAnnotationMap.ASTAnnotationMap.empty) {
681
+ super();
682
+ this.from = from;
683
+ this.predicate = predicate;
684
+ this.annotations = annotations;
685
+ }
686
+ decode(input, options) {
687
+ return this.predicate(input) ? _fncts_schema_ParseResult.succeed(input) : _fncts_schema_ParseResult.fail(_fncts_schema_ParseError_ParseError.typeError(this, input));
688
+ }
689
+ clone(newProperties) {
690
+ return new Refinement(newProperties.from ?? this.from, newProperties.predicate ?? this.predicate, newProperties.annotations ?? this.annotations);
691
+ }
692
+ [_fncts_base_data_Equatable_definition.equalsSymbol](that, context) {
693
+ return hasTag(that, 20) && context.comparator(this.from, that.from) && context.comparator(this.predicate, that.predicate) && context.comparator(this.annotations, that.annotations);
694
+ }
695
+ };
715
696
  /**
716
- * @tsplus static fncts.schema.ASTOps createRefinement
717
- */
718
- exports.Refinement = Refinement;
697
+ * @tsplus static fncts.schema.ASTOps createRefinement
698
+ */
719
699
  function createRefinement_1(from, predicate, annotations) {
720
- return new Refinement(from, predicate, annotations);
700
+ return new Refinement(from, predicate, annotations);
721
701
  }
722
702
  function isRefinement(self) {
723
- void 0;
724
- return self._tag === 20 /* ASTTag.Refinement */;
725
- }
726
- /*
727
- * Transform
728
- */
729
- class Transform extends AST {
730
- constructor(from, to, decode, encode, annotations = _ASTAnnotationMap.ASTAnnotationMap.empty) {
731
- super();
732
- this.from = from;
733
- this.to = to;
734
- this.decode = decode;
735
- this.encode = encode;
736
- this.annotations = annotations;
737
- this._tag = 21 /* ASTTag.Transform */;
738
- }
739
- clone(newProperties) {
740
- return new Transform(newProperties.from ?? this.from, newProperties.to ?? this.to, newProperties.decode ?? this.decode, newProperties.encode ?? this.encode, newProperties.annotations ?? this.annotations);
741
- }
742
- }
703
+ return self._tag === 20;
704
+ }
705
+ var Transform = class Transform extends AST {
706
+ from;
707
+ to;
708
+ decode;
709
+ encode;
710
+ annotations;
711
+ _tag = 21;
712
+ constructor(from, to, decode, encode, annotations = require_ASTAnnotationMap.ASTAnnotationMap.empty) {
713
+ super();
714
+ this.from = from;
715
+ this.to = to;
716
+ this.decode = decode;
717
+ this.encode = encode;
718
+ this.annotations = annotations;
719
+ }
720
+ clone(newProperties) {
721
+ return new Transform(newProperties.from ?? this.from, newProperties.to ?? this.to, newProperties.decode ?? this.decode, newProperties.encode ?? this.encode, newProperties.annotations ?? this.annotations);
722
+ }
723
+ [_fncts_base_data_Equatable_definition.equalsSymbol](that, context) {
724
+ return hasTag(that, 21) && context.comparator(this.from, that.from) && context.comparator(this.to, that.to) && context.comparator(this.decode, that.decode) && context.comparator(this.encode, that.encode) && context.comparator(this.annotations, that.annotations);
725
+ }
726
+ };
743
727
  /**
744
- * @tsplus static fncts.schema.ASTOps createTransform
745
- */
746
- exports.Transform = Transform;
728
+ * @tsplus static fncts.schema.ASTOps createTransform
729
+ */
747
730
  function createTransform(from, to, decode, encode, annotations) {
748
- return new Transform(from, getTo_1(to), decode, encode, annotations);
749
- }
750
- /*
751
- * Validation
752
- */
753
- class Validation extends AST {
754
- constructor(from, validation, annotations = _ASTAnnotationMap.ASTAnnotationMap.empty) {
755
- super();
756
- this.from = from;
757
- this.validation = validation;
758
- this.annotations = annotations;
759
- this._tag = 22 /* ASTTag.Validation */;
760
- }
761
- clone(newProperties) {
762
- return new Validation(newProperties.from ?? this.from, newProperties.validation ?? this.validation, newProperties.annotations ?? this.annotations);
763
- }
764
- }
731
+ return new Transform(from, getTo_1(to), decode, encode, annotations);
732
+ }
733
+ var Validation = class Validation extends AST {
734
+ from;
735
+ validation;
736
+ annotations;
737
+ _tag = 22;
738
+ constructor(from, validation, annotations = require_ASTAnnotationMap.ASTAnnotationMap.empty) {
739
+ super();
740
+ this.from = from;
741
+ this.validation = validation;
742
+ this.annotations = annotations;
743
+ }
744
+ clone(newProperties) {
745
+ return new Validation(newProperties.from ?? this.from, newProperties.validation ?? this.validation, newProperties.annotations ?? this.annotations);
746
+ }
747
+ [_fncts_base_data_Equatable_definition.equalsSymbol](that, context) {
748
+ return hasTag(that, 22) && context.comparator(this.from, that.from) && context.comparator(this.validation, that.validation) && context.comparator(this.annotations, that.annotations);
749
+ }
750
+ };
765
751
  /**
766
- * @tsplus static fncts.schema.ASTOps createValidation
767
- */
768
- exports.Validation = Validation;
752
+ * @tsplus static fncts.schema.ASTOps createValidation
753
+ */
769
754
  function createValidation(from, validation, annotations) {
770
- return new Validation(from, validation, annotations);
755
+ return new Validation(from, validation, annotations);
771
756
  }
772
757
  /**
773
- * @tsplus tailRec
774
- */
758
+ * @tsplus tailRec
759
+ */
775
760
  function getCardinality(ast) {
776
- var ast_1 = ast;
777
- var ast_2 = ast;
778
- while (1) {
779
- void 0;
780
- switch (ast_1._tag) {
781
- case 5 /* ASTTag.NeverKeyword */:
782
- return 0;
783
- case 1 /* ASTTag.Literal */:
784
- case 3 /* ASTTag.UndefinedKeyword */:
785
- case 4 /* ASTTag.VoidKeyword */:
786
- case 2 /* ASTTag.UniqueSymbol */:
787
- return 1;
788
- case 10 /* ASTTag.BooleanKeyword */:
789
- return 2;
790
- case 8 /* ASTTag.StringKeyword */:
791
- case 9 /* ASTTag.NumberKeyword */:
792
- case 11 /* ASTTag.BigIntKeyword */:
793
- case 12 /* ASTTag.SymbolKeyword */:
794
- return 3;
795
- case 13 /* ASTTag.ObjectKeyword */:
796
- return 5;
797
- case 6 /* ASTTag.UnknownKeyword */:
798
- case 7 /* ASTTag.AnyKeyword */:
799
- return 6;
800
- case 20 /* ASTTag.Refinement */:
801
- ast_2 = ast_1.from;
802
- ast_1 = ast_2;
803
- continue;
804
- case 21 /* ASTTag.Transform */:
805
- ast_2 = ast_1.to;
806
- ast_1 = ast_2;
807
- continue;
808
- default:
809
- return 4;
810
- }
811
- }
761
+ var ast_1 = ast;
762
+ var ast_2 = ast;
763
+ while (1) switch (ast_1._tag) {
764
+ case 5: return 0;
765
+ case 1:
766
+ case 3:
767
+ case 4:
768
+ case 2: return 1;
769
+ case 10: return 2;
770
+ case 8:
771
+ case 9:
772
+ case 11:
773
+ case 12: return 3;
774
+ case 13: return 5;
775
+ case 6:
776
+ case 7: return 6;
777
+ case 20:
778
+ ast_2 = ast_1.from;
779
+ ast_1 = ast_2;
780
+ continue;
781
+ case 21:
782
+ ast_2 = ast_1.to;
783
+ ast_1 = ast_2;
784
+ continue;
785
+ default: return 4;
786
+ }
812
787
  }
813
788
  function sortByAscendingCardinality(types) {
814
- return tsplus_module_3.sort(tsplus_module_8.contramap(({
815
- type
816
- }) => getCardinality(type))(tsplus_module_7.Ord))(types);
789
+ return _fncts_base_collection_immutable_Vector_api.sort(_fncts_base_data_Ord_api_contramap.contramap(({ type }) => getCardinality(type))(_fncts_base_data_number_instances.Ord))(types);
817
790
  }
818
- const OrdWeight = /*#__PURE__*/tsplus_module_9.tuple(tsplus_module_7.Ord, tsplus_module_7.Ord, tsplus_module_7.Ord);
819
- const maxWeight = /*#__PURE__*/tsplus_module_10.max(OrdWeight);
791
+ const OrdWeight = _fncts_base_data_Ord_api.tuple(_fncts_base_data_number_instances.Ord, _fncts_base_data_number_instances.Ord, _fncts_base_data_number_instances.Ord);
792
+ const maxWeight = _fncts_base_data_Ord_api_max.max(OrdWeight);
820
793
  function maxWeightAll(weights) {
821
- return tsplus_module_11.foldLeft(emptyWeight, (b, a) => maxWeight(b)(a))(weights);
794
+ return _fncts_base_collection_Iterable_api.foldLeft(emptyWeight, (b, a) => maxWeight(b)(a))(weights);
822
795
  }
823
- const emptyWeight = [0, 0, 0];
796
+ const emptyWeight = [
797
+ 0,
798
+ 0,
799
+ 0
800
+ ];
824
801
  function getWeight(ast) {
825
- void 0;
826
- switch (ast._tag) {
827
- case 0 /* ASTTag.Declaration */:
828
- return tsplus_module_12.match(() => [6, 0, 0], ast => {
829
- const [_, y, z] = getWeight(ast);
830
- return [6, y, z];
831
- })(ast.annotations.get(tsplus_module_2.Surrogate));
832
- case 16 /* ASTTag.Tuple */:
833
- return [2, ast.elements.length, tsplus_module_12.match(() => 0, rest => rest.length)(ast.rest)];
834
- case 17 /* ASTTag.TypeLiteral */:
835
- {
836
- const y = ast.propertySignatures.length;
837
- const z = ast.indexSignatures.length;
838
- return y + z === 0 ? [-4, 0, 0] : [4, y, z];
839
- }
840
- case 18 /* ASTTag.Union */:
841
- return maxWeightAll(tsplus_module_3.map(getWeight)(ast.types));
842
- case 19 /* ASTTag.Lazy */:
843
- return [8, 0, 0];
844
- case 20 /* ASTTag.Refinement */:
845
- const [x, y, z] = getWeight(ast.from);
846
- return [x + 1, y, z];
847
- case 21 /* ASTTag.Transform */:
848
- return getWeight(ast.from);
849
- case 13 /* ASTTag.ObjectKeyword */:
850
- return [-2, 0, 0];
851
- case 6 /* ASTTag.UnknownKeyword */:
852
- case 7 /* ASTTag.AnyKeyword */:
853
- return [-4, 0, 0];
854
- default:
855
- return emptyWeight;
856
- }
802
+ switch (ast._tag) {
803
+ case 0: return _fncts_base_data_Maybe_destructors.match(() => [
804
+ 6,
805
+ 0,
806
+ 0
807
+ ], (ast) => {
808
+ const [_, y, z] = getWeight(ast);
809
+ return [
810
+ 6,
811
+ y,
812
+ z
813
+ ];
814
+ })(ast.annotations.get(_fncts_schema_ASTAnnotation.Surrogate));
815
+ case 16: return [
816
+ 2,
817
+ ast.elements.length,
818
+ _fncts_base_data_Maybe_destructors.match(() => 0, (rest) => rest.length)(ast.rest)
819
+ ];
820
+ case 17: {
821
+ const y = ast.propertySignatures.length;
822
+ const z = ast.indexSignatures.length;
823
+ return y + z === 0 ? [
824
+ -4,
825
+ 0,
826
+ 0
827
+ ] : [
828
+ 4,
829
+ y,
830
+ z
831
+ ];
832
+ }
833
+ case 18: return maxWeightAll(_fncts_base_collection_immutable_Vector_api.map(getWeight)(ast.types));
834
+ case 19: return [
835
+ 8,
836
+ 0,
837
+ 0
838
+ ];
839
+ case 20:
840
+ const [x, y, z] = getWeight(ast.from);
841
+ return [
842
+ x + 1,
843
+ y,
844
+ z
845
+ ];
846
+ case 21: return getWeight(ast.from);
847
+ case 13: return [
848
+ -2,
849
+ 0,
850
+ 0
851
+ ];
852
+ case 6:
853
+ case 7: return [
854
+ -4,
855
+ 0,
856
+ 0
857
+ ];
858
+ default: return emptyWeight;
859
+ }
857
860
  }
858
861
  function sortByDescendingWeight(types) {
859
- return tsplus_module_3.sort(tsplus_module_8.contramap(getWeight)(OrdWeight))(types);
862
+ return _fncts_base_collection_immutable_Vector_api.sort(_fncts_base_data_Ord_api_contramap.contramap(getWeight)(OrdWeight))(types);
860
863
  }
861
864
  function unify(candidates) {
862
- let out = tsplus_module_3.flatMap(ast => {
863
- void 0;
864
- switch (ast._tag) {
865
- case 5 /* ASTTag.NeverKeyword */:
866
- return tsplus_module_3.empty();
867
- case 18 /* ASTTag.Union */:
868
- return ast.types;
869
- default:
870
- return tsplus_module_3.vector(ast);
871
- }
872
- })(candidates);
873
- if (tsplus_module_3.some(isStringKeyword_1)(out)) {
874
- out = tsplus_module_3.filter(m => !(isLiteral_1(m) && typeof m.literal === "string"))(out);
875
- }
876
- if (tsplus_module_3.some(isNumberKeyword_1)(out)) {
877
- out = tsplus_module_3.filter(m => !(isLiteral_1(m) && typeof m.literal === "number"))(out);
878
- }
879
- if (tsplus_module_3.some(isSymbolKeyword_1)(out)) {
880
- out = tsplus_module_3.filter(m => !isUniqueSymbol_1(m))(out);
881
- }
882
- return out;
865
+ let out = _fncts_base_collection_immutable_Vector_api.flatMap((ast) => {
866
+ switch (ast._tag) {
867
+ case 5: return _fncts_base_collection_immutable_Vector_api.empty();
868
+ case 18: return ast.types;
869
+ default: return _fncts_base_collection_immutable_Vector_api.vector(ast);
870
+ }
871
+ })(candidates);
872
+ if (_fncts_base_collection_immutable_Vector_api.some(isStringKeyword_1)(out)) out = _fncts_base_collection_immutable_Vector_api.filter((m) => !(isLiteral_1(m) && typeof m.literal === "string"))(out);
873
+ if (_fncts_base_collection_immutable_Vector_api.some(isNumberKeyword_1)(out)) out = _fncts_base_collection_immutable_Vector_api.filter((m) => !(isLiteral_1(m) && typeof m.literal === "number"))(out);
874
+ if (_fncts_base_collection_immutable_Vector_api.some(isSymbolKeyword_1)(out)) out = _fncts_base_collection_immutable_Vector_api.filter((m) => !isUniqueSymbol_1(m))(out);
875
+ return out;
883
876
  }
884
877
  /**
885
- * @tsplus pipeable fncts.schema.AST combineAnnotations
886
- */
878
+ * @tsplus pipeable fncts.schema.AST combineAnnotations
879
+ */
887
880
  function combineAnnotations(annotations) {
888
- return self => {
889
- return self.clone({
890
- annotations: self.annotations.combine(annotations)
891
- });
892
- };
881
+ return (self) => {
882
+ return self.clone({ annotations: self.annotations.combine(annotations) });
883
+ };
893
884
  }
894
885
  /**
895
- * @tsplus pipeable fncts.schema.AST setAnnotation
896
- */
886
+ * @tsplus pipeable fncts.schema.AST setAnnotation
887
+ */
897
888
  function setAnnotation(annotation, value) {
898
- return self => {
899
- return self.clone({
900
- annotations: self.annotations.annotate(annotation, value)
901
- });
902
- };
889
+ return (self) => {
890
+ return self.clone({ annotations: self.annotations.annotate(annotation, value) });
891
+ };
903
892
  }
904
893
  /**
905
- * @tsplus pipeable fncts.schema.AST appendRestElement
906
- */
894
+ * @tsplus pipeable fncts.schema.AST appendRestElement
895
+ */
907
896
  function appendRestElement(restElement) {
908
- return self => {
909
- if (tsplus_module_13.isJust(self.rest)) {
910
- throw new Error("A rest element cannot follow another rest element. ts(1265)");
911
- }
912
- return createTuple_1(self.elements, tsplus_module_4.just(tsplus_module_3.vector(restElement), fileName_1 + ":1115:43"), self.isReadonly, self.annotations);
913
- };
897
+ return (self) => {
898
+ if (_fncts_base_data_Maybe_definition.isJust(self.rest)) throw new Error("A rest element cannot follow another rest element. ts(1265)");
899
+ return createTuple_1(self.elements, _fncts_base_data_Maybe_constructors.just(_fncts_base_collection_immutable_Vector_api.vector(restElement), fileName_1 + ":1313:43"), self.isReadonly, self.annotations);
900
+ };
914
901
  }
915
902
  /**
916
- * @tsplus pipeable fncts.schema.AST appendElement
917
- */
903
+ * @tsplus pipeable fncts.schema.AST appendElement
904
+ */
918
905
  function appendElement(element) {
919
- return self => {
920
- if (tsplus_module_3.some(e => e.isOptional)(self.elements) && !element.isOptional) {
921
- throw new Error("A required element cannot follow an optional element. ts(1257)");
922
- }
923
- return tsplus_module_12.match(() => createTuple_1(tsplus_module_3.append(element)(self.elements), tsplus_module_4.nothing(fileName_1 + ":1128:63"), self.isReadonly, self.annotations), rest => {
924
- if (element.isOptional) {
925
- throw new Error("A required element cannot follow an optional element. ts(1257)");
926
- }
927
- return createTuple_1(self.elements, tsplus_module_4.just(tsplus_module_3.append(element.type)(rest), fileName_1 + ":1133:47"), self.isReadonly, self.annotations);
928
- })(self.rest);
929
- };
906
+ return (self) => {
907
+ if (_fncts_base_collection_immutable_Vector_api.some((e) => e.isOptional)(self.elements) && !element.isOptional) throw new Error("A required element cannot follow an optional element. ts(1257)");
908
+ return _fncts_base_data_Maybe_destructors.match(() => createTuple_1(_fncts_base_collection_immutable_Vector_api.append(element)(self.elements), _fncts_base_data_Maybe_constructors.nothing(fileName_1 + ":1326:63"), self.isReadonly, self.annotations), (rest) => {
909
+ if (element.isOptional) throw new Error("A required element cannot follow an optional element. ts(1257)");
910
+ return createTuple_1(self.elements, _fncts_base_data_Maybe_constructors.just(_fncts_base_collection_immutable_Vector_api.append(element.type)(rest), fileName_1 + ":1331:47"), self.isReadonly, self.annotations);
911
+ })(self.rest);
912
+ };
930
913
  }
931
914
  function getParameter(x) {
932
- return isRefinement(x) ? getParameter(x.from) : x;
915
+ return isRefinement(x) ? getParameter(x.from) : x;
933
916
  }
934
917
  /**
935
- * @tsplus getter fncts.schema.AST getPropertySignatures
936
- */
918
+ * @tsplus getter fncts.schema.AST getPropertySignatures
919
+ */
937
920
  function getPropertySignatures_1(self) {
938
- void 0;
939
- switch (self._tag) {
940
- case 0 /* ASTTag.Declaration */:
941
- return tsplus_module_12.match(() => tsplus_module_3.empty(), surrogate => getPropertySignatures_1(surrogate))(self.annotations.get(tsplus_module_2.Surrogate));
942
- case 16 /* ASTTag.Tuple */:
943
- return tsplus_module_3.mapWithIndex((i, element) => createPropertySignature_1(i, element.type, element.isOptional, self.isReadonly))(self.elements);
944
- case 18 /* ASTTag.Union */:
945
- {
946
- const propertySignatures = tsplus_module_3.map(getPropertySignatures_1)(self.types);
947
- return tsplus_module_3.filterMap(({
948
- name
949
- }) => {
950
- if (tsplus_module_3.every(ps => tsplus_module_3.some(p => p.name === name)(ps))(propertySignatures)) {
951
- const members = tsplus_module_3.flatMap(ps => tsplus_module_3.filter(p => p.name === name)(ps))(propertySignatures);
952
- return tsplus_module_4.just(createPropertySignature_1(name, createUnion_1(tsplus_module_3.map(p => p.type)(members)), tsplus_module_3.some(p => p.isOptional)(members), tsplus_module_3.some(p => p.isReadonly)(members)), fileName_1 + ":1165:22");
953
- }
954
- return tsplus_module_4.nothing(fileName_1 + ":1174:23");
955
- })(tsplus_module_3.unsafeGet(0)(propertySignatures));
956
- }
957
- case 17 /* ASTTag.TypeLiteral */:
958
- return self.propertySignatures;
959
- case 19 /* ASTTag.Lazy */:
960
- return getPropertySignatures_1(self.getAST());
961
- case 20 /* ASTTag.Refinement */:
962
- return getPropertySignatures_1(self.from);
963
- case 21 /* ASTTag.Transform */:
964
- return getPropertySignatures_1(self.to);
965
- default:
966
- return tsplus_module_3.empty();
967
- }
921
+ switch (self._tag) {
922
+ case 0: return _fncts_base_data_Maybe_destructors.match(() => _fncts_base_collection_immutable_Vector_api.empty(), (surrogate) => getPropertySignatures_1(surrogate))(self.annotations.get(_fncts_schema_ASTAnnotation.Surrogate));
923
+ case 16: return _fncts_base_collection_immutable_Vector_api.mapWithIndex((i, element) => createPropertySignature_1(i, element.type, element.isOptional, self.isReadonly))(self.elements);
924
+ case 18: {
925
+ const propertySignatures = _fncts_base_collection_immutable_Vector_api.map(getPropertySignatures_1)(self.types);
926
+ return _fncts_base_collection_immutable_Vector_api.filterMap(({ name }) => {
927
+ if (_fncts_base_collection_immutable_Vector_api.every((ps) => _fncts_base_collection_immutable_Vector_api.some((p) => p.name === name)(ps))(propertySignatures)) {
928
+ const members = _fncts_base_collection_immutable_Vector_api.flatMap((ps) => _fncts_base_collection_immutable_Vector_api.filter((p) => p.name === name)(ps))(propertySignatures);
929
+ return _fncts_base_data_Maybe_constructors.just(createPropertySignature_1(name, createUnion_1(_fncts_base_collection_immutable_Vector_api.map((p) => p.type)(members)), _fncts_base_collection_immutable_Vector_api.some((p) => p.isOptional)(members), _fncts_base_collection_immutable_Vector_api.some((p) => p.isReadonly)(members)), fileName_1 + ":1363:22");
930
+ }
931
+ return _fncts_base_data_Maybe_constructors.nothing(fileName_1 + ":1372:23");
932
+ })(_fncts_base_collection_immutable_Vector_api.unsafeGet(0)(propertySignatures));
933
+ }
934
+ case 17: return self.propertySignatures;
935
+ case 19: return getPropertySignatures_1(self.getAST());
936
+ case 20: return getPropertySignatures_1(self.from);
937
+ case 21: return getPropertySignatures_1(self.to);
938
+ default: return _fncts_base_collection_immutable_Vector_api.empty();
939
+ }
968
940
  }
969
941
  /**
970
- * @tsplus getter fncts.schema.AST keysof
971
- */
942
+ * @tsplus getter fncts.schema.AST keysof
943
+ */
972
944
  function keysOf_1(ast) {
973
- void 0;
974
- switch (ast._tag) {
975
- case 0 /* ASTTag.Declaration */:
976
- return tsplus_module_12.match(() => tsplus_module_3.empty(), surrogate => keysOf_1(surrogate))(ast.annotations.get(tsplus_module_2.Surrogate));
977
- case 5 /* ASTTag.NeverKeyword */:
978
- case 7 /* ASTTag.AnyKeyword */:
979
- return tsplus_module_3.vector(stringKeyword_1, numberKeyword_1, symbolKeyword_1);
980
- case 8 /* ASTTag.StringKeyword */:
981
- return tsplus_module_3.vector(createLiteral_1("length"));
982
- case 17 /* ASTTag.TypeLiteral */:
983
- return tsplus_module_3.concat(tsplus_module_3.map(is => getParameter(is.parameter))(ast.indexSignatures))(tsplus_module_3.map(p => typeof p.name === "symbol" ? createUniqueSymbol_1(p.name) : createLiteral_1(p.name))(ast.propertySignatures));
984
- case 18 /* ASTTag.Union */:
985
- return tsplus_module_3.map(p => typeof p.name === "symbol" ? createUniqueSymbol_1(p.name) : createLiteral_1(p.name))(getPropertySignatures_1(ast));
986
- case 19 /* ASTTag.Lazy */:
987
- return keysOf_1(ast.getAST());
988
- case 20 /* ASTTag.Refinement */:
989
- return keysOf_1(ast.from);
990
- case 21 /* ASTTag.Transform */:
991
- return keysOf_1(ast.to);
992
- default:
993
- return tsplus_module_3.empty();
994
- }
945
+ switch (ast._tag) {
946
+ case 0: return _fncts_base_data_Maybe_destructors.match(() => _fncts_base_collection_immutable_Vector_api.empty(), (surrogate) => keysOf_1(surrogate))(ast.annotations.get(_fncts_schema_ASTAnnotation.Surrogate));
947
+ case 5:
948
+ case 7: return _fncts_base_collection_immutable_Vector_api.vector(stringKeyword_1, numberKeyword_1, symbolKeyword_1);
949
+ case 8: return _fncts_base_collection_immutable_Vector_api.vector(createLiteral_1("length"));
950
+ case 17: return _fncts_base_collection_immutable_Vector_api.concat(_fncts_base_collection_immutable_Vector_api.map((is) => getParameter(is.parameter))(ast.indexSignatures))(_fncts_base_collection_immutable_Vector_api.map((p) => typeof p.name === "symbol" ? createUniqueSymbol_1(p.name) : createLiteral_1(p.name))(ast.propertySignatures));
951
+ case 18: return _fncts_base_collection_immutable_Vector_api.map((p) => typeof p.name === "symbol" ? createUniqueSymbol_1(p.name) : createLiteral_1(p.name))(getPropertySignatures_1(ast));
952
+ case 19: return keysOf_1(ast.getAST());
953
+ case 20: return keysOf_1(ast.from);
954
+ case 21: return keysOf_1(ast.to);
955
+ default: return _fncts_base_collection_immutable_Vector_api.empty();
956
+ }
995
957
  }
996
958
  /**
997
- * @tsplus getter fncts.schema.AST keyof
998
- */
959
+ * @tsplus getter fncts.schema.AST keyof
960
+ */
999
961
  function keyof(self) {
1000
- return createUnion_1(keysOf_1(self));
962
+ return createUnion_1(keysOf_1(self));
1001
963
  }
1002
964
  /**
1003
- * @tsplus static fncts.schema.ASTOps createRecord
1004
- */
965
+ * @tsplus static fncts.schema.ASTOps createRecord
966
+ */
1005
967
  function createRecord(key, value, isReadonly) {
1006
- const propertySignatures = tsplus_module_3.emptyPushable();
1007
- const indexSignatures = tsplus_module_3.emptyPushable();
1008
- function go(key) {
1009
- void 0;
1010
- switch (key._tag) {
1011
- case 5 /* ASTTag.NeverKeyword */:
1012
- break;
1013
- case 8 /* ASTTag.StringKeyword */:
1014
- case 12 /* ASTTag.SymbolKeyword */:
1015
- case 15 /* ASTTag.TemplateLiteral */:
1016
- case 20 /* ASTTag.Refinement */:
1017
- tsplus_module_14.push(createIndexSignature_1(key, value, isReadonly))(indexSignatures);
1018
- break;
1019
- case 1 /* ASTTag.Literal */:
1020
- if (typeof key.literal === "string" || typeof key.literal === "number") {
1021
- tsplus_module_14.push(createPropertySignature_1(key.literal, value, false, isReadonly))(propertySignatures);
1022
- }
1023
- break;
1024
- case 2 /* ASTTag.UniqueSymbol */:
1025
- tsplus_module_14.push(createPropertySignature_1(key.symbol, value, false, isReadonly))(propertySignatures);
1026
- break;
1027
- case 18 /* ASTTag.Union */:
1028
- tsplus_module_3.forEach(go)(key.types);
1029
- break;
1030
- default:
1031
- throw new Error(`createRecord: Unsupported key\n${(0, _Showable.show)(key)}`);
1032
- }
1033
- }
1034
- go(key);
1035
- return createTypeLiteral_1(propertySignatures, indexSignatures);
968
+ const propertySignatures = _fncts_base_collection_immutable_Vector_api.emptyPushable();
969
+ const indexSignatures = _fncts_base_collection_immutable_Vector_api.emptyPushable();
970
+ function go(key) {
971
+ switch (key._tag) {
972
+ case 5: break;
973
+ case 8:
974
+ case 12:
975
+ case 15:
976
+ case 20:
977
+ _fncts_base_collection_immutable_Vector_internal.push(createIndexSignature_1(key, value, isReadonly))(indexSignatures);
978
+ break;
979
+ case 1:
980
+ if (typeof key.literal === "string" || typeof key.literal === "number") _fncts_base_collection_immutable_Vector_internal.push(createPropertySignature_1(key.literal, value, false, isReadonly))(propertySignatures);
981
+ break;
982
+ case 2:
983
+ _fncts_base_collection_immutable_Vector_internal.push(createPropertySignature_1(key.symbol, value, false, isReadonly))(propertySignatures);
984
+ break;
985
+ case 18:
986
+ _fncts_base_collection_immutable_Vector_api.forEach(go)(key.types);
987
+ break;
988
+ default: throw new Error(`createRecord: Unsupported key\n${(0, _fncts_base_data_Showable.show)(key)}`);
989
+ }
990
+ }
991
+ go(key);
992
+ return createTypeLiteral_1(propertySignatures, indexSignatures);
1036
993
  }
1037
994
  /**
1038
- * @tsplus pipeable fncts.schema.AST pick
1039
- */
995
+ * @tsplus pipeable fncts.schema.AST pick
996
+ */
1040
997
  function pick(keys) {
1041
- return self => {
1042
- return createTypeLiteral_1(tsplus_module_3.filter(ps => tsplus_module_3.includes(ps.name)(keys))(getPropertySignatures_1(self)), tsplus_module_3.empty());
1043
- };
998
+ return (self) => {
999
+ return createTypeLiteral_1(_fncts_base_collection_immutable_Vector_api.filter((ps) => _fncts_base_collection_immutable_Vector_api.includes(ps.name)(keys))(getPropertySignatures_1(self)), _fncts_base_collection_immutable_Vector_api.empty());
1000
+ };
1044
1001
  }
1045
1002
  /**
1046
- * @tsplus pipeable fncts.schema.AST omit
1047
- */
1003
+ * @tsplus pipeable fncts.schema.AST omit
1004
+ */
1048
1005
  function omit(keys) {
1049
- return self => {
1050
- return createTypeLiteral_1(tsplus_module_3.filter(ps => !tsplus_module_3.includes(ps.name)(keys))(getPropertySignatures_1(self)), tsplus_module_3.empty());
1051
- };
1006
+ return (self) => {
1007
+ return createTypeLiteral_1(_fncts_base_collection_immutable_Vector_api.filter((ps) => !_fncts_base_collection_immutable_Vector_api.includes(ps.name)(keys))(getPropertySignatures_1(self)), _fncts_base_collection_immutable_Vector_api.empty());
1008
+ };
1052
1009
  }
1053
1010
  /**
1054
- * @tsplus getter fncts.schema.AST partial
1055
- */
1011
+ * @tsplus getter fncts.schema.AST partial
1012
+ */
1056
1013
  function partial_1(self) {
1057
- void 0;
1058
- switch (self._tag) {
1059
- case 16 /* ASTTag.Tuple */:
1060
- return createTuple_1(tsplus_module_3.map(e => createElement_1(e.type, true))(self.elements), tsplus_module_15.map(rest => tsplus_module_3.vector(createUnion_1(tsplus_module_3.append(undefinedKeyword_1)(rest))))(self.rest), self.isReadonly);
1061
- case 17 /* ASTTag.TypeLiteral */:
1062
- return createTypeLiteral_1(tsplus_module_3.map(f => createPropertySignature_1(f.name, f.type, true, f.isReadonly, f.annotations))(self.propertySignatures), self.indexSignatures);
1063
- case 18 /* ASTTag.Union */:
1064
- return createUnion_1(tsplus_module_3.map(partial_1)(self.types));
1065
- case 19 /* ASTTag.Lazy */:
1066
- return createLazy_1(() => partial_1(self.getAST()));
1067
- case 20 /* ASTTag.Refinement */:
1068
- return partial_1(self.from);
1069
- case 21 /* ASTTag.Transform */:
1070
- return partial_1(self.to);
1071
- default:
1072
- return self;
1073
- }
1014
+ switch (self._tag) {
1015
+ case 16: return createTuple_1(_fncts_base_collection_immutable_Vector_api.map((e) => createElement_1(e.type, true))(self.elements), _fncts_base_data_Maybe_api.map((rest) => _fncts_base_collection_immutable_Vector_api.vector(createUnion_1(_fncts_base_collection_immutable_Vector_api.append(undefinedKeyword_1)(rest))))(self.rest), self.isReadonly);
1016
+ case 17: return createTypeLiteral_1(_fncts_base_collection_immutable_Vector_api.map((f) => createPropertySignature_1(f.name, f.type, true, f.isReadonly, f.annotations))(self.propertySignatures), self.indexSignatures);
1017
+ case 18: return createUnion_1(_fncts_base_collection_immutable_Vector_api.map(partial_1)(self.types));
1018
+ case 19: return createLazy_1(() => partial_1(self.getAST()));
1019
+ case 20: return partial_1(self.from);
1020
+ case 21: return partial_1(self.to);
1021
+ default: return self;
1022
+ }
1074
1023
  }
1075
1024
  /**
1076
- * @tsplus static fncts.schema.AST createKey
1077
- */
1025
+ * @tsplus static fncts.schema.AST createKey
1026
+ */
1078
1027
  function createKey(key) {
1079
- return typeof key === "symbol" ? createUniqueSymbol_1(key) : createLiteral_1(key);
1028
+ return typeof key === "symbol" ? createUniqueSymbol_1(key) : createLiteral_1(key);
1080
1029
  }
1081
1030
  /**
1082
- * @tsplus getter fncts.schema.AST getFrom
1083
- */
1031
+ * @tsplus getter fncts.schema.AST getFrom
1032
+ */
1084
1033
  function getFrom_1(ast) {
1085
- void 0;
1086
- switch (ast._tag) {
1087
- case 0 /* ASTTag.Declaration */:
1088
- {
1089
- const surrogate = ast.annotations.get(tsplus_module_2.Surrogate);
1090
- if (tsplus_module_13.isJust(surrogate)) {
1091
- return getFrom_1(surrogate.value);
1092
- }
1093
- break;
1094
- }
1095
- case 16 /* ASTTag.Tuple */:
1096
- return createTuple_1(tsplus_module_3.map(element => createElement_1(getFrom_1(element.type), element.isOptional))(ast.elements), tsplus_module_15.map(restElement => tsplus_module_3.map(getFrom_1)(restElement))(ast.rest), ast.isReadonly, ast.annotations);
1097
- case 17 /* ASTTag.TypeLiteral */:
1098
- return createTypeLiteral_1(tsplus_module_3.map(ps => createPropertySignature_1(ps.name, getFrom_1(ps.type), ps.isOptional, ps.isReadonly, ps.annotations))(ast.propertySignatures), tsplus_module_3.map(is => createIndexSignature_1(is.parameter, getFrom_1(is.type), is.isReadonly))(ast.indexSignatures), ast.annotations);
1099
- case 18 /* ASTTag.Union */:
1100
- return createUnion_1(tsplus_module_3.map(getFrom_1)(ast.types), ast.annotations);
1101
- case 19 /* ASTTag.Lazy */:
1102
- return createLazy_1(() => getFrom_1(ast.getAST()), ast.annotations);
1103
- case 20 /* ASTTag.Refinement */:
1104
- case 21 /* ASTTag.Transform */:
1105
- return getFrom_1(ast.from);
1106
- }
1107
- return ast;
1034
+ switch (ast._tag) {
1035
+ case 0: {
1036
+ const surrogate = ast.annotations.get(_fncts_schema_ASTAnnotation.Surrogate);
1037
+ if (_fncts_base_data_Maybe_definition.isJust(surrogate)) return getFrom_1(surrogate.value);
1038
+ break;
1039
+ }
1040
+ case 16: return createTuple_1(_fncts_base_collection_immutable_Vector_api.map((element) => createElement_1(getFrom_1(element.type), element.isOptional))(ast.elements), _fncts_base_data_Maybe_api.map((restElement) => _fncts_base_collection_immutable_Vector_api.map(getFrom_1)(restElement))(ast.rest), ast.isReadonly, ast.annotations);
1041
+ case 17: return createTypeLiteral_1(_fncts_base_collection_immutable_Vector_api.map((ps) => createPropertySignature_1(ps.name, getFrom_1(ps.type), ps.isOptional, ps.isReadonly, ps.annotations))(ast.propertySignatures), _fncts_base_collection_immutable_Vector_api.map((is) => createIndexSignature_1(is.parameter, getFrom_1(is.type), is.isReadonly))(ast.indexSignatures), ast.annotations);
1042
+ case 18: return createUnion_1(_fncts_base_collection_immutable_Vector_api.map(getFrom_1)(ast.types), ast.annotations);
1043
+ case 19: return createLazy_1(() => getFrom_1(ast.getAST()), ast.annotations);
1044
+ case 20:
1045
+ case 21: return getFrom_1(ast.from);
1046
+ }
1047
+ return ast;
1108
1048
  }
1109
1049
  /**
1110
- * @tsplus getter fncts.schema.AST getTo
1111
- */
1050
+ * @tsplus getter fncts.schema.AST getTo
1051
+ */
1112
1052
  function getTo_1(ast) {
1113
- void 0;
1114
- switch (ast._tag) {
1115
- case 0 /* ASTTag.Declaration */:
1116
- {
1117
- const surrogate = ast.annotations.get(tsplus_module_2.Surrogate);
1118
- if (tsplus_module_13.isJust(surrogate)) {
1119
- return getTo_1(surrogate.value);
1120
- }
1121
- break;
1122
- }
1123
- case 16 /* ASTTag.Tuple */:
1124
- return createTuple_1(tsplus_module_3.map(element => createElement_1(getTo_1(element.type), element.isOptional))(ast.elements), tsplus_module_15.map(restElement => tsplus_module_3.map(getTo_1)(restElement))(ast.rest), ast.isReadonly, ast.annotations);
1125
- case 17 /* ASTTag.TypeLiteral */:
1126
- return createTypeLiteral_1(tsplus_module_3.map(ps => createPropertySignature_1(ps.name, getTo_1(ps.type), ps.isOptional, ps.isReadonly, ps.annotations))(ast.propertySignatures), tsplus_module_3.map(is => createIndexSignature_1(is.parameter, getTo_1(is.type), is.isReadonly))(ast.indexSignatures), ast.annotations);
1127
- case 18 /* ASTTag.Union */:
1128
- return createUnion_1(tsplus_module_3.map(getTo_1)(ast.types), ast.annotations);
1129
- case 19 /* ASTTag.Lazy */:
1130
- return createLazy_1(() => getTo_1(ast.getAST()), ast.annotations);
1131
- case 20 /* ASTTag.Refinement */:
1132
- return createRefinement_1(getTo_1(ast.from), ast.predicate, ast.annotations);
1133
- case 21 /* ASTTag.Transform */:
1134
- return getTo_1(ast.to);
1135
- }
1136
- return ast;
1053
+ switch (ast._tag) {
1054
+ case 0: {
1055
+ const surrogate = ast.annotations.get(_fncts_schema_ASTAnnotation.Surrogate);
1056
+ if (_fncts_base_data_Maybe_definition.isJust(surrogate)) return getTo_1(surrogate.value);
1057
+ break;
1058
+ }
1059
+ case 16: return createTuple_1(_fncts_base_collection_immutable_Vector_api.map((element) => createElement_1(getTo_1(element.type), element.isOptional))(ast.elements), _fncts_base_data_Maybe_api.map((restElement) => _fncts_base_collection_immutable_Vector_api.map(getTo_1)(restElement))(ast.rest), ast.isReadonly, ast.annotations);
1060
+ case 17: return createTypeLiteral_1(_fncts_base_collection_immutable_Vector_api.map((ps) => createPropertySignature_1(ps.name, getTo_1(ps.type), ps.isOptional, ps.isReadonly, ps.annotations))(ast.propertySignatures), _fncts_base_collection_immutable_Vector_api.map((is) => createIndexSignature_1(is.parameter, getTo_1(is.type), is.isReadonly))(ast.indexSignatures), ast.annotations);
1061
+ case 18: return createUnion_1(_fncts_base_collection_immutable_Vector_api.map(getTo_1)(ast.types), ast.annotations);
1062
+ case 19: return createLazy_1(() => getTo_1(ast.getAST()), ast.annotations);
1063
+ case 20: return createRefinement_1(getTo_1(ast.from), ast.predicate, ast.annotations);
1064
+ case 21: return getTo_1(ast.to);
1065
+ }
1066
+ return ast;
1137
1067
  }
1138
1068
  /**
1139
- * @tsplus static fncts.schema.AST getCompiler
1140
- */
1069
+ * @tsplus static fncts.schema.AST getCompiler
1070
+ */
1141
1071
  function getCompiler(match) {
1142
- const compile = (0, _utils.memoize)(ast => {
1143
- void 0;
1144
- return match[ast._tag](ast, compile);
1145
- });
1146
- return compile;
1072
+ const compile = (0, _fncts_schema_utils.memoize)((ast) => {
1073
+ return match[ast._tag](ast, compile);
1074
+ });
1075
+ return compile;
1147
1076
  }
1148
1077
  function getLiterals(ast, isDecoding) {
1149
- void 0;
1150
- switch (ast._tag) {
1151
- case 0 /* ASTTag.Declaration */:
1152
- {
1153
- const surrogate = ast.annotations.get(tsplus_module_2.Surrogate);
1154
- if (tsplus_module_13.isJust(surrogate)) {
1155
- return getLiterals(surrogate.value, isDecoding);
1156
- }
1157
- break;
1158
- }
1159
- case 17 /* ASTTag.TypeLiteral */:
1160
- {
1161
- const out = [];
1162
- for (let i = 0; i < ast.propertySignatures.length; i++) {
1163
- const propertySignature = tsplus_module_3.unsafeGet(i)(ast.propertySignatures);
1164
- if (isLiteral_1(propertySignature.type) && !propertySignature.isOptional) {
1165
- out.push([propertySignature.name, propertySignature.type]);
1166
- }
1167
- }
1168
- return out;
1169
- }
1170
- case 20 /* ASTTag.Refinement */:
1171
- return getLiterals(ast.from, isDecoding);
1172
- case 21 /* ASTTag.Transform */:
1173
- return getLiterals(isDecoding ? ast.from : ast.to, isDecoding);
1174
- }
1175
- return [];
1078
+ switch (ast._tag) {
1079
+ case 0: {
1080
+ const surrogate = ast.annotations.get(_fncts_schema_ASTAnnotation.Surrogate);
1081
+ if (_fncts_base_data_Maybe_definition.isJust(surrogate)) return getLiterals(surrogate.value, isDecoding);
1082
+ break;
1083
+ }
1084
+ case 17: {
1085
+ const out = [];
1086
+ for (let i = 0; i < ast.propertySignatures.length; i++) {
1087
+ const propertySignature = _fncts_base_collection_immutable_Vector_api.unsafeGet(i)(ast.propertySignatures);
1088
+ if (isLiteral_1(propertySignature.type) && !propertySignature.isOptional) out.push([propertySignature.name, propertySignature.type]);
1089
+ }
1090
+ return out;
1091
+ }
1092
+ case 20: return getLiterals(ast.from, isDecoding);
1093
+ case 21: return getLiterals(isDecoding ? ast.from : ast.to, isDecoding);
1094
+ }
1095
+ return [];
1176
1096
  }
1177
1097
  function getSearchTree(members, isDecoding) {
1178
- const keys = {};
1179
- const otherwise = [];
1180
- for (let i = 0; i < members.length; i++) {
1181
- const member = tsplus_module_3.unsafeGet(i)(members);
1182
- const tags = getLiterals(member, isDecoding);
1183
- if (tags.length > 0) {
1184
- for (let j = 0; j < tags.length; j++) {
1185
- const [key, literal] = tags[j];
1186
- const hash = String(literal.literal);
1187
- keys[key] || (keys[key] = {
1188
- buckets: {},
1189
- ast: neverKeyword_1,
1190
- literals: []
1191
- });
1192
- const buckets = keys[key].buckets;
1193
- if (Object.prototype.hasOwnProperty.call(buckets, hash)) {
1194
- if (j < tags.length - 1) {
1195
- continue;
1196
- }
1197
- buckets[hash].push(member);
1198
- keys[key].ast = createUnion_1(tsplus_module_3.vector(keys[key].ast, literal));
1199
- keys[key].literals.push(literal);
1200
- } else {
1201
- buckets[hash] = [member];
1202
- keys[key].ast = createUnion_1(tsplus_module_3.vector(keys[key].ast, literal));
1203
- keys[key].literals.push(literal);
1204
- break;
1205
- }
1206
- }
1207
- } else {
1208
- otherwise.push(member);
1209
- }
1210
- }
1211
- return {
1212
- keys,
1213
- otherwise
1214
- };
1098
+ const keys = {};
1099
+ const otherwise = [];
1100
+ for (let i = 0; i < members.length; i++) {
1101
+ const member = _fncts_base_collection_immutable_Vector_api.unsafeGet(i)(members);
1102
+ const tags = getLiterals(member, isDecoding);
1103
+ if (tags.length > 0) for (let j = 0; j < tags.length; j++) {
1104
+ const [key, literal] = tags[j];
1105
+ const hash = String(literal.literal);
1106
+ keys[key] ||= {
1107
+ buckets: {},
1108
+ ast: neverKeyword_1,
1109
+ literals: []
1110
+ };
1111
+ const buckets = keys[key].buckets;
1112
+ if (Object.prototype.hasOwnProperty.call(buckets, hash)) {
1113
+ if (j < tags.length - 1) continue;
1114
+ buckets[hash].push(member);
1115
+ keys[key].ast = createUnion_1(_fncts_base_collection_immutable_Vector_api.vector(keys[key].ast, literal));
1116
+ keys[key].literals.push(literal);
1117
+ } else {
1118
+ buckets[hash] = [member];
1119
+ keys[key].ast = createUnion_1(_fncts_base_collection_immutable_Vector_api.vector(keys[key].ast, literal));
1120
+ keys[key].literals.push(literal);
1121
+ break;
1122
+ }
1123
+ }
1124
+ else otherwise.push(member);
1125
+ }
1126
+ return {
1127
+ keys,
1128
+ otherwise
1129
+ };
1215
1130
  }
1216
1131
  /**
1217
- * @tsplus pipeable fncts.schema.AST getFormattedExpected
1218
- */
1132
+ * @tsplus pipeable fncts.schema.AST getFormattedExpected
1133
+ */
1219
1134
  function getFormattedExpected(verbose = false) {
1220
- return self => {
1221
- if (verbose) {
1222
- const description = tsplus_module_15.orElse(() => self.annotations.get(tsplus_module_2.Title))(self.annotations.get(tsplus_module_2.Description));
1223
- return tsplus_module_12.match(() => description, identifier => tsplus_module_12.match(() => tsplus_module_4.just(identifier, fileName_1 + ":1512:23"), description => tsplus_module_4.just(`${identifier} (${description})`, fileName_1 + ":1513:34"))(description))(self.annotations.get(tsplus_module_2.Identifier));
1224
- } else {
1225
- return tsplus_module_15.orElse(() => self.annotations.get(tsplus_module_2.Description))(tsplus_module_15.orElse(() => self.annotations.get(tsplus_module_2.Title))(self.annotations.get(tsplus_module_2.Identifier)));
1226
- }
1227
- };
1228
- }
1135
+ return (self) => {
1136
+ if (verbose) {
1137
+ const description = _fncts_base_data_Maybe_api.orElse(() => self.annotations.get(_fncts_schema_ASTAnnotation.Title))(self.annotations.get(_fncts_schema_ASTAnnotation.Description));
1138
+ return _fncts_base_data_Maybe_destructors.match(() => description, (identifier) => _fncts_base_data_Maybe_destructors.match(() => _fncts_base_data_Maybe_constructors.just(identifier, fileName_1 + ":1710:23"), (description) => _fncts_base_data_Maybe_constructors.just(`${identifier} (${description})`, fileName_1 + ":1711:34"))(description))(self.annotations.get(_fncts_schema_ASTAnnotation.Identifier));
1139
+ } else return _fncts_base_data_Maybe_api.orElse(() => self.annotations.get(_fncts_schema_ASTAnnotation.Description))(_fncts_base_data_Maybe_api.orElse(() => self.annotations.get(_fncts_schema_ASTAnnotation.Title))(self.annotations.get(_fncts_schema_ASTAnnotation.Identifier)));
1140
+ };
1141
+ }
1142
+ //#endregion
1143
+ exports.AST = AST;
1144
+ exports.ASTTypeId = ASTTypeId;
1145
+ exports.Annotated = Annotated;
1146
+ exports.AnyKeyword = AnyKeyword;
1147
+ exports.BigIntKeyword = BigIntKeyword;
1148
+ exports.BooleanKeyword = BooleanKeyword;
1149
+ exports.Declaration = Declaration;
1150
+ exports.Element = Element;
1151
+ exports.Enum = Enum;
1152
+ exports.IndexSignature = IndexSignature;
1153
+ exports.Lazy = Lazy;
1154
+ exports.Literal = Literal;
1155
+ exports.NeverKeyword = NeverKeyword;
1156
+ exports.NumberKeyword = NumberKeyword;
1157
+ exports.ObjectKeyword = ObjectKeyword;
1158
+ exports.PropertySignature = PropertySignature;
1159
+ exports.Refinement = Refinement;
1160
+ exports.StringKeyword = StringKeyword;
1161
+ exports.SymbolKeyword = SymbolKeyword;
1162
+ exports.TemplateLiteral = TemplateLiteral;
1163
+ exports.TemplateLiteralSpan = TemplateLiteralSpan;
1164
+ exports.Transform = Transform;
1165
+ exports.Tuple = Tuple;
1166
+ exports.TypeLiteral = TypeLiteral;
1167
+ exports.UndefinedKeyword = UndefinedKeyword;
1168
+ exports.Union = Union;
1169
+ exports.UniqueSymbol = UniqueSymbol;
1170
+ exports.UnknownKeyword = UnknownKeyword;
1171
+ exports.Validation = Validation;
1172
+ exports.VoidKeyword = VoidKeyword;
1173
+ exports.anyKeyword = anyKeyword;
1174
+ exports.appendElement = appendElement;
1175
+ exports.appendRestElement = appendRestElement;
1176
+ exports.bigIntKeyword = bigIntKeyword;
1177
+ exports.booleanKeyword = booleanKeyword;
1178
+ exports.combineAnnotations = combineAnnotations;
1179
+ exports.concrete = concrete;
1180
+ exports.createDeclaration = createDeclaration;
1181
+ exports.createElement = createElement;
1182
+ exports.createEnum = createEnum;
1183
+ exports.createIndexSignature = createIndexSignature;
1184
+ exports.createKey = createKey;
1185
+ exports.createLazy = createLazy;
1186
+ exports.createLiteral = createLiteral;
1187
+ exports.createPropertySignature = createPropertySignature;
1188
+ exports.createRecord = createRecord;
1189
+ exports.createRefinement = createRefinement;
1190
+ exports.createTemplateLiteral = createTemplateLiteral;
1191
+ exports.createTransform = createTransform;
1192
+ exports.createTuple = createTuple;
1193
+ exports.createTypeLiteral = createTypeLiteral;
1194
+ exports.createUnion = createUnion;
1195
+ exports.createUniqueSymbol = createUniqueSymbol;
1196
+ exports.createValidation = createValidation;
1197
+ exports.getAnnotations = getAnnotations;
1198
+ exports.getCardinality = getCardinality;
1199
+ exports.getCompiler = getCompiler;
1200
+ exports.getFormattedExpected = getFormattedExpected;
1201
+ exports.getFrom = getFrom;
1202
+ exports.getLiterals = getLiterals;
1203
+ exports.getParameter = getParameter;
1204
+ exports.getPropertySignatures = getPropertySignatures;
1205
+ exports.getSearchTree = getSearchTree;
1206
+ exports.getTo = getTo;
1207
+ exports.getWeight = getWeight;
1208
+ exports.isAST = isAST;
1209
+ exports.isBigIntKeyword = isBigIntKeyword;
1210
+ exports.isBooleanKeyword = isBooleanKeyword;
1211
+ exports.isDeclaration = isDeclaration;
1212
+ exports.isLazy = isLazy;
1213
+ exports.isLiteral = isLiteral;
1214
+ exports.isNumberKeyword = isNumberKeyword;
1215
+ exports.isRefinement = isRefinement;
1216
+ exports.isStringKeyword = isStringKeyword;
1217
+ exports.isSymbolKeyword = isSymbolKeyword;
1218
+ exports.isTypeLiteral = isTypeLiteral;
1219
+ exports.isUnion = isUnion;
1220
+ exports.isUniqueSymbol = isUniqueSymbol;
1221
+ exports.keyof = keyof;
1222
+ exports.keysOf = keysOf;
1223
+ exports.neverKeyword = neverKeyword;
1224
+ exports.numberKeyword = numberKeyword;
1225
+ exports.objectKeyword = objectKeyword;
1226
+ exports.omit = omit;
1227
+ exports.partial = partial;
1228
+ exports.pick = pick;
1229
+ exports.setAnnotation = setAnnotation;
1230
+ exports.stringKeyword = stringKeyword;
1231
+ exports.symbolKeyword = symbolKeyword;
1232
+ exports.undefinedKeyword = undefinedKeyword;
1233
+ exports.unknownArray = unknownArray;
1234
+ exports.unknownKeyword = unknownKeyword;
1235
+ exports.unknownRecord = unknownRecord;
1236
+ exports.voidKeyword = voidKeyword;
1237
+
1229
1238
  //# sourceMappingURL=AST.cjs.map