@tiqian/engine 0.0.0-stage.1 → 0.1.0-alpha.9

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 (478) hide show
  1. package/dist/org/tiqian/clreq/AdjustmentStylePolicy.d.ts +11 -0
  2. package/dist/org/tiqian/clreq/AdjustmentStylePolicy.js +21 -0
  3. package/dist/org/tiqian/clreq/AutoSpaceMode.d.ts +16 -0
  4. package/dist/org/tiqian/clreq/AutoSpaceMode.js +17 -0
  5. package/dist/org/tiqian/clreq/AutoSpacePolicy.d.ts +13 -0
  6. package/dist/org/tiqian/clreq/AutoSpacePolicy.js +23 -0
  7. package/dist/org/tiqian/clreq/BopomofoParser.d.ts +10 -0
  8. package/dist/org/tiqian/clreq/BopomofoParser.js +46 -0
  9. package/dist/org/tiqian/clreq/BopomofoReading.d.ts +12 -0
  10. package/dist/org/tiqian/clreq/BopomofoReading.js +86 -0
  11. package/dist/org/tiqian/clreq/BopomofoTone.d.ts +28 -0
  12. package/dist/org/tiqian/clreq/BopomofoTone.js +26 -0
  13. package/dist/org/tiqian/clreq/CjkPunctuationGlyphPolicy.d.ts +16 -0
  14. package/dist/org/tiqian/clreq/CjkPunctuationGlyphPolicy.js +17 -0
  15. package/dist/org/tiqian/clreq/CjkPunctuationGlyphSubstitution.d.ts +8 -0
  16. package/dist/org/tiqian/clreq/CjkPunctuationGlyphSubstitution.js +25 -0
  17. package/dist/org/tiqian/clreq/ClreqProfile.d.ts +27 -0
  18. package/dist/org/tiqian/clreq/ClreqProfile.js +58 -0
  19. package/dist/org/tiqian/clreq/ClreqProfileResolver.d.ts +10 -0
  20. package/dist/org/tiqian/clreq/ClreqProfileResolver.js +13 -0
  21. package/dist/org/tiqian/clreq/ClreqPunctuationAdvancePolicy.d.ts +7 -0
  22. package/dist/org/tiqian/clreq/ClreqPunctuationAdvancePolicy.js +40 -0
  23. package/dist/org/tiqian/clreq/ClreqPunctuationGlyphSubstitutor.d.ts +19 -0
  24. package/dist/org/tiqian/clreq/ClreqPunctuationGlyphSubstitutor.js +93 -0
  25. package/dist/org/tiqian/clreq/ClreqPunctuationPolicies.d.ts +26 -0
  26. package/dist/org/tiqian/clreq/ClreqPunctuationPolicies.js +137 -0
  27. package/dist/org/tiqian/clreq/ClreqRegion.d.ts +20 -0
  28. package/dist/org/tiqian/clreq/ClreqRegion.js +20 -0
  29. package/dist/org/tiqian/clreq/ClreqStrictness.d.ts +16 -0
  30. package/dist/org/tiqian/clreq/ClreqStrictness.js +17 -0
  31. package/dist/org/tiqian/clreq/GlueSide.d.ts +16 -0
  32. package/dist/org/tiqian/clreq/GlueSide.js +17 -0
  33. package/dist/org/tiqian/clreq/HangingPunctuationStyle.d.ts +12 -0
  34. package/dist/org/tiqian/clreq/HangingPunctuationStyle.js +14 -0
  35. package/dist/org/tiqian/clreq/InteriorPunctuationStyle.d.ts +12 -0
  36. package/dist/org/tiqian/clreq/InteriorPunctuationStyle.js +14 -0
  37. package/dist/org/tiqian/clreq/KinsokuLevel.d.ts +20 -0
  38. package/dist/org/tiqian/clreq/KinsokuLevel.js +20 -0
  39. package/dist/org/tiqian/clreq/KinsokuMode.d.ts +14 -0
  40. package/dist/org/tiqian/clreq/KinsokuMode.js +2 -0
  41. package/dist/org/tiqian/clreq/KinsokuModes.d.ts +11 -0
  42. package/dist/org/tiqian/clreq/KinsokuModes.js +71 -0
  43. package/dist/org/tiqian/clreq/LineAdjustmentStrategy.d.ts +16 -0
  44. package/dist/org/tiqian/clreq/LineAdjustmentStrategy.js +17 -0
  45. package/dist/org/tiqian/clreq/LineEndPunctuationStyle.d.ts +12 -0
  46. package/dist/org/tiqian/clreq/LineEndPunctuationStyle.js +14 -0
  47. package/dist/org/tiqian/clreq/NumberSymbolCohesion.d.ts +8 -0
  48. package/dist/org/tiqian/clreq/NumberSymbolCohesion.js +56 -0
  49. package/dist/org/tiqian/clreq/PunctuationClass.d.ts +44 -0
  50. package/dist/org/tiqian/clreq/PunctuationClass.js +38 -0
  51. package/dist/org/tiqian/clreq/PunctuationGluePlacement.d.ts +12 -0
  52. package/dist/org/tiqian/clreq/PunctuationGluePlacement.js +14 -0
  53. package/dist/org/tiqian/clreq/PunctuationGluePlacements.d.ts +9 -0
  54. package/dist/org/tiqian/clreq/PunctuationGluePlacements.js +49 -0
  55. package/dist/org/tiqian/clreq/PunctuationPolicy.d.ts +10 -0
  56. package/dist/org/tiqian/clreq/PunctuationPolicy.js +18 -0
  57. package/dist/org/tiqian/clreq/PunctuationWidthPolicy.d.ts +8 -0
  58. package/dist/org/tiqian/clreq/PunctuationWidthPolicy.js +16 -0
  59. package/dist/org/tiqian/clreq/ResolvedKinsoku.d.ts +12 -0
  60. package/dist/org/tiqian/clreq/ResolvedKinsoku.js +43 -0
  61. package/dist/org/tiqian/core/AccurateSum.d.ts +3 -0
  62. package/dist/org/tiqian/core/AccurateSum.js +9 -0
  63. package/dist/org/tiqian/core/AutoSpaceDecisionInfo.d.ts +13 -0
  64. package/dist/org/tiqian/core/AutoSpaceDecisionInfo.js +24 -0
  65. package/dist/org/tiqian/core/BopomofoDecisionInfo.d.ts +13 -0
  66. package/dist/org/tiqian/core/BopomofoDecisionInfo.js +32 -0
  67. package/dist/org/tiqian/core/BopomofoGlyphPlacement.d.ts +16 -0
  68. package/dist/org/tiqian/core/BopomofoGlyphPlacement.js +33 -0
  69. package/dist/org/tiqian/core/BopomofoGlyphRole.d.ts +16 -0
  70. package/dist/org/tiqian/core/BopomofoGlyphRole.js +17 -0
  71. package/dist/org/tiqian/core/BreakOpportunityDecisionInfo.d.ts +11 -0
  72. package/dist/org/tiqian/core/BreakOpportunityDecisionInfo.js +52 -0
  73. package/dist/org/tiqian/core/BuiltInLayoutProfiles.d.ts +4 -0
  74. package/dist/org/tiqian/core/BuiltInLayoutProfiles.js +5 -0
  75. package/dist/org/tiqian/core/Cluster.d.ts +13 -0
  76. package/dist/org/tiqian/core/Cluster.js +24 -0
  77. package/dist/org/tiqian/core/ClusterGeometryDecisionInfo.d.ts +21 -0
  78. package/dist/org/tiqian/core/ClusterGeometryDecisionInfo.js +40 -0
  79. package/dist/org/tiqian/core/ColorSpan.d.ts +8 -0
  80. package/dist/org/tiqian/core/ColorSpan.js +25 -0
  81. package/dist/org/tiqian/core/ContextualKinsokuDecisionInfo.d.ts +12 -0
  82. package/dist/org/tiqian/core/ContextualKinsokuDecisionInfo.js +47 -0
  83. package/dist/org/tiqian/core/DecorationDecisionInfo.d.ts +13 -0
  84. package/dist/org/tiqian/core/DecorationDecisionInfo.js +24 -0
  85. package/dist/org/tiqian/core/DecorationKind.d.ts +20 -0
  86. package/dist/org/tiqian/core/DecorationKind.js +20 -0
  87. package/dist/org/tiqian/core/DecorationSegmentInfo.d.ts +15 -0
  88. package/dist/org/tiqian/core/DecorationSegmentInfo.js +28 -0
  89. package/dist/org/tiqian/core/DecorationSpan.d.ts +10 -0
  90. package/dist/org/tiqian/core/DecorationSpan.js +36 -0
  91. package/dist/org/tiqian/core/EastAsianSpacingData.d.ts +4 -0
  92. package/dist/org/tiqian/core/EastAsianSpacingData.js +399 -0
  93. package/dist/org/tiqian/core/EastAsianSpacingEdges.d.ts +8 -0
  94. package/dist/org/tiqian/core/EastAsianSpacingEdges.js +14 -0
  95. package/dist/org/tiqian/core/EastAsianSpacingValue.d.ts +20 -0
  96. package/dist/org/tiqian/core/EastAsianSpacingValue.js +20 -0
  97. package/dist/org/tiqian/core/EmergencyTrackingEligibilityDecisionInfo.d.ts +9 -0
  98. package/dist/org/tiqian/core/EmergencyTrackingEligibilityDecisionInfo.js +29 -0
  99. package/dist/org/tiqian/core/FirstLineIndentDecisionInfo.d.ts +8 -0
  100. package/dist/org/tiqian/core/FirstLineIndentDecisionInfo.js +16 -0
  101. package/dist/org/tiqian/core/FittedLinePatternGeometry.d.ts +2 -0
  102. package/dist/org/tiqian/core/FittedLinePatternGeometry.js +84 -0
  103. package/dist/org/tiqian/core/FontDecisionInfo.d.ts +13 -0
  104. package/dist/org/tiqian/core/FontDecisionInfo.js +45 -0
  105. package/dist/org/tiqian/core/Glyph.d.ts +15 -0
  106. package/dist/org/tiqian/core/Glyph.js +30 -0
  107. package/dist/org/tiqian/core/GlyphRun.d.ts +11 -0
  108. package/dist/org/tiqian/core/GlyphRun.js +28 -0
  109. package/dist/org/tiqian/core/Ic.d.ts +7 -0
  110. package/dist/org/tiqian/core/Ic.js +17 -0
  111. package/dist/org/tiqian/core/IllegalStateException.d.ts +4 -0
  112. package/dist/org/tiqian/core/IllegalStateException.js +8 -0
  113. package/dist/org/tiqian/core/InlineAttachment.d.ts +12 -0
  114. package/dist/org/tiqian/core/InlineAttachment.js +14 -0
  115. package/dist/org/tiqian/core/InlineBoxDecisionInfo.d.ts +12 -0
  116. package/dist/org/tiqian/core/InlineBoxDecisionInfo.js +22 -0
  117. package/dist/org/tiqian/core/InlineBoxOuterSpacing.d.ts +12 -0
  118. package/dist/org/tiqian/core/InlineBoxOuterSpacing.js +14 -0
  119. package/dist/org/tiqian/core/InlineBoxSpan.d.ts +10 -0
  120. package/dist/org/tiqian/core/InlineBoxSpan.js +17 -0
  121. package/dist/org/tiqian/core/InlineObjectBoundaryAdjustment.d.ts +12 -0
  122. package/dist/org/tiqian/core/InlineObjectBoundaryAdjustment.js +31 -0
  123. package/dist/org/tiqian/core/InlineObjectDecisionInfo.d.ts +28 -0
  124. package/dist/org/tiqian/core/InlineObjectDecisionInfo.js +54 -0
  125. package/dist/org/tiqian/core/InlineObjectLineHeightDecisionInfo.d.ts +16 -0
  126. package/dist/org/tiqian/core/InlineObjectLineHeightDecisionInfo.js +57 -0
  127. package/dist/org/tiqian/core/InlineObjectPreferredStretch.d.ts +11 -0
  128. package/dist/org/tiqian/core/InlineObjectPreferredStretch.js +30 -0
  129. package/dist/org/tiqian/core/InlineObjectPreferredStretchKind.d.ts +16 -0
  130. package/dist/org/tiqian/core/InlineObjectPreferredStretchKind.js +17 -0
  131. package/dist/org/tiqian/core/InlineObjectPunctuationAttachmentDecisionInfo.d.ts +12 -0
  132. package/dist/org/tiqian/core/InlineObjectPunctuationAttachmentDecisionInfo.js +22 -0
  133. package/dist/org/tiqian/core/InlineObjectSpan.d.ts +13 -0
  134. package/dist/org/tiqian/core/InlineObjectSpan.js +22 -0
  135. package/dist/org/tiqian/core/IntRange.d.ts +12 -0
  136. package/dist/org/tiqian/core/IntRange.js +30 -0
  137. package/dist/org/tiqian/core/IntRangeFns.d.ts +2 -0
  138. package/dist/org/tiqian/core/IntRangeFns.js +4 -0
  139. package/dist/org/tiqian/core/JustificationAllocationInfo.d.ts +10 -0
  140. package/dist/org/tiqian/core/JustificationAllocationInfo.js +18 -0
  141. package/dist/org/tiqian/core/JustificationDecisionInfo.d.ts +10 -0
  142. package/dist/org/tiqian/core/JustificationDecisionInfo.js +21 -0
  143. package/dist/org/tiqian/core/KinsokuDecisionInfo.d.ts +8 -0
  144. package/dist/org/tiqian/core/KinsokuDecisionInfo.js +16 -0
  145. package/dist/org/tiqian/core/LastLineAlignment.d.ts +16 -0
  146. package/dist/org/tiqian/core/LastLineAlignment.js +17 -0
  147. package/dist/org/tiqian/core/LayoutConstraints.d.ts +7 -0
  148. package/dist/org/tiqian/core/LayoutConstraints.js +24 -0
  149. package/dist/org/tiqian/core/LayoutDebugInfo.d.ts +70 -0
  150. package/dist/org/tiqian/core/LayoutDebugInfo.js +205 -0
  151. package/dist/org/tiqian/core/LayoutInput.d.ts +22 -0
  152. package/dist/org/tiqian/core/LayoutInput.js +56 -0
  153. package/dist/org/tiqian/core/LayoutPaintBounds.d.ts +18 -0
  154. package/dist/org/tiqian/core/LayoutPaintBounds.js +131 -0
  155. package/dist/org/tiqian/core/LayoutProfileId.d.ts +6 -0
  156. package/dist/org/tiqian/core/LayoutProfileId.js +17 -0
  157. package/dist/org/tiqian/core/LayoutQueries.d.ts +121 -0
  158. package/dist/org/tiqian/core/LayoutQueries.js +1297 -0
  159. package/dist/org/tiqian/core/LayoutQueryFns.d.ts +27 -0
  160. package/dist/org/tiqian/core/LayoutQueryFns.js +65 -0
  161. package/dist/org/tiqian/core/LayoutResult.d.ts +16 -0
  162. package/dist/org/tiqian/core/LayoutResult.js +36 -0
  163. package/dist/org/tiqian/core/LayoutResultFns.d.ts +3 -0
  164. package/dist/org/tiqian/core/LayoutResultFns.js +5 -0
  165. package/dist/org/tiqian/core/LayoutResultLineFns.d.ts +4 -0
  166. package/dist/org/tiqian/core/LayoutResultLineFns.js +5 -0
  167. package/dist/org/tiqian/core/LayoutResultReplayIndex.d.ts +37 -0
  168. package/dist/org/tiqian/core/LayoutResultReplayIndex.js +379 -0
  169. package/dist/org/tiqian/core/LineBox.d.ts +23 -0
  170. package/dist/org/tiqian/core/LineBox.js +43 -0
  171. package/dist/org/tiqian/core/LineBreakPolicy.d.ts +8 -0
  172. package/dist/org/tiqian/core/LineBreakPolicy.js +11 -0
  173. package/dist/org/tiqian/core/LineBreakSpan.d.ts +10 -0
  174. package/dist/org/tiqian/core/LineBreakSpan.js +30 -0
  175. package/dist/org/tiqian/core/LineDebugInfo.d.ts +7 -0
  176. package/dist/org/tiqian/core/LineDebugInfo.js +18 -0
  177. package/dist/org/tiqian/core/LineDecisionInfo.d.ts +14 -0
  178. package/dist/org/tiqian/core/LineDecisionInfo.js +32 -0
  179. package/dist/org/tiqian/core/LineEdgeTrimDecisionInfo.d.ts +12 -0
  180. package/dist/org/tiqian/core/LineEdgeTrimDecisionInfo.js +22 -0
  181. package/dist/org/tiqian/core/LineEndReason.d.ts +16 -0
  182. package/dist/org/tiqian/core/LineEndReason.js +17 -0
  183. package/dist/org/tiqian/core/LineLengthGrid.d.ts +7 -0
  184. package/dist/org/tiqian/core/LineLengthGrid.js +12 -0
  185. package/dist/org/tiqian/core/LineLengthGridDecisionInfo.d.ts +13 -0
  186. package/dist/org/tiqian/core/LineLengthGridDecisionInfo.js +26 -0
  187. package/dist/org/tiqian/core/LineRepairAllocationInfo.d.ts +8 -0
  188. package/dist/org/tiqian/core/LineRepairAllocationInfo.js +14 -0
  189. package/dist/org/tiqian/core/LineRepairCandidateInfo.d.ts +16 -0
  190. package/dist/org/tiqian/core/LineRepairCandidateInfo.js +30 -0
  191. package/dist/org/tiqian/core/LineRepairDecisionInfo.d.ts +15 -0
  192. package/dist/org/tiqian/core/LineRepairDecisionInfo.js +31 -0
  193. package/dist/org/tiqian/core/LineSpacingDecisionInfo.d.ts +10 -0
  194. package/dist/org/tiqian/core/LineSpacingDecisionInfo.js +20 -0
  195. package/dist/org/tiqian/core/LinkAddressDisplay.d.ts +3 -0
  196. package/dist/org/tiqian/core/LinkAddressDisplay.js +12 -0
  197. package/dist/org/tiqian/core/MandatoryBreakDecisionInfo.d.ts +10 -0
  198. package/dist/org/tiqian/core/MandatoryBreakDecisionInfo.js +33 -0
  199. package/dist/org/tiqian/core/MaxLinesDecisionInfo.d.ts +8 -0
  200. package/dist/org/tiqian/core/MaxLinesDecisionInfo.js +25 -0
  201. package/dist/org/tiqian/core/MeasureAdaptiveFirstLineIndent.d.ts +8 -0
  202. package/dist/org/tiqian/core/MeasureAdaptiveFirstLineIndent.js +17 -0
  203. package/dist/org/tiqian/core/MetricDecisionInfo.d.ts +19 -0
  204. package/dist/org/tiqian/core/MetricDecisionInfo.js +36 -0
  205. package/dist/org/tiqian/core/ParagraphStyle.d.ts +22 -0
  206. package/dist/org/tiqian/core/ParagraphStyle.js +36 -0
  207. package/dist/org/tiqian/core/PositionedCluster.d.ts +22 -0
  208. package/dist/org/tiqian/core/PositionedCluster.js +52 -0
  209. package/dist/org/tiqian/core/PunctuationDecisionInfo.d.ts +29 -0
  210. package/dist/org/tiqian/core/PunctuationDecisionInfo.js +54 -0
  211. package/dist/org/tiqian/core/Rect.d.ts +12 -0
  212. package/dist/org/tiqian/core/Rect.js +28 -0
  213. package/dist/org/tiqian/core/RichTextBackgroundDrawStyle.d.ts +15 -0
  214. package/dist/org/tiqian/core/RichTextBackgroundDrawStyle.js +25 -0
  215. package/dist/org/tiqian/core/RichTextBackgroundMetricPolicy.d.ts +16 -0
  216. package/dist/org/tiqian/core/RichTextBackgroundMetricPolicy.js +17 -0
  217. package/dist/org/tiqian/core/RichTextBackgroundPaint.d.ts +19 -0
  218. package/dist/org/tiqian/core/RichTextBackgroundPaint.js +51 -0
  219. package/dist/org/tiqian/core/RichTextCornerRadii.d.ts +12 -0
  220. package/dist/org/tiqian/core/RichTextCornerRadii.js +28 -0
  221. package/dist/org/tiqian/core/RichTextLayoutProjection.d.ts +6 -0
  222. package/dist/org/tiqian/core/RichTextLayoutProjection.js +62 -0
  223. package/dist/org/tiqian/core/RichTextLinePattern.d.ts +24 -0
  224. package/dist/org/tiqian/core/RichTextLinePattern.js +46 -0
  225. package/dist/org/tiqian/core/RichTextLineSegment.d.ts +25 -0
  226. package/dist/org/tiqian/core/RichTextLineSegment.js +55 -0
  227. package/dist/org/tiqian/core/RichTextPaint.d.ts +17 -0
  228. package/dist/org/tiqian/core/RichTextPaint.js +64 -0
  229. package/dist/org/tiqian/core/RichTextProjectionFns.d.ts +7 -0
  230. package/dist/org/tiqian/core/RichTextProjectionFns.js +102 -0
  231. package/dist/org/tiqian/core/RichTextRole.d.ts +35 -0
  232. package/dist/org/tiqian/core/RichTextRole.js +57 -0
  233. package/dist/org/tiqian/core/RichTextSpan.d.ts +11 -0
  234. package/dist/org/tiqian/core/RichTextSpan.js +34 -0
  235. package/dist/org/tiqian/core/RoleOverrideInfo.d.ts +12 -0
  236. package/dist/org/tiqian/core/RoleOverrideInfo.js +41 -0
  237. package/dist/org/tiqian/core/RubyDecisionInfo.d.ts +20 -0
  238. package/dist/org/tiqian/core/RubyDecisionInfo.js +46 -0
  239. package/dist/org/tiqian/core/RubyKind.d.ts +12 -0
  240. package/dist/org/tiqian/core/RubyKind.js +14 -0
  241. package/dist/org/tiqian/core/RubyLineHeightDecisionInfo.d.ts +13 -0
  242. package/dist/org/tiqian/core/RubyLineHeightDecisionInfo.js +36 -0
  243. package/dist/org/tiqian/core/RubyLineHeightMode.d.ts +12 -0
  244. package/dist/org/tiqian/core/RubyLineHeightMode.js +14 -0
  245. package/dist/org/tiqian/core/RubySpan.d.ts +13 -0
  246. package/dist/org/tiqian/core/RubySpan.js +60 -0
  247. package/dist/org/tiqian/core/ShapingDecisionInfo.d.ts +21 -0
  248. package/dist/org/tiqian/core/ShapingDecisionInfo.js +40 -0
  249. package/dist/org/tiqian/core/Size.d.ts +6 -0
  250. package/dist/org/tiqian/core/Size.js +12 -0
  251. package/dist/org/tiqian/core/SourceBoundaryBias.d.ts +16 -0
  252. package/dist/org/tiqian/core/SourceBoundaryBias.js +17 -0
  253. package/dist/org/tiqian/core/SourceInteractionBoundaries.d.ts +29 -0
  254. package/dist/org/tiqian/core/SourceInteractionBoundaries.js +193 -0
  255. package/dist/org/tiqian/core/SpacingDecisionInfo.d.ts +13 -0
  256. package/dist/org/tiqian/core/SpacingDecisionInfo.js +24 -0
  257. package/dist/org/tiqian/core/TextRange.d.ts +11 -0
  258. package/dist/org/tiqian/core/TextRange.js +40 -0
  259. package/dist/org/tiqian/core/TextRangeError.d.ts +11 -0
  260. package/dist/org/tiqian/core/TextRangeError.js +2 -0
  261. package/dist/org/tiqian/core/TextSpan.d.ts +8 -0
  262. package/dist/org/tiqian/core/TextSpan.js +12 -0
  263. package/dist/org/tiqian/core/TextStyle.d.ts +12 -0
  264. package/dist/org/tiqian/core/TextStyle.js +28 -0
  265. package/dist/org/tiqian/core/TiqianIllegalArgumentException.d.ts +6 -0
  266. package/dist/org/tiqian/core/TiqianIllegalArgumentException.js +21 -0
  267. package/dist/org/tiqian/core/TiqianNoSuchElementException.d.ts +10 -0
  268. package/dist/org/tiqian/core/TiqianNoSuchElementException.js +16 -0
  269. package/dist/org/tiqian/core/TiqianTextContent.d.ts +12 -0
  270. package/dist/org/tiqian/core/TiqianTextContent.js +38 -0
  271. package/dist/org/tiqian/core/UnicodeCombiningMarkData.d.ts +3 -0
  272. package/dist/org/tiqian/core/UnicodeCombiningMarkData.js +109 -0
  273. package/dist/org/tiqian/core/UnicodeEastAsianSpacing.d.ts +16 -0
  274. package/dist/org/tiqian/core/UnicodeEastAsianSpacing.js +88 -0
  275. package/dist/org/tiqian/core/UnicodeEmojiModifierBaseData.d.ts +3 -0
  276. package/dist/org/tiqian/core/UnicodeEmojiModifierBaseData.js +35 -0
  277. package/dist/org/tiqian/core/UnicodeExtendedPictographicData.d.ts +3 -0
  278. package/dist/org/tiqian/core/UnicodeExtendedPictographicData.js +64 -0
  279. package/dist/org/tiqian/core/UnicodeNumber.d.ts +3 -0
  280. package/dist/org/tiqian/core/UnicodeNumber.js +14 -0
  281. package/dist/org/tiqian/core/UnicodeNumberData.d.ts +3 -0
  282. package/dist/org/tiqian/core/UnicodeNumberData.js +64 -0
  283. package/dist/org/tiqian/core/UnicodeScriptEvidence.d.ts +16 -0
  284. package/dist/org/tiqian/core/UnicodeScriptEvidence.js +17 -0
  285. package/dist/org/tiqian/core/UnicodeScriptEvidenceClassifier.d.ts +7 -0
  286. package/dist/org/tiqian/core/UnicodeScriptEvidenceClassifier.js +17 -0
  287. package/dist/org/tiqian/core/UnicodeScriptEvidenceData.d.ts +4 -0
  288. package/dist/org/tiqian/core/UnicodeScriptEvidenceData.js +295 -0
  289. package/dist/org/tiqian/core/UnicodeWordCharacter.d.ts +6 -0
  290. package/dist/org/tiqian/core/UnicodeWordCharacter.js +17 -0
  291. package/dist/org/tiqian/core/UnicodeWordCharacterData.d.ts +3 -0
  292. package/dist/org/tiqian/core/UnicodeWordCharacterData.js +234 -0
  293. package/dist/org/tiqian/core/Units.d.ts +7 -0
  294. package/dist/org/tiqian/core/Units.js +11 -0
  295. package/dist/org/tiqian/core/WritingMode.d.ts +12 -0
  296. package/dist/org/tiqian/core/WritingMode.js +14 -0
  297. package/dist/org/tiqian/core/ZeroWidthBreakDecisionInfo.d.ts +10 -0
  298. package/dist/org/tiqian/core/ZeroWidthBreakDecisionInfo.js +33 -0
  299. package/dist/org/tiqian/font/BaselineClass.d.ts +24 -0
  300. package/dist/org/tiqian/font/BaselineClass.js +23 -0
  301. package/dist/org/tiqian/font/BaselinePolicy.d.ts +17 -0
  302. package/dist/org/tiqian/font/BaselinePolicy.js +18 -0
  303. package/dist/org/tiqian/font/CjkDashCapabilityPolicy.d.ts +4 -0
  304. package/dist/org/tiqian/font/CjkDashCapabilityPolicy.js +9 -0
  305. package/dist/org/tiqian/font/CjkFontRoleClassifier.d.ts +8 -0
  306. package/dist/org/tiqian/font/CjkFontRoleClassifier.js +43 -0
  307. package/dist/org/tiqian/font/FontMetricSource.d.ts +24 -0
  308. package/dist/org/tiqian/font/FontMetricSource.js +23 -0
  309. package/dist/org/tiqian/font/FontMetrics.d.ts +39 -0
  310. package/dist/org/tiqian/font/FontMetrics.js +106 -0
  311. package/dist/org/tiqian/font/FontMetricsPolicy.d.ts +21 -0
  312. package/dist/org/tiqian/font/FontMetricsPolicy.js +21 -0
  313. package/dist/org/tiqian/font/FontPolicy.d.ts +36 -0
  314. package/dist/org/tiqian/font/FontPolicy.js +157 -0
  315. package/dist/org/tiqian/font/FontRole.d.ts +29 -0
  316. package/dist/org/tiqian/font/FontRole.js +27 -0
  317. package/dist/org/tiqian/font/FontRoleContext.d.ts +13 -0
  318. package/dist/org/tiqian/font/FontRoleContext.js +28 -0
  319. package/dist/org/tiqian/font/InlineShapingStylePolicy.d.ts +4 -0
  320. package/dist/org/tiqian/font/InlineShapingStylePolicy.js +18 -0
  321. package/dist/org/tiqian/font/LayoutFontMetrics.d.ts +18 -0
  322. package/dist/org/tiqian/font/LayoutFontMetrics.js +29 -0
  323. package/dist/org/tiqian/font/MetricBox.d.ts +20 -0
  324. package/dist/org/tiqian/font/MetricBox.js +20 -0
  325. package/dist/org/tiqian/font/PreferCjkForAmbiguousPunctuationResolver.d.ts +10 -0
  326. package/dist/org/tiqian/font/PreferCjkForAmbiguousPunctuationResolver.js +30 -0
  327. package/dist/org/tiqian/font/PunctuationFontPolicy.d.ts +21 -0
  328. package/dist/org/tiqian/font/PunctuationFontPolicy.js +21 -0
  329. package/dist/org/tiqian/font/RawFontMetrics.d.ts +11 -0
  330. package/dist/org/tiqian/font/RawFontMetrics.js +23 -0
  331. package/dist/org/tiqian/font/UnicodeEmojiData.d.ts +3 -0
  332. package/dist/org/tiqian/font/UnicodeEmojiData.js +63 -0
  333. package/dist/org/tiqian/font/UnicodeEmojiPresentationData.d.ts +3 -0
  334. package/dist/org/tiqian/font/UnicodeEmojiPresentationData.js +46 -0
  335. package/dist/org/tiqian/font/UnicodeEmojiStyleVariationData.d.ts +3 -0
  336. package/dist/org/tiqian/font/UnicodeEmojiStyleVariationData.js +71 -0
  337. package/dist/org/tiqian/font/UnicodeSymbolData.d.ts +3 -0
  338. package/dist/org/tiqian/font/UnicodeSymbolData.js +88 -0
  339. package/dist/org/tiqian/layout/AnnotationGeometryStage.d.ts +57 -0
  340. package/dist/org/tiqian/layout/AnnotationGeometryStage.js +622 -0
  341. package/dist/org/tiqian/layout/AsciiPointMarkKinsokuTestSupport.d.ts +52 -0
  342. package/dist/org/tiqian/layout/AsciiPointMarkKinsokuTestSupport.js +209 -0
  343. package/dist/org/tiqian/layout/ClusterRoleResolution.d.ts +30 -0
  344. package/dist/org/tiqian/layout/ClusterRoleResolution.js +215 -0
  345. package/dist/org/tiqian/layout/ContextualDashEllipsisRoleResolver.d.ts +54 -0
  346. package/dist/org/tiqian/layout/ContextualDashEllipsisRoleResolver.js +326 -0
  347. package/dist/org/tiqian/layout/ContextualPunctuationDisplaySubstitution.d.ts +6 -0
  348. package/dist/org/tiqian/layout/ContextualPunctuationDisplaySubstitution.js +8 -0
  349. package/dist/org/tiqian/layout/ContextualQuoteRoleResolver.d.ts +51 -0
  350. package/dist/org/tiqian/layout/ContextualQuoteRoleResolver.js +305 -0
  351. package/dist/org/tiqian/layout/DefaultHyphenator.d.ts +4 -0
  352. package/dist/org/tiqian/layout/DefaultHyphenator.js +7 -0
  353. package/dist/org/tiqian/layout/Justifier.d.ts +64 -0
  354. package/dist/org/tiqian/layout/Justifier.js +474 -0
  355. package/dist/org/tiqian/layout/KinsokuRule.d.ts +15 -0
  356. package/dist/org/tiqian/layout/KinsokuRule.js +24 -0
  357. package/dist/org/tiqian/layout/LayoutDebugAssembly.d.ts +87 -0
  358. package/dist/org/tiqian/layout/LayoutDebugAssembly.js +371 -0
  359. package/dist/org/tiqian/layout/LineAdjustmentStage.d.ts +29 -0
  360. package/dist/org/tiqian/layout/LineAdjustmentStage.js +797 -0
  361. package/dist/org/tiqian/layout/LineBreakPlanningStage.d.ts +149 -0
  362. package/dist/org/tiqian/layout/LineBreakPlanningStage.js +769 -0
  363. package/dist/org/tiqian/layout/LineBreaker.d.ts +54 -0
  364. package/dist/org/tiqian/layout/LineBreaker.js +457 -0
  365. package/dist/org/tiqian/layout/LineGeometryStage.d.ts +63 -0
  366. package/dist/org/tiqian/layout/LineGeometryStage.js +344 -0
  367. package/dist/org/tiqian/layout/LineOptimization.d.ts +125 -0
  368. package/dist/org/tiqian/layout/LineOptimization.js +299 -0
  369. package/dist/org/tiqian/layout/LineRepair.d.ts +30 -0
  370. package/dist/org/tiqian/layout/LineRepair.js +471 -0
  371. package/dist/org/tiqian/layout/ParagraphDpLineBreaker.d.ts +80 -0
  372. package/dist/org/tiqian/layout/ParagraphDpLineBreaker.js +556 -0
  373. package/dist/org/tiqian/layout/ParagraphDpLineBreakerTestSupport.d.ts +23 -0
  374. package/dist/org/tiqian/layout/ParagraphDpLineBreakerTestSupport.js +135 -0
  375. package/dist/org/tiqian/layout/ParagraphLayoutEngine.d.ts +48 -0
  376. package/dist/org/tiqian/layout/ParagraphLayoutEngine.js +199 -0
  377. package/dist/org/tiqian/layout/ParagraphShapingStage.d.ts +63 -0
  378. package/dist/org/tiqian/layout/ParagraphShapingStage.js +1471 -0
  379. package/dist/org/tiqian/layout/PlanLowering.d.ts +10 -0
  380. package/dist/org/tiqian/layout/PlanLowering.js +329 -0
  381. package/dist/org/tiqian/layout/PreparedParagraph.d.ts +32 -0
  382. package/dist/org/tiqian/layout/PreparedParagraph.js +114 -0
  383. package/dist/org/tiqian/layout/ProgressiveBreakDecisions.d.ts +86 -0
  384. package/dist/org/tiqian/layout/ProgressiveBreakDecisions.js +415 -0
  385. package/dist/org/tiqian/layout/ProgressiveBreakTierPriority.d.ts +5 -0
  386. package/dist/org/tiqian/layout/ProgressiveBreakTierPriority.js +33 -0
  387. package/dist/org/tiqian/layout/PunctuationGeometryLedger.d.ts +92 -0
  388. package/dist/org/tiqian/layout/PunctuationGeometryLedger.js +617 -0
  389. package/dist/org/tiqian/layout/PunctuationGeometryStage.d.ts +73 -0
  390. package/dist/org/tiqian/layout/PunctuationGeometryStage.js +631 -0
  391. package/dist/org/tiqian/layout/PunctuationModel.d.ts +181 -0
  392. package/dist/org/tiqian/layout/PunctuationModel.js +414 -0
  393. package/dist/org/tiqian/layout/QuotePairAnalyzer.d.ts +63 -0
  394. package/dist/org/tiqian/layout/QuotePairAnalyzer.js +251 -0
  395. package/dist/org/tiqian/layout/UnicodePunctuationBoundaryResolver.d.ts +88 -0
  396. package/dist/org/tiqian/layout/UnicodePunctuationBoundaryResolver.js +495 -0
  397. package/dist/org/tiqian/layout/WidthIndependentAnnotationCache.d.ts +102 -0
  398. package/dist/org/tiqian/layout/WidthIndependentAnnotationCache.js +1207 -0
  399. package/dist/org/tiqian/linebreak/BreakKind.d.ts +20 -0
  400. package/dist/org/tiqian/linebreak/BreakKind.js +20 -0
  401. package/dist/org/tiqian/linebreak/BreakOpportunity.d.ts +19 -0
  402. package/dist/org/tiqian/linebreak/BreakOpportunity.js +64 -0
  403. package/dist/org/tiqian/linebreak/EnglishHyphenation.d.ts +5 -0
  404. package/dist/org/tiqian/linebreak/EnglishHyphenation.js +14 -0
  405. package/dist/org/tiqian/linebreak/EnglishHyphenationPatterns.d.ts +4 -0
  406. package/dist/org/tiqian/linebreak/EnglishHyphenationPatterns.js +4294 -0
  407. package/dist/org/tiqian/linebreak/Hyphenator.d.ts +17 -0
  408. package/dist/org/tiqian/linebreak/Hyphenator.js +24 -0
  409. package/dist/org/tiqian/linebreak/LiangHyphenator.d.ts +10 -0
  410. package/dist/org/tiqian/linebreak/LiangHyphenator.js +67 -0
  411. package/dist/org/tiqian/linebreak/LineBreakAnalyzer.d.ts +9 -0
  412. package/dist/org/tiqian/linebreak/LineBreakAnalyzer.js +23 -0
  413. package/dist/org/tiqian/linebreak/LineBreakFns.d.ts +2 -0
  414. package/dist/org/tiqian/linebreak/LineBreakFns.js +7 -0
  415. package/dist/org/tiqian/linebreak/ParseTexHyphenationPatterns.d.ts +7 -0
  416. package/dist/org/tiqian/linebreak/ParseTexHyphenationPatterns.js +108 -0
  417. package/dist/org/tiqian/linebreak/ParsedTexHyphenation.d.ts +6 -0
  418. package/dist/org/tiqian/linebreak/ParsedTexHyphenation.js +9 -0
  419. package/dist/org/tiqian/linebreak/UnicodePunctuationLineBreak.d.ts +63 -0
  420. package/dist/org/tiqian/linebreak/UnicodePunctuationLineBreak.js +103 -0
  421. package/dist/org/tiqian/linebreak/UnicodePunctuationLineBreakData.d.ts +3 -0
  422. package/dist/org/tiqian/linebreak/UnicodePunctuationLineBreakData.js +164 -0
  423. package/dist/org/tiqian/protocol/NamedError.d.ts +88 -0
  424. package/dist/org/tiqian/protocol/NamedError.js +71 -0
  425. package/dist/org/tiqian/protocol/NamedErrorNames.d.ts +5 -0
  426. package/dist/org/tiqian/protocol/NamedErrorNames.js +53 -0
  427. package/dist/org/tiqian/protocol/Plan.d.ts +101 -0
  428. package/dist/org/tiqian/protocol/Plan.js +10 -0
  429. package/dist/org/tiqian/protocol/PlanEndReason.d.ts +16 -0
  430. package/dist/org/tiqian/protocol/PlanEndReason.js +17 -0
  431. package/dist/org/tiqian/protocol/PlanJson.d.ts +10 -0
  432. package/dist/org/tiqian/protocol/PlanJson.js +442 -0
  433. package/dist/org/tiqian/protocol/PlanJsonNumber.d.ts +43 -0
  434. package/dist/org/tiqian/protocol/PlanJsonNumber.js +362 -0
  435. package/dist/org/tiqian/protocol/PlanPacked.d.ts +34 -0
  436. package/dist/org/tiqian/protocol/PlanPacked.js +1166 -0
  437. package/dist/org/tiqian/protocol/PlanSchema.d.ts +4 -0
  438. package/dist/org/tiqian/protocol/PlanSchema.js +5 -0
  439. package/dist/org/tiqian/protocol/PlanStyleDelta.d.ts +5 -0
  440. package/dist/org/tiqian/protocol/PlanStyleDelta.js +2 -0
  441. package/dist/org/tiqian/shaping/ReplayableFontBackend.d.ts +48 -0
  442. package/dist/org/tiqian/shaping/ReplayableFontBackend.js +97 -0
  443. package/dist/org/tiqian/shaping/TextShaper.d.ts +71 -0
  444. package/dist/org/tiqian/shaping/TextShaper.js +176 -0
  445. package/dist/org/tiqian/test/TestHelpers.d.ts +5 -0
  446. package/dist/org/tiqian/test/TestHelpers.js +27 -0
  447. package/dist/org/tiqian/test/trace/TestTrace.d.ts +6 -0
  448. package/dist/org/tiqian/test/trace/TestTrace.js +8 -0
  449. package/dist/org/tiqian/test/trace/TestTracePlatform.d.ts +6 -0
  450. package/dist/org/tiqian/test/trace/TestTracePlatform.js +78 -0
  451. package/dist/org/tiqian/test/trace/TestTraceRecorder.d.ts +9 -0
  452. package/dist/org/tiqian/test/trace/TestTraceRecorder.js +36 -0
  453. package/dist/org/tiqian/test/trace/TestTraceRender.d.ts +47 -0
  454. package/dist/org/tiqian/test/trace/TestTraceRender.js +690 -0
  455. package/dist/org/tiqian/test/trace/TestTraceStore.d.ts +18 -0
  456. package/dist/org/tiqian/test/trace/TestTraceStore.js +149 -0
  457. package/dist/org/tiqian/test/trace/TraceAssertionError.d.ts +5 -0
  458. package/dist/org/tiqian/test/trace/TraceAssertionError.js +2 -0
  459. package/dist/org/tiqian/test/trace/TraceAssertionException.d.ts +6 -0
  460. package/dist/org/tiqian/test/trace/TraceAssertionException.js +16 -0
  461. package/dist/org/tiqian/test/trace/TraceField.d.ts +5 -0
  462. package/dist/org/tiqian/test/trace/TraceField.js +10 -0
  463. package/dist/org/tiqian/test/trace/TraceFormat.d.ts +21 -0
  464. package/dist/org/tiqian/test/trace/TraceFormat.js +184 -0
  465. package/dist/org/tiqian/test/trace/TracedAssertions.d.ts +78 -0
  466. package/dist/org/tiqian/test/trace/TracedAssertions.js +749 -0
  467. package/dist/runtime.d.ts +96 -0
  468. package/dist/runtime.js +1612 -0
  469. package/dist/std/FsError.d.ts +48 -0
  470. package/dist/std/FsError.js +2 -0
  471. package/dist/std/FsException.d.ts +6 -0
  472. package/dist/std/FsException.js +45 -0
  473. package/dist/std/UStringException.d.ts +6 -0
  474. package/dist/std/UStringException.js +21 -0
  475. package/dist/std/UStringFault.d.ts +9 -0
  476. package/dist/std/UStringFault.js +2 -0
  477. package/package.json +22 -4
  478. package/README.md +0 -3
