cubing 0.23.0 → 0.24.0-pre1

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 (1040) hide show
  1. package/dist/esm/{2x2x2.kpuzzle.json-JOGUSQ4N.js → 2x2x2.kpuzzle.json-U5KOZCMU.js} +11 -11
  2. package/dist/esm/2x2x2.kpuzzle.json-U5KOZCMU.js.map +7 -0
  3. package/dist/esm/{2x2x2.sgs.json-FRBWMMA7.js → 2x2x2.sgs.json-VLYEQLNB.js} +5 -5
  4. package/dist/esm/2x2x2.sgs.json-VLYEQLNB.js.map +7 -0
  5. package/dist/esm/{3d-Q4WSD4BC.js → 3d-KAC5GXA4.js} +4 -4
  6. package/dist/esm/{3d-Q4WSD4BC.js.map → 3d-KAC5GXA4.js.map} +0 -0
  7. package/dist/esm/bluetooth/index.js +39 -33
  8. package/dist/esm/bluetooth/index.js.map +2 -2
  9. package/dist/esm/{chunk-FK2SCC3Z.js → chunk-23FEDDYH.js} +33 -27
  10. package/dist/esm/chunk-23FEDDYH.js.map +7 -0
  11. package/dist/esm/{chunk-DK6PXBB2.js → chunk-25PPOENI.js} +66 -56
  12. package/dist/esm/chunk-25PPOENI.js.map +7 -0
  13. package/dist/esm/{chunk-XVZOMB6J.js → chunk-27KJGD3S.js} +15 -20
  14. package/dist/esm/chunk-27KJGD3S.js.map +7 -0
  15. package/dist/esm/{chunk-DPMEZY7V.js → chunk-DBWASN5Q.js} +19 -10
  16. package/dist/esm/chunk-DBWASN5Q.js.map +7 -0
  17. package/dist/esm/{chunk-PUPUQWJC.js → chunk-J2U2GRS4.js} +27 -32
  18. package/dist/esm/chunk-J2U2GRS4.js.map +7 -0
  19. package/dist/esm/{chunk-Z6X7HTPP.js → chunk-MQYHOXEK.js} +4 -4
  20. package/dist/esm/{chunk-Z6X7HTPP.js.map → chunk-MQYHOXEK.js.map} +2 -2
  21. package/dist/esm/chunk-PMAQZQHL.js +810 -0
  22. package/dist/esm/chunk-PMAQZQHL.js.map +7 -0
  23. package/dist/esm/{chunk-N3RNWU5T.js → chunk-PQKDEV4Z.js} +36 -51
  24. package/dist/esm/chunk-PQKDEV4Z.js.map +7 -0
  25. package/dist/esm/{chunk-JZWB7AIU.js → chunk-PYOHTUEC.js} +17 -10
  26. package/dist/esm/chunk-PYOHTUEC.js.map +7 -0
  27. package/dist/esm/chunk-W6AA6TVR.js +274 -0
  28. package/dist/esm/chunk-W6AA6TVR.js.map +7 -0
  29. package/dist/esm/{chunk-MLOCDLUF.js → chunk-YLKDBBMW.js} +13 -13
  30. package/dist/esm/{chunk-MLOCDLUF.js.map → chunk-YLKDBBMW.js.map} +2 -2
  31. package/dist/esm/{clock.kpuzzle.json-EKWRMHJM.js → clock.kpuzzle.json-J3YBOI3G.js} +7 -45
  32. package/dist/esm/clock.kpuzzle.json-J3YBOI3G.js.map +7 -0
  33. package/dist/esm/{entry-L6CE2HLF.js → entry-ZLEDRTCM.js} +172 -167
  34. package/dist/esm/entry-ZLEDRTCM.js.map +7 -0
  35. package/dist/esm/{fto.sgs.json-62YNULOK.js → fto.sgs.json-PUAEKD7W.js} +6 -14
  36. package/dist/esm/fto.sgs.json-PUAEKD7W.js.map +7 -0
  37. package/dist/esm/kpuzzle/index.js +5 -35
  38. package/dist/esm/megaminx.sgs.json-DPQBIFB6.js +16 -0
  39. package/dist/esm/{megaminx.sgs.json-PRL46G5J.js.map → megaminx.sgs.json-DPQBIFB6.js.map} +0 -0
  40. package/dist/esm/{module-entry-J2N3UZP7.js → module-entry-UAGINHYL.js} +2 -2
  41. package/dist/esm/{module-entry-J2N3UZP7.js.map → module-entry-UAGINHYL.js.map} +0 -0
  42. package/dist/esm/protocol/index.js +2 -1
  43. package/dist/esm/puzzle-geometry/index.js +3 -1
  44. package/dist/esm/puzzles/index.js +4 -4
  45. package/dist/esm/{pyraminx.sgs.json-7QMPT5XP.js → pyraminx.sgs.json-5UKE76QP.js} +5 -5
  46. package/dist/esm/{pyraminx.sgs.json-7QMPT5XP.js.map → pyraminx.sgs.json-5UKE76QP.js.map} +0 -0
  47. package/dist/esm/scramble/index.js +4 -4
  48. package/dist/esm/{scramble_444-JP3CWLJM.js → scramble_444-ZNWCGUX5.js} +4 -4
  49. package/dist/esm/{scramble_444-JP3CWLJM.js.map → scramble_444-ZNWCGUX5.js.map} +0 -0
  50. package/dist/esm/search/index.js +4 -4
  51. package/dist/esm/skewb.sgs.json-O2CG5ALM.js +16 -0
  52. package/dist/esm/{skewb.sgs.json-FWHYACJG.js.map → skewb.sgs.json-O2CG5ALM.js.map} +0 -0
  53. package/dist/esm/{sq1-hyperorbit.kpuzzle.json-N3FGCPML.js → sq1-hyperorbit.kpuzzle.json-AWDGN4ZW.js} +6 -6
  54. package/dist/esm/sq1-hyperorbit.kpuzzle.json-AWDGN4ZW.js.map +7 -0
  55. package/dist/esm/twisty/index.js +334 -227
  56. package/dist/esm/twisty/index.js.map +3 -3
  57. package/dist/esm/worker-inside-generated-string-K4KJGMPV.js +3447 -0
  58. package/dist/esm/worker-inside-generated-string-K4KJGMPV.js.map +7 -0
  59. package/dist/types/alg/Alg.d.ts +0 -1
  60. package/dist/types/alg/Alg.spec.d.ts +0 -1
  61. package/dist/types/alg/AlgBuilder.d.ts +0 -1
  62. package/dist/types/alg/Serializable.d.ts +0 -1
  63. package/dist/types/alg/common.d.ts +0 -1
  64. package/dist/types/alg/debug.d.ts +0 -1
  65. package/dist/types/alg/example.d.ts +0 -1
  66. package/dist/types/alg/index.d.ts +0 -1
  67. package/dist/types/alg/is.d.ts +0 -1
  68. package/dist/types/alg/iteration.d.ts +0 -1
  69. package/dist/types/alg/keyboard.d.ts +0 -1
  70. package/dist/types/alg/limits.d.ts +0 -1
  71. package/dist/types/alg/operation.d.ts +0 -1
  72. package/dist/types/alg/operation.spec.d.ts +0 -1
  73. package/dist/types/alg/parse.d.ts +0 -1
  74. package/dist/types/alg/parse.spec.d.ts +0 -1
  75. package/dist/types/alg/test/alg-comparison.d.ts +0 -1
  76. package/dist/types/alg/test/alg.spec.d.ts +0 -1
  77. package/dist/types/alg/traversal.d.ts +0 -1
  78. package/dist/types/alg/units/QuantumWithAmount.d.ts +0 -1
  79. package/dist/types/alg/units/Unit.d.ts +0 -1
  80. package/dist/types/alg/units/containers/Commutator.d.ts +0 -1
  81. package/dist/types/alg/units/containers/Conjugate.d.ts +0 -1
  82. package/dist/types/alg/units/containers/Grouping.d.ts +0 -1
  83. package/dist/types/alg/units/index.d.ts +0 -1
  84. package/dist/types/alg/units/leaves/LineComment.d.ts +0 -1
  85. package/dist/types/alg/units/leaves/LineComment.spec.d.ts +0 -1
  86. package/dist/types/alg/units/leaves/Move.d.ts +0 -1
  87. package/dist/types/alg/units/leaves/Move.spec.d.ts +0 -1
  88. package/dist/types/alg/units/leaves/Newline.d.ts +0 -1
  89. package/dist/types/alg/units/leaves/Pause.d.ts +0 -1
  90. package/dist/types/alg/url.d.ts +0 -1
  91. package/dist/types/alg/url.spec.d.ts +0 -1
  92. package/dist/types/alg/validation.d.ts +0 -1
  93. package/dist/types/alg/warnOnce.d.ts +0 -1
  94. package/dist/types/bluetooth/connect/index.d.ts +0 -1
  95. package/dist/types/bluetooth/debug.d.ts +0 -1
  96. package/dist/types/bluetooth/index.d.ts +0 -1
  97. package/dist/types/bluetooth/keyboard.d.ts +5 -5
  98. package/dist/types/bluetooth/smart-puzzle/Heykube.d.ts +3 -3
  99. package/dist/types/bluetooth/smart-puzzle/bluetooth-puzzle.d.ts +3 -5
  100. package/dist/types/bluetooth/smart-puzzle/connect.d.ts +0 -1
  101. package/dist/types/bluetooth/smart-puzzle/endianness.d.ts +0 -1
  102. package/dist/types/bluetooth/smart-puzzle/gan.d.ts +5 -4
  103. package/dist/types/bluetooth/smart-puzzle/giiker.d.ts +3 -3
  104. package/dist/types/bluetooth/smart-puzzle/giiker.spec.d.ts +0 -1
  105. package/dist/types/bluetooth/smart-puzzle/gocube.d.ts +0 -1
  106. package/dist/types/bluetooth/smart-robot/GanRobot.d.ts +0 -1
  107. package/dist/types/bluetooth/smart-robot/index.d.ts +0 -1
  108. package/dist/types/bluetooth/smart-timer/GanTimer.d.ts +0 -1
  109. package/dist/types/bluetooth/smart-timer/index.d.ts +0 -1
  110. package/dist/types/bluetooth/transformer.d.ts +0 -1
  111. package/dist/types/cubing.bundle-global.d.ts +0 -1
  112. package/dist/types/cubing.bundle-global.exports.d.ts +0 -1
  113. package/dist/types/esm-test-worker.d.ts +0 -1
  114. package/dist/types/kpuzzle/3x3x3/3x3x3.kpuzzle.json.d.ts +2 -3
  115. package/dist/types/kpuzzle/3x3x3/3x3x3.kpuzzle.json.spec.d.ts +0 -1
  116. package/dist/types/kpuzzle/3x3x3/puzzle-orientation.d.ts +4 -0
  117. package/dist/types/kpuzzle/KPuzzle.d.ts +21 -0
  118. package/dist/types/kpuzzle/KPuzzleDefinition.d.ts +20 -0
  119. package/dist/types/kpuzzle/KState.d.ts +16 -0
  120. package/dist/types/kpuzzle/KTransformation.d.ts +20 -0
  121. package/dist/types/kpuzzle/calculate.d.ts +16 -0
  122. package/dist/types/kpuzzle/combine.d.ts +3 -0
  123. package/dist/types/kpuzzle/construct.d.ts +5 -0
  124. package/dist/types/kpuzzle/index.d.ts +6 -10
  125. package/dist/types/notation/CountAnimatedLeaves.d.ts +0 -1
  126. package/dist/types/notation/CountMoves.d.ts +0 -1
  127. package/dist/types/notation/index.d.ts +0 -1
  128. package/dist/types/protocol/binary/binary3x3x3.d.ts +5 -6
  129. package/dist/types/protocol/binary/binary3x3x3.spec.d.ts +0 -1
  130. package/dist/types/protocol/binary/hex.d.ts +0 -1
  131. package/dist/types/protocol/binary/hex.spec.d.ts +0 -1
  132. package/dist/types/protocol/binary/orbit-indexing.d.ts +0 -1
  133. package/dist/types/protocol/binary/orbit-indexing.spec.d.ts +0 -1
  134. package/dist/types/protocol/binary/puzzle-orientation.d.ts +4 -5
  135. package/dist/types/protocol/index.d.ts +0 -1
  136. package/dist/types/puzzle-geometry/FaceNameSwizzler.d.ts +0 -1
  137. package/dist/types/puzzle-geometry/Options.d.ts +0 -1
  138. package/dist/types/puzzle-geometry/PGPuzzles.d.ts +0 -1
  139. package/dist/types/puzzle-geometry/PGPuzzles.spec.d.ts +0 -1
  140. package/dist/types/puzzle-geometry/Perm.d.ts +0 -1
  141. package/dist/types/puzzle-geometry/PermOriSet.d.ts +4 -5
  142. package/dist/types/puzzle-geometry/PlatonicGenerator.d.ts +0 -1
  143. package/dist/types/puzzle-geometry/PuzzleGeometry.d.ts +9 -3
  144. package/dist/types/puzzle-geometry/Quat.d.ts +0 -1
  145. package/dist/types/puzzle-geometry/Quat.spec.d.ts +0 -1
  146. package/dist/types/puzzle-geometry/SchreierSims.d.ts +0 -1
  147. package/dist/types/puzzle-geometry/index.d.ts +1 -1
  148. package/dist/types/puzzle-geometry/notation-mapping/FTONotationMapper.d.ts +0 -1
  149. package/dist/types/puzzle-geometry/notation-mapping/FaceRenamingMapper.d.ts +0 -1
  150. package/dist/types/puzzle-geometry/notation-mapping/MegaminxScramblingNotationMapper.d.ts +0 -1
  151. package/dist/types/puzzle-geometry/notation-mapping/NotationMapper.d.ts +3 -2
  152. package/dist/types/puzzle-geometry/notation-mapping/NullMapper.d.ts +0 -1
  153. package/dist/types/puzzle-geometry/notation-mapping/NxNxNCubeMapper.d.ts +0 -1
  154. package/dist/types/puzzle-geometry/notation-mapping/PyraminxNotationMapper.d.ts +0 -1
  155. package/dist/types/puzzle-geometry/notation-mapping/SkewbNotationMapper.d.ts +0 -1
  156. package/dist/types/puzzle-geometry/notation-mapping/index.d.ts +0 -1
  157. package/dist/types/puzzle-geometry/orientcenters.spec.d.ts +0 -1
  158. package/dist/types/puzzles/PuzzleLoader.d.ts +3 -3
  159. package/dist/types/puzzles/async/async-pg3d.d.ts +3 -3
  160. package/dist/types/puzzles/async/lazy-cached-kpuzzle.d.ts +2 -0
  161. package/dist/types/puzzles/customPGPuzzleLoader.d.ts +2 -3
  162. package/dist/types/puzzles/implementations/2x2x2/2x2x2.kpuzzle.json.d.ts +1 -2
  163. package/dist/types/puzzles/implementations/2x2x2/2x2x2.kpuzzle.svg.d.ts +0 -1
  164. package/dist/types/puzzles/implementations/2x2x2/index.d.ts +0 -1
  165. package/dist/types/puzzles/implementations/3x3x3/3x3x3-ll.kpuzzle.svg.d.ts +0 -1
  166. package/dist/types/puzzles/implementations/3x3x3/3x3x3.kpuzzle.svg.d.ts +0 -1
  167. package/dist/types/puzzles/implementations/3x3x3/index.d.ts +0 -1
  168. package/dist/types/puzzles/implementations/clock/clock.kpuzzle.json.d.ts +1 -2
  169. package/dist/types/puzzles/implementations/clock/clock.kpuzzle.svg.d.ts +0 -1
  170. package/dist/types/puzzles/implementations/clock/index.d.ts +0 -1
  171. package/dist/types/puzzles/implementations/fto/index.d.ts +0 -1
  172. package/dist/types/puzzles/implementations/megaminx/index.d.ts +0 -1
  173. package/dist/types/puzzles/implementations/pyraminx/index.d.ts +0 -1
  174. package/dist/types/puzzles/implementations/pyraminx/pyraminx.kpuzzle.json.d.ts +0 -1
  175. package/dist/types/puzzles/implementations/pyraminx/pyraminx.kpuzzle.svg.d.ts +0 -1
  176. package/dist/types/puzzles/implementations/square1/index.d.ts +0 -1
  177. package/dist/types/puzzles/implementations/square1/sq1-hyperorbit.kpuzzle.json.d.ts +1 -2
  178. package/dist/types/puzzles/implementations/square1/sq1-hyperorbit.kpuzzle.svg.d.ts +0 -1
  179. package/dist/types/puzzles/index.d.ts +1 -2
  180. package/dist/types/puzzles/stickerings/appearance.d.ts +6 -7
  181. package/dist/types/puzzles/stickerings/cube-stickerings.d.ts +0 -1
  182. package/dist/types/puzzles/stickerings/fto-stickerings.d.ts +0 -1
  183. package/dist/types/puzzles/stickerings/global-custom-stickering-hack.d.ts +0 -1
  184. package/dist/types/puzzles/stickerings/megaminx-stickerings.d.ts +0 -1
  185. package/dist/types/scramble/index.d.ts +0 -1
  186. package/dist/types/search/esm-test-worker.d.ts +0 -1
  187. package/dist/types/search/index.d.ts +0 -1
  188. package/dist/types/search/inside/api.d.ts +6 -7
  189. package/dist/types/search/inside/api.spec.d.ts +0 -1
  190. package/dist/types/search/inside/entry.d.ts +0 -1
  191. package/dist/types/search/inside/inside-worker.d.ts +0 -1
  192. package/dist/types/search/inside/module-entry-path-getter.d.ts +0 -1
  193. package/dist/types/search/inside/module-entry.d.ts +0 -1
  194. package/dist/types/search/inside/solve/addOrientationSuffix.d.ts +0 -1
  195. package/dist/types/search/inside/solve/parseSGS.d.ts +3 -4
  196. package/dist/types/search/inside/solve/puzzles/2x2x2.d.ts +3 -4
  197. package/dist/types/search/inside/solve/puzzles/2x2x2.sgs.json.d.ts +0 -1
  198. package/dist/types/search/inside/solve/puzzles/3x3x3/convert.d.ts +2 -3
  199. package/dist/types/search/inside/solve/puzzles/3x3x3/filter.d.ts +4 -4
  200. package/dist/types/search/inside/solve/puzzles/3x3x3/index.d.ts +3 -4
  201. package/dist/types/search/inside/solve/puzzles/3x3x3/legacy-sgs.d.ts +0 -1
  202. package/dist/types/search/inside/solve/puzzles/3x3x3-inefficient.sgs.json.d.ts +0 -1
  203. package/dist/types/search/inside/solve/puzzles/4x4x4.d.ts +0 -1
  204. package/dist/types/search/inside/solve/puzzles/5x5x5.d.ts +0 -1
  205. package/dist/types/search/inside/solve/puzzles/big-cubes.d.ts +0 -1
  206. package/dist/types/search/inside/solve/puzzles/clock.d.ts +0 -1
  207. package/dist/types/search/inside/solve/puzzles/fto.d.ts +2 -3
  208. package/dist/types/search/inside/solve/puzzles/fto.sgs.json.d.ts +0 -3
  209. package/dist/types/search/inside/solve/puzzles/megaminx.d.ts +2 -3
  210. package/dist/types/search/inside/solve/puzzles/megaminx.sgs.json.d.ts +2 -3
  211. package/dist/types/search/inside/solve/puzzles/pyraminx.d.ts +3 -4
  212. package/dist/types/search/inside/solve/puzzles/pyraminx.sgs.json.d.ts +0 -1
  213. package/dist/types/search/inside/solve/puzzles/sgs-defs.spec.d.ts +0 -1
  214. package/dist/types/search/inside/solve/puzzles/skewb.d.ts +3 -4
  215. package/dist/types/search/inside/solve/puzzles/skewb.sgs.json.d.ts +2 -3
  216. package/dist/types/search/inside/solve/puzzles/sq1.d.ts +0 -1
  217. package/dist/types/search/inside/solve/puzzles/wca-minx.d.ts +0 -1
  218. package/dist/types/search/inside/solve/tremble.d.ts +6 -6
  219. package/dist/types/search/instantiator.d.ts +0 -1
  220. package/dist/types/search/outside.d.ts +6 -7
  221. package/dist/types/search/worker-inside-generated-string.d.ts +1 -2
  222. package/dist/types/stream/index.d.ts +0 -1
  223. package/dist/types/stream/process/ReorientedStream.d.ts +1 -3
  224. package/dist/types/stream/proxy-event.d.ts +0 -1
  225. package/dist/types/stream/twizzle/TwizzleStream.d.ts +0 -1
  226. package/dist/types/stream/twizzle/stream-types.d.ts +0 -1
  227. package/dist/types/stream/websocket-proxy.d.ts +0 -1
  228. package/dist/types/twisty/controllers/AnimationTypes.d.ts +2 -3
  229. package/dist/types/twisty/controllers/RenderScheduler.d.ts +0 -1
  230. package/dist/types/twisty/controllers/TwistyAnimationController.d.ts +0 -1
  231. package/dist/types/twisty/controllers/TwistyPlayerController.d.ts +0 -1
  232. package/dist/types/twisty/controllers/easing.d.ts +0 -1
  233. package/dist/types/twisty/controllers/indexer/AlgDuration.d.ts +0 -1
  234. package/dist/types/twisty/controllers/indexer/AlgIndexer.d.ts +6 -6
  235. package/dist/types/twisty/controllers/indexer/SimpleAlgIndexer.d.ts +7 -7
  236. package/dist/types/twisty/controllers/indexer/simultaneous-moves/SimultaneousMoveIndexer.d.ts +8 -8
  237. package/dist/types/twisty/controllers/indexer/simultaneous-moves/SimultaneousMoveIndexerV2.d.ts +9 -9
  238. package/dist/types/twisty/controllers/indexer/simultaneous-moves/simul-moves.d.ts +0 -1
  239. package/dist/types/twisty/controllers/indexer/tree/AlgWalker.d.ts +36 -37
  240. package/dist/types/twisty/controllers/indexer/tree/TreeAlgIndexer.d.ts +7 -7
  241. package/dist/types/twisty/controllers/indexer/tree/chunkAlgs.d.ts +0 -1
  242. package/dist/types/twisty/controllers/stream/timeline-move-calculation-draft.d.ts +0 -1
  243. package/dist/types/twisty/heavy-code-imports/3d.d.ts +0 -1
  244. package/dist/types/twisty/heavy-code-imports/dynamic-entries/3d.d.ts +0 -1
  245. package/dist/types/twisty/index.d.ts +1 -2
  246. package/dist/types/twisty/model/PromiseFreshener.d.ts +0 -1
  247. package/dist/types/twisty/model/TwistyPlayerModel.d.ts +6 -7
  248. package/dist/types/twisty/model/UserVisibleErrorTracker.d.ts +0 -1
  249. package/dist/types/twisty/model/helpers.d.ts +0 -1
  250. package/dist/types/twisty/model/props/TwistyProp.d.ts +0 -1
  251. package/dist/types/twisty/model/props/TwistyProp.spec.d.ts +0 -1
  252. package/dist/types/twisty/model/props/TwistyPropDebugger.d.ts +0 -1
  253. package/dist/types/twisty/model/props/general/URLProp.d.ts +0 -1
  254. package/dist/types/twisty/model/props/puzzle/display/FoundationDisplayProp.d.ts +0 -1
  255. package/dist/types/twisty/model/props/puzzle/display/HintFaceletProp.d.ts +0 -1
  256. package/dist/types/twisty/model/props/puzzle/display/SpriteProp.d.ts +0 -1
  257. package/dist/types/twisty/model/props/puzzle/display/StickeringProp.d.ts +0 -1
  258. package/dist/types/twisty/model/props/puzzle/state/AlgProp.d.ts +0 -1
  259. package/dist/types/twisty/model/props/puzzle/state/AlgTransformationProp.d.ts +5 -8
  260. package/dist/types/twisty/model/props/puzzle/state/AnchoredStartProp.d.ts +5 -7
  261. package/dist/types/twisty/model/props/puzzle/state/CatchUpMoveProp.d.ts +0 -1
  262. package/dist/types/twisty/model/props/puzzle/state/CurrentLeavesSimplified.d.ts +0 -1
  263. package/dist/types/twisty/model/props/puzzle/state/{CurrentLeavesProp.d.ts → CurrentMoveInfoProp.d.ts} +2 -3
  264. package/dist/types/twisty/model/props/puzzle/state/CurrentStateProp.d.ts +14 -0
  265. package/dist/types/twisty/model/props/puzzle/state/IndexerConstructorProp.d.ts +7 -8
  266. package/dist/types/twisty/model/props/puzzle/state/IndexerConstructorRequestProp.d.ts +0 -1
  267. package/dist/types/twisty/model/props/puzzle/state/IndexerProp.d.ts +5 -6
  268. package/dist/types/twisty/model/props/puzzle/state/LegacyPositionProp.d.ts +2 -3
  269. package/dist/types/twisty/model/props/puzzle/state/MovePressInputProp.d.ts +0 -1
  270. package/dist/types/twisty/model/props/puzzle/state/NaiveMoveCountProp.d.ts +0 -1
  271. package/dist/types/twisty/model/props/puzzle/state/PuzzleAlgProp.d.ts +4 -5
  272. package/dist/types/twisty/model/props/puzzle/state/SetupAnchorProp.d.ts +0 -1
  273. package/dist/types/twisty/model/props/puzzle/structure/KPuzzleProp.d.ts +10 -0
  274. package/dist/types/twisty/model/props/puzzle/structure/PuzzleDescriptionProp.d.ts +0 -1
  275. package/dist/types/twisty/model/props/puzzle/structure/PuzzleIDProp.d.ts +0 -1
  276. package/dist/types/twisty/model/props/puzzle/structure/PuzzleIDRequestProp.d.ts +0 -1
  277. package/dist/types/twisty/model/props/puzzle/structure/PuzzleLoaderProp.d.ts +0 -1
  278. package/dist/types/twisty/model/props/timeline/CoarseTimelineInfoProp.d.ts +0 -1
  279. package/dist/types/twisty/model/props/timeline/DetailedTimelineInfoProp.d.ts +0 -1
  280. package/dist/types/twisty/model/props/timeline/PlayingInfoProp.d.ts +0 -1
  281. package/dist/types/twisty/model/props/timeline/TempoScaleProp.d.ts +0 -1
  282. package/dist/types/twisty/model/props/timeline/TimestampRequestProp.d.ts +0 -1
  283. package/dist/types/twisty/model/props/viewer/BackViewProp.d.ts +0 -1
  284. package/dist/types/twisty/model/props/viewer/BackgroundProp.d.ts +0 -1
  285. package/dist/types/twisty/model/props/viewer/ButtonAppearanceProp.d.ts +0 -1
  286. package/dist/types/twisty/model/props/viewer/ControlPanelProp.d.ts +0 -1
  287. package/dist/types/twisty/model/props/viewer/LatitudeLimit.d.ts +0 -1
  288. package/dist/types/twisty/model/props/viewer/OrbitCoordinatesProp.d.ts +0 -1
  289. package/dist/types/twisty/model/props/viewer/OrbitCoordinatesRequestProp.d.ts +0 -1
  290. package/dist/types/twisty/model/props/viewer/TimeRangeProp.d.ts +2 -3
  291. package/dist/types/twisty/model/props/viewer/ViewerLinkProp.d.ts +0 -1
  292. package/dist/types/twisty/model/props/viewer/VisualizationProp.d.ts +0 -1
  293. package/dist/types/twisty/model/props/viewer/VisualizationStrategyProp.d.ts +0 -1
  294. package/dist/types/twisty/views/2D/KPuzzleSVGWrapper.d.ts +17 -0
  295. package/dist/types/twisty/views/2D/Twisty2DPuzzle.css.d.ts +0 -1
  296. package/dist/types/twisty/views/2D/Twisty2DPuzzle.d.ts +4 -4
  297. package/dist/types/twisty/views/2D/Twisty2DPuzzleWrapper.d.ts +0 -1
  298. package/dist/types/twisty/views/2D/Twisty2DSceneWrapper.d.ts +0 -1
  299. package/dist/types/twisty/views/3D/DragTracker.d.ts +0 -1
  300. package/dist/types/twisty/views/3D/RendererPool.d.ts +0 -1
  301. package/dist/types/twisty/views/3D/TAU.d.ts +0 -1
  302. package/dist/types/twisty/views/3D/Twisty3DPuzzleWrapper.d.ts +0 -1
  303. package/dist/types/twisty/views/3D/Twisty3DRenderTarget.d.ts +0 -1
  304. package/dist/types/twisty/views/3D/Twisty3DScene.d.ts +0 -1
  305. package/dist/types/twisty/views/3D/Twisty3DSceneWrapper.d.ts +0 -1
  306. package/dist/types/twisty/views/3D/Twisty3DVantage.css.d.ts +0 -1
  307. package/dist/types/twisty/views/3D/Twisty3DVantage.d.ts +0 -1
  308. package/dist/types/twisty/views/3D/TwistyOrbitControls.d.ts +0 -1
  309. package/dist/types/twisty/views/3D/TwistyOrbitControls.spec.d.ts +0 -1
  310. package/dist/types/twisty/views/3D/puzzles/Cube3D.d.ts +4 -5
  311. package/dist/types/twisty/views/3D/puzzles/PG3D.d.ts +5 -6
  312. package/dist/types/twisty/views/3D/puzzles/Twisty3DPuzzle.d.ts +0 -1
  313. package/dist/types/twisty/views/ClassListManager.d.ts +0 -1
  314. package/dist/types/twisty/views/ManagedCustomElement.d.ts +0 -1
  315. package/dist/types/twisty/views/TwistyAlgEditor/LeafTokens.d.ts +0 -1
  316. package/dist/types/twisty/views/TwistyAlgEditor/TwistyAlgEditor.css.d.ts +0 -1
  317. package/dist/types/twisty/views/TwistyAlgEditor/TwistyAlgEditor.d.ts +0 -1
  318. package/dist/types/twisty/views/TwistyAlgEditor/TwistyAlgEditor.spec.d.ts +0 -1
  319. package/dist/types/twisty/views/TwistyAlgEditor/model.d.ts +0 -1
  320. package/dist/types/twisty/views/TwistyAlgViewer.css.d.ts +0 -1
  321. package/dist/types/twisty/views/TwistyAlgViewer.d.ts +0 -1
  322. package/dist/types/twisty/views/TwistyPlayer.css.d.ts +0 -1
  323. package/dist/types/twisty/views/TwistyPlayer.d.ts +0 -1
  324. package/dist/types/twisty/views/TwistyPlayerSettable.d.ts +0 -1
  325. package/dist/types/twisty/views/TwistyViewerWrapper.css.d.ts +0 -1
  326. package/dist/types/twisty/views/canvas.d.ts +0 -1
  327. package/dist/types/twisty/views/control-panel/TwistyButtonsV2.css.d.ts +0 -1
  328. package/dist/types/twisty/views/control-panel/TwistyButtonsV2.d.ts +0 -1
  329. package/dist/types/twisty/views/control-panel/TwistyScrubber.css.d.ts +0 -1
  330. package/dist/types/twisty/views/control-panel/TwistyScrubberV2.d.ts +0 -1
  331. package/dist/types/twisty/views/control-panel/webkit-fullscreen.d.ts +0 -1
  332. package/dist/types/twisty/views/document.d.ts +0 -1
  333. package/dist/types/twisty/views/node-custom-element-shims.d.ts +0 -1
  334. package/dist/types/twisty/views/screenshot.d.ts +0 -1
  335. package/dist/types/twisty/views/stream/TwistyStreamSource.css.d.ts +0 -1
  336. package/dist/types/twisty/views/stream/TwistyStreamSource.d.ts +0 -1
  337. package/dist/types/vendor/comlink-everywhere/inside/index.d.ts +0 -1
  338. package/dist/types/vendor/comlink-everywhere/inside/node.d.ts +0 -1
  339. package/dist/types/vendor/comlink-everywhere/outside/index.d.ts +0 -1
  340. package/dist/types/vendor/comlink-everywhere/outside/node.d.ts +0 -1
  341. package/dist/types/vendor/cstimer/src/js/lib/mathlib.d.ts +0 -1
  342. package/dist/types/vendor/cstimer/src/js/scramble/scramble_444.d.ts +0 -1
  343. package/dist/types/vendor/min2phase/gwt.d.ts +0 -1
  344. package/dist/types/vendor/p-lazy/p-lazy.d.ts +0 -1
  345. package/dist/types/vendor/random-uint-below/get-random-values.d.ts +0 -1
  346. package/dist/types/vendor/random-uint-below/index.d.ts +0 -1
  347. package/dist/types/vendor/random-uint-below/random-choice.d.ts +0 -1
  348. package/dist/types/vendor/random-uint-below/random53BitValue.d.ts +0 -1
  349. package/dist/types/vendor/sq12phase/scramble_sq1.d.ts +0 -1
  350. package/dist/types/vendor/three/examples/jsm/libs/stats.modified.module.d.ts +0 -1
  351. package/dist/types/vendor/unsafe-raw-aes/unsafe-raw-aes.d.ts +0 -1
  352. package/package.json +3 -4
  353. package/dist/bin/order.js +0 -16675
  354. package/dist/bin/order.js.map +0 -7
  355. package/dist/bin/puzzle-geometry-bin.js +0 -5444
  356. package/dist/bin/puzzle-geometry-bin.js.map +0 -7
  357. package/dist/bundle-global/cubing.bundle-global.js +0 -10432
  358. package/dist/esm/2x2x2.kpuzzle.json-JOGUSQ4N.js.map +0 -7
  359. package/dist/esm/2x2x2.sgs.json-FRBWMMA7.js.map +0 -7
  360. package/dist/esm/chunk-DK6PXBB2.js.map +0 -7
  361. package/dist/esm/chunk-DPMEZY7V.js.map +0 -7
  362. package/dist/esm/chunk-FK2SCC3Z.js.map +0 -7
  363. package/dist/esm/chunk-JZWB7AIU.js.map +0 -7
  364. package/dist/esm/chunk-N3RNWU5T.js.map +0 -7
  365. package/dist/esm/chunk-PUPUQWJC.js.map +0 -7
  366. package/dist/esm/chunk-X6JHXPDX.js +0 -2359
  367. package/dist/esm/chunk-X6JHXPDX.js.map +0 -7
  368. package/dist/esm/chunk-XVZOMB6J.js.map +0 -7
  369. package/dist/esm/clock.kpuzzle.json-EKWRMHJM.js.map +0 -7
  370. package/dist/esm/entry-L6CE2HLF.js.map +0 -7
  371. package/dist/esm/fto.sgs.json-62YNULOK.js.map +0 -7
  372. package/dist/esm/megaminx.sgs.json-PRL46G5J.js +0 -16
  373. package/dist/esm/skewb.sgs.json-FWHYACJG.js +0 -16
  374. package/dist/esm/sq1-hyperorbit.kpuzzle.json-N3FGCPML.js.map +0 -7
  375. package/dist/esm/worker-inside-generated-string-OWJA5IIQ.js +0 -3450
  376. package/dist/esm/worker-inside-generated-string-OWJA5IIQ.js.map +0 -7
  377. package/dist/types/alg/Alg.d.ts.map +0 -1
  378. package/dist/types/alg/Alg.spec.d.ts.map +0 -1
  379. package/dist/types/alg/AlgBuilder.d.ts.map +0 -1
  380. package/dist/types/alg/Serializable.d.ts.map +0 -1
  381. package/dist/types/alg/common.d.ts.map +0 -1
  382. package/dist/types/alg/debug.d.ts.map +0 -1
  383. package/dist/types/alg/example.d.ts.map +0 -1
  384. package/dist/types/alg/index.d.ts.map +0 -1
  385. package/dist/types/alg/is.d.ts.map +0 -1
  386. package/dist/types/alg/iteration.d.ts.map +0 -1
  387. package/dist/types/alg/keyboard.d.ts.map +0 -1
  388. package/dist/types/alg/limits.d.ts.map +0 -1
  389. package/dist/types/alg/operation.d.ts.map +0 -1
  390. package/dist/types/alg/operation.spec.d.ts.map +0 -1
  391. package/dist/types/alg/parse.d.ts.map +0 -1
  392. package/dist/types/alg/parse.spec.d.ts.map +0 -1
  393. package/dist/types/alg/test/alg-comparison.d.ts.map +0 -1
  394. package/dist/types/alg/test/alg.spec.d.ts.map +0 -1
  395. package/dist/types/alg/traversal.d.ts.map +0 -1
  396. package/dist/types/alg/units/QuantumWithAmount.d.ts.map +0 -1
  397. package/dist/types/alg/units/Unit.d.ts.map +0 -1
  398. package/dist/types/alg/units/containers/Commutator.d.ts.map +0 -1
  399. package/dist/types/alg/units/containers/Conjugate.d.ts.map +0 -1
  400. package/dist/types/alg/units/containers/Grouping.d.ts.map +0 -1
  401. package/dist/types/alg/units/index.d.ts.map +0 -1
  402. package/dist/types/alg/units/leaves/LineComment.d.ts.map +0 -1
  403. package/dist/types/alg/units/leaves/LineComment.spec.d.ts.map +0 -1
  404. package/dist/types/alg/units/leaves/Move.d.ts.map +0 -1
  405. package/dist/types/alg/units/leaves/Move.spec.d.ts.map +0 -1
  406. package/dist/types/alg/units/leaves/Newline.d.ts.map +0 -1
  407. package/dist/types/alg/units/leaves/Pause.d.ts.map +0 -1
  408. package/dist/types/alg/url.d.ts.map +0 -1
  409. package/dist/types/alg/url.spec.d.ts.map +0 -1
  410. package/dist/types/alg/validation.d.ts.map +0 -1
  411. package/dist/types/alg/warnOnce.d.ts.map +0 -1
  412. package/dist/types/bluetooth/connect/index.d.ts.map +0 -1
  413. package/dist/types/bluetooth/debug.d.ts.map +0 -1
  414. package/dist/types/bluetooth/index.d.ts.map +0 -1
  415. package/dist/types/bluetooth/keyboard.d.ts.map +0 -1
  416. package/dist/types/bluetooth/smart-puzzle/Heykube.d.ts.map +0 -1
  417. package/dist/types/bluetooth/smart-puzzle/bluetooth-puzzle.d.ts.map +0 -1
  418. package/dist/types/bluetooth/smart-puzzle/connect.d.ts.map +0 -1
  419. package/dist/types/bluetooth/smart-puzzle/endianness.d.ts.map +0 -1
  420. package/dist/types/bluetooth/smart-puzzle/gan.d.ts.map +0 -1
  421. package/dist/types/bluetooth/smart-puzzle/giiker.d.ts.map +0 -1
  422. package/dist/types/bluetooth/smart-puzzle/giiker.spec.d.ts.map +0 -1
  423. package/dist/types/bluetooth/smart-puzzle/gocube.d.ts.map +0 -1
  424. package/dist/types/bluetooth/smart-robot/GanRobot.d.ts.map +0 -1
  425. package/dist/types/bluetooth/smart-robot/index.d.ts.map +0 -1
  426. package/dist/types/bluetooth/smart-timer/GanTimer.d.ts.map +0 -1
  427. package/dist/types/bluetooth/smart-timer/index.d.ts.map +0 -1
  428. package/dist/types/bluetooth/transformer.d.ts.map +0 -1
  429. package/dist/types/cubing.bundle-global.d.ts.map +0 -1
  430. package/dist/types/cubing.bundle-global.exports.d.ts.map +0 -1
  431. package/dist/types/esm-test-worker.d.ts.map +0 -1
  432. package/dist/types/kpuzzle/3x3x3/3x3x3.kpuzzle.json.d.ts.map +0 -1
  433. package/dist/types/kpuzzle/3x3x3/3x3x3.kpuzzle.json.spec.d.ts.map +0 -1
  434. package/dist/types/kpuzzle/canon.spec.d.ts +0 -2
  435. package/dist/types/kpuzzle/canon.spec.d.ts.map +0 -1
  436. package/dist/types/kpuzzle/canonicalize.d.ts +0 -55
  437. package/dist/types/kpuzzle/canonicalize.d.ts.map +0 -1
  438. package/dist/types/kpuzzle/definition_types.d.ts +0 -19
  439. package/dist/types/kpuzzle/definition_types.d.ts.map +0 -1
  440. package/dist/types/kpuzzle/index.d.ts.map +0 -1
  441. package/dist/types/kpuzzle/kpuzzle.d.ts +0 -17
  442. package/dist/types/kpuzzle/kpuzzle.d.ts.map +0 -1
  443. package/dist/types/kpuzzle/kpuzzle.spec.d.ts +0 -2
  444. package/dist/types/kpuzzle/kpuzzle.spec.d.ts.map +0 -1
  445. package/dist/types/kpuzzle/move_notation.d.ts +0 -6
  446. package/dist/types/kpuzzle/move_notation.d.ts.map +0 -1
  447. package/dist/types/kpuzzle/parser/index.d.ts +0 -2
  448. package/dist/types/kpuzzle/parser/index.d.ts.map +0 -1
  449. package/dist/types/kpuzzle/parser/parser-peggy.d.ts +0 -15
  450. package/dist/types/kpuzzle/parser/parser-peggy.d.ts.map +0 -1
  451. package/dist/types/kpuzzle/parser/parser-shim.d.ts +0 -4
  452. package/dist/types/kpuzzle/parser/parser-shim.d.ts.map +0 -1
  453. package/dist/types/kpuzzle/parser/parser.d.ts +0 -1
  454. package/dist/types/kpuzzle/parser/parser.d.ts.map +0 -1
  455. package/dist/types/kpuzzle/prunetable.spec.d.ts +0 -2
  456. package/dist/types/kpuzzle/prunetable.spec.d.ts.map +0 -1
  457. package/dist/types/kpuzzle/pruningtable.d.ts +0 -16
  458. package/dist/types/kpuzzle/pruningtable.d.ts.map +0 -1
  459. package/dist/types/kpuzzle/puzzle-orientation.d.ts +0 -5
  460. package/dist/types/kpuzzle/puzzle-orientation.d.ts.map +0 -1
  461. package/dist/types/kpuzzle/svg.d.ts +0 -18
  462. package/dist/types/kpuzzle/svg.d.ts.map +0 -1
  463. package/dist/types/kpuzzle/transformations.d.ts +0 -13
  464. package/dist/types/kpuzzle/transformations.d.ts.map +0 -1
  465. package/dist/types/kpuzzle/transformations.spec.d.ts +0 -2
  466. package/dist/types/kpuzzle/transformations.spec.d.ts.map +0 -1
  467. package/dist/types/notation/CountAnimatedLeaves.d.ts.map +0 -1
  468. package/dist/types/notation/CountMoves.d.ts.map +0 -1
  469. package/dist/types/notation/index.d.ts.map +0 -1
  470. package/dist/types/protocol/binary/binary3x3x3.d.ts.map +0 -1
  471. package/dist/types/protocol/binary/binary3x3x3.spec.d.ts.map +0 -1
  472. package/dist/types/protocol/binary/hex.d.ts.map +0 -1
  473. package/dist/types/protocol/binary/hex.spec.d.ts.map +0 -1
  474. package/dist/types/protocol/binary/orbit-indexing.d.ts.map +0 -1
  475. package/dist/types/protocol/binary/orbit-indexing.spec.d.ts.map +0 -1
  476. package/dist/types/protocol/binary/puzzle-orientation.d.ts.map +0 -1
  477. package/dist/types/protocol/index.d.ts.map +0 -1
  478. package/dist/types/puzzle-geometry/FaceNameSwizzler.d.ts.map +0 -1
  479. package/dist/types/puzzle-geometry/Options.d.ts.map +0 -1
  480. package/dist/types/puzzle-geometry/PGPuzzles.d.ts.map +0 -1
  481. package/dist/types/puzzle-geometry/PGPuzzles.spec.d.ts.map +0 -1
  482. package/dist/types/puzzle-geometry/Perm.d.ts.map +0 -1
  483. package/dist/types/puzzle-geometry/PermOriSet.d.ts.map +0 -1
  484. package/dist/types/puzzle-geometry/PlatonicGenerator.d.ts.map +0 -1
  485. package/dist/types/puzzle-geometry/PuzzleGeometry.d.ts.map +0 -1
  486. package/dist/types/puzzle-geometry/Quat.d.ts.map +0 -1
  487. package/dist/types/puzzle-geometry/Quat.spec.d.ts.map +0 -1
  488. package/dist/types/puzzle-geometry/SchreierSims.d.ts.map +0 -1
  489. package/dist/types/puzzle-geometry/index.d.ts.map +0 -1
  490. package/dist/types/puzzle-geometry/interfaces.d.ts +0 -6
  491. package/dist/types/puzzle-geometry/interfaces.d.ts.map +0 -1
  492. package/dist/types/puzzle-geometry/notation-mapping/FTONotationMapper.d.ts.map +0 -1
  493. package/dist/types/puzzle-geometry/notation-mapping/FaceRenamingMapper.d.ts.map +0 -1
  494. package/dist/types/puzzle-geometry/notation-mapping/MegaminxScramblingNotationMapper.d.ts.map +0 -1
  495. package/dist/types/puzzle-geometry/notation-mapping/NotationMapper.d.ts.map +0 -1
  496. package/dist/types/puzzle-geometry/notation-mapping/NullMapper.d.ts.map +0 -1
  497. package/dist/types/puzzle-geometry/notation-mapping/NxNxNCubeMapper.d.ts.map +0 -1
  498. package/dist/types/puzzle-geometry/notation-mapping/PyraminxNotationMapper.d.ts.map +0 -1
  499. package/dist/types/puzzle-geometry/notation-mapping/SkewbNotationMapper.d.ts.map +0 -1
  500. package/dist/types/puzzle-geometry/notation-mapping/index.d.ts.map +0 -1
  501. package/dist/types/puzzle-geometry/orientcenters.spec.d.ts.map +0 -1
  502. package/dist/types/puzzles/PuzzleLoader.d.ts.map +0 -1
  503. package/dist/types/puzzles/async/async-pg3d.d.ts.map +0 -1
  504. package/dist/types/puzzles/customPGPuzzleLoader.d.ts.map +0 -1
  505. package/dist/types/puzzles/implementations/2x2x2/2x2x2.kpuzzle.json.d.ts.map +0 -1
  506. package/dist/types/puzzles/implementations/2x2x2/2x2x2.kpuzzle.svg.d.ts.map +0 -1
  507. package/dist/types/puzzles/implementations/2x2x2/index.d.ts.map +0 -1
  508. package/dist/types/puzzles/implementations/3x3x3/3x3x3-ll.kpuzzle.svg.d.ts.map +0 -1
  509. package/dist/types/puzzles/implementations/3x3x3/3x3x3.kpuzzle.svg.d.ts.map +0 -1
  510. package/dist/types/puzzles/implementations/3x3x3/index.d.ts.map +0 -1
  511. package/dist/types/puzzles/implementations/clock/clock.kpuzzle.json.d.ts.map +0 -1
  512. package/dist/types/puzzles/implementations/clock/clock.kpuzzle.svg.d.ts.map +0 -1
  513. package/dist/types/puzzles/implementations/clock/index.d.ts.map +0 -1
  514. package/dist/types/puzzles/implementations/fto/index.d.ts.map +0 -1
  515. package/dist/types/puzzles/implementations/megaminx/index.d.ts.map +0 -1
  516. package/dist/types/puzzles/implementations/pyraminx/index.d.ts.map +0 -1
  517. package/dist/types/puzzles/implementations/pyraminx/pyraminx.kpuzzle.json.d.ts.map +0 -1
  518. package/dist/types/puzzles/implementations/pyraminx/pyraminx.kpuzzle.svg.d.ts.map +0 -1
  519. package/dist/types/puzzles/implementations/square1/index.d.ts.map +0 -1
  520. package/dist/types/puzzles/implementations/square1/sq1-hyperorbit.kpuzzle.json.d.ts.map +0 -1
  521. package/dist/types/puzzles/implementations/square1/sq1-hyperorbit.kpuzzle.svg.d.ts.map +0 -1
  522. package/dist/types/puzzles/index.d.ts.map +0 -1
  523. package/dist/types/puzzles/stickerings/appearance.d.ts.map +0 -1
  524. package/dist/types/puzzles/stickerings/cube-stickerings.d.ts.map +0 -1
  525. package/dist/types/puzzles/stickerings/fto-stickerings.d.ts.map +0 -1
  526. package/dist/types/puzzles/stickerings/global-custom-stickering-hack.d.ts.map +0 -1
  527. package/dist/types/puzzles/stickerings/megaminx-stickerings.d.ts.map +0 -1
  528. package/dist/types/scramble/index.d.ts.map +0 -1
  529. package/dist/types/search/esm-test-worker.d.ts.map +0 -1
  530. package/dist/types/search/index.d.ts.map +0 -1
  531. package/dist/types/search/inside/api.d.ts.map +0 -1
  532. package/dist/types/search/inside/api.spec.d.ts.map +0 -1
  533. package/dist/types/search/inside/entry.d.ts.map +0 -1
  534. package/dist/types/search/inside/inside-worker.d.ts.map +0 -1
  535. package/dist/types/search/inside/module-entry-path-getter.d.ts.map +0 -1
  536. package/dist/types/search/inside/module-entry.d.ts.map +0 -1
  537. package/dist/types/search/inside/solve/addOrientationSuffix.d.ts.map +0 -1
  538. package/dist/types/search/inside/solve/parseSGS.d.ts.map +0 -1
  539. package/dist/types/search/inside/solve/puzzles/2x2x2.d.ts.map +0 -1
  540. package/dist/types/search/inside/solve/puzzles/2x2x2.sgs.json.d.ts.map +0 -1
  541. package/dist/types/search/inside/solve/puzzles/3x3x3/convert.d.ts.map +0 -1
  542. package/dist/types/search/inside/solve/puzzles/3x3x3/filter.d.ts.map +0 -1
  543. package/dist/types/search/inside/solve/puzzles/3x3x3/index.d.ts.map +0 -1
  544. package/dist/types/search/inside/solve/puzzles/3x3x3/legacy-sgs.d.ts.map +0 -1
  545. package/dist/types/search/inside/solve/puzzles/3x3x3-inefficient.sgs.json.d.ts.map +0 -1
  546. package/dist/types/search/inside/solve/puzzles/4x4x4.d.ts.map +0 -1
  547. package/dist/types/search/inside/solve/puzzles/5x5x5.d.ts.map +0 -1
  548. package/dist/types/search/inside/solve/puzzles/big-cubes.d.ts.map +0 -1
  549. package/dist/types/search/inside/solve/puzzles/clock.d.ts.map +0 -1
  550. package/dist/types/search/inside/solve/puzzles/fto.d.ts.map +0 -1
  551. package/dist/types/search/inside/solve/puzzles/fto.sgs.json.d.ts.map +0 -1
  552. package/dist/types/search/inside/solve/puzzles/megaminx.d.ts.map +0 -1
  553. package/dist/types/search/inside/solve/puzzles/megaminx.sgs.json.d.ts.map +0 -1
  554. package/dist/types/search/inside/solve/puzzles/pyraminx.d.ts.map +0 -1
  555. package/dist/types/search/inside/solve/puzzles/pyraminx.sgs.json.d.ts.map +0 -1
  556. package/dist/types/search/inside/solve/puzzles/sgs-defs.spec.d.ts.map +0 -1
  557. package/dist/types/search/inside/solve/puzzles/skewb.d.ts.map +0 -1
  558. package/dist/types/search/inside/solve/puzzles/skewb.sgs.json.d.ts.map +0 -1
  559. package/dist/types/search/inside/solve/puzzles/sq1.d.ts.map +0 -1
  560. package/dist/types/search/inside/solve/puzzles/wca-minx.d.ts.map +0 -1
  561. package/dist/types/search/inside/solve/tremble.d.ts.map +0 -1
  562. package/dist/types/search/instantiator.d.ts.map +0 -1
  563. package/dist/types/search/outside.d.ts.map +0 -1
  564. package/dist/types/search/worker-inside-generated-string.d.ts.map +0 -1
  565. package/dist/types/stream/index.d.ts.map +0 -1
  566. package/dist/types/stream/process/ReorientedStream.d.ts.map +0 -1
  567. package/dist/types/stream/proxy-event.d.ts.map +0 -1
  568. package/dist/types/stream/twizzle/TwizzleStream.d.ts.map +0 -1
  569. package/dist/types/stream/twizzle/stream-types.d.ts.map +0 -1
  570. package/dist/types/stream/websocket-proxy.d.ts.map +0 -1
  571. package/dist/types/twisty/controllers/AnimationTypes.d.ts.map +0 -1
  572. package/dist/types/twisty/controllers/RenderScheduler.d.ts.map +0 -1
  573. package/dist/types/twisty/controllers/TwistyAnimationController.d.ts.map +0 -1
  574. package/dist/types/twisty/controllers/TwistyPlayerController.d.ts.map +0 -1
  575. package/dist/types/twisty/controllers/easing.d.ts.map +0 -1
  576. package/dist/types/twisty/controllers/indexer/AlgDuration.d.ts.map +0 -1
  577. package/dist/types/twisty/controllers/indexer/AlgIndexer.d.ts.map +0 -1
  578. package/dist/types/twisty/controllers/indexer/SimpleAlgIndexer.d.ts.map +0 -1
  579. package/dist/types/twisty/controllers/indexer/simultaneous-moves/SimultaneousMoveIndexer.d.ts.map +0 -1
  580. package/dist/types/twisty/controllers/indexer/simultaneous-moves/SimultaneousMoveIndexerV2.d.ts.map +0 -1
  581. package/dist/types/twisty/controllers/indexer/simultaneous-moves/simul-moves.d.ts.map +0 -1
  582. package/dist/types/twisty/controllers/indexer/tree/AlgWalker.d.ts.map +0 -1
  583. package/dist/types/twisty/controllers/indexer/tree/TreeAlgIndexer.d.ts.map +0 -1
  584. package/dist/types/twisty/controllers/indexer/tree/chunkAlgs.d.ts.map +0 -1
  585. package/dist/types/twisty/controllers/stream/timeline-move-calculation-draft.d.ts.map +0 -1
  586. package/dist/types/twisty/heavy-code-imports/3d.d.ts.map +0 -1
  587. package/dist/types/twisty/heavy-code-imports/dynamic-entries/3d.d.ts.map +0 -1
  588. package/dist/types/twisty/index.d.ts.map +0 -1
  589. package/dist/types/twisty/model/PromiseFreshener.d.ts.map +0 -1
  590. package/dist/types/twisty/model/TwistyPlayerModel.d.ts.map +0 -1
  591. package/dist/types/twisty/model/UserVisibleErrorTracker.d.ts.map +0 -1
  592. package/dist/types/twisty/model/helpers.d.ts.map +0 -1
  593. package/dist/types/twisty/model/props/TwistyProp.d.ts.map +0 -1
  594. package/dist/types/twisty/model/props/TwistyProp.spec.d.ts.map +0 -1
  595. package/dist/types/twisty/model/props/TwistyPropDebugger.d.ts.map +0 -1
  596. package/dist/types/twisty/model/props/general/URLProp.d.ts.map +0 -1
  597. package/dist/types/twisty/model/props/puzzle/display/FoundationDisplayProp.d.ts.map +0 -1
  598. package/dist/types/twisty/model/props/puzzle/display/HintFaceletProp.d.ts.map +0 -1
  599. package/dist/types/twisty/model/props/puzzle/display/SpriteProp.d.ts.map +0 -1
  600. package/dist/types/twisty/model/props/puzzle/display/StickeringProp.d.ts.map +0 -1
  601. package/dist/types/twisty/model/props/puzzle/state/AlgProp.d.ts.map +0 -1
  602. package/dist/types/twisty/model/props/puzzle/state/AlgTransformationProp.d.ts.map +0 -1
  603. package/dist/types/twisty/model/props/puzzle/state/AnchoredStartProp.d.ts.map +0 -1
  604. package/dist/types/twisty/model/props/puzzle/state/CatchUpMoveProp.d.ts.map +0 -1
  605. package/dist/types/twisty/model/props/puzzle/state/CurrentLeavesProp.d.ts.map +0 -1
  606. package/dist/types/twisty/model/props/puzzle/state/CurrentLeavesSimplified.d.ts.map +0 -1
  607. package/dist/types/twisty/model/props/puzzle/state/CurrentTransformationProp.d.ts +0 -15
  608. package/dist/types/twisty/model/props/puzzle/state/CurrentTransformationProp.d.ts.map +0 -1
  609. package/dist/types/twisty/model/props/puzzle/state/IndexerConstructorProp.d.ts.map +0 -1
  610. package/dist/types/twisty/model/props/puzzle/state/IndexerConstructorRequestProp.d.ts.map +0 -1
  611. package/dist/types/twisty/model/props/puzzle/state/IndexerProp.d.ts.map +0 -1
  612. package/dist/types/twisty/model/props/puzzle/state/LegacyPositionProp.d.ts.map +0 -1
  613. package/dist/types/twisty/model/props/puzzle/state/MovePressInputProp.d.ts.map +0 -1
  614. package/dist/types/twisty/model/props/puzzle/state/NaiveMoveCountProp.d.ts.map +0 -1
  615. package/dist/types/twisty/model/props/puzzle/state/PuzzleAlgProp.d.ts.map +0 -1
  616. package/dist/types/twisty/model/props/puzzle/state/SetupAnchorProp.d.ts.map +0 -1
  617. package/dist/types/twisty/model/props/puzzle/structure/PuzzleDefProp.d.ts +0 -11
  618. package/dist/types/twisty/model/props/puzzle/structure/PuzzleDefProp.d.ts.map +0 -1
  619. package/dist/types/twisty/model/props/puzzle/structure/PuzzleDescriptionProp.d.ts.map +0 -1
  620. package/dist/types/twisty/model/props/puzzle/structure/PuzzleIDProp.d.ts.map +0 -1
  621. package/dist/types/twisty/model/props/puzzle/structure/PuzzleIDRequestProp.d.ts.map +0 -1
  622. package/dist/types/twisty/model/props/puzzle/structure/PuzzleLoaderProp.d.ts.map +0 -1
  623. package/dist/types/twisty/model/props/timeline/CoarseTimelineInfoProp.d.ts.map +0 -1
  624. package/dist/types/twisty/model/props/timeline/DetailedTimelineInfoProp.d.ts.map +0 -1
  625. package/dist/types/twisty/model/props/timeline/PlayingInfoProp.d.ts.map +0 -1
  626. package/dist/types/twisty/model/props/timeline/TempoScaleProp.d.ts.map +0 -1
  627. package/dist/types/twisty/model/props/timeline/TimestampRequestProp.d.ts.map +0 -1
  628. package/dist/types/twisty/model/props/viewer/BackViewProp.d.ts.map +0 -1
  629. package/dist/types/twisty/model/props/viewer/BackgroundProp.d.ts.map +0 -1
  630. package/dist/types/twisty/model/props/viewer/ButtonAppearanceProp.d.ts.map +0 -1
  631. package/dist/types/twisty/model/props/viewer/ControlPanelProp.d.ts.map +0 -1
  632. package/dist/types/twisty/model/props/viewer/LatitudeLimit.d.ts.map +0 -1
  633. package/dist/types/twisty/model/props/viewer/OrbitCoordinatesProp.d.ts.map +0 -1
  634. package/dist/types/twisty/model/props/viewer/OrbitCoordinatesRequestProp.d.ts.map +0 -1
  635. package/dist/types/twisty/model/props/viewer/TimeRangeProp.d.ts.map +0 -1
  636. package/dist/types/twisty/model/props/viewer/ViewerLinkProp.d.ts.map +0 -1
  637. package/dist/types/twisty/model/props/viewer/VisualizationProp.d.ts.map +0 -1
  638. package/dist/types/twisty/model/props/viewer/VisualizationStrategyProp.d.ts.map +0 -1
  639. package/dist/types/twisty/views/2D/Twisty2DPuzzle.css.d.ts.map +0 -1
  640. package/dist/types/twisty/views/2D/Twisty2DPuzzle.d.ts.map +0 -1
  641. package/dist/types/twisty/views/2D/Twisty2DPuzzleWrapper.d.ts.map +0 -1
  642. package/dist/types/twisty/views/2D/Twisty2DSceneWrapper.d.ts.map +0 -1
  643. package/dist/types/twisty/views/3D/DragTracker.d.ts.map +0 -1
  644. package/dist/types/twisty/views/3D/RendererPool.d.ts.map +0 -1
  645. package/dist/types/twisty/views/3D/TAU.d.ts.map +0 -1
  646. package/dist/types/twisty/views/3D/Twisty3DPuzzleWrapper.d.ts.map +0 -1
  647. package/dist/types/twisty/views/3D/Twisty3DRenderTarget.d.ts.map +0 -1
  648. package/dist/types/twisty/views/3D/Twisty3DScene.d.ts.map +0 -1
  649. package/dist/types/twisty/views/3D/Twisty3DSceneWrapper.d.ts.map +0 -1
  650. package/dist/types/twisty/views/3D/Twisty3DVantage.css.d.ts.map +0 -1
  651. package/dist/types/twisty/views/3D/Twisty3DVantage.d.ts.map +0 -1
  652. package/dist/types/twisty/views/3D/TwistyOrbitControls.d.ts.map +0 -1
  653. package/dist/types/twisty/views/3D/TwistyOrbitControls.spec.d.ts.map +0 -1
  654. package/dist/types/twisty/views/3D/puzzles/Cube3D.d.ts.map +0 -1
  655. package/dist/types/twisty/views/3D/puzzles/KPuzzleWrapper.d.ts +0 -48
  656. package/dist/types/twisty/views/3D/puzzles/KPuzzleWrapper.d.ts.map +0 -1
  657. package/dist/types/twisty/views/3D/puzzles/PG3D.d.ts.map +0 -1
  658. package/dist/types/twisty/views/3D/puzzles/Twisty3DPuzzle.d.ts.map +0 -1
  659. package/dist/types/twisty/views/ClassListManager.d.ts.map +0 -1
  660. package/dist/types/twisty/views/ManagedCustomElement.d.ts.map +0 -1
  661. package/dist/types/twisty/views/TwistyAlgEditor/LeafTokens.d.ts.map +0 -1
  662. package/dist/types/twisty/views/TwistyAlgEditor/TwistyAlgEditor.css.d.ts.map +0 -1
  663. package/dist/types/twisty/views/TwistyAlgEditor/TwistyAlgEditor.d.ts.map +0 -1
  664. package/dist/types/twisty/views/TwistyAlgEditor/TwistyAlgEditor.spec.d.ts.map +0 -1
  665. package/dist/types/twisty/views/TwistyAlgEditor/model.d.ts.map +0 -1
  666. package/dist/types/twisty/views/TwistyAlgViewer.css.d.ts.map +0 -1
  667. package/dist/types/twisty/views/TwistyAlgViewer.d.ts.map +0 -1
  668. package/dist/types/twisty/views/TwistyPlayer.css.d.ts.map +0 -1
  669. package/dist/types/twisty/views/TwistyPlayer.d.ts.map +0 -1
  670. package/dist/types/twisty/views/TwistyPlayerSettable.d.ts.map +0 -1
  671. package/dist/types/twisty/views/TwistyViewerWrapper.css.d.ts.map +0 -1
  672. package/dist/types/twisty/views/canvas.d.ts.map +0 -1
  673. package/dist/types/twisty/views/control-panel/TwistyButtonsV2.css.d.ts.map +0 -1
  674. package/dist/types/twisty/views/control-panel/TwistyButtonsV2.d.ts.map +0 -1
  675. package/dist/types/twisty/views/control-panel/TwistyScrubber.css.d.ts.map +0 -1
  676. package/dist/types/twisty/views/control-panel/TwistyScrubberV2.d.ts.map +0 -1
  677. package/dist/types/twisty/views/control-panel/webkit-fullscreen.d.ts.map +0 -1
  678. package/dist/types/twisty/views/document.d.ts.map +0 -1
  679. package/dist/types/twisty/views/node-custom-element-shims.d.ts.map +0 -1
  680. package/dist/types/twisty/views/screenshot.d.ts.map +0 -1
  681. package/dist/types/twisty/views/stream/TwistyStreamSource.css.d.ts.map +0 -1
  682. package/dist/types/twisty/views/stream/TwistyStreamSource.d.ts.map +0 -1
  683. package/dist/types/vendor/comlink-everywhere/inside/index.d.ts.map +0 -1
  684. package/dist/types/vendor/comlink-everywhere/inside/node.d.ts.map +0 -1
  685. package/dist/types/vendor/comlink-everywhere/outside/index.d.ts.map +0 -1
  686. package/dist/types/vendor/comlink-everywhere/outside/node.d.ts.map +0 -1
  687. package/dist/types/vendor/cstimer/src/js/lib/mathlib.d.ts.map +0 -1
  688. package/dist/types/vendor/cstimer/src/js/scramble/scramble_444.d.ts.map +0 -1
  689. package/dist/types/vendor/min2phase/gwt.d.ts.map +0 -1
  690. package/dist/types/vendor/p-lazy/p-lazy.d.ts.map +0 -1
  691. package/dist/types/vendor/random-uint-below/get-random-values.d.ts.map +0 -1
  692. package/dist/types/vendor/random-uint-below/index.d.ts.map +0 -1
  693. package/dist/types/vendor/random-uint-below/random-choice.d.ts.map +0 -1
  694. package/dist/types/vendor/random-uint-below/random53BitValue.d.ts.map +0 -1
  695. package/dist/types/vendor/sq12phase/scramble_sq1.d.ts.map +0 -1
  696. package/dist/types/vendor/three/examples/jsm/libs/stats.modified.module.d.ts.map +0 -1
  697. package/dist/types/vendor/unsafe-raw-aes/unsafe-raw-aes.d.ts.map +0 -1
  698. package/docs/.DS_Store +0 -0
  699. package/docs/CNAME +0 -1
  700. package/docs/cubing/.DS_Store +0 -0
  701. package/docs/cubing/alg/index.html +0 -174
  702. package/docs/cubing/api/index.html +0 -158
  703. package/docs/cubing/index.html +0 -191
  704. package/docs/cubing/scramble/index.html +0 -138
  705. package/docs/cubing/twisty/index.html +0 -329
  706. package/docs/favicon.ico +0 -0
  707. package/docs/index.html +0 -20
  708. package/docs/main.css +0 -193
  709. package/src/cubing/.DS_Store +0 -0
  710. package/src/cubing/alg/Alg.spec.ts +0 -10
  711. package/src/cubing/alg/Alg.ts +0 -290
  712. package/src/cubing/alg/AlgBuilder.ts +0 -33
  713. package/src/cubing/alg/Serializable.ts +0 -29
  714. package/src/cubing/alg/common.ts +0 -59
  715. package/src/cubing/alg/debug.ts +0 -27
  716. package/src/cubing/alg/example.ts +0 -152
  717. package/src/cubing/alg/index.ts +0 -21
  718. package/src/cubing/alg/is.ts +0 -38
  719. package/src/cubing/alg/iteration.ts +0 -45
  720. package/src/cubing/alg/keyboard.ts +0 -48
  721. package/src/cubing/alg/limits.ts +0 -4
  722. package/src/cubing/alg/operation.spec.ts +0 -48
  723. package/src/cubing/alg/operation.ts +0 -36
  724. package/src/cubing/alg/parse.spec.ts +0 -75
  725. package/src/cubing/alg/parse.ts +0 -408
  726. package/src/cubing/alg/test/alg-comparison.ts +0 -23
  727. package/src/cubing/alg/test/alg.spec.ts +0 -348
  728. package/src/cubing/alg/traversal.ts +0 -284
  729. package/src/cubing/alg/units/QuantumWithAmount.ts +0 -55
  730. package/src/cubing/alg/units/Unit.ts +0 -11
  731. package/src/cubing/alg/units/containers/Commutator.ts +0 -85
  732. package/src/cubing/alg/units/containers/Conjugate.ts +0 -53
  733. package/src/cubing/alg/units/containers/Grouping.ts +0 -116
  734. package/src/cubing/alg/units/index.ts +0 -8
  735. package/src/cubing/alg/units/leaves/LineComment.spec.ts +0 -35
  736. package/src/cubing/alg/units/leaves/LineComment.ts +0 -48
  737. package/src/cubing/alg/units/leaves/Move.spec.ts +0 -15
  738. package/src/cubing/alg/units/leaves/Move.ts +0 -265
  739. package/src/cubing/alg/units/leaves/Newline.ts +0 -24
  740. package/src/cubing/alg/units/leaves/Pause.ts +0 -24
  741. package/src/cubing/alg/url.spec.ts +0 -10
  742. package/src/cubing/alg/url.ts +0 -133
  743. package/src/cubing/alg/validation.ts +0 -62
  744. package/src/cubing/alg/warnOnce.ts +0 -7
  745. package/src/cubing/bluetooth/connect/index.ts +0 -93
  746. package/src/cubing/bluetooth/debug.ts +0 -18
  747. package/src/cubing/bluetooth/docs/gan-robot.md +0 -60
  748. package/src/cubing/bluetooth/docs/gan356i.md +0 -309
  749. package/src/cubing/bluetooth/index.ts +0 -19
  750. package/src/cubing/bluetooth/keyboard.ts +0 -55
  751. package/src/cubing/bluetooth/smart-puzzle/Heykube.ts +0 -165
  752. package/src/cubing/bluetooth/smart-puzzle/bluetooth-puzzle.ts +0 -95
  753. package/src/cubing/bluetooth/smart-puzzle/connect.ts +0 -19
  754. package/src/cubing/bluetooth/smart-puzzle/endianness.ts +0 -15
  755. package/src/cubing/bluetooth/smart-puzzle/gan.ts +0 -484
  756. package/src/cubing/bluetooth/smart-puzzle/giiker.spec.ts +0 -28
  757. package/src/cubing/bluetooth/smart-puzzle/giiker.ts +0 -277
  758. package/src/cubing/bluetooth/smart-puzzle/gocube.ts +0 -167
  759. package/src/cubing/bluetooth/smart-robot/GanRobot.ts +0 -311
  760. package/src/cubing/bluetooth/smart-robot/index.ts +0 -13
  761. package/src/cubing/bluetooth/smart-timer/GanTimer.ts +0 -141
  762. package/src/cubing/bluetooth/smart-timer/index.ts +0 -13
  763. package/src/cubing/bluetooth/transformer.ts +0 -74
  764. package/src/cubing/cubing.bundle-global.exports.ts +0 -25
  765. package/src/cubing/cubing.bundle-global.ts +0 -7
  766. package/src/cubing/esm-test-worker.js +0 -5
  767. package/src/cubing/kpuzzle/3x3x3/3x3x3.kpuzzle.json.spec.ts +0 -40
  768. package/src/cubing/kpuzzle/3x3x3/3x3x3.kpuzzle.json.ts +0 -339
  769. package/src/cubing/kpuzzle/canon.spec.ts +0 -48
  770. package/src/cubing/kpuzzle/canonicalize.ts +0 -325
  771. package/src/cubing/kpuzzle/definition_types.ts +0 -23
  772. package/src/cubing/kpuzzle/index.ts +0 -33
  773. package/src/cubing/kpuzzle/kpuzzle.spec.ts +0 -12
  774. package/src/cubing/kpuzzle/kpuzzle.ts +0 -124
  775. package/src/cubing/kpuzzle/move_notation.ts +0 -9
  776. package/src/cubing/kpuzzle/parser/index.ts +0 -1
  777. package/src/cubing/kpuzzle/parser/parser-peggy.js +0 -1221
  778. package/src/cubing/kpuzzle/parser/parser-peggy.peggy +0 -72
  779. package/src/cubing/kpuzzle/parser/parser-shim.ts +0 -11
  780. package/src/cubing/kpuzzle/parser/parser.js +0 -0
  781. package/src/cubing/kpuzzle/prunetable.spec.ts +0 -19
  782. package/src/cubing/kpuzzle/pruningtable.ts +0 -99
  783. package/src/cubing/kpuzzle/puzzle-orientation.ts +0 -34
  784. package/src/cubing/kpuzzle/svg.ts +0 -290
  785. package/src/cubing/kpuzzle/transformations.spec.ts +0 -75
  786. package/src/cubing/kpuzzle/transformations.ts +0 -258
  787. package/src/cubing/notation/CountAnimatedLeaves.ts +0 -56
  788. package/src/cubing/notation/CountMoves.ts +0 -89
  789. package/src/cubing/notation/index.ts +0 -4
  790. package/src/cubing/protocol/binary/binary3x3x3.spec.ts +0 -143
  791. package/src/cubing/protocol/binary/binary3x3x3.ts +0 -226
  792. package/src/cubing/protocol/binary/hex.spec.ts +0 -17
  793. package/src/cubing/protocol/binary/hex.ts +0 -12
  794. package/src/cubing/protocol/binary/orbit-indexing.spec.ts +0 -49
  795. package/src/cubing/protocol/binary/orbit-indexing.ts +0 -68
  796. package/src/cubing/protocol/binary/puzzle-orientation.ts +0 -69
  797. package/src/cubing/protocol/index.ts +0 -12
  798. package/src/cubing/puzzle-geometry/FaceNameSwizzler.ts +0 -148
  799. package/src/cubing/puzzle-geometry/Options.ts +0 -179
  800. package/src/cubing/puzzle-geometry/PGPuzzles.spec.ts +0 -127
  801. package/src/cubing/puzzle-geometry/PGPuzzles.ts +0 -80
  802. package/src/cubing/puzzle-geometry/Perm.ts +0 -154
  803. package/src/cubing/puzzle-geometry/PermOriSet.ts +0 -765
  804. package/src/cubing/puzzle-geometry/PlatonicGenerator.ts +0 -146
  805. package/src/cubing/puzzle-geometry/PuzzleGeometry.ts +0 -3013
  806. package/src/cubing/puzzle-geometry/Quat.spec.ts +0 -10
  807. package/src/cubing/puzzle-geometry/Quat.ts +0 -325
  808. package/src/cubing/puzzle-geometry/SchreierSims.ts +0 -144
  809. package/src/cubing/puzzle-geometry/index.ts +0 -17
  810. package/src/cubing/puzzle-geometry/interfaces.ts +0 -6
  811. package/src/cubing/puzzle-geometry/notation-mapping/FTONotationMapper.ts +0 -38
  812. package/src/cubing/puzzle-geometry/notation-mapping/FaceRenamingMapper.ts +0 -59
  813. package/src/cubing/puzzle-geometry/notation-mapping/MegaminxScramblingNotationMapper.ts +0 -50
  814. package/src/cubing/puzzle-geometry/notation-mapping/NotationMapper.ts +0 -6
  815. package/src/cubing/puzzle-geometry/notation-mapping/NullMapper.ts +0 -12
  816. package/src/cubing/puzzle-geometry/notation-mapping/NxNxNCubeMapper.ts +0 -77
  817. package/src/cubing/puzzle-geometry/notation-mapping/PyraminxNotationMapper.ts +0 -121
  818. package/src/cubing/puzzle-geometry/notation-mapping/SkewbNotationMapper.ts +0 -103
  819. package/src/cubing/puzzle-geometry/notation-mapping/index.ts +0 -13
  820. package/src/cubing/puzzle-geometry/orientcenters.spec.ts +0 -55
  821. package/src/cubing/puzzles/PuzzleLoader.ts +0 -20
  822. package/src/cubing/puzzles/async/async-pg3d.ts +0 -73
  823. package/src/cubing/puzzles/customPGPuzzleLoader.ts +0 -60
  824. package/src/cubing/puzzles/implementations/2x2x2/2x2x2.kpuzzle.json.ts +0 -92
  825. package/src/cubing/puzzles/implementations/2x2x2/2x2x2.kpuzzle.svg.ts +0 -45
  826. package/src/cubing/puzzles/implementations/2x2x2/index.ts +0 -25
  827. package/src/cubing/puzzles/implementations/2x2x2/svg/2x2x2.kpuzzle.svg +0 -45
  828. package/src/cubing/puzzles/implementations/3x3x3/3x3x3-ll.kpuzzle.svg.ts +0 -108
  829. package/src/cubing/puzzles/implementations/3x3x3/3x3x3.kpuzzle.svg.ts +0 -128
  830. package/src/cubing/puzzles/implementations/3x3x3/index.ts +0 -33
  831. package/src/cubing/puzzles/implementations/3x3x3/src/3x3x3-ll.kpuzzle.svg +0 -108
  832. package/src/cubing/puzzles/implementations/3x3x3/src/3x3x3.kpuzzle.svg +0 -128
  833. package/src/cubing/puzzles/implementations/TODO/svg/alg/3x3x3.kpuzzle.original.svg +0 -128
  834. package/src/cubing/puzzles/implementations/TODO/svg/alg/3x3x3.kpuzzle.outlined.svg +0 -486
  835. package/src/cubing/puzzles/implementations/TODO/svg/alg/3x3x3.kpuzzle.spaced.svg +0 -128
  836. package/src/cubing/puzzles/implementations/clock/clock.kpuzzle.json.ts +0 -241
  837. package/src/cubing/puzzles/implementations/clock/clock.kpuzzle.svg.ts +0 -369
  838. package/src/cubing/puzzles/implementations/clock/index.ts +0 -14
  839. package/src/cubing/puzzles/implementations/clock/src/clock.kpuzzle.svg +0 -369
  840. package/src/cubing/puzzles/implementations/fto/index.ts +0 -28
  841. package/src/cubing/puzzles/implementations/megaminx/index.ts +0 -20
  842. package/src/cubing/puzzles/implementations/pyraminx/index.ts +0 -18
  843. package/src/cubing/puzzles/implementations/pyraminx/pyraminx.kpuzzle.json.ts +0 -84
  844. package/src/cubing/puzzles/implementations/pyraminx/pyraminx.kpuzzle.svg.ts +0 -88
  845. package/src/cubing/puzzles/implementations/pyraminx/src/pyraminx.kpuzzle.svg +0 -87
  846. package/src/cubing/puzzles/implementations/square1/index.ts +0 -14
  847. package/src/cubing/puzzles/implementations/square1/sq1-hyperorbit.kpuzzle.json.ts +0 -62
  848. package/src/cubing/puzzles/implementations/square1/sq1-hyperorbit.kpuzzle.svg.ts +0 -295
  849. package/src/cubing/puzzles/implementations/square1/src/sq1-hyperorbit.kpuzzle.svg +0 -295
  850. package/src/cubing/puzzles/implementations/square1/src/sq1-simple.svg +0 -60
  851. package/src/cubing/puzzles/index.ts +0 -92
  852. package/src/cubing/puzzles/stickerings/appearance.ts +0 -292
  853. package/src/cubing/puzzles/stickerings/cube-stickerings.ts +0 -304
  854. package/src/cubing/puzzles/stickerings/fto-stickerings.ts +0 -105
  855. package/src/cubing/puzzles/stickerings/global-custom-stickering-hack.ts +0 -61
  856. package/src/cubing/puzzles/stickerings/megaminx-stickerings.ts +0 -26
  857. package/src/cubing/scramble/index.ts +0 -1
  858. package/src/cubing/search/.DS_Store +0 -0
  859. package/src/cubing/search/.gitignore +0 -1
  860. package/src/cubing/search/esm-test-worker.js +0 -14
  861. package/src/cubing/search/index.ts +0 -12
  862. package/src/cubing/search/inside/.DS_Store +0 -0
  863. package/src/cubing/search/inside/api.spec.ts +0 -37
  864. package/src/cubing/search/inside/api.ts +0 -174
  865. package/src/cubing/search/inside/entry.js +0 -4
  866. package/src/cubing/search/inside/inside-worker.ts +0 -13
  867. package/src/cubing/search/inside/module-entry-path-getter.ts +0 -5
  868. package/src/cubing/search/inside/module-entry.ts +0 -20
  869. package/src/cubing/search/inside/solve/addOrientationSuffix.ts +0 -17
  870. package/src/cubing/search/inside/solve/parseSGS.ts +0 -119
  871. package/src/cubing/search/inside/solve/puzzles/2x2x2.sgs.json.ts +0 -114
  872. package/src/cubing/search/inside/solve/puzzles/2x2x2.ts +0 -92
  873. package/src/cubing/search/inside/solve/puzzles/3x3x3/convert.ts +0 -137
  874. package/src/cubing/search/inside/solve/puzzles/3x3x3/filter.ts +0 -60
  875. package/src/cubing/search/inside/solve/puzzles/3x3x3/index.ts +0 -67
  876. package/src/cubing/search/inside/solve/puzzles/3x3x3/legacy-sgs.ts +0 -291
  877. package/src/cubing/search/inside/solve/puzzles/3x3x3-inefficient.sgs.json.ts +0 -272
  878. package/src/cubing/search/inside/solve/puzzles/4x4x4.ts +0 -30
  879. package/src/cubing/search/inside/solve/puzzles/5x5x5.ts +0 -12
  880. package/src/cubing/search/inside/solve/puzzles/big-cubes.ts +0 -78
  881. package/src/cubing/search/inside/solve/puzzles/clock.ts +0 -48
  882. package/src/cubing/search/inside/solve/puzzles/fto.sgs.json.ts +0 -643
  883. package/src/cubing/search/inside/solve/puzzles/fto.ts +0 -58
  884. package/src/cubing/search/inside/solve/puzzles/megaminx.sgs.json.ts +0 -1549
  885. package/src/cubing/search/inside/solve/puzzles/megaminx.ts +0 -51
  886. package/src/cubing/search/inside/solve/puzzles/pyraminx.sgs.json.ts +0 -98
  887. package/src/cubing/search/inside/solve/puzzles/pyraminx.ts +0 -48
  888. package/src/cubing/search/inside/solve/puzzles/sgs-defs.spec.ts +0 -27
  889. package/src/cubing/search/inside/solve/puzzles/skewb.sgs.json.ts +0 -113
  890. package/src/cubing/search/inside/solve/puzzles/skewb.ts +0 -65
  891. package/src/cubing/search/inside/solve/puzzles/sq1.ts +0 -16
  892. package/src/cubing/search/inside/solve/puzzles/wca-minx.ts +0 -32
  893. package/src/cubing/search/inside/solve/tremble.ts +0 -213
  894. package/src/cubing/search/instantiator.ts +0 -95
  895. package/src/cubing/search/outside.ts +0 -110
  896. package/src/cubing/search/worker-inside-generated-string.js +0 -1
  897. package/src/cubing/stream/index.ts +0 -12
  898. package/src/cubing/stream/process/ReorientedStream.ts +0 -93
  899. package/src/cubing/stream/proxy-event.ts +0 -16
  900. package/src/cubing/stream/twizzle/TwizzleStream.ts +0 -53
  901. package/src/cubing/stream/twizzle/stream-types.ts +0 -45
  902. package/src/cubing/stream/websocket-proxy.ts +0 -73
  903. package/src/cubing/twisty/controllers/AnimationTypes.ts +0 -50
  904. package/src/cubing/twisty/controllers/RenderScheduler.ts +0 -28
  905. package/src/cubing/twisty/controllers/TwistyAnimationController.ts +0 -325
  906. package/src/cubing/twisty/controllers/TwistyPlayerController.ts +0 -38
  907. package/src/cubing/twisty/controllers/easing.ts +0 -3
  908. package/src/cubing/twisty/controllers/indexer/AlgDuration.ts +0 -94
  909. package/src/cubing/twisty/controllers/indexer/AlgIndexer.ts +0 -87
  910. package/src/cubing/twisty/controllers/indexer/SimpleAlgIndexer.ts +0 -76
  911. package/src/cubing/twisty/controllers/indexer/simultaneous-moves/SimultaneousMoveIndexer.ts +0 -181
  912. package/src/cubing/twisty/controllers/indexer/simultaneous-moves/SimultaneousMoveIndexerV2.ts +0 -243
  913. package/src/cubing/twisty/controllers/indexer/simultaneous-moves/simul-moves.ts +0 -193
  914. package/src/cubing/twisty/controllers/indexer/tree/AlgWalker.ts +0 -439
  915. package/src/cubing/twisty/controllers/indexer/tree/TreeAlgIndexer.ts +0 -97
  916. package/src/cubing/twisty/controllers/indexer/tree/chunkAlgs.ts +0 -81
  917. package/src/cubing/twisty/controllers/stream/timeline-move-calculation-draft.spec.ts.TODO +0 -59
  918. package/src/cubing/twisty/controllers/stream/timeline-move-calculation-draft.ts +0 -162
  919. package/src/cubing/twisty/heavy-code-imports/3d.ts +0 -18
  920. package/src/cubing/twisty/heavy-code-imports/dynamic-entries/3d.ts +0 -31
  921. package/src/cubing/twisty/index.ts +0 -24
  922. package/src/cubing/twisty/model/PromiseFreshener.ts +0 -49
  923. package/src/cubing/twisty/model/TwistyPlayerModel.ts +0 -256
  924. package/src/cubing/twisty/model/UserVisibleErrorTracker.ts +0 -22
  925. package/src/cubing/twisty/model/helpers.ts +0 -47
  926. package/src/cubing/twisty/model/props/TwistyProp.spec.ts +0 -38
  927. package/src/cubing/twisty/model/props/TwistyProp.ts +0 -366
  928. package/src/cubing/twisty/model/props/TwistyPropDebugger.ts +0 -370
  929. package/src/cubing/twisty/model/props/general/URLProp.ts +0 -14
  930. package/src/cubing/twisty/model/props/puzzle/display/FoundationDisplayProp.ts +0 -9
  931. package/src/cubing/twisty/model/props/puzzle/display/HintFaceletProp.ts +0 -15
  932. package/src/cubing/twisty/model/props/puzzle/display/SpriteProp.ts +0 -43
  933. package/src/cubing/twisty/model/props/puzzle/display/StickeringProp.ts +0 -56
  934. package/src/cubing/twisty/model/props/puzzle/state/AlgProp.ts +0 -91
  935. package/src/cubing/twisty/model/props/puzzle/state/AlgTransformationProp.ts +0 -28
  936. package/src/cubing/twisty/model/props/puzzle/state/AnchoredStartProp.ts +0 -44
  937. package/src/cubing/twisty/model/props/puzzle/state/CatchUpMoveProp.ts +0 -17
  938. package/src/cubing/twisty/model/props/puzzle/state/CurrentLeavesProp.ts +0 -109
  939. package/src/cubing/twisty/model/props/puzzle/state/CurrentLeavesSimplified.ts +0 -48
  940. package/src/cubing/twisty/model/props/puzzle/state/CurrentTransformationProp.ts +0 -46
  941. package/src/cubing/twisty/model/props/puzzle/state/IndexerConstructorProp.ts +0 -53
  942. package/src/cubing/twisty/model/props/puzzle/state/IndexerConstructorRequestProp.ts +0 -15
  943. package/src/cubing/twisty/model/props/puzzle/state/IndexerProp.ts +0 -24
  944. package/src/cubing/twisty/model/props/puzzle/state/LegacyPositionProp.ts +0 -22
  945. package/src/cubing/twisty/model/props/puzzle/state/MovePressInputProp.ts +0 -14
  946. package/src/cubing/twisty/model/props/puzzle/state/NaiveMoveCountProp.ts +0 -20
  947. package/src/cubing/twisty/model/props/puzzle/state/PuzzleAlgProp.ts +0 -28
  948. package/src/cubing/twisty/model/props/puzzle/state/SetupAnchorProp.ts +0 -14
  949. package/src/cubing/twisty/model/props/puzzle/structure/PuzzleDefProp.ts +0 -14
  950. package/src/cubing/twisty/model/props/puzzle/structure/PuzzleDescriptionProp.ts +0 -14
  951. package/src/cubing/twisty/model/props/puzzle/structure/PuzzleIDProp.ts +0 -12
  952. package/src/cubing/twisty/model/props/puzzle/structure/PuzzleIDRequestProp.ts +0 -36
  953. package/src/cubing/twisty/model/props/puzzle/structure/PuzzleLoaderProp.ts +0 -38
  954. package/src/cubing/twisty/model/props/timeline/CoarseTimelineInfoProp.ts +0 -45
  955. package/src/cubing/twisty/model/props/timeline/DetailedTimelineInfoProp.ts +0 -78
  956. package/src/cubing/twisty/model/props/timeline/PlayingInfoProp.ts +0 -48
  957. package/src/cubing/twisty/model/props/timeline/TempoScaleProp.ts +0 -13
  958. package/src/cubing/twisty/model/props/timeline/TimestampRequestProp.ts +0 -38
  959. package/src/cubing/twisty/model/props/viewer/BackViewProp.ts +0 -16
  960. package/src/cubing/twisty/model/props/viewer/BackgroundProp.ts +0 -15
  961. package/src/cubing/twisty/model/props/viewer/ButtonAppearanceProp.ts +0 -86
  962. package/src/cubing/twisty/model/props/viewer/ControlPanelProp.ts +0 -14
  963. package/src/cubing/twisty/model/props/viewer/LatitudeLimit.ts +0 -11
  964. package/src/cubing/twisty/model/props/viewer/OrbitCoordinatesProp.ts +0 -127
  965. package/src/cubing/twisty/model/props/viewer/OrbitCoordinatesRequestProp.ts +0 -69
  966. package/src/cubing/twisty/model/props/viewer/TimeRangeProp.ts +0 -15
  967. package/src/cubing/twisty/model/props/viewer/ViewerLinkProp.ts +0 -14
  968. package/src/cubing/twisty/model/props/viewer/VisualizationProp.ts +0 -17
  969. package/src/cubing/twisty/model/props/viewer/VisualizationStrategyProp.ts +0 -45
  970. package/src/cubing/twisty/views/2D/Twisty2DPuzzle.css.ts +0 -26
  971. package/src/cubing/twisty/views/2D/Twisty2DPuzzle.ts +0 -146
  972. package/src/cubing/twisty/views/2D/Twisty2DPuzzleWrapper.ts +0 -52
  973. package/src/cubing/twisty/views/2D/Twisty2DSceneWrapper.ts +0 -77
  974. package/src/cubing/twisty/views/3D/DragTracker.ts +0 -184
  975. package/src/cubing/twisty/views/3D/RendererPool.ts +0 -54
  976. package/src/cubing/twisty/views/3D/TAU.ts +0 -2
  977. package/src/cubing/twisty/views/3D/Twisty3DPuzzleWrapper.ts +0 -214
  978. package/src/cubing/twisty/views/3D/Twisty3DRenderTarget.ts +0 -5
  979. package/src/cubing/twisty/views/3D/Twisty3DScene.ts +0 -42
  980. package/src/cubing/twisty/views/3D/Twisty3DSceneWrapper.ts +0 -189
  981. package/src/cubing/twisty/views/3D/Twisty3DVantage.css.ts +0 -32
  982. package/src/cubing/twisty/views/3D/Twisty3DVantage.ts +0 -312
  983. package/src/cubing/twisty/views/3D/TwistyOrbitControls.spec.ts +0 -213
  984. package/src/cubing/twisty/views/3D/TwistyOrbitControls.ts +0 -176
  985. package/src/cubing/twisty/views/3D/puzzles/Cube3D.ts +0 -966
  986. package/src/cubing/twisty/views/3D/puzzles/KPuzzleWrapper.ts +0 -142
  987. package/src/cubing/twisty/views/3D/puzzles/PG3D.ts +0 -1078
  988. package/src/cubing/twisty/views/3D/puzzles/Twisty3DPuzzle.ts +0 -6
  989. package/src/cubing/twisty/views/ClassListManager.ts +0 -34
  990. package/src/cubing/twisty/views/ManagedCustomElement.ts +0 -76
  991. package/src/cubing/twisty/views/TwistyAlgEditor/LeafTokens.ts +0 -116
  992. package/src/cubing/twisty/views/TwistyAlgEditor/TwistyAlgEditor.css.ts +0 -72
  993. package/src/cubing/twisty/views/TwistyAlgEditor/TwistyAlgEditor.spec.ts +0 -57
  994. package/src/cubing/twisty/views/TwistyAlgEditor/TwistyAlgEditor.ts +0 -368
  995. package/src/cubing/twisty/views/TwistyAlgEditor/model.ts +0 -179
  996. package/src/cubing/twisty/views/TwistyAlgViewer.css.ts +0 -25
  997. package/src/cubing/twisty/views/TwistyAlgViewer.ts +0 -502
  998. package/src/cubing/twisty/views/TwistyPlayer.css.ts +0 -73
  999. package/src/cubing/twisty/views/TwistyPlayer.ts +0 -362
  1000. package/src/cubing/twisty/views/TwistyPlayerSettable.ts +0 -115
  1001. package/src/cubing/twisty/views/TwistyViewerWrapper.css.ts +0 -41
  1002. package/src/cubing/twisty/views/canvas.ts +0 -9
  1003. package/src/cubing/twisty/views/control-panel/TwistyButtonsV2.css.ts +0 -127
  1004. package/src/cubing/twisty/views/control-panel/TwistyButtonsV2.ts +0 -156
  1005. package/src/cubing/twisty/views/control-panel/TwistyScrubber.css.ts +0 -48
  1006. package/src/cubing/twisty/views/control-panel/TwistyScrubberV2.ts +0 -145
  1007. package/src/cubing/twisty/views/control-panel/webkit-fullscreen.ts +0 -44
  1008. package/src/cubing/twisty/views/document.ts +0 -4
  1009. package/src/cubing/twisty/views/node-custom-element-shims.ts +0 -30
  1010. package/src/cubing/twisty/views/screenshot.ts +0 -90
  1011. package/src/cubing/twisty/views/stream/TwistyStreamSource.css.ts +0 -17
  1012. package/src/cubing/twisty/views/stream/TwistyStreamSource.ts +0 -155
  1013. package/src/cubing/vendor/.DS_Store +0 -0
  1014. package/src/cubing/vendor/comlink-everywhere/.DS_Store +0 -0
  1015. package/src/cubing/vendor/comlink-everywhere/comlink-everywhere.webloc +0 -8
  1016. package/src/cubing/vendor/comlink-everywhere/inside/index.d.ts +0 -1
  1017. package/src/cubing/vendor/comlink-everywhere/inside/index.js +0 -16
  1018. package/src/cubing/vendor/comlink-everywhere/inside/node.js +0 -6
  1019. package/src/cubing/vendor/comlink-everywhere/outside/index.d.ts +0 -6
  1020. package/src/cubing/vendor/comlink-everywhere/outside/index.js +0 -31
  1021. package/src/cubing/vendor/comlink-everywhere/outside/node.js +0 -42
  1022. package/src/cubing/vendor/cstimer/.DS_Store +0 -0
  1023. package/src/cubing/vendor/cstimer/LICENSE +0 -674
  1024. package/src/cubing/vendor/cstimer/src/.DS_Store +0 -0
  1025. package/src/cubing/vendor/cstimer/src/js/lib/mathlib.ts +0 -54
  1026. package/src/cubing/vendor/cstimer/src/js/scramble/scramble_444.ts +0 -2791
  1027. package/src/cubing/vendor/min2phase/gwt.d.ts +0 -2
  1028. package/src/cubing/vendor/min2phase/gwt.js +0 -2699
  1029. package/src/cubing/vendor/p-lazy/license +0 -9
  1030. package/src/cubing/vendor/p-lazy/p-lazy.ts +0 -52
  1031. package/src/cubing/vendor/p-lazy/readme.md +0 -54
  1032. package/src/cubing/vendor/random-uint-below/get-random-values.ts +0 -23
  1033. package/src/cubing/vendor/random-uint-below/index.ts +0 -12
  1034. package/src/cubing/vendor/random-uint-below/random-choice.ts +0 -9
  1035. package/src/cubing/vendor/random-uint-below/random53BitValue.ts +0 -64
  1036. package/src/cubing/vendor/sq12phase/scramble_sq1.js +0 -853
  1037. package/src/cubing/vendor/three/.DS_Store +0 -0
  1038. package/src/cubing/vendor/three/examples/.DS_Store +0 -0
  1039. package/src/cubing/vendor/three/examples/jsm/libs/stats.modified.module.ts +0 -179
  1040. package/src/cubing/vendor/unsafe-raw-aes/unsafe-raw-aes.ts +0 -64
