@cubingcenter/scrambler 0.5.3 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (244) hide show
  1. package/README.md +24 -9
  2. package/dist/cli/index.js +0 -0
  3. package/dist/core/api.d.ts.map +1 -1
  4. package/dist/core/api.js +11 -1
  5. package/dist/core/types.d.ts +1 -1
  6. package/dist/core/types.d.ts.map +1 -1
  7. package/dist/puzzles/cube4/index.d.ts +4 -2
  8. package/dist/puzzles/cube4/index.d.ts.map +1 -1
  9. package/dist/puzzles/cube4/index.js +3 -1
  10. package/dist/puzzles/cube4/random-state.d.ts +16 -0
  11. package/dist/puzzles/cube4/random-state.d.ts.map +1 -0
  12. package/dist/puzzles/cube4/random-state.js +76 -0
  13. package/dist/puzzles/cube4/reduction/browser-loader.d.ts +18 -0
  14. package/dist/puzzles/cube4/reduction/browser-loader.d.ts.map +1 -0
  15. package/dist/puzzles/cube4/reduction/browser-loader.js +95 -0
  16. package/dist/puzzles/cube4/reduction/center1.d.ts +65 -0
  17. package/dist/puzzles/cube4/reduction/center1.d.ts.map +1 -0
  18. package/dist/puzzles/cube4/reduction/center1.js +245 -0
  19. package/dist/puzzles/cube4/reduction/center2.d.ts +91 -0
  20. package/dist/puzzles/cube4/reduction/center2.d.ts.map +1 -0
  21. package/dist/puzzles/cube4/reduction/center2.js +449 -0
  22. package/dist/puzzles/cube4/reduction/center3.d.ts +47 -0
  23. package/dist/puzzles/cube4/reduction/center3.d.ts.map +1 -0
  24. package/dist/puzzles/cube4/reduction/center3.js +278 -0
  25. package/dist/puzzles/cube4/reduction/edge3.d.ts +100 -0
  26. package/dist/puzzles/cube4/reduction/edge3.d.ts.map +1 -0
  27. package/dist/puzzles/cube4/reduction/edge3.js +511 -0
  28. package/dist/puzzles/cube4/reduction/generated/center1-distance.bin +1 -0
  29. package/dist/puzzles/cube4/reduction/generated/center1-manifest.json +46 -0
  30. package/dist/puzzles/cube4/reduction/generated/center1-move-maps.bin +0 -0
  31. package/dist/puzzles/cube4/reduction/generated/center2-ct-move.bin +0 -0
  32. package/dist/puzzles/cube4/reduction/generated/center2-manifest.json +87 -0
  33. package/dist/puzzles/cube4/reduction/generated/center2-pruning.bin +1 -0
  34. package/dist/puzzles/cube4/reduction/generated/center2-rl-move.bin +0 -0
  35. package/dist/puzzles/cube4/reduction/generated/center3-manifest.json +40 -0
  36. package/dist/puzzles/cube4/reduction/generated/center3-move.bin +0 -0
  37. package/dist/puzzles/cube4/reduction/generated/center3-pruning.bin +0 -0
  38. package/dist/puzzles/cube4/reduction/generated/edge3-distances.bin +1 -0
  39. package/dist/puzzles/cube4/reduction/generated/edge3-manifest.json +12 -0
  40. package/dist/puzzles/cube4/reduction/geometry.d.ts +33 -0
  41. package/dist/puzzles/cube4/reduction/geometry.d.ts.map +1 -0
  42. package/dist/puzzles/cube4/reduction/geometry.js +302 -0
  43. package/dist/puzzles/cube4/reduction/node-loader.d.ts +17 -0
  44. package/dist/puzzles/cube4/reduction/node-loader.d.ts.map +1 -0
  45. package/dist/puzzles/cube4/reduction/node-loader.js +98 -0
  46. package/dist/puzzles/cube4/reduction/pairing-coordinate.d.ts +130 -0
  47. package/dist/puzzles/cube4/reduction/pairing-coordinate.d.ts.map +1 -0
  48. package/dist/puzzles/cube4/reduction/pairing-coordinate.js +281 -0
  49. package/dist/puzzles/cube4/reduction/phase3-search.d.ts +42 -0
  50. package/dist/puzzles/cube4/reduction/phase3-search.d.ts.map +1 -0
  51. package/dist/puzzles/cube4/reduction/phase3-search.js +133 -0
  52. package/dist/puzzles/cube4/reduction/phase3.d.ts +34 -0
  53. package/dist/puzzles/cube4/reduction/phase3.d.ts.map +1 -0
  54. package/dist/puzzles/cube4/reduction/phase3.js +83 -0
  55. package/dist/puzzles/cube4/reduction/phase4.d.ts +35 -0
  56. package/dist/puzzles/cube4/reduction/phase4.d.ts.map +1 -0
  57. package/dist/puzzles/cube4/reduction/phase4.js +82 -0
  58. package/dist/puzzles/cube4/reduction/solve.d.ts +31 -0
  59. package/dist/puzzles/cube4/reduction/solve.d.ts.map +1 -0
  60. package/dist/puzzles/cube4/reduction/solve.js +311 -0
  61. package/dist/puzzles/cube4/scrambler.d.ts +9 -1
  62. package/dist/puzzles/cube4/scrambler.d.ts.map +1 -1
  63. package/dist/puzzles/cube4/scrambler.js +123 -81
  64. package/dist/puzzles/cube4/types.d.ts +6 -0
  65. package/dist/puzzles/cube4/types.d.ts.map +1 -1
  66. package/dist/puzzles/cube4/validation.d.ts +6 -0
  67. package/dist/puzzles/cube4/validation.d.ts.map +1 -0
  68. package/dist/puzzles/cube4/validation.js +91 -0
  69. package/dist/puzzles/fto/coordinates.d.ts +53 -0
  70. package/dist/puzzles/fto/coordinates.d.ts.map +1 -0
  71. package/dist/puzzles/fto/coordinates.js +228 -0
  72. package/dist/puzzles/fto/facelets.d.ts +6 -0
  73. package/dist/puzzles/fto/facelets.d.ts.map +1 -0
  74. package/dist/puzzles/fto/facelets.js +99 -0
  75. package/dist/puzzles/fto/index.d.ts +12 -0
  76. package/dist/puzzles/fto/index.d.ts.map +1 -0
  77. package/dist/puzzles/fto/index.js +13 -0
  78. package/dist/puzzles/fto/moves.d.ts +12 -0
  79. package/dist/puzzles/fto/moves.d.ts.map +1 -0
  80. package/dist/puzzles/fto/moves.js +115 -0
  81. package/dist/puzzles/fto/random-state.d.ts +17 -0
  82. package/dist/puzzles/fto/random-state.d.ts.map +1 -0
  83. package/dist/puzzles/fto/random-state.js +40 -0
  84. package/dist/puzzles/fto/scrambler.d.ts +6 -0
  85. package/dist/puzzles/fto/scrambler.d.ts.map +1 -0
  86. package/dist/puzzles/fto/scrambler.js +49 -0
  87. package/dist/puzzles/fto/solver/engine.d.ts +18 -0
  88. package/dist/puzzles/fto/solver/engine.d.ts.map +1 -0
  89. package/dist/puzzles/fto/solver/engine.js +1168 -0
  90. package/dist/puzzles/fto/solver/index.d.ts +2 -0
  91. package/dist/puzzles/fto/solver/index.d.ts.map +1 -0
  92. package/dist/puzzles/fto/solver/index.js +1 -0
  93. package/dist/puzzles/fto/state.d.ts +16 -0
  94. package/dist/puzzles/fto/state.d.ts.map +1 -0
  95. package/dist/puzzles/fto/state.js +61 -0
  96. package/dist/puzzles/fto/types.d.ts +32 -0
  97. package/dist/puzzles/fto/types.d.ts.map +1 -0
  98. package/dist/puzzles/fto/types.js +46 -0
  99. package/dist/puzzles/fto/validation.d.ts +19 -0
  100. package/dist/puzzles/fto/validation.d.ts.map +1 -0
  101. package/dist/puzzles/fto/validation.js +143 -0
  102. package/dist/puzzles/index.d.ts +2 -0
  103. package/dist/puzzles/index.d.ts.map +1 -1
  104. package/dist/puzzles/index.js +6 -0
  105. package/dist/puzzles/skewb/index.d.ts +1 -1
  106. package/dist/puzzles/skewb/index.d.ts.map +1 -1
  107. package/dist/puzzles/skewb/index.js +1 -1
  108. package/dist/puzzles/skewb/random-state.d.ts.map +1 -1
  109. package/dist/puzzles/skewb/random-state.js +4 -1
  110. package/dist/puzzles/sq1/facelets.d.ts +12 -0
  111. package/dist/puzzles/sq1/facelets.d.ts.map +1 -0
  112. package/dist/puzzles/sq1/facelets.js +26 -0
  113. package/dist/puzzles/sq1/index.d.ts +10 -0
  114. package/dist/puzzles/sq1/index.d.ts.map +1 -0
  115. package/dist/puzzles/sq1/index.js +11 -0
  116. package/dist/puzzles/sq1/moves.d.ts +55 -0
  117. package/dist/puzzles/sq1/moves.d.ts.map +1 -0
  118. package/dist/puzzles/sq1/moves.js +220 -0
  119. package/dist/puzzles/sq1/random-state.d.ts +6 -0
  120. package/dist/puzzles/sq1/random-state.d.ts.map +1 -0
  121. package/dist/puzzles/sq1/random-state.js +49 -0
  122. package/dist/puzzles/sq1/scrambler.d.ts +10 -0
  123. package/dist/puzzles/sq1/scrambler.d.ts.map +1 -0
  124. package/dist/puzzles/sq1/scrambler.js +90 -0
  125. package/dist/puzzles/sq1/solver/browser-loader.d.ts +5 -0
  126. package/dist/puzzles/sq1/solver/browser-loader.d.ts.map +1 -0
  127. package/dist/puzzles/sq1/solver/browser-loader.js +92 -0
  128. package/dist/puzzles/sq1/solver/full-cube.d.ts +53 -0
  129. package/dist/puzzles/sq1/solver/full-cube.d.ts.map +1 -0
  130. package/dist/puzzles/sq1/solver/full-cube.js +281 -0
  131. package/dist/puzzles/sq1/solver/generated/manifest.json +50 -0
  132. package/dist/puzzles/sq1/solver/generated/shape-bottom-move.bin +0 -0
  133. package/dist/puzzles/sq1/solver/generated/shape-idx.bin +0 -0
  134. package/dist/puzzles/sq1/solver/generated/shape-prun.bin +0 -0
  135. package/dist/puzzles/sq1/solver/generated/shape-top-move.bin +0 -0
  136. package/dist/puzzles/sq1/solver/generated/shape-twist-move.bin +0 -0
  137. package/dist/puzzles/sq1/solver/generated/square-bottom-move.bin +0 -0
  138. package/dist/puzzles/sq1/solver/generated/square-prun.bin +0 -0
  139. package/dist/puzzles/sq1/solver/generated/square-top-move.bin +0 -0
  140. package/dist/puzzles/sq1/solver/generated/square-twist-move.bin +0 -0
  141. package/dist/puzzles/sq1/solver/index.d.ts +5 -0
  142. package/dist/puzzles/sq1/solver/index.d.ts.map +1 -0
  143. package/dist/puzzles/sq1/solver/index.js +4 -0
  144. package/dist/puzzles/sq1/solver/node-loader.d.ts +4 -0
  145. package/dist/puzzles/sq1/solver/node-loader.d.ts.map +1 -0
  146. package/dist/puzzles/sq1/solver/node-loader.js +113 -0
  147. package/dist/puzzles/sq1/solver/search.d.ts +27 -0
  148. package/dist/puzzles/sq1/solver/search.d.ts.map +1 -0
  149. package/dist/puzzles/sq1/solver/search.js +225 -0
  150. package/dist/puzzles/sq1/solver/shape.d.ts +22 -0
  151. package/dist/puzzles/sq1/solver/shape.d.ts.map +1 -0
  152. package/dist/puzzles/sq1/solver/shape.js +185 -0
  153. package/dist/puzzles/sq1/solver/square.d.ts +10 -0
  154. package/dist/puzzles/sq1/solver/square.d.ts.map +1 -0
  155. package/dist/puzzles/sq1/solver/square.js +90 -0
  156. package/dist/puzzles/sq1/solver/table-metadata.d.ts +48 -0
  157. package/dist/puzzles/sq1/solver/table-metadata.d.ts.map +1 -0
  158. package/dist/puzzles/sq1/solver/table-metadata.js +47 -0
  159. package/dist/puzzles/sq1/solver/tables.d.ts +17 -0
  160. package/dist/puzzles/sq1/solver/tables.d.ts.map +1 -0
  161. package/dist/puzzles/sq1/solver/tables.js +66 -0
  162. package/dist/puzzles/sq1/state.d.ts +10 -0
  163. package/dist/puzzles/sq1/state.d.ts.map +1 -0
  164. package/dist/puzzles/sq1/state.js +74 -0
  165. package/dist/puzzles/sq1/types.d.ts +32 -0
  166. package/dist/puzzles/sq1/types.d.ts.map +1 -0
  167. package/dist/puzzles/sq1/types.js +1 -0
  168. package/dist/puzzles/sq1/validation.d.ts +7 -0
  169. package/dist/puzzles/sq1/validation.d.ts.map +1 -0
  170. package/dist/puzzles/sq1/validation.js +64 -0
  171. package/dist/random/prng.d.ts.map +1 -1
  172. package/dist/random/prng.js +9 -4
  173. package/dist-cjs/core/api.js +11 -1
  174. package/dist-cjs/puzzles/cube4/index.js +11 -4
  175. package/dist-cjs/puzzles/cube4/random-state.js +79 -0
  176. package/dist-cjs/puzzles/cube4/reduction/browser-loader.js +100 -0
  177. package/dist-cjs/puzzles/cube4/reduction/center1.js +258 -0
  178. package/dist-cjs/puzzles/cube4/reduction/center2.js +462 -0
  179. package/dist-cjs/puzzles/cube4/reduction/center3.js +284 -0
  180. package/dist-cjs/puzzles/cube4/reduction/edge3.js +522 -0
  181. package/dist-cjs/puzzles/cube4/reduction/generated/center1-distance.bin +1 -0
  182. package/dist-cjs/puzzles/cube4/reduction/generated/center1-manifest.json +46 -0
  183. package/dist-cjs/puzzles/cube4/reduction/generated/center1-move-maps.bin +0 -0
  184. package/dist-cjs/puzzles/cube4/reduction/generated/center2-ct-move.bin +0 -0
  185. package/dist-cjs/puzzles/cube4/reduction/generated/center2-manifest.json +87 -0
  186. package/dist-cjs/puzzles/cube4/reduction/generated/center2-pruning.bin +1 -0
  187. package/dist-cjs/puzzles/cube4/reduction/generated/center2-rl-move.bin +0 -0
  188. package/dist-cjs/puzzles/cube4/reduction/generated/center3-manifest.json +40 -0
  189. package/dist-cjs/puzzles/cube4/reduction/generated/center3-move.bin +0 -0
  190. package/dist-cjs/puzzles/cube4/reduction/generated/center3-pruning.bin +0 -0
  191. package/dist-cjs/puzzles/cube4/reduction/generated/edge3-distances.bin +1 -0
  192. package/dist-cjs/puzzles/cube4/reduction/generated/edge3-manifest.json +12 -0
  193. package/dist-cjs/puzzles/cube4/reduction/geometry.js +308 -0
  194. package/dist-cjs/puzzles/cube4/reduction/node-loader.js +104 -0
  195. package/dist-cjs/puzzles/cube4/reduction/pairing-coordinate.js +294 -0
  196. package/dist-cjs/puzzles/cube4/reduction/phase3-search.js +138 -0
  197. package/dist-cjs/puzzles/cube4/reduction/phase3.js +86 -0
  198. package/dist-cjs/puzzles/cube4/reduction/phase4.js +87 -0
  199. package/dist-cjs/puzzles/cube4/reduction/solve.js +314 -0
  200. package/dist-cjs/puzzles/cube4/scrambler.js +122 -79
  201. package/dist-cjs/puzzles/cube4/validation.js +97 -0
  202. package/dist-cjs/puzzles/fto/coordinates.js +240 -0
  203. package/dist-cjs/puzzles/fto/facelets.js +104 -0
  204. package/dist-cjs/puzzles/fto/index.js +68 -0
  205. package/dist-cjs/puzzles/fto/moves.js +126 -0
  206. package/dist-cjs/puzzles/fto/random-state.js +43 -0
  207. package/dist-cjs/puzzles/fto/scrambler.js +53 -0
  208. package/dist-cjs/puzzles/fto/solver/engine.js +1175 -0
  209. package/dist-cjs/puzzles/fto/solver/index.js +9 -0
  210. package/dist-cjs/puzzles/fto/state.js +69 -0
  211. package/dist-cjs/puzzles/fto/types.js +49 -0
  212. package/dist-cjs/puzzles/fto/validation.js +147 -0
  213. package/dist-cjs/puzzles/index.js +7 -1
  214. package/dist-cjs/puzzles/skewb/index.js +2 -1
  215. package/dist-cjs/puzzles/skewb/random-state.js +4 -1
  216. package/dist-cjs/puzzles/sq1/facelets.js +30 -0
  217. package/dist-cjs/puzzles/sq1/index.js +52 -0
  218. package/dist-cjs/puzzles/sq1/moves.js +234 -0
  219. package/dist-cjs/puzzles/sq1/random-state.js +52 -0
  220. package/dist-cjs/puzzles/sq1/scrambler.js +95 -0
  221. package/dist-cjs/puzzles/sq1/solver/browser-loader.js +97 -0
  222. package/dist-cjs/puzzles/sq1/solver/full-cube.js +289 -0
  223. package/dist-cjs/puzzles/sq1/solver/generated/manifest.json +50 -0
  224. package/dist-cjs/puzzles/sq1/solver/generated/shape-bottom-move.bin +0 -0
  225. package/dist-cjs/puzzles/sq1/solver/generated/shape-idx.bin +0 -0
  226. package/dist-cjs/puzzles/sq1/solver/generated/shape-prun.bin +0 -0
  227. package/dist-cjs/puzzles/sq1/solver/generated/shape-top-move.bin +0 -0
  228. package/dist-cjs/puzzles/sq1/solver/generated/shape-twist-move.bin +0 -0
  229. package/dist-cjs/puzzles/sq1/solver/generated/square-bottom-move.bin +0 -0
  230. package/dist-cjs/puzzles/sq1/solver/generated/square-prun.bin +0 -0
  231. package/dist-cjs/puzzles/sq1/solver/generated/square-top-move.bin +0 -0
  232. package/dist-cjs/puzzles/sq1/solver/generated/square-twist-move.bin +0 -0
  233. package/dist-cjs/puzzles/sq1/solver/index.js +18 -0
  234. package/dist-cjs/puzzles/sq1/solver/node-loader.js +120 -0
  235. package/dist-cjs/puzzles/sq1/solver/search.js +229 -0
  236. package/dist-cjs/puzzles/sq1/solver/shape.js +191 -0
  237. package/dist-cjs/puzzles/sq1/solver/square.js +93 -0
  238. package/dist-cjs/puzzles/sq1/solver/table-metadata.js +50 -0
  239. package/dist-cjs/puzzles/sq1/solver/tables.js +106 -0
  240. package/dist-cjs/puzzles/sq1/state.js +81 -0
  241. package/dist-cjs/puzzles/sq1/types.js +2 -0
  242. package/dist-cjs/puzzles/sq1/validation.js +68 -0
  243. package/dist-cjs/random/prng.js +9 -4
  244. package/package.json +43 -14