@@ -0,0 +1,749 @@
1
+ // Generated by the reflaxe TypeScript target. Do not edit.
2
+ import { ClreqProfile } from "./../../clreq/ClreqProfile.js";
3
+ import { toString } from "./../../core/Ic.js";
4
+ import { IllegalStateException } from "./../../core/IllegalStateException.js";
5
+ import { TiqianIllegalArgumentException } from "./../../core/TiqianIllegalArgumentException.js";
6
+ import { TiqianNoSuchElementException } from "./../../core/TiqianNoSuchElementException.js";
7
+ import { TestHelpers } from "./../TestHelpers.js";
8
+ import { TestTrace } from "./TestTrace.js";
9
+ import { TestTraceRender } from "./TestTraceRender.js";
10
+ import { TraceAssertionException } from "./TraceAssertionException.js";
11
+ import { UStringException } from "./../../../../std/UStringException.js";
12
+ import { SortedTable } from "../../../../runtime.js";
13
+ export class TracedAssertions {
14
+ static assertEquals(expected, actual, message) {
15
+ message = message ?? null;
16
+ TracedAssertions.recordEvent("eq", [TracedAssertions.field("expected", TestTraceRender.renderInt(expected)), TracedAssertions.field("actual", TestTraceRender.renderInt(actual)), TracedAssertions.msgField(message)]);
17
+ if (expected !== actual) {
18
+ TracedAssertions.fail((message === null ? "Expected values to be equal." : message), null);
19
+ }
20
+ }
21
+ static assertEqualsBool(expected, actual, message) {
22
+ message = message ?? null;
23
+ TracedAssertions.recordEvent("eq", [TracedAssertions.field("expected", TestTraceRender.renderBool(expected)), TracedAssertions.field("actual", TestTraceRender.renderBool(actual)), TracedAssertions.msgField(message)]);
24
+ if (expected !== actual) {
25
+ TracedAssertions.fail((message === null ? "Expected values to be equal." : message), null);
26
+ }
27
+ }
28
+ static assertEqualsNullableRepairOption(expected, actual, message) {
29
+ message = message ?? null;
30
+ TracedAssertions.recordEvent("eq", [TracedAssertions.field("expected", (expected === null ? "-" : TracedAssertions.renderRepairOption((expected)))), TracedAssertions.field("actual", (actual === null ? "-" : TracedAssertions.renderRepairOption((actual)))), TracedAssertions.msgField(message)]);
31
+ if (expected !== actual) {
32
+ TracedAssertions.fail((message === null ? "Expected values to be equal." : message), null);
33
+ }
34
+ }
35
+ static assertEqualsNullableString(expected, actual, message) {
36
+ message = message ?? null;
37
+ TracedAssertions.recordEvent("eq", [TracedAssertions.field("expected", (expected === null ? "-" : TestTraceRender.renderString((expected)))), TracedAssertions.field("actual", (actual === null ? "-" : TestTraceRender.renderString((actual)))), TracedAssertions.msgField(message)]);
38
+ if (expected !== actual) {
39
+ TracedAssertions.fail((message === null ? "Expected values to be equal." : message), null);
40
+ }
41
+ }
42
+ static assertEqualsString(expected, actual, message) {
43
+ message = message ?? null;
44
+ TracedAssertions.recordEvent("eq", [TracedAssertions.field("expected", TestTraceRender.renderString(expected)), TracedAssertions.field("actual", TestTraceRender.renderString(actual)), TracedAssertions.msgField(message)]);
45
+ if (expected !== actual) {
46
+ TracedAssertions.fail((message === null ? "Expected values to be equal." : message), null);
47
+ }
48
+ }
49
+ static assertEqualsIc(expected, actual, message) {
50
+ message = message ?? null;
51
+ TracedAssertions.recordEvent("eq", [TracedAssertions.field("expected", toString(expected)), TracedAssertions.field("actual", toString(actual)), TracedAssertions.msgField(message)]);
52
+ if (expected !== actual) {
53
+ TracedAssertions.fail((message === null ? "Expected values to be equal." : message), null);
54
+ }
55
+ }
56
+ static assertEqualsEnum(expected, actual, message) {
57
+ message = message ?? null;
58
+ TracedAssertions.recordEvent("eq", [TracedAssertions.field("expected", String(expected)), TracedAssertions.field("actual", String(actual)), TracedAssertions.msgField(message)]);
59
+ if (expected !== actual) {
60
+ TracedAssertions.fail((message === null ? "Expected values to be equal." : message), null);
61
+ }
62
+ }
63
+ static assertEqualsEastAsianSpacingEdges(expected, actual, message) {
64
+ message = message ?? null;
65
+ TracedAssertions.recordEvent("eq", [TracedAssertions.field("expected", expected.toString()), TracedAssertions.field("actual", actual.toString()), TracedAssertions.msgField(message)]);
66
+ if (expected.leading !== actual.leading || expected.trailing !== actual.trailing || expected.containsWide !== actual.containsWide) {
67
+ TracedAssertions.fail((message === null ? "Expected values to be equal." : message), null);
68
+ }
69
+ }
70
+ static assertEqualsIntArray(expected, actual, message) {
71
+ message = message ?? null;
72
+ TracedAssertions.recordEvent("eq", [TracedAssertions.field("expected", TracedAssertions.renderInts(expected)), TracedAssertions.field("actual", TracedAssertions.renderInts(actual)), TracedAssertions.msgField(message)]);
73
+ if (expected.length !== actual.length) {
74
+ TracedAssertions.fail((message === null ? "Expected arrays to be equal." : message), null);
75
+ }
76
+ let i = 0;
77
+ while (i < expected.length) {
78
+ if (expected[i] !== actual[i]) {
79
+ TracedAssertions.fail((message === null ? "Expected arrays to be equal." : message), null);
80
+ }
81
+ i++;
82
+ }
83
+ }
84
+ static renderInts(values) {
85
+ let buf = [];
86
+ const tail = buf.length > 0 ? buf[buf.length - 1].charCodeAt(buf[buf.length - 1].length - 1) : NaN;
87
+ if (tail >= 55296 && tail <= 56319) {
88
+ throw new UStringException({ kind: "UnpairedSurrogate", unit: tail });
89
+ }
90
+ buf.push("[");
91
+ let i = 0;
92
+ while (i < values.length) {
93
+ if (i > 0) {
94
+ const tail2 = buf.length > 0 ? buf[buf.length - 1].charCodeAt(buf[buf.length - 1].length - 1) : NaN;
95
+ if (tail2 >= 55296 && tail2 <= 56319) {
96
+ throw new UStringException({ kind: "UnpairedSurrogate", unit: tail2 });
97
+ }
98
+ buf.push(", ");
99
+ }
100
+ const tail3 = buf.length > 0 ? buf[buf.length - 1].charCodeAt(buf[buf.length - 1].length - 1) : NaN;
101
+ if (tail3 >= 55296 && tail3 <= 56319 && `${values[i]}`.length > 0 && !(`${values[i]}`.charCodeAt(0) >= 56320 && `${values[i]}`.charCodeAt(0) <= 57343)) {
102
+ throw new UStringException({ kind: "UnpairedSurrogate", unit: tail3 });
103
+ }
104
+ if (`${values[i]}`.length > 0) {
105
+ buf.push(`${values[i]}`);
106
+ }
107
+ i++;
108
+ }
109
+ const tail4 = buf.length > 0 ? buf[buf.length - 1].charCodeAt(buf[buf.length - 1].length - 1) : NaN;
110
+ if (tail4 >= 55296 && tail4 <= 56319) {
111
+ throw new UStringException({ kind: "UnpairedSurrogate", unit: tail4 });
112
+ }
113
+ buf.push("]");
114
+ const tail5 = buf.length > 0 ? buf[buf.length - 1].charCodeAt(buf[buf.length - 1].length - 1) : NaN;
115
+ if (tail5 >= 55296 && tail5 <= 56319) {
116
+ throw new UStringException({ kind: "UnpairedSurrogate", unit: tail5 });
117
+ }
118
+ return buf.join("");
119
+ }
120
+ static assertEqualsStringArray(expected, actual, message) {
121
+ message = message ?? null;
122
+ TracedAssertions.recordEvent("eq", [TracedAssertions.field("expected", TestTraceRender.renderStringArray(expected)), TracedAssertions.field("actual", TestTraceRender.renderStringArray(actual)), TracedAssertions.msgField(message)]);
123
+ if (!TracedAssertions.sameStringArray(expected, actual)) {
124
+ TracedAssertions.fail((message === null ? "Expected values to be equal." : message), null);
125
+ }
126
+ }
127
+ static assertEqualsBopomofoTone(expected, actual, message) {
128
+ message = message ?? null;
129
+ TracedAssertions.recordEvent("eq", [TracedAssertions.field("expected", expected.kind), TracedAssertions.field("actual", actual.kind), TracedAssertions.msgField(message)]);
130
+ if (expected !== actual) {
131
+ TracedAssertions.fail((message === null ? "Expected values to be equal." : message), null);
132
+ }
133
+ }
134
+ static assertEqualsFontRole(expected, actual, message) {
135
+ message = message ?? null;
136
+ TracedAssertions.recordEvent("eq", [TracedAssertions.field("expected", expected.kind), TracedAssertions.field("actual", (actual === null ? "null" : TracedAssertions.renderFontRole((actual)))), TracedAssertions.msgField(message)]);
137
+ if (actual === null || expected !== actual) {
138
+ TracedAssertions.fail((message === null ? "Expected values to be equal." : message), null);
139
+ }
140
+ }
141
+ static renderFontRole(value) {
142
+ return value.kind;
143
+ }
144
+ static assertEqualsQuoteType(expected, actual, message) {
145
+ message = message ?? null;
146
+ TracedAssertions.recordEvent("eq", [TracedAssertions.field("expected", expected.kind), TracedAssertions.field("actual", actual.kind), TracedAssertions.msgField(message)]);
147
+ if (expected !== actual) {
148
+ TracedAssertions.fail((message === null ? "Expected values to be equal." : message), null);
149
+ }
150
+ }
151
+ static assertEqualsQuotePair(expected, actual, message) {
152
+ message = message ?? null;
153
+ TracedAssertions.recordEvent("eq", [TracedAssertions.field("expected", expected.toString()), TracedAssertions.field("actual", actual.toString()), TracedAssertions.msgField(message)]);
154
+ if (expected.openIndex !== actual.openIndex || expected.closeIndex !== actual.closeIndex || expected.quoteType !== actual.quoteType) {
155
+ TracedAssertions.fail((message === null ? "Expected values to be equal." : message), null);
156
+ }
157
+ }
158
+ static renderQuotePairs(values) {
159
+ let buf = [];
160
+ const tail6 = buf.length > 0 ? buf[buf.length - 1].charCodeAt(buf[buf.length - 1].length - 1) : NaN;
161
+ if (tail6 >= 55296 && tail6 <= 56319) {
162
+ throw new UStringException({ kind: "UnpairedSurrogate", unit: tail6 });
163
+ }
164
+ buf.push("[");
165
+ let i = 0;
166
+ while (i < values.length) {
167
+ if (i > 0) {
168
+ const tail7 = buf.length > 0 ? buf[buf.length - 1].charCodeAt(buf[buf.length - 1].length - 1) : NaN;
169
+ if (tail7 >= 55296 && tail7 <= 56319) {
170
+ throw new UStringException({ kind: "UnpairedSurrogate", unit: tail7 });
171
+ }
172
+ buf.push(", ");
173
+ }
174
+ const tail8 = buf.length > 0 ? buf[buf.length - 1].charCodeAt(buf[buf.length - 1].length - 1) : NaN;
175
+ if (tail8 >= 55296 && tail8 <= 56319 && values[i].toString().length > 0 && !(values[i].toString().charCodeAt(0) >= 56320 && values[i].toString().charCodeAt(0) <= 57343)) {
176
+ throw new UStringException({ kind: "UnpairedSurrogate", unit: tail8 });
177
+ }
178
+ if (values[i].toString().length > 0) {
179
+ buf.push(values[i].toString());
180
+ }
181
+ i++;
182
+ }
183
+ const tail9 = buf.length > 0 ? buf[buf.length - 1].charCodeAt(buf[buf.length - 1].length - 1) : NaN;
184
+ if (tail9 >= 55296 && tail9 <= 56319) {
185
+ throw new UStringException({ kind: "UnpairedSurrogate", unit: tail9 });
186
+ }
187
+ buf.push("]");
188
+ const tail10 = buf.length > 0 ? buf[buf.length - 1].charCodeAt(buf[buf.length - 1].length - 1) : NaN;
189
+ if (tail10 >= 55296 && tail10 <= 56319) {
190
+ throw new UStringException({ kind: "UnpairedSurrogate", unit: tail10 });
191
+ }
192
+ return buf.join("");
193
+ }
194
+ static assertEqualsQuotePairArray(expected, actual, message) {
195
+ message = message ?? null;
196
+ TracedAssertions.recordEvent("eq", [TracedAssertions.field("expected", TracedAssertions.renderQuotePairs(expected)), TracedAssertions.field("actual", TracedAssertions.renderQuotePairs(actual)), TracedAssertions.msgField(message)]);
197
+ if (expected.length !== actual.length) {
198
+ TracedAssertions.fail((message === null ? "Expected arrays to be equal." : message), null);
199
+ }
200
+ let i = 0;
201
+ while (i < expected.length) {
202
+ if (expected[i].openIndex !== actual[i].openIndex || expected[i].closeIndex !== actual[i].closeIndex || expected[i].quoteType !== actual[i].quoteType) {
203
+ TracedAssertions.fail((message === null ? "Expected arrays to be equal." : message), null);
204
+ }
205
+ i++;
206
+ }
207
+ }
208
+ static assertEqualsNullableInt(expected, actual, message) {
209
+ message = message ?? null;
210
+ TracedAssertions.recordEvent("eq", [TracedAssertions.field("expected", (expected === null ? "-" : TestTraceRender.renderInt((expected)))), TracedAssertions.field("actual", (actual === null ? "-" : TestTraceRender.renderInt((actual)))), TracedAssertions.msgField(message)]);
211
+ if (expected !== actual) {
212
+ TracedAssertions.fail((message === null ? "Expected values to be equal." : message), null);
213
+ }
214
+ }
215
+ static assertEqualsNullableFloat(expected, actual, message) {
216
+ message = message ?? null;
217
+ TracedAssertions.recordEvent("eq", [TracedAssertions.field("expected", (expected === null ? "-" : TestTraceRender.renderFloat((expected)))), TracedAssertions.field("actual", (actual === null ? "-" : TestTraceRender.renderFloat((actual)))), TracedAssertions.msgField(message)]);
218
+ if (expected !== actual) {
219
+ TracedAssertions.fail((message === null ? "Expected values to be equal." : message), null);
220
+ }
221
+ }
222
+ static assertEqualsTextRangeArray(expected, actual, message) {
223
+ message = message ?? null;
224
+ const expectedText = TracedAssertions.renderTextRangeArray(expected);
225
+ const actualText = TracedAssertions.renderTextRangeArray(actual);
226
+ TracedAssertions.recordEvent("eq", [TracedAssertions.field("expected", expectedText), TracedAssertions.field("actual", actualText), TracedAssertions.msgField(message)]);
227
+ const count = expected.length;
228
+ if (count !== actual.length) {
229
+ TracedAssertions.fail((message === null ? "Expected arrays to be equal." : message), null);
230
+ }
231
+ for (let i = 0; i < count; i += 1) {
232
+ if (expected[i].start !== actual[i].start || expected[i].end !== actual[i].end) {
233
+ TracedAssertions.fail((message === null ? "Expected arrays to be equal." : message), null);
234
+ }
235
+ }
236
+ }
237
+ static renderTextRangeArray(ranges) {
238
+ const parts = [];
239
+ for (let i = 0, count2 = ranges.length; i < count2; i += 1) {
240
+ parts.push(ranges[i].toString());
241
+ }
242
+ return `[${parts.join(", ")}]`;
243
+ }
244
+ static assertEqualsIntRange(expected, actual, message) {
245
+ message = message ?? null;
246
+ TracedAssertions.recordEvent("eq", [TracedAssertions.field("expected", TracedAssertions.renderIntRange(expected)), TracedAssertions.field("actual", TracedAssertions.renderIntRange(actual)), TracedAssertions.msgField(message)]);
247
+ if (expected.start !== actual.start || expected.end !== actual.end) {
248
+ TracedAssertions.fail((message === null ? "Expected values to be equal." : message), null);
249
+ }
250
+ }
251
+ static renderIntRange(r) {
252
+ let buf = [];
253
+ const tail11 = buf.length > 0 ? buf[buf.length - 1].charCodeAt(buf[buf.length - 1].length - 1) : NaN;
254
+ if (tail11 >= 55296 && tail11 <= 56319) {
255
+ throw new UStringException({ kind: "UnpairedSurrogate", unit: tail11 });
256
+ }
257
+ buf.push("[");
258
+ let i = r.start;
259
+ while (i <= r.end) {
260
+ if (i > r.start) {
261
+ const tail12 = buf.length > 0 ? buf[buf.length - 1].charCodeAt(buf[buf.length - 1].length - 1) : NaN;
262
+ if (tail12 >= 55296 && tail12 <= 56319) {
263
+ throw new UStringException({ kind: "UnpairedSurrogate", unit: tail12 });
264
+ }
265
+ buf.push(", ");
266
+ }
267
+ const tail13 = buf.length > 0 ? buf[buf.length - 1].charCodeAt(buf[buf.length - 1].length - 1) : NaN;
268
+ if (tail13 >= 55296 && tail13 <= 56319 && TestTraceRender.renderInt(i).length > 0 && !(TestTraceRender.renderInt(i).charCodeAt(0) >= 56320 && TestTraceRender.renderInt(i).charCodeAt(0) <= 57343)) {
269
+ throw new UStringException({ kind: "UnpairedSurrogate", unit: tail13 });
270
+ }
271
+ if (TestTraceRender.renderInt(i).length > 0) {
272
+ buf.push(TestTraceRender.renderInt(i));
273
+ }
274
+ i++;
275
+ }
276
+ const tail14 = buf.length > 0 ? buf[buf.length - 1].charCodeAt(buf[buf.length - 1].length - 1) : NaN;
277
+ if (tail14 >= 55296 && tail14 <= 56319) {
278
+ throw new UStringException({ kind: "UnpairedSurrogate", unit: tail14 });
279
+ }
280
+ buf.push("]");
281
+ const tail15 = buf.length > 0 ? buf[buf.length - 1].charCodeAt(buf[buf.length - 1].length - 1) : NaN;
282
+ if (tail15 >= 55296 && tail15 <= 56319) {
283
+ throw new UStringException({ kind: "UnpairedSurrogate", unit: tail15 });
284
+ }
285
+ return buf.join("");
286
+ }
287
+ static assertEqualsIntSet(expected, actual, message) {
288
+ message = message ?? null;
289
+ TracedAssertions.recordEvent("eq", [TracedAssertions.field("expected", TracedAssertions.renderIntSet(expected)), TracedAssertions.field("actual", TracedAssertions.renderIntSet(actual)), TracedAssertions.msgField(message)]);
290
+ if (expected.size() !== actual.size()) {
291
+ TracedAssertions.fail((message === null ? "Expected values to be equal." : message), null);
292
+ }
293
+ let i = 0;
294
+ while (i < expected.size()) {
295
+ if (expected.at(i) !== actual.at(i)) {
296
+ TracedAssertions.fail((message === null ? "Expected values to be equal." : message), null);
297
+ }
298
+ i++;
299
+ }
300
+ }
301
+ static renderIntSet(values) {
302
+ let buf = [];
303
+ const tail16 = buf.length > 0 ? buf[buf.length - 1].charCodeAt(buf[buf.length - 1].length - 1) : NaN;
304
+ if (tail16 >= 55296 && tail16 <= 56319) {
305
+ throw new UStringException({ kind: "UnpairedSurrogate", unit: tail16 });
306
+ }
307
+ buf.push("[");
308
+ let i = 0;
309
+ while (i < values.size()) {
310
+ if (i > 0) {
311
+ const tail17 = buf.length > 0 ? buf[buf.length - 1].charCodeAt(buf[buf.length - 1].length - 1) : NaN;
312
+ if (tail17 >= 55296 && tail17 <= 56319) {
313
+ throw new UStringException({ kind: "UnpairedSurrogate", unit: tail17 });
314
+ }
315
+ buf.push(", ");
316
+ }
317
+ const tail18 = buf.length > 0 ? buf[buf.length - 1].charCodeAt(buf[buf.length - 1].length - 1) : NaN;
318
+ if (tail18 >= 55296 && tail18 <= 56319 && TestTraceRender.renderInt(values.at(i)).length > 0 && !(TestTraceRender.renderInt(values.at(i)).charCodeAt(0) >= 56320 && TestTraceRender.renderInt(values.at(i)).charCodeAt(0) <= 57343)) {
319
+ throw new UStringException({ kind: "UnpairedSurrogate", unit: tail18 });
320
+ }
321
+ if (TestTraceRender.renderInt(values.at(i)).length > 0) {
322
+ buf.push(TestTraceRender.renderInt(values.at(i)));
323
+ }
324
+ i++;
325
+ }
326
+ const tail19 = buf.length > 0 ? buf[buf.length - 1].charCodeAt(buf[buf.length - 1].length - 1) : NaN;
327
+ if (tail19 >= 55296 && tail19 <= 56319) {
328
+ throw new UStringException({ kind: "UnpairedSurrogate", unit: tail19 });
329
+ }
330
+ buf.push("]");
331
+ const tail20 = buf.length > 0 ? buf[buf.length - 1].charCodeAt(buf[buf.length - 1].length - 1) : NaN;
332
+ if (tail20 >= 55296 && tail20 <= 56319) {
333
+ throw new UStringException({ kind: "UnpairedSurrogate", unit: tail20 });
334
+ }
335
+ return buf.join("");
336
+ }
337
+ static assertEqualsIntSetUnordered(expected, actual, message) {
338
+ message = message ?? null;
339
+ TracedAssertions.recordEvent("eq", [TracedAssertions.field("expected", TracedAssertions.renderIntListInGivenOrder(expected)), TracedAssertions.field("actual", TracedAssertions.renderIntListInGivenOrder(actual)), TracedAssertions.msgField(message)]);
340
+ const expectedSet = SortedTable.setBuilder(SortedTable.compareInts);
341
+ let i = 0;
342
+ while (i < expected.length) {
343
+ expectedSet.put(expected[i]);
344
+ i++;
345
+ }
346
+ const actualSet = SortedTable.setBuilder(SortedTable.compareInts);
347
+ i = 0;
348
+ while (i < actual.length) {
349
+ actualSet.put(actual[i]);
350
+ i++;
351
+ }
352
+ const e = expectedSet.build();
353
+ const a = actualSet.build();
354
+ if (e.size() !== a.size()) {
355
+ TracedAssertions.fail((message === null ? "Expected values to be equal." : message), null);
356
+ }
357
+ i = 0;
358
+ while (i < e.size()) {
359
+ if (e.at(i) !== a.at(i)) {
360
+ TracedAssertions.fail((message === null ? "Expected values to be equal." : message), null);
361
+ }
362
+ i++;
363
+ }
364
+ }
365
+ static renderIntListInGivenOrder(values) {
366
+ let buf = [];
367
+ const tail21 = buf.length > 0 ? buf[buf.length - 1].charCodeAt(buf[buf.length - 1].length - 1) : NaN;
368
+ if (tail21 >= 55296 && tail21 <= 56319) {
369
+ throw new UStringException({ kind: "UnpairedSurrogate", unit: tail21 });
370
+ }
371
+ buf.push("[");
372
+ let i = 0;
373
+ while (i < values.length) {
374
+ if (i > 0) {
375
+ const tail22 = buf.length > 0 ? buf[buf.length - 1].charCodeAt(buf[buf.length - 1].length - 1) : NaN;
376
+ if (tail22 >= 55296 && tail22 <= 56319) {
377
+ throw new UStringException({ kind: "UnpairedSurrogate", unit: tail22 });
378
+ }
379
+ buf.push(", ");
380
+ }
381
+ const tail23 = buf.length > 0 ? buf[buf.length - 1].charCodeAt(buf[buf.length - 1].length - 1) : NaN;
382
+ if (tail23 >= 55296 && tail23 <= 56319 && TestTraceRender.renderInt(values[i]).length > 0 && !(TestTraceRender.renderInt(values[i]).charCodeAt(0) >= 56320 && TestTraceRender.renderInt(values[i]).charCodeAt(0) <= 57343)) {
383
+ throw new UStringException({ kind: "UnpairedSurrogate", unit: tail23 });
384
+ }
385
+ if (TestTraceRender.renderInt(values[i]).length > 0) {
386
+ buf.push(TestTraceRender.renderInt(values[i]));
387
+ }
388
+ i++;
389
+ }
390
+ const tail24 = buf.length > 0 ? buf[buf.length - 1].charCodeAt(buf[buf.length - 1].length - 1) : NaN;
391
+ if (tail24 >= 55296 && tail24 <= 56319) {
392
+ throw new UStringException({ kind: "UnpairedSurrogate", unit: tail24 });
393
+ }
394
+ buf.push("]");
395
+ const tail25 = buf.length > 0 ? buf[buf.length - 1].charCodeAt(buf[buf.length - 1].length - 1) : NaN;
396
+ if (tail25 >= 55296 && tail25 <= 56319) {
397
+ throw new UStringException({ kind: "UnpairedSurrogate", unit: tail25 });
398
+ }
399
+ return buf.join("");
400
+ }
401
+ static assertEqualsRepairOptionArray(expected, actual, message) {
402
+ message = message ?? null;
403
+ const expectedText = TracedAssertions.renderRepairOptionList(expected);
404
+ const actualText = TracedAssertions.renderRepairOptionList(actual);
405
+ TracedAssertions.recordEvent("eq", [TracedAssertions.field("expected", expectedText), TracedAssertions.field("actual", actualText), TracedAssertions.msgField(message)]);
406
+ if (expectedText !== actualText) {
407
+ TracedAssertions.fail((message === null ? "Expected arrays to be equal." : message), null);
408
+ }
409
+ }
410
+ static renderRepairOptionList(values) {
411
+ let buf = [];
412
+ const tail26 = buf.length > 0 ? buf[buf.length - 1].charCodeAt(buf[buf.length - 1].length - 1) : NaN;
413
+ if (tail26 >= 55296 && tail26 <= 56319) {
414
+ throw new UStringException({ kind: "UnpairedSurrogate", unit: tail26 });
415
+ }
416
+ buf.push("[");
417
+ let i = 0;
418
+ while (i < values.length) {
419
+ if (i > 0) {
420
+ const tail27 = buf.length > 0 ? buf[buf.length - 1].charCodeAt(buf[buf.length - 1].length - 1) : NaN;
421
+ if (tail27 >= 55296 && tail27 <= 56319) {
422
+ throw new UStringException({ kind: "UnpairedSurrogate", unit: tail27 });
423
+ }
424
+ buf.push(", ");
425
+ }
426
+ const tail28 = buf.length > 0 ? buf[buf.length - 1].charCodeAt(buf[buf.length - 1].length - 1) : NaN;
427
+ if (tail28 >= 55296 && tail28 <= 56319 && TracedAssertions.renderRepairOption(values[i]).length > 0 && !(TracedAssertions.renderRepairOption(values[i]).charCodeAt(0) >= 56320 && TracedAssertions.renderRepairOption(values[i]).charCodeAt(0) <= 57343)) {
428
+ throw new UStringException({ kind: "UnpairedSurrogate", unit: tail28 });
429
+ }
430
+ if (TracedAssertions.renderRepairOption(values[i]).length > 0) {
431
+ buf.push(TracedAssertions.renderRepairOption(values[i]));
432
+ }
433
+ i++;
434
+ }
435
+ const tail29 = buf.length > 0 ? buf[buf.length - 1].charCodeAt(buf[buf.length - 1].length - 1) : NaN;
436
+ if (tail29 >= 55296 && tail29 <= 56319) {
437
+ throw new UStringException({ kind: "UnpairedSurrogate", unit: tail29 });
438
+ }
439
+ buf.push("]");
440
+ const tail30 = buf.length > 0 ? buf[buf.length - 1].charCodeAt(buf[buf.length - 1].length - 1) : NaN;
441
+ if (tail30 >= 55296 && tail30 <= 56319) {
442
+ throw new UStringException({ kind: "UnpairedSurrogate", unit: tail30 });
443
+ }
444
+ return buf.join("");
445
+ }
446
+ static renderRepairOption(option) {
447
+ return option.kind === "LeaveRagged" ? ("LeaveRagged(penalty=" + option.penalty + ", reason=" + option.reason + ", offenderClusterIndex=" + option.offenderClusterIndex + ")") : option.kind === "CarryNext" ? ("CarryNext(penalty=" + option.penalty + ", reason=" + option.reason + ", movedClusterIndex=" + option.movedClusterIndex + ")") : option.kind === "CarryPrevious" ? ("CarryPrevious(penalty=" + option.penalty + ", reason=" + option.reason + ", offenderClusterIndex=" + option.offenderClusterIndex + ", carriedClusterIndex=" + option.carriedClusterIndex + ")") : option.kind === "Hang" ? ("Hang(penalty=" + option.penalty + ", reason=" + option.reason + ", offenderClusterIndex=" + option.offenderClusterIndex + ")") : ("PushIn(penalty=" + option.penalty + ", reason=" + option.reason + ", offenderClusterIndex=" + option.offenderClusterIndex + ", allocations=" + (() => { let out = "["; const n = option.allocations.length; for (let i = 0; i < n; i += 1) {
448
+ if (i > 0) {
449
+ out += ", ";
450
+ }
451
+ out += option.allocations[i].toString();
452
+ } out += "]"; return out; })() + ", totalShrink=" + option.totalShrink + ", totalAvailableCapacity=" + option.totalAvailableCapacity + ")");
453
+ }
454
+ static renderPushInAllocations(values) {
455
+ let buf = [];
456
+ const tail31 = buf.length > 0 ? buf[buf.length - 1].charCodeAt(buf[buf.length - 1].length - 1) : NaN;
457
+ if (tail31 >= 55296 && tail31 <= 56319) {
458
+ throw new UStringException({ kind: "UnpairedSurrogate", unit: tail31 });
459
+ }
460
+ buf.push("[");
461
+ let i = 0;
462
+ while (i < values.length) {
463
+ if (i > 0) {
464
+ const tail32 = buf.length > 0 ? buf[buf.length - 1].charCodeAt(buf[buf.length - 1].length - 1) : NaN;
465
+ if (tail32 >= 55296 && tail32 <= 56319) {
466
+ throw new UStringException({ kind: "UnpairedSurrogate", unit: tail32 });
467
+ }
468
+ buf.push(", ");
469
+ }
470
+ const tail33 = buf.length > 0 ? buf[buf.length - 1].charCodeAt(buf[buf.length - 1].length - 1) : NaN;
471
+ if (tail33 >= 55296 && tail33 <= 56319 && values[i].toString().length > 0 && !(values[i].toString().charCodeAt(0) >= 56320 && values[i].toString().charCodeAt(0) <= 57343)) {
472
+ throw new UStringException({ kind: "UnpairedSurrogate", unit: tail33 });
473
+ }
474
+ if (values[i].toString().length > 0) {
475
+ buf.push(values[i].toString());
476
+ }
477
+ i++;
478
+ }
479
+ const tail34 = buf.length > 0 ? buf[buf.length - 1].charCodeAt(buf[buf.length - 1].length - 1) : NaN;
480
+ if (tail34 >= 55296 && tail34 <= 56319) {
481
+ throw new UStringException({ kind: "UnpairedSurrogate", unit: tail34 });
482
+ }
483
+ buf.push("]");
484
+ const tail35 = buf.length > 0 ? buf[buf.length - 1].charCodeAt(buf[buf.length - 1].length - 1) : NaN;
485
+ if (tail35 >= 55296 && tail35 <= 56319) {
486
+ throw new UStringException({ kind: "UnpairedSurrogate", unit: tail35 });
487
+ }
488
+ return buf.join("");
489
+ }
490
+ static assertEqualsPushInAllocationArray(expected, actual, message) {
491
+ message = message ?? null;
492
+ const expectedText = TracedAssertions.renderPushInAllocations(expected);
493
+ const actualText = TracedAssertions.renderPushInAllocations(actual);
494
+ TracedAssertions.recordEvent("eq", [TracedAssertions.field("expected", expectedText), TracedAssertions.field("actual", actualText), TracedAssertions.msgField(message)]);
495
+ if (expectedText !== actualText) {
496
+ TracedAssertions.fail((message === null ? "Expected arrays to be equal." : message), null);
497
+ }
498
+ }
499
+ static assertEqualsBopomofoReading(expected, actual, message) {
500
+ message = message ?? null;
501
+ TracedAssertions.recordEvent("eq", [TracedAssertions.field("expected", expected.toString()), TracedAssertions.field("actual", actual.toString()), TracedAssertions.msgField(message)]);
502
+ if (!TracedAssertions.sameStringArray(expected.symbols, actual.symbols) || expected.tone !== actual.tone) {
503
+ TracedAssertions.fail((message === null ? "Expected values to be equal." : message), null);
504
+ }
505
+ }
506
+ static assertEqualsPunctuationClass(expected, actual, message) {
507
+ message = message ?? null;
508
+ TracedAssertions.recordEvent("eq", [TracedAssertions.field("expected", expected.kind), TracedAssertions.field("actual", actual.kind), TracedAssertions.msgField(message)]);
509
+ if (expected !== actual) {
510
+ TracedAssertions.fail((message === null ? "Expected values to be equal." : message), null);
511
+ }
512
+ }
513
+ static assertEqualsGlueSide(expected, actual, message) {
514
+ message = message ?? null;
515
+ TracedAssertions.recordEvent("eq", [TracedAssertions.field("expected", expected.kind), TracedAssertions.field("actual", actual.kind), TracedAssertions.msgField(message)]);
516
+ if (expected !== actual) {
517
+ TracedAssertions.fail((message === null ? "Expected values to be equal." : message), null);
518
+ }
519
+ }
520
+ static assertEqualsPunctuationGluePlacement(expected, actual, message) {
521
+ message = message ?? null;
522
+ TracedAssertions.recordEvent("eq", [TracedAssertions.field("expected", expected.kind), TracedAssertions.field("actual", actual.kind), TracedAssertions.msgField(message)]);
523
+ if (expected !== actual) {
524
+ TracedAssertions.fail((message === null ? "Expected values to be equal." : message), null);
525
+ }
526
+ }
527
+ static assertEqualsKinsokuLevel(expected, actual, message) {
528
+ message = message ?? null;
529
+ TracedAssertions.recordEvent("eq", [TracedAssertions.field("expected", expected.kind), TracedAssertions.field("actual", actual.kind), TracedAssertions.msgField(message)]);
530
+ if (expected !== actual) {
531
+ TracedAssertions.fail((message === null ? "Expected values to be equal." : message), null);
532
+ }
533
+ }
534
+ static assertEqualsHangingPunctuationStyle(expected, actual, message) {
535
+ message = message ?? null;
536
+ TracedAssertions.recordEvent("eq", [TracedAssertions.field("expected", expected.kind), TracedAssertions.field("actual", actual.kind), TracedAssertions.msgField(message)]);
537
+ if (expected !== actual) {
538
+ TracedAssertions.fail((message === null ? "Expected values to be equal." : message), null);
539
+ }
540
+ }
541
+ static assertEqualsClreqProfile(expected, actual, message) {
542
+ message = message ?? null;
543
+ TracedAssertions.recordEvent("eq", [TracedAssertions.field("expected", TestTraceRender.cap(expected.toString())), TracedAssertions.field("actual", TestTraceRender.cap(actual.toString())), TracedAssertions.msgField(message)]);
544
+ if (!ClreqProfile.sameProfile(expected, actual)) {
545
+ TracedAssertions.fail((message === null ? "Expected values to be equal." : message), null);
546
+ }
547
+ }
548
+ static sameStringArray(first, second) {
549
+ if (first.length !== second.length) {
550
+ return false;
551
+ }
552
+ let index = 0;
553
+ while (index < first.length) {
554
+ if (first[index] !== second[index]) {
555
+ return false;
556
+ }
557
+ index += 1;
558
+ }
559
+ return true;
560
+ }
561
+ static f32Literal(value) {
562
+ return TestHelpers.f32Literal(value);
563
+ }
564
+ static assertEqualsFloat(expected, actual, message) {
565
+ message = message ?? null;
566
+ TracedAssertions.recordEvent("eq", [TracedAssertions.field("expected", TestTraceRender.renderFloat(expected)), TracedAssertions.field("actual", TestTraceRender.renderFloat(actual)), TracedAssertions.msgField(message)]);
567
+ if (expected !== actual) {
568
+ TracedAssertions.fail((message === null ? "Expected values to be equal." : message), null);
569
+ }
570
+ }
571
+ static assertEqualsFloatTolerance(expected, actual, tolerance, message) {
572
+ message = message ?? null;
573
+ TracedAssertions.recordEvent("eq-tol", [TracedAssertions.field("expected", TestTraceRender.renderFloat(expected)), TracedAssertions.field("actual", TestTraceRender.renderFloat(actual)), TracedAssertions.field("tol", TestTraceRender.renderFloat(tolerance)), TracedAssertions.msgField(message)]);
574
+ if (expected !== expected || actual !== actual || Math.abs(expected - actual) > tolerance) {
575
+ TracedAssertions.fail((message === null ? "Expected values to be equal within tolerance." : message), null);
576
+ }
577
+ }
578
+ static assertEqualsRendered(expected, actual, message) {
579
+ message = message ?? null;
580
+ const expectedText = TestTraceRender.cap(expected);
581
+ const actualText = TestTraceRender.cap(actual);
582
+ TracedAssertions.recordEvent("eq", [TracedAssertions.field("expected", expectedText), TracedAssertions.field("actual", actualText), TracedAssertions.msgField(message)]);
583
+ if (expectedText !== actualText) {
584
+ TracedAssertions.fail((message === null ? "Expected rendered values to be equal." : message), null);
585
+ }
586
+ }
587
+ static assertEqualsInt(expected, actual, message) {
588
+ message = message ?? null;
589
+ TracedAssertions.recordEvent("eq", [TracedAssertions.field("expected", TestTraceRender.renderInt(expected)), TracedAssertions.field("actual", TestTraceRender.renderInt(actual)), TracedAssertions.msgField(message)]);
590
+ if (expected !== actual) {
591
+ TracedAssertions.fail((message === null ? "Expected values to be equal." : message), null);
592
+ }
593
+ }
594
+ static assertTrue(actual, message) {
595
+ message = message ?? null;
596
+ TracedAssertions.recordEvent("is-true", [TracedAssertions.field("actual", TestTraceRender.renderBool(actual)), TracedAssertions.msgField(message)]);
597
+ if (!actual) {
598
+ TracedAssertions.fail((message === null ? "Expected value to be true." : message), null);
599
+ }
600
+ }
601
+ static assertFalse(actual, message) {
602
+ message = message ?? null;
603
+ TracedAssertions.recordEvent("is-false", [TracedAssertions.field("actual", TestTraceRender.renderBool(actual)), TracedAssertions.msgField(message)]);
604
+ if (actual) {
605
+ TracedAssertions.fail((message === null ? "Expected value to be false." : message), null);
606
+ }
607
+ }
608
+ static assertNullRendered(wasNull, renderedActual, message) {
609
+ message = message ?? null;
610
+ TracedAssertions.recordEvent("null", [TracedAssertions.field("actual", renderedActual), TracedAssertions.msgField(message)]);
611
+ if (!wasNull) {
612
+ TracedAssertions.fail((message === null ? "Expected value to be null." : message), null);
613
+ }
614
+ }
615
+ static assertNotNullRendered(wasNotNull, renderedActual, message) {
616
+ message = message ?? null;
617
+ TracedAssertions.recordEvent("not-null", [TracedAssertions.field("actual", renderedActual), TracedAssertions.msgField(message)]);
618
+ if (!wasNotNull) {
619
+ TracedAssertions.fail((message === null ? "Expected value to be non-null." : message), null);
620
+ }
621
+ }
622
+ static recordRenderedNotNull(renderedActual, message) {
623
+ message = message ?? null;
624
+ TracedAssertions.recordEvent("not-null", [TracedAssertions.field("actual", renderedActual), TracedAssertions.msgField(message)]);
625
+ }
626
+ static assertFailsWith(message, block) {
627
+ let caught = null;
628
+ let derived = false;
629
+ try {
630
+ try {
631
+ block();
632
+ }
633
+ catch (error) {
634
+ if (error instanceof IllegalStateException) {
635
+ caught = error;
636
+ derived = true;
637
+ }
638
+ else {
639
+ throw error;
640
+ }
641
+ }
642
+ }
643
+ catch (error) {
644
+ if (error instanceof TiqianIllegalArgumentException) {
645
+ caught = error;
646
+ derived = false;
647
+ }
648
+ else {
649
+ throw error;
650
+ }
651
+ }
652
+ if (caught !== null) {
653
+ TracedAssertions.recordEvent("raises", [TracedAssertions.field("exception", (derived ? "IllegalStateException" : "TiqianIllegalArgumentException")), TracedAssertions.field("thrown", TestTraceRender.renderString(caught.message)), TracedAssertions.msgField((message))]);
654
+ return caught;
655
+ }
656
+ TracedAssertions.recordEvent("fail", [TracedAssertions.msgField((message))]);
657
+ throw new TraceAssertionException({ kind: "AssertionFailed", message: (message === null ? "Expected an exception." : message) });
658
+ }
659
+ static assertFailsWithNoSuchElement(message, block) {
660
+ try {
661
+ block();
662
+ }
663
+ catch (error) {
664
+ if (error instanceof TiqianNoSuchElementException) {
665
+ TracedAssertions.recordEvent("raises", [TracedAssertions.field("exception", "TiqianNoSuchElementException"), TracedAssertions.field("thrown", TestTraceRender.renderString(error.message)), TracedAssertions.msgField((message))]);
666
+ return error;
667
+ }
668
+ else {
669
+ throw error;
670
+ }
671
+ }
672
+ TracedAssertions.recordEvent("fail", [TracedAssertions.msgField((message))]);
673
+ throw new TraceAssertionException({ kind: "AssertionFailed", message: (message === null ? "Expected an exception." : message) });
674
+ }
675
+ static fail(message, _cause) {
676
+ message = message ?? null;
677
+ _cause = _cause ?? null;
678
+ const text = message ?? "Assertion failed.";
679
+ TracedAssertions.recordEvent("fail", [TracedAssertions.msgField(message)]);
680
+ throw new TraceAssertionException({ kind: "AssertionFailed", message: text });
681
+ }
682
+ static assertDoesNotThrow(block) {
683
+ const result = block();
684
+ TracedAssertions.recordEvent("no-throw", []);
685
+ return result;
686
+ }
687
+ static recordEvent(name, fields) {
688
+ if (!TestTrace.updateMode) {
689
+ return;
690
+ }
691
+ let line = [];
692
+ const tail36 = line.length > 0 ? line[line.length - 1].charCodeAt(line[line.length - 1].length - 1) : NaN;
693
+ if (tail36 >= 55296 && tail36 <= 56319 && name.length > 0 && !(name.charCodeAt(0) >= 56320 && name.charCodeAt(0) <= 57343)) {
694
+ throw new UStringException({ kind: "UnpairedSurrogate", unit: tail36 });
695
+ }
696
+ if (name.length > 0) {
697
+ line.push(name);
698
+ }
699
+ let index = 0;
700
+ while (index < fields.length) {
701
+ const current = fields[index];
702
+ if (current !== null) {
703
+ const tail37 = line.length > 0 ? line[line.length - 1].charCodeAt(line[line.length - 1].length - 1) : NaN;
704
+ if (tail37 >= 55296 && tail37 <= 56319) {
705
+ throw new UStringException({ kind: "UnpairedSurrogate", unit: tail37 });
706
+ }
707
+ line.push(" ");
708
+ const tail38 = line.length > 0 ? line[line.length - 1].charCodeAt(line[line.length - 1].length - 1) : NaN;
709
+ if (tail38 >= 55296 && tail38 <= 56319 && current.key.length > 0 && !(current.key.charCodeAt(0) >= 56320 && current.key.charCodeAt(0) <= 57343)) {
710
+ throw new UStringException({ kind: "UnpairedSurrogate", unit: tail38 });
711
+ }
712
+ if (current.key.length > 0) {
713
+ line.push(current.key);
714
+ }
715
+ const tail39 = line.length > 0 ? line[line.length - 1].charCodeAt(line[line.length - 1].length - 1) : NaN;
716
+ if (tail39 >= 55296 && tail39 <= 56319) {
717
+ throw new UStringException({ kind: "UnpairedSurrogate", unit: tail39 });
718
+ }
719
+ line.push("=");
720
+ const tail40 = line.length > 0 ? line[line.length - 1].charCodeAt(line[line.length - 1].length - 1) : NaN;
721
+ if (tail40 >= 55296 && tail40 <= 56319 && TestTraceRender.canonicalNumbers(current.value).length > 0 && !(TestTraceRender.canonicalNumbers(current.value).charCodeAt(0) >= 56320 && TestTraceRender.canonicalNumbers(current.value).charCodeAt(0) <= 57343)) {
722
+ throw new UStringException({ kind: "UnpairedSurrogate", unit: tail40 });
723
+ }
724
+ if (TestTraceRender.canonicalNumbers(current.value).length > 0) {
725
+ line.push(TestTraceRender.canonicalNumbers(current.value));
726
+ }
727
+ }
728
+ index += 1;
729
+ }
730
+ const tail41 = line.length > 0 ? line[line.length - 1].charCodeAt(line[line.length - 1].length - 1) : NaN;
731
+ if (tail41 >= 55296 && tail41 <= 56319) {
732
+ throw new UStringException({ kind: "UnpairedSurrogate", unit: tail41 });
733
+ }
734
+ const rendered = line.join("");
735
+ const recorder = TestTrace.currentRecorder();
736
+ if (recorder !== null) {
737
+ recorder.record(rendered);
738
+ }
739
+ }
740
+ static field(key, value) {
741
+ return { key, value };
742
+ }
743
+ static msgField(message) {
744
+ if (message === null) {
745
+ return null;
746
+ }
747
+ return TracedAssertions.field("msg", `'${TestTraceRender.escapeOperand((message))}'`);
748
+ }
749
+ }