@mlightcad/cad-simple-viewer 1.4.13 → 1.5.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 (406) hide show
  1. package/dist/index.js +16972 -11328
  2. package/dist/index.umd.cjs +158 -34
  3. package/dist/libredwg-parser-worker.js +4828 -4464
  4. package/dist/mtext-renderer-worker.js +3587 -3534
  5. package/lib/app/AcApDocManager.d.ts +14 -5
  6. package/lib/app/AcApDocManager.d.ts.map +1 -1
  7. package/lib/app/AcApDocManager.js +62 -19
  8. package/lib/app/AcApDocManager.js.map +1 -1
  9. package/lib/command/AcApLogCmd.d.ts +1 -1
  10. package/lib/command/AcApLogCmd.d.ts.map +1 -1
  11. package/lib/command/AcApLogCmd.js +1 -1
  12. package/lib/command/AcApLogCmd.js.map +1 -1
  13. package/lib/command/AcApOpenCmd.d.ts +1 -1
  14. package/lib/command/AcApOpenCmd.d.ts.map +1 -1
  15. package/lib/command/AcApOpenCmd.js +1 -2
  16. package/lib/command/AcApOpenCmd.js.map +1 -1
  17. package/lib/command/AcApPanCmd.d.ts +1 -1
  18. package/lib/command/AcApPanCmd.d.ts.map +1 -1
  19. package/lib/command/AcApPanCmd.js +1 -2
  20. package/lib/command/AcApPanCmd.js.map +1 -1
  21. package/lib/command/AcApQNewCmd.d.ts +1 -1
  22. package/lib/command/AcApQNewCmd.d.ts.map +1 -1
  23. package/lib/command/AcApQNewCmd.js +1 -1
  24. package/lib/command/AcApQNewCmd.js.map +1 -1
  25. package/lib/command/AcApRegenCmd.d.ts +1 -1
  26. package/lib/command/AcApRegenCmd.d.ts.map +1 -1
  27. package/lib/command/AcApRegenCmd.js +1 -1
  28. package/lib/command/AcApRegenCmd.js.map +1 -1
  29. package/lib/command/AcApSelectCmd.d.ts +1 -1
  30. package/lib/command/AcApSelectCmd.d.ts.map +1 -1
  31. package/lib/command/AcApSelectCmd.js +1 -2
  32. package/lib/command/AcApSelectCmd.js.map +1 -1
  33. package/lib/command/{AcApConvertToDxfCmd.d.ts → convert/AcApConvertToDxfCmd.d.ts} +2 -2
  34. package/lib/command/convert/AcApConvertToDxfCmd.d.ts.map +1 -0
  35. package/lib/command/{AcApConvertToDxfCmd.js → convert/AcApConvertToDxfCmd.js} +1 -1
  36. package/lib/command/convert/AcApConvertToDxfCmd.js.map +1 -0
  37. package/lib/command/{AcApConvertToPngCmd.d.ts → convert/AcApConvertToPngCmd.d.ts} +23 -5
  38. package/lib/command/convert/AcApConvertToPngCmd.d.ts.map +1 -0
  39. package/lib/command/{AcApConvertToPngCmd.js → convert/AcApConvertToPngCmd.js} +88 -15
  40. package/lib/command/convert/AcApConvertToPngCmd.js.map +1 -0
  41. package/lib/command/{AcApConvertToSvgCmd.d.ts → convert/AcApConvertToSvgCmd.d.ts} +2 -2
  42. package/lib/command/convert/AcApConvertToSvgCmd.d.ts.map +1 -0
  43. package/lib/command/{AcApConvertToSvgCmd.js → convert/AcApConvertToSvgCmd.js} +1 -1
  44. package/lib/command/convert/AcApConvertToSvgCmd.js.map +1 -0
  45. package/lib/command/convert/AcApDxfConvertor.d.ts.map +1 -0
  46. package/lib/command/{AcApDxfConvertor.js → convert/AcApDxfConvertor.js} +1 -1
  47. package/lib/command/convert/AcApDxfConvertor.js.map +1 -0
  48. package/lib/command/{AcApPngConvertor.d.ts → convert/AcApPngConvertor.d.ts} +20 -35
  49. package/lib/command/convert/AcApPngConvertor.d.ts.map +1 -0
  50. package/lib/command/{AcApPngConvertor.js → convert/AcApPngConvertor.js} +99 -71
  51. package/lib/command/convert/AcApPngConvertor.js.map +1 -0
  52. package/lib/command/convert/AcApSvgConvertor.d.ts.map +1 -0
  53. package/lib/command/{AcApSvgConvertor.js → convert/AcApSvgConvertor.js} +1 -1
  54. package/lib/command/convert/AcApSvgConvertor.js.map +1 -0
  55. package/lib/command/convert/index.d.ts +6 -0
  56. package/lib/command/convert/index.d.ts.map +1 -0
  57. package/lib/command/convert/index.js +6 -0
  58. package/lib/command/convert/index.js.map +1 -0
  59. package/lib/command/draw/AcApArcCmd.d.ts +297 -0
  60. package/lib/command/draw/AcApArcCmd.d.ts.map +1 -0
  61. package/lib/command/{AcApArcCmd.js → draw/AcApArcCmd.js} +793 -12
  62. package/lib/command/draw/AcApArcCmd.js.map +1 -0
  63. package/lib/command/{AcApCircleCmd.d.ts → draw/AcApCircleCmd.d.ts} +2 -2
  64. package/lib/command/draw/AcApCircleCmd.d.ts.map +1 -0
  65. package/lib/command/{AcApCircleCmd.js → draw/AcApCircleCmd.js} +3 -3
  66. package/lib/command/draw/AcApCircleCmd.js.map +1 -0
  67. package/lib/command/{AcApDimLinearCmd.d.ts → draw/AcApDimLinearCmd.d.ts} +2 -2
  68. package/lib/command/draw/AcApDimLinearCmd.d.ts.map +1 -0
  69. package/lib/command/{AcApDimLinearCmd.js → draw/AcApDimLinearCmd.js} +3 -3
  70. package/lib/command/draw/AcApDimLinearCmd.js.map +1 -0
  71. package/lib/command/{AcApEllipseCmd.d.ts → draw/AcApEllipseCmd.d.ts} +2 -2
  72. package/lib/command/draw/AcApEllipseCmd.d.ts.map +1 -0
  73. package/lib/command/{AcApEllipseCmd.js → draw/AcApEllipseCmd.js} +3 -3
  74. package/lib/command/draw/AcApEllipseCmd.js.map +1 -0
  75. package/lib/command/{AcApHatchCmd.d.ts → draw/AcApHatchCmd.d.ts} +54 -17
  76. package/lib/command/draw/AcApHatchCmd.d.ts.map +1 -0
  77. package/lib/command/{AcApHatchCmd.js → draw/AcApHatchCmd.js} +122 -30
  78. package/lib/command/draw/AcApHatchCmd.js.map +1 -0
  79. package/lib/command/{AcApLineCmd.d.ts → draw/AcApLineCmd.d.ts} +2 -2
  80. package/lib/command/draw/AcApLineCmd.d.ts.map +1 -0
  81. package/lib/command/{AcApLineCmd.js → draw/AcApLineCmd.js} +3 -3
  82. package/lib/command/draw/AcApLineCmd.js.map +1 -0
  83. package/lib/command/draw/AcApMLineCmd.d.ts +31 -0
  84. package/lib/command/draw/AcApMLineCmd.d.ts.map +1 -0
  85. package/lib/command/draw/AcApMLineCmd.js +531 -0
  86. package/lib/command/draw/AcApMLineCmd.js.map +1 -0
  87. package/lib/command/{AcApMTextCmd.d.ts → draw/AcApMTextCmd.d.ts} +2 -2
  88. package/lib/command/draw/AcApMTextCmd.d.ts.map +1 -0
  89. package/lib/command/{AcApMTextCmd.js → draw/AcApMTextCmd.js} +3 -3
  90. package/lib/command/draw/AcApMTextCmd.js.map +1 -0
  91. package/lib/command/draw/AcApPointCmd.d.ts +16 -0
  92. package/lib/command/draw/AcApPointCmd.d.ts.map +1 -0
  93. package/lib/command/draw/AcApPointCmd.js +98 -0
  94. package/lib/command/draw/AcApPointCmd.js.map +1 -0
  95. package/lib/command/{AcApPolygonCmd.d.ts → draw/AcApPolygonCmd.d.ts} +2 -2
  96. package/lib/command/draw/AcApPolygonCmd.d.ts.map +1 -0
  97. package/lib/command/{AcApPolygonCmd.js → draw/AcApPolygonCmd.js} +3 -3
  98. package/lib/command/draw/AcApPolygonCmd.js.map +1 -0
  99. package/lib/command/{AcApPolylineCmd.d.ts → draw/AcApPolylineCmd.d.ts} +2 -2
  100. package/lib/command/draw/AcApPolylineCmd.d.ts.map +1 -0
  101. package/lib/command/{AcApPolylineCmd.js → draw/AcApPolylineCmd.js} +3 -3
  102. package/lib/command/draw/AcApPolylineCmd.js.map +1 -0
  103. package/lib/command/draw/AcApRayCmd.d.ts +10 -0
  104. package/lib/command/draw/AcApRayCmd.d.ts.map +1 -0
  105. package/lib/command/draw/AcApRayCmd.js +145 -0
  106. package/lib/command/draw/AcApRayCmd.js.map +1 -0
  107. package/lib/command/{AcApRectCmd.d.ts → draw/AcApRectCmd.d.ts} +2 -2
  108. package/lib/command/draw/AcApRectCmd.d.ts.map +1 -0
  109. package/lib/command/{AcApRectCmd.js → draw/AcApRectCmd.js} +3 -3
  110. package/lib/command/draw/AcApRectCmd.js.map +1 -0
  111. package/lib/command/{AcApSplineCmd.d.ts → draw/AcApSplineCmd.d.ts} +2 -2
  112. package/lib/command/draw/AcApSplineCmd.d.ts.map +1 -0
  113. package/lib/command/{AcApSplineCmd.js → draw/AcApSplineCmd.js} +3 -3
  114. package/lib/command/draw/AcApSplineCmd.js.map +1 -0
  115. package/lib/command/draw/AcApXLineCmd.d.ts +25 -0
  116. package/lib/command/draw/AcApXLineCmd.d.ts.map +1 -0
  117. package/lib/command/draw/AcApXLineCmd.js +210 -0
  118. package/lib/command/draw/AcApXLineCmd.js.map +1 -0
  119. package/lib/command/draw/index.d.ts +16 -0
  120. package/lib/command/draw/index.d.ts.map +1 -0
  121. package/lib/command/draw/index.js +16 -0
  122. package/lib/command/draw/index.js.map +1 -0
  123. package/lib/command/index.d.ts +6 -32
  124. package/lib/command/index.d.ts.map +1 -1
  125. package/lib/command/index.js +6 -32
  126. package/lib/command/index.js.map +1 -1
  127. package/lib/command/layer/AcApLayerCloseCmd.d.ts +23 -0
  128. package/lib/command/layer/AcApLayerCloseCmd.d.ts.map +1 -0
  129. package/lib/command/layer/AcApLayerCloseCmd.js +86 -0
  130. package/lib/command/layer/AcApLayerCloseCmd.js.map +1 -0
  131. package/lib/command/{AcApLayerCmd.d.ts → layer/AcApLayerCmd.d.ts} +3 -5
  132. package/lib/command/layer/AcApLayerCmd.d.ts.map +1 -0
  133. package/lib/command/{AcApLayerCmd.js → layer/AcApLayerCmd.js} +5 -8
  134. package/lib/command/layer/AcApLayerCmd.js.map +1 -0
  135. package/lib/command/layer/AcApLayerCurCmd.d.ts +43 -0
  136. package/lib/command/layer/AcApLayerCurCmd.d.ts.map +1 -0
  137. package/lib/command/layer/AcApLayerCurCmd.js +183 -0
  138. package/lib/command/layer/AcApLayerCurCmd.js.map +1 -0
  139. package/lib/command/layer/AcApLayerDelCmd.d.ts +112 -0
  140. package/lib/command/layer/AcApLayerDelCmd.d.ts.map +1 -0
  141. package/lib/command/layer/AcApLayerDelCmd.js +446 -0
  142. package/lib/command/layer/AcApLayerDelCmd.js.map +1 -0
  143. package/lib/command/layer/AcApLayerFreezeCmd.d.ts +103 -0
  144. package/lib/command/layer/AcApLayerFreezeCmd.d.ts.map +1 -0
  145. package/lib/command/layer/AcApLayerFreezeCmd.js +398 -0
  146. package/lib/command/layer/AcApLayerFreezeCmd.js.map +1 -0
  147. package/lib/command/layer/AcApLayerIsoCmd.d.ts +99 -0
  148. package/lib/command/layer/AcApLayerIsoCmd.d.ts.map +1 -0
  149. package/lib/command/layer/AcApLayerIsoCmd.js +485 -0
  150. package/lib/command/layer/AcApLayerIsoCmd.js.map +1 -0
  151. package/lib/command/layer/AcApLayerIsoState.d.ts +68 -0
  152. package/lib/command/layer/AcApLayerIsoState.d.ts.map +1 -0
  153. package/lib/command/layer/AcApLayerIsoState.js +53 -0
  154. package/lib/command/layer/AcApLayerIsoState.js.map +1 -0
  155. package/lib/command/layer/AcApLayerLockCmd.d.ts +50 -0
  156. package/lib/command/layer/AcApLayerLockCmd.d.ts.map +1 -0
  157. package/lib/command/layer/AcApLayerLockCmd.js +175 -0
  158. package/lib/command/layer/AcApLayerLockCmd.js.map +1 -0
  159. package/lib/command/layer/AcApLayerOffCmd.d.ts +95 -0
  160. package/lib/command/layer/AcApLayerOffCmd.d.ts.map +1 -0
  161. package/lib/command/layer/AcApLayerOffCmd.js +384 -0
  162. package/lib/command/layer/AcApLayerOffCmd.js.map +1 -0
  163. package/lib/command/layer/AcApLayerOnCmd.d.ts +30 -0
  164. package/lib/command/layer/AcApLayerOnCmd.d.ts.map +1 -0
  165. package/lib/command/layer/AcApLayerOnCmd.js +138 -0
  166. package/lib/command/layer/AcApLayerOnCmd.js.map +1 -0
  167. package/lib/command/layer/AcApLayerPCmd.d.ts +83 -0
  168. package/lib/command/layer/AcApLayerPCmd.d.ts.map +1 -0
  169. package/lib/command/layer/AcApLayerPCmd.js +241 -0
  170. package/lib/command/layer/AcApLayerPCmd.js.map +1 -0
  171. package/lib/command/layer/AcApLayerThawCmd.d.ts +37 -0
  172. package/lib/command/layer/AcApLayerThawCmd.d.ts.map +1 -0
  173. package/lib/command/layer/AcApLayerThawCmd.js +150 -0
  174. package/lib/command/layer/AcApLayerThawCmd.js.map +1 -0
  175. package/lib/command/layer/AcApLayerUnisoCmd.d.ts +52 -0
  176. package/lib/command/layer/AcApLayerUnisoCmd.d.ts.map +1 -0
  177. package/lib/command/layer/AcApLayerUnisoCmd.js +199 -0
  178. package/lib/command/layer/AcApLayerUnisoCmd.js.map +1 -0
  179. package/lib/command/layer/AcApLayerUnlockCmd.d.ts +50 -0
  180. package/lib/command/layer/AcApLayerUnlockCmd.d.ts.map +1 -0
  181. package/lib/command/layer/AcApLayerUnlockCmd.js +175 -0
  182. package/lib/command/layer/AcApLayerUnlockCmd.js.map +1 -0
  183. package/lib/command/layer/index.d.ts +14 -0
  184. package/lib/command/layer/index.d.ts.map +1 -0
  185. package/lib/command/layer/index.js +14 -0
  186. package/lib/command/layer/index.js.map +1 -0
  187. package/lib/command/{AcApClearMeasurementsCmd.d.ts → measure/AcApClearMeasurementsCmd.d.ts} +2 -2
  188. package/lib/command/measure/AcApClearMeasurementsCmd.d.ts.map +1 -0
  189. package/lib/command/{AcApClearMeasurementsCmd.js → measure/AcApClearMeasurementsCmd.js} +1 -1
  190. package/lib/command/measure/AcApClearMeasurementsCmd.js.map +1 -0
  191. package/lib/command/{AcApMeasureAngleCmd.d.ts → measure/AcApMeasureAngleCmd.d.ts} +2 -2
  192. package/lib/command/measure/AcApMeasureAngleCmd.d.ts.map +1 -0
  193. package/lib/command/{AcApMeasureAngleCmd.js → measure/AcApMeasureAngleCmd.js} +3 -3
  194. package/lib/command/measure/AcApMeasureAngleCmd.js.map +1 -0
  195. package/lib/command/{AcApMeasureArcCmd.d.ts → measure/AcApMeasureArcCmd.d.ts} +2 -2
  196. package/lib/command/measure/AcApMeasureArcCmd.d.ts.map +1 -0
  197. package/lib/command/{AcApMeasureArcCmd.js → measure/AcApMeasureArcCmd.js} +3 -3
  198. package/lib/command/measure/AcApMeasureArcCmd.js.map +1 -0
  199. package/lib/command/{AcApMeasureAreaCmd.d.ts → measure/AcApMeasureAreaCmd.d.ts} +2 -2
  200. package/lib/command/measure/AcApMeasureAreaCmd.d.ts.map +1 -0
  201. package/lib/command/{AcApMeasureAreaCmd.js → measure/AcApMeasureAreaCmd.js} +3 -3
  202. package/lib/command/measure/AcApMeasureAreaCmd.js.map +1 -0
  203. package/lib/command/{AcApMeasureDistanceCmd.d.ts → measure/AcApMeasureDistanceCmd.d.ts} +2 -2
  204. package/lib/command/measure/AcApMeasureDistanceCmd.d.ts.map +1 -0
  205. package/lib/command/{AcApMeasureDistanceCmd.js → measure/AcApMeasureDistanceCmd.js} +3 -3
  206. package/lib/command/measure/AcApMeasureDistanceCmd.js.map +1 -0
  207. package/lib/command/measure/index.d.ts +6 -0
  208. package/lib/command/measure/index.d.ts.map +1 -0
  209. package/lib/command/measure/index.js +6 -0
  210. package/lib/command/measure/index.js.map +1 -0
  211. package/lib/command/modify/AcApCopyCmd.d.ts +94 -0
  212. package/lib/command/modify/AcApCopyCmd.d.ts.map +1 -0
  213. package/lib/command/modify/AcApCopyCmd.js +549 -0
  214. package/lib/command/modify/AcApCopyCmd.js.map +1 -0
  215. package/lib/command/{AcApEraseCmd.d.ts → modify/AcApEraseCmd.d.ts} +2 -2
  216. package/lib/command/modify/AcApEraseCmd.d.ts.map +1 -0
  217. package/lib/command/{AcApEraseCmd.js → modify/AcApEraseCmd.js} +3 -5
  218. package/lib/command/modify/AcApEraseCmd.js.map +1 -0
  219. package/lib/command/{AcApMoveCmd.d.ts → modify/AcApMoveCmd.d.ts} +2 -2
  220. package/lib/command/modify/AcApMoveCmd.d.ts.map +1 -0
  221. package/lib/command/{AcApMoveCmd.js → modify/AcApMoveCmd.js} +3 -4
  222. package/lib/command/modify/AcApMoveCmd.js.map +1 -0
  223. package/lib/command/modify/AcApRotateCmd.d.ts +81 -0
  224. package/lib/command/modify/AcApRotateCmd.d.ts.map +1 -0
  225. package/lib/command/modify/AcApRotateCmd.js +487 -0
  226. package/lib/command/modify/AcApRotateCmd.js.map +1 -0
  227. package/lib/command/modify/index.d.ts +5 -0
  228. package/lib/command/modify/index.d.ts.map +1 -0
  229. package/lib/command/modify/index.js +5 -0
  230. package/lib/command/modify/index.js.map +1 -0
  231. package/lib/command/{AcApBaseRevCmd.d.ts → review/AcApBaseRevCmd.d.ts} +2 -2
  232. package/lib/command/review/AcApBaseRevCmd.d.ts.map +1 -0
  233. package/lib/command/{AcApBaseRevCmd.js → review/AcApBaseRevCmd.js} +2 -2
  234. package/lib/command/review/AcApBaseRevCmd.js.map +1 -0
  235. package/lib/command/{AcApRevCircleCmd.d.ts → review/AcApRevCircleCmd.d.ts} +1 -1
  236. package/lib/command/review/AcApRevCircleCmd.d.ts.map +1 -0
  237. package/lib/command/{AcApRevCircleCmd.js → review/AcApRevCircleCmd.js} +4 -4
  238. package/lib/command/review/AcApRevCircleCmd.js.map +1 -0
  239. package/lib/command/{AcApRevCloudCmd.d.ts → review/AcApRevCloudCmd.d.ts} +2 -2
  240. package/lib/command/review/AcApRevCloudCmd.d.ts.map +1 -0
  241. package/lib/command/{AcApRevCloudCmd.js → review/AcApRevCloudCmd.js} +3 -3
  242. package/lib/command/review/AcApRevCloudCmd.js.map +1 -0
  243. package/lib/command/{AcApRevRectCmd.d.ts → review/AcApRevRectCmd.d.ts} +1 -1
  244. package/lib/command/review/AcApRevRectCmd.d.ts.map +1 -0
  245. package/lib/command/{AcApRevRectCmd.js → review/AcApRevRectCmd.js} +3 -3
  246. package/lib/command/review/AcApRevRectCmd.js.map +1 -0
  247. package/lib/command/{AcApRevVisibilityCmd.d.ts → review/AcApRevVisibilityCmd.d.ts} +1 -1
  248. package/lib/command/review/AcApRevVisibilityCmd.d.ts.map +1 -0
  249. package/lib/command/{AcApRevVisibilityCmd.js → review/AcApRevVisibilityCmd.js} +2 -2
  250. package/lib/command/review/AcApRevVisibilityCmd.js.map +1 -0
  251. package/lib/command/{AcApSketchCmd.d.ts → review/AcApSketchCmd.d.ts} +2 -2
  252. package/lib/command/review/AcApSketchCmd.d.ts.map +1 -0
  253. package/lib/command/{AcApSketchCmd.js → review/AcApSketchCmd.js} +3 -3
  254. package/lib/command/review/AcApSketchCmd.js.map +1 -0
  255. package/lib/command/review/index.d.ts +7 -0
  256. package/lib/command/review/index.d.ts.map +1 -0
  257. package/lib/command/review/index.js +7 -0
  258. package/lib/command/review/index.js.map +1 -0
  259. package/lib/editor/global/eventBus.d.ts +4 -6
  260. package/lib/editor/global/eventBus.d.ts.map +1 -1
  261. package/lib/editor/global/eventBus.js.map +1 -1
  262. package/lib/editor/input/AcEditor.d.ts +17 -0
  263. package/lib/editor/input/AcEditor.d.ts.map +1 -1
  264. package/lib/editor/input/AcEditor.js +23 -0
  265. package/lib/editor/input/AcEditor.js.map +1 -1
  266. package/lib/editor/input/prompt/AcEdPromptBoxOptions.d.ts +6 -0
  267. package/lib/editor/input/prompt/AcEdPromptBoxOptions.d.ts.map +1 -1
  268. package/lib/editor/input/prompt/AcEdPromptBoxOptions.js +16 -0
  269. package/lib/editor/input/prompt/AcEdPromptBoxOptions.js.map +1 -1
  270. package/lib/editor/input/prompt/AcEdPromptPointOptions.d.ts +6 -0
  271. package/lib/editor/input/prompt/AcEdPromptPointOptions.d.ts.map +1 -1
  272. package/lib/editor/input/prompt/AcEdPromptPointOptions.js +16 -0
  273. package/lib/editor/input/prompt/AcEdPromptPointOptions.js.map +1 -1
  274. package/lib/editor/input/ui/AcEdCommandLine.d.ts +25 -23
  275. package/lib/editor/input/ui/AcEdCommandLine.d.ts.map +1 -1
  276. package/lib/editor/input/ui/AcEdCommandLine.js +101 -43
  277. package/lib/editor/input/ui/AcEdCommandLine.js.map +1 -1
  278. package/lib/editor/input/ui/AcEdFloatingInput.d.ts.map +1 -1
  279. package/lib/editor/input/ui/AcEdFloatingInput.js +4 -2
  280. package/lib/editor/input/ui/AcEdFloatingInput.js.map +1 -1
  281. package/lib/editor/input/ui/AcEdInputManager.d.ts +21 -0
  282. package/lib/editor/input/ui/AcEdInputManager.d.ts.map +1 -1
  283. package/lib/editor/input/ui/AcEdInputManager.js +34 -4
  284. package/lib/editor/input/ui/AcEdInputManager.js.map +1 -1
  285. package/lib/editor/input/ui/AcEdMessageType.d.ts +10 -0
  286. package/lib/editor/input/ui/AcEdMessageType.d.ts.map +1 -0
  287. package/lib/editor/input/ui/AcEdMessageType.js +2 -0
  288. package/lib/editor/input/ui/AcEdMessageType.js.map +1 -0
  289. package/lib/editor/input/ui/index.d.ts +1 -0
  290. package/lib/editor/input/ui/index.d.ts.map +1 -1
  291. package/lib/editor/input/ui/index.js +1 -0
  292. package/lib/editor/input/ui/index.js.map +1 -1
  293. package/lib/editor/view/AcEdBaseView.d.ts +3 -8
  294. package/lib/editor/view/AcEdBaseView.d.ts.map +1 -1
  295. package/lib/editor/view/AcEdBaseView.js +3 -5
  296. package/lib/editor/view/AcEdBaseView.js.map +1 -1
  297. package/lib/editor/view/AcEdHoverController.d.ts +2 -3
  298. package/lib/editor/view/AcEdHoverController.d.ts.map +1 -1
  299. package/lib/editor/view/AcEdHoverController.js +7 -0
  300. package/lib/editor/view/AcEdHoverController.js.map +1 -1
  301. package/lib/editor/view/AcEdSelectionAction.d.ts +108 -0
  302. package/lib/editor/view/AcEdSelectionAction.d.ts.map +1 -0
  303. package/lib/editor/view/AcEdSelectionAction.js +74 -0
  304. package/lib/editor/view/AcEdSelectionAction.js.map +1 -0
  305. package/lib/editor/view/index.d.ts +1 -0
  306. package/lib/editor/view/index.d.ts.map +1 -1
  307. package/lib/editor/view/index.js +1 -0
  308. package/lib/editor/view/index.js.map +1 -1
  309. package/lib/i18n/en/command.d.ts +135 -15
  310. package/lib/i18n/en/command.d.ts.map +1 -1
  311. package/lib/i18n/en/command.js +144 -24
  312. package/lib/i18n/en/command.js.map +1 -1
  313. package/lib/i18n/en/jig.d.ts +571 -212
  314. package/lib/i18n/en/jig.d.ts.map +1 -1
  315. package/lib/i18n/en/jig.js +661 -302
  316. package/lib/i18n/en/jig.js.map +1 -1
  317. package/lib/i18n/zh/command.d.ts +135 -15
  318. package/lib/i18n/zh/command.d.ts.map +1 -1
  319. package/lib/i18n/zh/command.js +145 -25
  320. package/lib/i18n/zh/command.js.map +1 -1
  321. package/lib/i18n/zh/jig.d.ts +571 -212
  322. package/lib/i18n/zh/jig.d.ts.map +1 -1
  323. package/lib/i18n/zh/jig.js +660 -301
  324. package/lib/i18n/zh/jig.js.map +1 -1
  325. package/lib/spatialIndex/AcTrHierarchicalSpatialIndex.d.ts +136 -2
  326. package/lib/spatialIndex/AcTrHierarchicalSpatialIndex.d.ts.map +1 -1
  327. package/lib/spatialIndex/AcTrHierarchicalSpatialIndex.js +154 -16
  328. package/lib/spatialIndex/AcTrHierarchicalSpatialIndex.js.map +1 -1
  329. package/lib/view/AcTrLayout.d.ts +17 -0
  330. package/lib/view/AcTrLayout.d.ts.map +1 -1
  331. package/lib/view/AcTrLayout.js +34 -2
  332. package/lib/view/AcTrLayout.js.map +1 -1
  333. package/lib/view/AcTrPickResultUtil.d.ts +4 -0
  334. package/lib/view/AcTrPickResultUtil.d.ts.map +1 -0
  335. package/lib/view/AcTrPickResultUtil.js +54 -0
  336. package/lib/view/AcTrPickResultUtil.js.map +1 -0
  337. package/lib/view/AcTrView2d.d.ts +25 -0
  338. package/lib/view/AcTrView2d.d.ts.map +1 -1
  339. package/lib/view/AcTrView2d.js +225 -100
  340. package/lib/view/AcTrView2d.js.map +1 -1
  341. package/package.json +6 -6
  342. package/lib/command/AcApArcCmd.d.ts +0 -140
  343. package/lib/command/AcApArcCmd.d.ts.map +0 -1
  344. package/lib/command/AcApArcCmd.js.map +0 -1
  345. package/lib/command/AcApBaseRevCmd.d.ts.map +0 -1
  346. package/lib/command/AcApBaseRevCmd.js.map +0 -1
  347. package/lib/command/AcApCircleCmd.d.ts.map +0 -1
  348. package/lib/command/AcApCircleCmd.js.map +0 -1
  349. package/lib/command/AcApClearMeasurementsCmd.d.ts.map +0 -1
  350. package/lib/command/AcApClearMeasurementsCmd.js.map +0 -1
  351. package/lib/command/AcApConvertToDxfCmd.d.ts.map +0 -1
  352. package/lib/command/AcApConvertToDxfCmd.js.map +0 -1
  353. package/lib/command/AcApConvertToPngCmd.d.ts.map +0 -1
  354. package/lib/command/AcApConvertToPngCmd.js.map +0 -1
  355. package/lib/command/AcApConvertToSvgCmd.d.ts.map +0 -1
  356. package/lib/command/AcApConvertToSvgCmd.js.map +0 -1
  357. package/lib/command/AcApDimLinearCmd.d.ts.map +0 -1
  358. package/lib/command/AcApDimLinearCmd.js.map +0 -1
  359. package/lib/command/AcApDxfConvertor.d.ts.map +0 -1
  360. package/lib/command/AcApDxfConvertor.js.map +0 -1
  361. package/lib/command/AcApEllipseCmd.d.ts.map +0 -1
  362. package/lib/command/AcApEllipseCmd.js.map +0 -1
  363. package/lib/command/AcApEraseCmd.d.ts.map +0 -1
  364. package/lib/command/AcApEraseCmd.js.map +0 -1
  365. package/lib/command/AcApHatchCmd.d.ts.map +0 -1
  366. package/lib/command/AcApHatchCmd.js.map +0 -1
  367. package/lib/command/AcApLayerCmd.d.ts.map +0 -1
  368. package/lib/command/AcApLayerCmd.js.map +0 -1
  369. package/lib/command/AcApLineCmd.d.ts.map +0 -1
  370. package/lib/command/AcApLineCmd.js.map +0 -1
  371. package/lib/command/AcApMTextCmd.d.ts.map +0 -1
  372. package/lib/command/AcApMTextCmd.js.map +0 -1
  373. package/lib/command/AcApMeasureAngleCmd.d.ts.map +0 -1
  374. package/lib/command/AcApMeasureAngleCmd.js.map +0 -1
  375. package/lib/command/AcApMeasureArcCmd.d.ts.map +0 -1
  376. package/lib/command/AcApMeasureArcCmd.js.map +0 -1
  377. package/lib/command/AcApMeasureAreaCmd.d.ts.map +0 -1
  378. package/lib/command/AcApMeasureAreaCmd.js.map +0 -1
  379. package/lib/command/AcApMeasureDistanceCmd.d.ts.map +0 -1
  380. package/lib/command/AcApMeasureDistanceCmd.js.map +0 -1
  381. package/lib/command/AcApMoveCmd.d.ts.map +0 -1
  382. package/lib/command/AcApMoveCmd.js.map +0 -1
  383. package/lib/command/AcApPngConvertor.d.ts.map +0 -1
  384. package/lib/command/AcApPngConvertor.js.map +0 -1
  385. package/lib/command/AcApPolygonCmd.d.ts.map +0 -1
  386. package/lib/command/AcApPolygonCmd.js.map +0 -1
  387. package/lib/command/AcApPolylineCmd.d.ts.map +0 -1
  388. package/lib/command/AcApPolylineCmd.js.map +0 -1
  389. package/lib/command/AcApRectCmd.d.ts.map +0 -1
  390. package/lib/command/AcApRectCmd.js.map +0 -1
  391. package/lib/command/AcApRevCircleCmd.d.ts.map +0 -1
  392. package/lib/command/AcApRevCircleCmd.js.map +0 -1
  393. package/lib/command/AcApRevCloudCmd.d.ts.map +0 -1
  394. package/lib/command/AcApRevCloudCmd.js.map +0 -1
  395. package/lib/command/AcApRevRectCmd.d.ts.map +0 -1
  396. package/lib/command/AcApRevRectCmd.js.map +0 -1
  397. package/lib/command/AcApRevVisibilityCmd.d.ts.map +0 -1
  398. package/lib/command/AcApRevVisibilityCmd.js.map +0 -1
  399. package/lib/command/AcApSketchCmd.d.ts.map +0 -1
  400. package/lib/command/AcApSketchCmd.js.map +0 -1
  401. package/lib/command/AcApSplineCmd.d.ts.map +0 -1
  402. package/lib/command/AcApSplineCmd.js.map +0 -1
  403. package/lib/command/AcApSvgConvertor.d.ts.map +0 -1
  404. package/lib/command/AcApSvgConvertor.js.map +0 -1
  405. /package/lib/command/{AcApDxfConvertor.d.ts → convert/AcApDxfConvertor.d.ts} +0 -0
  406. /package/lib/command/{AcApSvgConvertor.d.ts → convert/AcApSvgConvertor.d.ts} +0 -0
