@gmb/bitmark-parser-generator 3.33.0 → 3.35.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (904) hide show
  1. package/README.md +2 -2
  2. package/dist/browser/bitmark-parser-generator.min.js +1 -1
  3. package/dist/browser/bundle-report.html +2 -2
  4. package/dist/index.cjs +34967 -0
  5. package/dist/index.cjs.map +1 -0
  6. package/dist/index.d.cts +8185 -0
  7. package/dist/index.d.ts +8185 -0
  8. package/dist/index.js +34907 -0
  9. package/dist/index.js.map +1 -0
  10. package/package.json +100 -87
  11. package/dist/cjs/BitmarkParserGenerator.js +0 -776
  12. package/dist/cjs/BitmarkParserGenerator.js.map +0 -1
  13. package/dist/cjs/ast/Ast.js +0 -220
  14. package/dist/cjs/ast/Ast.js.map +0 -1
  15. package/dist/cjs/ast/BaseBuilder.js +0 -193
  16. package/dist/cjs/ast/BaseBuilder.js.map +0 -1
  17. package/dist/cjs/ast/Builder.js +0 -1788
  18. package/dist/cjs/ast/Builder.js.map +0 -1
  19. package/dist/cjs/ast/ResourceBuilder.js +0 -964
  20. package/dist/cjs/ast/ResourceBuilder.js.map +0 -1
  21. package/dist/cjs/ast/rules/NodeValidator.js +0 -184
  22. package/dist/cjs/ast/rules/NodeValidator.js.map +0 -1
  23. package/dist/cjs/ast/writer/FileWriter.js +0 -119
  24. package/dist/cjs/ast/writer/FileWriter.js.map +0 -1
  25. package/dist/cjs/ast/writer/StreamWriter.js +0 -89
  26. package/dist/cjs/ast/writer/StreamWriter.js.map +0 -1
  27. package/dist/cjs/ast/writer/StringWriter.js +0 -115
  28. package/dist/cjs/ast/writer/StringWriter.js.map +0 -1
  29. package/dist/cjs/ast/writer/Writer.js +0 -3
  30. package/dist/cjs/ast/writer/Writer.js.map +0 -1
  31. package/dist/cjs/breakscaping/Breakscape.js +0 -80
  32. package/dist/cjs/breakscaping/Breakscape.js.map +0 -1
  33. package/dist/cjs/breakscaping/BreakscapeLoop.js +0 -305
  34. package/dist/cjs/breakscaping/BreakscapeLoop.js.map +0 -1
  35. package/dist/cjs/breakscaping/BreakscapeOptions.js +0 -3
  36. package/dist/cjs/breakscaping/BreakscapeOptions.js.map +0 -1
  37. package/dist/cjs/breakscaping/BreakscapeRegex.js +0 -213
  38. package/dist/cjs/breakscaping/BreakscapeRegex.js.map +0 -1
  39. package/dist/cjs/breakscaping/RegexConfigs.js +0 -38
  40. package/dist/cjs/breakscaping/RegexConfigs.js.map +0 -1
  41. package/dist/cjs/config/Config.js +0 -352
  42. package/dist/cjs/config/Config.js.map +0 -1
  43. package/dist/cjs/config/ConfigHydrator.js +0 -161
  44. package/dist/cjs/config/ConfigHydrator.js.map +0 -1
  45. package/dist/cjs/config/raw/bits.js +0 -2615
  46. package/dist/cjs/config/raw/bits.js.map +0 -1
  47. package/dist/cjs/config/raw/cardSets.js +0 -549
  48. package/dist/cjs/config/raw/cardSets.js.map +0 -1
  49. package/dist/cjs/config/raw/groups.js +0 -1182
  50. package/dist/cjs/config/raw/groups.js.map +0 -1
  51. package/dist/cjs/config/raw/properties.js +0 -1006
  52. package/dist/cjs/config/raw/properties.js.map +0 -1
  53. package/dist/cjs/config/raw/resources.js +0 -103
  54. package/dist/cjs/config/raw/resources.js.map +0 -1
  55. package/dist/cjs/config/raw/tags.js +0 -48
  56. package/dist/cjs/config/raw/tags.js.map +0 -1
  57. package/dist/cjs/generated/build-info.js +0 -13
  58. package/dist/cjs/generated/build-info.js.map +0 -1
  59. package/dist/cjs/generated/parser/bitmark/bitmark-peggy-parser.js +0 -3168
  60. package/dist/cjs/generated/parser/bitmark/bitmark-peggy-parser.js.map +0 -1
  61. package/dist/cjs/generated/parser/text/text-peggy-parser.js +0 -9631
  62. package/dist/cjs/generated/parser/text/text-peggy-parser.js.map +0 -1
  63. package/dist/cjs/generator/AstWalkerGenerator.js +0 -86
  64. package/dist/cjs/generator/AstWalkerGenerator.js.map +0 -1
  65. package/dist/cjs/generator/Generator.js +0 -3
  66. package/dist/cjs/generator/Generator.js.map +0 -1
  67. package/dist/cjs/generator/bitmark/BitmarkFileGenerator.js +0 -49
  68. package/dist/cjs/generator/bitmark/BitmarkFileGenerator.js.map +0 -1
  69. package/dist/cjs/generator/bitmark/BitmarkGenerator.js +0 -2601
  70. package/dist/cjs/generator/bitmark/BitmarkGenerator.js.map +0 -1
  71. package/dist/cjs/generator/bitmark/BitmarkStringGenerator.js +0 -51
  72. package/dist/cjs/generator/bitmark/BitmarkStringGenerator.js.map +0 -1
  73. package/dist/cjs/generator/json/JsonFileGenerator.js +0 -53
  74. package/dist/cjs/generator/json/JsonFileGenerator.js.map +0 -1
  75. package/dist/cjs/generator/json/JsonGenerator.js +0 -1584
  76. package/dist/cjs/generator/json/JsonGenerator.js.map +0 -1
  77. package/dist/cjs/generator/json/JsonObjectGenerator.js +0 -51
  78. package/dist/cjs/generator/json/JsonObjectGenerator.js.map +0 -1
  79. package/dist/cjs/generator/json/JsonStringGenerator.js +0 -50
  80. package/dist/cjs/generator/json/JsonStringGenerator.js.map +0 -1
  81. package/dist/cjs/generator/text/TextGenerator.js +0 -1195
  82. package/dist/cjs/generator/text/TextGenerator.js.map +0 -1
  83. package/dist/cjs/index.js +0 -79
  84. package/dist/cjs/index.js.map +0 -1
  85. package/dist/cjs/info/InfoBuilder.js +0 -43
  86. package/dist/cjs/info/InfoBuilder.js.map +0 -1
  87. package/dist/cjs/init/init.js +0 -15
  88. package/dist/cjs/init/init.js.map +0 -1
  89. package/dist/cjs/model/ast/BreakscapedString.js +0 -3
  90. package/dist/cjs/model/ast/BreakscapedString.js.map +0 -1
  91. package/dist/cjs/model/ast/NodeType.js +0 -557
  92. package/dist/cjs/model/ast/NodeType.js.map +0 -1
  93. package/dist/cjs/model/ast/Nodes.js +0 -3
  94. package/dist/cjs/model/ast/Nodes.js.map +0 -1
  95. package/dist/cjs/model/ast/StardardString.js +0 -3
  96. package/dist/cjs/model/ast/StardardString.js.map +0 -1
  97. package/dist/cjs/model/ast/TextNodes.js +0 -3
  98. package/dist/cjs/model/ast/TextNodes.js.map +0 -1
  99. package/dist/cjs/model/config/AbstractTagConfig.js +0 -18
  100. package/dist/cjs/model/config/AbstractTagConfig.js.map +0 -1
  101. package/dist/cjs/model/config/BitConfig.js +0 -72
  102. package/dist/cjs/model/config/BitConfig.js.map +0 -1
  103. package/dist/cjs/model/config/CardSetConfig.js +0 -26
  104. package/dist/cjs/model/config/CardSetConfig.js.map +0 -1
  105. package/dist/cjs/model/config/CardVariantConfig.js +0 -32
  106. package/dist/cjs/model/config/CardVariantConfig.js.map +0 -1
  107. package/dist/cjs/model/config/MarkupTagConfig.js +0 -41
  108. package/dist/cjs/model/config/MarkupTagConfig.js.map +0 -1
  109. package/dist/cjs/model/config/PropertyTagConfig.js +0 -50
  110. package/dist/cjs/model/config/PropertyTagConfig.js.map +0 -1
  111. package/dist/cjs/model/config/ResourceTagConfig.js +0 -42
  112. package/dist/cjs/model/config/ResourceTagConfig.js.map +0 -1
  113. package/dist/cjs/model/config/ResourcesConfig.js +0 -31
  114. package/dist/cjs/model/config/ResourcesConfig.js.map +0 -1
  115. package/dist/cjs/model/config/TagConfig.js +0 -3
  116. package/dist/cjs/model/config/TagConfig.js.map +0 -1
  117. package/dist/cjs/model/config/TagsConfig.js +0 -3
  118. package/dist/cjs/model/config/TagsConfig.js.map +0 -1
  119. package/dist/cjs/model/config/TagsConfigWithInfo.js +0 -3
  120. package/dist/cjs/model/config/TagsConfigWithInfo.js.map +0 -1
  121. package/dist/cjs/model/config/_Config.js +0 -3
  122. package/dist/cjs/model/config/_Config.js.map +0 -1
  123. package/dist/cjs/model/config/enum/CardSetConfigKey.js +0 -28
  124. package/dist/cjs/model/config/enum/CardSetConfigKey.js.map +0 -1
  125. package/dist/cjs/model/config/enum/ConfigKey.js +0 -29
  126. package/dist/cjs/model/config/enum/ConfigKey.js.map +0 -1
  127. package/dist/cjs/model/config/enum/GroupConfigKey.js +0 -57
  128. package/dist/cjs/model/config/enum/GroupConfigKey.js.map +0 -1
  129. package/dist/cjs/model/config/enum/GroupConfigType.js +0 -14
  130. package/dist/cjs/model/config/enum/GroupConfigType.js.map +0 -1
  131. package/dist/cjs/model/config/enum/PropertyConfigKey.js +0 -215
  132. package/dist/cjs/model/config/enum/PropertyConfigKey.js.map +0 -1
  133. package/dist/cjs/model/config/enum/ResourceConfigKey.js +0 -40
  134. package/dist/cjs/model/config/enum/ResourceConfigKey.js.map +0 -1
  135. package/dist/cjs/model/config/enum/TagConfigKey.js +0 -26
  136. package/dist/cjs/model/config/enum/TagConfigKey.js.map +0 -1
  137. package/dist/cjs/model/enum/BitTagType.js +0 -13
  138. package/dist/cjs/model/enum/BitTagType.js.map +0 -1
  139. package/dist/cjs/model/enum/BitType.js +0 -576
  140. package/dist/cjs/model/enum/BitType.js.map +0 -1
  141. package/dist/cjs/model/enum/BitmarkGeneratorOutput.js +0 -2
  142. package/dist/cjs/model/enum/BitmarkGeneratorOutput.js.map +0 -1
  143. package/dist/cjs/model/enum/BitmarkParserType.js +0 -9
  144. package/dist/cjs/model/enum/BitmarkParserType.js.map +0 -1
  145. package/dist/cjs/model/enum/BitmarkVersion.js +0 -12
  146. package/dist/cjs/model/enum/BitmarkVersion.js.map +0 -1
  147. package/dist/cjs/model/enum/BodyBitType.js +0 -14
  148. package/dist/cjs/model/enum/BodyBitType.js.map +0 -1
  149. package/dist/cjs/model/enum/BodyTextFormat.js +0 -14
  150. package/dist/cjs/model/enum/BodyTextFormat.js.map +0 -1
  151. package/dist/cjs/model/enum/CardSetVersion.js +0 -10
  152. package/dist/cjs/model/enum/CardSetVersion.js.map +0 -1
  153. package/dist/cjs/model/enum/Count.js +0 -9
  154. package/dist/cjs/model/enum/Count.js.map +0 -1
  155. package/dist/cjs/model/enum/DeprecatedTextFormat.js +0 -9
  156. package/dist/cjs/model/enum/DeprecatedTextFormat.js.map +0 -1
  157. package/dist/cjs/model/enum/ExampleType.js +0 -11
  158. package/dist/cjs/model/enum/ExampleType.js.map +0 -1
  159. package/dist/cjs/model/enum/PropertyAstKey.js +0 -18
  160. package/dist/cjs/model/enum/PropertyAstKey.js.map +0 -1
  161. package/dist/cjs/model/enum/PropertyFormat.js +0 -14
  162. package/dist/cjs/model/enum/PropertyFormat.js.map +0 -1
  163. package/dist/cjs/model/enum/PropertyJsonKey.js +0 -14
  164. package/dist/cjs/model/enum/PropertyJsonKey.js.map +0 -1
  165. package/dist/cjs/model/enum/PropertyTag.js +0 -8
  166. package/dist/cjs/model/enum/PropertyTag.js.map +0 -1
  167. package/dist/cjs/model/enum/ResourceJsonKey.js +0 -27
  168. package/dist/cjs/model/enum/ResourceJsonKey.js.map +0 -1
  169. package/dist/cjs/model/enum/ResourceTag.js +0 -37
  170. package/dist/cjs/model/enum/ResourceTag.js.map +0 -1
  171. package/dist/cjs/model/enum/Tag.js +0 -21
  172. package/dist/cjs/model/enum/Tag.js.map +0 -1
  173. package/dist/cjs/model/enum/TextFormat.js +0 -16
  174. package/dist/cjs/model/enum/TextFormat.js.map +0 -1
  175. package/dist/cjs/model/enum/TextLocation.js +0 -15
  176. package/dist/cjs/model/enum/TextLocation.js.map +0 -1
  177. package/dist/cjs/model/enum/TextMarkType.js +0 -54
  178. package/dist/cjs/model/enum/TextMarkType.js.map +0 -1
  179. package/dist/cjs/model/enum/TextNodeType.js +0 -35
  180. package/dist/cjs/model/enum/TextNodeType.js.map +0 -1
  181. package/dist/cjs/model/enum/TextSection.js +0 -18
  182. package/dist/cjs/model/enum/TextSection.js.map +0 -1
  183. package/dist/cjs/model/info/enum/InfoFormat.js +0 -11
  184. package/dist/cjs/model/info/enum/InfoFormat.js.map +0 -1
  185. package/dist/cjs/model/info/enum/InfoType.js +0 -12
  186. package/dist/cjs/model/info/enum/InfoType.js.map +0 -1
  187. package/dist/cjs/model/json/BitJson.js +0 -3
  188. package/dist/cjs/model/json/BitJson.js.map +0 -1
  189. package/dist/cjs/model/json/BitWrapperJson.js +0 -3
  190. package/dist/cjs/model/json/BitWrapperJson.js.map +0 -1
  191. package/dist/cjs/model/json/BodyBitJson.js +0 -3
  192. package/dist/cjs/model/json/BodyBitJson.js.map +0 -1
  193. package/dist/cjs/model/json/ParserJson.js +0 -3
  194. package/dist/cjs/model/json/ParserJson.js.map +0 -1
  195. package/dist/cjs/model/json/ResourceJson.js +0 -3
  196. package/dist/cjs/model/json/ResourceJson.js.map +0 -1
  197. package/dist/cjs/model/parser/ParserData.js +0 -3
  198. package/dist/cjs/model/parser/ParserData.js.map +0 -1
  199. package/dist/cjs/model/parser/ParserError.js +0 -3
  200. package/dist/cjs/model/parser/ParserError.js.map +0 -1
  201. package/dist/cjs/model/parser/ParserInfo.js +0 -3
  202. package/dist/cjs/model/parser/ParserInfo.js.map +0 -1
  203. package/dist/cjs/model/parser/ParserLocation.js +0 -3
  204. package/dist/cjs/model/parser/ParserLocation.js.map +0 -1
  205. package/dist/cjs/model/parser/ParserLocationRange.js +0 -3
  206. package/dist/cjs/model/parser/ParserLocationRange.js.map +0 -1
  207. package/dist/cjs/model/parser/TagValidationData.js +0 -3
  208. package/dist/cjs/model/parser/TagValidationData.js.map +0 -1
  209. package/dist/cjs/parser/bitmark/BitmarkParser.js +0 -25
  210. package/dist/cjs/parser/bitmark/BitmarkParser.js.map +0 -1
  211. package/dist/cjs/parser/bitmark/peg/BitmarkPegParser.js +0 -7
  212. package/dist/cjs/parser/bitmark/peg/BitmarkPegParser.js.map +0 -1
  213. package/dist/cjs/parser/bitmark/peg/BitmarkPegParserHelper.js +0 -614
  214. package/dist/cjs/parser/bitmark/peg/BitmarkPegParserHelper.js.map +0 -1
  215. package/dist/cjs/parser/bitmark/peg/BitmarkPegParserProcessor.js +0 -716
  216. package/dist/cjs/parser/bitmark/peg/BitmarkPegParserProcessor.js.map +0 -1
  217. package/dist/cjs/parser/bitmark/peg/BitmarkPegParserTypes.js +0 -69
  218. package/dist/cjs/parser/bitmark/peg/BitmarkPegParserTypes.js.map +0 -1
  219. package/dist/cjs/parser/bitmark/peg/BitmarkPegParserValidator.js +0 -745
  220. package/dist/cjs/parser/bitmark/peg/BitmarkPegParserValidator.js.map +0 -1
  221. package/dist/cjs/parser/bitmark/peg/PeggyGrammarLocation.js +0 -82
  222. package/dist/cjs/parser/bitmark/peg/PeggyGrammarLocation.js.map +0 -1
  223. package/dist/cjs/parser/bitmark/peg/contentProcessors/BodyContentProcessor.js +0 -260
  224. package/dist/cjs/parser/bitmark/peg/contentProcessors/BodyContentProcessor.js.map +0 -1
  225. package/dist/cjs/parser/bitmark/peg/contentProcessors/BookChainContentProcessor.js +0 -50
  226. package/dist/cjs/parser/bitmark/peg/contentProcessors/BookChainContentProcessor.js.map +0 -1
  227. package/dist/cjs/parser/bitmark/peg/contentProcessors/CardContentProcessor.js +0 -885
  228. package/dist/cjs/parser/bitmark/peg/contentProcessors/CardContentProcessor.js.map +0 -1
  229. package/dist/cjs/parser/bitmark/peg/contentProcessors/ClozeTagContentProcessor.js +0 -27
  230. package/dist/cjs/parser/bitmark/peg/contentProcessors/ClozeTagContentProcessor.js.map +0 -1
  231. package/dist/cjs/parser/bitmark/peg/contentProcessors/ContentProcessorUtils.js +0 -61
  232. package/dist/cjs/parser/bitmark/peg/contentProcessors/ContentProcessorUtils.js.map +0 -1
  233. package/dist/cjs/parser/bitmark/peg/contentProcessors/DefaultTagContentProcessor.js +0 -63
  234. package/dist/cjs/parser/bitmark/peg/contentProcessors/DefaultTagContentProcessor.js.map +0 -1
  235. package/dist/cjs/parser/bitmark/peg/contentProcessors/ExampleTagContentProcessor.js +0 -161
  236. package/dist/cjs/parser/bitmark/peg/contentProcessors/ExampleTagContentProcessor.js.map +0 -1
  237. package/dist/cjs/parser/bitmark/peg/contentProcessors/FooterContentProcessor.js +0 -55
  238. package/dist/cjs/parser/bitmark/peg/contentProcessors/FooterContentProcessor.js.map +0 -1
  239. package/dist/cjs/parser/bitmark/peg/contentProcessors/GapChainContentProcessor.js +0 -31
  240. package/dist/cjs/parser/bitmark/peg/contentProcessors/GapChainContentProcessor.js.map +0 -1
  241. package/dist/cjs/parser/bitmark/peg/contentProcessors/ImageSourceChainContentProcessor.js +0 -59
  242. package/dist/cjs/parser/bitmark/peg/contentProcessors/ImageSourceChainContentProcessor.js.map +0 -1
  243. package/dist/cjs/parser/bitmark/peg/contentProcessors/InternalCommentTagContentProcessor.js +0 -16
  244. package/dist/cjs/parser/bitmark/peg/contentProcessors/InternalCommentTagContentProcessor.js.map +0 -1
  245. package/dist/cjs/parser/bitmark/peg/contentProcessors/ItemLeadChainContentProcessor.js +0 -29
  246. package/dist/cjs/parser/bitmark/peg/contentProcessors/ItemLeadChainContentProcessor.js.map +0 -1
  247. package/dist/cjs/parser/bitmark/peg/contentProcessors/ItemLeadTagContentProcessor.js +0 -20
  248. package/dist/cjs/parser/bitmark/peg/contentProcessors/ItemLeadTagContentProcessor.js.map +0 -1
  249. package/dist/cjs/parser/bitmark/peg/contentProcessors/MarkChainContentProcessor.js +0 -45
  250. package/dist/cjs/parser/bitmark/peg/contentProcessors/MarkChainContentProcessor.js.map +0 -1
  251. package/dist/cjs/parser/bitmark/peg/contentProcessors/MarkConfigChainContentProcessor.js +0 -44
  252. package/dist/cjs/parser/bitmark/peg/contentProcessors/MarkConfigChainContentProcessor.js.map +0 -1
  253. package/dist/cjs/parser/bitmark/peg/contentProcessors/MarkTagContentProcessor.js +0 -11
  254. package/dist/cjs/parser/bitmark/peg/contentProcessors/MarkTagContentProcessor.js.map +0 -1
  255. package/dist/cjs/parser/bitmark/peg/contentProcessors/PersonChainContentProcessor.js +0 -57
  256. package/dist/cjs/parser/bitmark/peg/contentProcessors/PersonChainContentProcessor.js.map +0 -1
  257. package/dist/cjs/parser/bitmark/peg/contentProcessors/PropertyContentProcessor.js +0 -158
  258. package/dist/cjs/parser/bitmark/peg/contentProcessors/PropertyContentProcessor.js.map +0 -1
  259. package/dist/cjs/parser/bitmark/peg/contentProcessors/RatingLevelChainContentProcessor.js +0 -37
  260. package/dist/cjs/parser/bitmark/peg/contentProcessors/RatingLevelChainContentProcessor.js.map +0 -1
  261. package/dist/cjs/parser/bitmark/peg/contentProcessors/ReferenceTagContentProcessor.js +0 -24
  262. package/dist/cjs/parser/bitmark/peg/contentProcessors/ReferenceTagContentProcessor.js.map +0 -1
  263. package/dist/cjs/parser/bitmark/peg/contentProcessors/ResourceContentProcessor.js +0 -163
  264. package/dist/cjs/parser/bitmark/peg/contentProcessors/ResourceContentProcessor.js.map +0 -1
  265. package/dist/cjs/parser/bitmark/peg/contentProcessors/ServingsChainContentProcessor.js +0 -27
  266. package/dist/cjs/parser/bitmark/peg/contentProcessors/ServingsChainContentProcessor.js.map +0 -1
  267. package/dist/cjs/parser/bitmark/peg/contentProcessors/TechnicalTermChainContentProcessor.js +0 -28
  268. package/dist/cjs/parser/bitmark/peg/contentProcessors/TechnicalTermChainContentProcessor.js.map +0 -1
  269. package/dist/cjs/parser/bitmark/peg/contentProcessors/TitleTagContentProcessor.js +0 -53
  270. package/dist/cjs/parser/bitmark/peg/contentProcessors/TitleTagContentProcessor.js.map +0 -1
  271. package/dist/cjs/parser/bitmark/peg/contentProcessors/TrueFalseChainContentProcessor.js +0 -203
  272. package/dist/cjs/parser/bitmark/peg/contentProcessors/TrueFalseChainContentProcessor.js.map +0 -1
  273. package/dist/cjs/parser/bitmark/peg/contentProcessors/TrueFalseTagContentProcessor.js +0 -24
  274. package/dist/cjs/parser/bitmark/peg/contentProcessors/TrueFalseTagContentProcessor.js.map +0 -1
  275. package/dist/cjs/parser/json/JsonParser.js +0 -270
  276. package/dist/cjs/parser/json/JsonParser.js.map +0 -1
  277. package/dist/cjs/parser/text/TextParser.js +0 -148
  278. package/dist/cjs/parser/text/TextParser.js.map +0 -1
  279. package/dist/cjs/parser/text/peg/TextPegParser.js +0 -7
  280. package/dist/cjs/parser/text/peg/TextPegParser.js.map +0 -1
  281. package/dist/cjs/utils/ArrayUtils.js +0 -43
  282. package/dist/cjs/utils/ArrayUtils.js.map +0 -1
  283. package/dist/cjs/utils/BitUtils.js +0 -75
  284. package/dist/cjs/utils/BitUtils.js.map +0 -1
  285. package/dist/cjs/utils/BooleanUtils.js +0 -62
  286. package/dist/cjs/utils/BooleanUtils.js.map +0 -1
  287. package/dist/cjs/utils/FileUtils.js +0 -75
  288. package/dist/cjs/utils/FileUtils.js.map +0 -1
  289. package/dist/cjs/utils/NumberUtils.js +0 -62
  290. package/dist/cjs/utils/NumberUtils.js.map +0 -1
  291. package/dist/cjs/utils/ObjectUtils.js +0 -417
  292. package/dist/cjs/utils/ObjectUtils.js.map +0 -1
  293. package/dist/cjs/utils/StringUtils.js +0 -183
  294. package/dist/cjs/utils/StringUtils.js.map +0 -1
  295. package/dist/cjs/utils/UrlUtils.js +0 -37
  296. package/dist/cjs/utils/UrlUtils.js.map +0 -1
  297. package/dist/cjs/utils/env/Env.js +0 -131
  298. package/dist/cjs/utils/env/Env.js.map +0 -1
  299. package/dist/cjs/utils/env/Environment.js +0 -15
  300. package/dist/cjs/utils/env/Environment.js.map +0 -1
  301. package/dist/cjs/utils/env/Os.js +0 -14
  302. package/dist/cjs/utils/env/Os.js.map +0 -1
  303. package/dist/cjs/utils/env/Version.js +0 -12
  304. package/dist/cjs/utils/env/Version.js.map +0 -1
  305. package/dist/cjs/utils/env/userAgent.js +0 -88
  306. package/dist/cjs/utils/env/userAgent.js.map +0 -1
  307. package/dist/cjs/utils/polyfill/fs.js +0 -14
  308. package/dist/cjs/utils/polyfill/fs.js.map +0 -1
  309. package/dist/esm/BitmarkParserGenerator.js +0 -735
  310. package/dist/esm/BitmarkParserGenerator.js.map +0 -1
  311. package/dist/esm/ast/Ast.js +0 -217
  312. package/dist/esm/ast/Ast.js.map +0 -1
  313. package/dist/esm/ast/BaseBuilder.js +0 -190
  314. package/dist/esm/ast/BaseBuilder.js.map +0 -1
  315. package/dist/esm/ast/Builder.js +0 -1782
  316. package/dist/esm/ast/Builder.js.map +0 -1
  317. package/dist/esm/ast/ResourceBuilder.js +0 -961
  318. package/dist/esm/ast/ResourceBuilder.js.map +0 -1
  319. package/dist/esm/ast/rules/NodeValidator.js +0 -181
  320. package/dist/esm/ast/rules/NodeValidator.js.map +0 -1
  321. package/dist/esm/ast/writer/FileWriter.js +0 -80
  322. package/dist/esm/ast/writer/FileWriter.js.map +0 -1
  323. package/dist/esm/ast/writer/StreamWriter.js +0 -83
  324. package/dist/esm/ast/writer/StreamWriter.js.map +0 -1
  325. package/dist/esm/ast/writer/StringWriter.js +0 -112
  326. package/dist/esm/ast/writer/StringWriter.js.map +0 -1
  327. package/dist/esm/ast/writer/Writer.js +0 -2
  328. package/dist/esm/ast/writer/Writer.js.map +0 -1
  329. package/dist/esm/breakscaping/Breakscape.js +0 -77
  330. package/dist/esm/breakscaping/Breakscape.js.map +0 -1
  331. package/dist/esm/breakscaping/BreakscapeLoop.js +0 -302
  332. package/dist/esm/breakscaping/BreakscapeLoop.js.map +0 -1
  333. package/dist/esm/breakscaping/BreakscapeOptions.js +0 -2
  334. package/dist/esm/breakscaping/BreakscapeOptions.js.map +0 -1
  335. package/dist/esm/breakscaping/BreakscapeRegex.js +0 -177
  336. package/dist/esm/breakscaping/BreakscapeRegex.js.map +0 -1
  337. package/dist/esm/breakscaping/RegexConfigs.js +0 -35
  338. package/dist/esm/breakscaping/RegexConfigs.js.map +0 -1
  339. package/dist/esm/config/Config.js +0 -349
  340. package/dist/esm/config/Config.js.map +0 -1
  341. package/dist/esm/config/ConfigHydrator.js +0 -158
  342. package/dist/esm/config/ConfigHydrator.js.map +0 -1
  343. package/dist/esm/config/raw/bits.js +0 -2612
  344. package/dist/esm/config/raw/bits.js.map +0 -1
  345. package/dist/esm/config/raw/cardSets.js +0 -546
  346. package/dist/esm/config/raw/cardSets.js.map +0 -1
  347. package/dist/esm/config/raw/groups.js +0 -1179
  348. package/dist/esm/config/raw/groups.js.map +0 -1
  349. package/dist/esm/config/raw/properties.js +0 -1003
  350. package/dist/esm/config/raw/properties.js.map +0 -1
  351. package/dist/esm/config/raw/resources.js +0 -100
  352. package/dist/esm/config/raw/resources.js.map +0 -1
  353. package/dist/esm/config/raw/tags.js +0 -45
  354. package/dist/esm/config/raw/tags.js.map +0 -1
  355. package/dist/esm/generated/build-info.js +0 -10
  356. package/dist/esm/generated/build-info.js.map +0 -1
  357. package/dist/esm/generated/parser/bitmark/bitmark-peggy-parser.js +0 -3163
  358. package/dist/esm/generated/parser/bitmark/bitmark-peggy-parser.js.map +0 -1
  359. package/dist/esm/generated/parser/text/text-peggy-parser.js +0 -9626
  360. package/dist/esm/generated/parser/text/text-peggy-parser.js.map +0 -1
  361. package/dist/esm/generator/AstWalkerGenerator.js +0 -83
  362. package/dist/esm/generator/AstWalkerGenerator.js.map +0 -1
  363. package/dist/esm/generator/Generator.js +0 -2
  364. package/dist/esm/generator/Generator.js.map +0 -1
  365. package/dist/esm/generator/bitmark/BitmarkFileGenerator.js +0 -46
  366. package/dist/esm/generator/bitmark/BitmarkFileGenerator.js.map +0 -1
  367. package/dist/esm/generator/bitmark/BitmarkGenerator.js +0 -2598
  368. package/dist/esm/generator/bitmark/BitmarkGenerator.js.map +0 -1
  369. package/dist/esm/generator/bitmark/BitmarkStringGenerator.js +0 -48
  370. package/dist/esm/generator/bitmark/BitmarkStringGenerator.js.map +0 -1
  371. package/dist/esm/generator/json/JsonFileGenerator.js +0 -50
  372. package/dist/esm/generator/json/JsonFileGenerator.js.map +0 -1
  373. package/dist/esm/generator/json/JsonGenerator.js +0 -1578
  374. package/dist/esm/generator/json/JsonGenerator.js.map +0 -1
  375. package/dist/esm/generator/json/JsonObjectGenerator.js +0 -48
  376. package/dist/esm/generator/json/JsonObjectGenerator.js.map +0 -1
  377. package/dist/esm/generator/json/JsonStringGenerator.js +0 -47
  378. package/dist/esm/generator/json/JsonStringGenerator.js.map +0 -1
  379. package/dist/esm/generator/text/TextGenerator.js +0 -1192
  380. package/dist/esm/generator/text/TextGenerator.js.map +0 -1
  381. package/dist/esm/index.js +0 -49
  382. package/dist/esm/index.js.map +0 -1
  383. package/dist/esm/info/InfoBuilder.js +0 -40
  384. package/dist/esm/info/InfoBuilder.js.map +0 -1
  385. package/dist/esm/init/init.js +0 -13
  386. package/dist/esm/init/init.js.map +0 -1
  387. package/dist/esm/model/ast/BreakscapedString.js +0 -2
  388. package/dist/esm/model/ast/BreakscapedString.js.map +0 -1
  389. package/dist/esm/model/ast/NodeType.js +0 -554
  390. package/dist/esm/model/ast/NodeType.js.map +0 -1
  391. package/dist/esm/model/ast/Nodes.js +0 -2
  392. package/dist/esm/model/ast/Nodes.js.map +0 -1
  393. package/dist/esm/model/ast/StardardString.js +0 -2
  394. package/dist/esm/model/ast/StardardString.js.map +0 -1
  395. package/dist/esm/model/ast/TextNodes.js +0 -2
  396. package/dist/esm/model/ast/TextNodes.js.map +0 -1
  397. package/dist/esm/model/config/AbstractTagConfig.js +0 -15
  398. package/dist/esm/model/config/AbstractTagConfig.js.map +0 -1
  399. package/dist/esm/model/config/BitConfig.js +0 -69
  400. package/dist/esm/model/config/BitConfig.js.map +0 -1
  401. package/dist/esm/model/config/CardSetConfig.js +0 -23
  402. package/dist/esm/model/config/CardSetConfig.js.map +0 -1
  403. package/dist/esm/model/config/CardVariantConfig.js +0 -29
  404. package/dist/esm/model/config/CardVariantConfig.js.map +0 -1
  405. package/dist/esm/model/config/MarkupTagConfig.js +0 -38
  406. package/dist/esm/model/config/MarkupTagConfig.js.map +0 -1
  407. package/dist/esm/model/config/PropertyTagConfig.js +0 -47
  408. package/dist/esm/model/config/PropertyTagConfig.js.map +0 -1
  409. package/dist/esm/model/config/ResourceTagConfig.js +0 -39
  410. package/dist/esm/model/config/ResourceTagConfig.js.map +0 -1
  411. package/dist/esm/model/config/ResourcesConfig.js +0 -28
  412. package/dist/esm/model/config/ResourcesConfig.js.map +0 -1
  413. package/dist/esm/model/config/TagConfig.js +0 -2
  414. package/dist/esm/model/config/TagConfig.js.map +0 -1
  415. package/dist/esm/model/config/TagsConfig.js +0 -2
  416. package/dist/esm/model/config/TagsConfig.js.map +0 -1
  417. package/dist/esm/model/config/TagsConfigWithInfo.js +0 -2
  418. package/dist/esm/model/config/TagsConfigWithInfo.js.map +0 -1
  419. package/dist/esm/model/config/_Config.js +0 -2
  420. package/dist/esm/model/config/_Config.js.map +0 -1
  421. package/dist/esm/model/config/enum/CardSetConfigKey.js +0 -25
  422. package/dist/esm/model/config/enum/CardSetConfigKey.js.map +0 -1
  423. package/dist/esm/model/config/enum/ConfigKey.js +0 -26
  424. package/dist/esm/model/config/enum/ConfigKey.js.map +0 -1
  425. package/dist/esm/model/config/enum/GroupConfigKey.js +0 -53
  426. package/dist/esm/model/config/enum/GroupConfigKey.js.map +0 -1
  427. package/dist/esm/model/config/enum/GroupConfigType.js +0 -11
  428. package/dist/esm/model/config/enum/GroupConfigType.js.map +0 -1
  429. package/dist/esm/model/config/enum/PropertyConfigKey.js +0 -211
  430. package/dist/esm/model/config/enum/PropertyConfigKey.js.map +0 -1
  431. package/dist/esm/model/config/enum/ResourceConfigKey.js +0 -36
  432. package/dist/esm/model/config/enum/ResourceConfigKey.js.map +0 -1
  433. package/dist/esm/model/config/enum/TagConfigKey.js +0 -22
  434. package/dist/esm/model/config/enum/TagConfigKey.js.map +0 -1
  435. package/dist/esm/model/enum/BitTagType.js +0 -10
  436. package/dist/esm/model/enum/BitTagType.js.map +0 -1
  437. package/dist/esm/model/enum/BitType.js +0 -573
  438. package/dist/esm/model/enum/BitType.js.map +0 -1
  439. package/dist/esm/model/enum/BitmarkGeneratorOutput.js +0 -2
  440. package/dist/esm/model/enum/BitmarkGeneratorOutput.js.map +0 -1
  441. package/dist/esm/model/enum/BitmarkParserType.js +0 -6
  442. package/dist/esm/model/enum/BitmarkParserType.js.map +0 -1
  443. package/dist/esm/model/enum/BitmarkVersion.js +0 -8
  444. package/dist/esm/model/enum/BitmarkVersion.js.map +0 -1
  445. package/dist/esm/model/enum/BodyBitType.js +0 -11
  446. package/dist/esm/model/enum/BodyBitType.js.map +0 -1
  447. package/dist/esm/model/enum/BodyTextFormat.js +0 -11
  448. package/dist/esm/model/enum/BodyTextFormat.js.map +0 -1
  449. package/dist/esm/model/enum/CardSetVersion.js +0 -7
  450. package/dist/esm/model/enum/CardSetVersion.js.map +0 -1
  451. package/dist/esm/model/enum/Count.js +0 -6
  452. package/dist/esm/model/enum/Count.js.map +0 -1
  453. package/dist/esm/model/enum/DeprecatedTextFormat.js +0 -6
  454. package/dist/esm/model/enum/DeprecatedTextFormat.js.map +0 -1
  455. package/dist/esm/model/enum/ExampleType.js +0 -8
  456. package/dist/esm/model/enum/ExampleType.js.map +0 -1
  457. package/dist/esm/model/enum/PropertyAstKey.js +0 -15
  458. package/dist/esm/model/enum/PropertyAstKey.js.map +0 -1
  459. package/dist/esm/model/enum/PropertyFormat.js +0 -11
  460. package/dist/esm/model/enum/PropertyFormat.js.map +0 -1
  461. package/dist/esm/model/enum/PropertyJsonKey.js +0 -11
  462. package/dist/esm/model/enum/PropertyJsonKey.js.map +0 -1
  463. package/dist/esm/model/enum/PropertyTag.js +0 -5
  464. package/dist/esm/model/enum/PropertyTag.js.map +0 -1
  465. package/dist/esm/model/enum/ResourceJsonKey.js +0 -24
  466. package/dist/esm/model/enum/ResourceJsonKey.js.map +0 -1
  467. package/dist/esm/model/enum/ResourceTag.js +0 -34
  468. package/dist/esm/model/enum/ResourceTag.js.map +0 -1
  469. package/dist/esm/model/enum/Tag.js +0 -18
  470. package/dist/esm/model/enum/Tag.js.map +0 -1
  471. package/dist/esm/model/enum/TextFormat.js +0 -13
  472. package/dist/esm/model/enum/TextFormat.js.map +0 -1
  473. package/dist/esm/model/enum/TextLocation.js +0 -12
  474. package/dist/esm/model/enum/TextLocation.js.map +0 -1
  475. package/dist/esm/model/enum/TextMarkType.js +0 -51
  476. package/dist/esm/model/enum/TextMarkType.js.map +0 -1
  477. package/dist/esm/model/enum/TextNodeType.js +0 -32
  478. package/dist/esm/model/enum/TextNodeType.js.map +0 -1
  479. package/dist/esm/model/enum/TextSection.js +0 -15
  480. package/dist/esm/model/enum/TextSection.js.map +0 -1
  481. package/dist/esm/model/info/enum/InfoFormat.js +0 -8
  482. package/dist/esm/model/info/enum/InfoFormat.js.map +0 -1
  483. package/dist/esm/model/info/enum/InfoType.js +0 -9
  484. package/dist/esm/model/info/enum/InfoType.js.map +0 -1
  485. package/dist/esm/model/json/BitJson.js +0 -2
  486. package/dist/esm/model/json/BitJson.js.map +0 -1
  487. package/dist/esm/model/json/BitWrapperJson.js +0 -2
  488. package/dist/esm/model/json/BitWrapperJson.js.map +0 -1
  489. package/dist/esm/model/json/BodyBitJson.js +0 -2
  490. package/dist/esm/model/json/BodyBitJson.js.map +0 -1
  491. package/dist/esm/model/json/ParserJson.js +0 -2
  492. package/dist/esm/model/json/ParserJson.js.map +0 -1
  493. package/dist/esm/model/json/ResourceJson.js +0 -2
  494. package/dist/esm/model/json/ResourceJson.js.map +0 -1
  495. package/dist/esm/model/parser/ParserData.js +0 -2
  496. package/dist/esm/model/parser/ParserData.js.map +0 -1
  497. package/dist/esm/model/parser/ParserError.js +0 -2
  498. package/dist/esm/model/parser/ParserError.js.map +0 -1
  499. package/dist/esm/model/parser/ParserInfo.js +0 -2
  500. package/dist/esm/model/parser/ParserInfo.js.map +0 -1
  501. package/dist/esm/model/parser/ParserLocation.js +0 -2
  502. package/dist/esm/model/parser/ParserLocation.js.map +0 -1
  503. package/dist/esm/model/parser/ParserLocationRange.js +0 -2
  504. package/dist/esm/model/parser/ParserLocationRange.js.map +0 -1
  505. package/dist/esm/model/parser/TagValidationData.js +0 -2
  506. package/dist/esm/model/parser/TagValidationData.js.map +0 -1
  507. package/dist/esm/parser/bitmark/BitmarkParser.js +0 -22
  508. package/dist/esm/parser/bitmark/BitmarkParser.js.map +0 -1
  509. package/dist/esm/parser/bitmark/peg/BitmarkPegParser.js +0 -4
  510. package/dist/esm/parser/bitmark/peg/BitmarkPegParser.js.map +0 -1
  511. package/dist/esm/parser/bitmark/peg/BitmarkPegParserHelper.js +0 -611
  512. package/dist/esm/parser/bitmark/peg/BitmarkPegParserHelper.js.map +0 -1
  513. package/dist/esm/parser/bitmark/peg/BitmarkPegParserProcessor.js +0 -713
  514. package/dist/esm/parser/bitmark/peg/BitmarkPegParserProcessor.js.map +0 -1
  515. package/dist/esm/parser/bitmark/peg/BitmarkPegParserTypes.js +0 -59
  516. package/dist/esm/parser/bitmark/peg/BitmarkPegParserTypes.js.map +0 -1
  517. package/dist/esm/parser/bitmark/peg/BitmarkPegParserValidator.js +0 -742
  518. package/dist/esm/parser/bitmark/peg/BitmarkPegParserValidator.js.map +0 -1
  519. package/dist/esm/parser/bitmark/peg/PeggyGrammarLocation.js +0 -79
  520. package/dist/esm/parser/bitmark/peg/PeggyGrammarLocation.js.map +0 -1
  521. package/dist/esm/parser/bitmark/peg/contentProcessors/BodyContentProcessor.js +0 -257
  522. package/dist/esm/parser/bitmark/peg/contentProcessors/BodyContentProcessor.js.map +0 -1
  523. package/dist/esm/parser/bitmark/peg/contentProcessors/BookChainContentProcessor.js +0 -48
  524. package/dist/esm/parser/bitmark/peg/contentProcessors/BookChainContentProcessor.js.map +0 -1
  525. package/dist/esm/parser/bitmark/peg/contentProcessors/CardContentProcessor.js +0 -883
  526. package/dist/esm/parser/bitmark/peg/contentProcessors/CardContentProcessor.js.map +0 -1
  527. package/dist/esm/parser/bitmark/peg/contentProcessors/ClozeTagContentProcessor.js +0 -25
  528. package/dist/esm/parser/bitmark/peg/contentProcessors/ClozeTagContentProcessor.js.map +0 -1
  529. package/dist/esm/parser/bitmark/peg/contentProcessors/ContentProcessorUtils.js +0 -58
  530. package/dist/esm/parser/bitmark/peg/contentProcessors/ContentProcessorUtils.js.map +0 -1
  531. package/dist/esm/parser/bitmark/peg/contentProcessors/DefaultTagContentProcessor.js +0 -61
  532. package/dist/esm/parser/bitmark/peg/contentProcessors/DefaultTagContentProcessor.js.map +0 -1
  533. package/dist/esm/parser/bitmark/peg/contentProcessors/ExampleTagContentProcessor.js +0 -159
  534. package/dist/esm/parser/bitmark/peg/contentProcessors/ExampleTagContentProcessor.js.map +0 -1
  535. package/dist/esm/parser/bitmark/peg/contentProcessors/FooterContentProcessor.js +0 -52
  536. package/dist/esm/parser/bitmark/peg/contentProcessors/FooterContentProcessor.js.map +0 -1
  537. package/dist/esm/parser/bitmark/peg/contentProcessors/GapChainContentProcessor.js +0 -29
  538. package/dist/esm/parser/bitmark/peg/contentProcessors/GapChainContentProcessor.js.map +0 -1
  539. package/dist/esm/parser/bitmark/peg/contentProcessors/ImageSourceChainContentProcessor.js +0 -57
  540. package/dist/esm/parser/bitmark/peg/contentProcessors/ImageSourceChainContentProcessor.js.map +0 -1
  541. package/dist/esm/parser/bitmark/peg/contentProcessors/InternalCommentTagContentProcessor.js +0 -14
  542. package/dist/esm/parser/bitmark/peg/contentProcessors/InternalCommentTagContentProcessor.js.map +0 -1
  543. package/dist/esm/parser/bitmark/peg/contentProcessors/ItemLeadChainContentProcessor.js +0 -27
  544. package/dist/esm/parser/bitmark/peg/contentProcessors/ItemLeadChainContentProcessor.js.map +0 -1
  545. package/dist/esm/parser/bitmark/peg/contentProcessors/ItemLeadTagContentProcessor.js +0 -18
  546. package/dist/esm/parser/bitmark/peg/contentProcessors/ItemLeadTagContentProcessor.js.map +0 -1
  547. package/dist/esm/parser/bitmark/peg/contentProcessors/MarkChainContentProcessor.js +0 -43
  548. package/dist/esm/parser/bitmark/peg/contentProcessors/MarkChainContentProcessor.js.map +0 -1
  549. package/dist/esm/parser/bitmark/peg/contentProcessors/MarkConfigChainContentProcessor.js +0 -42
  550. package/dist/esm/parser/bitmark/peg/contentProcessors/MarkConfigChainContentProcessor.js.map +0 -1
  551. package/dist/esm/parser/bitmark/peg/contentProcessors/MarkTagContentProcessor.js +0 -9
  552. package/dist/esm/parser/bitmark/peg/contentProcessors/MarkTagContentProcessor.js.map +0 -1
  553. package/dist/esm/parser/bitmark/peg/contentProcessors/PersonChainContentProcessor.js +0 -55
  554. package/dist/esm/parser/bitmark/peg/contentProcessors/PersonChainContentProcessor.js.map +0 -1
  555. package/dist/esm/parser/bitmark/peg/contentProcessors/PropertyContentProcessor.js +0 -156
  556. package/dist/esm/parser/bitmark/peg/contentProcessors/PropertyContentProcessor.js.map +0 -1
  557. package/dist/esm/parser/bitmark/peg/contentProcessors/RatingLevelChainContentProcessor.js +0 -35
  558. package/dist/esm/parser/bitmark/peg/contentProcessors/RatingLevelChainContentProcessor.js.map +0 -1
  559. package/dist/esm/parser/bitmark/peg/contentProcessors/ReferenceTagContentProcessor.js +0 -22
  560. package/dist/esm/parser/bitmark/peg/contentProcessors/ReferenceTagContentProcessor.js.map +0 -1
  561. package/dist/esm/parser/bitmark/peg/contentProcessors/ResourceContentProcessor.js +0 -160
  562. package/dist/esm/parser/bitmark/peg/contentProcessors/ResourceContentProcessor.js.map +0 -1
  563. package/dist/esm/parser/bitmark/peg/contentProcessors/ServingsChainContentProcessor.js +0 -25
  564. package/dist/esm/parser/bitmark/peg/contentProcessors/ServingsChainContentProcessor.js.map +0 -1
  565. package/dist/esm/parser/bitmark/peg/contentProcessors/TechnicalTermChainContentProcessor.js +0 -26
  566. package/dist/esm/parser/bitmark/peg/contentProcessors/TechnicalTermChainContentProcessor.js.map +0 -1
  567. package/dist/esm/parser/bitmark/peg/contentProcessors/TitleTagContentProcessor.js +0 -50
  568. package/dist/esm/parser/bitmark/peg/contentProcessors/TitleTagContentProcessor.js.map +0 -1
  569. package/dist/esm/parser/bitmark/peg/contentProcessors/TrueFalseChainContentProcessor.js +0 -201
  570. package/dist/esm/parser/bitmark/peg/contentProcessors/TrueFalseChainContentProcessor.js.map +0 -1
  571. package/dist/esm/parser/bitmark/peg/contentProcessors/TrueFalseTagContentProcessor.js +0 -22
  572. package/dist/esm/parser/bitmark/peg/contentProcessors/TrueFalseTagContentProcessor.js.map +0 -1
  573. package/dist/esm/parser/json/JsonParser.js +0 -267
  574. package/dist/esm/parser/json/JsonParser.js.map +0 -1
  575. package/dist/esm/parser/text/TextParser.js +0 -145
  576. package/dist/esm/parser/text/TextParser.js.map +0 -1
  577. package/dist/esm/parser/text/peg/TextPegParser.js +0 -4
  578. package/dist/esm/parser/text/peg/TextPegParser.js.map +0 -1
  579. package/dist/esm/utils/ArrayUtils.js +0 -40
  580. package/dist/esm/utils/ArrayUtils.js.map +0 -1
  581. package/dist/esm/utils/BitUtils.js +0 -72
  582. package/dist/esm/utils/BitUtils.js.map +0 -1
  583. package/dist/esm/utils/BooleanUtils.js +0 -59
  584. package/dist/esm/utils/BooleanUtils.js.map +0 -1
  585. package/dist/esm/utils/FileUtils.js +0 -36
  586. package/dist/esm/utils/FileUtils.js.map +0 -1
  587. package/dist/esm/utils/NumberUtils.js +0 -59
  588. package/dist/esm/utils/NumberUtils.js.map +0 -1
  589. package/dist/esm/utils/ObjectUtils.js +0 -411
  590. package/dist/esm/utils/ObjectUtils.js.map +0 -1
  591. package/dist/esm/utils/StringUtils.js +0 -180
  592. package/dist/esm/utils/StringUtils.js.map +0 -1
  593. package/dist/esm/utils/UrlUtils.js +0 -34
  594. package/dist/esm/utils/UrlUtils.js.map +0 -1
  595. package/dist/esm/utils/env/Env.js +0 -127
  596. package/dist/esm/utils/env/Env.js.map +0 -1
  597. package/dist/esm/utils/env/Environment.js +0 -12
  598. package/dist/esm/utils/env/Environment.js.map +0 -1
  599. package/dist/esm/utils/env/Os.js +0 -11
  600. package/dist/esm/utils/env/Os.js.map +0 -1
  601. package/dist/esm/utils/env/Version.js +0 -9
  602. package/dist/esm/utils/env/Version.js.map +0 -1
  603. package/dist/esm/utils/env/userAgent.js +0 -86
  604. package/dist/esm/utils/env/userAgent.js.map +0 -1
  605. package/dist/esm/utils/polyfill/fs.js +0 -10
  606. package/dist/esm/utils/polyfill/fs.js.map +0 -1
  607. package/dist/types/BitmarkParserGenerator.d.ts +0 -478
  608. package/dist/types/BitmarkParserGenerator.d.ts.map +0 -1
  609. package/dist/types/ast/Ast.d.ts +0 -137
  610. package/dist/types/ast/Ast.d.ts.map +0 -1
  611. package/dist/types/ast/BaseBuilder.d.ts +0 -64
  612. package/dist/types/ast/BaseBuilder.d.ts.map +0 -1
  613. package/dist/types/ast/Builder.d.ts +0 -692
  614. package/dist/types/ast/Builder.d.ts.map +0 -1
  615. package/dist/types/ast/ResourceBuilder.d.ts +0 -384
  616. package/dist/types/ast/ResourceBuilder.d.ts.map +0 -1
  617. package/dist/types/ast/rules/NodeValidator.d.ts +0 -28
  618. package/dist/types/ast/rules/NodeValidator.d.ts.map +0 -1
  619. package/dist/types/ast/writer/FileWriter.d.ts +0 -37
  620. package/dist/types/ast/writer/FileWriter.d.ts.map +0 -1
  621. package/dist/types/ast/writer/StreamWriter.d.ts +0 -29
  622. package/dist/types/ast/writer/StreamWriter.d.ts.map +0 -1
  623. package/dist/types/ast/writer/StringWriter.d.ts +0 -30
  624. package/dist/types/ast/writer/StringWriter.d.ts.map +0 -1
  625. package/dist/types/ast/writer/Writer.d.ts +0 -72
  626. package/dist/types/ast/writer/Writer.d.ts.map +0 -1
  627. package/dist/types/breakscaping/Breakscape.d.ts +0 -44
  628. package/dist/types/breakscaping/Breakscape.d.ts.map +0 -1
  629. package/dist/types/breakscaping/BreakscapeLoop.d.ts +0 -142
  630. package/dist/types/breakscaping/BreakscapeLoop.d.ts.map +0 -1
  631. package/dist/types/breakscaping/BreakscapeOptions.d.ts +0 -30
  632. package/dist/types/breakscaping/BreakscapeOptions.d.ts.map +0 -1
  633. package/dist/types/breakscaping/BreakscapeRegex.d.ts +0 -96
  634. package/dist/types/breakscaping/BreakscapeRegex.d.ts.map +0 -1
  635. package/dist/types/breakscaping/RegexConfigs.d.ts +0 -35
  636. package/dist/types/breakscaping/RegexConfigs.d.ts.map +0 -1
  637. package/dist/types/config/Config.d.ts +0 -115
  638. package/dist/types/config/Config.d.ts.map +0 -1
  639. package/dist/types/config/ConfigHydrator.d.ts +0 -16
  640. package/dist/types/config/ConfigHydrator.d.ts.map +0 -1
  641. package/dist/types/config/raw/bits.d.ts +0 -4
  642. package/dist/types/config/raw/bits.d.ts.map +0 -1
  643. package/dist/types/config/raw/cardSets.d.ts +0 -4
  644. package/dist/types/config/raw/cardSets.d.ts.map +0 -1
  645. package/dist/types/config/raw/groups.d.ts +0 -4
  646. package/dist/types/config/raw/groups.d.ts.map +0 -1
  647. package/dist/types/config/raw/properties.d.ts +0 -4
  648. package/dist/types/config/raw/properties.d.ts.map +0 -1
  649. package/dist/types/config/raw/resources.d.ts +0 -4
  650. package/dist/types/config/raw/resources.d.ts.map +0 -1
  651. package/dist/types/config/raw/tags.d.ts +0 -4
  652. package/dist/types/config/raw/tags.d.ts.map +0 -1
  653. package/dist/types/generated/build-info.d.ts +0 -8
  654. package/dist/types/generated/build-info.d.ts.map +0 -1
  655. package/dist/types/generated/parser/bitmark/bitmark-peggy-parser.d.ts +0 -12
  656. package/dist/types/generated/parser/bitmark/bitmark-peggy-parser.d.ts.map +0 -1
  657. package/dist/types/generated/parser/text/text-peggy-parser.d.ts +0 -12
  658. package/dist/types/generated/parser/text/text-peggy-parser.d.ts.map +0 -1
  659. package/dist/types/generator/AstWalkerGenerator.d.ts +0 -32
  660. package/dist/types/generator/AstWalkerGenerator.d.ts.map +0 -1
  661. package/dist/types/generator/Generator.d.ts +0 -6
  662. package/dist/types/generator/Generator.d.ts.map +0 -1
  663. package/dist/types/generator/bitmark/BitmarkFileGenerator.d.ts +0 -41
  664. package/dist/types/generator/bitmark/BitmarkFileGenerator.d.ts.map +0 -1
  665. package/dist/types/generator/bitmark/BitmarkGenerator.d.ts +0 -401
  666. package/dist/types/generator/bitmark/BitmarkGenerator.d.ts.map +0 -1
  667. package/dist/types/generator/bitmark/BitmarkStringGenerator.d.ts +0 -31
  668. package/dist/types/generator/bitmark/BitmarkStringGenerator.d.ts.map +0 -1
  669. package/dist/types/generator/json/JsonFileGenerator.d.ts +0 -45
  670. package/dist/types/generator/json/JsonFileGenerator.d.ts.map +0 -1
  671. package/dist/types/generator/json/JsonGenerator.d.ts +0 -357
  672. package/dist/types/generator/json/JsonGenerator.d.ts.map +0 -1
  673. package/dist/types/generator/json/JsonObjectGenerator.d.ts +0 -32
  674. package/dist/types/generator/json/JsonObjectGenerator.d.ts.map +0 -1
  675. package/dist/types/generator/json/JsonStringGenerator.d.ts +0 -30
  676. package/dist/types/generator/json/JsonStringGenerator.d.ts.map +0 -1
  677. package/dist/types/generator/text/TextGenerator.d.ts +0 -228
  678. package/dist/types/generator/text/TextGenerator.d.ts.map +0 -1
  679. package/dist/types/index.d.ts +0 -50
  680. package/dist/types/index.d.ts.map +0 -1
  681. package/dist/types/info/InfoBuilder.d.ts +0 -18
  682. package/dist/types/info/InfoBuilder.d.ts.map +0 -1
  683. package/dist/types/init/init.d.ts +0 -4
  684. package/dist/types/init/init.d.ts.map +0 -1
  685. package/dist/types/model/ast/BreakscapedString.d.ts +0 -4
  686. package/dist/types/model/ast/BreakscapedString.d.ts.map +0 -1
  687. package/dist/types/model/ast/NodeType.d.ts +0 -1093
  688. package/dist/types/model/ast/NodeType.d.ts.map +0 -1
  689. package/dist/types/model/ast/Nodes.d.ts +0 -268
  690. package/dist/types/model/ast/Nodes.d.ts.map +0 -1
  691. package/dist/types/model/ast/StardardString.d.ts +0 -4
  692. package/dist/types/model/ast/StardardString.d.ts.map +0 -1
  693. package/dist/types/model/ast/TextNodes.d.ts +0 -130
  694. package/dist/types/model/ast/TextNodes.d.ts.map +0 -1
  695. package/dist/types/model/config/AbstractTagConfig.d.ts +0 -24
  696. package/dist/types/model/config/AbstractTagConfig.d.ts.map +0 -1
  697. package/dist/types/model/config/BitConfig.d.ts +0 -48
  698. package/dist/types/model/config/BitConfig.d.ts.map +0 -1
  699. package/dist/types/model/config/CardSetConfig.d.ts +0 -14
  700. package/dist/types/model/config/CardSetConfig.d.ts.map +0 -1
  701. package/dist/types/model/config/CardVariantConfig.d.ts +0 -16
  702. package/dist/types/model/config/CardVariantConfig.d.ts.map +0 -1
  703. package/dist/types/model/config/MarkupTagConfig.d.ts +0 -17
  704. package/dist/types/model/config/MarkupTagConfig.d.ts.map +0 -1
  705. package/dist/types/model/config/PropertyTagConfig.d.ts +0 -23
  706. package/dist/types/model/config/PropertyTagConfig.d.ts.map +0 -1
  707. package/dist/types/model/config/ResourceTagConfig.d.ts +0 -18
  708. package/dist/types/model/config/ResourceTagConfig.d.ts.map +0 -1
  709. package/dist/types/model/config/ResourcesConfig.d.ts +0 -14
  710. package/dist/types/model/config/ResourcesConfig.d.ts.map +0 -1
  711. package/dist/types/model/config/TagConfig.d.ts +0 -5
  712. package/dist/types/model/config/TagConfig.d.ts.map +0 -1
  713. package/dist/types/model/config/TagsConfig.d.ts +0 -5
  714. package/dist/types/model/config/TagsConfig.d.ts.map +0 -1
  715. package/dist/types/model/config/TagsConfigWithInfo.d.ts +0 -9
  716. package/dist/types/model/config/TagsConfigWithInfo.d.ts.map +0 -1
  717. package/dist/types/model/config/_Config.d.ts +0 -119
  718. package/dist/types/model/config/_Config.d.ts.map +0 -1
  719. package/dist/types/model/config/enum/CardSetConfigKey.d.ts +0 -43
  720. package/dist/types/model/config/enum/CardSetConfigKey.d.ts.map +0 -1
  721. package/dist/types/model/config/enum/ConfigKey.d.ts +0 -578
  722. package/dist/types/model/config/enum/ConfigKey.d.ts.map +0 -1
  723. package/dist/types/model/config/enum/GroupConfigKey.d.ts +0 -144
  724. package/dist/types/model/config/enum/GroupConfigKey.d.ts.map +0 -1
  725. package/dist/types/model/config/enum/GroupConfigType.d.ts +0 -16
  726. package/dist/types/model/config/enum/GroupConfigType.d.ts.map +0 -1
  727. package/dist/types/model/config/enum/PropertyConfigKey.d.ts +0 -618
  728. package/dist/types/model/config/enum/PropertyConfigKey.d.ts.map +0 -1
  729. package/dist/types/model/config/enum/ResourceConfigKey.d.ts +0 -87
  730. package/dist/types/model/config/enum/ResourceConfigKey.d.ts.map +0 -1
  731. package/dist/types/model/config/enum/TagConfigKey.d.ts +0 -51
  732. package/dist/types/model/config/enum/TagConfigKey.d.ts.map +0 -1
  733. package/dist/types/model/enum/BitTagType.d.ts +0 -15
  734. package/dist/types/model/enum/BitTagType.d.ts.map +0 -1
  735. package/dist/types/model/enum/BitType.d.ts +0 -1143
  736. package/dist/types/model/enum/BitType.d.ts.map +0 -1
  737. package/dist/types/model/enum/BitmarkGeneratorOutput.d.ts +0 -1
  738. package/dist/types/model/enum/BitmarkGeneratorOutput.d.ts.map +0 -1
  739. package/dist/types/model/enum/BitmarkParserType.d.ts +0 -7
  740. package/dist/types/model/enum/BitmarkParserType.d.ts.map +0 -1
  741. package/dist/types/model/enum/BitmarkVersion.d.ts +0 -12
  742. package/dist/types/model/enum/BitmarkVersion.d.ts.map +0 -1
  743. package/dist/types/model/enum/BodyBitType.d.ts +0 -25
  744. package/dist/types/model/enum/BodyBitType.d.ts.map +0 -1
  745. package/dist/types/model/enum/BodyTextFormat.d.ts +0 -17
  746. package/dist/types/model/enum/BodyTextFormat.d.ts.map +0 -1
  747. package/dist/types/model/enum/CardSetVersion.d.ts +0 -11
  748. package/dist/types/model/enum/CardSetVersion.d.ts.map +0 -1
  749. package/dist/types/model/enum/Count.d.ts +0 -7
  750. package/dist/types/model/enum/Count.d.ts.map +0 -1
  751. package/dist/types/model/enum/DeprecatedTextFormat.d.ts +0 -7
  752. package/dist/types/model/enum/DeprecatedTextFormat.d.ts.map +0 -1
  753. package/dist/types/model/enum/ExampleType.d.ts +0 -13
  754. package/dist/types/model/enum/ExampleType.d.ts.map +0 -1
  755. package/dist/types/model/enum/PropertyAstKey.d.ts +0 -22
  756. package/dist/types/model/enum/PropertyAstKey.d.ts.map +0 -1
  757. package/dist/types/model/enum/PropertyFormat.d.ts +0 -19
  758. package/dist/types/model/enum/PropertyFormat.d.ts.map +0 -1
  759. package/dist/types/model/enum/PropertyJsonKey.d.ts +0 -10
  760. package/dist/types/model/enum/PropertyJsonKey.d.ts.map +0 -1
  761. package/dist/types/model/enum/PropertyTag.d.ts +0 -419
  762. package/dist/types/model/enum/PropertyTag.d.ts.map +0 -1
  763. package/dist/types/model/enum/ResourceJsonKey.d.ts +0 -45
  764. package/dist/types/model/enum/ResourceJsonKey.d.ts.map +0 -1
  765. package/dist/types/model/enum/ResourceTag.d.ts +0 -63
  766. package/dist/types/model/enum/ResourceTag.d.ts.map +0 -1
  767. package/dist/types/model/enum/Tag.d.ts +0 -33
  768. package/dist/types/model/enum/Tag.d.ts.map +0 -1
  769. package/dist/types/model/enum/TextFormat.d.ts +0 -17
  770. package/dist/types/model/enum/TextFormat.d.ts.map +0 -1
  771. package/dist/types/model/enum/TextLocation.d.ts +0 -16
  772. package/dist/types/model/enum/TextLocation.d.ts.map +0 -1
  773. package/dist/types/model/enum/TextMarkType.d.ts +0 -93
  774. package/dist/types/model/enum/TextMarkType.d.ts.map +0 -1
  775. package/dist/types/model/enum/TextNodeType.d.ts +0 -53
  776. package/dist/types/model/enum/TextNodeType.d.ts.map +0 -1
  777. package/dist/types/model/enum/TextSection.d.ts +0 -27
  778. package/dist/types/model/enum/TextSection.d.ts.map +0 -1
  779. package/dist/types/model/info/enum/InfoFormat.d.ts +0 -13
  780. package/dist/types/model/info/enum/InfoFormat.d.ts.map +0 -1
  781. package/dist/types/model/info/enum/InfoType.d.ts +0 -15
  782. package/dist/types/model/info/enum/InfoType.d.ts.map +0 -1
  783. package/dist/types/model/json/BitJson.d.ts +0 -479
  784. package/dist/types/model/json/BitJson.d.ts.map +0 -1
  785. package/dist/types/model/json/BitWrapperJson.d.ts +0 -8
  786. package/dist/types/model/json/BitWrapperJson.d.ts.map +0 -1
  787. package/dist/types/model/json/BodyBitJson.d.ts +0 -81
  788. package/dist/types/model/json/BodyBitJson.d.ts.map +0 -1
  789. package/dist/types/model/json/ParserJson.d.ts +0 -12
  790. package/dist/types/model/json/ParserJson.d.ts.map +0 -1
  791. package/dist/types/model/json/ResourceJson.d.ts +0 -244
  792. package/dist/types/model/json/ResourceJson.d.ts.map +0 -1
  793. package/dist/types/model/parser/ParserData.d.ts +0 -11
  794. package/dist/types/model/parser/ParserData.d.ts.map +0 -1
  795. package/dist/types/model/parser/ParserError.d.ts +0 -17
  796. package/dist/types/model/parser/ParserError.d.ts.map +0 -1
  797. package/dist/types/model/parser/ParserInfo.d.ts +0 -10
  798. package/dist/types/model/parser/ParserInfo.d.ts.map +0 -1
  799. package/dist/types/model/parser/ParserLocation.d.ts +0 -6
  800. package/dist/types/model/parser/ParserLocation.d.ts.map +0 -1
  801. package/dist/types/model/parser/ParserLocationRange.d.ts +0 -10
  802. package/dist/types/model/parser/ParserLocationRange.d.ts.map +0 -1
  803. package/dist/types/model/parser/TagValidationData.d.ts +0 -24
  804. package/dist/types/model/parser/TagValidationData.d.ts.map +0 -1
  805. package/dist/types/parser/bitmark/BitmarkParser.d.ts +0 -21
  806. package/dist/types/parser/bitmark/BitmarkParser.d.ts.map +0 -1
  807. package/dist/types/parser/bitmark/peg/BitmarkPegParser.d.ts +0 -8
  808. package/dist/types/parser/bitmark/peg/BitmarkPegParser.d.ts.map +0 -1
  809. package/dist/types/parser/bitmark/peg/BitmarkPegParserHelper.d.ts +0 -108
  810. package/dist/types/parser/bitmark/peg/BitmarkPegParserHelper.d.ts.map +0 -1
  811. package/dist/types/parser/bitmark/peg/BitmarkPegParserProcessor.d.ts +0 -137
  812. package/dist/types/parser/bitmark/peg/BitmarkPegParserProcessor.d.ts.map +0 -1
  813. package/dist/types/parser/bitmark/peg/BitmarkPegParserTypes.d.ts +0 -333
  814. package/dist/types/parser/bitmark/peg/BitmarkPegParserTypes.d.ts.map +0 -1
  815. package/dist/types/parser/bitmark/peg/BitmarkPegParserValidator.d.ts +0 -186
  816. package/dist/types/parser/bitmark/peg/BitmarkPegParserValidator.d.ts.map +0 -1
  817. package/dist/types/parser/bitmark/peg/PeggyGrammarLocation.d.ts +0 -61
  818. package/dist/types/parser/bitmark/peg/PeggyGrammarLocation.d.ts.map +0 -1
  819. package/dist/types/parser/bitmark/peg/contentProcessors/BodyContentProcessor.d.ts +0 -37
  820. package/dist/types/parser/bitmark/peg/contentProcessors/BodyContentProcessor.d.ts.map +0 -1
  821. package/dist/types/parser/bitmark/peg/contentProcessors/BookChainContentProcessor.d.ts +0 -5
  822. package/dist/types/parser/bitmark/peg/contentProcessors/BookChainContentProcessor.d.ts.map +0 -1
  823. package/dist/types/parser/bitmark/peg/contentProcessors/CardContentProcessor.d.ts +0 -7
  824. package/dist/types/parser/bitmark/peg/contentProcessors/CardContentProcessor.d.ts.map +0 -1
  825. package/dist/types/parser/bitmark/peg/contentProcessors/ClozeTagContentProcessor.d.ts +0 -5
  826. package/dist/types/parser/bitmark/peg/contentProcessors/ClozeTagContentProcessor.d.ts.map +0 -1
  827. package/dist/types/parser/bitmark/peg/contentProcessors/ContentProcessorUtils.d.ts +0 -15
  828. package/dist/types/parser/bitmark/peg/contentProcessors/ContentProcessorUtils.d.ts.map +0 -1
  829. package/dist/types/parser/bitmark/peg/contentProcessors/DefaultTagContentProcessor.d.ts +0 -5
  830. package/dist/types/parser/bitmark/peg/contentProcessors/DefaultTagContentProcessor.d.ts.map +0 -1
  831. package/dist/types/parser/bitmark/peg/contentProcessors/ExampleTagContentProcessor.d.ts +0 -4
  832. package/dist/types/parser/bitmark/peg/contentProcessors/ExampleTagContentProcessor.d.ts.map +0 -1
  833. package/dist/types/parser/bitmark/peg/contentProcessors/FooterContentProcessor.d.ts +0 -14
  834. package/dist/types/parser/bitmark/peg/contentProcessors/FooterContentProcessor.d.ts.map +0 -1
  835. package/dist/types/parser/bitmark/peg/contentProcessors/GapChainContentProcessor.d.ts +0 -6
  836. package/dist/types/parser/bitmark/peg/contentProcessors/GapChainContentProcessor.d.ts.map +0 -1
  837. package/dist/types/parser/bitmark/peg/contentProcessors/ImageSourceChainContentProcessor.d.ts +0 -5
  838. package/dist/types/parser/bitmark/peg/contentProcessors/ImageSourceChainContentProcessor.d.ts.map +0 -1
  839. package/dist/types/parser/bitmark/peg/contentProcessors/InternalCommentTagContentProcessor.d.ts +0 -4
  840. package/dist/types/parser/bitmark/peg/contentProcessors/InternalCommentTagContentProcessor.d.ts.map +0 -1
  841. package/dist/types/parser/bitmark/peg/contentProcessors/ItemLeadChainContentProcessor.d.ts +0 -5
  842. package/dist/types/parser/bitmark/peg/contentProcessors/ItemLeadChainContentProcessor.d.ts.map +0 -1
  843. package/dist/types/parser/bitmark/peg/contentProcessors/ItemLeadTagContentProcessor.d.ts +0 -5
  844. package/dist/types/parser/bitmark/peg/contentProcessors/ItemLeadTagContentProcessor.d.ts.map +0 -1
  845. package/dist/types/parser/bitmark/peg/contentProcessors/MarkChainContentProcessor.d.ts +0 -6
  846. package/dist/types/parser/bitmark/peg/contentProcessors/MarkChainContentProcessor.d.ts.map +0 -1
  847. package/dist/types/parser/bitmark/peg/contentProcessors/MarkConfigChainContentProcessor.d.ts +0 -5
  848. package/dist/types/parser/bitmark/peg/contentProcessors/MarkConfigChainContentProcessor.d.ts.map +0 -1
  849. package/dist/types/parser/bitmark/peg/contentProcessors/MarkTagContentProcessor.d.ts +0 -4
  850. package/dist/types/parser/bitmark/peg/contentProcessors/MarkTagContentProcessor.d.ts.map +0 -1
  851. package/dist/types/parser/bitmark/peg/contentProcessors/PersonChainContentProcessor.d.ts +0 -5
  852. package/dist/types/parser/bitmark/peg/contentProcessors/PersonChainContentProcessor.d.ts.map +0 -1
  853. package/dist/types/parser/bitmark/peg/contentProcessors/PropertyContentProcessor.d.ts +0 -5
  854. package/dist/types/parser/bitmark/peg/contentProcessors/PropertyContentProcessor.d.ts.map +0 -1
  855. package/dist/types/parser/bitmark/peg/contentProcessors/RatingLevelChainContentProcessor.d.ts +0 -5
  856. package/dist/types/parser/bitmark/peg/contentProcessors/RatingLevelChainContentProcessor.d.ts.map +0 -1
  857. package/dist/types/parser/bitmark/peg/contentProcessors/ReferenceTagContentProcessor.d.ts +0 -5
  858. package/dist/types/parser/bitmark/peg/contentProcessors/ReferenceTagContentProcessor.d.ts.map +0 -1
  859. package/dist/types/parser/bitmark/peg/contentProcessors/ResourceContentProcessor.d.ts +0 -14
  860. package/dist/types/parser/bitmark/peg/contentProcessors/ResourceContentProcessor.d.ts.map +0 -1
  861. package/dist/types/parser/bitmark/peg/contentProcessors/ServingsChainContentProcessor.d.ts +0 -5
  862. package/dist/types/parser/bitmark/peg/contentProcessors/ServingsChainContentProcessor.d.ts.map +0 -1
  863. package/dist/types/parser/bitmark/peg/contentProcessors/TechnicalTermChainContentProcessor.d.ts +0 -5
  864. package/dist/types/parser/bitmark/peg/contentProcessors/TechnicalTermChainContentProcessor.d.ts.map +0 -1
  865. package/dist/types/parser/bitmark/peg/contentProcessors/TitleTagContentProcessor.d.ts +0 -11
  866. package/dist/types/parser/bitmark/peg/contentProcessors/TitleTagContentProcessor.d.ts.map +0 -1
  867. package/dist/types/parser/bitmark/peg/contentProcessors/TrueFalseChainContentProcessor.d.ts +0 -6
  868. package/dist/types/parser/bitmark/peg/contentProcessors/TrueFalseChainContentProcessor.d.ts.map +0 -1
  869. package/dist/types/parser/bitmark/peg/contentProcessors/TrueFalseTagContentProcessor.d.ts +0 -4
  870. package/dist/types/parser/bitmark/peg/contentProcessors/TrueFalseTagContentProcessor.d.ts.map +0 -1
  871. package/dist/types/parser/json/JsonParser.d.ts +0 -59
  872. package/dist/types/parser/json/JsonParser.d.ts.map +0 -1
  873. package/dist/types/parser/text/TextParser.d.ts +0 -55
  874. package/dist/types/parser/text/TextParser.d.ts.map +0 -1
  875. package/dist/types/parser/text/peg/TextPegParser.d.ts +0 -8
  876. package/dist/types/parser/text/peg/TextPegParser.d.ts.map +0 -1
  877. package/dist/types/utils/ArrayUtils.d.ts +0 -25
  878. package/dist/types/utils/ArrayUtils.d.ts.map +0 -1
  879. package/dist/types/utils/BitUtils.d.ts +0 -30
  880. package/dist/types/utils/BitUtils.d.ts.map +0 -1
  881. package/dist/types/utils/BooleanUtils.d.ts +0 -30
  882. package/dist/types/utils/BooleanUtils.d.ts.map +0 -1
  883. package/dist/types/utils/FileUtils.d.ts +0 -12
  884. package/dist/types/utils/FileUtils.d.ts.map +0 -1
  885. package/dist/types/utils/NumberUtils.d.ts +0 -47
  886. package/dist/types/utils/NumberUtils.d.ts.map +0 -1
  887. package/dist/types/utils/ObjectUtils.d.ts +0 -197
  888. package/dist/types/utils/ObjectUtils.d.ts.map +0 -1
  889. package/dist/types/utils/StringUtils.d.ts +0 -77
  890. package/dist/types/utils/StringUtils.d.ts.map +0 -1
  891. package/dist/types/utils/UrlUtils.d.ts +0 -7
  892. package/dist/types/utils/UrlUtils.d.ts.map +0 -1
  893. package/dist/types/utils/env/Env.d.ts +0 -39
  894. package/dist/types/utils/env/Env.d.ts.map +0 -1
  895. package/dist/types/utils/env/Environment.d.ts +0 -21
  896. package/dist/types/utils/env/Environment.d.ts.map +0 -1
  897. package/dist/types/utils/env/Os.d.ts +0 -19
  898. package/dist/types/utils/env/Os.d.ts.map +0 -1
  899. package/dist/types/utils/env/Version.d.ts +0 -10
  900. package/dist/types/utils/env/Version.d.ts.map +0 -1
  901. package/dist/types/utils/env/userAgent.d.ts +0 -11
  902. package/dist/types/utils/env/userAgent.d.ts.map +0 -1
  903. package/dist/types/utils/polyfill/fs.d.ts +0 -6
  904. package/dist/types/utils/polyfill/fs.d.ts.map +0 -1