@@ -0,0 +1,225 @@
1
+ import { FullCube } from "./full-cube.js";
2
+ import { getSquare1SolverTablesSync } from "./tables.js";
3
+ export const INVERSE_SOLUTION = 0x2;
4
+ export class Square1Searcher {
5
+ tables;
6
+ move = new Array(100);
7
+ c = new FullCube();
8
+ d = new FullCube();
9
+ length1 = 0;
10
+ movelen1 = 0;
11
+ maxlen2 = 0;
12
+ verbose = 0;
13
+ solString = "";
14
+ solMoves = [];
15
+ constructor(tables) {
16
+ this.tables = tables || getSquare1SolverTablesSync();
17
+ }
18
+ solution(c, verbose = 0) {
19
+ this.c.copy(c);
20
+ this.verbose = verbose;
21
+ this.solString = "";
22
+ this.solMoves = [];
23
+ const shape = c.getShapeIdx(this.tables.shapeIdx);
24
+ for (this.length1 = this.tables.shapePrun[shape]; this.length1 < 100; this.length1++) {
25
+ this.maxlen2 = Math.min(31 - this.length1, 17);
26
+ if (this.idaPhase1(shape, this.tables.shapePrun[shape], this.length1, 0, -1)) {
27
+ break;
28
+ }
29
+ }
30
+ return {
31
+ moves: this.solMoves,
32
+ scramble: this.solString,
33
+ depth: this.solMoves.length
34
+ };
35
+ }
36
+ idaPhase1(shape, prunvalue, maxl, depth, lm) {
37
+ if (prunvalue === 0 && maxl < 4) {
38
+ this.movelen1 = depth;
39
+ return maxl === 0 && this.initPhase2();
40
+ }
41
+ // try twist
42
+ if (lm !== 0) {
43
+ const shapex = this.tables.shapeTwistMove[shape];
44
+ const prun = this.tables.shapePrun[shapex];
45
+ if (prun < maxl) {
46
+ this.move[depth] = 0;
47
+ if (this.idaPhase1(shapex, prun, maxl - 1, depth + 1, 0)) {
48
+ return true;
49
+ }
50
+ }
51
+ }
52
+ // try top layer
53
+ if (lm <= 0) {
54
+ let m = 0;
55
+ let shapex = shape;
56
+ while (true) {
57
+ const topVal = this.tables.shapeTopMove[shapex];
58
+ m += topVal & 0xf;
59
+ shapex = topVal >> 4;
60
+ if (m >= 12)
61
+ break;
62
+ const prun = this.tables.shapePrun[shapex];
63
+ if (prun > maxl)
64
+ break;
65
+ else if (prun < maxl) {
66
+ this.move[depth] = m;
67
+ if (this.idaPhase1(shapex, prun, maxl - 1, depth + 1, 1)) {
68
+ return true;
69
+ }
70
+ }
71
+ }
72
+ }
73
+ // try bottom layer
74
+ if (lm <= 1) {
75
+ let m = 0;
76
+ let shapex = shape;
77
+ while (true) {
78
+ const botVal = this.tables.shapeBottomMove[shapex];
79
+ m += botVal & 0xf;
80
+ shapex = botVal >> 4;
81
+ if (m >= 6)
82
+ break;
83
+ const prun = this.tables.shapePrun[shapex];
84
+ if (prun > maxl)
85
+ break;
86
+ else if (prun < maxl) {
87
+ this.move[depth] = -m;
88
+ if (this.idaPhase1(shapex, prun, maxl - 1, depth + 1, 2)) {
89
+ return true;
90
+ }
91
+ }
92
+ }
93
+ }
94
+ return false;
95
+ }
96
+ initPhase2() {
97
+ this.d.copy(this.c);
98
+ for (let i = 0; i < this.movelen1; i++) {
99
+ this.d.doMove(this.move[i]);
100
+ }
101
+ const sq = this.d.getSquare();
102
+ const prun = Math.max(this.tables.squarePrun[(sq.edgeperm << 1) | sq.ml], this.tables.squarePrun[(sq.cornperm << 1) | sq.ml]);
103
+ for (let i = prun; i < this.maxlen2; i++) {
104
+ if (this.idaPhase2(sq.edgeperm, sq.cornperm, sq.topEdgeFirst, sq.botEdgeFirst, sq.ml, i, this.movelen1, 0)) {
105
+ this.formatSolution(i + this.movelen1);
106
+ return true;
107
+ }
108
+ }
109
+ return false;
110
+ }
111
+ idaPhase2(edge, corner, topEdgeFirst, botEdgeFirst, ml, maxl, depth, lm) {
112
+ if (maxl === 0 && !topEdgeFirst && botEdgeFirst) {
113
+ return edge === 0 && corner === 0 && ml === 0;
114
+ }
115
+ // try twist
116
+ if (lm !== 0 && topEdgeFirst === botEdgeFirst) {
117
+ const edgex = this.tables.squareTwistMove[edge];
118
+ const cornerx = this.tables.squareTwistMove[corner];
119
+ if (this.tables.squarePrun[(edgex << 1) | (1 - ml)] < maxl &&
120
+ this.tables.squarePrun[(cornerx << 1) | (1 - ml)] < maxl) {
121
+ this.move[depth] = 0;
122
+ if (this.idaPhase2(edgex, cornerx, topEdgeFirst, botEdgeFirst, 1 - ml, maxl - 1, depth + 1, 0)) {
123
+ return true;
124
+ }
125
+ }
126
+ }
127
+ // try top layer
128
+ if (lm <= 0) {
129
+ let topEdgeFirstx = !topEdgeFirst;
130
+ let edgex = topEdgeFirstx ? this.tables.squareTopMove[edge] : edge;
131
+ let cornerx = topEdgeFirstx ? corner : this.tables.squareTopMove[corner];
132
+ let m = topEdgeFirstx ? 1 : 2;
133
+ let prun1 = this.tables.squarePrun[(edgex << 1) | ml];
134
+ let prun2 = this.tables.squarePrun[(cornerx << 1) | ml];
135
+ while (m < 12 && prun1 <= maxl && prun2 <= maxl) {
136
+ if (prun1 < maxl && prun2 < maxl) {
137
+ this.move[depth] = m;
138
+ if (this.idaPhase2(edgex, cornerx, topEdgeFirstx, botEdgeFirst, ml, maxl - 1, depth + 1, 1)) {
139
+ return true;
140
+ }
141
+ }
142
+ topEdgeFirstx = !topEdgeFirstx;
143
+ if (topEdgeFirstx) {
144
+ edgex = this.tables.squareTopMove[edgex];
145
+ prun1 = this.tables.squarePrun[(edgex << 1) | ml];
146
+ m += 1;
147
+ }
148
+ else {
149
+ cornerx = this.tables.squareTopMove[cornerx];
150
+ prun2 = this.tables.squarePrun[(cornerx << 1) | ml];
151
+ m += 2;
152
+ }
153
+ }
154
+ }
155
+ // try bottom layer
156
+ if (lm <= 1) {
157
+ let botEdgeFirstx = !botEdgeFirst;
158
+ let edgex = botEdgeFirstx ? this.tables.squareBottomMove[edge] : edge;
159
+ let cornerx = botEdgeFirstx ? corner : this.tables.squareBottomMove[corner];
160
+ let m = botEdgeFirstx ? 1 : 2;
161
+ let prun1 = this.tables.squarePrun[(edgex << 1) | ml];
162
+ let prun2 = this.tables.squarePrun[(cornerx << 1) | ml];
163
+ while (m < (maxl > 6 ? 6 : 12) && prun1 <= maxl && prun2 <= maxl) {
164
+ if (prun1 < maxl && prun2 < maxl) {
165
+ this.move[depth] = -m;
166
+ if (this.idaPhase2(edgex, cornerx, topEdgeFirst, botEdgeFirstx, ml, maxl - 1, depth + 1, 2)) {
167
+ return true;
168
+ }
169
+ }
170
+ botEdgeFirstx = !botEdgeFirstx;
171
+ if (botEdgeFirstx) {
172
+ edgex = this.tables.squareBottomMove[edgex];
173
+ prun1 = this.tables.squarePrun[(edgex << 1) | ml];
174
+ m += 1;
175
+ }
176
+ else {
177
+ cornerx = this.tables.squareBottomMove[cornerx];
178
+ prun2 = this.tables.squarePrun[(cornerx << 1) | ml];
179
+ m += 2;
180
+ }
181
+ }
182
+ }
183
+ return false;
184
+ }
185
+ formatSolution(len) {
186
+ const outputMoves = new Array(len);
187
+ if ((this.verbose & INVERSE_SOLUTION) !== 0) {
188
+ for (let i = len - 1; i >= 0; i--) {
189
+ const val = this.move[i];
190
+ outputMoves[len - 1 - i] = val > 0 ? 12 - val : val < 0 ? -12 - val : val;
191
+ }
192
+ }
193
+ else {
194
+ for (let i = 0; i < len; i++) {
195
+ outputMoves[i] = this.move[i];
196
+ }
197
+ }
198
+ const tokens = [];
199
+ let top = 0;
200
+ let bottom = 0;
201
+ for (let i = 0; i < len; i++) {
202
+ const val = outputMoves[i];
203
+ if (val > 0) {
204
+ top = val > 6 ? val - 12 : val;
205
+ }
206
+ else if (val < 0) {
207
+ bottom = -val > 6 ? -val - 12 : -val;
208
+ }
209
+ else {
210
+ tokens.push(`(${top}, ${bottom})`, "/");
211
+ top = 0;
212
+ bottom = 0;
213
+ }
214
+ }
215
+ if (top !== 0 || bottom !== 0) {
216
+ tokens.push(`(${top}, ${bottom})`);
217
+ }
218
+ // Clean up empty leading (0, 0)
219
+ if (tokens.length >= 2 && tokens[0] === "(0, 0)") {
220
+ tokens.shift();
221
+ }
222
+ this.solMoves = tokens;
223
+ this.solString = tokens.join(" ").replace(/\s*\/\s*/g, " / ").replace(/\s+/g, " ").trim();
224
+ }
225
+ }
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Shape tables and transitions for Square-1 (Phase 1).
3
+ */
4
+ export declare function bitCount(n: number): number;
5
+ export declare class ShapeState {
6
+ top: number;
7
+ bottom: number;
8
+ parity: number;
9
+ getIdx(shapeIdx: Int32Array): number;
10
+ setIdx(idx: number, shapeIdx: Int32Array): void;
11
+ topMove(): number;
12
+ bottomMove(): number;
13
+ twistMove(): void;
14
+ }
15
+ export declare function generateShapeTables(): {
16
+ shapeIdx: Int32Array;
17
+ shapePrun: Int8Array;
18
+ shapeTopMove: Int32Array;
19
+ shapeBottomMove: Int32Array;
20
+ shapeTwistMove: Int32Array;
21
+ };
22
+ //# sourceMappingURL=shape.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shape.d.ts","sourceRoot":"","sources":["../../../../src/puzzles/sq1/solver/shape.ts"],"names":[],"mappings":"AAAA;;GAEG;AAOH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAQ1C;AAED,qBAAa,UAAU;IACrB,GAAG,EAAE,MAAM,CAAK;IAChB,MAAM,EAAE,MAAM,CAAK;IACnB,MAAM,EAAE,MAAM,CAAK;IAEnB,MAAM,CAAC,QAAQ,EAAE,UAAU,GAAG,MAAM;IAcpC,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,GAAG,IAAI;IAO/C,OAAO,IAAI,MAAM;IAoBjB,UAAU,IAAI,MAAM;IAoBpB,SAAS,IAAI,IAAI;CASlB;AAED,wBAAgB,mBAAmB,IAAI;IACrC,QAAQ,EAAE,UAAU,CAAC;IACrB,SAAS,EAAE,SAAS,CAAC;IACrB,YAAY,EAAE,UAAU,CAAC;IACzB,eAAe,EAAE,UAAU,CAAC;IAC5B,cAAc,EAAE,UAAU,CAAC;CAC5B,CAuGA"}
@@ -0,0 +1,185 @@
1
+ /**
2
+ * Shape tables and transitions for Square-1 (Phase 1).
3
+ */
4
+ const halflayer = [
5
+ 0x00, 0x03, 0x06, 0x0c, 0x0f, 0x18, 0x1b, 0x1e,
6
+ 0x30, 0x33, 0x36, 0x3c, 0x3f
7
+ ];
8
+ export function bitCount(n) {
9
+ let count = 0;
10
+ let v = n >>> 0;
11
+ while (v > 0) {
12
+ count += v & 1;
13
+ v >>>= 1;
14
+ }
15
+ return count;
16
+ }
17
+ export class ShapeState {
18
+ top = 0;
19
+ bottom = 0;
20
+ parity = 0;
21
+ getIdx(shapeIdx) {
22
+ const shp = ((this.top << 12) | this.bottom) >>> 0;
23
+ let low = 0;
24
+ let high = shapeIdx.length - 1;
25
+ while (low <= high) {
26
+ const mid = (low + high) >>> 1;
27
+ const midVal = shapeIdx[mid] >>> 0;
28
+ if (midVal < shp)
29
+ low = mid + 1;
30
+ else if (midVal > shp)
31
+ high = mid - 1;
32
+ else
33
+ return (mid << 1) | this.parity;
34
+ }
35
+ return 0;
36
+ }
37
+ setIdx(idx, shapeIdx) {
38
+ this.parity = idx & 1;
39
+ const val = shapeIdx[idx >> 1];
40
+ this.bottom = val & 0xfff;
41
+ this.top = (val >> 12) & 0xfff;
42
+ }
43
+ topMove() {
44
+ let move = 0;
45
+ let moveParity = 0;
46
+ do {
47
+ if ((this.top & 0x800) === 0) {
48
+ move += 1;
49
+ this.top = (this.top << 1) & 0xfff;
50
+ }
51
+ else {
52
+ move += 2;
53
+ this.top = ((this.top << 2) ^ 0x3003) & 0xfff;
54
+ }
55
+ moveParity = 1 - moveParity;
56
+ } while ((bitCount(this.top & 0x3f) & 1) !== 0);
57
+ if ((bitCount(this.top) & 2) === 0) {
58
+ this.parity ^= moveParity;
59
+ }
60
+ return move;
61
+ }
62
+ bottomMove() {
63
+ let move = 0;
64
+ let moveParity = 0;
65
+ do {
66
+ if ((this.bottom & 0x800) === 0) {
67
+ move += 1;
68
+ this.bottom = (this.bottom << 1) & 0xfff;
69
+ }
70
+ else {
71
+ move += 2;
72
+ this.bottom = ((this.bottom << 2) ^ 0x3003) & 0xfff;
73
+ }
74
+ moveParity = 1 - moveParity;
75
+ } while ((bitCount(this.bottom & 0x3f) & 1) !== 0);
76
+ if ((bitCount(this.bottom) & 2) === 0) {
77
+ this.parity ^= moveParity;
78
+ }
79
+ return move;
80
+ }
81
+ twistMove() {
82
+ const temp = this.top & 0x3f;
83
+ const p1 = bitCount(temp);
84
+ const p3 = bitCount(this.bottom & 0xfc0);
85
+ this.parity ^= 1 & ((p1 & p3) >> 1);
86
+ this.top = (this.top & 0xfc0) | ((this.bottom >> 6) & 0x3f);
87
+ this.bottom = (this.bottom & 0x3f) | (temp << 6);
88
+ }
89
+ }
90
+ export function generateShapeTables() {
91
+ const shapeIdx = new Int32Array(3678);
92
+ const shapePrun = new Int8Array(3678 * 2);
93
+ const shapeTopMove = new Int32Array(3678 * 2);
94
+ const shapeBottomMove = new Int32Array(3678 * 2);
95
+ const shapeTwistMove = new Int32Array(3678 * 2);
96
+ // 1. Build ShapeIdx
97
+ let count = 0;
98
+ for (let i = 0; i < 13 * 13 * 13 * 13; i++) {
99
+ const dr = halflayer[i % 13];
100
+ const dl = halflayer[Math.floor(i / 13) % 13];
101
+ const ur = halflayer[Math.floor(i / (13 * 13)) % 13];
102
+ const ul = halflayer[Math.floor(i / (13 * 13 * 13))];
103
+ const value = (ul << 18) | (ur << 12) | (dl << 6) | dr;
104
+ if (bitCount(value) === 16) {
105
+ shapeIdx[count++] = value;
106
+ }
107
+ }
108
+ // 2. Build Shape moves
109
+ const s = new ShapeState();
110
+ for (let i = 0; i < 3678 * 2; i++) {
111
+ s.setIdx(i, shapeIdx);
112
+ shapeTopMove[i] = s.topMove() | (s.getIdx(shapeIdx) << 4);
113
+ s.setIdx(i, shapeIdx);
114
+ shapeBottomMove[i] = s.bottomMove() | (s.getIdx(shapeIdx) << 4);
115
+ s.setIdx(i, shapeIdx);
116
+ s.twistMove();
117
+ shapeTwistMove[i] = s.getIdx(shapeIdx);
118
+ }
119
+ // 3. Build ShapePrun
120
+ shapePrun.fill(-1);
121
+ const getIdxForShape = (shp) => {
122
+ let low = 0;
123
+ let high = shapeIdx.length - 1;
124
+ const key = (shp & 0xffffff) >>> 0;
125
+ while (low <= high) {
126
+ const mid = (low + high) >>> 1;
127
+ const midVal = (shapeIdx[mid]) >>> 0;
128
+ if (midVal < key)
129
+ low = mid + 1;
130
+ else if (midVal > key)
131
+ high = mid - 1;
132
+ else
133
+ return (mid << 1) | (shp >>> 24);
134
+ }
135
+ return 0;
136
+ };
137
+ shapePrun[getIdxForShape(0x0db66db)] = 0;
138
+ shapePrun[getIdxForShape(0x1db6db6)] = 0;
139
+ shapePrun[getIdxForShape(0x16db6db)] = 0;
140
+ shapePrun[getIdxForShape(0x06dbdb6)] = 0;
141
+ let done = 4;
142
+ let done0 = 0;
143
+ let depth = -1;
144
+ while (done !== done0) {
145
+ done0 = done;
146
+ depth++;
147
+ for (let i = 0; i < 3678 * 2; i++) {
148
+ if (shapePrun[i] !== depth)
149
+ continue;
150
+ // twist
151
+ const idxTwist = shapeTwistMove[i];
152
+ if (shapePrun[idxTwist] === -1) {
153
+ done++;
154
+ shapePrun[idxTwist] = depth + 1;
155
+ }
156
+ // top moves
157
+ for (let m = 0, inc = 0, idx = i; m !== 12; m += inc) {
158
+ const topVal = shapeTopMove[idx];
159
+ inc = topVal & 0xf;
160
+ idx = topVal >> 4;
161
+ if (shapePrun[idx] === -1) {
162
+ done++;
163
+ shapePrun[idx] = depth + 1;
164
+ }
165
+ }
166
+ // bottom moves
167
+ for (let m = 0, inc = 0, idx = i; m !== 12; m += inc) {
168
+ const botVal = shapeBottomMove[idx];
169
+ inc = botVal & 0xf;
170
+ idx = botVal >> 4;
171
+ if (shapePrun[idx] === -1) {
172
+ done++;
173
+ shapePrun[idx] = depth + 1;
174
+ }
175
+ }
176
+ }
177
+ }
178
+ return {
179
+ shapeIdx,
180
+ shapePrun,
181
+ shapeTopMove,
182
+ shapeBottomMove,
183
+ shapeTwistMove
184
+ };
185
+ }
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Permutation tables and distance pruning for Square-1 in Cube/Cube shape (Phase 2).
3
+ */
4
+ export declare function generateSquareTables(): {
5
+ squarePrun: Int8Array;
6
+ squareTwistMove: Uint16Array;
7
+ squareTopMove: Uint16Array;
8
+ squareBottomMove: Uint16Array;
9
+ };
10
+ //# sourceMappingURL=square.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"square.d.ts","sourceRoot":"","sources":["../../../../src/puzzles/sq1/solver/square.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,wBAAgB,oBAAoB,IAAI;IACtC,UAAU,EAAE,SAAS,CAAC;IACtB,eAAe,EAAE,WAAW,CAAC;IAC7B,aAAa,EAAE,WAAW,CAAC;IAC3B,gBAAgB,EAAE,WAAW,CAAC;CAC/B,CAkFA"}
@@ -0,0 +1,90 @@
1
+ /**
2
+ * Permutation tables and distance pruning for Square-1 in Cube/Cube shape (Phase 2).
3
+ */
4
+ import { set8Perm, get8Perm } from "./full-cube.js";
5
+ export function generateSquareTables() {
6
+ const squarePrun = new Int8Array(40320 * 2);
7
+ const squareTwistMove = new Uint16Array(40320);
8
+ const squareTopMove = new Uint16Array(40320);
9
+ const squareBottomMove = new Uint16Array(40320);
10
+ const pos = new Uint8Array(8);
11
+ for (let i = 0; i < 40320; i++) {
12
+ // twist
13
+ set8Perm(pos, i);
14
+ let temp = pos[2];
15
+ pos[2] = pos[4];
16
+ pos[4] = temp;
17
+ temp = pos[3];
18
+ pos[3] = pos[5];
19
+ pos[5] = temp;
20
+ squareTwistMove[i] = get8Perm(pos);
21
+ // top layer turn
22
+ set8Perm(pos, i);
23
+ temp = pos[0];
24
+ pos[0] = pos[1];
25
+ pos[1] = pos[2];
26
+ pos[2] = pos[3];
27
+ pos[3] = temp;
28
+ squareTopMove[i] = get8Perm(pos);
29
+ // bottom layer turn
30
+ set8Perm(pos, i);
31
+ temp = pos[4];
32
+ pos[4] = pos[5];
33
+ pos[5] = pos[6];
34
+ pos[6] = pos[7];
35
+ pos[7] = temp;
36
+ squareBottomMove[i] = get8Perm(pos);
37
+ }
38
+ squarePrun.fill(-1);
39
+ squarePrun[0] = 0;
40
+ let sqDepth = 0;
41
+ let sqDone = 1;
42
+ while (sqDone < 40320 * 2) {
43
+ const inv = sqDepth >= 11;
44
+ const find = inv ? -1 : sqDepth;
45
+ const check = inv ? sqDepth : -1;
46
+ sqDepth++;
47
+ OUTER: for (let i = 0; i < 40320 * 2; i++) {
48
+ if (squarePrun[i] !== find)
49
+ continue;
50
+ let perm = i >> 1;
51
+ const ml = i & 1;
52
+ // twist
53
+ const idx = (squareTwistMove[perm] << 1) | (1 - ml);
54
+ if (squarePrun[idx] === check) {
55
+ sqDone++;
56
+ squarePrun[inv ? i : idx] = sqDepth;
57
+ if (inv)
58
+ continue OUTER;
59
+ }
60
+ // top layer turns
61
+ for (let m = 0; m < 4; m++) {
62
+ perm = squareTopMove[perm];
63
+ const idxTop = (perm << 1) | ml;
64
+ if (squarePrun[idxTop] === check) {
65
+ sqDone++;
66
+ squarePrun[inv ? i : idxTop] = sqDepth;
67
+ if (inv)
68
+ continue OUTER;
69
+ }
70
+ }
71
+ // bottom layer turns
72
+ for (let m = 0; m < 4; m++) {
73
+ perm = squareBottomMove[perm];
74
+ const idxBot = (perm << 1) | ml;
75
+ if (squarePrun[idxBot] === check) {
76
+ sqDone++;
77
+ squarePrun[inv ? i : idxBot] = sqDepth;
78
+ if (inv)
79
+ continue OUTER;
80
+ }
81
+ }
82
+ }
83
+ }
84
+ return {
85
+ squarePrun,
86
+ squareTwistMove,
87
+ squareTopMove,
88
+ squareBottomMove
89
+ };
90
+ }
@@ -0,0 +1,48 @@
1
+ export declare const SQ1_SOLVER_TABLE_METADATA: {
2
+ readonly shapeIdx: {
3
+ readonly entries: 3678;
4
+ readonly file: "shape-idx.bin";
5
+ readonly checksum: 3187990008;
6
+ };
7
+ readonly shapePrun: {
8
+ readonly entries: 7356;
9
+ readonly file: "shape-prun.bin";
10
+ readonly checksum: 2116325776;
11
+ };
12
+ readonly shapeTopMove: {
13
+ readonly entries: 7356;
14
+ readonly file: "shape-top-move.bin";
15
+ readonly checksum: 4112891337;
16
+ };
17
+ readonly shapeBottomMove: {
18
+ readonly entries: 7356;
19
+ readonly file: "shape-bottom-move.bin";
20
+ readonly checksum: 161984121;
21
+ };
22
+ readonly shapeTwistMove: {
23
+ readonly entries: 7356;
24
+ readonly file: "shape-twist-move.bin";
25
+ readonly checksum: 694153781;
26
+ };
27
+ readonly squareTwistMove: {
28
+ readonly entries: 40320;
29
+ readonly file: "square-twist-move.bin";
30
+ readonly checksum: 4150758597;
31
+ };
32
+ readonly squareTopMove: {
33
+ readonly entries: 40320;
34
+ readonly file: "square-top-move.bin";
35
+ readonly checksum: 1003750981;
36
+ };
37
+ readonly squareBottomMove: {
38
+ readonly entries: 40320;
39
+ readonly file: "square-bottom-move.bin";
40
+ readonly checksum: 2028613829;
41
+ };
42
+ readonly squarePrun: {
43
+ readonly entries: 80640;
44
+ readonly file: "square-prun.bin";
45
+ readonly checksum: 1475475221;
46
+ };
47
+ };
48
+ //# sourceMappingURL=table-metadata.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"table-metadata.d.ts","sourceRoot":"","sources":["../../../../src/puzzles/sq1/solver/table-metadata.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8C5B,CAAC"}
@@ -0,0 +1,47 @@
1
+ export const SQ1_SOLVER_TABLE_METADATA = {
2
+ shapeIdx: {
3
+ entries: 3678,
4
+ file: "shape-idx.bin",
5
+ checksum: 3187990008
6
+ },
7
+ shapePrun: {
8
+ entries: 7356,
9
+ file: "shape-prun.bin",
10
+ checksum: 2116325776
11
+ },
12
+ shapeTopMove: {
13
+ entries: 7356,
14
+ file: "shape-top-move.bin",
15
+ checksum: 4112891337
16
+ },
17
+ shapeBottomMove: {
18
+ entries: 7356,
19
+ file: "shape-bottom-move.bin",
20
+ checksum: 161984121
21
+ },
22
+ shapeTwistMove: {
23
+ entries: 7356,
24
+ file: "shape-twist-move.bin",
25
+ checksum: 694153781
26
+ },
27
+ squareTwistMove: {
28
+ entries: 40320,
29
+ file: "square-twist-move.bin",
30
+ checksum: 4150758597
31
+ },
32
+ squareTopMove: {
33
+ entries: 40320,
34
+ file: "square-top-move.bin",
35
+ checksum: 1003750981
36
+ },
37
+ squareBottomMove: {
38
+ entries: 40320,
39
+ file: "square-bottom-move.bin",
40
+ checksum: 2028613829
41
+ },
42
+ squarePrun: {
43
+ entries: 80640,
44
+ file: "square-prun.bin",
45
+ checksum: 1475475221
46
+ }
47
+ };
@@ -0,0 +1,17 @@
1
+ export interface Square1SolverTables {
2
+ shapeIdx: Int32Array;
3
+ shapePrun: Int8Array;
4
+ shapeTopMove: Int32Array;
5
+ shapeBottomMove: Int32Array;
6
+ shapeTwistMove: Int32Array;
7
+ squareTwistMove: Uint16Array;
8
+ squareTopMove: Uint16Array;
9
+ squareBottomMove: Uint16Array;
10
+ squarePrun: Int8Array;
11
+ }
12
+ export declare function areSquare1TablesLoaded(): boolean;
13
+ export declare function getSquare1SolverTablesSync(): Square1SolverTables;
14
+ export declare function ensureSquare1TablesLoaded(baseUrl?: string): Promise<Square1SolverTables>;
15
+ export declare function generateSquare1SolverTables(): Square1SolverTables;
16
+ export declare function setCachedSquare1Tables(tables: Square1SolverTables): void;
17
+ //# sourceMappingURL=tables.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tables.d.ts","sourceRoot":"","sources":["../../../../src/puzzles/sq1/solver/tables.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,UAAU,CAAC;IACrB,SAAS,EAAE,SAAS,CAAC;IACrB,YAAY,EAAE,UAAU,CAAC;IACzB,eAAe,EAAE,UAAU,CAAC;IAC5B,cAAc,EAAE,UAAU,CAAC;IAC3B,eAAe,EAAE,WAAW,CAAC;IAC7B,aAAa,EAAE,WAAW,CAAC;IAC3B,gBAAgB,EAAE,WAAW,CAAC;IAC9B,UAAU,EAAE,SAAS,CAAC;CACvB;AAKD,wBAAgB,sBAAsB,IAAI,OAAO,CAEhD;AAED,wBAAgB,0BAA0B,IAAI,mBAAmB,CAgBhE;AAED,wBAAsB,yBAAyB,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAyB9F;AAED,wBAAgB,2BAA2B,IAAI,mBAAmB,CAejE;AAED,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,mBAAmB,GAAG,IAAI,CAExE"}