cubing 0.58.1 → 0.59.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.
- package/dist/bin/scramble.js +1 -1
- package/dist/bin/scramble.js.map +2 -2
- package/dist/lib/cubing/alg/index.d.ts +2 -2
- package/dist/lib/cubing/alg/index.js +1 -1
- package/dist/lib/cubing/bluetooth/index.d.ts +3 -3
- package/dist/lib/cubing/bluetooth/index.js +12 -9
- package/dist/lib/cubing/bluetooth/index.js.map +2 -2
- package/dist/lib/cubing/{bluetooth-puzzle-BIDZuWiS.d.ts → bluetooth-puzzle-CweI5h6j.d.ts} +1 -1
- package/dist/lib/cubing/chunks/{big-puzzle-orientation-CQUVRARW.js → big-puzzle-orientation-3GQ3L26S.js} +2 -2
- package/dist/lib/cubing/chunks/{chunk-3MMNI5O2.js → chunk-7D7ZUWUK.js} +8 -5
- package/dist/lib/cubing/chunks/{chunk-3MMNI5O2.js.map → chunk-7D7ZUWUK.js.map} +2 -2
- package/dist/lib/cubing/chunks/{chunk-BVZN7IXO.js → chunk-ABQAUY7H.js} +3 -3
- package/dist/lib/cubing/chunks/{chunk-7M7ZAS5G.js → chunk-AVOUJS6N.js} +3 -3
- package/dist/lib/cubing/chunks/chunk-AVOUJS6N.js.map +7 -0
- package/dist/lib/cubing/chunks/{chunk-YICS6Q2F.js → chunk-I4OWC23M.js} +68 -84
- package/dist/lib/cubing/chunks/chunk-I4OWC23M.js.map +7 -0
- package/dist/lib/cubing/chunks/{chunk-LII4MJEB.js → chunk-OJI4YUWF.js} +6 -6
- package/dist/lib/cubing/chunks/{chunk-CZGLT7LF.js → chunk-PSQEELP4.js} +2 -2
- package/dist/lib/cubing/chunks/{chunk-SR66SYE2.js → chunk-QDEGPHPS.js} +2 -2
- package/dist/lib/cubing/chunks/chunk-QDEGPHPS.js.map +7 -0
- package/dist/lib/cubing/chunks/{chunk-Z4CZPP2W.js → chunk-RUSWM2KK.js} +12 -4
- package/dist/lib/cubing/chunks/chunk-RUSWM2KK.js.map +7 -0
- package/dist/lib/cubing/chunks/{chunk-ZVLDZYZD.js → chunk-UD4LT3FY.js} +3 -3
- package/dist/lib/cubing/chunks/{chunk-53UENZ7A.js → chunk-V7MAXDP4.js} +5 -5
- package/dist/lib/cubing/chunks/{chunk-53UENZ7A.js.map → chunk-V7MAXDP4.js.map} +1 -1
- package/dist/lib/cubing/chunks/{chunk-WI3YFILD.js → chunk-WIZJQ7QS.js} +4 -4
- package/dist/lib/cubing/chunks/{inside-ICFSQUAC.js → inside-4ARWPJBB.js} +35 -16
- package/dist/lib/cubing/chunks/inside-4ARWPJBB.js.map +7 -0
- package/dist/lib/cubing/chunks/{search-dynamic-sgs-side-events-5AC7RH72.js → search-dynamic-sgs-side-events-SYC27DSG.js} +6 -6
- package/dist/lib/cubing/chunks/{search-dynamic-sgs-unofficial-INRHQCBE.js → search-dynamic-sgs-unofficial-QGGV4PCJ.js} +6 -6
- package/dist/lib/cubing/chunks/search-dynamic-sgs-unofficial-QGGV4PCJ.js.map +7 -0
- package/dist/lib/cubing/chunks/{search-dynamic-solve-3x3x3-QHRLSVAC.js → search-dynamic-solve-3x3x3-B2L4IN34.js} +1 -1
- package/dist/lib/cubing/chunks/search-dynamic-solve-3x3x3-B2L4IN34.js.map +7 -0
- package/dist/lib/cubing/chunks/{search-dynamic-solve-4x4x4-VNSEVV7B.js → search-dynamic-solve-4x4x4-AS5AIKBC.js} +7 -7
- package/dist/lib/cubing/chunks/{search-dynamic-solve-fto-BHX3R6ZT.js → search-dynamic-solve-fto-HZREG6ZH.js} +8 -8
- package/dist/lib/cubing/chunks/search-dynamic-solve-fto-HZREG6ZH.js.map +7 -0
- package/dist/lib/cubing/chunks/{search-dynamic-solve-kilominx-SAJCQILQ.js → search-dynamic-solve-kilominx-GCNVEBDJ.js} +2 -2
- package/dist/lib/cubing/chunks/search-dynamic-solve-kilominx-GCNVEBDJ.js.map +7 -0
- package/dist/lib/cubing/chunks/{search-dynamic-solve-master_tetraminx-3D4MBF3V.js → search-dynamic-solve-master_tetraminx-GIS7T5B7.js} +1 -1
- package/dist/lib/cubing/chunks/search-dynamic-solve-master_tetraminx-GIS7T5B7.js.map +7 -0
- package/dist/lib/cubing/chunks/search-worker-entry.js +1 -1
- package/dist/lib/cubing/chunks/search-worker-entry.js.map +2 -2
- package/dist/lib/cubing/chunks/{twisty-dynamic-3d-CCZCZBPC.js → twisty-dynamic-3d-SIRF3JVR.js} +6 -6
- package/dist/lib/cubing/chunks/twsearch-SXB7BAMF.js +433 -0
- package/dist/lib/cubing/chunks/twsearch-SXB7BAMF.js.map +7 -0
- package/dist/lib/cubing/chunks/twsearch_wasm_bg-2J7XXRGI-WOU3FVAE.js +10 -0
- package/dist/lib/cubing/chunks/twsearch_wasm_bg-2J7XXRGI-WOU3FVAE.js.map +7 -0
- package/dist/lib/cubing/{index-1uDGfzzz.d.ts → index-DsFKu-dM.d.ts} +5 -2
- package/dist/lib/cubing/kpuzzle/index.d.ts +1 -1
- package/dist/lib/cubing/kpuzzle/index.js +2 -2
- package/dist/lib/cubing/notation/index.d.ts +1 -1
- package/dist/lib/cubing/notation/index.js +4 -4
- package/dist/lib/cubing/protocol/index.d.ts +1 -1
- package/dist/lib/cubing/protocol/index.js +4 -4
- package/dist/lib/cubing/puzzle-geometry/index.d.ts +2 -2
- package/dist/lib/cubing/puzzle-geometry/index.js +1 -1
- package/dist/lib/cubing/puzzles/index.d.ts +1 -1
- package/dist/lib/cubing/puzzles/index.js +4 -4
- package/dist/lib/cubing/scramble/index.d.ts +2 -2
- package/dist/lib/cubing/scramble/index.js +8 -6
- package/dist/lib/cubing/search/index.d.ts +2 -2
- package/dist/lib/cubing/search/index.js +6 -6
- package/dist/lib/cubing/stream/index.d.ts +2 -2
- package/dist/lib/cubing/stream/index.js +1 -1
- package/dist/lib/cubing/twisty/index.d.ts +2 -2
- package/dist/lib/cubing/twisty/index.js +10 -10
- package/dist/lib/cubing/twisty/index.js.map +2 -2
- package/experimental-json-schema/kpuzzle/KPatternData.schema.json +1 -1
- package/experimental-json-schema/kpuzzle/KPuzzleDefinition.schema.json +1 -1
- package/experimental-json-schema/kpuzzle/KTransformationData.schema.json +1 -1
- package/package.json +9 -10
- package/dist/lib/cubing/chunks/chunk-7M7ZAS5G.js.map +0 -7
- package/dist/lib/cubing/chunks/chunk-SR66SYE2.js.map +0 -7
- package/dist/lib/cubing/chunks/chunk-YICS6Q2F.js.map +0 -7
- package/dist/lib/cubing/chunks/chunk-Z4CZPP2W.js.map +0 -7
- package/dist/lib/cubing/chunks/inside-ICFSQUAC.js.map +0 -7
- package/dist/lib/cubing/chunks/search-dynamic-sgs-unofficial-INRHQCBE.js.map +0 -7
- package/dist/lib/cubing/chunks/search-dynamic-solve-3x3x3-QHRLSVAC.js.map +0 -7
- package/dist/lib/cubing/chunks/search-dynamic-solve-fto-BHX3R6ZT.js.map +0 -7
- package/dist/lib/cubing/chunks/search-dynamic-solve-kilominx-SAJCQILQ.js.map +0 -7
- package/dist/lib/cubing/chunks/search-dynamic-solve-master_tetraminx-3D4MBF3V.js.map +0 -7
- package/dist/lib/cubing/chunks/twsearch-T3W5T5WE.js +0 -481
- package/dist/lib/cubing/chunks/twsearch-T3W5T5WE.js.map +0 -7
- package/dist/lib/cubing/chunks/twsearch_wasm_bg-Q5AYUFKA-AHAAY6HU.js +0 -10
- package/dist/lib/cubing/chunks/twsearch_wasm_bg-Q5AYUFKA-AHAAY6HU.js.map +0 -7
- package/dist/lib/cubing/{PuzzleLoader-BskBhUgu.d.ts → KPattern-DEaZMwD9.d.ts} +20 -20
- /package/dist/lib/cubing/chunks/{big-puzzle-orientation-CQUVRARW.js.map → big-puzzle-orientation-3GQ3L26S.js.map} +0 -0
- /package/dist/lib/cubing/chunks/{chunk-BVZN7IXO.js.map → chunk-ABQAUY7H.js.map} +0 -0
- /package/dist/lib/cubing/chunks/{chunk-LII4MJEB.js.map → chunk-OJI4YUWF.js.map} +0 -0
- /package/dist/lib/cubing/chunks/{chunk-CZGLT7LF.js.map → chunk-PSQEELP4.js.map} +0 -0
- /package/dist/lib/cubing/chunks/{chunk-ZVLDZYZD.js.map → chunk-UD4LT3FY.js.map} +0 -0
- /package/dist/lib/cubing/chunks/{chunk-WI3YFILD.js.map → chunk-WIZJQ7QS.js.map} +0 -0
- /package/dist/lib/cubing/chunks/{search-dynamic-sgs-side-events-5AC7RH72.js.map → search-dynamic-sgs-side-events-SYC27DSG.js.map} +0 -0
- /package/dist/lib/cubing/chunks/{search-dynamic-solve-4x4x4-VNSEVV7B.js.map → search-dynamic-solve-4x4x4-AS5AIKBC.js.map} +0 -0
- /package/dist/lib/cubing/chunks/{twisty-dynamic-3d-CCZCZBPC.js.map → twisty-dynamic-3d-SIRF3JVR.js.map} +0 -0
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
normalize3x3x3Orientation,
|
|
4
4
|
puzzleOrientation3x3x3Cache,
|
|
5
5
|
puzzleOrientation3x3x3Idx
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-RUSWM2KK.js";
|
|
7
7
|
import {
|
|
8
8
|
KPattern
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-PSQEELP4.js";
|
|
10
10
|
|
|
11
11
|
// src/cubing/protocol/binary/orbit-indexing.ts
|
|
12
12
|
function identityPermutation(numElems) {
|
|
@@ -262,4 +262,4 @@ export {
|
|
|
262
262
|
bufferToSpacedHex,
|
|
263
263
|
spacedHexToBuffer
|
|
264
264
|
};
|
|
265
|
-
//# sourceMappingURL=chunk-
|
|
265
|
+
//# sourceMappingURL=chunk-ABQAUY7H.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Alg
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-7D7ZUWUK.js";
|
|
4
4
|
|
|
5
5
|
// src/cubing/search/inside/solve/parseSGS.ts
|
|
6
6
|
function parseSGS(kpuzzle, sgs) {
|
|
@@ -17,7 +17,7 @@ function parseSGS(kpuzzle, sgs) {
|
|
|
17
17
|
});
|
|
18
18
|
} else if (line.startsWith("SubgroupSizes ")) {
|
|
19
19
|
for (let j = 1; j < lineTokens.length; j++) {
|
|
20
|
-
subgroupSizes.push(parseInt(lineTokens[j]));
|
|
20
|
+
subgroupSizes.push(parseInt(lineTokens[j], 10));
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
23
|
}
|
|
@@ -86,4 +86,4 @@ function parseSGS(kpuzzle, sgs) {
|
|
|
86
86
|
export {
|
|
87
87
|
parseSGS
|
|
88
88
|
};
|
|
89
|
-
//# sourceMappingURL=chunk-
|
|
89
|
+
//# sourceMappingURL=chunk-AVOUJS6N.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/cubing/search/inside/solve/parseSGS.ts"],
|
|
4
|
+
"sourcesContent": ["import { Alg } from \"../../../alg\";\nimport type { KPuzzle, KTransformation } from \"../../../kpuzzle\";\n\ninterface PieceReference {\n orbitName: string;\n permutationIdx: number;\n}\n\nexport interface SGSAction {\n alg: Alg;\n transformation: KTransformation;\n}\n\nexport interface SGSCachedData {\n ordering: {\n pieceOrdering: PieceReference[];\n lookup: Record<string, SGSAction>;\n }[];\n}\n\nexport function parseSGS(kpuzzle: KPuzzle, sgs: string): SGSCachedData {\n const subgroupSizes: number[] = [];\n const sgsActions: SGSAction[] = [];\n for (const line of sgs.split(\"\\n\")) {\n const lineTokens = line.split(\" \");\n if (line.startsWith(\"SetOrder \")) {\n // ignore\n } else if (line.startsWith(\"Alg \")) {\n const alg = Alg.fromString(line.substring(4));\n sgsActions.push({\n alg: alg,\n transformation: kpuzzle.algToTransformation(alg),\n });\n } else if (line.startsWith(\"SubgroupSizes \")) {\n for (let j = 1; j < lineTokens.length; j++) {\n subgroupSizes.push(parseInt(lineTokens[j], 10));\n }\n }\n }\n\n const sgsCachedData: SGSCachedData = {\n ordering: new Array(subgroupSizes.length),\n };\n const subgroupAlgOffsets: number[] = [];\n let sum = 0;\n subgroupAlgOffsets.push(0);\n const emptyAlg = Alg.fromString(\"\");\n const identity = kpuzzle.identityTransformation();\n for (let i = 0; i < subgroupSizes.length; i++) {\n sum += subgroupSizes[i];\n subgroupAlgOffsets.push(sum);\n sgsActions.splice(sum - 1, 0, { alg: emptyAlg, transformation: identity });\n }\n if (sgsActions.length !== sum) {\n throw Error(\n `Bad sgs; expected ${sum - subgroupSizes.length} algs but saw ${\n sgsActions.length - subgroupSizes.length\n }`,\n );\n }\n const processedPieces: Record<string, boolean[]> = {};\n for (const orbitDefinition of kpuzzle.definition.orbits) {\n processedPieces[orbitDefinition.orbitName] = new Array(\n orbitDefinition.numPieces,\n ).fill(false);\n }\n for (let i = subgroupSizes.length - 1; i >= 0; i--) {\n const pieceOrdering: PieceReference[] = [];\n for (let j = subgroupAlgOffsets[i]; j < subgroupAlgOffsets[i + 1]; j++) {\n const transformation = sgsActions[j].transformation;\n for (const orbitDefinition of kpuzzle.definition.orbits) {\n for (let idx = 0; idx < orbitDefinition.numPieces; idx++) {\n if (\n transformation.transformationData[orbitDefinition.orbitName]\n .permutation[idx] !== idx ||\n transformation.transformationData[orbitDefinition.orbitName]\n .orientationDelta[idx] !== 0\n ) {\n if (!processedPieces[orbitDefinition.orbitName][idx]) {\n pieceOrdering.push({\n orbitName: orbitDefinition.orbitName,\n permutationIdx: idx,\n });\n processedPieces[orbitDefinition.orbitName][idx] = true;\n }\n }\n }\n }\n }\n const lookup: Record<string, SGSAction> = {};\n for (let j = subgroupAlgOffsets[i]; j < subgroupAlgOffsets[i + 1]; j++) {\n const transformation = sgsActions[j].transformation.invert();\n let key = \"\";\n for (let k = 0; k < pieceOrdering.length; k++) {\n const loc = pieceOrdering[k];\n key = `${key} ${\n transformation.transformationData[loc.orbitName].permutation[\n loc.permutationIdx\n ]\n } ${\n transformation.transformationData[loc.orbitName].orientationDelta[\n loc.permutationIdx\n ]\n }`;\n }\n lookup[key] = sgsActions[j];\n sgsActions[j].alg = sgsActions[j].alg.invert();\n sgsActions[j].transformation = sgsActions[j].transformation.invert();\n }\n sgsCachedData.ordering[i] = {\n pieceOrdering: pieceOrdering,\n lookup: lookup,\n };\n }\n return sgsCachedData;\n}\n"],
|
|
5
|
+
"mappings": ";;;;;AAoBO,SAAS,SAAS,SAAkB,KAA4B;AACrE,QAAM,gBAA0B,CAAC;AACjC,QAAM,aAA0B,CAAC;AACjC,aAAW,QAAQ,IAAI,MAAM,IAAI,GAAG;AAClC,UAAM,aAAa,KAAK,MAAM,GAAG;AACjC,QAAI,KAAK,WAAW,WAAW,GAAG;AAAA,IAElC,WAAW,KAAK,WAAW,MAAM,GAAG;AAClC,YAAM,MAAM,IAAI,WAAW,KAAK,UAAU,CAAC,CAAC;AAC5C,iBAAW,KAAK;AAAA,QACd;AAAA,QACA,gBAAgB,QAAQ,oBAAoB,GAAG;AAAA,MACjD,CAAC;AAAA,IACH,WAAW,KAAK,WAAW,gBAAgB,GAAG;AAC5C,eAAS,IAAI,GAAG,IAAI,WAAW,QAAQ,KAAK;AAC1C,sBAAc,KAAK,SAAS,WAAW,CAAC,GAAG,EAAE,CAAC;AAAA,MAChD;AAAA,IACF;AAAA,EACF;AAEA,QAAM,gBAA+B;AAAA,IACnC,UAAU,IAAI,MAAM,cAAc,MAAM;AAAA,EAC1C;AACA,QAAM,qBAA+B,CAAC;AACtC,MAAI,MAAM;AACV,qBAAmB,KAAK,CAAC;AACzB,QAAM,WAAW,IAAI,WAAW,EAAE;AAClC,QAAM,WAAW,QAAQ,uBAAuB;AAChD,WAAS,IAAI,GAAG,IAAI,cAAc,QAAQ,KAAK;AAC7C,WAAO,cAAc,CAAC;AACtB,uBAAmB,KAAK,GAAG;AAC3B,eAAW,OAAO,MAAM,GAAG,GAAG,EAAE,KAAK,UAAU,gBAAgB,SAAS,CAAC;AAAA,EAC3E;AACA,MAAI,WAAW,WAAW,KAAK;AAC7B,UAAM;AAAA,MACJ,qBAAqB,MAAM,c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ACN,CACF,IACE,eAAe,mBAAmB,IAAI,SAAS,EAAE,iBAC/C,IAAI,cACN,CACF;AAAA,MACF;AACA,aAAO,GAAG,IAAI,WAAW,CAAC;AAC1B,iBAAW,CAAC,EAAE,MAAM,WAAW,CAAC,EAAE,IAAI,OAAO;AAC7C,iBAAW,CAAC,EAAE,iBAAiB,WAAW,CAAC,EAAE,eAAe,OAAO;AAAA,IACrE;AACA,kBAAc,SAAS,CAAC,IAAI;AAAA,MAC1B;AAAA,MACA;AAAA,IACF;AAAA,EACF;AACA,SAAO;AACT;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -6,39 +6,7 @@ import {
|
|
|
6
6
|
} from "./chunk-RDSQRW3G.js";
|
|
7
7
|
import {
|
|
8
8
|
Alg
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
|
|
11
|
-
// src/cubing/search/inside/solve/puzzles/clock.ts
|
|
12
|
-
import { randomUIntBelow } from "random-uint-below";
|
|
13
|
-
var backMoves = ["U", "R", "D", "L", "ALL"];
|
|
14
|
-
var frontMoves = ["UR", "DR", "DL", "UL"].concat(backMoves);
|
|
15
|
-
function randomClockScrambleString() {
|
|
16
|
-
let filteringMoveCount = 0;
|
|
17
|
-
function randomSuffix() {
|
|
18
|
-
const amount = randomUIntBelow(12);
|
|
19
|
-
if (amount !== 0) {
|
|
20
|
-
filteringMoveCount++;
|
|
21
|
-
}
|
|
22
|
-
if (amount <= 6) {
|
|
23
|
-
return `${amount}+`;
|
|
24
|
-
} else {
|
|
25
|
-
return `${12 - amount}-`;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
const moves = [];
|
|
29
|
-
function side(families) {
|
|
30
|
-
for (const family of families) {
|
|
31
|
-
moves.push(`${family}${randomSuffix()}`);
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
side(frontMoves);
|
|
35
|
-
moves.push("y2");
|
|
36
|
-
side(backMoves);
|
|
37
|
-
if (filteringMoveCount < 2) {
|
|
38
|
-
return randomClockScrambleString();
|
|
39
|
-
}
|
|
40
|
-
return moves.join(" ");
|
|
41
|
-
}
|
|
9
|
+
} from "./chunk-7D7ZUWUK.js";
|
|
42
10
|
|
|
43
11
|
// src/cubing/vendor/apache/comlink-everywhere/outside/index.ts
|
|
44
12
|
import { wrap } from "comlink";
|
|
@@ -65,7 +33,7 @@ async function constructWorker(source, options) {
|
|
|
65
33
|
}
|
|
66
34
|
|
|
67
35
|
// src/cubing/search/worker-workarounds/index.ts
|
|
68
|
-
|
|
36
|
+
function searchWorkerURLImportMetaResolve() {
|
|
69
37
|
return import.meta.resolve("./search-worker-entry.js");
|
|
70
38
|
}
|
|
71
39
|
function searchWorkerURLNewURLImportMetaURL() {
|
|
@@ -204,36 +172,45 @@ async function instantiateWorkerImplementation() {
|
|
|
204
172
|
function failed(methodDescription) {
|
|
205
173
|
return `Module worker instantiation${methodDescription ? ` ${methodDescription}` : ""} failed`;
|
|
206
174
|
}
|
|
207
|
-
const
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
175
|
+
const importMetaResolveStrategy = [
|
|
176
|
+
async () => instantiateModuleWorker(searchWorkerURLImportMetaResolve()),
|
|
177
|
+
"using `import.meta.resolve(\u2026)",
|
|
178
|
+
null
|
|
179
|
+
];
|
|
180
|
+
const esbuildWorkaroundStrategy = [
|
|
181
|
+
async () => instantiateModuleWorker(await searchWorkerURLEsbuildWorkaround()),
|
|
182
|
+
"using the `esbuild` workaround",
|
|
183
|
+
// TODO: we will hopefully discontinue the `esbuild` workaround at some
|
|
184
|
+
// point, but `esbuild` has been stuck for 3 years on this issue. Because
|
|
185
|
+
// `esbuild` and Vite (which uses `esbuild`) are now dominating the
|
|
186
|
+
// ecosystem, this just causes a warning for a lot of devs/users that they
|
|
187
|
+
// can't do anything about. As frustrating as the situation is, the
|
|
188
|
+
// workaround is semantically fine (even if it's convoluted) and is
|
|
189
|
+
// preserved by `esbuild`-based flows in practice. So we suppress the
|
|
190
|
+
// warning in the medium-term but maintain long-term hope that we can
|
|
191
|
+
// remove it (and the other fallbacks as well).
|
|
192
|
+
null
|
|
193
|
+
];
|
|
194
|
+
const newURLStrategy = [
|
|
195
|
+
async () => instantiateModuleWorker(searchWorkerURLNewURLImportMetaURL()),
|
|
196
|
+
"using `new URL(\u2026, import.meta.url)`",
|
|
197
|
+
"will"
|
|
198
|
+
];
|
|
199
|
+
const inlineNewURLStrategy = [
|
|
200
|
+
instantiateModuleWorkerDirectlyForBrowser,
|
|
201
|
+
"using inline `new URL(\u2026, import.meta.url)`",
|
|
202
|
+
"may"
|
|
203
|
+
];
|
|
204
|
+
const fallbackOrder = searchOutsideDebugGlobals.prioritizeEsbuildWorkaroundForWorkerInstantiation ? [
|
|
205
|
+
esbuildWorkaroundStrategy,
|
|
206
|
+
importMetaResolveStrategy,
|
|
207
|
+
newURLStrategy,
|
|
208
|
+
inlineNewURLStrategy
|
|
209
|
+
] : [
|
|
210
|
+
importMetaResolveStrategy,
|
|
211
|
+
esbuildWorkaroundStrategy,
|
|
212
|
+
newURLStrategy,
|
|
213
|
+
inlineNewURLStrategy
|
|
237
214
|
];
|
|
238
215
|
for (const [fn, description, warnOnSuccess] of fallbackOrder) {
|
|
239
216
|
try {
|
|
@@ -258,19 +235,21 @@ function getCachedWorkerInstance() {
|
|
|
258
235
|
return cachedWorkerInstance ??= instantiateWorker();
|
|
259
236
|
}
|
|
260
237
|
async function randomScrambleForEvent(eventID) {
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
}
|
|
265
|
-
const prom = _randomScrambleStringForEvent(eventID);
|
|
266
|
-
const wat = await prom;
|
|
267
|
-
return Alg.fromString(wat);
|
|
238
|
+
const worker = searchOutsideDebugGlobals.forceNewWorkerForEveryScramble ? await instantiateWorker() : await getCachedWorkerInstance();
|
|
239
|
+
const scrambleString = await worker.insideAPI.randomScrambleStringForEvent(eventID);
|
|
240
|
+
return Alg.fromString(scrambleString);
|
|
268
241
|
}
|
|
269
|
-
async function
|
|
270
|
-
if (searchOutsideDebugGlobals.
|
|
242
|
+
async function deriveScrambleForEvent(derivationSeedHex, derivationSaltHierarchy, eventID) {
|
|
243
|
+
if (!searchOutsideDebugGlobals.allowDerivedScrambles) {
|
|
244
|
+
throw new Error("Derived scrambles are not allowed.");
|
|
271
245
|
}
|
|
272
246
|
const worker = searchOutsideDebugGlobals.forceNewWorkerForEveryScramble ? await instantiateWorker() : await getCachedWorkerInstance();
|
|
273
|
-
|
|
247
|
+
const scrambleString = await worker.insideAPI.deriveScrambleStringForEvent(
|
|
248
|
+
derivationSeedHex,
|
|
249
|
+
derivationSaltHierarchy,
|
|
250
|
+
eventID
|
|
251
|
+
);
|
|
252
|
+
return Alg.fromString(scrambleString);
|
|
274
253
|
}
|
|
275
254
|
async function experimentalSolve3x3x3IgnoringCenters(pattern) {
|
|
276
255
|
const cwi = await getCachedWorkerInstance();
|
|
@@ -329,7 +308,9 @@ var searchOutsideDebugGlobals = {
|
|
|
329
308
|
scramblePrefetchLevel: "auto",
|
|
330
309
|
disableStringWorker: false,
|
|
331
310
|
forceNewWorkerForEveryScramble: false,
|
|
332
|
-
showWorkerInstantiationWarnings: true
|
|
311
|
+
showWorkerInstantiationWarnings: true,
|
|
312
|
+
prioritizeEsbuildWorkaroundForWorkerInstantiation: false,
|
|
313
|
+
allowDerivedScrambles: false
|
|
333
314
|
};
|
|
334
315
|
function setSearchDebug(options) {
|
|
335
316
|
const { logPerf, scramblePrefetchLevel } = options;
|
|
@@ -345,19 +326,22 @@ function setSearchDebug(options) {
|
|
|
345
326
|
)
|
|
346
327
|
);
|
|
347
328
|
}
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
329
|
+
for (const booleanField of [
|
|
330
|
+
"disableStringWorker",
|
|
331
|
+
"forceNewWorkerForEveryScramble",
|
|
332
|
+
"showWorkerInstantiationWarnings",
|
|
333
|
+
"prioritizeEsbuildWorkaroundForWorkerInstantiation",
|
|
334
|
+
"allowDerivedScrambles"
|
|
335
|
+
]) {
|
|
336
|
+
if (booleanField in options) {
|
|
337
|
+
searchOutsideDebugGlobals[booleanField] = options[booleanField] ?? searchOutsideDebugGlobals[booleanField];
|
|
338
|
+
}
|
|
356
339
|
}
|
|
357
340
|
}
|
|
358
341
|
|
|
359
342
|
export {
|
|
360
343
|
randomScrambleForEvent,
|
|
344
|
+
deriveScrambleForEvent,
|
|
361
345
|
experimentalSolve3x3x3IgnoringCenters,
|
|
362
346
|
experimentalSolve2x2x2,
|
|
363
347
|
solveSkewb,
|
|
@@ -366,4 +350,4 @@ export {
|
|
|
366
350
|
solveTwsearch,
|
|
367
351
|
setSearchDebug
|
|
368
352
|
};
|
|
369
|
-
//# sourceMappingURL=chunk-
|
|
353
|
+
//# sourceMappingURL=chunk-I4OWC23M.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/cubing/vendor/apache/comlink-everywhere/outside/index.ts", "../../../../src/cubing/search/worker-workarounds/index.ts", "../../../../src/cubing/search/instantiator.ts", "../../../../src/cubing/search/outside.ts"],
|
|
4
|
+
"sourcesContent": ["import nodeEndpoint from \"../node-adapter\";\n\nexport { wrap } from \"comlink\";\n\nconst useNodeWorkarounds =\n typeof globalThis.Worker === \"undefined\" &&\n typeof (globalThis as any).WorkerNavigator === \"undefined\";\n\nasync function nodeWorker(\n source: string | URL,\n options?: { eval?: boolean },\n): Promise<Worker> {\n const { Worker: NodeWorker } = globalThis.process.getBuiltinModule(\n \"node:worker_threads\",\n );\n const worker = new NodeWorker(source, options);\n worker.unref();\n return nodeEndpoint(worker);\n}\n\nexport async function constructWorker(\n source: string | URL,\n options?: { type?: WorkerType },\n): Promise<Worker> {\n let worker: Worker;\n if (useNodeWorkarounds) {\n return nodeWorker(source);\n } else {\n worker = new globalThis.Worker(source, {\n type: options ? options.type : undefined, // TODO: Is it safe to use `options?.type`?\n });\n }\n return worker;\n}\n", "import { exposeAPI } from \"./worker-guard\";\n\nexport function searchWorkerURLImportMetaResolve(): string {\n // Note:\n // - We have to hardcode the expected path of the entry file in the ESM build, due to lack of `esbuild` support: https://github.com/evanw/esbuild/issues/2866\n // - This URL is based on the assumption that the code from this file ends up in a shared chunk in the `esm` build. This is not guaranteed by `esbuild`, but it consistently happens for our codebase.\n // - We inline the value (instead of using a constant), to maximize compatibility for hardcoded syntax detection in bundlers.\n return import.meta.resolve(\"./search-worker-entry.js\");\n}\n\nexport function searchWorkerURLNewURLImportMetaURL(): URL {\n // Note:\n // - We have to hardcode the expected path of the entry file in the ESM build, due to lack of `esbuild` support: https://github.com/evanw/esbuild/issues/795\n // - This URL is based on the assumption that the code from this file ends up in a shared chunk in the `esm` build. This is not guaranteed by `esbuild`, but it consistently happens for our codebase.\n // - We inline the value (instead of using a constant), to maximize compatibility for hardcoded syntax detection in bundlers.\n return new URL(\"./search-worker-entry.js\", import.meta.url);\n}\n\n// Workaround for `esbuild`: https://github.com/evanw/esbuild/issues/312#issuecomment-1092195778\nexport async function searchWorkerURLEsbuildWorkaround(): Promise<string> {\n exposeAPI.expose = false;\n return (await import(\"./search-worker-entry.js\")).WORKER_ENTRY_FILE_URL;\n}\n\nexport function instantiateSearchWorkerURLNewURLImportMetaURL(): Worker {\n return new Worker(new URL(\"./search-worker-entry.js\", import.meta.url), {\n type: \"module\",\n });\n}\n", "import {\n constructWorker,\n wrap,\n} from \"../vendor/apache/comlink-everywhere/outside\";\nimport type { WorkerInsideAPI } from \"./inside/api\";\nimport { searchOutsideDebugGlobals } from \"./outside\";\nimport {\n instantiateSearchWorkerURLNewURLImportMetaURL,\n searchWorkerURLEsbuildWorkaround,\n searchWorkerURLImportMetaResolve,\n searchWorkerURLNewURLImportMetaURL,\n} from \"./worker-workarounds\";\n\nexport interface WorkerOutsideAPI {\n terminate: () => void; // `node` can return a `Promise` with an exit code, but we match the web worker API.\n}\n\nexport interface InsideOutsideAPI {\n insideAPI: WorkerInsideAPI;\n outsideAPI: WorkerOutsideAPI;\n}\n\nfunction probablyCrossOrigin(workerEntryFileURL: URL): boolean {\n try {\n const scriptOrigin = globalThis.location?.origin;\n const workerOrigin = workerEntryFileURL.origin;\n return !!scriptOrigin && !!workerOrigin && scriptOrigin !== workerOrigin;\n } catch {\n return false;\n }\n}\n\nasync function instantiateModuleWorker(\n workerEntryFileURL: string | URL,\n): Promise<InsideOutsideAPI> {\n // We need the `import.meta.url` base for `bun`.\n const url = new URL(workerEntryFileURL, import.meta.url);\n const tryTrampolineFirst = probablyCrossOrigin(url);\n try {\n return instantiateModuleWorkerAttempt(url, tryTrampolineFirst);\n } catch {\n return instantiateModuleWorkerAttempt(url, !tryTrampolineFirst);\n }\n}\n\ninterface BunWorker extends Worker {\n unref?: () => void;\n}\n\nasync function instantiateModuleWorkerAttempt(\n workerEntryFileURL: URL,\n crossOriginTrampoline: boolean,\n): Promise<InsideOutsideAPI> {\n // biome-ignore lint/suspicious/noAsyncPromiseExecutor: TODO\n return new Promise<InsideOutsideAPI>(async (resolve, reject) => {\n try {\n if (!workerEntryFileURL) {\n reject(new Error(\"Could not get worker entry file URL.\"));\n }\n let url: URL = workerEntryFileURL;\n if (crossOriginTrampoline) {\n // Standard browser-like environment.\n const importSrc = `import ${JSON.stringify(\n workerEntryFileURL.toString(),\n )};`;\n const blob = new Blob([importSrc], {\n type: \"text/javascript\",\n });\n url = new URL(URL.createObjectURL(blob));\n }\n\n const worker = (await constructWorker(url, {\n type: \"module\",\n })) as Worker & {\n nodeWorker?: import(\"worker_threads\").Worker;\n } & BunWorker;\n\n worker.unref?.(); // Unref in `bun`.\n\n const onError = (e: ErrorEvent) => {\n reject(e);\n };\n\n // TODO: Remove this once we can remove the workarounds for lack of `import.meta.resolve(\u2026)` support.\n const onFirstMessage = (messageData: string) => {\n if (messageData === \"comlink-exposed\") {\n // We need to clear the timeout so that we don't prevent `node` from exiting in the meantime.\n resolve(wrapWithTerminate(worker));\n } else {\n reject(\n new Error(`wrong module instantiation message ${messageData}`),\n );\n }\n };\n\n if (worker.nodeWorker) {\n // We have to use `once` so the `unref()` from `comlink-everywhere` allows the process to quit as expected.\n worker.nodeWorker.once(\"message\", onFirstMessage);\n } else {\n worker.addEventListener(\"error\", onError, {\n once: true,\n });\n worker.addEventListener(\"message\", (e) => onFirstMessage(e.data), {\n once: true,\n });\n }\n } catch (e) {\n reject(e);\n }\n });\n}\n\n// Maybe some day if we work really hard, this code path can work:\n// - in `node` (https://github.com/nodejs/node/issues/43583#issuecomment-1540025755)\n// - for CDNs (https://github.com/tc39/proposal-module-expressions or https://github.com/whatwg/html/issues/6911)\nexport async function instantiateModuleWorkerDirectlyForBrowser(): Promise<InsideOutsideAPI> {\n // biome-ignore lint/suspicious/noAsyncPromiseExecutor: TODO\n return new Promise<InsideOutsideAPI>(async (resolve, reject) => {\n try {\n const worker = instantiateSearchWorkerURLNewURLImportMetaURL();\n\n const onError = (e: ErrorEvent) => {\n reject(e);\n };\n\n // TODO: Remove this once we can remove the workarounds for lack of `import.meta.resolve(\u2026)` support.\n const onFirstMessage = (messageData: string) => {\n if (messageData === \"comlink-exposed\") {\n // We need to clear the timeout so that we don't prevent `node` from exiting in the meantime.\n resolve(wrapWithTerminate(worker));\n } else {\n reject(\n new Error(`wrong module instantiation message ${messageData}`),\n );\n }\n };\n\n worker.addEventListener(\"error\", onError, {\n once: true,\n });\n worker.addEventListener(\"message\", (e) => onFirstMessage(e.data), {\n once: true,\n });\n } catch (e) {\n reject(e);\n }\n });\n}\n\nfunction wrapWithTerminate(worker: Worker): InsideOutsideAPI {\n const insideAPI = wrap<WorkerInsideAPI>(worker);\n const terminate = worker.terminate.bind(worker);\n return { insideAPI, outsideAPI: { terminate } };\n}\n\nexport const allInsideOutsideAPIPromises: Promise<InsideOutsideAPI>[] = [];\n\nexport async function instantiateWorker(): Promise<InsideOutsideAPI> {\n const insideOutsideAPIPromise = instantiateWorkerImplementation();\n allInsideOutsideAPIPromises.push(insideOutsideAPIPromise);\n const { insideAPI } = await insideOutsideAPIPromise;\n insideAPI.setDebugMeasurePerf(searchOutsideDebugGlobals.logPerf);\n insideAPI.setScramblePrefetchLevel(\n searchOutsideDebugGlobals.scramblePrefetchLevel,\n );\n return insideOutsideAPIPromise;\n}\n\nexport async function mapToAllWorkers(\n f: (worker: InsideOutsideAPI) => void,\n): Promise<void> {\n await Promise.all(\n allInsideOutsideAPIPromises.map((worker) => worker.then(f)),\n );\n}\n\ntype FallbackStrategyInfo = [\n fn: () => Promise<InsideOutsideAPI>,\n description: string,\n warnOnSuccess: null | string,\n];\n\nasync function instantiateWorkerImplementation(): Promise<InsideOutsideAPI> {\n if (globalThis.location?.protocol === \"file:\") {\n console.warn(\n \"This current web page is loaded from the local filesystem (a URL that starts with `file://`). In this situation, `cubing.js` may be unable to generate scrambles or perform searches in some browsers. See: https://js.cubing.net/cubing/scramble/#file-server-required\",\n );\n }\n\n function failed(methodDescription?: string) {\n return `Module worker instantiation${\n methodDescription ? ` ${methodDescription}` : \"\"\n } failed`;\n }\n\n const importMetaResolveStrategy: FallbackStrategyInfo = [\n async () => instantiateModuleWorker(searchWorkerURLImportMetaResolve()),\n \"using `import.meta.resolve(\u2026)\",\n null,\n ];\n const esbuildWorkaroundStrategy: FallbackStrategyInfo = [\n async () =>\n instantiateModuleWorker(await searchWorkerURLEsbuildWorkaround()),\n \"using the `esbuild` workaround\",\n // TODO: we will hopefully discontinue the `esbuild` workaround at some\n // point, but `esbuild` has been stuck for 3 years on this issue. Because\n // `esbuild` and Vite (which uses `esbuild`) are now dominating the\n // ecosystem, this just causes a warning for a lot of devs/users that they\n // can't do anything about. As frustrating as the situation is, the\n // workaround is semantically fine (even if it's convoluted) and is\n // preserved by `esbuild`-based flows in practice. So we suppress the\n // warning in the medium-term but maintain long-term hope that we can\n // remove it (and the other fallbacks as well).\n null,\n ];\n const newURLStrategy: FallbackStrategyInfo = [\n async () => instantiateModuleWorker(searchWorkerURLNewURLImportMetaURL()),\n \"using `new URL(\u2026, import.meta.url)`\",\n \"will\",\n ];\n const inlineNewURLStrategy: FallbackStrategyInfo = [\n instantiateModuleWorkerDirectlyForBrowser,\n \"using inline `new URL(\u2026, import.meta.url)`\",\n \"may\",\n ];\n\n const fallbackOrder: FallbackStrategyInfo[] =\n searchOutsideDebugGlobals.prioritizeEsbuildWorkaroundForWorkerInstantiation\n ? [\n esbuildWorkaroundStrategy,\n importMetaResolveStrategy,\n newURLStrategy,\n inlineNewURLStrategy,\n ]\n : [\n importMetaResolveStrategy,\n esbuildWorkaroundStrategy,\n newURLStrategy,\n inlineNewURLStrategy,\n ];\n\n for (const [fn, description, warnOnSuccess] of fallbackOrder) {\n try {\n const worker = await fn();\n if (warnOnSuccess) {\n if (searchOutsideDebugGlobals.showWorkerInstantiationWarnings) {\n console.warn(\n `Module worker instantiation required ${description}. \\`cubing.js\\` ${warnOnSuccess} not support this fallback in the future.`,\n );\n }\n }\n return worker;\n } catch {\n // if (searchOutsideDebugGlobals.showWorkerInstantiationWarnings) {\n // console.warn(`${failed(description)}, falling back.`);\n // }\n }\n }\n\n throw new Error(`${failed()}. There are no more fallbacks available.`);\n}\n", "import { Alg } from \"../alg\";\nimport type { KPuzzle } from \"../kpuzzle\";\n// import { preInitialize222 } from \"../implementations/2x2x2\";\nimport type { KPattern } from \"../kpuzzle/KPattern\";\nimport type { PrefetchLevel } from \"./inside/api\";\nimport type { TwsearchOptions } from \"./inside/solve/twsearch\";\nimport {\n type InsideOutsideAPI,\n instantiateWorker,\n mapToAllWorkers,\n} from \"./instantiator\";\n\nlet cachedWorkerInstance: Promise<InsideOutsideAPI> | undefined;\nfunction getCachedWorkerInstance(): Promise<InsideOutsideAPI> {\n return (cachedWorkerInstance ??= instantiateWorker());\n}\n\n// Pre-initialize the scrambler for the given event. (Otherwise, an event is\n// initialized the first time you ask for a scramble for that event.)\n//\n// Some typical numbers for a fast computer:\n// - 3x3x3 initialization: 200ms\n// - Each 3x3x3 scramble: 50ms\n// - 4x4x4 initialization: 2500ms\n// - Each 4x4x4 scramble: 300ms to 800ms\n//\n// It is safe to immediately call for a scramble\n// any time after starting pre-initialization, or to call for them without\n// pre-initializing. Pre-initializing essentially gives the scramble worker a\n// head start in case a scramble doesn't get requested immediately.\n//\n// Note that events cannot be pre-initialized in parallel. Attempting to\n// pre-initialize multiple events will initialize them consecutively. Scrambles\n// for a given event cannot be computed while another event is being initialized.\nexport function _preInitializationHintForEvent(\n eventID: string,\n // callback?: () => void\n): void {\n switch (eventID) {\n case \"333oh\":\n _preInitializationHintForEvent(\"333\");\n return;\n }\n (async () => {\n await (await getCachedWorkerInstance()).insideAPI.initialize(eventID);\n })();\n}\n\nexport async function randomScrambleForEvent(eventID: string): Promise<Alg> {\n const worker = searchOutsideDebugGlobals.forceNewWorkerForEveryScramble\n ? await instantiateWorker()\n : await getCachedWorkerInstance();\n const scrambleString =\n await worker.insideAPI.randomScrambleStringForEvent(eventID);\n return Alg.fromString(scrambleString);\n}\n\nexport async function deriveScrambleForEvent(\n derivationSeedHex: string,\n derivationSaltHierarchy: string[],\n eventID: string,\n): Promise<Alg> {\n if (!searchOutsideDebugGlobals.allowDerivedScrambles) {\n throw new Error(\"Derived scrambles are not allowed.\");\n }\n const worker = searchOutsideDebugGlobals.forceNewWorkerForEveryScramble\n ? await instantiateWorker()\n : await getCachedWorkerInstance();\n const scrambleString = await worker.insideAPI.deriveScrambleStringForEvent(\n derivationSeedHex,\n derivationSaltHierarchy,\n eventID,\n );\n return Alg.fromString(scrambleString);\n}\n\nexport async function experimentalSolve3x3x3IgnoringCenters(\n pattern: KPattern,\n): Promise<Alg> {\n const cwi = await getCachedWorkerInstance();\n return Alg.fromString(\n await cwi.insideAPI.solve333ToString(pattern.patternData),\n );\n}\n\nexport async function experimentalSolve2x2x2(pattern: KPattern): Promise<Alg> {\n const cwi = await getCachedWorkerInstance();\n return Alg.fromString(\n await cwi.insideAPI.solve222ToString(pattern.patternData),\n );\n}\n\nexport async function solveSkewb(pattern: KPattern): Promise<Alg> {\n const cwi = await getCachedWorkerInstance();\n return Alg.fromString(\n await cwi.insideAPI.solveSkewbToString(pattern.patternData),\n );\n}\n\nexport async function solvePyraminx(pattern: KPattern): Promise<Alg> {\n const cwi = await getCachedWorkerInstance();\n return Alg.fromString(\n await cwi.insideAPI.solvePyraminxToString(pattern.patternData),\n );\n}\n\nexport async function solveMegaminx(pattern: KPattern): Promise<Alg> {\n const cwi = await getCachedWorkerInstance();\n return Alg.fromString(\n await cwi.insideAPI.solveMegaminxToString(pattern.patternData),\n );\n}\n\nexport interface SolveTwsearchOptions {\n generatorMoves?: string[];\n targetPattern?: KPattern;\n minDepth?: number;\n maxDepth?: number;\n}\n\nexport async function solveTwsearch(\n kpuzzle: KPuzzle,\n pattern: KPattern,\n options?: SolveTwsearchOptions,\n): Promise<Alg> {\n const { targetPattern, ...otherOptions } = options ?? {};\n const apiOptions: TwsearchOptions = otherOptions;\n if (targetPattern) {\n apiOptions.targetPattern = targetPattern.patternData;\n }\n const { ...def } = kpuzzle.definition;\n delete def.experimentalIsPatternSolved;\n // delete def.derivedMoves;\n const dedicatedWorker = await instantiateWorker();\n try {\n return Alg.fromString(\n await dedicatedWorker.insideAPI.solveTwsearchToString(\n def,\n pattern.patternData,\n apiOptions,\n ),\n );\n } finally {\n console.log(\"Search ended, terminating dedicated `twsearch` worker.\");\n // TODO: support re-using the same worker for multiple searches..\n await dedicatedWorker.outsideAPI.terminate();\n }\n}\n\ninterface SearchOutsideDebugGlobals {\n logPerf: boolean;\n scramblePrefetchLevel: `${PrefetchLevel}`;\n disableStringWorker: boolean;\n forceNewWorkerForEveryScramble: boolean;\n showWorkerInstantiationWarnings: boolean;\n // This can prevent a request to `search-worker-entry.js` when it doesn't exist, if the library semantics have been mangled by `esbuild`.\n prioritizeEsbuildWorkaroundForWorkerInstantiation: boolean;\n allowDerivedScrambles: boolean;\n}\n\nexport const searchOutsideDebugGlobals: SearchOutsideDebugGlobals = {\n logPerf: true,\n scramblePrefetchLevel: \"auto\",\n disableStringWorker: false,\n forceNewWorkerForEveryScramble: false,\n showWorkerInstantiationWarnings: true,\n prioritizeEsbuildWorkaroundForWorkerInstantiation: false,\n allowDerivedScrambles: false,\n};\n\nexport function setSearchDebug(\n options: Partial<SearchOutsideDebugGlobals>,\n): void {\n const { logPerf, scramblePrefetchLevel } = options;\n if (typeof logPerf !== \"undefined\") {\n searchOutsideDebugGlobals.logPerf = logPerf;\n mapToAllWorkers((worker) => worker.insideAPI.setDebugMeasurePerf(logPerf));\n }\n if (typeof scramblePrefetchLevel !== \"undefined\") {\n searchOutsideDebugGlobals.scramblePrefetchLevel = scramblePrefetchLevel;\n mapToAllWorkers((worker) =>\n worker.insideAPI.setScramblePrefetchLevel(\n scramblePrefetchLevel as PrefetchLevel,\n ),\n );\n }\n for (const booleanField of [\n \"disableStringWorker\",\n \"forceNewWorkerForEveryScramble\",\n \"showWorkerInstantiationWarnings\",\n \"prioritizeEsbuildWorkaroundForWorkerInstantiation\",\n \"allowDerivedScrambles\",\n ] as const) {\n if (booleanField in options) {\n searchOutsideDebugGlobals[booleanField] =\n options[booleanField] ?? searchOutsideDebugGlobals[booleanField];\n }\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;AAEA,SAAS,YAAY;AAErB,IAAM,qBACJ,OAAO,WAAW,WAAW,eAC7B,OAAQ,WAAmB,oBAAoB;AAEjD,eAAe,WACb,QACA,SACiB;AACjB,QAAM,EAAE,QAAQ,WAAW,IAAI,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AE;AACA,YAAQ,IAAI,wDAAwD;AAEpE,UAAM,gBAAgB,WAAW,UAAU;AAAA,EAC7C;AACF;AAaO,IAAM,4BAAuD;AAAA,EAClE,SAAS;AAAA,EACT,uBAAuB;AAAA,EACvB,qBAAqB;AAAA,EACrB,gCAAgC;AAAA,EAChC,iCAAiC;AAAA,EACjC,mDAAmD;AAAA,EACnD,uBAAuB;AACzB;AAEO,SAAS,eACd,SACM;AACN,QAAM,EAAE,SAAS,sBAAsB,IAAI;AAC3C,MAAI,OAAO,YAAY,aAAa;AAClC,8BAA0B,UAAU;AACpC,oBAAgB,CAAC,WAAW,OAAO,UAAU,oBAAoB,OAAO,CAAC;AAAA,EAC3E;AACA,MAAI,OAAO,0BAA0B,aAAa;AAChD,8BAA0B,wBAAwB;AAClD;AAAA,MAAgB,CAAC,WACf,OAAO,UAAU;AAAA,QACf;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACA,aAAW,gBAAgB;AAAA,IACzB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,GAAY;AACV,QAAI,gBAAgB,SAAS;AAC3B,gCAA0B,YAAY,IACpC,QAAQ,YAAY,KAAK,0BAA0B,YAAY;AAAA,IACnE;AAAA,EACF;AACF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
puzzles
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-WIZJQ7QS.js";
|
|
4
4
|
import {
|
|
5
5
|
from
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-RUSWM2KK.js";
|
|
7
7
|
import {
|
|
8
8
|
KPattern
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-PSQEELP4.js";
|
|
10
10
|
import {
|
|
11
11
|
Alg,
|
|
12
12
|
AlgBuilder,
|
|
13
13
|
Move
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-7D7ZUWUK.js";
|
|
15
15
|
|
|
16
16
|
// src/cubing/search/inside/solve/puzzles/3x3x3/index.ts
|
|
17
17
|
import { randomChoice as randomChoice2 } from "random-uint-below";
|
|
@@ -44,7 +44,7 @@ function addOrientationSuffix(alg, suffixSpec) {
|
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
// src/cubing/search/inside/solve/puzzles/dynamic/3x3x3/index.ts
|
|
47
|
-
var dynamic3x3x3min2phase = from(() => import("./search-dynamic-solve-3x3x3-
|
|
47
|
+
var dynamic3x3x3min2phase = from(() => import("./search-dynamic-solve-3x3x3-B2L4IN34.js"));
|
|
48
48
|
|
|
49
49
|
// src/cubing/search/inside/solve/puzzles/3x3x3/convert.ts
|
|
50
50
|
var reidEdgeOrder = "UF UR UB UL DF DR DB DL FR FL BR BL".split(" ");
|
|
@@ -602,4 +602,4 @@ export {
|
|
|
602
602
|
initialize333,
|
|
603
603
|
random333OrientedScramble
|
|
604
604
|
};
|
|
605
|
-
//# sourceMappingURL=chunk-
|
|
605
|
+
//# sourceMappingURL=chunk-OJI4YUWF.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
Move,
|
|
4
4
|
TraversalDownUp,
|
|
5
5
|
functionFromTraversal
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-7D7ZUWUK.js";
|
|
7
7
|
|
|
8
8
|
// src/cubing/kpuzzle/combine.ts
|
|
9
9
|
function combineTransformationData(definition, transformationData1, transformationData2) {
|
|
@@ -657,4 +657,4 @@ export {
|
|
|
657
657
|
KPattern,
|
|
658
658
|
KPuzzle
|
|
659
659
|
};
|
|
660
|
-
//# sourceMappingURL=chunk-
|
|
660
|
+
//# sourceMappingURL=chunk-PSQEELP4.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// src/cubing/vendor/mpl/twsearch/chunks/chunk-
|
|
1
|
+
// src/cubing/vendor/mpl/twsearch/chunks/chunk-SGKLIGZK.js
|
|
2
2
|
var __toBinary = /* @__PURE__ */ (() => {
|
|
3
3
|
var table = new Uint8Array(128);
|
|
4
4
|
for (var i = 0; i < 64; i++) table[i < 26 ? i + 65 : i < 52 ? i + 71 : i < 62 ? i - 4 : i * 4 - 205] = i;
|
|
@@ -18,4 +18,4 @@ var __toBinary = /* @__PURE__ */ (() => {
|
|
|
18
18
|
export {
|
|
19
19
|
__toBinary
|
|
20
20
|
};
|
|
21
|
-
//# sourceMappingURL=chunk-
|
|
21
|
+
//# sourceMappingURL=chunk-QDEGPHPS.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/cubing/vendor/mpl/twsearch/chunks/chunk-SGKLIGZK.js"],
|
|
4
|
+
"sourcesContent": ["// @ts-nocheck\n\n// Generated from `twsearch` v0.9.0\nvar __toBinary = /* @__PURE__ */ (() => {\n var table = new Uint8Array(128);\n for (var i = 0; i < 64; i++) table[i < 26 ? i + 65 : i < 52 ? i + 71 : i < 62 ? i - 4 : i * 4 - 205] = i;\n return (base64) => {\n var n = base64.length, bytes = new Uint8Array((n - (base64[n - 1] == \"=\") - (base64[n - 2] == \"=\")) * 3 / 4 | 0);\n for (var i2 = 0, j = 0; i2 < n; ) {\n var c0 = table[base64.charCodeAt(i2++)], c1 = table[base64.charCodeAt(i2++)];\n var c2 = table[base64.charCodeAt(i2++)], c3 = table[base64.charCodeAt(i2++)];\n bytes[j++] = c0 << 2 | c1 >> 4;\n bytes[j++] = c1 << 4 | c2 >> 2;\n bytes[j++] = c2 << 6 | c3;\n }\n return bytes;\n };\n})();\n\nexport {\n __toBinary\n};\n//# sourceMappingURL=chunk-SGKLIGZK.js.map\n"],
|
|
5
|
+
"mappings": ";AAGA,IAAI,aAA8B,uBAAM;AACtC,MAAI,QAAQ,IAAI,WAAW,GAAG;AAC9B,WAAS,IAAI,GAAG,IAAI,IAAI,IAAK,OAAM,IAAI,KAAK,IAAI,KAAK,IAAI,KAAK,IAAI,KAAK,IAAI,KAAK,IAAI,IAAI,IAAI,IAAI,GAAG,IAAI;AACvG,SAAO,CAAC,WAAW;AACjB,QAAI,IAAI,OAAO,QAAQ,QAAQ,IAAI,YAAY,KAAK,OAAO,IAAI,CAAC,KAAK,QAAQ,OAAO,IAAI,CAAC,KAAK,QAAQ,IAAI,IAAI,CAAC;AAC/G,aAAS,KAAK,GAAG,IAAI,GAAG,KAAK,KAAK;AAChC,UAAI,KAAK,MAAM,OAAO,WAAW,IAAI,CAAC,GAAG,KAAK,MAAM,OAAO,WAAW,IAAI,CAAC;AAC3E,UAAI,KAAK,MAAM,OAAO,WAAW,IAAI,CAAC,GAAG,KAAK,MAAM,OAAO,WAAW,IAAI,CAAC;AAC3E,YAAM,GAAG,IAAI,MAAM,IAAI,MAAM;AAC7B,YAAM,GAAG,IAAI,MAAM,IAAI,MAAM;AAC7B,YAAM,GAAG,IAAI,MAAM,IAAI;AAAA,IACzB;AACA,WAAO;AAAA,EACT;AACF,GAAG;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
KPattern,
|
|
3
3
|
KPuzzle
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-PSQEELP4.js";
|
|
5
5
|
import {
|
|
6
6
|
Alg,
|
|
7
7
|
Commutator,
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
QuantumMove,
|
|
12
12
|
TraversalDownUp,
|
|
13
13
|
functionFromTraversal
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-7D7ZUWUK.js";
|
|
15
15
|
|
|
16
16
|
// src/cubing/vendor/mit/p-lazy/p-lazy.ts
|
|
17
17
|
var PLazy = class _PLazy extends Promise {
|
|
@@ -324,6 +324,7 @@ var experimentalStickerings = {
|
|
|
324
324
|
"6x6x6": "Reduction"
|
|
325
325
|
}
|
|
326
326
|
},
|
|
327
|
+
OBL: { groups: { "2x2x2": "General" } },
|
|
327
328
|
PBL: {
|
|
328
329
|
groups: {
|
|
329
330
|
"2x2x2": "Ortega"
|
|
@@ -738,6 +739,13 @@ async function cubeLikePuzzleStickering(puzzleLoader, stickering) {
|
|
|
738
739
|
);
|
|
739
740
|
break;
|
|
740
741
|
}
|
|
742
|
+
case "OBL": {
|
|
743
|
+
puzzleStickering.set(
|
|
744
|
+
m.or(m.moves(["U", "D"])),
|
|
745
|
+
"IgnoreNonPrimary" /* IgnoreNonPrimary */
|
|
746
|
+
);
|
|
747
|
+
break;
|
|
748
|
+
}
|
|
741
749
|
default:
|
|
742
750
|
console.warn(
|
|
743
751
|
`Unsupported stickering for ${puzzleLoader.id}: ${stickering}. Setting all pieces to dim.`
|
|
@@ -1393,7 +1401,7 @@ var experimental3x3x3KPuzzle = new KPuzzle(
|
|
|
1393
1401
|
);
|
|
1394
1402
|
cube3x3x3KPuzzleDefinition.experimentalIsPatternSolved = experimentalIs3x3x3Solved;
|
|
1395
1403
|
var bigCubePuzzleOrientation = getCached(
|
|
1396
|
-
() => import("./big-puzzle-orientation-
|
|
1404
|
+
() => import("./big-puzzle-orientation-3GQ3L26S.js")
|
|
1397
1405
|
);
|
|
1398
1406
|
|
|
1399
1407
|
// src/cubing/puzzles/implementations/3x3x3/cube3x3x3KeyMapping.ts
|
|
@@ -1754,4 +1762,4 @@ export {
|
|
|
1754
1762
|
PGPuzzleLoader,
|
|
1755
1763
|
CubePGPuzzleLoader
|
|
1756
1764
|
};
|
|
1757
|
-
//# sourceMappingURL=chunk-
|
|
1765
|
+
//# sourceMappingURL=chunk-RUSWM2KK.js.map
|