@@ -1,2359 +0,0 @@
1
- import {
2
- Alg,
3
- Move
4
- } from "./chunk-EWRBHQFX.js";
5
-
6
- // src/cubing/protocol/binary/orbit-indexing.ts
7
- function identityPermutation(numElems) {
8
- const arr = new Array(numElems);
9
- for (let i = 0; i < numElems; i++) {
10
- arr[i] = i;
11
- }
12
- return arr;
13
- }
14
- function orientationsToMask(radix, orientations) {
15
- let val = 0;
16
- for (const orientation of orientations) {
17
- val *= radix;
18
- val += orientation;
19
- }
20
- return val;
21
- }
22
- function maskToOrientations(radix, numElems, mask) {
23
- const arr = [];
24
- while (mask > 0) {
25
- arr.push(mask % radix);
26
- mask = Math.floor(mask / radix);
27
- }
28
- return new Array(numElems - arr.length).fill(0).concat(arr.reverse());
29
- }
30
- function permutationToLex(permutation) {
31
- const n = permutation.length;
32
- let lexicographicIdx = 0;
33
- for (let i = 0; i < n - 1; i++) {
34
- lexicographicIdx = lexicographicIdx * (n - i);
35
- for (let j = i + 1; j < n; j++) {
36
- if (permutation[i] > permutation[j]) {
37
- lexicographicIdx += 1;
38
- }
39
- }
40
- }
41
- return lexicographicIdx;
42
- }
43
- function lexToPermutation(numPieces, lexicographicIdx) {
44
- const permutation = new Array(numPieces);
45
- permutation[numPieces - 1] = 0;
46
- for (let i = numPieces - 2; i >= 0; i--) {
47
- permutation[i] = lexicographicIdx % (numPieces - i);
48
- lexicographicIdx = Math.floor(lexicographicIdx / (numPieces - i));
49
- for (let j = i + 1; j < numPieces; j++) {
50
- if (permutation[j] >= permutation[i]) {
51
- permutation[j] = permutation[j] + 1;
52
- }
53
- }
54
- }
55
- return permutation;
56
- }
57
-
58
- // src/cubing/kpuzzle/transformations.ts
59
- var lasto;
60
- function isIdentity(omod, o) {
61
- if (o === lasto) {
62
- return true;
63
- }
64
- const perm = o.permutation;
65
- const n = perm.length;
66
- for (let idx = 0; idx < n; idx++) {
67
- if (perm[idx] !== idx) {
68
- return false;
69
- }
70
- }
71
- if (omod > 1) {
72
- const ori = o.orientation;
73
- for (let idx = 0; idx < n; idx++) {
74
- if (ori[idx] !== 0) {
75
- return false;
76
- }
77
- }
78
- }
79
- lasto = o;
80
- return true;
81
- }
82
- function combineTransformations(def, t1, t2) {
83
- const newTrans = {};
84
- for (const orbitName in def.orbits) {
85
- const oDef = def.orbits[orbitName];
86
- const o1 = t1[orbitName];
87
- const o2 = t2[orbitName];
88
- if (isIdentity(oDef.orientations, o2)) {
89
- newTrans[orbitName] = o1;
90
- } else if (isIdentity(oDef.orientations, o1)) {
91
- newTrans[orbitName] = o2;
92
- } else {
93
- const newPerm = new Array(oDef.numPieces);
94
- if (oDef.orientations === 1) {
95
- for (let idx = 0; idx < oDef.numPieces; idx++) {
96
- newPerm[idx] = o1.permutation[o2.permutation[idx]];
97
- }
98
- newTrans[orbitName] = {
99
- permutation: newPerm,
100
- orientation: o1.orientation
101
- };
102
- } else {
103
- const newOri = new Array(oDef.numPieces);
104
- for (let idx = 0; idx < oDef.numPieces; idx++) {
105
- newOri[idx] = (o1.orientation[o2.permutation[idx]] + o2.orientation[idx]) % oDef.orientations;
106
- newPerm[idx] = o1.permutation[o2.permutation[idx]];
107
- }
108
- newTrans[orbitName] = { permutation: newPerm, orientation: newOri };
109
- }
110
- }
111
- }
112
- return newTrans;
113
- }
114
- function multiplyTransformations(def, t, amount) {
115
- if (amount < 0) {
116
- return multiplyTransformations(def, invertTransformation(def, t), -amount);
117
- }
118
- if (amount === 0) {
119
- return identityTransformation(def);
120
- }
121
- if (amount === 1) {
122
- return t;
123
- }
124
- let halfish = t;
125
- if (amount !== 2) {
126
- halfish = multiplyTransformations(def, t, Math.floor(amount / 2));
127
- }
128
- const twiceHalfish = combineTransformations(def, halfish, halfish);
129
- if (amount % 2 === 0) {
130
- return twiceHalfish;
131
- } else {
132
- return combineTransformations(def, t, twiceHalfish);
133
- }
134
- }
135
- function identityTransformation(definition) {
136
- const transformation = {};
137
- for (const orbitName in definition.orbits) {
138
- const orbitDefinition = definition.orbits[orbitName];
139
- if (!lasto || lasto.permutation.length !== orbitDefinition.numPieces) {
140
- const newPermutation = new Array(orbitDefinition.numPieces);
141
- const newOrientation = new Array(orbitDefinition.numPieces);
142
- for (let i = 0; i < orbitDefinition.numPieces; i++) {
143
- newPermutation[i] = i;
144
- newOrientation[i] = 0;
145
- }
146
- const orbitTransformation = {
147
- permutation: newPermutation,
148
- orientation: newOrientation
149
- };
150
- lasto = orbitTransformation;
151
- }
152
- transformation[orbitName] = lasto;
153
- }
154
- return transformation;
155
- }
156
- function invertTransformation(def, t) {
157
- const newTrans = {};
158
- for (const orbitName in def.orbits) {
159
- const oDef = def.orbits[orbitName];
160
- const o = t[orbitName];
161
- if (isIdentity(oDef.orientations, o)) {
162
- newTrans[orbitName] = o;
163
- } else if (oDef.orientations === 1) {
164
- const newPerm = new Array(oDef.numPieces);
165
- for (let idx = 0; idx < oDef.numPieces; idx++) {
166
- newPerm[o.permutation[idx]] = idx;
167
- }
168
- newTrans[orbitName] = {
169
- permutation: newPerm,
170
- orientation: o.orientation
171
- };
172
- } else {
173
- const newPerm = new Array(oDef.numPieces);
174
- const newOri = new Array(oDef.numPieces);
175
- for (let idx = 0; idx < oDef.numPieces; idx++) {
176
- const fromIdx = o.permutation[idx];
177
- newPerm[fromIdx] = idx;
178
- newOri[fromIdx] = (oDef.orientations - o.orientation[idx] + oDef.orientations) % oDef.orientations;
179
- }
180
- newTrans[orbitName] = { permutation: newPerm, orientation: newOri };
181
- }
182
- }
183
- return newTrans;
184
- }
185
- function gcd(a, b) {
186
- if (b) {
187
- return gcd(b, a % b);
188
- }
189
- return a;
190
- }
191
- function transformationOrder(def, t) {
192
- let r = 1;
193
- for (const orbitName in def.orbits) {
194
- const oDef = def.orbits[orbitName];
195
- const o = t[orbitName];
196
- const d = new Array(oDef.numPieces);
197
- for (let idx = 0; idx < oDef.numPieces; idx++) {
198
- if (!d[idx]) {
199
- let w = idx;
200
- let om = 0;
201
- let pm = 0;
202
- for (; ; ) {
203
- d[w] = true;
204
- om = om + o.orientation[w];
205
- pm = pm + 1;
206
- w = o.permutation[w];
207
- if (w === idx) {
208
- break;
209
- }
210
- }
211
- if (om !== 0) {
212
- pm = pm * oDef.orientations / gcd(oDef.orientations, om);
213
- }
214
- r = r * pm / gcd(r, pm);
215
- }
216
- }
217
- }
218
- return r;
219
- }
220
- function areOrbitTransformationsEquivalent(def, orbitName, t1, t2, options = {}) {
221
- const oDef = def.orbits[orbitName];
222
- const o1 = t1[orbitName];
223
- const o2 = t2[orbitName];
224
- for (let idx = 0; idx < oDef.numPieces; idx++) {
225
- if (!options?.ignoreOrientation && o1.orientation[idx] !== o2.orientation[idx]) {
226
- return false;
227
- }
228
- if (!options?.ignorePermutation && o1.permutation[idx] !== o2.permutation[idx]) {
229
- return false;
230
- }
231
- }
232
- return true;
233
- }
234
- function areTransformationsEquivalent(def, t1, t2) {
235
- for (const orbitName in def.orbits) {
236
- if (!areOrbitTransformationsEquivalent(def, orbitName, t1, t2)) {
237
- return false;
238
- }
239
- }
240
- return true;
241
- }
242
- function areStatesEquivalent(def, t1, t2) {
243
- return areTransformationsEquivalent(def, combineTransformations(def, def.startPieces, t1), combineTransformations(def, def.startPieces, t2));
244
- }
245
-
246
- // src/cubing/kpuzzle/kpuzzle.ts
247
- function transformationForQuantumMove(def, quantumMove) {
248
- const transformation = getNotationLayer(def).lookupMove(new Move(quantumMove));
249
- if (!transformation) {
250
- throw new Error("Unknown move: " + quantumMove.toString());
251
- }
252
- return transformation;
253
- }
254
- function transformationForMove(def, move) {
255
- const transformation = getNotationLayer(def).lookupMove(move);
256
- if (!transformation) {
257
- throw new Error("Unknown move: " + move.toString());
258
- }
259
- return transformation;
260
- }
261
- function getNotationLayer(def) {
262
- if (!def.moveNotation) {
263
- def.moveNotation = new KPuzzleMoveNotation(def);
264
- }
265
- return def.moveNotation;
266
- }
267
- var KPuzzleMoveNotation = class {
268
- constructor(def) {
269
- this.def = def;
270
- this.cache = {};
271
- }
272
- lookupMove(move) {
273
- const key = move.toString();
274
- let r = this.cache[key];
275
- if (r) {
276
- return r;
277
- }
278
- const quantumKey = move.quantum.toString();
279
- r = this.def.moves[quantumKey];
280
- if (r) {
281
- r = multiplyTransformations(this.def, r, move.amount);
282
- this.cache[key] = r;
283
- } else {
284
- r = this.def.moves[move.toString()];
285
- if (r) {
286
- this.cache[key] = r;
287
- } else {
288
- r = this.def.moves[move.invert().toString()];
289
- if (r) {
290
- r = multiplyTransformations(this.def, r, -1);
291
- this.cache[key] = r;
292
- }
293
- }
294
- }
295
- return r;
296
- }
297
- };
298
- var KPuzzle = class {
299
- constructor(definition) {
300
- this.definition = definition;
301
- this.state = identityTransformation(definition);
302
- }
303
- reset() {
304
- this.state = identityTransformation(this.definition);
305
- }
306
- serialize() {
307
- let output = "";
308
- for (const orbitName in this.definition.orbits) {
309
- output += orbitName + "\n";
310
- output += this.state[orbitName].permutation.join(" ") + "\n";
311
- output += this.state[orbitName].orientation.join(" ") + "\n";
312
- }
313
- output = output.slice(0, output.length - 1);
314
- return output;
315
- }
316
- applyMove(move) {
317
- this.state = combineTransformations(this.definition, this.state, transformationForMove(this.definition, move));
318
- }
319
- applyAlg(alg) {
320
- for (const move of alg.experimentalLeafMoves()) {
321
- this.applyMove(move);
322
- }
323
- }
324
- };
325
-
326
- // src/cubing/kpuzzle/canonicalize.ts
327
- var InternalMove = class {
328
- constructor(base, twist) {
329
- this.base = base;
330
- this.twist = twist;
331
- }
332
- getTransformation(canon) {
333
- return canon.transforms[this.base][this.twist];
334
- }
335
- asString(canon) {
336
- const mod = canon.moveorder[this.base];
337
- let tw = this.twist % mod;
338
- while (tw + tw > mod) {
339
- tw -= mod;
340
- }
341
- while (tw + tw <= -mod) {
342
- tw += mod;
343
- }
344
- const nam = canon.movenames[this.base];
345
- if (tw === 1) {
346
- return nam;
347
- } else if (tw === -1) {
348
- return nam + "'";
349
- } else if (tw > 0) {
350
- return nam + tw;
351
- } else if (tw < 0) {
352
- return nam + -tw + "'";
353
- } else {
354
- throw new Error("Stringifying null move?");
355
- }
356
- }
357
- };
358
- var Canonicalizer = class {
359
- constructor(def) {
360
- this.def = def;
361
- this.commutes = [];
362
- this.moveorder = [];
363
- this.movenames = [];
364
- this.transforms = [];
365
- this.moveindex = {};
366
- const basemoves = def.moves;
367
- const id = identityTransformation(def);
368
- for (const mv1 in basemoves) {
369
- this.moveindex[mv1] = this.movenames.length;
370
- this.movenames.push(mv1);
371
- this.transforms.push([id, basemoves[mv1]]);
372
- }
373
- this.baseMoveCount = this.movenames.length;
374
- for (let i = 0; i < this.baseMoveCount; i++) {
375
- this.commutes.push([]);
376
- const t1 = this.transforms[i][1];
377
- for (let j = 0; j < this.baseMoveCount; j++) {
378
- const t2 = this.transforms[j][1];
379
- const ab = combineTransformations(def, t1, t2);
380
- const ba = combineTransformations(def, t2, t1);
381
- this.commutes[i][j] = areTransformationsEquivalent(def, ab, ba);
382
- }
383
- }
384
- for (let i = 0; i < this.baseMoveCount; i++) {
385
- const t1 = this.transforms[i][1];
386
- let ct = t1;
387
- let order = 1;
388
- for (let mult = 2; !areTransformationsEquivalent(def, id, ct); mult++) {
389
- order++;
390
- ct = combineTransformations(def, ct, t1);
391
- this.transforms[i].push(ct);
392
- }
393
- this.moveorder[i] = order;
394
- }
395
- }
396
- blockMoveToInternalMove(move) {
397
- const quantumMoveStr = move.quantum.toString();
398
- if (!(quantumMoveStr in this.def.moves)) {
399
- throw new Error("! move " + quantumMoveStr + " not in def.");
400
- }
401
- const ind = this.moveindex[quantumMoveStr];
402
- const mod = this.moveorder[ind];
403
- let tw = move.amount % mod;
404
- if (tw < 0) {
405
- tw = (tw + mod) % mod;
406
- }
407
- return new InternalMove(ind, tw);
408
- }
409
- sequenceToSearchSequence(alg, tr) {
410
- const ss = new SearchSequence(this, tr);
411
- for (const move of alg.experimentalLeafMoves()) {
412
- ss.appendOneMove(this.blockMoveToInternalMove(move));
413
- }
414
- return ss;
415
- }
416
- mergeSequenceToSearchSequence(alg, tr) {
417
- const ss = new SearchSequence(this, tr);
418
- for (const move of alg.experimentalLeafMoves()) {
419
- ss.mergeOneMove(this.blockMoveToInternalMove(move));
420
- }
421
- return ss;
422
- }
423
- };
424
- var SearchSequence = class {
425
- constructor(canon, tr) {
426
- this.canon = canon;
427
- this.moveseq = [];
428
- if (tr) {
429
- this.trans = tr;
430
- } else {
431
- this.trans = identityTransformation(canon.def);
432
- }
433
- }
434
- clone() {
435
- const r = new SearchSequence(this.canon, this.trans);
436
- r.moveseq = [...this.moveseq];
437
- return r;
438
- }
439
- mergeOneMove(mv) {
440
- const r = this.onlyMergeOneMove(mv);
441
- this.trans = combineTransformations(this.canon.def, this.trans, mv.getTransformation(this.canon));
442
- return r;
443
- }
444
- appendOneMove(mv) {
445
- this.moveseq.push(mv);
446
- this.trans = combineTransformations(this.canon.def, this.trans, mv.getTransformation(this.canon));
447
- return 1;
448
- }
449
- popMove() {
450
- const mv = this.moveseq.pop();
451
- if (!mv) {
452
- throw new Error("Can't pop an empty sequence");
453
- }
454
- this.trans = combineTransformations(this.canon.def, this.trans, this.canon.transforms[mv.base][this.canon.moveorder[mv.base] - mv.twist]);
455
- return 1;
456
- }
457
- oneMoreTwist() {
458
- const lastmv = this.moveseq[this.moveseq.length - 1];
459
- this.trans = combineTransformations(this.canon.def, this.trans, this.canon.transforms[lastmv.base][1]);
460
- this.moveseq[this.moveseq.length - 1] = new InternalMove(lastmv.base, lastmv.twist + 1);
461
- return 0;
462
- }
463
- onlyMergeOneMove(mv) {
464
- let j = this.moveseq.length - 1;
465
- while (j >= 0) {
466
- if (mv.base === this.moveseq[j].base) {
467
- const mo = this.canon.moveorder[mv.base];
468
- let twist = (mv.twist + this.moveseq[j].twist) % mo;
469
- if (twist < 0) {
470
- twist = (twist + mo) % mo;
471
- }
472
- if (twist === 0) {
473
- this.moveseq.splice(j, 1);
474
- return -1;
475
- } else {
476
- this.moveseq[j] = new InternalMove(mv.base, twist);
477
- return 0;
478
- }
479
- } else if (this.canon.commutes[mv.base][this.moveseq[j].base]) {
480
- j--;
481
- } else {
482
- break;
483
- }
484
- }
485
- this.moveseq.push(mv);
486
- return 1;
487
- }
488
- mergeSequence(seq) {
489
- let r = this.moveseq.length;
490
- for (let i = 0; i < seq.moveseq.length; i++) {
491
- const mv = seq.moveseq[i];
492
- const d = this.onlyMergeOneMove(mv);
493
- r += d;
494
- }
495
- this.trans = combineTransformations(this.canon.def, this.trans, seq.trans);
496
- return r;
497
- }
498
- getSequenceAsString() {
499
- const r = [];
500
- for (const mv of this.moveseq) {
501
- r.push(mv.asString(this.canon));
502
- }
503
- return r.join(" ");
504
- }
505
- };
506
- var CanonicalSequenceIterator = class {
507
- constructor(canon, state) {
508
- this.canon = canon;
509
- this.ss = new SearchSequence(canon, state);
510
- this.targetLength = 0;
511
- }
512
- nextState(base, canonstate) {
513
- const newstate = [];
514
- for (const prevbase of canonstate) {
515
- if (prevbase === base) {
516
- return null;
517
- } else if (!this.canon.commutes[prevbase][base]) {
518
- } else if (base < prevbase) {
519
- return null;
520
- } else {
521
- newstate.push(prevbase);
522
- }
523
- }
524
- return newstate;
525
- }
526
- *genSequence(togo, canonstate) {
527
- if (togo === 0) {
528
- yield this.ss;
529
- } else {
530
- for (let base = 0; base < this.canon.baseMoveCount; base++) {
531
- const newstate = this.nextState(base, canonstate);
532
- if (newstate) {
533
- newstate.push(base);
534
- for (let tw = 1; tw < this.canon.moveorder[base]; tw++) {
535
- this.ss.appendOneMove(new InternalMove(base, tw));
536
- yield* this.genSequence(togo - 1, newstate);
537
- this.ss.popMove();
538
- }
539
- }
540
- }
541
- }
542
- return null;
543
- }
544
- *generator() {
545
- for (let d = 0; ; d++) {
546
- yield* this.genSequence(d, []);
547
- }
548
- }
549
- *genSequenceTree(canonstate) {
550
- const r = yield this.ss;
551
- if (r > 0) {
552
- return null;
553
- }
554
- for (let base = 0; base < this.canon.baseMoveCount; base++) {
555
- const newstate = this.nextState(base, canonstate);
556
- if (newstate) {
557
- newstate.push(base);
558
- for (let tw = 1; tw < this.canon.moveorder[base]; tw++) {
559
- this.ss.appendOneMove(new InternalMove(base, tw));
560
- yield* this.genSequenceTree(newstate);
561
- this.ss.popMove();
562
- }
563
- }
564
- }
565
- return null;
566
- }
567
- };
568
-
569
- // src/cubing/kpuzzle/parser/parser-peggy.js
570
- function peg$subclass(child, parent) {
571
- function C() {
572
- this.constructor = child;
573
- }
574
- C.prototype = parent.prototype;
575
- child.prototype = new C();
576
- }
577
- function peg$SyntaxError(message, expected, found, location) {
578
- this.message = message;
579
- this.expected = expected;
580
- this.found = found;
581
- this.location = location;
582
- this.name = "SyntaxError";
583
- if (typeof Error.captureStackTrace === "function") {
584
- Error.captureStackTrace(this, peg$SyntaxError);
585
- }
586
- }
587
- peg$subclass(peg$SyntaxError, Error);
588
- peg$SyntaxError.buildMessage = function(expected, found) {
589
- var DESCRIBE_EXPECTATION_FNS = {
590
- literal: function(expectation) {
591
- return '"' + literalEscape(expectation.text) + '"';
592
- },
593
- class: function(expectation) {
594
- var escapedParts = expectation.parts.map(function(part) {
595
- return Array.isArray(part) ? classEscape(part[0]) + "-" + classEscape(part[1]) : classEscape(part);
596
- });
597
- return "[" + (expectation.inverted ? "^" : "") + escapedParts + "]";
598
- },
599
- any: function() {
600
- return "any character";
601
- },
602
- end: function() {
603
- return "end of input";
604
- },
605
- other: function(expectation) {
606
- return expectation.description;
607
- }
608
- };
609
- function hex(ch) {
610
- return ch.charCodeAt(0).toString(16).toUpperCase();
611
- }
612
- function literalEscape(s) {
613
- return s.replace(/\\/g, "\\\\").replace(/"/g, '\\"').replace(/\0/g, "\\0").replace(/\t/g, "\\t").replace(/\n/g, "\\n").replace(/\r/g, "\\r").replace(/[\x00-\x0F]/g, function(ch) {
614
- return "\\x0" + hex(ch);
615
- }).replace(/[\x10-\x1F\x7F-\x9F]/g, function(ch) {
616
- return "\\x" + hex(ch);
617
- });
618
- }
619
- function classEscape(s) {
620
- return s.replace(/\\/g, "\\\\").replace(/\]/g, "\\]").replace(/\^/g, "\\^").replace(/-/g, "\\-").replace(/\0/g, "\\0").replace(/\t/g, "\\t").replace(/\n/g, "\\n").replace(/\r/g, "\\r").replace(/[\x00-\x0F]/g, function(ch) {
621
- return "\\x0" + hex(ch);
622
- }).replace(/[\x10-\x1F\x7F-\x9F]/g, function(ch) {
623
- return "\\x" + hex(ch);
624
- });
625
- }
626
- function describeExpectation(expectation) {
627
- return DESCRIBE_EXPECTATION_FNS[expectation.type](expectation);
628
- }
629
- function describeExpected(expected2) {
630
- var descriptions = expected2.map(describeExpectation);
631
- var i, j;
632
- descriptions.sort();
633
- if (descriptions.length > 0) {
634
- for (i = 1, j = 1; i < descriptions.length; i++) {
635
- if (descriptions[i - 1] !== descriptions[i]) {
636
- descriptions[j] = descriptions[i];
637
- j++;
638
- }
639
- }
640
- descriptions.length = j;
641
- }
642
- switch (descriptions.length) {
643
- case 1:
644
- return descriptions[0];
645
- case 2:
646
- return descriptions[0] + " or " + descriptions[1];
647
- default:
648
- return descriptions.slice(0, -1).join(", ") + ", or " + descriptions[descriptions.length - 1];
649
- }
650
- }
651
- function describeFound(found2) {
652
- return found2 ? '"' + literalEscape(found2) + '"' : "end of input";
653
- }
654
- return "Expected " + describeExpected(expected) + " but " + describeFound(found) + " found.";
655
- };
656
- function peg$parse(input, options) {
657
- options = options !== void 0 ? options : {};
658
- var peg$FAILED = {};
659
- var peg$startRuleFunctions = { start: peg$parsestart };
660
- var peg$startRuleFunction = peg$parsestart;
661
- var peg$c0 = function(def) {
662
- return fixMoves(def);
663
- };
664
- var peg$c1 = /^[A-Za-z0-9<>]/;
665
- var peg$c2 = peg$classExpectation([["A", "Z"], ["a", "z"], ["0", "9"], "<", ">"], false, false);
666
- var peg$c3 = function(characters) {
667
- return characters.join("");
668
- };
669
- var peg$c4 = /^[A-Za-z]/;
670
- var peg$c5 = peg$classExpectation([
671
- ["A", "Z"],
672
- ["a", "z"]
673
- ], false, false);
674
- var peg$c6 = /^[A-Za-z0-9]/;
675
- var peg$c7 = peg$classExpectation([
676
- ["A", "Z"],
677
- ["a", "z"],
678
- ["0", "9"]
679
- ], false, false);
680
- var peg$c8 = function(first, rest) {
681
- return [first].concat(rest).join("");
682
- };
683
- var peg$c9 = /^[0-9]/;
684
- var peg$c10 = peg$classExpectation([["0", "9"]], false, false);
685
- var peg$c11 = function(characters) {
686
- return parseInt(characters.join(""), 10);
687
- };
688
- var peg$c12 = " ";
689
- var peg$c13 = peg$literalExpectation(" ", false);
690
- var peg$c14 = "Name";
691
- var peg$c15 = peg$literalExpectation("Name", false);
692
- var peg$c16 = function(identifier) {
693
- return identifier;
694
- };
695
- var peg$c17 = "Set";
696
- var peg$c18 = peg$literalExpectation("Set", false);
697
- var peg$c19 = function(set_identifier, num_pieces, num_orientations) {
698
- return [
699
- set_identifier,
700
- { numPieces: num_pieces, orientations: num_orientations }
701
- ];
702
- };
703
- var peg$c20 = function(orbit, orbits) {
704
- orbits[orbit[0]] = orbit[1];
705
- return orbits;
706
- };
707
- var peg$c21 = function(orbit) {
708
- const orbits = {};
709
- orbits[orbit[0]] = orbit[1];
710
- return orbits;
711
- };
712
- var peg$c22 = "\n";
713
- var peg$c23 = peg$literalExpectation("\n", false);
714
- var peg$c24 = function(num, nums) {
715
- return [num].concat(nums);
716
- };
717
- var peg$c25 = function(num) {
718
- return [num];
719
- };
720
- var peg$c26 = function(nums) {
721
- return fixPermutation(nums);
722
- };
723
- var peg$c27 = function(set_identifier, permutation, nums) {
724
- return [set_identifier, { permutation, orientation: nums }];
725
- };
726
- var peg$c28 = function(set_identifier, permutation) {
727
- return [
728
- set_identifier,
729
- {
730
- permutation,
731
- orientation: new Array(permutation.length).fill(0)
732
- }
733
- ];
734
- };
735
- var peg$c29 = function(definition, definitions) {
736
- definitions[definition[0]] = definition[1];
737
- return definitions;
738
- };
739
- var peg$c30 = function(definition) {
740
- const definitions = {};
741
- definitions[definition[0]] = definition[1];
742
- return definitions;
743
- };
744
- var peg$c31 = "Solved";
745
- var peg$c32 = peg$literalExpectation("Solved", false);
746
- var peg$c33 = "End";
747
- var peg$c34 = peg$literalExpectation("End", false);
748
- var peg$c35 = function(definitions) {
749
- return definitions;
750
- };
751
- var peg$c36 = "Move";
752
- var peg$c37 = peg$literalExpectation("Move", false);
753
- var peg$c38 = function(identifier, definitions) {
754
- return [identifier, definitions];
755
- };
756
- var peg$c39 = function(move, moves) {
757
- moves[move[0]] = move[1];
758
- return moves;
759
- };
760
- var peg$c40 = function(move) {
761
- const moves = {};
762
- moves[move[0]] = move[1];
763
- return moves;
764
- };
765
- var peg$c41 = function(name, orbits, start_pieces, moves) {
766
- return {
767
- name,
768
- orbits,
769
- moves,
770
- startPieces: start_pieces
771
- };
772
- };
773
- var peg$currPos = 0;
774
- var peg$savedPos = 0;
775
- var peg$posDetailsCache = [{ line: 1, column: 1 }];
776
- var peg$maxFailPos = 0;
777
- var peg$maxFailExpected = [];
778
- var peg$silentFails = 0;
779
- var peg$result;
780
- if ("startRule" in options) {
781
- if (!(options.startRule in peg$startRuleFunctions)) {
782
- throw new Error(`Can't start parsing from rule "` + options.startRule + '".');
783
- }
784
- peg$startRuleFunction = peg$startRuleFunctions[options.startRule];
785
- }
786
- function text() {
787
- return input.substring(peg$savedPos, peg$currPos);
788
- }
789
- function location() {
790
- return peg$computeLocation(peg$savedPos, peg$currPos);
791
- }
792
- function expected(description, location2) {
793
- location2 = location2 !== void 0 ? location2 : peg$computeLocation(peg$savedPos, peg$currPos);
794
- throw peg$buildStructuredError([peg$otherExpectation(description)], input.substring(peg$savedPos, peg$currPos), location2);
795
- }
796
- function error(message, location2) {
797
- location2 = location2 !== void 0 ? location2 : peg$computeLocation(peg$savedPos, peg$currPos);
798
- throw peg$buildSimpleError(message, location2);
799
- }
800
- function peg$literalExpectation(text2, ignoreCase) {
801
- return { type: "literal", text: text2, ignoreCase };
802
- }
803
- function peg$classExpectation(parts, inverted, ignoreCase) {
804
- return {
805
- type: "class",
806
- parts,
807
- inverted,
808
- ignoreCase
809
- };
810
- }
811
- function peg$anyExpectation() {
812
- return { type: "any" };
813
- }
814
- function peg$endExpectation() {
815
- return { type: "end" };
816
- }
817
- function peg$otherExpectation(description) {
818
- return { type: "other", description };
819
- }
820
- function peg$computePosDetails(pos) {
821
- var details = peg$posDetailsCache[pos];
822
- var p;
823
- if (details) {
824
- return details;
825
- } else {
826
- p = pos - 1;
827
- while (!peg$posDetailsCache[p]) {
828
- p--;
829
- }
830
- details = peg$posDetailsCache[p];
831
- details = {
832
- line: details.line,
833
- column: details.column
834
- };
835
- while (p < pos) {
836
- if (input.charCodeAt(p) === 10) {
837
- details.line++;
838
- details.column = 1;
839
- } else {
840
- details.column++;
841
- }
842
- p++;
843
- }
844
- peg$posDetailsCache[pos] = details;
845
- return details;
846
- }
847
- }
848
- function peg$computeLocation(startPos, endPos) {
849
- var startPosDetails = peg$computePosDetails(startPos);
850
- var endPosDetails = peg$computePosDetails(endPos);
851
- return {
852
- start: {
853
- offset: startPos,
854
- line: startPosDetails.line,
855
- column: startPosDetails.column
856
- },
857
- end: {
858
- offset: endPos,
859
- line: endPosDetails.line,
860
- column: endPosDetails.column
861
- }
862
- };
863
- }
864
- function peg$fail(expected2) {
865
- if (peg$currPos < peg$maxFailPos) {
866
- return;
867
- }
868
- if (peg$currPos > peg$maxFailPos) {
869
- peg$maxFailPos = peg$currPos;
870
- peg$maxFailExpected = [];
871
- }
872
- peg$maxFailExpected.push(expected2);
873
- }
874
- function peg$buildSimpleError(message, location2) {
875
- return new peg$SyntaxError(message, null, null, location2);
876
- }
877
- function peg$buildStructuredError(expected2, found, location2) {
878
- return new peg$SyntaxError(peg$SyntaxError.buildMessage(expected2, found), expected2, found, location2);
879
- }
880
- function peg$parsestart() {
881
- var s0, s1;
882
- s0 = peg$currPos;
883
- s1 = peg$parseDEFINITION_FILE();
884
- if (s1 !== peg$FAILED) {
885
- peg$savedPos = s0;
886
- s1 = peg$c0(s1);
887
- }
888
- s0 = s1;
889
- return s0;
890
- }
891
- function peg$parseIDENTIFIER() {
892
- var s0, s1, s2;
893
- s0 = peg$currPos;
894
- s1 = [];
895
- if (peg$c1.test(input.charAt(peg$currPos))) {
896
- s2 = input.charAt(peg$currPos);
897
- peg$currPos++;
898
- } else {
899
- s2 = peg$FAILED;
900
- if (peg$silentFails === 0) {
901
- peg$fail(peg$c2);
902
- }
903
- }
904
- if (s2 !== peg$FAILED) {
905
- while (s2 !== peg$FAILED) {
906
- s1.push(s2);
907
- if (peg$c1.test(input.charAt(peg$currPos))) {
908
- s2 = input.charAt(peg$currPos);
909
- peg$currPos++;
910
- } else {
911
- s2 = peg$FAILED;
912
- if (peg$silentFails === 0) {
913
- peg$fail(peg$c2);
914
- }
915
- }
916
- }
917
- } else {
918
- s1 = peg$FAILED;
919
- }
920
- if (s1 !== peg$FAILED) {
921
- peg$savedPos = s0;
922
- s1 = peg$c3(s1);
923
- }
924
- s0 = s1;
925
- return s0;
926
- }
927
- function peg$parseSET_IDENTIFIER() {
928
- var s0, s1, s2, s3;
929
- s0 = peg$currPos;
930
- if (peg$c4.test(input.charAt(peg$currPos))) {
931
- s1 = input.charAt(peg$currPos);
932
- peg$currPos++;
933
- } else {
934
- s1 = peg$FAILED;
935
- if (peg$silentFails === 0) {
936
- peg$fail(peg$c5);
937
- }
938
- }
939
- if (s1 !== peg$FAILED) {
940
- s2 = [];
941
- if (peg$c6.test(input.charAt(peg$currPos))) {
942
- s3 = input.charAt(peg$currPos);
943
- peg$currPos++;
944
- } else {
945
- s3 = peg$FAILED;
946
- if (peg$silentFails === 0) {
947
- peg$fail(peg$c7);
948
- }
949
- }
950
- while (s3 !== peg$FAILED) {
951
- s2.push(s3);
952
- if (peg$c6.test(input.charAt(peg$currPos))) {
953
- s3 = input.charAt(peg$currPos);
954
- peg$currPos++;
955
- } else {
956
- s3 = peg$FAILED;
957
- if (peg$silentFails === 0) {
958
- peg$fail(peg$c7);
959
- }
960
- }
961
- }
962
- if (s2 !== peg$FAILED) {
963
- peg$savedPos = s0;
964
- s1 = peg$c8(s1, s2);
965
- s0 = s1;
966
- } else {
967
- peg$currPos = s0;
968
- s0 = peg$FAILED;
969
- }
970
- } else {
971
- peg$currPos = s0;
972
- s0 = peg$FAILED;
973
- }
974
- return s0;
975
- }
976
- function peg$parseNUMBER() {
977
- var s0, s1, s2;
978
- s0 = peg$currPos;
979
- s1 = [];
980
- if (peg$c9.test(input.charAt(peg$currPos))) {
981
- s2 = input.charAt(peg$currPos);
982
- peg$currPos++;
983
- } else {
984
- s2 = peg$FAILED;
985
- if (peg$silentFails === 0) {
986
- peg$fail(peg$c10);
987
- }
988
- }
989
- if (s2 !== peg$FAILED) {
990
- while (s2 !== peg$FAILED) {
991
- s1.push(s2);
992
- if (peg$c9.test(input.charAt(peg$currPos))) {
993
- s2 = input.charAt(peg$currPos);
994
- peg$currPos++;
995
- } else {
996
- s2 = peg$FAILED;
997
- if (peg$silentFails === 0) {
998
- peg$fail(peg$c10);
999
- }
1000
- }
1001
- }
1002
- } else {
1003
- s1 = peg$FAILED;
1004
- }
1005
- if (s1 !== peg$FAILED) {
1006
- peg$savedPos = s0;
1007
- s1 = peg$c11(s1);
1008
- }
1009
- s0 = s1;
1010
- return s0;
1011
- }
1012
- function peg$parseSPACE() {
1013
- var s0;
1014
- if (input.charCodeAt(peg$currPos) === 32) {
1015
- s0 = peg$c12;
1016
- peg$currPos++;
1017
- } else {
1018
- s0 = peg$FAILED;
1019
- if (peg$silentFails === 0) {
1020
- peg$fail(peg$c13);
1021
- }
1022
- }
1023
- return s0;
1024
- }
1025
- function peg$parseNAME() {
1026
- var s0, s1, s2, s3;
1027
- s0 = peg$currPos;
1028
- if (input.substr(peg$currPos, 4) === peg$c14) {
1029
- s1 = peg$c14;
1030
- peg$currPos += 4;
1031
- } else {
1032
- s1 = peg$FAILED;
1033
- if (peg$silentFails === 0) {
1034
- peg$fail(peg$c15);
1035
- }
1036
- }
1037
- if (s1 !== peg$FAILED) {
1038
- s2 = peg$parseSPACE();
1039
- if (s2 !== peg$FAILED) {
1040
- s3 = peg$parseIDENTIFIER();
1041
- if (s3 !== peg$FAILED) {
1042
- peg$savedPos = s0;
1043
- s1 = peg$c16(s3);
1044
- s0 = s1;
1045
- } else {
1046
- peg$currPos = s0;
1047
- s0 = peg$FAILED;
1048
- }
1049
- } else {
1050
- peg$currPos = s0;
1051
- s0 = peg$FAILED;
1052
- }
1053
- } else {
1054
- peg$currPos = s0;
1055
- s0 = peg$FAILED;
1056
- }
1057
- return s0;
1058
- }
1059
- function peg$parseORBIT() {
1060
- var s0, s1, s2, s3, s4, s5, s6, s7;
1061
- s0 = peg$currPos;
1062
- if (input.substr(peg$currPos, 3) === peg$c17) {
1063
- s1 = peg$c17;
1064
- peg$currPos += 3;
1065
- } else {
1066
- s1 = peg$FAILED;
1067
- if (peg$silentFails === 0) {
1068
- peg$fail(peg$c18);
1069
- }
1070
- }
1071
- if (s1 !== peg$FAILED) {
1072
- s2 = peg$parseSPACE();
1073
- if (s2 !== peg$FAILED) {
1074
- s3 = peg$parseSET_IDENTIFIER();
1075
- if (s3 !== peg$FAILED) {
1076
- s4 = peg$parseSPACE();
1077
- if (s4 !== peg$FAILED) {
1078
- s5 = peg$parseNUMBER();
1079
- if (s5 !== peg$FAILED) {
1080
- s6 = peg$parseSPACE();
1081
- if (s6 !== peg$FAILED) {
1082
- s7 = peg$parseNUMBER();
1083
- if (s7 !== peg$FAILED) {
1084
- peg$savedPos = s0;
1085
- s1 = peg$c19(s3, s5, s7);
1086
- s0 = s1;
1087
- } else {
1088
- peg$currPos = s0;
1089
- s0 = peg$FAILED;
1090
- }
1091
- } else {
1092
- peg$currPos = s0;
1093
- s0 = peg$FAILED;
1094
- }
1095
- } else {
1096
- peg$currPos = s0;
1097
- s0 = peg$FAILED;
1098
- }
1099
- } else {
1100
- peg$currPos = s0;
1101
- s0 = peg$FAILED;
1102
- }
1103
- } else {
1104
- peg$currPos = s0;
1105
- s0 = peg$FAILED;
1106
- }
1107
- } else {
1108
- peg$currPos = s0;
1109
- s0 = peg$FAILED;
1110
- }
1111
- } else {
1112
- peg$currPos = s0;
1113
- s0 = peg$FAILED;
1114
- }
1115
- return s0;
1116
- }
1117
- function peg$parseORBITS() {
1118
- var s0, s1, s2, s3;
1119
- s0 = peg$currPos;
1120
- s1 = peg$parseORBIT();
1121
- if (s1 !== peg$FAILED) {
1122
- s2 = peg$parseNEWLINE();
1123
- if (s2 !== peg$FAILED) {
1124
- s3 = peg$parseORBITS();
1125
- if (s3 !== peg$FAILED) {
1126
- peg$savedPos = s0;
1127
- s1 = peg$c20(s1, s3);
1128
- s0 = s1;
1129
- } else {
1130
- peg$currPos = s0;
1131
- s0 = peg$FAILED;
1132
- }
1133
- } else {
1134
- peg$currPos = s0;
1135
- s0 = peg$FAILED;
1136
- }
1137
- } else {
1138
- peg$currPos = s0;
1139
- s0 = peg$FAILED;
1140
- }
1141
- if (s0 === peg$FAILED) {
1142
- s0 = peg$currPos;
1143
- s1 = peg$parseORBIT();
1144
- if (s1 !== peg$FAILED) {
1145
- peg$savedPos = s0;
1146
- s1 = peg$c21(s1);
1147
- }
1148
- s0 = s1;
1149
- }
1150
- return s0;
1151
- }
1152
- function peg$parseNEWLINE() {
1153
- var s0;
1154
- if (input.charCodeAt(peg$currPos) === 10) {
1155
- s0 = peg$c22;
1156
- peg$currPos++;
1157
- } else {
1158
- s0 = peg$FAILED;
1159
- if (peg$silentFails === 0) {
1160
- peg$fail(peg$c23);
1161
- }
1162
- }
1163
- return s0;
1164
- }
1165
- function peg$parseNEWLINES() {
1166
- var s0, s1;
1167
- s0 = [];
1168
- if (input.charCodeAt(peg$currPos) === 10) {
1169
- s1 = peg$c22;
1170
- peg$currPos++;
1171
- } else {
1172
- s1 = peg$FAILED;
1173
- if (peg$silentFails === 0) {
1174
- peg$fail(peg$c23);
1175
- }
1176
- }
1177
- if (s1 !== peg$FAILED) {
1178
- while (s1 !== peg$FAILED) {
1179
- s0.push(s1);
1180
- if (input.charCodeAt(peg$currPos) === 10) {
1181
- s1 = peg$c22;
1182
- peg$currPos++;
1183
- } else {
1184
- s1 = peg$FAILED;
1185
- if (peg$silentFails === 0) {
1186
- peg$fail(peg$c23);
1187
- }
1188
- }
1189
- }
1190
- } else {
1191
- s0 = peg$FAILED;
1192
- }
1193
- return s0;
1194
- }
1195
- function peg$parseOPTIONAL_NEWLINES() {
1196
- var s0, s1;
1197
- s0 = [];
1198
- if (input.charCodeAt(peg$currPos) === 10) {
1199
- s1 = peg$c22;
1200
- peg$currPos++;
1201
- } else {
1202
- s1 = peg$FAILED;
1203
- if (peg$silentFails === 0) {
1204
- peg$fail(peg$c23);
1205
- }
1206
- }
1207
- while (s1 !== peg$FAILED) {
1208
- s0.push(s1);
1209
- if (input.charCodeAt(peg$currPos) === 10) {
1210
- s1 = peg$c22;
1211
- peg$currPos++;
1212
- } else {
1213
- s1 = peg$FAILED;
1214
- if (peg$silentFails === 0) {
1215
- peg$fail(peg$c23);
1216
- }
1217
- }
1218
- }
1219
- return s0;
1220
- }
1221
- function peg$parseNUMBERS() {
1222
- var s0, s1, s2, s3;
1223
- s0 = peg$currPos;
1224
- s1 = peg$parseNUMBER();
1225
- if (s1 !== peg$FAILED) {
1226
- s2 = peg$parseSPACE();
1227
- if (s2 !== peg$FAILED) {
1228
- s3 = peg$parseNUMBERS();
1229
- if (s3 !== peg$FAILED) {
1230
- peg$savedPos = s0;
1231
- s1 = peg$c24(s1, s3);
1232
- s0 = s1;
1233
- } else {
1234
- peg$currPos = s0;
1235
- s0 = peg$FAILED;
1236
- }
1237
- } else {
1238
- peg$currPos = s0;
1239
- s0 = peg$FAILED;
1240
- }
1241
- } else {
1242
- peg$currPos = s0;
1243
- s0 = peg$FAILED;
1244
- }
1245
- if (s0 === peg$FAILED) {
1246
- s0 = peg$currPos;
1247
- s1 = peg$parseNUMBER();
1248
- if (s1 !== peg$FAILED) {
1249
- peg$savedPos = s0;
1250
- s1 = peg$c25(s1);
1251
- }
1252
- s0 = s1;
1253
- }
1254
- return s0;
1255
- }
1256
- function peg$parsePERMUTATION() {
1257
- var s0, s1;
1258
- s0 = peg$currPos;
1259
- s1 = peg$parseNUMBERS();
1260
- if (s1 !== peg$FAILED) {
1261
- peg$savedPos = s0;
1262
- s1 = peg$c26(s1);
1263
- }
1264
- s0 = s1;
1265
- return s0;
1266
- }
1267
- function peg$parseDEFINITION() {
1268
- var s0, s1, s2, s3, s4, s5;
1269
- s0 = peg$currPos;
1270
- s1 = peg$parseSET_IDENTIFIER();
1271
- if (s1 !== peg$FAILED) {
1272
- s2 = peg$parseNEWLINE();
1273
- if (s2 !== peg$FAILED) {
1274
- s3 = peg$parsePERMUTATION();
1275
- if (s3 !== peg$FAILED) {
1276
- s4 = peg$parseNEWLINE();
1277
- if (s4 !== peg$FAILED) {
1278
- s5 = peg$parseNUMBERS();
1279
- if (s5 !== peg$FAILED) {
1280
- peg$savedPos = s0;
1281
- s1 = peg$c27(s1, s3, s5);
1282
- s0 = s1;
1283
- } else {
1284
- peg$currPos = s0;
1285
- s0 = peg$FAILED;
1286
- }
1287
- } else {
1288
- peg$currPos = s0;
1289
- s0 = peg$FAILED;
1290
- }
1291
- } else {
1292
- peg$currPos = s0;
1293
- s0 = peg$FAILED;
1294
- }
1295
- } else {
1296
- peg$currPos = s0;
1297
- s0 = peg$FAILED;
1298
- }
1299
- } else {
1300
- peg$currPos = s0;
1301
- s0 = peg$FAILED;
1302
- }
1303
- if (s0 === peg$FAILED) {
1304
- s0 = peg$currPos;
1305
- s1 = peg$parseSET_IDENTIFIER();
1306
- if (s1 !== peg$FAILED) {
1307
- s2 = peg$parseNEWLINE();
1308
- if (s2 !== peg$FAILED) {
1309
- s3 = peg$parsePERMUTATION();
1310
- if (s3 !== peg$FAILED) {
1311
- peg$savedPos = s0;
1312
- s1 = peg$c28(s1, s3);
1313
- s0 = s1;
1314
- } else {
1315
- peg$currPos = s0;
1316
- s0 = peg$FAILED;
1317
- }
1318
- } else {
1319
- peg$currPos = s0;
1320
- s0 = peg$FAILED;
1321
- }
1322
- } else {
1323
- peg$currPos = s0;
1324
- s0 = peg$FAILED;
1325
- }
1326
- }
1327
- return s0;
1328
- }
1329
- function peg$parseDEFINITIONS() {
1330
- var s0, s1, s2, s3;
1331
- s0 = peg$currPos;
1332
- s1 = peg$parseDEFINITION();
1333
- if (s1 !== peg$FAILED) {
1334
- s2 = peg$parseNEWLINE();
1335
- if (s2 !== peg$FAILED) {
1336
- s3 = peg$parseDEFINITIONS();
1337
- if (s3 !== peg$FAILED) {
1338
- peg$savedPos = s0;
1339
- s1 = peg$c29(s1, s3);
1340
- s0 = s1;
1341
- } else {
1342
- peg$currPos = s0;
1343
- s0 = peg$FAILED;
1344
- }
1345
- } else {
1346
- peg$currPos = s0;
1347
- s0 = peg$FAILED;
1348
- }
1349
- } else {
1350
- peg$currPos = s0;
1351
- s0 = peg$FAILED;
1352
- }
1353
- if (s0 === peg$FAILED) {
1354
- s0 = peg$currPos;
1355
- s1 = peg$parseDEFINITION();
1356
- if (s1 !== peg$FAILED) {
1357
- peg$savedPos = s0;
1358
- s1 = peg$c30(s1);
1359
- }
1360
- s0 = s1;
1361
- }
1362
- return s0;
1363
- }
1364
- function peg$parseSTART_PIECES() {
1365
- var s0, s1, s2, s3, s4, s5;
1366
- s0 = peg$currPos;
1367
- if (input.substr(peg$currPos, 6) === peg$c31) {
1368
- s1 = peg$c31;
1369
- peg$currPos += 6;
1370
- } else {
1371
- s1 = peg$FAILED;
1372
- if (peg$silentFails === 0) {
1373
- peg$fail(peg$c32);
1374
- }
1375
- }
1376
- if (s1 !== peg$FAILED) {
1377
- s2 = peg$parseNEWLINE();
1378
- if (s2 !== peg$FAILED) {
1379
- s3 = peg$parseDEFINITIONS();
1380
- if (s3 !== peg$FAILED) {
1381
- s4 = peg$parseNEWLINE();
1382
- if (s4 !== peg$FAILED) {
1383
- if (input.substr(peg$currPos, 3) === peg$c33) {
1384
- s5 = peg$c33;
1385
- peg$currPos += 3;
1386
- } else {
1387
- s5 = peg$FAILED;
1388
- if (peg$silentFails === 0) {
1389
- peg$fail(peg$c34);
1390
- }
1391
- }
1392
- if (s5 !== peg$FAILED) {
1393
- peg$savedPos = s0;
1394
- s1 = peg$c35(s3);
1395
- s0 = s1;
1396
- } else {
1397
- peg$currPos = s0;
1398
- s0 = peg$FAILED;
1399
- }
1400
- } else {
1401
- peg$currPos = s0;
1402
- s0 = peg$FAILED;
1403
- }
1404
- } else {
1405
- peg$currPos = s0;
1406
- s0 = peg$FAILED;
1407
- }
1408
- } else {
1409
- peg$currPos = s0;
1410
- s0 = peg$FAILED;
1411
- }
1412
- } else {
1413
- peg$currPos = s0;
1414
- s0 = peg$FAILED;
1415
- }
1416
- return s0;
1417
- }
1418
- function peg$parseMOVE() {
1419
- var s0, s1, s2, s3, s4, s5, s6, s7;
1420
- s0 = peg$currPos;
1421
- if (input.substr(peg$currPos, 4) === peg$c36) {
1422
- s1 = peg$c36;
1423
- peg$currPos += 4;
1424
- } else {
1425
- s1 = peg$FAILED;
1426
- if (peg$silentFails === 0) {
1427
- peg$fail(peg$c37);
1428
- }
1429
- }
1430
- if (s1 !== peg$FAILED) {
1431
- s2 = peg$parseSPACE();
1432
- if (s2 !== peg$FAILED) {
1433
- s3 = peg$parseIDENTIFIER();
1434
- if (s3 !== peg$FAILED) {
1435
- s4 = peg$parseNEWLINE();
1436
- if (s4 !== peg$FAILED) {
1437
- s5 = peg$parseDEFINITIONS();
1438
- if (s5 !== peg$FAILED) {
1439
- s6 = peg$parseNEWLINE();
1440
- if (s6 !== peg$FAILED) {
1441
- if (input.substr(peg$currPos, 3) === peg$c33) {
1442
- s7 = peg$c33;
1443
- peg$currPos += 3;
1444
- } else {
1445
- s7 = peg$FAILED;
1446
- if (peg$silentFails === 0) {
1447
- peg$fail(peg$c34);
1448
- }
1449
- }
1450
- if (s7 !== peg$FAILED) {
1451
- peg$savedPos = s0;
1452
- s1 = peg$c38(s3, s5);
1453
- s0 = s1;
1454
- } else {
1455
- peg$currPos = s0;
1456
- s0 = peg$FAILED;
1457
- }
1458
- } else {
1459
- peg$currPos = s0;
1460
- s0 = peg$FAILED;
1461
- }
1462
- } else {
1463
- peg$currPos = s0;
1464
- s0 = peg$FAILED;
1465
- }
1466
- } else {
1467
- peg$currPos = s0;
1468
- s0 = peg$FAILED;
1469
- }
1470
- } else {
1471
- peg$currPos = s0;
1472
- s0 = peg$FAILED;
1473
- }
1474
- } else {
1475
- peg$currPos = s0;
1476
- s0 = peg$FAILED;
1477
- }
1478
- } else {
1479
- peg$currPos = s0;
1480
- s0 = peg$FAILED;
1481
- }
1482
- return s0;
1483
- }
1484
- function peg$parseMOVES() {
1485
- var s0, s1, s2, s3;
1486
- s0 = peg$currPos;
1487
- s1 = peg$parseMOVE();
1488
- if (s1 !== peg$FAILED) {
1489
- s2 = peg$parseNEWLINES();
1490
- if (s2 !== peg$FAILED) {
1491
- s3 = peg$parseMOVES();
1492
- if (s3 !== peg$FAILED) {
1493
- peg$savedPos = s0;
1494
- s1 = peg$c39(s1, s3);
1495
- s0 = s1;
1496
- } else {
1497
- peg$currPos = s0;
1498
- s0 = peg$FAILED;
1499
- }
1500
- } else {
1501
- peg$currPos = s0;
1502
- s0 = peg$FAILED;
1503
- }
1504
- } else {
1505
- peg$currPos = s0;
1506
- s0 = peg$FAILED;
1507
- }
1508
- if (s0 === peg$FAILED) {
1509
- s0 = peg$currPos;
1510
- s1 = peg$parseMOVE();
1511
- if (s1 !== peg$FAILED) {
1512
- peg$savedPos = s0;
1513
- s1 = peg$c40(s1);
1514
- }
1515
- s0 = s1;
1516
- }
1517
- return s0;
1518
- }
1519
- function peg$parseDEFINITION_FILE() {
1520
- var s0, s1, s2, s3, s4, s5, s6, s7, s8;
1521
- s0 = peg$currPos;
1522
- s1 = peg$parseNAME();
1523
- if (s1 !== peg$FAILED) {
1524
- s2 = peg$parseNEWLINES();
1525
- if (s2 !== peg$FAILED) {
1526
- s3 = peg$parseORBITS();
1527
- if (s3 !== peg$FAILED) {
1528
- s4 = peg$parseNEWLINES();
1529
- if (s4 !== peg$FAILED) {
1530
- s5 = peg$parseSTART_PIECES();
1531
- if (s5 !== peg$FAILED) {
1532
- s6 = peg$parseNEWLINES();
1533
- if (s6 !== peg$FAILED) {
1534
- s7 = peg$parseMOVES();
1535
- if (s7 !== peg$FAILED) {
1536
- s8 = peg$parseOPTIONAL_NEWLINES();
1537
- if (s8 !== peg$FAILED) {
1538
- peg$savedPos = s0;
1539
- s1 = peg$c41(s1, s3, s5, s7);
1540
- s0 = s1;
1541
- } else {
1542
- peg$currPos = s0;
1543
- s0 = peg$FAILED;
1544
- }
1545
- } else {
1546
- peg$currPos = s0;
1547
- s0 = peg$FAILED;
1548
- }
1549
- } else {
1550
- peg$currPos = s0;
1551
- s0 = peg$FAILED;
1552
- }
1553
- } else {
1554
- peg$currPos = s0;
1555
- s0 = peg$FAILED;
1556
- }
1557
- } else {
1558
- peg$currPos = s0;
1559
- s0 = peg$FAILED;
1560
- }
1561
- } else {
1562
- peg$currPos = s0;
1563
- s0 = peg$FAILED;
1564
- }
1565
- } else {
1566
- peg$currPos = s0;
1567
- s0 = peg$FAILED;
1568
- }
1569
- } else {
1570
- peg$currPos = s0;
1571
- s0 = peg$FAILED;
1572
- }
1573
- return s0;
1574
- }
1575
- function fixPermutation(permutation) {
1576
- return permutation.map((x) => x - 1);
1577
- }
1578
- function fixMoves(def) {
1579
- for (const moveName in def.moves) {
1580
- const move = def.moves[moveName];
1581
- for (const orbitName in def.orbits) {
1582
- const moveOrbit = move[orbitName];
1583
- const oldOrientation = moveOrbit.orientation;
1584
- const perm = moveOrbit.permutation;
1585
- const newOrientation = new Array(oldOrientation.length);
1586
- for (let i = 0; i < perm.length; i++) {
1587
- newOrientation[i] = oldOrientation[perm[i]];
1588
- }
1589
- moveOrbit.orientation = newOrientation;
1590
- }
1591
- }
1592
- return def;
1593
- }
1594
- peg$result = peg$startRuleFunction();
1595
- if (peg$result !== peg$FAILED && peg$currPos === input.length) {
1596
- return peg$result;
1597
- } else {
1598
- if (peg$result !== peg$FAILED && peg$currPos < input.length) {
1599
- peg$fail(peg$endExpectation());
1600
- }
1601
- throw peg$buildStructuredError(peg$maxFailExpected, peg$maxFailPos < input.length ? input.charAt(peg$maxFailPos) : null, peg$maxFailPos < input.length ? peg$computeLocation(peg$maxFailPos, peg$maxFailPos + 1) : peg$computeLocation(peg$maxFailPos, peg$maxFailPos));
1602
- }
1603
- }
1604
-
1605
- // src/cubing/kpuzzle/parser/parser-shim.ts
1606
- var pegParseKPuzzleDefinition = peg$parse;
1607
-
1608
- // src/cubing/kpuzzle/svg.ts
1609
- var xmlns = "http://www.w3.org/2000/svg";
1610
- var svgCounter = 0;
1611
- function nextSVGID() {
1612
- svgCounter += 1;
1613
- return "svg" + svgCounter.toString();
1614
- }
1615
- var colorMaps = {
1616
- dim: {
1617
- "white": "#dddddd",
1618
- "orange": "#884400",
1619
- "limegreen": "#008800",
1620
- "red": "#660000",
1621
- "rgb(34, 102, 255)": "#000088",
1622
- "yellow": "#888800"
1623
- },
1624
- oriented: {
1625
- "white": "#ff88ff",
1626
- "orange": "#ff88ff",
1627
- "limegreen": "#ff88ff",
1628
- "red": "#ff88ff",
1629
- "rgb(34, 102, 255)": "#ff88ff",
1630
- "yellow": "#ff88ff"
1631
- },
1632
- ignored: {
1633
- "white": "#444444",
1634
- "orange": "#444444",
1635
- "limegreen": "#444444",
1636
- "red": "#444444",
1637
- "rgb(34, 102, 255)": "#444444",
1638
- "yellow": "#444444"
1639
- },
1640
- invisible: {
1641
- "white": "#00000000",
1642
- "orange": "#00000000",
1643
- "limegreen": "#00000000",
1644
- "red": "#00000000",
1645
- "rgb(34, 102, 255)": "#00000000",
1646
- "yellow": "#00000000"
1647
- }
1648
- };
1649
- var KPuzzleSVGWrapper = class {
1650
- constructor(kPuzzleDefinition, svgSource, experimentalAppearance) {
1651
- this.kPuzzleDefinition = kPuzzleDefinition;
1652
- this.originalColors = {};
1653
- this.gradients = {};
1654
- if (!svgSource) {
1655
- throw new Error(`No SVG definition for puzzle type: ${kPuzzleDefinition.name}`);
1656
- }
1657
- this.svgID = nextSVGID();
1658
- this.element = document.createElement("div");
1659
- this.element.classList.add("svg-wrapper");
1660
- this.element.innerHTML = svgSource;
1661
- const svgElem = this.element.querySelector("svg");
1662
- if (!svgElem) {
1663
- throw new Error("Could not get SVG element");
1664
- }
1665
- if (xmlns !== svgElem.namespaceURI) {
1666
- throw new Error("Unexpected XML namespace");
1667
- }
1668
- svgElem.style.maxWidth = "100%";
1669
- svgElem.style.maxHeight = "100%";
1670
- this.gradientDefs = document.createElementNS(xmlns, "defs");
1671
- svgElem.insertBefore(this.gradientDefs, svgElem.firstChild);
1672
- for (const orbitName in kPuzzleDefinition.orbits) {
1673
- const orbitDefinition = kPuzzleDefinition.orbits[orbitName];
1674
- for (let idx = 0; idx < orbitDefinition.numPieces; idx++) {
1675
- for (let orientation = 0; orientation < orbitDefinition.orientations; orientation++) {
1676
- const id = this.elementID(orbitName, idx, orientation);
1677
- const elem = this.elementByID(id);
1678
- let originalColor = elem.style.fill;
1679
- if (experimentalAppearance) {
1680
- (() => {
1681
- const a = experimentalAppearance.orbits;
1682
- if (!a) {
1683
- return;
1684
- }
1685
- const orbitAppearance = a[orbitName];
1686
- if (!orbitAppearance) {
1687
- return;
1688
- }
1689
- const pieceAppearance = orbitAppearance.pieces[idx];
1690
- if (!pieceAppearance) {
1691
- return;
1692
- }
1693
- const faceletAppearance = pieceAppearance.facelets[orientation];
1694
- if (!faceletAppearance) {
1695
- return;
1696
- }
1697
- const appearance = typeof faceletAppearance === "string" ? faceletAppearance : faceletAppearance?.appearance;
1698
- const colorMap = colorMaps[appearance];
1699
- if (colorMap) {
1700
- originalColor = colorMap[originalColor];
1701
- }
1702
- })();
1703
- } else {
1704
- originalColor = elem.style.fill;
1705
- }
1706
- this.originalColors[id] = originalColor;
1707
- this.gradients[id] = this.newGradient(id, originalColor);
1708
- this.gradientDefs.appendChild(this.gradients[id]);
1709
- elem.setAttribute("style", `fill: url(#grad-${this.svgID}-${id})`);
1710
- }
1711
- }
1712
- }
1713
- }
1714
- drawKPuzzle(kpuzzle, nextState, fraction) {
1715
- this.draw(kpuzzle.definition, kpuzzle.state, nextState, fraction);
1716
- }
1717
- draw(definition, state, nextState, fraction) {
1718
- for (const orbitName in definition.orbits) {
1719
- const orbitDefinition = definition.orbits[orbitName];
1720
- const curOrbitState = state[orbitName];
1721
- const nextOrbitState = nextState ? nextState[orbitName] : null;
1722
- for (let idx = 0; idx < orbitDefinition.numPieces; idx++) {
1723
- for (let orientation = 0; orientation < orbitDefinition.orientations; orientation++) {
1724
- const id = this.elementID(orbitName, idx, orientation);
1725
- const fromCur = this.elementID(orbitName, curOrbitState.permutation[idx], (orbitDefinition.orientations - curOrbitState.orientation[idx] + orientation) % orbitDefinition.orientations);
1726
- let singleColor = false;
1727
- if (nextOrbitState) {
1728
- const fromNext = this.elementID(orbitName, nextOrbitState.permutation[idx], (orbitDefinition.orientations - nextOrbitState.orientation[idx] + orientation) % orbitDefinition.orientations);
1729
- if (fromCur === fromNext) {
1730
- singleColor = true;
1731
- }
1732
- fraction = fraction || 0;
1733
- const easedBackwardsPercent = 100 * (1 - fraction * fraction * (2 - fraction * fraction));
1734
- this.gradients[id].children[0].setAttribute("stop-color", this.originalColors[fromCur]);
1735
- this.gradients[id].children[1].setAttribute("stop-color", this.originalColors[fromCur]);
1736
- this.gradients[id].children[1].setAttribute("offset", `${Math.max(easedBackwardsPercent - 5, 0)}%`);
1737
- this.gradients[id].children[2].setAttribute("offset", `${Math.max(easedBackwardsPercent - 5, 0)}%`);
1738
- this.gradients[id].children[3].setAttribute("offset", `${easedBackwardsPercent}%`);
1739
- this.gradients[id].children[4].setAttribute("offset", `${easedBackwardsPercent}%`);
1740
- this.gradients[id].children[4].setAttribute("stop-color", this.originalColors[fromNext]);
1741
- this.gradients[id].children[5].setAttribute("stop-color", this.originalColors[fromNext]);
1742
- } else {
1743
- singleColor = true;
1744
- }
1745
- if (singleColor) {
1746
- this.gradients[id].children[0].setAttribute("stop-color", this.originalColors[fromCur]);
1747
- this.gradients[id].children[1].setAttribute("stop-color", this.originalColors[fromCur]);
1748
- this.gradients[id].children[1].setAttribute("offset", `100%`);
1749
- this.gradients[id].children[2].setAttribute("offset", `100%`);
1750
- this.gradients[id].children[3].setAttribute("offset", `100%`);
1751
- this.gradients[id].children[4].setAttribute("offset", `100%`);
1752
- }
1753
- }
1754
- }
1755
- }
1756
- }
1757
- newGradient(id, originalColor) {
1758
- const grad = document.createElementNS(xmlns, "radialGradient");
1759
- grad.setAttribute("id", `grad-${this.svgID}-${id}`);
1760
- grad.setAttribute("r", `70.7107%`);
1761
- const stopDefs = [
1762
- { offset: 0, color: originalColor },
1763
- { offset: 0, color: originalColor },
1764
- { offset: 0, color: "black" },
1765
- { offset: 0, color: "black" },
1766
- { offset: 0, color: originalColor },
1767
- { offset: 100, color: originalColor }
1768
- ];
1769
- for (const stopDef of stopDefs) {
1770
- const stop = document.createElementNS(xmlns, "stop");
1771
- stop.setAttribute("offset", `${stopDef.offset}%`);
1772
- stop.setAttribute("stop-color", stopDef.color);
1773
- stop.setAttribute("stop-opacity", "1");
1774
- grad.appendChild(stop);
1775
- }
1776
- return grad;
1777
- }
1778
- elementID(orbitName, idx, orientation) {
1779
- return orbitName + "-l" + idx + "-o" + orientation;
1780
- }
1781
- elementByID(id) {
1782
- return this.element.querySelector("#" + id);
1783
- }
1784
- };
1785
-
1786
- // src/cubing/kpuzzle/3x3x3/3x3x3.kpuzzle.json.ts
1787
- var cube3x3x3KPuzzle = {
1788
- name: "3x3x3",
1789
- orbits: {
1790
- EDGES: { numPieces: 12, orientations: 2 },
1791
- CORNERS: { numPieces: 8, orientations: 3 },
1792
- CENTERS: { numPieces: 6, orientations: 4 }
1793
- },
1794
- startPieces: {
1795
- EDGES: {
1796
- permutation: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11],
1797
- orientation: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
1798
- },
1799
- CORNERS: {
1800
- permutation: [0, 1, 2, 3, 4, 5, 6, 7],
1801
- orientation: [0, 0, 0, 0, 0, 0, 0, 0]
1802
- },
1803
- CENTERS: {
1804
- permutation: [0, 1, 2, 3, 4, 5],
1805
- orientation: [0, 0, 0, 0, 0, 0]
1806
- }
1807
- },
1808
- moves: {
1809
- U: {
1810
- EDGES: {
1811
- permutation: [1, 2, 3, 0, 4, 5, 6, 7, 8, 9, 10, 11],
1812
- orientation: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
1813
- },
1814
- CORNERS: {
1815
- permutation: [1, 2, 3, 0, 4, 5, 6, 7],
1816
- orientation: [0, 0, 0, 0, 0, 0, 0, 0]
1817
- },
1818
- CENTERS: {
1819
- permutation: [0, 1, 2, 3, 4, 5],
1820
- orientation: [1, 0, 0, 0, 0, 0]
1821
- }
1822
- },
1823
- y: {
1824
- EDGES: {
1825
- permutation: [1, 2, 3, 0, 5, 6, 7, 4, 10, 8, 11, 9],
1826
- orientation: [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1]
1827
- },
1828
- CORNERS: {
1829
- permutation: [1, 2, 3, 0, 7, 4, 5, 6],
1830
- orientation: [0, 0, 0, 0, 0, 0, 0, 0]
1831
- },
1832
- CENTERS: {
1833
- permutation: [0, 2, 3, 4, 1, 5],
1834
- orientation: [1, 0, 0, 0, 0, 3]
1835
- }
1836
- },
1837
- x: {
1838
- EDGES: {
1839
- permutation: [4, 8, 0, 9, 6, 10, 2, 11, 5, 7, 1, 3],
1840
- orientation: [1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0]
1841
- },
1842
- CORNERS: {
1843
- permutation: [4, 0, 3, 5, 7, 6, 2, 1],
1844
- orientation: [2, 1, 2, 1, 1, 2, 1, 2]
1845
- },
1846
- CENTERS: {
1847
- permutation: [2, 1, 5, 3, 0, 4],
1848
- orientation: [0, 3, 0, 1, 2, 2]
1849
- }
1850
- },
1851
- L: {
1852
- EDGES: {
1853
- permutation: [0, 1, 2, 11, 4, 5, 6, 9, 8, 3, 10, 7],
1854
- orientation: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
1855
- },
1856
- CORNERS: {
1857
- permutation: [0, 1, 6, 2, 4, 3, 5, 7],
1858
- orientation: [0, 0, 2, 1, 0, 2, 1, 0]
1859
- },
1860
- CENTERS: {
1861
- permutation: [0, 1, 2, 3, 4, 5],
1862
- orientation: [0, 1, 0, 0, 0, 0]
1863
- }
1864
- },
1865
- F: {
1866
- EDGES: {
1867
- permutation: [9, 1, 2, 3, 8, 5, 6, 7, 0, 4, 10, 11],
1868
- orientation: [1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0]
1869
- },
1870
- CORNERS: {
1871
- permutation: [3, 1, 2, 5, 0, 4, 6, 7],
1872
- orientation: [1, 0, 0, 2, 2, 1, 0, 0]
1873
- },
1874
- CENTERS: {
1875
- permutation: [0, 1, 2, 3, 4, 5],
1876
- orientation: [0, 0, 1, 0, 0, 0]
1877
- }
1878
- },
1879
- R: {
1880
- EDGES: {
1881
- permutation: [0, 8, 2, 3, 4, 10, 6, 7, 5, 9, 1, 11],
1882
- orientation: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
1883
- },
1884
- CORNERS: {
1885
- permutation: [4, 0, 2, 3, 7, 5, 6, 1],
1886
- orientation: [2, 1, 0, 0, 1, 0, 0, 2]
1887
- },
1888
- CENTERS: {
1889
- permutation: [0, 1, 2, 3, 4, 5],
1890
- orientation: [0, 0, 0, 1, 0, 0]
1891
- }
1892
- },
1893
- B: {
1894
- EDGES: {
1895
- permutation: [0, 1, 10, 3, 4, 5, 11, 7, 8, 9, 6, 2],
1896
- orientation: [0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1]
1897
- },
1898
- CORNERS: {
1899
- permutation: [0, 7, 1, 3, 4, 5, 2, 6],
1900
- orientation: [0, 2, 1, 0, 0, 0, 2, 1]
1901
- },
1902
- CENTERS: {
1903
- permutation: [0, 1, 2, 3, 4, 5],
1904
- orientation: [0, 0, 0, 0, 1, 0]
1905
- }
1906
- },
1907
- D: {
1908
- EDGES: {
1909
- permutation: [0, 1, 2, 3, 7, 4, 5, 6, 8, 9, 10, 11],
1910
- orientation: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
1911
- },
1912
- CORNERS: {
1913
- permutation: [0, 1, 2, 3, 5, 6, 7, 4],
1914
- orientation: [0, 0, 0, 0, 0, 0, 0, 0]
1915
- },
1916
- CENTERS: {
1917
- permutation: [0, 1, 2, 3, 4, 5],
1918
- orientation: [0, 0, 0, 0, 0, 1]
1919
- }
1920
- },
1921
- z: {
1922
- EDGES: {
1923
- permutation: [9, 3, 11, 7, 8, 1, 10, 5, 0, 4, 2, 6],
1924
- orientation: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
1925
- },
1926
- CORNERS: {
1927
- permutation: [3, 2, 6, 5, 0, 4, 7, 1],
1928
- orientation: [1, 2, 1, 2, 2, 1, 2, 1]
1929
- },
1930
- CENTERS: {
1931
- permutation: [1, 5, 2, 0, 4, 3],
1932
- orientation: [1, 1, 1, 1, 3, 1]
1933
- }
1934
- },
1935
- M: {
1936
- EDGES: {
1937
- permutation: [2, 1, 6, 3, 0, 5, 4, 7, 8, 9, 10, 11],
1938
- orientation: [1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0]
1939
- },
1940
- CORNERS: {
1941
- permutation: [0, 1, 2, 3, 4, 5, 6, 7],
1942
- orientation: [0, 0, 0, 0, 0, 0, 0, 0]
1943
- },
1944
- CENTERS: {
1945
- permutation: [4, 1, 0, 3, 5, 2],
1946
- orientation: [2, 0, 0, 0, 2, 0]
1947
- }
1948
- },
1949
- E: {
1950
- EDGES: {
1951
- permutation: [0, 1, 2, 3, 4, 5, 6, 7, 9, 11, 8, 10],
1952
- orientation: [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1]
1953
- },
1954
- CORNERS: {
1955
- permutation: [0, 1, 2, 3, 4, 5, 6, 7],
1956
- orientation: [0, 0, 0, 0, 0, 0, 0, 0]
1957
- },
1958
- CENTERS: {
1959
- permutation: [0, 4, 1, 2, 3, 5],
1960
- orientation: [0, 0, 0, 0, 0, 0]
1961
- }
1962
- },
1963
- S: {
1964
- EDGES: {
1965
- permutation: [0, 3, 2, 7, 4, 1, 6, 5, 8, 9, 10, 11],
1966
- orientation: [0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0]
1967
- },
1968
- CORNERS: {
1969
- permutation: [0, 1, 2, 3, 4, 5, 6, 7],
1970
- orientation: [0, 0, 0, 0, 0, 0, 0, 0]
1971
- },
1972
- CENTERS: {
1973
- permutation: [1, 5, 2, 0, 4, 3],
1974
- orientation: [1, 1, 0, 1, 0, 1]
1975
- }
1976
- },
1977
- u: {
1978
- EDGES: {
1979
- permutation: [1, 2, 3, 0, 4, 5, 6, 7, 10, 8, 11, 9],
1980
- orientation: [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1]
1981
- },
1982
- CORNERS: {
1983
- permutation: [1, 2, 3, 0, 4, 5, 6, 7],
1984
- orientation: [0, 0, 0, 0, 0, 0, 0, 0]
1985
- },
1986
- CENTERS: {
1987
- permutation: [0, 2, 3, 4, 1, 5],
1988
- orientation: [1, 0, 0, 0, 0, 0]
1989
- }
1990
- },
1991
- l: {
1992
- EDGES: {
1993
- permutation: [2, 1, 6, 11, 0, 5, 4, 9, 8, 3, 10, 7],
1994
- orientation: [1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0]
1995
- },
1996
- CORNERS: {
1997
- permutation: [0, 1, 6, 2, 4, 3, 5, 7],
1998
- orientation: [0, 0, 2, 1, 0, 2, 1, 0]
1999
- },
2000
- CENTERS: {
2001
- permutation: [4, 1, 0, 3, 5, 2],
2002
- orientation: [2, 1, 0, 0, 2, 0]
2003
- }
2004
- },
2005
- f: {
2006
- EDGES: {
2007
- permutation: [9, 3, 2, 7, 8, 1, 6, 5, 0, 4, 10, 11],
2008
- orientation: [1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 0]
2009
- },
2010
- CORNERS: {
2011
- permutation: [3, 1, 2, 5, 0, 4, 6, 7],
2012
- orientation: [1, 0, 0, 2, 2, 1, 0, 0]
2013
- },
2014
- CENTERS: {
2015
- permutation: [1, 5, 2, 0, 4, 3],
2016
- orientation: [1, 1, 1, 1, 0, 1]
2017
- }
2018
- },
2019
- r: {
2020
- EDGES: {
2021
- permutation: [4, 8, 0, 3, 6, 10, 2, 7, 5, 9, 1, 11],
2022
- orientation: [1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0]
2023
- },
2024
- CORNERS: {
2025
- permutation: [4, 0, 2, 3, 7, 5, 6, 1],
2026
- orientation: [2, 1, 0, 0, 1, 0, 0, 2]
2027
- },
2028
- CENTERS: {
2029
- permutation: [2, 1, 5, 3, 0, 4],
2030
- orientation: [0, 0, 0, 1, 2, 2]
2031
- }
2032
- },
2033
- b: {
2034
- EDGES: {
2035
- permutation: [0, 5, 10, 1, 4, 7, 11, 3, 8, 9, 6, 2],
2036
- orientation: [0, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1]
2037
- },
2038
- CORNERS: {
2039
- permutation: [0, 7, 1, 3, 4, 5, 2, 6],
2040
- orientation: [0, 2, 1, 0, 0, 0, 2, 1]
2041
- },
2042
- CENTERS: {
2043
- permutation: [3, 0, 2, 5, 4, 1],
2044
- orientation: [3, 3, 0, 3, 1, 3]
2045
- }
2046
- },
2047
- d: {
2048
- EDGES: {
2049
- permutation: [0, 1, 2, 3, 7, 4, 5, 6, 9, 11, 8, 10],
2050
- orientation: [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1]
2051
- },
2052
- CORNERS: {
2053
- permutation: [0, 1, 2, 3, 5, 6, 7, 4],
2054
- orientation: [0, 0, 0, 0, 0, 0, 0, 0]
2055
- },
2056
- CENTERS: {
2057
- permutation: [0, 4, 1, 2, 3, 5],
2058
- orientation: [0, 0, 0, 0, 0, 1]
2059
- }
2060
- }
2061
- }
2062
- };
2063
- cube3x3x3KPuzzle.moves["Uw"] = cube3x3x3KPuzzle.moves["u"];
2064
- cube3x3x3KPuzzle.moves["Lw"] = cube3x3x3KPuzzle.moves["l"];
2065
- cube3x3x3KPuzzle.moves["Fw"] = cube3x3x3KPuzzle.moves["f"];
2066
- cube3x3x3KPuzzle.moves["Rw"] = cube3x3x3KPuzzle.moves["r"];
2067
- cube3x3x3KPuzzle.moves["Bw"] = cube3x3x3KPuzzle.moves["b"];
2068
- cube3x3x3KPuzzle.moves["Dw"] = cube3x3x3KPuzzle.moves["d"];
2069
- cube3x3x3KPuzzle.moves["Rv"] = cube3x3x3KPuzzle.moves["x"];
2070
- cube3x3x3KPuzzle.moves["Uv"] = cube3x3x3KPuzzle.moves["y"];
2071
- cube3x3x3KPuzzle.moves["Fv"] = cube3x3x3KPuzzle.moves["z"];
2072
- cube3x3x3KPuzzle.moves["Lv"] = {
2073
- EDGES: {
2074
- permutation: [2, 10, 6, 11, 0, 8, 4, 9, 1, 3, 5, 7],
2075
- orientation: [1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0]
2076
- },
2077
- CORNERS: {
2078
- permutation: [1, 7, 6, 2, 0, 3, 5, 4],
2079
- orientation: [2, 1, 2, 1, 1, 2, 1, 2]
2080
- },
2081
- CENTERS: {
2082
- permutation: [4, 1, 0, 3, 5, 2],
2083
- orientation: [2, 1, 0, 3, 2, 0]
2084
- }
2085
- };
2086
- cube3x3x3KPuzzle.moves["Dv"] = {
2087
- EDGES: {
2088
- permutation: [3, 0, 1, 2, 7, 4, 5, 6, 9, 11, 8, 10],
2089
- orientation: [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1]
2090
- },
2091
- CORNERS: {
2092
- permutation: [3, 0, 1, 2, 5, 6, 7, 4],
2093
- orientation: [0, 0, 0, 0, 0, 0, 0, 0]
2094
- },
2095
- CENTERS: {
2096
- permutation: [0, 4, 1, 2, 3, 5],
2097
- orientation: [3, 0, 0, 0, 0, 1]
2098
- }
2099
- };
2100
- cube3x3x3KPuzzle.moves["Bv"] = {
2101
- EDGES: {
2102
- permutation: [8, 5, 10, 1, 9, 7, 11, 3, 4, 0, 6, 2],
2103
- orientation: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
2104
- },
2105
- CORNERS: {
2106
- permutation: [4, 7, 1, 0, 5, 3, 2, 6],
2107
- orientation: [1, 2, 1, 2, 2, 1, 2, 1]
2108
- },
2109
- CENTERS: {
2110
- permutation: [3, 0, 2, 5, 4, 1],
2111
- orientation: [3, 3, 3, 3, 1, 3]
2112
- }
2113
- };
2114
-
2115
- // src/cubing/kpuzzle/puzzle-orientation.ts
2116
- function experimentalIs3x3x3Solved(transformation, options) {
2117
- const normalized = normalizePuzzleOrientation(transformation);
2118
- if (options.ignoreCenterOrientation) {
2119
- return areOrbitTransformationsEquivalent(cube3x3x3KPuzzle, "EDGES", normalized, cube3x3x3KPuzzle.startPieces) && areOrbitTransformationsEquivalent(cube3x3x3KPuzzle, "CORNERS", normalized, cube3x3x3KPuzzle.startPieces);
2120
- } else {
2121
- return areTransformationsEquivalent(cube3x3x3KPuzzle, normalized, cube3x3x3KPuzzle.startPieces);
2122
- }
2123
- }
2124
-
2125
- // src/cubing/protocol/binary/puzzle-orientation.ts
2126
- function puzzleOrientationIdx(state) {
2127
- const idxU = state["CENTERS"].permutation[0];
2128
- const idxD = state["CENTERS"].permutation[5];
2129
- const unadjustedIdxL = state["CENTERS"].permutation[1];
2130
- let idxL = unadjustedIdxL;
2131
- if (idxU < unadjustedIdxL) {
2132
- idxL--;
2133
- }
2134
- if (idxD < unadjustedIdxL) {
2135
- idxL--;
2136
- }
2137
- return [idxU, idxL];
2138
- }
2139
- var puzzleOrientationCache = new Array(6).fill(0).map(() => {
2140
- return new Array(6);
2141
- });
2142
- {
2143
- const orientationKpuzzle = new KPuzzle(cube3x3x3KPuzzle);
2144
- const uAlgs = ["", "z", "x", "z'", "x'", "x2"].map((s) => Alg.fromString(s));
2145
- const yAlg = new Alg("y");
2146
- for (const uAlg of uAlgs) {
2147
- orientationKpuzzle.reset();
2148
- orientationKpuzzle.applyAlg(uAlg);
2149
- for (let i = 0; i < 4; i++) {
2150
- orientationKpuzzle.applyAlg(yAlg);
2151
- const [idxU, idxL] = puzzleOrientationIdx(orientationKpuzzle.state);
2152
- puzzleOrientationCache[idxU][idxL] = invertTransformation(cube3x3x3KPuzzle, orientationKpuzzle.state);
2153
- }
2154
- }
2155
- }
2156
- function normalizePuzzleOrientation(s) {
2157
- const [idxU, idxL] = puzzleOrientationIdx(s);
2158
- const orientationTransformation = puzzleOrientationCache[idxU][idxL];
2159
- return combineTransformations(cube3x3x3KPuzzle, s, orientationTransformation);
2160
- }
2161
- function reorientPuzzle(s, idxU, idxL) {
2162
- const orientationTransformation = invertTransformation(cube3x3x3KPuzzle, puzzleOrientationCache[idxU][idxL]);
2163
- return combineTransformations(cube3x3x3KPuzzle, s, orientationTransformation);
2164
- }
2165
-
2166
- // src/cubing/protocol/binary/binary3x3x3.ts
2167
- var BIT_LENGTHS = [29, 12, 16, 13, 3, 2, 1, 12];
2168
- function arraySum(arr) {
2169
- let total = 0;
2170
- for (const entry of arr) {
2171
- total += entry;
2172
- }
2173
- return total;
2174
- }
2175
- function splitBinary(bitLengths, buffy) {
2176
- const u8buffy = new Uint8Array(buffy);
2177
- let at = 0;
2178
- let bits = 0;
2179
- let accum = 0;
2180
- const values = [];
2181
- for (const bitLength of bitLengths) {
2182
- while (bits < bitLength) {
2183
- accum = accum << 8 | u8buffy[at++];
2184
- bits += 8;
2185
- }
2186
- values.push(accum >> bits - bitLength & (1 << bitLength) - 1);
2187
- bits -= bitLength;
2188
- }
2189
- return values;
2190
- }
2191
- function concatBinary(bitLengths, values) {
2192
- const buffy = new Uint8Array(Math.ceil(arraySum(bitLengths) / 8));
2193
- let at = 0;
2194
- let bits = 0;
2195
- let accum = 0;
2196
- for (let i = 0; i < bitLengths.length; i++) {
2197
- accum = accum << bitLengths[i] | values[i];
2198
- bits += bitLengths[i];
2199
- while (bits >= 8) {
2200
- buffy[at++] = accum >> bits - 8;
2201
- bits -= 8;
2202
- }
2203
- }
2204
- if (bits > 0) {
2205
- buffy[at++] = accum << 8 - bits;
2206
- }
2207
- return buffy;
2208
- }
2209
- function supportsPuzzleOrientation(components) {
2210
- return components.poIdxU !== 7;
2211
- }
2212
- function reid3x3x3ToBinaryComponents(state) {
2213
- const normedState = normalizePuzzleOrientation(state);
2214
- const epLex = permutationToLex(normedState["EDGES"].permutation);
2215
- const eoMask = orientationsToMask(2, normedState["EDGES"].orientation);
2216
- const cpLex = permutationToLex(normedState["CORNERS"].permutation);
2217
- const coMask = orientationsToMask(3, normedState["CORNERS"].orientation);
2218
- const [poIdxU, poIdxL] = puzzleOrientationIdx(state);
2219
- const moSupport = 1;
2220
- const moMask = orientationsToMask(4, normedState["CENTERS"].orientation);
2221
- return {
2222
- epLex,
2223
- eoMask,
2224
- cpLex,
2225
- coMask,
2226
- poIdxU,
2227
- poIdxL,
2228
- moSupport,
2229
- moMask
2230
- };
2231
- }
2232
- function binaryComponentsToTwizzleBinary(components) {
2233
- const { epLex, eoMask, cpLex, coMask, poIdxU, poIdxL, moSupport, moMask } = components;
2234
- return concatBinary(BIT_LENGTHS, [
2235
- epLex,
2236
- eoMask,
2237
- cpLex,
2238
- coMask,
2239
- poIdxU,
2240
- poIdxL,
2241
- moSupport,
2242
- moMask
2243
- ]);
2244
- }
2245
- function reid3x3x3ToTwizzleBinary(state) {
2246
- const components = reid3x3x3ToBinaryComponents(state);
2247
- return binaryComponentsToTwizzleBinary(components);
2248
- }
2249
- function twizzleBinaryToBinaryComponents(buffer) {
2250
- const [epLex, eoMask, cpLex, coMask, poIdxU, poIdxL, moSupport, moMask] = splitBinary(BIT_LENGTHS, buffer);
2251
- return {
2252
- epLex,
2253
- eoMask,
2254
- cpLex,
2255
- coMask,
2256
- poIdxU,
2257
- poIdxL,
2258
- moSupport,
2259
- moMask
2260
- };
2261
- }
2262
- function binaryComponentsToReid3x3x3(components) {
2263
- if (components.moSupport !== 1) {
2264
- throw new Error("Must support center orientation.");
2265
- }
2266
- const normedState = {
2267
- EDGES: {
2268
- permutation: lexToPermutation(12, components.epLex),
2269
- orientation: maskToOrientations(2, 12, components.eoMask)
2270
- },
2271
- CORNERS: {
2272
- permutation: lexToPermutation(8, components.cpLex),
2273
- orientation: maskToOrientations(3, 8, components.coMask)
2274
- },
2275
- CENTERS: {
2276
- permutation: identityPermutation(6),
2277
- orientation: maskToOrientations(4, 6, components.moMask)
2278
- }
2279
- };
2280
- if (!supportsPuzzleOrientation(components)) {
2281
- return normedState;
2282
- }
2283
- return reorientPuzzle(normedState, components.poIdxU, components.poIdxL);
2284
- }
2285
- function validateComponents(components) {
2286
- const errors = [];
2287
- if (components.epLex < 0 || components.epLex >= 479001600) {
2288
- errors.push(`epLex (${components.epLex}) out of range`);
2289
- }
2290
- if (components.cpLex < 0 || components.cpLex >= 40320) {
2291
- errors.push(`cpLex (${components.cpLex}) out of range`);
2292
- }
2293
- if (components.coMask < 0 || components.coMask >= 6561) {
2294
- errors.push(`coMask (${components.coMask}) out of range`);
2295
- }
2296
- if (components.poIdxU < 0 || components.poIdxU >= 6) {
2297
- if (supportsPuzzleOrientation(components)) {
2298
- errors.push(`poIdxU (${components.poIdxU}) out of range`);
2299
- }
2300
- }
2301
- if (components.eoMask < 0 || components.eoMask >= 4096) {
2302
- errors.push(`eoMask (${components.eoMask}) out of range`);
2303
- }
2304
- if (components.moMask < 0 || components.moMask >= 4096) {
2305
- errors.push(`moMask (${components.moMask}) out of range`);
2306
- }
2307
- if (components.poIdxL < 0 || components.poIdxL >= 4) {
2308
- errors.push(`poIdxL (${components.poIdxL}) out of range`);
2309
- }
2310
- if (components.moSupport < 0 || components.moSupport >= 2) {
2311
- errors.push(`moSupport (${components.moSupport}) out of range`);
2312
- }
2313
- return errors;
2314
- }
2315
- function twizzleBinaryToReid3x3x3(buffy) {
2316
- const components = twizzleBinaryToBinaryComponents(buffy);
2317
- const errors = validateComponents(components);
2318
- if (errors.length !== 0) {
2319
- throw new Error(`Invalid binary state components: ${errors.join(", ")}`);
2320
- }
2321
- return binaryComponentsToReid3x3x3(components);
2322
- }
2323
-
2324
- // src/cubing/protocol/binary/hex.ts
2325
- function bufferToSpacedHex(buffer) {
2326
- return Array.prototype.map.call(new Uint8Array(buffer), (x) => ("00" + x.toString(16)).slice(-2)).join(" ");
2327
- }
2328
- function spacedHexToBuffer(hex) {
2329
- return new Uint8Array(hex.split(" ").map((c) => parseInt(c, 16)));
2330
- }
2331
-
2332
- export {
2333
- combineTransformations,
2334
- multiplyTransformations,
2335
- identityTransformation,
2336
- invertTransformation,
2337
- transformationOrder,
2338
- areOrbitTransformationsEquivalent,
2339
- areTransformationsEquivalent,
2340
- areStatesEquivalent,
2341
- transformationForQuantumMove,
2342
- transformationForMove,
2343
- KPuzzle,
2344
- Canonicalizer,
2345
- SearchSequence,
2346
- CanonicalSequenceIterator,
2347
- pegParseKPuzzleDefinition,
2348
- KPuzzleSVGWrapper,
2349
- cube3x3x3KPuzzle,
2350
- normalizePuzzleOrientation,
2351
- reid3x3x3ToTwizzleBinary,
2352
- twizzleBinaryToBinaryComponents,
2353
- binaryComponentsToReid3x3x3,
2354
- twizzleBinaryToReid3x3x3,
2355
- bufferToSpacedHex,
2356
- spacedHexToBuffer,
2357
- experimentalIs3x3x3Solved
2358
- };
2359
- //# sourceMappingURL=chunk-X6JHXPDX.js.map