@@ -50,9 +50,9 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
50
50
  }
51
51
  };
52
52
  import { AcDbArc, AcGePoint3d } from '@mlightcad/data-model';
53
- import { AcApDocManager } from '../app';
54
- import { AcEdCommand, AcEdOpenMode, AcEdPreviewJig, AcEdPromptDistanceOptions, AcEdPromptDoubleOptions, AcEdPromptPointOptions, AcEdPromptStatus, eventBus } from '../editor';
55
- import { AcApI18n } from '../i18n';
53
+ import { AcApDocManager } from '../../app';
54
+ import { AcEdCommand, AcEdOpenMode, AcEdPreviewJig, AcEdPromptAngleOptions, AcEdPromptDistanceOptions, AcEdPromptDoubleOptions, AcEdPromptPointOptions, AcEdPromptStatus, eventBus } from '../../editor';
55
+ import { AcApI18n } from '../../i18n';
56
56
  var TAU = Math.PI * 2;
57
57
  var EPSILON = 1e-9;
58
58
  var POSITIVE_NORMAL = { x: 0, y: 0, z: 1 };
@@ -77,6 +77,16 @@ function normalizeAngle(angle) {
77
77
  function distance2d(p1, p2) {
78
78
  return Math.hypot(p2.x - p1.x, p2.y - p1.y);
79
79
  }
80
+ /**
81
+ * Computes the absolute direction angle from one point to another in degrees.
82
+ *
83
+ * @param from - Origin point.
84
+ * @param to - Target point.
85
+ * @returns Direction angle in degrees.
86
+ */
87
+ function directionAngleDeg(from, to) {
88
+ return (Math.atan2(to.y - from.y, to.x - from.x) * 180) / Math.PI;
89
+ }
80
90
  /**
81
91
  * Computes point angle around a center under a given arc orientation.
82
92
  *
@@ -514,6 +524,99 @@ var AcApArcJig = /** @class */ (function (_super) {
514
524
  };
515
525
  return AcApArcJig;
516
526
  }(AcEdPreviewJig));