@@ -1,1782 +0,0 @@
1
- import structuredClone from '@ungap/structured-clone';
2
- import { Breakscape } from '../breakscaping/Breakscape';
3
- import { Config } from '../config/Config';
4
- import { PropertyConfigKey } from '../model/config/enum/PropertyConfigKey';
5
- import { BitType } from '../model/enum/BitType';
6
- import { BodyBitType } from '../model/enum/BodyBitType';
7
- import { DeprecatedTextFormat } from '../model/enum/DeprecatedTextFormat';
8
- import { ResourceTag } from '../model/enum/ResourceTag';
9
- import { TextFormat } from '../model/enum/TextFormat';
10
- import { TextLocation } from '../model/enum/TextLocation';
11
- import { ArrayUtils } from '../utils/ArrayUtils';
12
- import { BitUtils } from '../utils/BitUtils';
13
- import { BooleanUtils } from '../utils/BooleanUtils';
14
- import { NumberUtils } from '../utils/NumberUtils';
15
- import { ObjectUtils } from '../utils/ObjectUtils';
16
- import { StringUtils } from '../utils/StringUtils';
17
- import { env } from '../utils/env/Env';
18
- import { BaseBuilder } from './BaseBuilder';
19
- import { ResourceBuilder } from './ResourceBuilder';
20
- import { NodeValidator } from './rules/NodeValidator';
21
- /**
22
- * Builder to build bitmark AST node programmatically
23
- */
24
- class Builder extends BaseBuilder {
25
- constructor() {
26
- super(...arguments);
27
- this.resourceBuilder = new ResourceBuilder();
28
- }
29
- /**
30
- * Build bitmark node
31
- *
32
- * @param data - data for the node
33
- * @returns
34
- */
35
- buildBitmark(data) {
36
- const { bits, errors } = data;
37
- const node = {
38
- bits,
39
- errors,
40
- };
41
- // Remove Unset Optionals
42
- ObjectUtils.removeUnwantedProperties(node);
43
- return node;
44
- }
45
- /**
46
- * Build bit node
47
- *
48
- * @param data - data for the node
49
- * @returns
50
- */
51
- buildBit(data) {
52
- var _a, _b, _c, _d, _e, _f, _g;
53
- const bitConfig = Config.getBitConfig(data.bitType);
54
- const bitType = data.bitType;
55
- // Text Format (accepts deprecated values, and converts them to the new format)
56
- const deprecatedTextFormat = DeprecatedTextFormat.fromValue(data.textFormat);
57
- let textFormat = (_a = TextFormat.fromValue(data.textFormat)) !== null && _a !== void 0 ? _a : bitConfig.textFormatDefault;
58
- if (deprecatedTextFormat === DeprecatedTextFormat.bitmarkMinusMinus) {
59
- textFormat = TextFormat.bitmarkText;
60
- }
61
- const context = {
62
- bitConfig,
63
- bitType,
64
- textFormat,
65
- };
66
- // Validate and convert resources, and ensure it is an array
67
- // const resources = ArrayUtils.asArray(resourcesIn);
68
- // Set the card node data
69
- const cardNode = this.buildCardNode(context, data);
70
- // Add reasonableNumOfChars to the bit only for essay bits (in other cases it will be pushed down the tree)
71
- const reasonableNumOfCharsProperty = Config.isOfBitType(data.bitType, BitType.essay)
72
- ? this.toAstProperty(PropertyConfigKey.reasonableNumOfChars, data.reasonableNumOfChars)
73
- : undefined;
74
- const convertedExample = Object.assign({}, this.toExample(data.__isDefaultExample, data.example));
75
- // NOTE: Node order is important and is defined here
76
- const node = Object.assign(Object.assign({ bitType, bitLevel: data.bitLevel, textFormat, resourceType: ResourceTag.fromValue(data.resourceType), isCommented: data.isCommented,
77
- // Properties
78
- id: this.toAstProperty(PropertyConfigKey.id, data.id), internalComment: this.toAstProperty(PropertyConfigKey.internalComment, data.internalComment), customerId: this.toAstProperty(PropertyConfigKey.customerId, data.customerId), customerExternalId: this.toAstProperty(PropertyConfigKey.customerExternalId, data.customerExternalId), externalId: this.toAstProperty(PropertyConfigKey.externalId, data.externalId), spaceId: this.toAstProperty(PropertyConfigKey.spaceId, data.spaceId), padletId: this.toAstProperty(PropertyConfigKey.padletId, data.padletId), jupyterId: this.toAstProperty(PropertyConfigKey.jupyterId, data.jupyterId), jupyterExecutionCount: this.toAstProperty(PropertyConfigKey.jupyterExecutionCount, data.jupyterExecutionCount), isPublic: this.toAstProperty(PropertyConfigKey.isPublic, data.isPublic), isTemplate: this.toAstProperty(PropertyConfigKey.isTemplate, data.isTemplate), isTemplateStripTheme: this.toAstProperty(PropertyConfigKey.isTemplateStripTheme, data.isTemplateStripTheme), aiGenerated: this.toAstProperty(PropertyConfigKey.aiGenerated, data.aiGenerated), machineTranslated: this.toAstProperty(PropertyConfigKey.machineTranslated, data.machineTranslated), searchIndex: this.toAstProperty(PropertyConfigKey.searchIndex, data.searchIndex), analyticsTag: this.toAstProperty(PropertyConfigKey.analyticsTag, data.analyticsTag), categoryTag: this.toAstProperty(PropertyConfigKey.categoryTag, data.categoryTag), topicTag: this.toAstProperty(PropertyConfigKey.topicTag, data.topicTag), altLangTag: this.toAstProperty(PropertyConfigKey.altLangTag, data.altLangTag), feedbackEngine: this.toAstProperty(PropertyConfigKey.feedbackEngine, data.feedbackEngine), feedbackType: this.toAstProperty(PropertyConfigKey.feedbackType, data.feedbackType), disableFeedback: this.toAstProperty(PropertyConfigKey.disableFeedback, data.disableFeedback), diffTo: this.toAstProperty(PropertyConfigKey.diffTo, data.diffTo), diffOp: this.toAstProperty(PropertyConfigKey.diffOp, data.diffOp), diffRef: this.toAstProperty(PropertyConfigKey.diffRef, data.diffRef), diffContext: this.toAstProperty(PropertyConfigKey.diffContext, data.diffContext), diffTime: this.toAstProperty(PropertyConfigKey.diffTime, data.diffTime), path: this.toAstProperty(PropertyConfigKey.path, data.path), releaseVersion: this.toAstProperty(PropertyConfigKey.releaseVersion, data.releaseVersion), releaseKind: this.toAstProperty(PropertyConfigKey.releaseKind, data.releaseKind), releaseDate: this.toAstProperty(PropertyConfigKey.releaseDate, data.releaseDate), book: this.buildBooks(context, data.book), ageRange: this.toAstProperty(PropertyConfigKey.ageRange, data.ageRange), lang: this.toAstProperty(PropertyConfigKey.lang, data.lang), language: this.toAstProperty(PropertyConfigKey.language, data.language), publisher: this.toAstProperty(PropertyConfigKey.publisher, data.publisher), publisherName: this.toAstProperty(PropertyConfigKey.publisherName, data.publisherName), theme: this.toAstProperty(PropertyConfigKey.theme, data.theme), computerLanguage: this.toAstProperty(PropertyConfigKey.computerLanguage, data.computerLanguage), target: this.toAstProperty(PropertyConfigKey.target, data.target), slug: this.toAstProperty(PropertyConfigKey.slug, data.slug), tag: this.toAstProperty(PropertyConfigKey.tag, data.tag), reductionTag: this.toAstProperty(PropertyConfigKey.reductionTag, data.reductionTag), bubbleTag: this.toAstProperty(PropertyConfigKey.bubbleTag, data.bubbleTag), levelCEFRp: this.toAstProperty(PropertyConfigKey.levelCEFRp, data.levelCEFRp), levelCEFR: this.toAstProperty(PropertyConfigKey.levelCEFR, data.levelCEFR), levelILR: this.toAstProperty(PropertyConfigKey.levelILR, data.levelILR), levelACTFL: this.toAstProperty(PropertyConfigKey.levelACTFL, data.levelACTFL), icon: this.toAstProperty(PropertyConfigKey.icon, data.icon), iconTag: this.toAstProperty(PropertyConfigKey.iconTag, data.iconTag), colorTag: this.toAstProperty(PropertyConfigKey.colorTag, data.colorTag), flashcardSet: this.toAstProperty(PropertyConfigKey.flashcardSet, data.flashcardSet), subtype: this.toAstProperty(PropertyConfigKey.subtype, data.subtype), bookAlias: this.toAstProperty(PropertyConfigKey.bookAlias, data.bookAlias), bookDiff: this.toAstProperty(PropertyConfigKey.bookDiff, data.bookDiff), coverImage: this.toAstProperty(PropertyConfigKey.coverImage, data.coverImage), coverColor: this.toAstProperty(PropertyConfigKey.coverColor, data.coverColor), publications: this.toAstProperty(PropertyConfigKey.publications, data.publications), author: this.toAstProperty(PropertyConfigKey.author, data.author), subject: this.toAstProperty(PropertyConfigKey.subject, data.subject), date: this.toAstProperty(PropertyConfigKey.date, data.date), dateEnd: this.toAstProperty(PropertyConfigKey.dateEnd, data.dateEnd), location: this.toAstProperty(PropertyConfigKey.location, data.location), kind: this.toAstProperty(PropertyConfigKey.kind, data.kind), hasMarkAsDone: this.toAstProperty(PropertyConfigKey.hasMarkAsDone, data.hasMarkAsDone), processHandIn: this.toAstProperty(PropertyConfigKey.processHandIn, data.processHandIn), processHandInLocation: this.toAstProperty(PropertyConfigKey.processHandInLocation, data.processHandInLocation), chatWithBook: this.toAstProperty(PropertyConfigKey.chatWithBook, data.chatWithBook), chatWithBookBrainKey: this.toAstProperty(PropertyConfigKey.chatWithBookBrainKey, data.chatWithBookBrainKey), action: this.toAstProperty(PropertyConfigKey.action, data.action), showInIndex: this.toAstProperty(PropertyConfigKey.showInIndex, data.showInIndex), refAuthor: this.toAstProperty(PropertyConfigKey.refAuthor, data.refAuthor), refBookTitle: this.toAstProperty(PropertyConfigKey.refBookTitle, data.refBookTitle), refPublisher: this.toAstProperty(PropertyConfigKey.refPublisher, data.refPublisher), refPublicationYear: this.toAstProperty(PropertyConfigKey.refPublicationYear, data.refPublicationYear), citationStyle: this.toAstProperty(PropertyConfigKey.citationStyle, data.citationStyle), blockId: this.toAstProperty(PropertyConfigKey.blockId, data.blockId), pageNo: this.toAstProperty(PropertyConfigKey.pageNo, data.pageNo), x: this.toAstProperty(PropertyConfigKey.x, data.x), y: this.toAstProperty(PropertyConfigKey.y, data.y), width: this.toAstProperty(PropertyConfigKey.width, data.width), height: this.toAstProperty(PropertyConfigKey.height, data.height), index: this.toAstProperty(PropertyConfigKey.index, data.index), classification: this.toAstProperty(PropertyConfigKey.classification, data.classification), availableClassifications: this.toAstProperty(PropertyConfigKey.availableClassifications, data.availableClassifications), allowedBit: this.toAstProperty(PropertyConfigKey.allowedBit, data.allowedBit), tableFixedHeader: this.toAstProperty(PropertyConfigKey.tableFixedHeader, data.tableFixedHeader), tableHeaderWhitespaceNoWrap: this.toAstProperty(PropertyConfigKey.tableHeaderWhitespaceNoWrap, data.tableHeaderWhitespaceNoWrap), tableSearch: this.toAstProperty(PropertyConfigKey.tableSearch, data.tableSearch), tableSort: this.toAstProperty(PropertyConfigKey.tableSort, data.tableSort), tablePagination: this.toAstProperty(PropertyConfigKey.tablePagination, data.tablePagination), tablePaginationLimit: this.toAstProperty(PropertyConfigKey.tablePaginationLimit, data.tablePaginationLimit), tableHeight: this.toAstProperty(PropertyConfigKey.tableHeight, data.tableHeight), tableWhitespaceNoWrap: this.toAstProperty(PropertyConfigKey.tableWhitespaceNoWrap, data.tableWhitespaceNoWrap), tableAutoWidth: this.toAstProperty(PropertyConfigKey.tableAutoWidth, data.tableAutoWidth), tableResizableColumns: this.toAstProperty(PropertyConfigKey.tableResizableColumns, data.tableResizableColumns), tableColumnMinWidth: this.toAstProperty(PropertyConfigKey.tableColumnMinWidth, data.tableColumnMinWidth), quizCountItems: this.toAstProperty(PropertyConfigKey.quizCountItems, data.quizCountItems), quizStrikethroughSolutions: this.toAstProperty(PropertyConfigKey.quizStrikethroughSolutions, data.quizStrikethroughSolutions), codeLineNumbers: this.toAstProperty(PropertyConfigKey.codeLineNumbers, data.codeLineNumbers), codeMinimap: this.toAstProperty(PropertyConfigKey.codeMinimap, data.codeMinimap), stripePricingTableId: this.toAstProperty(PropertyConfigKey.stripePricingTableId, data.stripePricingTableId), stripePublishableKey: this.toAstProperty(PropertyConfigKey.stripePublishableKey, data.stripePublishableKey), thumbImage: this.toAstProperty(PropertyConfigKey.thumbImage, data.thumbImage), scormSource: this.toAstProperty(PropertyConfigKey.scormSource, data.scormSource), posterImage: this.toAstProperty(PropertyConfigKey.posterImage, data.posterImage), focusX: this.toAstProperty(PropertyConfigKey.focusX, data.focusX), focusY: this.toAstProperty(PropertyConfigKey.focusY, data.focusY), pointerLeft: this.toAstProperty(PropertyConfigKey.pointerLeft, data.pointerLeft), pointerTop: this.toAstProperty(PropertyConfigKey.pointerTop, data.pointerTop), listItemIndent: this.toAstProperty(PropertyConfigKey.listItemIndent, data.listItemIndent), backgroundWallpaper: this.toImageResource(context, data.backgroundWallpaper), hasBookNavigation: this.toAstProperty(PropertyConfigKey.hasBookNavigation, data.hasBookNavigation), duration: this.toAstProperty(PropertyConfigKey.duration, data.duration), deeplink: this.toAstProperty(PropertyConfigKey.deeplink, data.deeplink), externalLink: this.toAstProperty(PropertyConfigKey.externalLink, data.externalLink), externalLinkText: this.toAstProperty(PropertyConfigKey.externalLinkText, data.externalLinkText), videoCallLink: this.toAstProperty(PropertyConfigKey.videoCallLink, data.videoCallLink), vendorDashboardId: this.toAstProperty(PropertyConfigKey.vendorDashboardId, data.vendorDashboardId), vendorSurveyId: this.toAstProperty(PropertyConfigKey.vendorSurveyId, data.vendorSurveyId), vendorUrl: this.toAstProperty(PropertyConfigKey.vendorUrl, data.vendorUrl), search: this.toAstProperty(PropertyConfigKey.search, data.search), list: this.toAstProperty(PropertyConfigKey.list, data.list), layer: this.toAstProperty(PropertyConfigKey.layer, data.layer), layerRole: this.toAstProperty(PropertyConfigKey.layerRole, data.layerRole), textReference: this.toAstProperty(PropertyConfigKey.textReference, data.textReference), isTracked: this.toAstProperty(PropertyConfigKey.isTracked, data.isTracked), isInfoOnly: this.toAstProperty(PropertyConfigKey.isInfoOnly, data.isInfoOnly), imageFirst: this.toAstProperty(PropertyConfigKey.imageFirst, data.imageFirst), activityType: this.toAstProperty(PropertyConfigKey.activityType, data.activityType), labelTrue: this.toAstProperty(PropertyConfigKey.labelTrue, data.labelTrue), labelFalse: this.toAstProperty(PropertyConfigKey.labelFalse, data.labelFalse), content2Buy: this.toAstProperty(PropertyConfigKey.content2Buy, data.content2Buy), mailingList: this.toAstProperty(PropertyConfigKey.mailingList, data.mailingList), buttonCaption: this.toAstProperty(PropertyConfigKey.buttonCaption, data.buttonCaption), callToActionUrl: this.toAstProperty(PropertyConfigKey.callToActionUrl, data.callToActionUrl), caption: this.handleJsonText(context, TextLocation.tag, data.caption), quotedPerson: this.toAstProperty(PropertyConfigKey.quotedPerson, data.quotedPerson), reasonableNumOfChars: reasonableNumOfCharsProperty, resolved: this.toAstProperty(PropertyConfigKey.resolved, data.resolved), resolvedDate: this.toAstProperty(PropertyConfigKey.resolvedDate, data.resolvedDate), resolvedBy: this.toAstProperty(PropertyConfigKey.resolvedBy, data.resolvedBy), handInAcceptFileType: this.toAstProperty(PropertyConfigKey.handInAcceptFileType, data.handInAcceptFileType), handInRequirement: this.toAstProperty(PropertyConfigKey.handInRequirement, data.handInRequirement), handInInstruction: this.toAstProperty(PropertyConfigKey.handInInstruction, data.handInInstruction), maxCreatedBits: this.toAstProperty(PropertyConfigKey.maxCreatedBits, data.maxCreatedBits), maxDisplayLevel: this.toAstProperty(PropertyConfigKey.maxDisplayLevel, data.maxDisplayLevel), maxTocChapterLevel: this.toAstProperty(PropertyConfigKey.maxTocChapterLevel, data.maxTocChapterLevel), tocResource: this.toAstProperty(PropertyConfigKey.tocResource, data.tocResource), tocContent: this.toAstProperty(PropertyConfigKey.tocContent, data.tocContent), page: this.toAstProperty(PropertyConfigKey.page, data.page), productId: this.toAstProperty(PropertyConfigKey.productId, data.productId), product: this.toAstProperty(PropertyConfigKey.product, data.product), productList: this.toAstProperty(PropertyConfigKey.productList, data.productList), productVideo: this.toAstProperty(PropertyConfigKey.productVideo, data.productVideo), productVideoList: this.toAstProperty(PropertyConfigKey.productVideoList, data.productVideoList), productFolder: this.toAstProperty(PropertyConfigKey.productFolder, data.productFolder), technicalTerm: this.buildTechnicalTerm(context, data.technicalTerm), servings: this.buildServings(context, data.servings), ratingLevelStart: this.buildRatingLevelStartEnd(context, data.ratingLevelStart), ratingLevelEnd: this.buildRatingLevelStartEnd(context, data.ratingLevelEnd), ratingLevelSelected: this.toAstProperty(PropertyConfigKey.ratingLevelSelected, data.ratingLevelSelected), markConfig: this.buildMarkConfigs(context, data.markConfig), imageSource: this.buildImageSource(context, data.imageSource), person: this.buildPerson(context, data.person), bot: this.toAstProperty(PropertyConfigKey.bot, data.bot), referenceProperty: this.toAstProperty(PropertyConfigKey.property_reference, data.referenceProperty),
79
- // Book data
80
- title: this.handleJsonText(context, TextLocation.tag, data.title), subtitle: this.handleJsonText(context, TextLocation.tag, data.subtitle), level: NumberUtils.asNumber(data.level), toc: this.toAstProperty(PropertyConfigKey.toc, data.toc), progress: this.toAstProperty(PropertyConfigKey.progress, data.progress), anchor: data.anchor, reference: data.reference, referenceEnd: data.referenceEnd, revealSolutions: this.toAstProperty(PropertyConfigKey.revealSolutions, data.revealSolutions),
81
- // Item, Lead, Hint, Instruction
82
- item: this.handleJsonText(context, TextLocation.tag, data.item), lead: this.handleJsonText(context, TextLocation.tag, data.lead), pageNumber: this.handleJsonText(context, TextLocation.tag, data.pageNumber), marginNumber: this.handleJsonText(context, TextLocation.tag, data.marginNumber), hint: this.handleJsonText(context, TextLocation.tag, data.hint), instruction: this.handleJsonText(context, TextLocation.tag, data.instruction), partialAnswer: this.toAstProperty(PropertyConfigKey.partialAnswer, data.partialAnswer), sampleSolution: this.toAstProperty(PropertyConfigKey.property_sampleSolution, data.sampleSolution), additionalSolutions: this.toAstProperty(PropertyConfigKey.additionalSolutions, data.additionalSolutions) }, this.toExample(data.__isDefaultExample, data.example)), {
83
- // Person
84
- imagePlaceholder: this.toImageResource(context, data.imagePlaceholder), resources: ArrayUtils.asArray(this.resourceBuilder.resourceFromResourceJson(context, data.resources)),
85
- // Body, Card, Footer, must be after all other properties except the extraProperties and markup / parser
86
- body: this.buildBody(context, data.body), cardNode, footer: this.buildFooter(context, data.footer),
87
- // Must be after other properties/tags in the AST so key clashes are avoided correctly
88
- extraProperties: this.parseExtraProperties(data.extraProperties), markup: data.markup, parser: data.parser,
89
- // Private properties
90
- __isDefaultExample: (_b = data.__isDefaultExample) !== null && _b !== void 0 ? _b : false });
91
- // Push reasonableNumOfChars down the tree for the interview bits
92
- if (Config.isOfBitType(node.bitType, BitType.interview)) {
93
- this.pushDownTree(context, undefined, undefined, cardNode, 'questions', PropertyConfigKey.reasonableNumOfChars, data.reasonableNumOfChars);
94
- }
95
- // Push reasonableNumOfChars down the tree for the feedback bits
96
- if (Config.isOfBitType(node.bitType, BitType.feedback)) {
97
- this.pushDownTree(context, undefined, undefined, cardNode, ['feedbacks', 'reason'], PropertyConfigKey.reasonableNumOfChars, data.reasonableNumOfChars);
98
- }
99
- // Push isCaseSensitive down the tree for the cloze, match and match-matrix bits
100
- this.pushDownTree(context, [node.body, ...((_d = (_c = cardNode === null || cardNode === void 0 ? void 0 : cardNode.cardBits) === null || _c === void 0 ? void 0 : _c.map((cardBit) => cardBit.body)) !== null && _d !== void 0 ? _d : [])], [BodyBitType.gap], undefined, undefined, //'isCaseSensitive',
101
- PropertyConfigKey.isCaseSensitive, (_e = data.isCaseSensitive) !== null && _e !== void 0 ? _e : true);
102
- this.pushDownTree(context, undefined, undefined, cardNode, 'pairs', PropertyConfigKey.isCaseSensitive, (_f = data.isCaseSensitive) !== null && _f !== void 0 ? _f : true);
103
- this.pushDownTree(context, undefined, undefined, cardNode, ['matrix', 'cells'], PropertyConfigKey.isCaseSensitive, (_g = data.isCaseSensitive) !== null && _g !== void 0 ? _g : true);
104
- // If __isDefaultExample is set at the bit level, push the default example down the tree to the relevant nodes
105
- this.pushExampleDownTree(context, node.body, cardNode, node.__isDefaultExample, convertedExample.example);
106
- // Set default values
107
- this.setDefaultBitValues(node);
108
- // Set the 'isExample' flags
109
- this.setIsExampleFlags(node);
110
- // Add the version to the parser info
111
- this.addVersionToParserInfo(node);
112
- // Remove Unset Optionals
113
- ObjectUtils.removeUnwantedProperties(node, {
114
- ignoreAllFalse: true,
115
- ignoreUndefined: ['example'],
116
- ignoreEmptyArrays: ['item', 'lead', 'pageNumber', 'marginNumber', 'hint', 'instruction'],
117
- });
118
- // Validate and correct invalid bits as much as possible
119
- return NodeValidator.validateBit(node);
120
- }
121
- /**
122
- * Build books[] node
123
- *
124
- * @param data - data for the node
125
- * @returns
126
- */
127
- buildBooks(context, data) {
128
- if (StringUtils.isString(data))
129
- return data;
130
- if (!Array.isArray(data))
131
- return undefined;
132
- const nodes = data.map((d) => this.buildBook(context, d)).filter((d) => d != null);
133
- return nodes.length > 0 ? nodes : undefined;
134
- }
135
- /**
136
- * Build choice node
137
- *
138
- * @param data - data for the node
139
- * @returns
140
- */
141
- buildBook(_context, data) {
142
- var _a, _b, _c;
143
- if (!data)
144
- return undefined;
145
- // NOTE: Node order is important and is defined here
146
- const node = {
147
- book: (_a = data.book) !== null && _a !== void 0 ? _a : '',
148
- reference: (_b = data.reference) !== null && _b !== void 0 ? _b : '',
149
- referenceEnd: ((_c = data.referenceEnd) !== null && _c !== void 0 ? _c : undefined),
150
- };
151
- // Remove Unset Optionals
152
- ObjectUtils.removeUnwantedProperties(node, {
153
- ignoreAllFalse: true,
154
- ignoreEmptyString: ['book', 'reference'],
155
- });
156
- return node;
157
- }
158
- /**
159
- * Build feedbackChoices[] node
160
- *
161
- * @param data - data for the node
162
- * @returns
163
- */
164
- buildFeedbackChoices(context, data) {
165
- if (!Array.isArray(data))
166
- return undefined;
167
- const nodes = data.map((d) => this.buildFeedbackChoice(context, d)).filter((d) => d != null);
168
- return nodes.length > 0 ? nodes : undefined;
169
- }
170
- /**
171
- * Build feedbackChoice node
172
- *
173
- * @param data - data for the node
174
- * @returns
175
- */
176
- buildFeedbackChoice(context, data) {
177
- var _a;
178
- if (!data)
179
- return undefined;
180
- // NOTE: Node order is important and is defined here
181
- const node = Object.assign({ choice: (_a = data.choice) !== null && _a !== void 0 ? _a : '', requireReason: !!data.requireReason, item: this.handleJsonText(context, TextLocation.tag, data.item), lead: this.handleJsonText(context, TextLocation.tag, data.lead), hint: this.handleJsonText(context, TextLocation.tag, data.hint), instruction: this.handleJsonText(context, TextLocation.tag, data.instruction) }, this.toExample(data.__isDefaultExample, data.example, true));
182
- // Remove Unset Optionals
183
- ObjectUtils.removeUnwantedProperties(node, {
184
- ignoreAllFalse: true,
185
- ignoreEmptyArrays: ['item', 'hint', 'instruction'],
186
- ignoreUndefined: ['example'],
187
- });
188
- return node;
189
- }
190
- /**
191
- * Build feedbackReason node
192
- *
193
- * @param data - data for the node
194
- * @returns
195
- */
196
- buildFeedbackReason(context, data) {
197
- var _a, _b;
198
- if (!data)
199
- return undefined;
200
- // Set default example
201
- // Not __testAst - there is no default example
202
- const defaultExample = this.handleJsonText(context, TextLocation.tag, 'true');
203
- // NOTE: Node order is important and is defined here
204
- const node = Object.assign(Object.assign({ text: (_a = data.text) !== null && _a !== void 0 ? _a : '', reasonableNumOfChars: ((_b = data.reasonableNumOfChars) !== null && _b !== void 0 ? _b : undefined), item: this.handleJsonText(context, TextLocation.tag, data.item), lead: this.handleJsonText(context, TextLocation.tag, data.lead), hint: this.handleJsonText(context, TextLocation.tag, data.hint), instruction: this.handleJsonText(context, TextLocation.tag, data.instruction) }, this.toExample(data.__isDefaultExample, data.example, defaultExample)), { __textAst: data.__textAst });
205
- // Remove Unset Optionals
206
- ObjectUtils.removeUnwantedProperties(node, {
207
- ignoreAllFalse: true,
208
- ignoreEmptyArrays: ['item', 'hint', 'instruction'],
209
- ignoreUndefined: ['example', 'reasonableNumOfChars'],
210
- });
211
- return node;
212
- }
213
- /**
214
- * Build choice[] node
215
- *
216
- * @param data - data for the node
217
- * @returns
218
- */
219
- buildChoices(context, data) {
220
- if (!Array.isArray(data))
221
- return undefined;
222
- const nodes = data.map((d) => this.buildChoice(context, d)).filter((d) => d != null);
223
- return nodes.length > 0 ? nodes : undefined;
224
- }
225
- /**
226
- * Build choice node
227
- *
228
- * @param data - data for the node
229
- * @returns
230
- */
231
- buildChoice(context, data) {
232
- var _a;
233
- if (!data)
234
- return undefined;
235
- // NOTE: Node order is important and is defined here
236
- const node = Object.assign({ choice: (_a = data.choice) !== null && _a !== void 0 ? _a : '', isCorrect: !!data.isCorrect, item: this.handleJsonText(context, TextLocation.tag, data.item), lead: this.handleJsonText(context, TextLocation.tag, data.lead), hint: this.handleJsonText(context, TextLocation.tag, data.hint), instruction: this.handleJsonText(context, TextLocation.tag, data.instruction) }, this.toExample(data.__isDefaultExample, data.example, !!data.isCorrect));
237
- // Remove Unset Optionals
238
- ObjectUtils.removeUnwantedProperties(node, {
239
- ignoreAllFalse: true,
240
- ignoreEmptyArrays: ['item', 'hint', 'instruction'],
241
- ignoreUndefined: ['example'],
242
- });
243
- return node;
244
- }
245
- /**
246
- * Build response[] node
247
- *
248
- * @param data - data for the node
249
- * @returns
250
- */
251
- buildResponses(context, data) {
252
- if (!Array.isArray(data))
253
- return undefined;
254
- const nodes = data.map((d) => this.buildResponse(context, d)).filter((d) => d != null);
255
- return nodes.length > 0 ? nodes : undefined;
256
- }
257
- /**
258
- * Build response node
259
- *
260
- * @param data - data for the node
261
- * @returns
262
- */
263
- buildResponse(context, data) {
264
- var _a;
265
- if (!data)
266
- return undefined;
267
- // NOTE: Node order is important and is defined here
268
- const node = Object.assign({ response: (_a = data.response) !== null && _a !== void 0 ? _a : '', isCorrect: !!data.isCorrect, item: this.handleJsonText(context, TextLocation.tag, data.item), lead: this.handleJsonText(context, TextLocation.tag, data.lead), hint: this.handleJsonText(context, TextLocation.tag, data.hint), instruction: this.handleJsonText(context, TextLocation.tag, data.instruction) }, this.toExample(data.__isDefaultExample, data.example, !!data.isCorrect));
269
- // Remove Unset Optionals
270
- ObjectUtils.removeUnwantedProperties(node, {
271
- ignoreAllFalse: true,
272
- ignoreEmptyArrays: ['item', 'hint', 'instruction'],
273
- ignoreUndefined: ['example'],
274
- });
275
- return node;
276
- }
277
- /**
278
- * Build bot response[] node
279
- *
280
- * @param data - data for the node
281
- * @returns
282
- */
283
- buildBotResponses(context, data) {
284
- if (!Array.isArray(data))
285
- return undefined;
286
- const nodes = data.map((d) => this.botResponse(context, d)).filter((d) => d != null);
287
- return nodes.length > 0 ? nodes : undefined;
288
- }
289
- /**
290
- * Build bot response node
291
- *
292
- * @param data - data for the node
293
- * @returns
294
- */
295
- botResponse(context, data) {
296
- var _a, _b, _c;
297
- if (!data)
298
- return undefined;
299
- // NOTE: Node order is important and is defined here
300
- const node = {
301
- response: (_a = data.response) !== null && _a !== void 0 ? _a : '',
302
- reaction: (_b = data.reaction) !== null && _b !== void 0 ? _b : '',
303
- feedback: (_c = data.feedback) !== null && _c !== void 0 ? _c : '',
304
- item: this.handleJsonText(context, TextLocation.tag, data.item),
305
- lead: this.handleJsonText(context, TextLocation.tag, data.lead),
306
- hint: this.handleJsonText(context, TextLocation.tag, data.hint),
307
- };
308
- // Remove Unset Optionals
309
- ObjectUtils.removeUnwantedProperties(node, {
310
- ignoreEmptyString: ['response', 'reaction', 'feedback'],
311
- ignoreAllFalse: true,
312
- ignoreEmptyArrays: ['item'],
313
- ignoreUndefined: ['example'],
314
- });
315
- return node;
316
- }
317
- /**
318
- * Build feedbacks[] node
319
- *
320
- * @param data - data for the node
321
- * @returns
322
- */
323
- buildFeedbacks(context, data) {
324
- if (!Array.isArray(data))
325
- return undefined;
326
- const nodes = data.map((d) => this.buildFeedback(context, d)).filter((d) => d != null);
327
- return nodes.length > 0 ? nodes : undefined;
328
- }
329
- /**
330
- * Build feedback node
331
- *
332
- * @param data - data for the node
333
- * @returns
334
- */
335
- buildFeedback(context, data) {
336
- if (!data)
337
- return undefined;
338
- let choices;
339
- let reason;
340
- if (data.choices) {
341
- choices = this.buildFeedbackChoices(context, data.choices);
342
- // Push __isDefaultExample down the tree
343
- // this.pushExampleDownTreeBoolean(context, data.__isDefaultExample, convertedExample.example, true, choices);
344
- }
345
- else {
346
- // No choices, not a valid feedback
347
- return undefined;
348
- }
349
- if (data.reason) {
350
- reason = this.buildFeedbackReason(context, data.reason);
351
- }
352
- // NOTE: Node order is important and is defined here
353
- const node = {
354
- item: this.handleJsonText(context, TextLocation.tag, data.item),
355
- lead: this.handleJsonText(context, TextLocation.tag, data.lead),
356
- hint: this.handleJsonText(context, TextLocation.tag, data.hint),
357
- instruction: this.handleJsonText(context, TextLocation.tag, data.instruction),
358
- // isExample: !!data.__defaultExample,
359
- choices: choices,
360
- reason: reason, // Might be undefined
361
- };
362
- // Remove Unset Optionals
363
- ObjectUtils.removeUnwantedProperties(node, {
364
- ignoreAllFalse: true,
365
- ignoreEmptyArrays: ['item', 'hint', 'instruction'],
366
- });
367
- return node;
368
- }
369
- /**
370
- * Build quizzes[] node
371
- *
372
- * @param data - data for the node
373
- * @returns
374
- */
375
- buildQuizzes(context, data) {
376
- if (!Array.isArray(data))
377
- return undefined;
378
- const nodes = data.map((d) => this.buildQuiz(context, d)).filter((d) => d != null);
379
- return nodes.length > 0 ? nodes : undefined;
380
- }
381
- /**
382
- * Build quiz node
383
- *
384
- * @param data - data for the node
385
- * @returns
386
- */
387
- buildQuiz(context, data) {
388
- if (!data)
389
- return undefined;
390
- const convertedExample = Object.assign({}, this.toExample(data.__isDefaultExample, data.__defaultExample));
391
- let choices;
392
- let responses;
393
- if (data.choices) {
394
- choices = this.buildChoices(context, data.choices);
395
- // Push __isDefaultExample down the tree
396
- this.pushExampleDownTreeBoolean(context, data.__isDefaultExample, convertedExample.example, true, choices);
397
- }
398
- else if (data.responses) {
399
- responses = this.buildResponses(context, data.responses);
400
- // Push __isDefaultExample down the tree
401
- this.pushExampleDownTreeBoolean(context, data.__isDefaultExample, convertedExample.example, false, responses);
402
- }
403
- else {
404
- // No choices or responses, not a valid quiz
405
- return undefined;
406
- }
407
- // NOTE: Node order is important and is defined here
408
- const node = {
409
- item: this.handleJsonText(context, TextLocation.tag, data.item),
410
- lead: this.handleJsonText(context, TextLocation.tag, data.lead),
411
- hint: this.handleJsonText(context, TextLocation.tag, data.hint),
412
- instruction: this.handleJsonText(context, TextLocation.tag, data.instruction),
413
- isExample: !!data.__defaultExample,
414
- choices: choices,
415
- responses: responses,
416
- };
417
- // Remove Unset Optionals
418
- ObjectUtils.removeUnwantedProperties(node, {
419
- ignoreAllFalse: true,
420
- ignoreEmptyArrays: ['item', 'hint', 'instruction'],
421
- });
422
- return node;
423
- }
424
- /**
425
- * Build heading node
426
- *
427
- * @param data - data for the node
428
- * @returns
429
- */
430
- buildHeading(_context, data) {
431
- var _a, _b, _c;
432
- if (!data)
433
- return undefined;
434
- if (data.forKeys == null)
435
- return undefined;
436
- // NOTE: Node order is important and is defined here
437
- const node = {
438
- forKeys: (_a = data.forKeys) !== null && _a !== void 0 ? _a : '',
439
- forValues: (_c = (_b = data.forValues) !== null && _b !== void 0 ? _b : data.__forValuesDefault) !== null && _c !== void 0 ? _c : '',
440
- };
441
- // Remove Unset Optionals
442
- ObjectUtils.removeUnwantedProperties(node, {
443
- ignoreAllFalse: true,
444
- ignoreEmptyString: ['forKeys', 'forValues'],
445
- ignoreEmptyArrays: ['forValues'],
446
- });
447
- return node;
448
- }
449
- /**
450
- * Build pair[] node
451
- *
452
- * @param data - data for the node
453
- * @returns
454
- */
455
- buildPairs(context, data) {
456
- if (!Array.isArray(data))
457
- return undefined;
458
- const nodes = data.map((d) => this.buildPair(context, d)).filter((d) => d != null);
459
- return nodes.length > 0 ? nodes : undefined;
460
- }
461
- /**
462
- * Build pair node
463
- *
464
- * @param data - data for the node
465
- * @returns
466
- */
467
- buildPair(context, data) {
468
- var _a, _b;
469
- if (!data)
470
- return undefined;
471
- // Set default example
472
- const defaultExample = Array.isArray(data.__valuesAst) && data.__valuesAst.length > 0 ? data.__valuesAst[0] : null;
473
- // Process the keyAudio and keyImage resources
474
- const keyAudio = this.resourceBuilder.resourceFromResourceJson(context, data.keyAudio);
475
- const keyImage = this.resourceBuilder.resourceFromResourceJson(context, data.keyImage);
476
- // NOTE: Node order is important and is defined here
477
- const node = Object.assign(Object.assign({ key: (_a = data.key) !== null && _a !== void 0 ? _a : '', keyAudio,
478
- keyImage, item: this.handleJsonText(context, TextLocation.tag, data.item), lead: this.handleJsonText(context, TextLocation.tag, data.lead), hint: this.handleJsonText(context, TextLocation.tag, data.hint), instruction: this.handleJsonText(context, TextLocation.tag, data.instruction), isCaseSensitive: data.isCaseSensitive }, this.toExample(data.__isDefaultExample, data.example, defaultExample)), { values: (_b = data.values) !== null && _b !== void 0 ? _b : [], __valuesAst: data.__valuesAst });
479
- // Remove Unset Optionals
480
- ObjectUtils.removeUnwantedProperties(node, {
481
- ignoreAllFalse: true,
482
- ignoreEmptyArrays: ['item', 'hint', 'instruction', 'values'],
483
- ignoreUndefined: ['example', 'isCaseSensitive'],
484
- });
485
- // if (node.key) {
486
- // delete node.keyAudio;
487
- // delete node.keyImage;
488
- // }
489
- // if (node.keyAudio != null) {
490
- // delete node.key;
491
- // delete node.keyImage;
492
- // }
493
- // if (node.keyImage != null) {
494
- // delete node.key;
495
- // delete node.keyAudio;
496
- // }
497
- return node;
498
- }
499
- /**
500
- * Build matrix[] node
501
- *
502
- * @param data - data for the node
503
- * @returns
504
- */
505
- buildMatricies(context, data) {
506
- if (!Array.isArray(data))
507
- return undefined;
508
- const nodes = data.map((d) => this.buildMatrix(context, d)).filter((d) => d != null);
509
- return nodes.length > 0 ? nodes : undefined;
510
- }
511
- /**
512
- * Build matrix node
513
- *
514
- * @param data - data for the node
515
- * @returns
516
- */
517
- buildMatrix(context, data) {
518
- var _a, _b, _c;
519
- if (!data)
520
- return undefined;
521
- // const convertedExample = {
522
- // ...this.toExample(__isDefaultExample, example),
523
- // };
524
- // // Push __isDefaultExample down the tree
525
- // this.pushExampleDownTreeBoolean(__isDefaultExample, convertedExample.example, true, choices);
526
- // this.pushExampleDownTreeBoolean(__isDefaultExample, convertedExample.example, false, responses);
527
- let isExample = false;
528
- // Set isExample for matrix based on isExample for cells
529
- for (const c of (_a = data.cells) !== null && _a !== void 0 ? _a : []) {
530
- if (data.__isDefaultExample && !c.isExample) {
531
- c.isExample = true;
532
- }
533
- isExample = c.isExample ? true : isExample;
534
- }
535
- // NOTE: Node order is important and is defined here
536
- const node = {
537
- key: (_b = data.key) !== null && _b !== void 0 ? _b : '',
538
- item: this.handleJsonText(context, TextLocation.tag, data.item),
539
- lead: this.handleJsonText(context, TextLocation.tag, data.lead),
540
- hint: this.handleJsonText(context, TextLocation.tag, data.hint),
541
- instruction: this.handleJsonText(context, TextLocation.tag, data.instruction),
542
- isExample,
543
- cells: ((_c = data.cells) !== null && _c !== void 0 ? _c : []).map((c) => this.buildMatrixCell(context, c)).filter((c) => c != null),
544
- };
545
- // Remove Unset Optionals
546
- ObjectUtils.removeUnwantedProperties(node, {
547
- ignoreAllFalse: true,
548
- ignoreEmptyArrays: ['hint', 'item', 'cells'],
549
- ignoreUndefined: ['isCaseSensitive'],
550
- });
551
- return node;
552
- }
553
- /**
554
- * Build matrixCell node
555
- *
556
- * @param data - data for the node
557
- * @returns
558
- */
559
- buildMatrixCell(context, data) {
560
- var _a;
561
- if (!data)
562
- return undefined;
563
- // Set default example
564
- const defaultExample = Array.isArray(data.__valuesAst) && data.__valuesAst.length > 0 ? data.__valuesAst[0] : null;
565
- // NOTE: Node order is important and is defined here
566
- const node = Object.assign(Object.assign({ values: (_a = data.values) !== null && _a !== void 0 ? _a : [], item: this.handleJsonText(context, TextLocation.tag, data.item), lead: this.handleJsonText(context, TextLocation.tag, data.lead), hint: this.handleJsonText(context, TextLocation.tag, data.hint), instruction: this.handleJsonText(context, TextLocation.tag, data.instruction), isCaseSensitive: data.isCaseSensitive }, this.toExample(data.__isDefaultExample, data.example, defaultExample)), { __valuesAst: data.__valuesAst });
567
- // Remove Unset Optionals
568
- ObjectUtils.removeUnwantedProperties(node, {
569
- ignoreAllFalse: true,
570
- ignoreEmptyArrays: ['instruction', 'item', 'values'],
571
- ignoreUndefined: ['example', 'isCaseSensitive'],
572
- });
573
- return node;
574
- }
575
- /**
576
- * Build pronunciation table node
577
- *
578
- * @param data - data for the node
579
- * @returns
580
- */
581
- buildPronunciationTable(context, dataIn) {
582
- var _a;
583
- if (!dataIn)
584
- return undefined;
585
- // NOTE: Node order is important and is defined here
586
- const node = {
587
- data: ((_a = dataIn.data) !== null && _a !== void 0 ? _a : []).map((row) => (row !== null && row !== void 0 ? row : []).map((cell) => {
588
- // Process the audio resource
589
- const audio = this.resourceBuilder.resourceFromResourceJson(context, cell.audio);
590
- return {
591
- title: this.handleJsonText(context, TextLocation.tag, cell.title),
592
- body: this.handleJsonText(context, TextLocation.tag, cell.body),
593
- audio,
594
- };
595
- })),
596
- };
597
- // Remove Unset Optionals
598
- // ObjectUtils.removeUnwantedProperties(node, {
599
- // ignoreAllFalse: true,
600
- // });
601
- return node;
602
- }
603
- /**
604
- * Build table node
605
- *
606
- * @param data - data for the node
607
- * @returns
608
- */
609
- buildTable(context, dataIn) {
610
- var _a, _b;
611
- if (!dataIn)
612
- return undefined;
613
- // NOTE: Node order is important and is defined here
614
- const node = {
615
- columns: ((_a = dataIn.columns) !== null && _a !== void 0 ? _a : []).map((col) => this.handleJsonText(context, TextLocation.tag, col)),
616
- data: ((_b = dataIn.data) !== null && _b !== void 0 ? _b : []).map((row) => (row !== null && row !== void 0 ? row : []).map((cell) => this.handleJsonText(context, TextLocation.tag, cell))),
617
- };
618
- // Remove Unset Optionals
619
- // ObjectUtils.removeUnwantedProperties(node, {
620
- // ignoreAllFalse: true,
621
- // });
622
- return node;
623
- }
624
- /**
625
- * Build question[] node
626
- *
627
- * @param data - data for the node
628
- * @returns
629
- */
630
- buildQuestions(context, data) {
631
- if (!Array.isArray(data))
632
- return undefined;
633
- const nodes = data.map((d) => this.buildQuestion(context, d)).filter((d) => d != null);
634
- return nodes.length > 0 ? nodes : undefined;
635
- }
636
- /**
637
- * Build question node
638
- *
639
- * @param data - data for the node
640
- * @returns
641
- */
642
- buildQuestion(context, data) {
643
- var _a, _b, _c, _d, _e;
644
- if (!data)
645
- return undefined;
646
- // Set default example
647
- const defaultExample = data.__sampleSolutionAst;
648
- // NOTE: Node order is important and is defined here
649
- const node = Object.assign(Object.assign({ question: (_a = data.question) !== null && _a !== void 0 ? _a : '', partialAnswer: (_b = data.partialAnswer) !== null && _b !== void 0 ? _b : '', sampleSolution: (_c = data.sampleSolution) !== null && _c !== void 0 ? _c : '', additionalSolutions: ((_d = data.additionalSolutions) !== null && _d !== void 0 ? _d : undefined), reasonableNumOfChars: ((_e = data.reasonableNumOfChars) !== null && _e !== void 0 ? _e : undefined), item: this.handleJsonText(context, TextLocation.tag, data.item), lead: this.handleJsonText(context, TextLocation.tag, data.lead), hint: this.handleJsonText(context, TextLocation.tag, data.hint), instruction: this.handleJsonText(context, TextLocation.tag, data.instruction) }, this.toExample(data.__isDefaultExample, data.example, defaultExample)), { __sampleSolutionAst: data.__sampleSolutionAst });
650
- // Remove Unset Optionals
651
- ObjectUtils.removeUnwantedProperties(node, {
652
- ignoreAllFalse: true,
653
- ignoreEmptyArrays: ['item', 'hint', 'instruction'],
654
- ignoreUndefined: ['example'],
655
- ignoreEmptyString: ['question', 'partialAnswer', 'sampleSolution'],
656
- });
657
- return node;
658
- }
659
- /**
660
- * Build ingredient[] node
661
- *
662
- * @param data - data for the node
663
- * @returns
664
- */
665
- buildIngredients(context, data) {
666
- if (!Array.isArray(data))
667
- return undefined;
668
- const nodes = data.map((d) => this.buildIngredient(context, d)).filter((d) => d != null);
669
- return nodes.length > 0 ? nodes : undefined;
670
- }
671
- /**
672
- * Build ingredient node
673
- *
674
- * @param data - data for the node
675
- * @returns
676
- */
677
- buildIngredient(context, data) {
678
- var _a, _b, _c, _d, _e, _f;
679
- if (!data)
680
- return undefined;
681
- // NOTE: Node order is important and is defined here
682
- const node = {
683
- title: this.handleJsonText(context, TextLocation.tag, data.title),
684
- checked: (_a = data.checked) !== null && _a !== void 0 ? _a : false,
685
- ingredient: this.handleJsonText(context, TextLocation.tag, data.ingredient),
686
- quantity: (_b = data.quantity) !== null && _b !== void 0 ? _b : 0,
687
- unit: (_c = data.unit) !== null && _c !== void 0 ? _c : '',
688
- unitAbbr: (_d = data.unitAbbr) !== null && _d !== void 0 ? _d : '',
689
- decimalPlaces: (_e = data.decimalPlaces) !== null && _e !== void 0 ? _e : 1,
690
- disableCalculation: (_f = data.disableCalculation) !== null && _f !== void 0 ? _f : false,
691
- item: this.handleJsonText(context, TextLocation.tag, data.item),
692
- lead: this.handleJsonText(context, TextLocation.tag, data.lead),
693
- hint: this.handleJsonText(context, TextLocation.tag, data.hint),
694
- };
695
- // Remove Unset Optionals
696
- ObjectUtils.removeUnwantedProperties(node, {
697
- ignoreAllFalse: true,
698
- // ignoreAllEmptyArrays: true,
699
- // ignoreUndefined: ['example'],
700
- ignoreEmptyString: ['item', 'unit'],
701
- });
702
- return node;
703
- }
704
- /**
705
- * Build body node
706
- * - Handles JSON, Bitmark text, and plain text
707
- * - body: set to either string, TextAst, or JSON
708
- * - bodyBits: set to array of BodyBitJson (will be validated and merged into body if it is a string)
709
- * - placeholders: set to placeholders from v2 JSON when body is a v2 JSON string
710
- * - bodyString: set to the original string if body is a string (only used for card body)
711
- *
712
- * @param data - data for the node
713
- * @returns
714
- */
715
- buildBody(context, data) {
716
- if (!data)
717
- return undefined;
718
- let body;
719
- const bodyBits = [];
720
- const placeholders = data.placeholders;
721
- const bodyString = data.bodyString;
722
- const { textFormat } = context;
723
- // Handle JSON type body
724
- const handleJsonBody = () => {
725
- // Attempt to parse a string body as JSON to support the legacy format
726
- if (typeof data.body === 'string') {
727
- try {
728
- body = JSON.parse(data.body);
729
- }
730
- catch (e) {
731
- // Could not parse JSON - set body to null
732
- body = null;
733
- }
734
- }
735
- else {
736
- body = data.body;
737
- }
738
- };
739
- // Handle Bitmark text type body (both AST v3 and plain text v2)
740
- const handleBitmarkTextBody = () => {
741
- var _a;
742
- let rawBody = data.body;
743
- let bodyStr;
744
- const placeholderNodes = {};
745
- // TODO - process body bits through the correct builders.
746
- if (StringUtils.isString(data.body)) {
747
- // Body is a string (legacy bitmark v2, or not bitmarkText)
748
- bodyStr = ((_a = data.body) !== null && _a !== void 0 ? _a : '').trim();
749
- rawBody = [];
750
- }
751
- else if (Array.isArray(data.body)) {
752
- // Body is an array (prosemirror like JSON)
753
- // Already in the correct format
754
- }
755
- else {
756
- // body is invalid
757
- rawBody = [];
758
- }
759
- if (placeholders) {
760
- for (const [key, val] of Object.entries(placeholders)) {
761
- // const bit = this.bodyBitToAst(val);
762
- // placeholderNodes[key] = bit as BodyBit;
763
- placeholderNodes[key] = val;
764
- }
765
- }
766
- if (bodyStr) {
767
- // Bug #7141: Use textFormat for textParser, not always bitmarkText if it is a v2 string body
768
- // However, only use plain text breakscaping the text from the v2 JSON body
769
- // Special v2 Breakscaping
770
- bodyStr = Breakscape.breakscape(bodyStr, {
771
- format: textFormat,
772
- location: TextLocation.body,
773
- v2: true,
774
- });
775
- // Convert placeholders {1} to [!1], etc.
776
- let index = 0;
777
- const newPlaceholderNodes = [];
778
- for (const [key, val] of Object.entries(placeholderNodes)) {
779
- if (bodyStr) {
780
- const newKey = `[!${index}]`;
781
- bodyStr = bodyStr.replace(`${key}`, newKey);
782
- newPlaceholderNodes.push(val);
783
- index++;
784
- }
785
- }
786
- // Convert the body string to AST
787
- rawBody = this.textParser.toAst(bodyStr, {
788
- format: textFormat,
789
- location: TextLocation.body,
790
- });
791
- const replaceBitsRecursive = (bodyText) => {
792
- for (let i = 0, len = bodyText.length; i < len; i++) {
793
- const bodyPart = bodyText[i];
794
- if (bodyPart.type === 'bit') {
795
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
796
- const index = bodyPart.index;
797
- if (newPlaceholderNodes[index] != null) {
798
- bodyText[i] = newPlaceholderNodes[index];
799
- }
800
- }
801
- else {
802
- if (bodyPart.content)
803
- replaceBitsRecursive(bodyPart.content);
804
- }
805
- }
806
- };
807
- // Replace the placeholders with the AST
808
- replaceBitsRecursive(rawBody);
809
- }
810
- // Process the body bits to ensure they are valid
811
- // Walking the body bits will change them, so we should make a copy before processing
812
- rawBody = structuredClone(rawBody);
813
- this.textParser.walkBodyBits(rawBody, (parent, index, bodyBit) => {
814
- // Ensure the body bit is valid
815
- let parsedBit;
816
- switch (bodyBit.type) {
817
- case BodyBitType.gap:
818
- parsedBit = this.buildGap(context, bodyBit);
819
- break;
820
- case BodyBitType.mark:
821
- parsedBit = this.buildMark(context, bodyBit);
822
- break;
823
- case BodyBitType.select:
824
- parsedBit = this.buildSelect(context, bodyBit);
825
- break;
826
- case BodyBitType.highlight:
827
- parsedBit = this.buildHighlight(context, bodyBit);
828
- break;
829
- default:
830
- // TODO?? Ensure other parts are valid
831
- }
832
- if (parsedBit != undefined) {
833
- parent[index] = parsedBit;
834
- bodyBits.push(parsedBit);
835
- }
836
- });
837
- // Set the body
838
- body = rawBody;
839
- // Mark the body as text
840
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
841
- body.__tag = 'text';
842
- };
843
- const handlePlainTextBody = () => {
844
- body = data.body;
845
- };
846
- const isBitmarkText = textFormat === TextFormat.bitmarkText;
847
- if (textFormat === TextFormat.json) {
848
- // JSON
849
- handleJsonBody();
850
- }
851
- else if (isBitmarkText) {
852
- // Bitmark text (either ast or string)
853
- handleBitmarkTextBody();
854
- }
855
- else {
856
- // Text but not bitmark (plain text)
857
- handlePlainTextBody();
858
- }
859
- const node = {
860
- body,
861
- bodyBits,
862
- bodyString,
863
- // Placeholders are only ever parsed into AST, never stored directly
864
- };
865
- return node;
866
- }
867
- /**
868
- * Build footer node
869
- *
870
- * @param data - data for the node
871
- * @returns
872
- */
873
- buildFooter(context, data) {
874
- if (!data)
875
- return undefined;
876
- const node = {
877
- footer: this.handleJsonText(context, TextLocation.body, data.footer),
878
- };
879
- return node;
880
- }
881
- /**
882
- * Build gap node
883
- *
884
- * @param data - data for the node
885
- * @returns
886
- */
887
- buildGap(context, data) {
888
- var _a;
889
- if (!data)
890
- return undefined;
891
- // Set default example
892
- const defaultExample = Array.isArray(data.__solutionsAst) && data.__solutionsAst.length > 0 ? data.__solutionsAst[0] : null;
893
- // Copy any attributes from 'attrs' to the body bit (data is in 'attrs' when coming from JSON)
894
- data = this.bodyBitCopyFromAttrs(data);
895
- // NOTE: Node order is important and is defined here
896
- const node = Object.assign(Object.assign({ type: BodyBitType.gap, solutions: (_a = data.solutions) !== null && _a !== void 0 ? _a : [], item: this.handleJsonText(context, TextLocation.tag, data.item), lead: this.handleJsonText(context, TextLocation.tag, data.lead), hint: this.handleJsonText(context, TextLocation.tag, data.hint), instruction: this.handleJsonText(context, TextLocation.tag, data.instruction), isCaseSensitive: data.isCaseSensitive }, this.toExample(data.__isDefaultExample, data.example, defaultExample)), { __solutionsAst: data.__solutionsAst, attrs: {} });
897
- // Remove Unset Optionals
898
- ObjectUtils.removeUnwantedProperties(node, {
899
- ignoreAllFalse: true,
900
- ignoreAllEmptyArrays: true,
901
- ignoreUndefined: ['example', 'isCaseSensitive'],
902
- });
903
- return node;
904
- }
905
- /**
906
- * Build mark configs node
907
- *
908
- * @param data - data for the node
909
- * @returns
910
- */
911
- buildMarkConfigs(context, data) {
912
- if (!Array.isArray(data))
913
- return undefined;
914
- const nodes = data.map((d) => this.buildMarkConfig(context, d)).filter((d) => d != null);
915
- return nodes.length > 0 ? nodes : undefined;
916
- }
917
- /**
918
- * Build mark config node
919
- *
920
- * @param data - data for the node
921
- * @returns
922
- */
923
- buildMarkConfig(_context, data) {
924
- var _a, _b, _c;
925
- if (!data)
926
- return undefined;
927
- // NOTE: Node order is important and is defined here
928
- const node = {
929
- mark: (_a = data.mark) !== null && _a !== void 0 ? _a : 'unknown',
930
- color: (_b = data.color) !== null && _b !== void 0 ? _b : '',
931
- emphasis: (_c = data.emphasis) !== null && _c !== void 0 ? _c : '',
932
- };
933
- // Remove Unset Optionals
934
- ObjectUtils.removeUnwantedProperties(node, {
935
- ignoreAllEmptyString: true,
936
- });
937
- return node;
938
- }
939
- /**
940
- * Build mark node
941
- *
942
- * @param data - data for the node
943
- * @returns
944
- */
945
- buildMark(context, data) {
946
- var _a, _b;
947
- if (!data)
948
- return undefined;
949
- // Copy any attributes from 'attrs' to the body bit (data is in 'attrs' when coming from JSON)
950
- data = this.bodyBitCopyFromAttrs(data);
951
- // NOTE: Node order is important and is defined here
952
- const node = Object.assign(Object.assign({ type: BodyBitType.mark, solution: (_a = data.solution) !== null && _a !== void 0 ? _a : '', mark: (_b = data.mark) !== null && _b !== void 0 ? _b : '', item: this.handleJsonText(context, TextLocation.tag, data.item), lead: this.handleJsonText(context, TextLocation.tag, data.lead), hint: this.handleJsonText(context, TextLocation.tag, data.hint), instruction: this.handleJsonText(context, TextLocation.tag, data.instruction) }, this.toExample(data.__isDefaultExample, data.example, true)), { attrs: {} });
953
- // Remove Unset Optionals
954
- ObjectUtils.removeUnwantedProperties(node, {
955
- ignoreAllFalse: true,
956
- ignoreAllEmptyArrays: true,
957
- ignoreUndefined: ['example'],
958
- ignoreEmptyString: ['solution', 'mark'],
959
- });
960
- return node;
961
- }
962
- /**
963
- * Build select node
964
- *
965
- * @param data - data for the node
966
- * @returns
967
- */
968
- buildSelect(context, data) {
969
- var _a, _b, _c;
970
- if (!data)
971
- return undefined;
972
- // Copy any attributes from 'attrs' to the body bit (data is in 'attrs' when coming from JSON)
973
- data = this.bodyBitCopyFromAttrs(data);
974
- // NOTE: Node order is important and is defined here
975
- const node = Object.assign(Object.assign({ type: BodyBitType.select, options: (_a = this.buildSelectOptions(context, data.options)) !== null && _a !== void 0 ? _a : [], prefix: (_b = data.prefix) !== null && _b !== void 0 ? _b : '', postfix: (_c = data.postfix) !== null && _c !== void 0 ? _c : '', item: this.handleJsonText(context, TextLocation.tag, data.item), lead: this.handleJsonText(context, TextLocation.tag, data.lead), hint: this.handleJsonText(context, TextLocation.tag, data.hint), instruction: this.handleJsonText(context, TextLocation.tag, data.instruction) }, this.toExample(false, undefined, undefined)), { __hintString: data.__hintString, __instructionString: data.__instructionString, attrs: {} });
976
- // Remove Unset Optionals
977
- ObjectUtils.removeUnwantedProperties(node, {
978
- ignoreAllFalse: true,
979
- ignoreAllEmptyArrays: true,
980
- ignoreEmptyString: ['prefix', 'postfix'],
981
- });
982
- return node;
983
- }
984
- /**
985
- * Build selectOption[] node
986
- *
987
- * @param data - data for the node
988
- * @returns
989
- */
990
- buildSelectOptions(context, data) {
991
- if (!Array.isArray(data))
992
- return undefined;
993
- const nodes = data.map((d) => this.buildSelectOption(context, d)).filter((d) => d != null);
994
- return nodes.length > 0 ? nodes : undefined;
995
- }
996
- /**
997
- * Build selectOption node
998
- *
999
- * @param data - data for the node
1000
- * @returns
1001
- */
1002
- buildSelectOption(context, data) {
1003
- var _a;
1004
- if (!data)
1005
- return undefined;
1006
- // NOTE: Node order is important and is defined here
1007
- const node = Object.assign({ text: (_a = data.text) !== null && _a !== void 0 ? _a : '', isCorrect: !!data.isCorrect, item: this.handleJsonText(context, TextLocation.tag, data.item), lead: this.handleJsonText(context, TextLocation.tag, data.lead), hint: this.handleJsonText(context, TextLocation.tag, data.hint), instruction: this.handleJsonText(context, TextLocation.tag, data.instruction) }, this.toExample(data.__isDefaultExample, data.example, !!data.isCorrect));
1008
- // Remove Unset Optionals
1009
- ObjectUtils.removeUnwantedProperties(node, {
1010
- ignoreAllFalse: true,
1011
- ignoreAllEmptyArrays: true,
1012
- ignoreUndefined: ['example'],
1013
- });
1014
- return node;
1015
- }
1016
- /**
1017
- * Build highlight node
1018
- *
1019
- * @param data - data for the node
1020
- * @returns
1021
- */
1022
- buildHighlight(context, data) {
1023
- var _a, _b, _c;
1024
- if (!data)
1025
- return undefined;
1026
- // Copy any attributes from 'attrs' to the body bit (data is in 'attrs' when coming from JSON)
1027
- data = this.bodyBitCopyFromAttrs(data);
1028
- // NOTE: Node order is important and is defined here
1029
- const node = Object.assign(Object.assign({ type: BodyBitType.highlight, texts: (_a = this.buildHighlightTexts(context, data.texts)) !== null && _a !== void 0 ? _a : [], prefix: (_b = data.prefix) !== null && _b !== void 0 ? _b : '', postfix: (_c = data.postfix) !== null && _c !== void 0 ? _c : '', item: this.handleJsonText(context, TextLocation.tag, data.item), lead: this.handleJsonText(context, TextLocation.tag, data.lead), hint: this.handleJsonText(context, TextLocation.tag, data.hint), instruction: this.handleJsonText(context, TextLocation.tag, data.instruction) }, this.toExample(false, undefined, undefined)), { attrs: {} });
1030
- // Remove Unset Optionals
1031
- ObjectUtils.removeUnwantedProperties(node, {
1032
- ignoreAllFalse: true,
1033
- ignoreAllEmptyArrays: true,
1034
- ignoreEmptyString: ['prefix', 'postfix'],
1035
- });
1036
- return node;
1037
- }
1038
- /**
1039
- * Build highlightText[] node
1040
- *
1041
- * @param data - data for the node
1042
- * @returns
1043
- */
1044
- buildHighlightTexts(context, data) {
1045
- if (!Array.isArray(data))
1046
- return undefined;
1047
- const nodes = data.map((d) => this.buildHighlightText(context, d)).filter((d) => d != null);
1048
- return nodes.length > 0 ? nodes : undefined;
1049
- }
1050
- /**
1051
- * Build highlightText node
1052
- *
1053
- * @param data - data for the node
1054
- * @returns
1055
- */
1056
- buildHighlightText(context, data) {
1057
- var _a;
1058
- if (!data)
1059
- return undefined;
1060
- // NOTE: Node order is important and is defined here
1061
- const node = Object.assign({ text: (_a = data.text) !== null && _a !== void 0 ? _a : '', isCorrect: !!data.isCorrect, isHighlighted: !!data.isHighlighted, item: this.handleJsonText(context, TextLocation.tag, data.item), lead: this.handleJsonText(context, TextLocation.tag, data.lead), hint: this.handleJsonText(context, TextLocation.tag, data.hint), instruction: this.handleJsonText(context, TextLocation.tag, data.instruction) }, this.toExample(data.__isDefaultExample, data.example, !!data.isCorrect));
1062
- // Remove Unset Optionals
1063
- ObjectUtils.removeUnwantedProperties(node, {
1064
- ignoreAllFalse: true,
1065
- ignoreAllEmptyArrays: true,
1066
- ignoreUndefined: ['example'],
1067
- });
1068
- return node;
1069
- }
1070
- /**
1071
- * Build flashcards node
1072
- *
1073
- * @param data - data for the node
1074
- * @returns
1075
- */
1076
- buildFlashcards(context, data) {
1077
- if (!Array.isArray(data))
1078
- return undefined;
1079
- const nodes = data.map((d) => this.buildFlashcard(context, d)).filter((d) => d != null);
1080
- return nodes.length > 0 ? nodes : undefined;
1081
- }
1082
- /**
1083
- * Build flashcard node
1084
- *
1085
- * @param data - data for the node
1086
- * @returns
1087
- */
1088
- buildFlashcard(context, data) {
1089
- var _a;
1090
- if (!data)
1091
- return undefined;
1092
- // NOTE: Node order is important and is defined here
1093
- const node = Object.assign({ question: this.buildTextAndIcon(context, data.question), answer: this.buildTextAndIcon(context, data.answer), alternativeAnswers: ((_a = data.alternativeAnswers) !== null && _a !== void 0 ? _a : [])
1094
- .map((d) => this.buildTextAndIcon(context, d))
1095
- .filter((d) => d != null), item: this.handleJsonText(context, TextLocation.tag, data.item), lead: this.handleJsonText(context, TextLocation.tag, data.lead), hint: this.handleJsonText(context, TextLocation.tag, data.hint), instruction: this.handleJsonText(context, TextLocation.tag, data.instruction) }, this.toExample(data.__isDefaultExample, data.example, true));
1096
- // Remove Unset Optionals
1097
- ObjectUtils.removeUnwantedProperties(node, {
1098
- ignoreAllFalse: true,
1099
- ignoreEmptyArrays: ['question', 'answer', 'alternativeAnswers', 'item', 'hint', 'instruction'],
1100
- ignoreUndefined: ['example'],
1101
- });
1102
- return node;
1103
- }
1104
- /**
1105
- * Build definitionListItem[] node
1106
- *
1107
- * @param data - data for the node
1108
- * @returns
1109
- */
1110
- buildDefinitionList(context, data) {
1111
- if (!Array.isArray(data))
1112
- return undefined;
1113
- const nodes = data.map((d) => this.buildDefinitionListItem(context, d)).filter((d) => d != null);
1114
- return nodes.length > 0 ? nodes : undefined;
1115
- }
1116
- /**
1117
- * Build definitionListItem node
1118
- *
1119
- * @param data - data for the node
1120
- * @returns
1121
- */
1122
- buildDefinitionListItem(context, data) {
1123
- var _a;
1124
- if (!data)
1125
- return undefined;
1126
- const { bitType } = context;
1127
- const textAsStrings = Config.isOfBitType(bitType, [BitType.metaSearchDefaultTerms]);
1128
- // NOTE: Node order is important and is defined here
1129
- const node = Object.assign({ term: this.buildTextAndIcon(context, data.term, textAsStrings), definition: this.buildTextAndIcon(context, data.definition, textAsStrings), alternativeDefinitions: ((_a = data.alternativeDefinitions) !== null && _a !== void 0 ? _a : [])
1130
- .map((d) => this.buildTextAndIcon(context, d, textAsStrings))
1131
- .filter((d) => d != null), item: this.handleJsonText(context, TextLocation.tag, data.item), lead: this.handleJsonText(context, TextLocation.tag, data.lead), hint: this.handleJsonText(context, TextLocation.tag, data.hint), instruction: this.handleJsonText(context, TextLocation.tag, data.instruction) }, this.toExample(data.__isDefaultExample, data.example, true));
1132
- // Remove Unset Optionals
1133
- ObjectUtils.removeUnwantedProperties(node, {
1134
- ignoreAllFalse: true,
1135
- ignoreEmptyArrays: ['question', 'answer', 'alternativeDefinitions', 'item', 'hint', 'instruction'],
1136
- ignoreUndefined: ['example'],
1137
- });
1138
- return node;
1139
- }
1140
- buildTextAndIcon(context, data, textAsStrings = false) {
1141
- const icon = this.resourceBuilder.resourceFromResourceJson(context, data === null || data === void 0 ? void 0 : data.icon);
1142
- // Ensure text is bitmark text
1143
- let text = this.handleJsonText(context, TextLocation.tag, data === null || data === void 0 ? void 0 : data.text);
1144
- if (textAsStrings) {
1145
- // Convert the bitmark text to plain text (without breakscaping, as that will happen in the Bitmark Generator)
1146
- text = this.textGenerator
1147
- .generateSync(text, TextFormat.plainText, TextLocation.body, {
1148
- noBreakscaping: true,
1149
- })
1150
- .trim();
1151
- }
1152
- // NOTE: Node order is important and is defined here
1153
- const node = {
1154
- text,
1155
- icon,
1156
- };
1157
- // Remove Unset Optionals
1158
- ObjectUtils.removeUnwantedProperties(node, {
1159
- ignoreEmptyArrays: ['text'],
1160
- ignoreUndefined: ['icon'],
1161
- });
1162
- return node;
1163
- }
1164
- /**
1165
- * Build statement[] node
1166
- *
1167
- * @param data - data for the node
1168
- * @returns
1169
- */
1170
- buildStatements(context, data) {
1171
- if (!Array.isArray(data))
1172
- return undefined;
1173
- const nodes = data.map((d) => this.buildStatement(context, d)).filter((d) => d != null);
1174
- return nodes.length > 0 ? nodes : undefined;
1175
- }
1176
- /**
1177
- * Build statement node
1178
- *
1179
- * @param data - data for the node
1180
- * @returns
1181
- */
1182
- buildStatement(context, data) {
1183
- var _a;
1184
- if (!data)
1185
- return undefined;
1186
- // NOTE: Node order is important and is defined here
1187
- const node = Object.assign({ statement: (_a = data.statement) !== null && _a !== void 0 ? _a : '', isCorrect: !!data.isCorrect, item: this.handleJsonText(context, TextLocation.tag, data.item), lead: this.handleJsonText(context, TextLocation.tag, data.lead), hint: this.handleJsonText(context, TextLocation.tag, data.hint), instruction: this.handleJsonText(context, TextLocation.tag, data.instruction) }, this.toExample(data.__isDefaultExample, data.example, !!data.isCorrect));
1188
- // Remove Unset Optionals
1189
- ObjectUtils.removeUnwantedProperties(node, {
1190
- ignoreAllFalse: true,
1191
- // ignoreAllEmptyArrays: true,
1192
- ignoreUndefined: ['example'],
1193
- });
1194
- return node;
1195
- }
1196
- /**
1197
- * Build (image-on-device) imageSource node
1198
- *
1199
- * @param data - data for the node
1200
- * @returns
1201
- */
1202
- buildImageSource(_context, data) {
1203
- if (!data)
1204
- return undefined;
1205
- const { url, mockupId, size, format, trim } = data;
1206
- // NOTE: Node order is important and is defined here
1207
- const node = {
1208
- url: url !== null && url !== void 0 ? url : '',
1209
- mockupId: mockupId !== null && mockupId !== void 0 ? mockupId : '',
1210
- size: (size !== null && size !== void 0 ? size : null),
1211
- format: (format !== null && format !== void 0 ? format : null),
1212
- trim: (BooleanUtils.isBoolean(trim) ? trim : null),
1213
- };
1214
- // Remove Unset Optionals
1215
- ObjectUtils.removeUnwantedProperties(node, {
1216
- ignoreFalse: ['trim'],
1217
- ignoreEmptyString: ['url', 'mockupId'],
1218
- ignoreAllUndefined: true,
1219
- });
1220
- return node;
1221
- }
1222
- /**
1223
- * Build (chat) person node
1224
- *
1225
- * @param data - data for the node
1226
- * @returns
1227
- */
1228
- buildPerson(context, data) {
1229
- if (!data)
1230
- return undefined;
1231
- const { name, title, avatarImage } = data;
1232
- // { name: string; title?: string; avatarImage?: ImageResourceJson }
1233
- // NOTE: Node order is important and is defined here
1234
- const node = {
1235
- name: name !== null && name !== void 0 ? name : '',
1236
- title: (title !== null && title !== void 0 ? title : undefined),
1237
- avatarImage: this.resourceBuilder.resourceFromResourceJson(context, avatarImage),
1238
- };
1239
- // Remove Unset Optionals
1240
- ObjectUtils.removeUnwantedProperties(node, {
1241
- ignoreEmptyString: ['name'],
1242
- ignoreAllUndefined: true,
1243
- });
1244
- return node;
1245
- }
1246
- /**
1247
- * Build (cook-ingredients) technicalTerm node
1248
- *
1249
- * @param data - data for the node
1250
- * @returns
1251
- */
1252
- buildTechnicalTerm(_context, data) {
1253
- if (!data)
1254
- return undefined;
1255
- const { technicalTerm, lang } = data;
1256
- // NOTE: Node order is important and is defined here
1257
- const node = {
1258
- technicalTerm: technicalTerm !== null && technicalTerm !== void 0 ? technicalTerm : '',
1259
- lang: lang !== null && lang !== void 0 ? lang : '',
1260
- };
1261
- // Remove Unset Optionals
1262
- ObjectUtils.removeUnwantedProperties(node, {
1263
- ignoreEmptyString: ['technicalTerm'],
1264
- // ignoreAllUndefined: true,
1265
- });
1266
- return node;
1267
- }
1268
- /**
1269
- * Build (cook-ingredients) servings node
1270
- *
1271
- * @param data - data for the node
1272
- * @returns
1273
- */
1274
- buildServings(_context, data) {
1275
- if (!data)
1276
- return undefined;
1277
- const { servings, unit, unitAbbr, decimalPlaces, disableCalculation, hint } = data;
1278
- // NOTE: Node order is important and is defined here
1279
- const node = {
1280
- servings: servings !== null && servings !== void 0 ? servings : 0,
1281
- unit: unit !== null && unit !== void 0 ? unit : '',
1282
- unitAbbr: unitAbbr !== null && unitAbbr !== void 0 ? unitAbbr : '',
1283
- decimalPlaces: decimalPlaces !== null && decimalPlaces !== void 0 ? decimalPlaces : 1,
1284
- disableCalculation: disableCalculation !== null && disableCalculation !== void 0 ? disableCalculation : false,
1285
- hint: hint !== null && hint !== void 0 ? hint : '',
1286
- };
1287
- // Remove Unset Optionals
1288
- ObjectUtils.removeUnwantedProperties(node, {
1289
- ignoreEmptyString: ['servings', 'unit'],
1290
- // ignoreAllUndefined: true,
1291
- });
1292
- return node;
1293
- }
1294
- /**
1295
- * Build (survey-rating) ratingLevelStart / ratingLevelEnd node
1296
- *
1297
- * @param data - data for the node
1298
- * @returns
1299
- */
1300
- buildRatingLevelStartEnd(context, data) {
1301
- if (!data)
1302
- return undefined;
1303
- const { level, label } = data;
1304
- // NOTE: Node order is important and is defined here
1305
- const node = {
1306
- level: level !== null && level !== void 0 ? level : 0,
1307
- label: this.handleJsonText(context, TextLocation.tag, label),
1308
- };
1309
- // Remove Unset Optionals
1310
- ObjectUtils.removeUnwantedProperties(node, {
1311
- // ignoreEmptyArrays: ['servings', 'unit'],
1312
- // ignoreAllUndefined: true,
1313
- });
1314
- return node;
1315
- }
1316
- // DEPRECATED - TO BE REMOVED IN FUTURE
1317
- // /**
1318
- // * Build captionDefinition node
1319
- // *
1320
- // * @param data - data for the node
1321
- // * @returns
1322
- // */
1323
- // protected buildCaptionDefinition(
1324
- // _context: BuildContext,
1325
- // data: Partial<CaptionDefinitionJson> | undefined,
1326
- // ): CaptionDefinitionJson | undefined {
1327
- // if (!data) return undefined;
1328
- // // NOTE: Node order is important and is defined here
1329
- // const node: CaptionDefinitionJson = {
1330
- // // term: this.convertJsonTextToAstText(data.term),
1331
- // // description: this.convertJsonTextToAstText(data.description),
1332
- // term: data.term ?? '',
1333
- // definition: data.definition ?? '',
1334
- // };
1335
- // // Remove Unset Optionals
1336
- // ObjectUtils.removeUnwantedProperties(node, {
1337
- // ignoreEmptyString: ['term', 'description'],
1338
- // // ignoreAllUndefined: true,
1339
- // });
1340
- // return node;
1341
- // }
1342
- // /**
1343
- // * Build captionDefinitionList node
1344
- // *
1345
- // * @param data - data for the node
1346
- // * @returns
1347
- // */
1348
- // protected buildCaptionDefinitionList(
1349
- // context: BuildContext,
1350
- // data: Partial<CaptionDefinitionListJson> | undefined,
1351
- // ): CaptionDefinitionListJson | undefined {
1352
- // if (!data) return undefined;
1353
- // // NOTE: Node order is important and is defined here
1354
- // const node: CaptionDefinitionListJson = {
1355
- // columns: data.columns ?? [],
1356
- // definitions: (data.definitions ?? [])
1357
- // .map((d) => {
1358
- // return this.buildCaptionDefinition(context, {
1359
- // term: d.term,
1360
- // definition: d.definition,
1361
- // });
1362
- // })
1363
- // .filter((d) => d != null),
1364
- // };
1365
- // // Remove Unset Optionals
1366
- // ObjectUtils.removeUnwantedProperties(node, {
1367
- // ignoreAllEmptyArrays: true,
1368
- // });
1369
- // return node;
1370
- // }
1371
- /**
1372
- * Build card bit[] node
1373
- *
1374
- * @param data - data for the node
1375
- * @returns
1376
- */
1377
- buildCardBits(context, data) {
1378
- if (!Array.isArray(data))
1379
- return undefined;
1380
- const nodes = data.map((d) => this.buildCardBit(context, d)).filter((d) => d != null);
1381
- return nodes.length > 0 ? nodes : undefined;
1382
- }
1383
- /**
1384
- * Build card bit node
1385
- *
1386
- * @param data - data for the node
1387
- * @returns
1388
- */
1389
- buildCardBit(context, data) {
1390
- if (!data)
1391
- return undefined;
1392
- const { bitType, textFormat } = context;
1393
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
1394
- const node = this.buildBit(Object.assign(Object.assign({}, data), { bitType, textFormat }));
1395
- // // NOTE: Node order is important and is defined here
1396
- // const node: CardBit = {
1397
- // item: this.handleJsonText(data.item),
1398
- // lead: this.handleJsonText(data.lead),
1399
- // hint: this.handleJsonText(data.hint),
1400
- // instruction: this.handleJsonText(data.instruction),
1401
- // ...this.toExample(data.__isDefaultExample, data.example),
1402
- // __isDefaultExample: data.__isDefaultExample ?? false,
1403
- // body: this.buildBody(textFormat, data.body),
1404
- // // Must always be last in the AST so key clashes are avoided correctly with other properties
1405
- // extraProperties: this.parseExtraProperties(data.extraProperties),
1406
- // };
1407
- // Remove Unset Optionals
1408
- ObjectUtils.removeUnwantedProperties(node, {
1409
- ignoreAllFalse: true,
1410
- // ignoreEmptyArrays: ['example'],
1411
- ignoreUndefined: ['example'],
1412
- });
1413
- // Validate and correct invalid bits as much as possible
1414
- return NodeValidator.validateCardBit(node);
1415
- }
1416
- toImageResource(context, data) {
1417
- return ArrayUtils.asSingle(this.resourceBuilder.resourceFromResourceDataJson(context, ResourceTag.image, data === null || data === void 0 ? void 0 : data.image));
1418
- }
1419
- //
1420
- // Private
1421
- //
1422
- buildCardNode(context, data) {
1423
- var _a;
1424
- const node = {
1425
- heading: this.buildHeading(context, data.heading),
1426
- questions: this.buildQuestions(context, data.questions),
1427
- elements: data.elements,
1428
- flashcards: this.buildFlashcards(context, data.flashcards),
1429
- definitions: this.buildDefinitionList(context, (_a = data.definitions) !== null && _a !== void 0 ? _a : data.legend),
1430
- statement: this.buildStatement(context, data.statement),
1431
- statements: this.buildStatements(context, data.statements),
1432
- choices: this.buildChoices(context, data.choices),
1433
- responses: this.buildResponses(context, data.responses),
1434
- feedbacks: this.buildFeedbacks(context, data.feedbacks),
1435
- quizzes: this.buildQuizzes(context, data.quizzes),
1436
- pairs: this.buildPairs(context, data.pairs),
1437
- matrix: this.buildMatricies(context, data.matrix),
1438
- pronunciationTable: this.buildPronunciationTable(context, data.pronunciationTable),
1439
- table: this.buildTable(context, data.table),
1440
- botResponses: this.buildBotResponses(context, data.botResponses),
1441
- ingredients: this.buildIngredients(context, data.ingredients),
1442
- // DEPRECATED - TO BE REMOVED IN FUTURE
1443
- // captionDefinitionList: this.buildCaptionDefinitionList(context, data.captionDefinitionList),
1444
- cardBits: this.buildCardBits(context, data.cardBits),
1445
- };
1446
- // Remove Unset Optionals
1447
- ObjectUtils.removeUnwantedProperties(node);
1448
- return Object.keys(node).length > 0 ? node : undefined;
1449
- }
1450
- /**
1451
- * Copy any attributes from 'attrs' property to the root node (necessary when the input if from JSON)
1452
- * The values in 'attrs' will overwrite any existing values in the node
1453
- *
1454
- * The original object is not modified, a new object is returned
1455
- *
1456
- * @param data
1457
- */
1458
- bodyBitCopyFromAttrs(data) {
1459
- const copy = Object.assign({}, data);
1460
- // Copy any attributes from 'attrs' to the node (necessary when the input if from JSON)
1461
- if (data.attrs) {
1462
- for (const [key, value] of Object.entries(data.attrs)) {
1463
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
1464
- copy[key] = value;
1465
- }
1466
- }
1467
- return copy;
1468
- }
1469
- /**
1470
- * Set examples down the tree
1471
- *
1472
- * @param body
1473
- * @param cardNode
1474
- * @param __isDefaultExample
1475
- * @param example
1476
- * @returns true if any of the answers has an example, otherwise undefined
1477
- */
1478
- pushExampleDownTree(context, body, cardNode, __isDefaultExample, example) {
1479
- if (__isDefaultExample || example != null) {
1480
- if (cardNode) {
1481
- this.pushExampleDownTreeString(context, __isDefaultExample, example, cardNode.pairs);
1482
- this.pushExampleDownTreeBoolean(context, __isDefaultExample, example, false, cardNode.flashcards);
1483
- this.pushExampleDownTreeBoolean(context, __isDefaultExample, example, false, cardNode.definitions);
1484
- this.pushExampleDownTreeBoolean(context, __isDefaultExample, example, true, cardNode.choices);
1485
- this.pushExampleDownTreeBoolean(context, __isDefaultExample, example, false, cardNode.responses, cardNode.statements, cardNode.statement);
1486
- if (cardNode.quizzes) {
1487
- for (const quiz of cardNode.quizzes) {
1488
- this.pushExampleDownTreeBoolean(context, __isDefaultExample, example, true, quiz.choices);
1489
- this.pushExampleDownTreeBoolean(context, __isDefaultExample, example, false, quiz.responses);
1490
- }
1491
- }
1492
- if (cardNode.matrix) {
1493
- for (const m of cardNode.matrix) {
1494
- this.pushExampleDownTreeString(context, __isDefaultExample, example, m.cells);
1495
- }
1496
- }
1497
- }
1498
- if (body) {
1499
- this.pushExampleDownTreeBodyBits(context, __isDefaultExample, example, body);
1500
- }
1501
- }
1502
- }
1503
- /**
1504
- * Set examples for boolean nodes
1505
- *
1506
- * @param __isDefaultExample
1507
- * @param example
1508
- * @param onlyCorrect
1509
- * @param nodes
1510
- * @returns true if any of the answers has an example, otherwise undefined
1511
- */
1512
- pushExampleDownTreeBoolean(_context, __isDefaultExample, example, onlyCorrect, ...nodes) {
1513
- if (!__isDefaultExample && example == null)
1514
- return;
1515
- if (Array.isArray(nodes)) {
1516
- for (const ds of nodes) {
1517
- if (ds) {
1518
- const exampleNodes = Array.isArray(ds) ? ds : [ds];
1519
- BitUtils.fillBooleanExample(exampleNodes, __isDefaultExample, example, onlyCorrect);
1520
- }
1521
- }
1522
- }
1523
- }
1524
- /**
1525
- * Set examples for string nodes
1526
- *
1527
- * @param __isDefaultExample
1528
- * @param example
1529
- * @param nodes
1530
- * @returns true if any of the answers has an example, otherwise undefined
1531
- */
1532
- pushExampleDownTreeString(context, __isDefaultExample, example, ...nodes) {
1533
- if (!__isDefaultExample && !example)
1534
- return;
1535
- if (Array.isArray(nodes)) {
1536
- for (const ds of nodes) {
1537
- if (ds) {
1538
- const exampleNodes = Array.isArray(ds) ? ds : [ds];
1539
- BitUtils.fillStringExample(context.textFormat, exampleNodes, __isDefaultExample, example, false);
1540
- }
1541
- }
1542
- }
1543
- }
1544
- pushExampleDownTreeBodyBits(context, __isDefaultExample, example, body) {
1545
- if (!__isDefaultExample && !example)
1546
- return;
1547
- const bodyBitsJson = this.textParser.extractBodyBits(body === null || body === void 0 ? void 0 : body.body);
1548
- for (const part of bodyBitsJson) {
1549
- if (part) {
1550
- switch (part.type) {
1551
- case BodyBitType.gap: {
1552
- const gap = part;
1553
- BitUtils.fillStringExample(context.textFormat, [gap], __isDefaultExample, example, false);
1554
- break;
1555
- }
1556
- case BodyBitType.mark: {
1557
- const mark = part;
1558
- BitUtils.fillBooleanExample([mark], __isDefaultExample, example, false);
1559
- break;
1560
- }
1561
- case BodyBitType.select: {
1562
- const select = part;
1563
- BitUtils.fillBooleanExample(select.options, __isDefaultExample, example, true);
1564
- break;
1565
- }
1566
- case BodyBitType.highlight: {
1567
- const highlight = part;
1568
- BitUtils.fillBooleanExample(highlight.texts, __isDefaultExample, example, true);
1569
- break;
1570
- }
1571
- }
1572
- }
1573
- }
1574
- }
1575
- /**
1576
- * Push a value down the tree, without overriding existing values
1577
- *
1578
- * This function is not type safe and should be used with care
1579
- *
1580
- * @param body/body[] set if the value should be passed down the body to the body bits / card body bits
1581
- * @param bodyBitTypes body bit types to push the value down to
1582
- * @param cardNode set if the value should be passed down the card node
1583
- * @param path path for the value
1584
- * @param value the value to push down
1585
- */
1586
- pushDownTree(_context, body, bodyBitTypes, cardNode, cardNodePath, path, value) {
1587
- if (value === undefined)
1588
- return;
1589
- // Add value to card nodes if required
1590
- if (cardNode && cardNodePath) {
1591
- if (!Array.isArray(cardNodePath))
1592
- cardNodePath = [cardNodePath];
1593
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
1594
- const data = ObjectUtils.flatMapPath(cardNode, cardNodePath);
1595
- for (const d of data) {
1596
- if (d[path] == null) {
1597
- d[path] = value;
1598
- }
1599
- }
1600
- }
1601
- // Add value to body bit types if required
1602
- if (body) {
1603
- const bodyArray = (Array.isArray(body) ? body : [body]);
1604
- for (const b of bodyArray) {
1605
- if (b && b.body && bodyBitTypes) {
1606
- const bodyBitsJson = this.textParser.extractBodyBits(b.body);
1607
- if (bodyBitTypes && bodyBitsJson && bodyBitsJson.length > 0) {
1608
- for (const part of bodyBitsJson) {
1609
- if (part) {
1610
- if (bodyBitTypes.indexOf(part.type) !== -1) {
1611
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
1612
- const data = part;
1613
- if (data[path] == null) {
1614
- data[path] = value;
1615
- }
1616
- }
1617
- }
1618
- }
1619
- }
1620
- }
1621
- }
1622
- }
1623
- }
1624
- parseExtraProperties(extraProperties) {
1625
- if (!extraProperties)
1626
- return undefined;
1627
- const entries = Object.entries(extraProperties);
1628
- if (entries.length === 0)
1629
- return undefined;
1630
- const res = {};
1631
- for (const [key, value] of entries) {
1632
- res[key] = ArrayUtils.asArray(value) || [value];
1633
- }
1634
- return res;
1635
- }
1636
- /**
1637
- * Set the 'isExample' flags on the bit
1638
- *
1639
- * The flag is set if the bit has an example. The flag is set at each branch level up the tree from
1640
- * where the 'example' exists.
1641
- *
1642
- * @param bit
1643
- */
1644
- setIsExampleFlags(bit) {
1645
- // bit.isExample = false;
1646
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
1647
- const checkIsExample = (example) => {
1648
- if (!example)
1649
- return false;
1650
- if ( /*example.__isDefaultExample ||*/example.isExample || example.example != undefined) {
1651
- example.isExample = true;
1652
- bit.isExample = true;
1653
- }
1654
- else {
1655
- if (example === bit) {
1656
- example.isExample = !!bit.isExample;
1657
- }
1658
- else {
1659
- example.isExample = false;
1660
- }
1661
- }
1662
- return example.isExample;
1663
- };
1664
- const { body, cardNode } = bit;
1665
- // Body bit level
1666
- const bodyBitsJson = this.textParser.extractBodyBits(body === null || body === void 0 ? void 0 : body.body);
1667
- for (const bodyPart of bodyBitsJson) {
1668
- switch (bodyPart.type) {
1669
- case BodyBitType.gap:
1670
- case BodyBitType.mark: {
1671
- checkIsExample(bodyPart);
1672
- break;
1673
- }
1674
- case BodyBitType.select: {
1675
- const select = bodyPart;
1676
- let hasExample = false;
1677
- for (const option of select.options) {
1678
- hasExample = checkIsExample(option) ? true : hasExample;
1679
- }
1680
- select.isExample = hasExample;
1681
- break;
1682
- }
1683
- case BodyBitType.highlight: {
1684
- const highlight = bodyPart;
1685
- let hasExample = false;
1686
- for (const text of highlight.texts) {
1687
- hasExample = checkIsExample(text) ? true : hasExample;
1688
- }
1689
- highlight.isExample = hasExample;
1690
- break;
1691
- }
1692
- }
1693
- }
1694
- // Card level
1695
- if (cardNode) {
1696
- // flashcards
1697
- for (const v of (_a = cardNode.flashcards) !== null && _a !== void 0 ? _a : []) {
1698
- checkIsExample(v);
1699
- }
1700
- // definitions
1701
- for (const v of (_b = cardNode.definitions) !== null && _b !== void 0 ? _b : []) {
1702
- checkIsExample(v);
1703
- }
1704
- // pairs
1705
- for (const v of (_c = cardNode.pairs) !== null && _c !== void 0 ? _c : []) {
1706
- checkIsExample(v);
1707
- }
1708
- // matrix
1709
- for (const mx of (_d = cardNode.matrix) !== null && _d !== void 0 ? _d : []) {
1710
- let hasExample = false;
1711
- // matrix cell
1712
- for (const v of (_e = mx.cells) !== null && _e !== void 0 ? _e : []) {
1713
- hasExample = checkIsExample(v) ? true : hasExample;
1714
- }
1715
- mx.isExample = hasExample;
1716
- }
1717
- // quizzes
1718
- for (const quiz of (_f = cardNode.quizzes) !== null && _f !== void 0 ? _f : []) {
1719
- let hasExample = false;
1720
- // responses
1721
- for (const v of (_g = quiz.responses) !== null && _g !== void 0 ? _g : []) {
1722
- hasExample = checkIsExample(v) ? true : hasExample;
1723
- }
1724
- // choices
1725
- for (const v of (_h = quiz.choices) !== null && _h !== void 0 ? _h : []) {
1726
- hasExample = checkIsExample(v) ? true : hasExample;
1727
- }
1728
- quiz.isExample = hasExample;
1729
- }
1730
- // responses
1731
- for (const v of (_j = cardNode.responses) !== null && _j !== void 0 ? _j : []) {
1732
- checkIsExample(v);
1733
- }
1734
- // choices
1735
- for (const v of (_k = cardNode.choices) !== null && _k !== void 0 ? _k : []) {
1736
- checkIsExample(v);
1737
- }
1738
- // statements
1739
- for (const v of (_l = cardNode.statements) !== null && _l !== void 0 ? _l : []) {
1740
- checkIsExample(v);
1741
- }
1742
- // statement
1743
- checkIsExample(cardNode.statement);
1744
- // NO: elements
1745
- // questions
1746
- for (const v of (_m = cardNode.questions) !== null && _m !== void 0 ? _m : []) {
1747
- checkIsExample(v);
1748
- }
1749
- }
1750
- // Bit level
1751
- // statement
1752
- checkIsExample(bit.statement);
1753
- // responses
1754
- for (const v of (_o = bit.responses) !== null && _o !== void 0 ? _o : []) {
1755
- checkIsExample(v);
1756
- }
1757
- // choices
1758
- for (const v of (_p = bit.choices) !== null && _p !== void 0 ? _p : []) {
1759
- checkIsExample(v);
1760
- }
1761
- // Bit itself
1762
- checkIsExample(bit);
1763
- }
1764
- setDefaultBitValues(bit) {
1765
- // Set aiGenerated == true for all AI generated bits
1766
- switch (bit.bitType) {
1767
- case BitType.articleAi:
1768
- case BitType.noteAi:
1769
- case BitType.summaryAi:
1770
- bit.aiGenerated = this.toAstProperty(PropertyConfigKey.aiGenerated, true);
1771
- break;
1772
- }
1773
- }
1774
- addVersionToParserInfo(bit) {
1775
- var _a;
1776
- const parser = (_a = bit.parser) !== null && _a !== void 0 ? _a : {};
1777
- parser.version = env.appVersion.full;
1778
- bit.parser = parser;
1779
- }
1780
- }
1781
- export { Builder };
1782
- //# sourceMappingURL=Builder.js.map