527
+ /**
528
+ * Numeric preview jig for ARC command.
529
+ *
530
+ * This jig is used by angle, chord-length, and radius prompts where the user
531
+ * is no longer selecting a point directly, but we still want the transient arc
532
+ * to update from the current numeric value.
533
+ *
534
+ * @typeParam T - Numeric prompt value type that drives the preview.
535
+ */
536
+ var AcApArcValueJig = /** @class */ (function (_super) {
537
+ __extends(AcApArcValueJig, _super);
538
+ /**
539
+ * Creates a numeric preview jig.
540
+ *
541
+ * @param view - Active editor view.
542
+ * @param builder - Prompt-value-to-arc definition resolver.
543
+ * @param fallback - Initial valid fallback definition.
544
+ */
545
+ function AcApArcValueJig(view, builder, fallback) {
546
+ var _this = _super.call(this, view) || this;
547
+ _this._builder = builder;
548
+ _this._arc = createArcEntity(fallback);
549
+ return _this;
550
+ }
551
+ Object.defineProperty(AcApArcValueJig.prototype, "entity", {
552
+ /**
553
+ * Gets transient arc entity.
554
+ */
555
+ get: function () {
556
+ return this._arc;
557
+ },
558
+ enumerable: false,
559
+ configurable: true
560
+ });
561
+ /**
562
+ * Updates transient arc for the current numeric input value.
563
+ *
564
+ * @param value - Current prompt value.
565
+ */
566
+ AcApArcValueJig.prototype.update = function (value) {
567
+ var definition = this._builder(value);
568
+ if (!definition)
569
+ return;
570
+ applyArcDefinition(this._arc, definition);
571
+ };
572
+ return AcApArcValueJig;
573
+ }(AcEdPreviewJig));
574
+ /**
575
+ * Normalized scripted ARC entry tokens mapped to an internal entry mode.
576
+ *
577
+ * Tokens are normalized by lowercasing and stripping non-alphanumeric
578
+ * characters before lookup. This lets the command accept a few equivalent
579
+ * spellings for the same branch, for example:
580
+ * - documentation-style phrases such as `Start Center End`
581
+ * - compact aliases such as `SCE`
582
+ * - historical shorthand such as `3P`
583
+ *
584
+ * The table is intentionally centralized so supported scripted spellings remain
585
+ * easy to audit and extend without touching the main execution logic.
586
+ */
587
+ var ARC_ENTRY_MODE_BY_TOKEN = {
588
+ '3p': 'threePoint',
589
+ '3point': 'threePoint',
590
+ threepoint: 'threePoint',
591
+ startcenter: 'startCenter',
592
+ sc: 'startCenter',
593
+ startcenterend: 'startCenterEnd',
594
+ sce: 'startCenterEnd',
595
+ startcenterangle: 'startCenterAngle',
596
+ sca: 'startCenterAngle',
597
+ startcenterlength: 'startCenterLength',
598
+ startcenterchordlength: 'startCenterLength',
599
+ scl: 'startCenterLength',
600
+ startend: 'startEnd',
601
+ se: 'startEnd',
602
+ startendangle: 'startEndAngle',
603
+ sea: 'startEndAngle',
604
+ startenddirection: 'startEndDirection',
605
+ sed: 'startEndDirection',
606
+ startendradius: 'startEndRadius',
607
+ ser: 'startEndRadius',
608
+ center: 'centerStart',
609
+ c: 'centerStart',
610
+ centerstart: 'centerStart',
611
+ cs: 'centerStart',
612
+ centerstartend: 'centerStartEnd',
613
+ cse: 'centerStartEnd',
614
+ centerstartangle: 'centerStartAngle',
615
+ csa: 'centerStartAngle',
616
+ centerstartlength: 'centerStartLength',
617
+ centerstartchordlength: 'centerStartLength',
618
+ csl: 'centerStartLength'
619
+ };
517
620
  /**
518
621
  * Command to create one arc.
519
622
  *
@@ -542,35 +645,162 @@ var AcApArcCmd = /** @class */ (function (_super) {
542
645
  */
543
646
  AcApArcCmd.prototype.execute = function (context) {
544
647
  return __awaiter(this, void 0, void 0, function () {
545
- var prompt, result;
648
+ var entryMode, prompt, result;
546
649
  return __generator(this, function (_a) {
547
650
  switch (_a.label) {
548
651
  case 0:
549
652
  // Keep ARC behavior deterministic for each run (same as PLINE flow).
550
653
  AcApDocManager.instance.editor.resetInputToggles();
654
+ entryMode = this.consumeEntryMode();
655
+ if (!(entryMode !== 'default')) return [3 /*break*/, 2];
656
+ return [4 /*yield*/, this.executeEntryMode(context, entryMode)];
657
+ case 1:
658
+ _a.sent();
659
+ return [2 /*return*/];
660
+ case 2:
551
661
  prompt = new AcEdPromptPointOptions(AcApI18n.t('jig.arc.startPointOrCenter'));
552
662
  this.addKeyword(prompt, 'center');
553
663
  return [4 /*yield*/, AcApDocManager.instance.editor.getPoint(prompt)];
554
- case 1:
664
+ case 3:
555
665
  result = _a.sent();
556
- if (!(result.status === AcEdPromptStatus.Keyword)) return [3 /*break*/, 4];
557
- if (!(result.stringResult === 'Center')) return [3 /*break*/, 3];
666
+ if (!(result.status === AcEdPromptStatus.Keyword)) return [3 /*break*/, 6];
667
+ if (!(result.stringResult === 'Center')) return [3 /*break*/, 5];
558
668
  return [4 /*yield*/, this.runCenterStartFlow(context)];
559
- case 2:
560
- _a.sent();
561
- _a.label = 3;
562
- case 3: return [2 /*return*/];
563
669
  case 4:
670
+ _a.sent();
671
+ _a.label = 5;
672
+ case 5: return [2 /*return*/];
673
+ case 6:
564
674
  if (result.status !== AcEdPromptStatus.OK)
565
675
  return [2 /*return*/];
566
676
  return [4 /*yield*/, this.runStartFlow(context, result.value)];
567
- case 5:
677
+ case 7:
568
678
  _a.sent();
569
679
  return [2 /*return*/];
570
680
  }
571
681
  });
572
682
  });
573
683
  };
684
+ /**
685
+ * Executes one preselected ARC branch.
686
+ *
687
+ * This method is used only when a scripted caller queued an entry token
688
+ * before invoking `ARC`. Instead of starting at the standard root prompt, the
689
+ * command jumps directly into the requested option family so the user still
690
+ * interacts with a single `ARC` command while shortcuts can open a more
691
+ * specific workflow.
692
+ *
693
+ * @param context - Current app context.
694
+ * @param entryMode - Resolved scripted branch to execute.
695
+ */
696
+ AcApArcCmd.prototype.executeEntryMode = function (context, entryMode) {
697
+ return __awaiter(this, void 0, void 0, function () {
698
+ var _a;
699
+ return __generator(this, function (_b) {
700
+ switch (_b.label) {
701
+ case 0:
702
+ _a = entryMode;
703
+ switch (_a) {
704
+ case 'threePoint': return [3 /*break*/, 1];
705
+ case 'startCenter': return [3 /*break*/, 3];
706
+ case 'startCenterEnd': return [3 /*break*/, 5];
707
+ case 'startCenterAngle': return [3 /*break*/, 7];
708
+ case 'startCenterLength': return [3 /*break*/, 9];
709
+ case 'startEnd': return [3 /*break*/, 11];
710
+ case 'startEndAngle': return [3 /*break*/, 13];
711
+ case 'startEndDirection': return [3 /*break*/, 15];
712
+ case 'startEndRadius': return [3 /*break*/, 17];
713
+ case 'centerStart': return [3 /*break*/, 19];
714
+ case 'centerStartEnd': return [3 /*break*/, 21];
715
+ case 'centerStartAngle': return [3 /*break*/, 23];
716
+ case 'centerStartLength': return [3 /*break*/, 25];
717
+ }
718
+ return [3 /*break*/, 27];
719
+ case 1: return [4 /*yield*/, this.runExactThreePointFlow(context)];
720
+ case 2:
721
+ _b.sent();
722
+ return [2 /*return*/];
723
+ case 3: return [4 /*yield*/, this.runStartCenterFlowFromEntry(context)];
724
+ case 4:
725
+ _b.sent();
726
+ return [2 /*return*/];
727
+ case 5: return [4 /*yield*/, this.runExactStartCenterFlow(context, 'end')];
728
+ case 6:
729
+ _b.sent();
730
+ return [2 /*return*/];
731
+ case 7: return [4 /*yield*/, this.runExactStartCenterFlow(context, 'angle')];
732
+ case 8:
733
+ _b.sent();
734
+ return [2 /*return*/];
735
+ case 9: return [4 /*yield*/, this.runExactStartCenterFlow(context, 'chordLength')];
736
+ case 10:
737
+ _b.sent();
738
+ return [2 /*return*/];
739
+ case 11: return [4 /*yield*/, this.runStartEndFlowFromEntry(context)];
740
+ case 12:
741
+ _b.sent();
742
+ return [2 /*return*/];
743
+ case 13: return [4 /*yield*/, this.runExactStartEndFlow(context, 'angle')];
744
+ case 14:
745
+ _b.sent();
746
+ return [2 /*return*/];
747
+ case 15: return [4 /*yield*/, this.runExactStartEndFlow(context, 'direction')];
748
+ case 16:
749
+ _b.sent();
750
+ return [2 /*return*/];
751
+ case 17: return [4 /*yield*/, this.runExactStartEndFlow(context, 'radius')];
752
+ case 18:
753
+ _b.sent();
754
+ return [2 /*return*/];
755
+ case 19: return [4 /*yield*/, this.runCenterStartFlow(context)];
756
+ case 20:
757
+ _b.sent();
758
+ return [2 /*return*/];
759
+ case 21: return [4 /*yield*/, this.runExactCenterStartFlow(context, 'end')];
760
+ case 22:
761
+ _b.sent();
762
+ return [2 /*return*/];
763
+ case 23: return [4 /*yield*/, this.runExactCenterStartFlow(context, 'angle')];
764
+ case 24:
765
+ _b.sent();
766
+ return [2 /*return*/];
767
+ case 25: return [4 /*yield*/, this.runExactCenterStartFlow(context, 'chordLength')];
768
+ case 26:
769
+ _b.sent();
770
+ return [2 /*return*/];
771
+ case 27: return [2 /*return*/];
772
+ }
773
+ });
774
+ });
775
+ };
776
+ /**
777
+ * Consumes one optional scripted ARC entry token when present.
778
+ *
779
+ * This keeps `ARC` as a single command while still allowing ribbon shortcuts
780
+ * to preselect a specific option family or exact branch.
781
+ *
782
+ * The next queued scripted token is treated as an ARC entry selector only
783
+ * when it matches a known token in {@link ARC_ENTRY_MODE_BY_TOKEN}. Unknown
784
+ * input is left untouched so the ordinary command prompts can consume it as
785
+ * regular scripted input.
786
+ *
787
+ * @returns Resolved entry mode, or `'default'` when no special entry token is
788
+ * queued.
789
+ */
790
+ AcApArcCmd.prototype.consumeEntryMode = function () {
791
+ var token = AcApDocManager.instance.editor.peekScriptInput();
792
+ if (token == null)
793
+ return 'default';
794
+ var normalized = token
795
+ .trim()
796
+ .toLowerCase()
797
+ .replace(/[^a-z0-9]+/g, '');
798
+ var entryMode = ARC_ENTRY_MODE_BY_TOKEN[normalized];
799
+ if (!entryMode)
800
+ return 'default';
801
+ AcApDocManager.instance.editor.consumeScriptInput();
802
+ return entryMode;
803
+ };
574
804
  /**
575
805
  * Adds one localized keyword to a prompt options object.
576
806
  *
@@ -600,6 +830,557 @@ var AcApArcCmd = /** @class */ (function (_super) {
600
830
  type: 'warning'
601
831
  });
602
832
  };
833
+ /**
834
+ * Prompts one start point.
835
+ *
836
+ * This helper is shared by several scripted entry branches that need to begin
837
+ * directly at a known Start-point step instead of the normal ARC root prompt.
838
+ *
839
+ * @returns Selected start point, or `undefined` when the user cancels or the
840
+ * prompt does not complete successfully.
841
+ */
842
+ AcApArcCmd.prototype.promptStartPoint = function () {
843
+ return __awaiter(this, void 0, void 0, function () {
844
+ var prompt, result;
845
+ return __generator(this, function (_a) {
846
+ switch (_a.label) {
847
+ case 0:
848
+ prompt = new AcEdPromptPointOptions(AcApI18n.t('jig.arc.startPoint'));
849
+ return [4 /*yield*/, AcApDocManager.instance.editor.getPoint(prompt)];
850
+ case 1:
851
+ result = _a.sent();
852
+ return [2 /*return*/, result.status === AcEdPromptStatus.OK ? result.value : undefined];
853
+ }
854
+ });
855
+ });
856
+ };
857
+ /**
858
+ * Prompts one center point, optionally using a base point for feedback.
859
+ *
860
+ * When a base point is provided, the prompt mirrors the standard ARC UX by
861
+ * enabling dashed reference feedback from the previously chosen point.
862
+ *
863
+ * @param basePoint - Optional reference point.
864
+ * @returns Selected center point, or `undefined` when the prompt is aborted.
865
+ */
866
+ AcApArcCmd.prototype.promptCenterPoint = function (basePoint) {
867
+ return __awaiter(this, void 0, void 0, function () {
868
+ var prompt, result;
869
+ return __generator(this, function (_a) {
870
+ switch (_a.label) {
871
+ case 0:
872
+ prompt = new AcEdPromptPointOptions(AcApI18n.t('jig.arc.centerPoint'));
873
+ if (basePoint) {
874
+ prompt.useBasePoint = true;
875
+ prompt.useDashedLine = true;
876
+ prompt.basePoint = new AcGePoint3d(basePoint);
877
+ }
878
+ return [4 /*yield*/, AcApDocManager.instance.editor.getPoint(prompt)];
879
+ case 1:
880
+ result = _a.sent();
881
+ return [2 /*return*/, result.status === AcEdPromptStatus.OK ? result.value : undefined];
882
+ }
883
+ });
884
+ });
885
+ };
886
+ /**
887
+ * Prompts one end point, optionally using a base point for feedback.
888
+ *
889
+ * This helper is used by the scripted entry paths that need a plain End-point
890
+ * acquisition step before resuming the standard ARC family logic.
891
+ *
892
+ * @param basePoint - Optional reference point.
893
+ * @returns Selected end point, or `undefined` when the prompt is aborted.
894
+ */
895
+ AcApArcCmd.prototype.promptEndPoint = function (basePoint) {
896
+ return __awaiter(this, void 0, void 0, function () {
897
+ var prompt, result;
898
+ return __generator(this, function (_a) {
899
+ switch (_a.label) {
900
+ case 0:
901
+ prompt = new AcEdPromptPointOptions(AcApI18n.t('jig.arc.endPoint'));
902
+ if (basePoint) {
903
+ prompt.useBasePoint = true;
904
+ prompt.useDashedLine = true;
905
+ prompt.basePoint = new AcGePoint3d(basePoint);
906
+ }
907
+ return [4 /*yield*/, AcApDocManager.instance.editor.getPoint(prompt)];
908
+ case 1:
909
+ result = _a.sent();
910
+ return [2 /*return*/, result.status === AcEdPromptStatus.OK ? result.value : undefined];
911
+ }
912
+ });
913
+ });
914
+ };
915
+ /**
916
+ * Prompts the second point on the arc in the 3-point workflow.
917
+ *
918
+ * This is distinct from {@link promptEndPoint} because the 3-point ARC flow
919
+ * uses a different prompt message and semantic meaning: the second point lies
920
+ * somewhere on the arc, not necessarily at its final endpoint.
921
+ *
922
+ * @param start - Arc start point.
923
+ * @returns Selected second point, or `undefined` when the prompt is aborted.
924
+ */
925
+ AcApArcCmd.prototype.promptSecondPoint = function (start) {
926
+ return __awaiter(this, void 0, void 0, function () {
927
+ var prompt, result;
928
+ return __generator(this, function (_a) {
929
+ switch (_a.label) {
930
+ case 0:
931
+ prompt = new AcEdPromptPointOptions(AcApI18n.t('jig.arc.secondPoint'));
932
+ prompt.useBasePoint = true;
933
+ prompt.useDashedLine = true;
934
+ prompt.basePoint = new AcGePoint3d(start);
935
+ return [4 /*yield*/, AcApDocManager.instance.editor.getPoint(prompt)];
936
+ case 1:
937
+ result = _a.sent();
938
+ return [2 /*return*/, result.status === AcEdPromptStatus.OK ? result.value : undefined];
939
+ }
940
+ });
941
+ });
942
+ };
943
+ /**
944
+ * Runs the exact 3-point flow selected by a scripted entry token.
945
+ *
946
+ * This bypasses the ordinary ARC root prompt and immediately acquires the
947
+ * Start and Second points required for the 3-point construction, then reuses
948
+ * the existing shared finalization logic.
949
+ *
950
+ * @param context - Current app context.
951
+ */
952
+ AcApArcCmd.prototype.runExactThreePointFlow = function (context) {
953
+ return __awaiter(this, void 0, void 0, function () {
954
+ var start, second;
955
+ return __generator(this, function (_a) {
956
+ switch (_a.label) {
957
+ case 0: return [4 /*yield*/, this.promptStartPoint()];
958
+ case 1:
959
+ start = _a.sent();
960
+ if (!start)
961
+ return [2 /*return*/];
962
+ return [4 /*yield*/, this.promptSecondPoint(start)];
963
+ case 2:
964
+ second = _a.sent();
965
+ if (!second)
966
+ return [2 /*return*/];
967
+ return [4 /*yield*/, this.finishThreePointArc(context, start, second)];
968
+ case 3:
969
+ _a.sent();
970
+ return [2 /*return*/];
971
+ }
972
+ });
973
+ });
974
+ };
975
+ /**
976
+ * Runs the Start-Center option family from an explicit entry token.
977
+ *
978
+ * This mode corresponds to the AutoCAD-style branch where the command is
979
+ * already committed to the Start/Center family, but the final sub-option
980
+ * (End, Angle, or Chord Length) is still chosen interactively.
981
+ *
982
+ * @param context - Current app context.
983
+ */
984
+ AcApArcCmd.prototype.runStartCenterFlowFromEntry = function (context) {
985
+ return __awaiter(this, void 0, void 0, function () {
986
+ var start;
987
+ return __generator(this, function (_a) {
988
+ switch (_a.label) {
989
+ case 0: return [4 /*yield*/, this.promptStartPoint()];
990
+ case 1:
991
+ start = _a.sent();
992
+ if (!start)
993
+ return [2 /*return*/];
994
+ return [4 /*yield*/, this.runStartCenterFlow(context, start)];
995
+ case 2:
996
+ _a.sent();
997
+ return [2 /*return*/];
998
+ }
999
+ });
1000
+ });
1001
+ };
1002
+ /**
1003
+ * Runs one exact Start-Center-* flow selected by a scripted entry token.
1004
+ *
1005
+ * Unlike {@link runStartCenterFlowFromEntry}, this method locks both the
1006
+ * option family and the terminal construction variant up front. It is used by
1007
+ * ribbon dropdown items that represent a fully specified ARC recipe.
1008
+ *
1009
+ * @param context - Current app context.
1010
+ * @param variant - Terminal Start-Center variant to execute after Start and
1011
+ * Center are collected.
1012
+ */
1013
+ AcApArcCmd.prototype.runExactStartCenterFlow = function (context, variant) {
1014
+ return __awaiter(this, void 0, void 0, function () {
1015
+ var start, center, anglePrompt, angleResult, angle, arc_1, chordPrompt, chordResult, chordLength, arc;
1016
+ var _this = this;
1017
+ return __generator(this, function (_a) {
1018
+ switch (_a.label) {
1019
+ case 0: return [4 /*yield*/, this.promptStartPoint()];
1020
+ case 1:
1021
+ start = _a.sent();
1022
+ if (!start)
1023
+ return [2 /*return*/];
1024
+ return [4 /*yield*/, this.promptCenterPoint(start)];
1025
+ case 2:
1026
+ center = _a.sent();
1027
+ if (!center)
1028
+ return [2 /*return*/];
1029
+ if (!(variant === 'end')) return [3 /*break*/, 4];
1030
+ return [4 /*yield*/, this.finishExactCenterStartEnd(context, center, start)];
1031
+ case 3:
1032
+ _a.sent();
1033
+ return [2 /*return*/];
1034
+ case 4:
1035
+ if (!(variant === 'angle')) return [3 /*break*/, 6];
1036
+ anglePrompt = new AcEdPromptAngleOptions(AcApI18n.t('jig.arc.includedAngle'));
1037
+ anglePrompt.allowNegative = true;
1038
+ anglePrompt.allowZero = false;
1039
+ anglePrompt.useBasePoint = true;
1040
+ anglePrompt.useDashedLine = true;
1041
+ anglePrompt.basePoint = new AcGePoint3d(center);
1042
+ anglePrompt.baseAngle = directionAngleDeg(center, start);
1043
+ anglePrompt.jig = new AcApArcValueJig(context.view, function (degreeValue) {
1044
+ return createArcFromCenterStartSweep(center, start, _this.applyCtrlDirectionValue(_this.degToRad(degreeValue)));
1045
+ }, createFallbackArc(start));
1046
+ return [4 /*yield*/, AcApDocManager.instance.editor.getAngle(anglePrompt)];
1047
+ case 5:
1048
+ angleResult = _a.sent();
1049
+ angle = angleResult.status === AcEdPromptStatus.OK
1050
+ ? angleResult.value
1051
+ : undefined;
1052
+ if (angle == null)
1053
+ return [2 /*return*/];
1054
+ arc_1 = createArcFromCenterStartSweep(center, start, this.applyCtrlDirectionValue(this.degToRad(angle)));
1055
+ if (arc_1) {
1056
+ this.appendArc(context, arc_1);
1057
+ }
1058
+ else {
1059
+ this.warnInvalidGeometry('angle');
1060
+ }
1061
+ return [2 /*return*/];
1062
+ case 6:
1063
+ chordPrompt = new AcEdPromptDistanceOptions(AcApI18n.t('jig.arc.chordLength'));
1064
+ chordPrompt.allowNegative = true;
1065
+ chordPrompt.allowZero = false;
1066
+ chordPrompt.useBasePoint = true;
1067
+ chordPrompt.useDashedLine = true;
1068
+ chordPrompt.basePoint = new AcGePoint3d(start);
1069
+ chordPrompt.jig = new AcApArcValueJig(context.view, function (chordValue) {
1070
+ return createArcFromCenterStartChord(center, start, _this.applyCtrlDirectionValue(chordValue));
1071
+ }, createFallbackArc(start));
1072
+ return [4 /*yield*/, AcApDocManager.instance.editor.getDistance(chordPrompt)];
1073
+ case 7:
1074
+ chordResult = _a.sent();
1075
+ chordLength = chordResult.status === AcEdPromptStatus.OK ? chordResult.value : undefined;
1076
+ if (chordLength == null)
1077
+ return [2 /*return*/];
1078
+ arc = createArcFromCenterStartChord(center, start, this.applyCtrlDirectionValue(chordLength));
1079
+ if (arc) {
1080
+ this.appendArc(context, arc);
1081
+ }
1082
+ else {
1083
+ this.warnInvalidGeometry('chordLength');
1084
+ }
1085
+ return [2 /*return*/];
1086
+ }
1087
+ });
1088
+ });
1089
+ };
1090
+ /**
1091
+ * Runs one exact Center-Start-* flow selected by a scripted entry token.
1092
+ *
1093
+ * This mirrors {@link runExactStartCenterFlow} for the Center-first ARC
1094
+ * family, allowing a shortcut to bypass the default root prompt and enter one
1095
+ * fully specified Center/Start branch directly.
1096
+ *
1097
+ * @param context - Current app context.
1098
+ * @param variant - Terminal Center-Start variant to execute after Center and
1099
+ * Start are collected.
1100
+ */
1101
+ AcApArcCmd.prototype.runExactCenterStartFlow = function (context, variant) {
1102
+ return __awaiter(this, void 0, void 0, function () {
1103
+ var center, start, anglePrompt, angleResult, angle, arc_2, chordPrompt, chordResult, chordLength, arc;
1104
+ var _this = this;
1105
+ return __generator(this, function (_a) {
1106
+ switch (_a.label) {
1107
+ case 0: return [4 /*yield*/, this.promptCenterPoint()];
1108
+ case 1:
1109
+ center = _a.sent();
1110
+ if (!center)
1111
+ return [2 /*return*/];
1112
+ return [4 /*yield*/, this.promptStartPointFromCenter(center)];
1113
+ case 2:
1114
+ start = _a.sent();
1115
+ if (!start)
1116
+ return [2 /*return*/];
1117
+ if (!(variant === 'end')) return [3 /*break*/, 4];
1118
+ return [4 /*yield*/, this.finishExactCenterStartEnd(context, center, start)];
1119
+ case 3:
1120
+ _a.sent();
1121
+ return [2 /*return*/];
1122
+ case 4:
1123
+ if (!(variant === 'angle')) return [3 /*break*/, 6];
1124
+ anglePrompt = new AcEdPromptAngleOptions(AcApI18n.t('jig.arc.includedAngle'));
1125
+ anglePrompt.allowNegative = true;
1126
+ anglePrompt.allowZero = false;
1127
+ anglePrompt.useBasePoint = true;
1128
+ anglePrompt.useDashedLine = true;
1129
+ anglePrompt.basePoint = new AcGePoint3d(center);
1130
+ anglePrompt.baseAngle = directionAngleDeg(center, start);
1131
+ anglePrompt.jig = new AcApArcValueJig(context.view, function (degreeValue) {
1132
+ return createArcFromCenterStartSweep(center, start, _this.applyCtrlDirectionValue(_this.degToRad(degreeValue)));
1133
+ }, createFallbackArc(start));
1134
+ return [4 /*yield*/, AcApDocManager.instance.editor.getAngle(anglePrompt)];
1135
+ case 5:
1136
+ angleResult = _a.sent();
1137
+ angle = angleResult.status === AcEdPromptStatus.OK
1138
+ ? angleResult.value
1139
+ : undefined;
1140
+ if (angle == null)
1141
+ return [2 /*return*/];
1142
+ arc_2 = createArcFromCenterStartSweep(center, start, this.applyCtrlDirectionValue(this.degToRad(angle)));
1143
+ if (arc_2) {
1144
+ this.appendArc(context, arc_2);
1145
+ }
1146
+ else {
1147
+ this.warnInvalidGeometry('angle');
1148
+ }
1149
+ return [2 /*return*/];
1150
+ case 6:
1151
+ chordPrompt = new AcEdPromptDistanceOptions(AcApI18n.t('jig.arc.chordLength'));
1152
+ chordPrompt.allowNegative = true;
1153
+ chordPrompt.allowZero = false;
1154
+ chordPrompt.useBasePoint = true;
1155
+ chordPrompt.useDashedLine = true;
1156
+ chordPrompt.basePoint = new AcGePoint3d(start);
1157
+ chordPrompt.jig = new AcApArcValueJig(context.view, function (chordValue) {
1158
+ return createArcFromCenterStartChord(center, start, _this.applyCtrlDirectionValue(chordValue));
1159
+ }, createFallbackArc(start));
1160
+ return [4 /*yield*/, AcApDocManager.instance.editor.getDistance(chordPrompt)];
1161
+ case 7:
1162
+ chordResult = _a.sent();
1163
+ chordLength = chordResult.status === AcEdPromptStatus.OK ? chordResult.value : undefined;
1164
+ if (chordLength == null)
1165
+ return [2 /*return*/];
1166
+ arc = createArcFromCenterStartChord(center, start, this.applyCtrlDirectionValue(chordLength));
1167
+ if (arc) {
1168
+ this.appendArc(context, arc);
1169
+ }
1170
+ else {
1171
+ this.warnInvalidGeometry('chordLength');
1172
+ }
1173
+ return [2 /*return*/];
1174
+ }
1175
+ });
1176
+ });
1177
+ };
1178
+ /**
1179
+ * Runs one exact Start-End-* flow selected by a scripted entry token.
1180
+ *
1181
+ * This path is used when a shortcut already knows that the Start-End family
1182
+ * should be used and only needs the command to perform the exact terminal
1183
+ * construction indicated by `variant`.
1184
+ *
1185
+ * @param context - Current app context.
1186
+ * @param variant - Terminal Start-End variant to execute after Start and End
1187
+ * are collected.
1188
+ */
1189
+ AcApArcCmd.prototype.runExactStartEndFlow = function (context, variant) {
1190
+ return __awaiter(this, void 0, void 0, function () {
1191
+ var start, end, anglePrompt, angleResult, angle, arc_3, directionPrompt, directionResult, directionPoint, direction, arc_4, radiusPrompt, radiusResult, radius, arc;
1192
+ var _this = this;
1193
+ return __generator(this, function (_a) {
1194
+ switch (_a.label) {
1195
+ case 0: return [4 /*yield*/, this.promptStartPoint()];
1196
+ case 1:
1197
+ start = _a.sent();
1198
+ if (!start)
1199
+ return [2 /*return*/];
1200
+ return [4 /*yield*/, this.promptEndPoint(start)];
1201
+ case 2:
1202
+ end = _a.sent();
1203
+ if (!end)
1204
+ return [2 /*return*/];
1205
+ if (!(variant === 'angle')) return [3 /*break*/, 4];
1206
+ anglePrompt = new AcEdPromptAngleOptions(AcApI18n.t('jig.arc.includedAngle'));
1207
+ anglePrompt.allowNegative = true;
1208
+ anglePrompt.allowZero = false;
1209
+ anglePrompt.useBasePoint = true;
1210
+ anglePrompt.useDashedLine = true;
1211
+ anglePrompt.basePoint = new AcGePoint3d(start);
1212
+ anglePrompt.baseAngle = directionAngleDeg(start, end);
1213
+ anglePrompt.jig = new AcApArcValueJig(context.view, function (degreeValue) {
1214
+ return createArcFromStartEndAngle(start, end, _this.applyCtrlDirectionValue(_this.degToRad(degreeValue)));
1215
+ }, createFallbackArc(start));
1216
+ return [4 /*yield*/, AcApDocManager.instance.editor.getAngle(anglePrompt)];
1217
+ case 3:
1218
+ angleResult = _a.sent();
1219
+ angle = angleResult.status === AcEdPromptStatus.OK
1220
+ ? angleResult.value
1221
+ : undefined;
1222
+ if (angle == null)
1223
+ return [2 /*return*/];
1224
+ arc_3 = createArcFromStartEndAngle(start, end, this.applyCtrlDirectionValue(this.degToRad(angle)));
1225
+ if (arc_3) {
1226
+ this.appendArc(context, arc_3);
1227
+ }
1228
+ else {
1229
+ this.warnInvalidGeometry('angle');
1230
+ }
1231
+ return [2 /*return*/];
1232
+ case 4:
1233
+ if (!(variant === 'direction')) return [3 /*break*/, 6];
1234
+ directionPrompt = new AcEdPromptPointOptions(AcApI18n.t('jig.arc.tangentDirection'));
1235
+ directionPrompt.useBasePoint = true;
1236
+ directionPrompt.useDashedLine = true;
1237
+ directionPrompt.basePoint = new AcGePoint3d(start);
1238
+ directionPrompt.jig = new AcApArcJig(context.view, function (point) {
1239
+ return createArcFromStartEndDirection(start, end, Math.atan2(point.y - start.y, point.x - start.x));
1240
+ }, createFallbackArc(start));
1241
+ return [4 /*yield*/, AcApDocManager.instance.editor.getPoint(directionPrompt)];
1242
+ case 5:
1243
+ directionResult = _a.sent();
1244
+ directionPoint = directionResult.status === AcEdPromptStatus.OK
1245
+ ? directionResult.value
1246
+ : undefined;
1247
+ if (!directionPoint)
1248
+ return [2 /*return*/];
1249
+ direction = Math.atan2(directionPoint.y - start.y, directionPoint.x - start.x);
1250
+ arc_4 = createArcFromStartEndDirection(start, end, direction);
1251
+ if (arc_4) {
1252
+ this.appendArc(context, arc_4);
1253
+ }
1254
+ else {
1255
+ this.warnInvalidGeometry('direction');
1256
+ }
1257
+ return [2 /*return*/];
1258
+ case 6:
1259
+ radiusPrompt = new AcEdPromptDistanceOptions(AcApI18n.t('jig.arc.radius'));
1260
+ radiusPrompt.allowNegative = true;
1261
+ radiusPrompt.allowZero = false;
1262
+ radiusPrompt.useBasePoint = true;
1263
+ radiusPrompt.useDashedLine = true;
1264
+ radiusPrompt.basePoint = new AcGePoint3d(start);
1265
+ radiusPrompt.jig = new AcApArcValueJig(context.view, function (radiusValue) {
1266
+ return createArcFromStartEndRadius(start, end, _this.applyCtrlDirectionValue(radiusValue));
1267
+ }, createFallbackArc(start));
1268
+ return [4 /*yield*/, AcApDocManager.instance.editor.getDistance(radiusPrompt)];
1269
+ case 7:
1270
+ radiusResult = _a.sent();
1271
+ radius = radiusResult.status === AcEdPromptStatus.OK
1272
+ ? radiusResult.value
1273
+ : undefined;
1274
+ if (radius == null)
1275
+ return [2 /*return*/];
1276
+ arc = createArcFromStartEndRadius(start, end, this.applyCtrlDirectionValue(radius));
1277
+ if (arc) {
1278
+ this.appendArc(context, arc);
1279
+ }
1280
+ else {
1281
+ this.warnInvalidGeometry('radius');
1282
+ }
1283
+ return [2 /*return*/];
1284
+ }
1285
+ });
1286
+ });
1287
+ };
1288
+ /**
1289
+ * Runs the Start-End option family from an explicit entry token.
1290
+ *
1291
+ * This mode corresponds to the AutoCAD-style Start/End branch where the
1292
+ * family is preselected, but the final option (Center, Angle, Direction, or
1293
+ * Radius) is still chosen through the usual interactive prompts.
1294
+ *
1295
+ * @param context - Current app context.
1296
+ */
1297
+ AcApArcCmd.prototype.runStartEndFlowFromEntry = function (context) {
1298
+ return __awaiter(this, void 0, void 0, function () {
1299
+ var start;
1300
+ return __generator(this, function (_a) {
1301
+ switch (_a.label) {
1302
+ case 0: return [4 /*yield*/, this.promptStartPoint()];
1303
+ case 1:
1304
+ start = _a.sent();
1305
+ if (!start)
1306
+ return [2 /*return*/];
1307
+ return [4 /*yield*/, this.runStartEndFlow(context, start)];
1308
+ case 2:
1309
+ _a.sent();
1310
+ return [2 /*return*/];
1311
+ }
1312
+ });
1313
+ });
1314
+ };
1315
+ /**
1316
+ * Prompts one start point using the given center point as reference.
1317
+ *
1318
+ * The supplied center point is used as the base point so the visual feedback
1319
+ * matches the standard Center/Start ARC family experience.
1320
+ *
1321
+ * @param center - Arc center point.
1322
+ * @returns Selected start point, or `undefined` when the prompt is aborted.
1323
+ */
1324
+ AcApArcCmd.prototype.promptStartPointFromCenter = function (center) {
1325
+ return __awaiter(this, void 0, void 0, function () {
1326
+ var prompt, result;
1327
+ return __generator(this, function (_a) {
1328
+ switch (_a.label) {
1329
+ case 0:
1330
+ prompt = new AcEdPromptPointOptions(AcApI18n.t('jig.arc.startPoint'));
1331
+ prompt.useBasePoint = true;
1332
+ prompt.useDashedLine = true;
1333
+ prompt.basePoint = new AcGePoint3d(center);
1334
+ return [4 /*yield*/, AcApDocManager.instance.editor.getPoint(prompt)];
1335
+ case 1:
1336
+ result = _a.sent();
1337
+ return [2 /*return*/, result.status === AcEdPromptStatus.OK ? result.value : undefined];
1338
+ }
1339
+ });
1340
+ });
1341
+ };
1342
+ /**
1343
+ * Finishes one exact Center-Start-End style flow with end-point preview.
1344
+ *
1345
+ * This helper exists because the exact scripted branch needs the same live
1346
+ * preview behavior as the interactive Center/Start/End path, but without the
1347
+ * intermediate option-selection prompt used by the generic family handler.
1348
+ *
1349
+ * @param context - Current app context.
1350
+ * @param center - Arc center point.
1351
+ * @param start - Arc start point.
1352
+ */
1353
+ AcApArcCmd.prototype.finishExactCenterStartEnd = function (context, center, start) {
1354
+ return __awaiter(this, void 0, void 0, function () {
1355
+ var endPrompt, endResult, arc;
1356
+ var _this = this;
1357
+ return __generator(this, function (_a) {
1358
+ switch (_a.label) {
1359
+ case 0:
1360
+ endPrompt = new AcEdPromptPointOptions(AcApI18n.t('jig.arc.endPoint'));
1361
+ endPrompt.useBasePoint = true;
1362
+ endPrompt.useDashedLine = true;
1363
+ endPrompt.basePoint = new AcGePoint3d(start);
1364
+ endPrompt.jig = new AcApArcJig(context.view, function (point) {
1365
+ return createArcFromCenterStartProjectedEnd(center, start, point, _this.applyCtrlDirectionSign(1));
1366
+ }, createFallbackArc(start));
1367
+ return [4 /*yield*/, AcApDocManager.instance.editor.getPoint(endPrompt)];
1368
+ case 1:
1369
+ endResult = _a.sent();
1370
+ if (endResult.status !== AcEdPromptStatus.OK)
1371
+ return [2 /*return*/];
1372
+ arc = createArcFromCenterStartProjectedEnd(center, start, endResult.value, this.applyCtrlDirectionSign(1));
1373
+ if (arc) {
1374
+ this.appendArc(context, arc);
1375
+ }
1376
+ else {
1377
+ this.warnInvalidGeometry('center');
1378
+ }
1379
+ return [2 /*return*/];
1380
+ }
1381
+ });
1382
+ });
1383
+ };
603
1384
  /**
604
1385
  * Gets direction factor from Ctrl-toggle state.
605
1386
  *