cubing 0.25.14 → 0.26.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/esm/{2x2x2.sgs.json-EFZFDZSW.js → 2x2x2.sgs.json-2TQNXTEF.js} +2 -2
- package/dist/esm/{2x2x2.sgs.json-EFZFDZSW.js.map → 2x2x2.sgs.json-2TQNXTEF.js.map} +0 -0
- package/dist/esm/{3d-dynamic-BOMV4HRU.js → 3d-dynamic-DBLQHCS5.js} +3 -3
- package/dist/esm/{3d-dynamic-BOMV4HRU.js.map → 3d-dynamic-DBLQHCS5.js.map} +0 -0
- package/dist/esm/{444-solver-EWF7OHAQ.js → 444-solver-YC3E4W2L.js} +3 -3
- package/dist/esm/{444-solver-EWF7OHAQ.js.map → 444-solver-YC3E4W2L.js.map} +0 -0
- package/dist/esm/bluetooth/index.js +1 -1
- package/dist/esm/{chunk-ZII44VO5.js → chunk-3MBTISUG.js} +2 -2
- package/dist/esm/{chunk-ZII44VO5.js.map → chunk-3MBTISUG.js.map} +0 -0
- package/dist/esm/{chunk-QYQUT5N5.js → chunk-3YHGF72G.js} +1 -1
- package/dist/esm/{chunk-QYQUT5N5.js.map → chunk-3YHGF72G.js.map} +0 -0
- package/dist/esm/{chunk-KIVNYU5K.js → chunk-BH3AI6DL.js} +2 -2
- package/dist/esm/{chunk-KIVNYU5K.js.map → chunk-BH3AI6DL.js.map} +0 -0
- package/dist/esm/{chunk-74BT3ZNM.js → chunk-IEI2CWII.js} +2 -2
- package/dist/esm/{chunk-74BT3ZNM.js.map → chunk-IEI2CWII.js.map} +0 -0
- package/dist/esm/{chunk-AWBXZ43I.js → chunk-KCKHYE6N.js} +2 -2
- package/dist/esm/{chunk-AWBXZ43I.js.map → chunk-KCKHYE6N.js.map} +0 -0
- package/dist/esm/{chunk-XA4PIJ26.js → chunk-OOTCOZEV.js} +3 -3
- package/dist/esm/{chunk-XA4PIJ26.js.map → chunk-OOTCOZEV.js.map} +0 -0
- package/dist/esm/{chunk-AT7N3AOZ.js → chunk-OQ56YI7H.js} +2 -1
- package/dist/esm/chunk-OQ56YI7H.js.map +7 -0
- package/dist/esm/{chunk-EQO3X3CR.js → chunk-OUSRVS3Y.js} +2 -2
- package/dist/esm/{chunk-EQO3X3CR.js.map → chunk-OUSRVS3Y.js.map} +0 -0
- package/dist/esm/{fto.dynamic-SV2AUQBH.js → fto.dynamic-3LJUL35Q.js} +2 -2
- package/dist/esm/{fto.dynamic-SV2AUQBH.js.map → fto.dynamic-3LJUL35Q.js.map} +0 -0
- package/dist/esm/{megaminx.sgs.json-2JJOMDGZ.js → megaminx.sgs.json-746K2ZJG.js} +3 -3
- package/dist/esm/{megaminx.sgs.json-2JJOMDGZ.js.map → megaminx.sgs.json-746K2ZJG.js.map} +0 -0
- package/dist/esm/puzzle-geometry/index.js +1 -1
- package/dist/esm/puzzles/index.js +1 -1
- package/dist/esm/{pyraminx.sgs.json-53OXF5I4.js → pyraminx.sgs.json-G2OWNIDF.js} +3 -3
- package/dist/esm/{pyraminx.sgs.json-53OXF5I4.js.map → pyraminx.sgs.json-G2OWNIDF.js.map} +0 -0
- package/dist/esm/scramble/index.js +3 -3
- package/dist/esm/search/index.js +3 -3
- package/dist/esm/{search-worker-js-entry-Z6HIC5BI.js → search-worker-js-entry-RSHPVUYJ.js} +13 -13
- package/dist/esm/{search-worker-js-entry-Z6HIC5BI.js.map → search-worker-js-entry-RSHPVUYJ.js.map} +0 -0
- package/dist/esm/{search-worker-ts-entry-PS4HBLXL.js → search-worker-ts-entry-O7OQ4BT5.js} +2 -2
- package/dist/esm/{search-worker-ts-entry-PS4HBLXL.js.map → search-worker-ts-entry-O7OQ4BT5.js.map} +0 -0
- package/dist/esm/{skewb.sgs.json-3EF2HRKU.js → skewb.sgs.json-DUKJ2AF5.js} +3 -3
- package/dist/esm/{skewb.sgs.json-3EF2HRKU.js.map → skewb.sgs.json-DUKJ2AF5.js.map} +0 -0
- package/dist/esm/twisty/index.js +2 -2
- package/dist/esm/{worker-inside-generated-string-NGQ24QDC.js → worker-inside-generated-string-J4XQMLW2.js} +2 -2
- package/dist/esm/worker-inside-generated-string-J4XQMLW2.js.map +7 -0
- package/dist/types/.DS_Store +0 -0
- package/dist/types/Alg-6f3dc52c.d.ts +278 -0
- package/dist/types/KPuzzleDefinition-8531b592.d.ts +349 -0
- package/dist/types/KState-ba36d9a3.d.ts +70 -0
- package/dist/types/PuzzleLoader-a7faf593.d.ts +172 -0
- package/dist/types/alg/index.d.ts +49 -13
- package/dist/types/bluetooth/index.d.ts +147 -11
- package/dist/types/{bluetooth/smart-puzzle/bluetooth-puzzle.d.ts → bluetooth-puzzle-bc1a5264.d.ts} +14 -8
- package/dist/types/kpuzzle/index.d.ts +8 -6
- package/dist/types/notation/index.d.ts +8 -2
- package/dist/types/outside-d6602f71.d.ts +22 -0
- package/dist/types/parse-6d363160.d.ts +9 -0
- package/dist/types/protocol/index.d.ts +26 -4
- package/dist/types/puzzle-geometry/index.d.ts +7 -6
- package/dist/types/puzzles/index.d.ts +29 -12
- package/dist/types/scramble/index.d.ts +4 -1
- package/dist/types/search/index.d.ts +8 -2
- package/dist/types/stream/index.d.ts +57 -3
- package/dist/types/twisty/index.d.ts +1025 -16
- package/package.json +4 -2
- package/dist/esm/chunk-AT7N3AOZ.js.map +0 -7
- package/dist/esm/worker-inside-generated-string-NGQ24QDC.js.map +0 -7
- package/dist/types/alg/Alg.d.ts +0 -118
- package/dist/types/alg/Alg.spec.d.ts +0 -1
- package/dist/types/alg/AlgBuilder.d.ts +0 -11
- package/dist/types/alg/Serializable.d.ts +0 -0
- package/dist/types/alg/common.d.ts +0 -19
- package/dist/types/alg/debug.d.ts +0 -4
- package/dist/types/alg/example.d.ts +0 -14
- package/dist/types/alg/is.d.ts +0 -4
- package/dist/types/alg/iteration.d.ts +0 -9
- package/dist/types/alg/keyboard.d.ts +0 -2
- package/dist/types/alg/limits.d.ts +0 -4
- package/dist/types/alg/operation.d.ts +0 -6
- package/dist/types/alg/operation.spec.d.ts +0 -1
- package/dist/types/alg/parse.d.ts +0 -12
- package/dist/types/alg/parse.spec.d.ts +0 -1
- package/dist/types/alg/test/alg-comparison.d.ts +0 -10
- package/dist/types/alg/test/alg.spec.d.ts +0 -1
- package/dist/types/alg/traversal.d.ts +0 -39
- package/dist/types/alg/units/QuantumWithAmount.d.ts +0 -11
- package/dist/types/alg/units/Unit.d.ts +0 -9
- package/dist/types/alg/units/containers/Commutator.d.ts +0 -14
- package/dist/types/alg/units/containers/Conjugate.d.ts +0 -14
- package/dist/types/alg/units/containers/Grouping.d.ts +0 -19
- package/dist/types/alg/units/index.d.ts +0 -8
- package/dist/types/alg/units/leaves/LineComment.d.ts +0 -12
- package/dist/types/alg/units/leaves/LineComment.spec.d.ts +0 -1
- package/dist/types/alg/units/leaves/Move.d.ts +0 -50
- package/dist/types/alg/units/leaves/Move.spec.d.ts +0 -1
- package/dist/types/alg/units/leaves/Newline.d.ts +0 -9
- package/dist/types/alg/units/leaves/Pause.d.ts +0 -9
- package/dist/types/alg/url.d.ts +0 -11
- package/dist/types/alg/url.spec.d.ts +0 -1
- package/dist/types/alg/validation.d.ts +0 -19
- package/dist/types/alg/warnOnce.d.ts +0 -1
- package/dist/types/bluetooth/connect/index.d.ts +0 -6
- package/dist/types/bluetooth/debug.d.ts +0 -2
- package/dist/types/bluetooth/keyboard.d.ts +0 -14
- package/dist/types/bluetooth/smart-puzzle/Heykube.d.ts +0 -17
- package/dist/types/bluetooth/smart-puzzle/connect.d.ts +0 -3
- package/dist/types/bluetooth/smart-puzzle/endianness.d.ts +0 -1
- package/dist/types/bluetooth/smart-puzzle/gan.d.ts +0 -34
- package/dist/types/bluetooth/smart-puzzle/giiker.d.ts +0 -21
- package/dist/types/bluetooth/smart-puzzle/giiker.spec.d.ts +0 -4
- package/dist/types/bluetooth/smart-puzzle/gocube.d.ts +0 -22
- package/dist/types/bluetooth/smart-robot/GanRobot.d.ts +0 -35
- package/dist/types/bluetooth/smart-robot/index.d.ts +0 -4
- package/dist/types/bluetooth/smart-timer/GanTimer.d.ts +0 -19
- package/dist/types/bluetooth/smart-timer/index.d.ts +0 -4
- package/dist/types/bluetooth/transformer.d.ts +0 -9
- package/dist/types/cubing.bundle-global.d.ts +0 -1
- package/dist/types/cubing.bundle-global.exports.d.ts +0 -24
- package/dist/types/kpuzzle/3x3x3/3x3x3.kpuzzle.json.d.ts +0 -2
- package/dist/types/kpuzzle/3x3x3/3x3x3.kpuzzle.json.spec.d.ts +0 -1
- package/dist/types/kpuzzle/3x3x3/puzzle-orientation.d.ts +0 -5
- package/dist/types/kpuzzle/KPuzzle.d.ts +0 -30
- package/dist/types/kpuzzle/KPuzzleDefinition.d.ts +0 -21
- package/dist/types/kpuzzle/KState.d.ts +0 -23
- package/dist/types/kpuzzle/KTransformation.d.ts +0 -24
- package/dist/types/kpuzzle/calculate.d.ts +0 -16
- package/dist/types/kpuzzle/combine.d.ts +0 -3
- package/dist/types/kpuzzle/construct.d.ts +0 -5
- package/dist/types/notation/CountAnimatedLeaves.d.ts +0 -2
- package/dist/types/notation/CountMoves.d.ts +0 -3
- package/dist/types/protocol/binary/binary3x3x3.d.ts +0 -19
- package/dist/types/protocol/binary/binary3x3x3.spec.d.ts +0 -1
- package/dist/types/protocol/binary/hex.d.ts +0 -2
- package/dist/types/protocol/binary/hex.spec.d.ts +0 -1
- package/dist/types/protocol/binary/orbit-indexing.d.ts +0 -5
- package/dist/types/protocol/binary/orbit-indexing.spec.d.ts +0 -1
- package/dist/types/protocol/binary/puzzle-orientation.d.ts +0 -4
- package/dist/types/puzzle-geometry/FaceNameSwizzler.d.ts +0 -12
- package/dist/types/puzzle-geometry/Options.d.ts +0 -45
- package/dist/types/puzzle-geometry/PGPuzzles.d.ts +0 -5
- package/dist/types/puzzle-geometry/PGPuzzles.spec.d.ts +0 -4
- package/dist/types/puzzle-geometry/Perm.d.ts +0 -18
- package/dist/types/puzzle-geometry/PermOriSet.d.ts +0 -71
- package/dist/types/puzzle-geometry/PlatonicGenerator.d.ts +0 -10
- package/dist/types/puzzle-geometry/PuzzleGeometry.d.ts +0 -176
- package/dist/types/puzzle-geometry/Quat.d.ts +0 -43
- package/dist/types/puzzle-geometry/Quat.spec.d.ts +0 -1
- package/dist/types/puzzle-geometry/SchreierSims.d.ts +0 -2
- package/dist/types/puzzle-geometry/notation-mapping/FTONotationMapper.d.ts +0 -10
- package/dist/types/puzzle-geometry/notation-mapping/FaceRenamingMapper.d.ts +0 -12
- package/dist/types/puzzle-geometry/notation-mapping/MegaminxScramblingNotationMapper.d.ts +0 -8
- package/dist/types/puzzle-geometry/notation-mapping/NotationMapper.d.ts +0 -7
- package/dist/types/puzzle-geometry/notation-mapping/NullMapper.d.ts +0 -6
- package/dist/types/puzzle-geometry/notation-mapping/NxNxNCubeMapper.d.ts +0 -8
- package/dist/types/puzzle-geometry/notation-mapping/PyraminxNotationMapper.d.ts +0 -15
- package/dist/types/puzzle-geometry/notation-mapping/SkewbNotationMapper.d.ts +0 -9
- package/dist/types/puzzle-geometry/notation-mapping/index.d.ts +0 -8
- package/dist/types/puzzle-geometry/orientcenters.spec.d.ts +0 -1
- package/dist/types/puzzles/PuzzleLoader.d.ts +0 -18
- package/dist/types/puzzles/async/async-pg3d.d.ts +0 -33
- package/dist/types/puzzles/async/lazy-cached.d.ts +0 -1
- package/dist/types/puzzles/customPGPuzzleLoader.d.ts +0 -11
- package/dist/types/puzzles/events.d.ts +0 -8
- package/dist/types/puzzles/implementations/2x2x2/2x2x2.kpuzzle.json.d.ts +0 -2
- package/dist/types/puzzles/implementations/2x2x2/2x2x2.kpuzzle.svg.d.ts +0 -2
- package/dist/types/puzzles/implementations/2x2x2/index.d.ts +0 -2
- package/dist/types/puzzles/implementations/3x3x3/3x3x3-ll.kpuzzle.svg.d.ts +0 -2
- package/dist/types/puzzles/implementations/3x3x3/3x3x3.kpuzzle.svg.d.ts +0 -2
- package/dist/types/puzzles/implementations/3x3x3/index.d.ts +0 -2
- package/dist/types/puzzles/implementations/clock/clock.kpuzzle.json.d.ts +0 -2
- package/dist/types/puzzles/implementations/clock/clock.kpuzzle.svg.d.ts +0 -2
- package/dist/types/puzzles/implementations/clock/index.d.ts +0 -2
- package/dist/types/puzzles/implementations/fto/fto.kpuzzle.svg.d.ts +0 -1
- package/dist/types/puzzles/implementations/fto/index.d.ts +0 -12
- package/dist/types/puzzles/implementations/kilominx/index.d.ts +0 -2
- package/dist/types/puzzles/implementations/kilominx/kilominx.kpuzzle.svg.d.ts +0 -1
- package/dist/types/puzzles/implementations/megaminx/index.d.ts +0 -11
- package/dist/types/puzzles/implementations/pyraminx/index.d.ts +0 -7
- package/dist/types/puzzles/implementations/pyraminx/pyraminx.kpuzzle.json.d.ts +0 -2
- package/dist/types/puzzles/implementations/pyraminx/pyraminx.kpuzzle.svg.d.ts +0 -2
- package/dist/types/puzzles/implementations/redi-cube/index.d.ts +0 -2
- package/dist/types/puzzles/implementations/redi-cube/redi_cube.kpuzzle.json.d.ts +0 -2
- package/dist/types/puzzles/implementations/redi-cube/redi_cube.kpuzzle.svg.d.ts +0 -1
- package/dist/types/puzzles/implementations/square1/index.d.ts +0 -2
- package/dist/types/puzzles/implementations/square1/sq1-hyperorbit.kpuzzle.json.d.ts +0 -2
- package/dist/types/puzzles/implementations/square1/sq1-hyperorbit.kpuzzle.svg.d.ts +0 -2
- package/dist/types/puzzles/stickerings/appearance.d.ts +0 -50
- package/dist/types/puzzles/stickerings/cube-stickerings.d.ts +0 -5
- package/dist/types/puzzles/stickerings/fto-stickerings.d.ts +0 -5
- package/dist/types/puzzles/stickerings/global-custom-stickering-hack.d.ts +0 -2
- package/dist/types/puzzles/stickerings/megaminx-stickerings.d.ts +0 -5
- package/dist/types/search/inside/api.d.ts +0 -21
- package/dist/types/search/inside/api.spec.d.ts +0 -1
- package/dist/types/search/inside/inside-worker.d.ts +0 -2
- package/dist/types/search/inside/search-worker-js-entry.d.ts +0 -1
- package/dist/types/search/inside/search-worker-ts-entry-path-getter.d.ts +0 -1
- package/dist/types/search/inside/search-worker-ts-entry.d.ts +0 -1
- package/dist/types/search/inside/solve/addOrientationSuffix.d.ts +0 -2
- package/dist/types/search/inside/solve/parseSGS.d.ts +0 -18
- package/dist/types/search/inside/solve/puzzles/2x2x2.d.ts +0 -6
- package/dist/types/search/inside/solve/puzzles/2x2x2.sgs.json.d.ts +0 -3
- package/dist/types/search/inside/solve/puzzles/3x3x3/convert.d.ts +0 -2
- package/dist/types/search/inside/solve/puzzles/3x3x3/filter.d.ts +0 -4
- package/dist/types/search/inside/solve/puzzles/3x3x3/index.d.ts +0 -8
- package/dist/types/search/inside/solve/puzzles/3x3x3/legacy-sgs.d.ts +0 -1
- package/dist/types/search/inside/solve/puzzles/3x3x3-inefficient.sgs.json.d.ts +0 -3
- package/dist/types/search/inside/solve/puzzles/4x4x4.d.ts +0 -4
- package/dist/types/search/inside/solve/puzzles/5x5x5.d.ts +0 -2
- package/dist/types/search/inside/solve/puzzles/big-cubes.d.ts +0 -2
- package/dist/types/search/inside/solve/puzzles/clock.d.ts +0 -1
- package/dist/types/search/inside/solve/puzzles/fto.d.ts +0 -5
- package/dist/types/search/inside/solve/puzzles/fto.dynamic.d.ts +0 -3
- package/dist/types/search/inside/solve/puzzles/kilominx.d.ts +0 -2
- package/dist/types/search/inside/solve/puzzles/master_tetraminx.d.ts +0 -2
- package/dist/types/search/inside/solve/puzzles/megaminx.d.ts +0 -4
- package/dist/types/search/inside/solve/puzzles/megaminx.sgs.json.d.ts +0 -5
- package/dist/types/search/inside/solve/puzzles/pyraminx.d.ts +0 -6
- package/dist/types/search/inside/solve/puzzles/pyraminx.sgs.json.d.ts +0 -3
- package/dist/types/search/inside/solve/puzzles/redi_cube.d.ts +0 -2
- package/dist/types/search/inside/solve/puzzles/sgs-defs.spec.d.ts +0 -1
- package/dist/types/search/inside/solve/puzzles/skewb.d.ts +0 -6
- package/dist/types/search/inside/solve/puzzles/skewb.sgs.json.d.ts +0 -5
- package/dist/types/search/inside/solve/puzzles/sq1.d.ts +0 -2
- package/dist/types/search/inside/solve/puzzles/wca-minx.d.ts +0 -1
- package/dist/types/search/inside/solve/tremble.d.ts +0 -13
- package/dist/types/search/inside/worker-guard.d.ts +0 -3
- package/dist/types/search/instantiator.d.ts +0 -4
- package/dist/types/search/outside.d.ts +0 -17
- package/dist/types/search/worker-inside-generated-string.d.ts +0 -1
- package/dist/types/stream/process/ReorientedStream.d.ts +0 -20
- package/dist/types/stream/proxy-event.d.ts +0 -13
- package/dist/types/stream/twizzle/TwizzleStream.d.ts +0 -18
- package/dist/types/stream/twizzle/stream-types.d.ts +0 -32
- package/dist/types/stream/websocket-proxy.d.ts +0 -21
- package/dist/types/twisty/controllers/AnimationTypes.d.ts +0 -32
- package/dist/types/twisty/controllers/RenderScheduler.d.ts +0 -12
- package/dist/types/twisty/controllers/TwistyAnimationController.d.ts +0 -36
- package/dist/types/twisty/controllers/TwistyPlayerController.d.ts +0 -15
- package/dist/types/twisty/controllers/easing.d.ts +0 -1
- package/dist/types/twisty/controllers/indexer/AlgDuration.d.ts +0 -17
- package/dist/types/twisty/controllers/indexer/AlgIndexer.d.ts +0 -36
- package/dist/types/twisty/controllers/indexer/SimpleAlgIndexer.d.ts +0 -19
- package/dist/types/twisty/controllers/indexer/simultaneous-moves/SimultaneousMoveIndexer.d.ts +0 -22
- package/dist/types/twisty/controllers/indexer/simultaneous-moves/simul-moves.d.ts +0 -25
- package/dist/types/twisty/controllers/indexer/tree/AlgWalker.d.ts +0 -63
- package/dist/types/twisty/controllers/indexer/tree/TreeAlgIndexer.d.ts +0 -20
- package/dist/types/twisty/controllers/indexer/tree/chunkAlgs.d.ts +0 -2
- package/dist/types/twisty/controllers/stream/timeline-move-calculation-draft.d.ts +0 -15
- package/dist/types/twisty/heavy-code-imports/3d.d.ts +0 -2
- package/dist/types/twisty/heavy-code-imports/dynamic-entries/3d-dynamic.d.ts +0 -10
- package/dist/types/twisty/model/PromiseFreshener.d.ts +0 -13
- package/dist/types/twisty/model/TwistyPlayerModel.d.ts +0 -85
- package/dist/types/twisty/model/TwistySceneModel.d.ts +0 -27
- package/dist/types/twisty/model/UserVisibleErrorTracker.d.ts +0 -10
- package/dist/types/twisty/model/helpers.d.ts +0 -4
- package/dist/types/twisty/model/props/TwistyProp.d.ts +0 -59
- package/dist/types/twisty/model/props/TwistyProp.spec.d.ts +0 -4
- package/dist/types/twisty/model/props/TwistyPropDebugger.d.ts +0 -26
- package/dist/types/twisty/model/props/general/ArbitraryStringProp.d.ts +0 -4
- package/dist/types/twisty/model/props/general/URLProp.d.ts +0 -5
- package/dist/types/twisty/model/props/puzzle/display/FoundationDisplayProp.d.ts +0 -5
- package/dist/types/twisty/model/props/puzzle/display/HintFaceletProp.d.ts +0 -10
- package/dist/types/twisty/model/props/puzzle/display/SpriteProp.d.ts +0 -9
- package/dist/types/twisty/model/props/puzzle/display/StickeringProp.d.ts +0 -50
- package/dist/types/twisty/model/props/puzzle/state/AlgProp.d.ts +0 -26
- package/dist/types/twisty/model/props/puzzle/state/AlgTransformationProp.d.ts +0 -11
- package/dist/types/twisty/model/props/puzzle/state/AnchorTransformationProp.d.ts +0 -14
- package/dist/types/twisty/model/props/puzzle/state/CatchUpMoveProp.d.ts +0 -10
- package/dist/types/twisty/model/props/puzzle/state/CurrentLeavesSimplified.d.ts +0 -16
- package/dist/types/twisty/model/props/puzzle/state/CurrentMoveInfoProp.d.ts +0 -13
- package/dist/types/twisty/model/props/puzzle/state/CurrentStateProp.d.ts +0 -14
- package/dist/types/twisty/model/props/puzzle/state/IndexerConstructorProp.d.ts +0 -19
- package/dist/types/twisty/model/props/puzzle/state/IndexerConstructorRequestProp.d.ts +0 -11
- package/dist/types/twisty/model/props/puzzle/state/IndexerProp.d.ts +0 -14
- package/dist/types/twisty/model/props/puzzle/state/LegacyPositionProp.d.ts +0 -11
- package/dist/types/twisty/model/props/puzzle/state/MovePressInputProp.d.ts +0 -10
- package/dist/types/twisty/model/props/puzzle/state/NaiveMoveCountProp.d.ts +0 -9
- package/dist/types/twisty/model/props/puzzle/state/PuzzleAlgProp.d.ts +0 -13
- package/dist/types/twisty/model/props/puzzle/state/SetupAnchorProp.d.ts +0 -9
- package/dist/types/twisty/model/props/puzzle/state/SetupTransformationProp.d.ts +0 -5
- package/dist/types/twisty/model/props/puzzle/structure/KPuzzleProp.d.ts +0 -10
- package/dist/types/twisty/model/props/puzzle/structure/PuzzleDescriptionProp.d.ts +0 -5
- package/dist/types/twisty/model/props/puzzle/structure/PuzzleIDProp.d.ts +0 -10
- package/dist/types/twisty/model/props/puzzle/structure/PuzzleIDRequestProp.d.ts +0 -25
- package/dist/types/twisty/model/props/puzzle/structure/PuzzleLoaderProp.d.ts +0 -12
- package/dist/types/twisty/model/props/timeline/CoarseTimelineInfoProp.d.ts +0 -24
- package/dist/types/twisty/model/props/timeline/DetailedTimelineInfoProp.d.ts +0 -21
- package/dist/types/twisty/model/props/timeline/PlayingInfoProp.d.ts +0 -14
- package/dist/types/twisty/model/props/timeline/TempoScaleProp.d.ts +0 -5
- package/dist/types/twisty/model/props/timeline/TimestampRequestProp.d.ts +0 -15
- package/dist/types/twisty/model/props/viewer/BackViewProp.d.ts +0 -11
- package/dist/types/twisty/model/props/viewer/BackgroundProp.d.ts +0 -10
- package/dist/types/twisty/model/props/viewer/ButtonAppearanceProp.d.ts +0 -21
- package/dist/types/twisty/model/props/viewer/ControlPanelProp.d.ts +0 -10
- package/dist/types/twisty/model/props/viewer/LatitudeLimit.d.ts +0 -5
- package/dist/types/twisty/model/props/viewer/OrbitCoordinatesProp.d.ts +0 -28
- package/dist/types/twisty/model/props/viewer/OrbitCoordinatesRequestProp.d.ts +0 -14
- package/dist/types/twisty/model/props/viewer/TimeRangeProp.d.ts +0 -10
- package/dist/types/twisty/model/props/viewer/ViewerLinkProp.d.ts +0 -11
- package/dist/types/twisty/model/props/viewer/VisualizationProp.d.ts +0 -12
- package/dist/types/twisty/model/props/viewer/VisualizationStrategyProp.d.ts +0 -12
- package/dist/types/twisty/views/2D/KPuzzleSVGWrapper.d.ts +0 -17
- package/dist/types/twisty/views/2D/Twisty2DPuzzle.css.d.ts +0 -2
- package/dist/types/twisty/views/2D/Twisty2DPuzzle.d.ts +0 -27
- package/dist/types/twisty/views/2D/Twisty2DPuzzleWrapper.d.ts +0 -15
- package/dist/types/twisty/views/2D/Twisty2DSceneWrapper.d.ts +0 -19
- package/dist/types/twisty/views/3D/DragTracker.d.ts +0 -27
- package/dist/types/twisty/views/3D/RendererPool.d.ts +0 -3
- package/dist/types/twisty/views/3D/TAU.d.ts +0 -2
- package/dist/types/twisty/views/3D/Twisty3DPuzzleWrapper.d.ts +0 -21
- package/dist/types/twisty/views/3D/Twisty3DRenderTarget.d.ts +0 -3
- package/dist/types/twisty/views/3D/Twisty3DScene.d.ts +0 -14
- package/dist/types/twisty/views/3D/Twisty3DSceneWrapper.d.ts +0 -33
- package/dist/types/twisty/views/3D/Twisty3DVantage.css.d.ts +0 -2
- package/dist/types/twisty/views/3D/Twisty3DVantage.d.ts +0 -36
- package/dist/types/twisty/views/3D/TwistyOrbitControls.d.ts +0 -23
- package/dist/types/twisty/views/3D/TwistyOrbitControls.spec.d.ts +0 -4
- package/dist/types/twisty/views/3D/puzzles/Cube3D.d.ts +0 -58
- package/dist/types/twisty/views/3D/puzzles/PG3D.d.ts +0 -64
- package/dist/types/twisty/views/3D/puzzles/Twisty3DPuzzle.d.ts +0 -5
- package/dist/types/twisty/views/ClassListManager.d.ts +0 -10
- package/dist/types/twisty/views/ManagedCustomElement.d.ts +0 -19
- package/dist/types/twisty/views/TwistyAlgEditor/LeafTokens.d.ts +0 -17
- package/dist/types/twisty/views/TwistyAlgEditor/TwistyAlgEditor.css.d.ts +0 -2
- package/dist/types/twisty/views/TwistyAlgEditor/TwistyAlgEditor.d.ts +0 -40
- package/dist/types/twisty/views/TwistyAlgEditor/TwistyAlgEditor.spec.d.ts +0 -4
- package/dist/types/twisty/views/TwistyAlgEditor/model.d.ts +0 -60
- package/dist/types/twisty/views/TwistyAlgViewer.css.d.ts +0 -2
- package/dist/types/twisty/views/TwistyAlgViewer.d.ts +0 -51
- package/dist/types/twisty/views/TwistyPlayer.css.d.ts +0 -2
- package/dist/types/twisty/views/TwistyPlayer.d.ts +0 -112
- package/dist/types/twisty/views/TwistyPlayerSettable.d.ts +0 -79
- package/dist/types/twisty/views/TwistyViewerWrapper.css.d.ts +0 -2
- package/dist/types/twisty/views/canvas.d.ts +0 -2
- package/dist/types/twisty/views/control-panel/TwistyButtons.css.d.ts +0 -3
- package/dist/types/twisty/views/control-panel/TwistyButtons.d.ts +0 -32
- package/dist/types/twisty/views/control-panel/TwistyScrubber.css.d.ts +0 -2
- package/dist/types/twisty/views/control-panel/TwistyScrubber.d.ts +0 -13
- package/dist/types/twisty/views/control-panel/webkit-fullscreen.d.ts +0 -14
- package/dist/types/twisty/views/document.d.ts +0 -1
- package/dist/types/twisty/views/node-custom-element-shims.d.ts +0 -4
- package/dist/types/twisty/views/screenshot.d.ts +0 -11
- package/dist/types/twisty/views/stream/TwistyStreamSource.css.d.ts +0 -2
- package/dist/types/twisty/views/stream/TwistyStreamSource.d.ts +0 -12
- package/dist/types/twisty/views/twizzle/TwizzleLink.css.d.ts +0 -2
- package/dist/types/twisty/views/twizzle/TwizzleLink.d.ts +0 -11
- package/dist/types/twisty/views/twizzle/url-params.d.ts +0 -18
- package/dist/types/vendor/comlink-everywhere/inside/index.d.ts +0 -4
- package/dist/types/vendor/comlink-everywhere/node-adapter.d.ts +0 -6
- package/dist/types/vendor/comlink-everywhere/outside/index.d.ts +0 -5
- package/dist/types/vendor/cstimer/src/js/lib/mathlib.d.ts +0 -4
- package/dist/types/vendor/cstimer/src/js/scramble/444-solver.d.ts +0 -3
- package/dist/types/vendor/min2phase/3x3x3-min2phase.d.ts +0 -2
- package/dist/types/vendor/p-lazy/p-lazy.d.ts +0 -9
- package/dist/types/vendor/random-uint-below/get-random-values.d.ts +0 -2
- package/dist/types/vendor/random-uint-below/index.d.ts +0 -3
- package/dist/types/vendor/random-uint-below/random-choice.d.ts +0 -1
- package/dist/types/vendor/random-uint-below/random53BitValue.d.ts +0 -1
- package/dist/types/vendor/sq12phase/sq1-solver.d.ts +0 -1
- package/dist/types/vendor/three/examples/jsm/libs/stats.modified.module.d.ts +0 -32
- package/dist/types/vendor/unsafe-raw-aes/unsafe-raw-aes.d.ts +0 -3
- package/dist/types/vendor/xyzzy/fto-solver-original.d.ts +0 -148
- package/dist/types/vendor/xyzzy/fto-solver.d.ts +0 -1
- package/dist/types/vendor/xyzzy/kilosolver.d.ts +0 -2
- package/dist/types/vendor/xyzzy/master_tetraminx-solver.d.ts +0 -1
- package/dist/types/vendor/xyzzy/redi_cube.d.ts +0 -2
|
@@ -5,7 +5,7 @@ var workerSource = `var qc=Object.defineProperty;var U=(e,t)=>()=>(e&&(t=e(e=0))
|
|
|
5
5
|
\`)||t.includes("\\r"))throw new Error("LineComment cannot contain newline");j(this,ur,t)}get text(){return d(this,ur)}isIdentical(t){let r=t;return t.is(w0)&&d(this,ur)===d(r,ur)}invert(){return this}*experimentalExpand(t=1,r=1/0){yield this}toString(){return\`//\${d(this,ur)}\`}},At=w0;ur=new WeakMap});var Ze,bo=U(()=>{jt();Dt();Ze=class extends Ie{toString(){return\`
|
|
6
6
|
\`}isIdentical(t){return t.is(Ze)}invert(){return this}*experimentalExpand(t=1,r=1/0){yield this}}});var Xe,xo=U(()=>{jt();Dt();Xe=class extends Ie{toString(){return"."}isIdentical(t){return t.is(Xe)}invert(){return this}*experimentalExpand(t=1,r=1/0){yield this}}});function Sl(e,t){return e?parseInt(e):t}function v0(e){return new wl().parseAlg(e)}function p2(e){return new wl().parseMove(e)}function c2(e){return new wl().parseQuantumMove(e)}function $e(e,t,r){let n=e;return n.startCharIndex=t,n.endCharIndex=r,n}function m2(e,t){return"startCharIndex"in e&&(t.startCharIndex=e.startCharIndex),"endCharIndex"in e&&(t.endCharIndex=e.endCharIndex),t}var g2,fm,um,gm,pm,cm,ot,G,wl,E0=U(()=>{qt();S0();Ao();yo();vl();Uo();Vt();bo();xo();g2=/^(\\d+)?('?)/,fm=/^[_\\dA-Za-z]/,um=/^((([1-9]\\d*)-)?([1-9]\\d*))?([_A-Za-z]+)?/,gm=/^[^\\n]*/,pm=/^(-?\\d+), ?/,cm=/^(-?\\d+)\\)/;wl=class{constructor(){re(this,ot,"");re(this,G,0)}parseAlg(t){j(this,ot,t),j(this,G,0);let r=this.parseAlgWithStopping([]);return this.mustBeAtEndOfInput(),r}parseMove(t){j(this,ot,t),j(this,G,0);let r=this.parseMoveImpl();return this.mustBeAtEndOfInput(),r}parseQuantumMove(t){j(this,ot,t),j(this,G,0);let r=this.parseQuantumMoveImpl();return this.mustBeAtEndOfInput(),r}mustBeAtEndOfInput(){if(d(this,G)!==d(this,ot).length)throw new Error("parsing unexpectedly ended early")}parseAlgWithStopping(t){let r=d(this,G),n=d(this,G),o=new ct,l=!1,i=a=>{if(l)throw new Error(\`Unexpected character at index \${a}. Are you missing a space?\`)};e:for(;d(this,G)<d(this,ot).length;){let a=d(this,G);if(t.includes(d(this,ot)[d(this,G)]))return $e(o.toAlg(),r,n);if(this.tryConsumeNext(" ")){l=!1,o.experimentalNumUnits()===0&&(r=d(this,G));continue e}else if(fm.test(d(this,ot)[d(this,G)])){i(a);let s=this.parseMoveImpl();o.push(s),l=!0,n=d(this,G);continue e}else if(this.tryConsumeNext("(")){i(a);let s=this.tryRegex(pm);if(s){let f=s[1],g=d(this,G),p=this.parseRegex(cm),u=$e(new B(new C("U_SQ_"),parseInt(f)),a+1,a+1+f.length),c=$e(new B(new C("D_SQ_"),parseInt(p[1])),g,d(this,G)-1),m=$e(new k([u,c]),a+1,d(this,G)-1);o.push($e(new gt(m),a,d(this,G))),l=!0,n=d(this,G);continue e}else{let f=this.parseAlgWithStopping([")"]);this.mustConsumeNext(")");let g=this.parseAmount();o.push($e(new gt(f,g),a,d(this,G))),l=!0,n=d(this,G);continue e}}else if(this.tryConsumeNext("[")){i(a);let s=this.parseAlgWithStopping([",",":"]),f=this.popNext(),g=this.parseAlgWithStopping(["]"]);switch(this.mustConsumeNext("]"),f){case":":o.push($e(new Ke(s,g),a,d(this,G))),l=!0,n=d(this,G);continue e;case",":o.push($e(new We(s,g),a,d(this,G))),l=!0,n=d(this,G);continue e;default:throw"unexpected parsing error"}}else if(this.tryConsumeNext(\`
|
|
7
7
|
\`)){o.push($e(new Ze,a,d(this,G))),l=!1,n=d(this,G);continue e}else if(this.tryConsumeNext("/"))if(this.tryConsumeNext("/")){i(a);let[s]=this.parseRegex(gm);o.push($e(new At(s),a,d(this,G))),l=!1,n=d(this,G);continue e}else{o.push($e(new B("_SLASH_"),a,d(this,G))),l=!0,n=d(this,G);continue e}else if(this.tryConsumeNext(".")){i(a),o.push($e(new Xe,a,d(this,G))),l=!0,n=d(this,G);continue e}else throw new Error(\`Unexpected character: \${this.popNext()}\`)}if(d(this,G)!==d(this,ot).length)throw new Error("did not finish parsing?");if(t.length>0)throw new Error("expected stopping");return $e(o.toAlg(),r,n)}parseQuantumMoveImpl(){let[,,,t,r,n]=this.parseRegex(um);return new C(n,Sl(r,void 0),Sl(t,void 0))}parseMoveImpl(){let t=d(this,G);if(this.tryConsumeNext("/"))return $e(new B("_SLASH_"),t,d(this,G));let r=this.parseQuantumMoveImpl(),[n,o]=this.parseAmountAndTrackEmptyAbsAmount(),l=this.parseMoveSuffix();if(l){if(n<0)throw new Error("uh-oh");if((l==="++"||l==="--")&&n!==1)throw new Error("Pochmann ++ or -- moves cannot have an amount other than 1.");if((l==="++"||l==="--")&&!o)throw new Error("Pochmann ++ or -- moves cannot have an amount written as a number.");if((l==="+"||l==="-")&&o)throw new Error("Clock dial moves must have an amount written as a natural number followed by + or -.");l.startsWith("+")&&(r=r.modified({family:\`\${r.family}_\${l==="+"?"PLUS":"PLUSPLUS"}_\`})),l.startsWith("-")&&(r=r.modified({family:\`\${r.family}_\${l==="-"?"PLUS":"PLUSPLUS"}_\`}),n*=-1)}return $e(new B(r,n),t,d(this,G))}parseMoveSuffix(){return this.tryConsumeNext("+")?this.tryConsumeNext("+")?"++":"+":this.tryConsumeNext("-")?this.tryConsumeNext("-")?"--":"-":null}parseAmountAndTrackEmptyAbsAmount(){let t=d(this,G),[,r,n]=this.parseRegex(g2);if(r?.startsWith("0")&&r!=="0")throw new Error(\`Error at char index \${t}: An amount can only start with 0 if it's exactly the digit 0.\`);return[Sl(r,1)*(n==="'"?-1:1),!r]}parseAmount(){let t=d(this,G),[,r,n]=this.parseRegex(g2);if(r?.startsWith("0")&&r!=="0")throw new Error(\`Error at char index \${t}: An amount number can only start with 0 if it's exactly the digit 0.\`);return Sl(r,1)*(n==="'"?-1:1)}parseRegex(t){let r=t.exec(this.remaining());if(r===null)throw new Error("internal parsing error");return j(this,G,d(this,G)+r[0].length),r}tryRegex(t){let r=t.exec(this.remaining());return r===null?null:(j(this,G,d(this,G)+r[0].length),r)}remaining(){return d(this,ot).slice(d(this,G))}popNext(){let t=d(this,ot)[d(this,G)];return D0(this,G)._++,t}tryConsumeNext(t){return d(this,ot)[d(this,G)]===t?(D0(this,G)._++,!0):!1}mustConsumeNext(t){let r=this.popNext();if(r!==t)throw new Error(\`expected \\\`\${t}\\\` while parsing, encountered \${r}\`);return r}};ot=new WeakMap,G=new WeakMap});function El(e){L2.has(e)||(console.warn(e),L2.add(e))}var L2,k0=U(()=>{L2=new Set});var Dn,_0=U(()=>{Dt();x0();Dn=class{constructor(t,r=1){if(this.quantum=t,this.amount=r,!Number.isInteger(this.amount)||this.amount<-2147483648||this.amount>2147483647)throw new Error(\`Unit amount absolute value must be a non-negative integer from \${dn} to \${dn}.\`)}suffix(){let t="",r=Math.abs(this.amount);return r!==1&&(t+=r),this.amount<0&&(t+="'"),t}isIdentical(t){return this.quantum.isIdentical(t.quantum)&&this.amount===t.amount}*experimentalExpand(t,r){let n=Math.abs(this.amount),o=f2(t,this.amount<0);for(let l=0;l<n;l++)yield*this.quantum.experimentalExpand(o,r)}}});var Ht,Qe,je,_l,C,Me,An,B,Vt=U(()=>{jt();Dt();x0();E0();k0();_0();_l=class extends Ul{constructor(t,r,n){super();re(this,Ht,void 0);re(this,Qe,void 0);re(this,je,void 0);if(j(this,Ht,t),j(this,Qe,r??null),j(this,je,n??null),Object.freeze(this),d(this,Qe)!==null&&(!Number.isInteger(d(this,Qe))||d(this,Qe)<1||d(this,Qe)>2147483647))throw new Error(\`QuantumMove inner layer must be a positive integer below \${dn}.\`);if(d(this,je)!==null&&(!Number.isInteger(d(this,je))||d(this,je)<1||d(this,je)>2147483647))throw new Error(\`QuantumMove outer layer must be a positive integer below \${dn}.\`);if(d(this,je)!==null&&d(this,Qe)!==null&&d(this,Qe)<=d(this,je))throw new Error("QuantumMove outer layer must be smaller than inner layer.");if(d(this,je)!==null&&d(this,Qe)===null)throw new Error("QuantumMove with an outer layer must have an inner layer")}static fromString(t){return c2(t)}modified(t){return new _l(t.family??d(this,Ht),t.innerLayer??d(this,Qe),t.outerLayer??d(this,je))}isIdentical(t){let r=t;return t.is(_l)&&d(this,Ht)===d(r,Ht)&&d(this,Qe)===d(r,Qe)&&d(this,je)===d(r,je)}get family(){return d(this,Ht)}get outerLayer(){return d(this,je)}get innerLayer(){return d(this,Qe)}experimentalExpand(){throw new Error("experimentalExpand() cannot be called on a \`QuantumMove\` directly.")}toString(){let t=d(this,Ht);return d(this,Qe)!==null&&(t=String(d(this,Qe))+t,d(this,je)!==null&&(t=String(d(this,je))+"-"+t)),t}},C=_l;Ht=new WeakMap,Qe=new WeakMap,je=new WeakMap;An=class extends Ie{constructor(...t){super();re(this,Me,void 0);if(typeof t[0]=="string")if(t[1]??null){j(this,Me,new Dn(C.fromString(t[0]),t[1]));return}else return An.fromString(t[0]);j(this,Me,new Dn(t[0],t[1]))}isIdentical(t){let r=t.as(An);return!!r&&d(this,Me).isIdentical(d(r,Me))}invert(){return m2(this,new An(d(this,Me).quantum,-this.amount))}*experimentalExpand(t=1){t===1?yield this:yield this.modified({amount:-this.amount})}get quantum(){return d(this,Me).quantum}modified(t){return new An(d(this,Me).quantum.modified(t),t.amount??this.amount)}static fromString(t){return p2(t)}get amount(){return d(this,Me).amount}get type(){return El("deprecated: type"),"blockMove"}get family(){return d(this,Me).quantum.family??void 0}get outerLayer(){return d(this,Me).quantum.outerLayer??void 0}get innerLayer(){return d(this,Me).quantum.innerLayer??void 0}toString(){if(this.family==="_SLASH_")return"/";if(this.family.endsWith("_PLUS_"))return d(this,Me).quantum.toString().slice(0,-6)+Math.abs(this.amount)+(this.amount<0?"-":"+");if(this.family.endsWith("_PLUSPLUS_")){let t=Math.abs(this.amount);return d(this,Me).quantum.toString().slice(0,-10)+(t===1?"":t)+(this.amount<0?"--":"++")}return d(this,Me).quantum.toString()+d(this,Me).suffix()}},B=An;Me=new WeakMap});var R2,B2,lt,zl,gt,vl=U(()=>{qt();jt();Dt();Vt();_0();R2=class{constructor(){this.quantumU_SQ_=null;this.quantumD_SQ_=null}format(t){let r=this.tuple(t);return r?\`(\${r.map(n=>n.amount).join(", ")})\`:null}tuple(t){this.quantumU_SQ_||(this.quantumU_SQ_=new C("U_SQ_")),this.quantumD_SQ_||(this.quantumD_SQ_=new C("D_SQ_"));let r=t.alg;if(r.experimentalNumUnits()===2){let[n,o]=r.units();if(n.as(B)?.quantum.isIdentical(this.quantumU_SQ_)&&o.as(B)?.quantum.isIdentical(this.quantumD_SQ_)){if(t.amount!==1)throw new Error("Square-1 tuples cannot have an amount other than 1.");return[n,o]}}return null}},B2=new R2,zl=class extends Ie{constructor(t,r){super();re(this,lt,void 0);let n=sr(t);j(this,lt,new Dn(n,r))}isIdentical(t){let r=t;return t.is(zl)&&d(this,lt).isIdentical(d(r,lt))}get alg(){return d(this,lt).quantum}get amount(){return d(this,lt).amount}get experimentalRepetitionSuffix(){return d(this,lt).suffix()}invert(){return new zl(d(this,lt).quantum,-d(this,lt).amount)}*experimentalExpand(t=1,r){r??(r=1/0),r===0?yield t===1?this:this.invert():yield*d(this,lt).experimentalExpand(t,r-1)}static fromString(){throw new Error("unimplemented")}toString(){return B2.format(this)??\`(\${d(this,lt).quantum.toString()})\${d(this,lt).suffix()}\`}experimentalAsSquare1Tuple(){return B2.tuple(this)}},gt=zl;lt=new WeakMap});var Cl=U(()=>{vl();Uo();Ao();yo();Vt();bo();xo()});function yt(e,t){return e instanceof t}function d2(e){return yt(e,gt)||yt(e,At)||yt(e,We)||yt(e,Ke)||yt(e,B)||yt(e,Ze)||yt(e,Xe)}var z0=U(()=>{Cl()});function F2(e,t,r){if(t.is(gt))return e.traverseGrouping(t,r);if(t.is(B))return e.traverseMove(t,r);if(t.is(We))return e.traverseCommutator(t,r);if(t.is(Ke))return e.traverseConjugate(t,r);if(t.is(Xe))return e.traversePause(t,r);if(t.is(Ze))return e.traverseNewline(t,r);if(t.is(At))return e.traverseLineComment(t,r);throw new Error("unknown unit")}function D2(e){if(e.is(gt)||e.is(B)||e.is(We)||e.is(Ke)||e.is(Xe)||e.is(Ze)||e.is(At))return e;throw"internal error: expected unit"}var yn,Un,Pl,Lm,P0,C0,h2,A2,M0=U(()=>{vl();Ao();Vt();bo();xo();yo();Uo();yn=class{traverseUnit(t,r){return F2(this,t,r)}traverseIntoUnit(t,r){return D2(this.traverseUnit(t,r))}},Un=class extends yn{traverseUnit(t){return F2(this,t,void 0)}traverseIntoUnit(t){return D2(this.traverseUnit(t))}},P0=class extends yn{*traverseAlg(t,r){if(r.depth===0){yield*t.units();return}let n=[],o=null,l=r?.collapseMoves??!0;function i(f,g){var c;let p=e2(c=P0,Pl,Lm).call(c,f,g,r);if(p===0)return!1;let u=new B(f.quantum,p);return n.push(u),o=u,!0}function a(f){l&&o?.is(B)&&f.is(B)&&o.quantum.isIdentical(f.quantum)?(n.pop(),i(o,f.amount)||(o=n.slice(-1)[0])):f.is(B)?i(f,0):(n.push(f),o=f)}let s={depth:r.depth?r.depth-1:null};for(let f of t.units())for(let g of this.traverseUnit(f,s))a(g);for(let f of n)yield f}*traverseGrouping(t,r){if(r.depth===0){yield t;return}let n={depth:r.depth?r.depth-1:null};yield new gt(this.traverseAlg(t.alg,n))}*traverseMove(t,r){yield t}*traverseCommutator(t,r){if(r.depth===0){yield t;return}let n={depth:r.depth?r.depth-1:null};yield new We(this.traverseAlg(t.A,n),this.traverseAlg(t.B,n))}*traverseConjugate(t,r){if(r.depth===0){yield t;return}let n={depth:r.depth?r.depth-1:null};yield new Ke(this.traverseAlg(t.A,n),this.traverseAlg(t.B,n))}*traversePause(t,r){yield t}*traverseNewline(t,r){yield t}*traverseLineComment(t,r){yield t}},C0=P0;Pl=new WeakSet,Lm=function(t,r,n){let o=t.amount+r;if(n?.quantumMoveOrder){let l=n.quantumMoveOrder(t.quantum),i=Math.floor(l/2)+1-l;o=(o%l+l-i)%l+i}return o},re(C0,Pl);h2=new C0,A2=h2.traverseAlg.bind(h2)});function y2(e){if(!e)return[];if(yt(e,k))return e.units();if(typeof e=="string")return v0(e).units();let t=e;if(typeof t[Symbol.iterator]=="function")return t;throw"Invalid unit"}function sr(e){return yt(e,k)?e:new k(e)}function Bm(e,t){return e.is(Ze)||t.is(Ze)?"":e.is(At)&&!t.is(Ze)?\`
|
|
8
|
-
\`:" "}var it,Ir,k,qt=U(()=>{jt();z0();Dt();E0();M0();Uo();Vt();bo();k0();Ir=class extends Ie{constructor(t){super();re(this,it,void 0);j(this,it,Array.from(y2(t)));for(let r of d(this,it))if(!d2(r))throw new Error("An alg can only contain units.")}isIdentical(t){let r=t;if(!t.is(Ir))return!1;let n=Array.from(d(this,it)),o=Array.from(d(r,it));if(n.length!==o.length)return!1;for(let l=0;l<n.length;l++)if(!n[l].isIdentical(o[l]))return!1;return!0}invert(){return new Ir(u2(Array.from(d(this,it)).map(t=>t.invert())))}*experimentalExpand(t=1,r){r??(r=1/0);for(let n of b0(d(this,it),t))yield*n.experimentalExpand(t,r)}expand(t){return new Ir(this.experimentalExpand(1,t?.depth??1/0))}*experimentalLeafMoves(){for(let t of this.experimentalExpand())t.is(B)&&(yield t)}concat(t){return new Ir(Array.from(d(this,it)).concat(Array.from(y2(t))))}experimentalIsEmpty(){for(let t of d(this,it))return!1;return!0}static fromString(t){return v0(t)}*units(){for(let t of d(this,it))yield t}experimentalNumUnits(){return Array.from(d(this,it)).length}get type(){return El("deprecated: type"),"sequence"}toString(){let t="",r=null;for(let n of d(this,it))r&&(t+=Bm(r,n)),t+=n.toString(),r=n;return t}simplify(t){return new Ir(A2(this,t??{}))}},k=Ir;it=new WeakMap});var Rm,U2=U(()=>{qt();Cl();Ao();yo();Vt();xo();Rm={Sune:new k([new B("R",1),new B("U",1),new B("R",-1),new B("U",1),new B("R",1),new B("U",-2),new B("R",-1)]),AntiSune:new k([new B("R",1),new B("U",2),new B("R",-1),new B("U",-1),new B("R",1),new B("U",-1),new B("R",-1)]),SuneCommutator:new k([new We(new k([new B("R",1),new B("U",1),new B("R",-2)]),new k([new Ke(new k([new B("R",1)]),new k([new B("U",1)]))]))]),Niklas:new k([new B("R",1),new B("U",-1),new B("L",-1),new B("U",1),new B("R",-1),new B("U",-1),new B("L",1),new B("U",1)]),EPerm:new k([new B("x",-1),new We(new k([new Ke(new k([new B("R",1)]),new k([new B("U",-1)]))]),new k([new B("D",1)])),new We(new k([new Ke(new k([new B("R",1)]),new k([new B("U",1)]))]),new k([new B("D",1)])),new B("x",1)]),FURURFCompact:new k([new Ke(new k([new B("F",1)]),new k([new We(new k([new B("U",1)]),new k([new B("R",1)]))]))]),APermCompact:new k([new Ke(new k([new B("R",2)]),new k([new We(new k([new B("F",2)]),new k([new B("R",-1),new B("B",-1),new B("R",1)]))]))]),FURURFMoves:new k([new B("F",1),new B("U",1),new B("R",1),new B("U",-1),new B("R",-1),new B("F",-1)]),TPerm:new k([new B("R",1),new B("U",1),new B("R",-1),new B("U",-1),new B("R",-1),new B("F",1),new B("R",2),new B("U",-1),new B("R",-1),new B("U",-1),new B("R",1),new B("U",1),new B("R",-1),new B("F",-1)]),HeadlightSwaps:new k([new Ke(new k([new B("F",1)]),new k([new gt(new k([new We(new k([new B("R",1)]),new k([new B("U",1)]))]),3)]))]),TriplePause:new k([new Xe,new Xe,new Xe])}});var DA,b2=U(()=>{Vt();DA={73:new B("R"),75:new B("R'"),87:new B("B"),79:new B("B'"),83:new B("D"),76:new B("D'"),68:new B("L"),69:new B("L'"),74:new B("U"),70:new B("U'"),72:new B("F"),71:new B("F'"),78:new B("x'"),67:new B("l"),82:new B("l'"),85:new B("r"),77:new B("r'"),88:new B("d"),188:new B("d'"),84:new B("x"),89:new B("x"),66:new B("x'"),186:new B("y"),59:new B("y"),65:new B("y'"),80:new B("z"),81:new B("z'"),90:new B("M'"),190:new B("M'")}});var x2=U(()=>{});var S2=U(()=>{qt()});var Le=U(()=>{qt();S0();M0();U2();b2();Cl();Vt();x2();S2();z0();Dt()});function wo(e,t,r){let n={};for(let o in e.orbits){let l=e.orbits[o],i=t[o],a=r[o];if(So(l.numOrientations,a))n[o]=i;else if(So(l.numOrientations,i))n[o]=a;else{let s=new Array(l.numPieces);if(l.numOrientations===1){for(let f=0;f<l.numPieces;f++)s[f]=i.permutation[a.permutation[f]];n[o]={permutation:s,orientation:i.orientation}}else{let f=new Array(l.numPieces);for(let g=0;g<l.numPieces;g++)f[g]=(i.orientation[a.permutation[g]]+a.orientation[g])%l.numOrientations,s[g]=i.permutation[a.permutation[g]];n[o]={permutation:s,orientation:f}}}}return n}function N0(e,t,r){let n={};for(let o in e.orbits){let l=e.orbits[o],i=t[o],a=r[o];if(So(l.numOrientations,a))n[o]=i;else{let s=new Array(l.numPieces);if(l.numOrientations===1){for(let f=0;f<l.numPieces;f++)s[f]=i.pieces[a.permutation[f]];n[o]={pieces:s,orientation:i.orientation}}else{let f=new Array(l.numPieces);for(let g=0;g<l.numPieces;g++)f[g]=(i.orientation[a.permutation[g]]+a.orientation[g])%l.numOrientations,s[g]=i.pieces[a.permutation[g]];n[o]={pieces:s,orientation:f}}}}return n}var Ml=U(()=>{vo()});function dm(e){let t=w2.get(e);if(t)return t;let r=new Array(e),n=new Array(e);for(let l=0;l<e;l++)r[l]=l,n[l]=0;let o={permutation:r,orientation:n};return v2&&(Object.freeze(r),Object.freeze(n),Object.freeze(o)),w2.set(e,o),o}function E2(e){let t={};for(let[r,n]of Object.entries(e.orbits))t[r]=dm(n.numPieces);return v2&&Object.freeze(t),t}function k2(e,t){let r=t.quantum.toString(),n=e.definition.moves[r];if(!n){let i=e.definition.experimentalDerivedMoves?.[r];i&&(n=e.algToTransformation(i).transformationData)}if(n)return gr(e,n,t.amount);let o=e.definition.moves[t.toString()];if(o)return o;let l=e.definition.moves[t.invert().toString()];if(l)return gr(e,l,-1);throw new Error(\`Invalid move for KPuzzle (\${e.name()}): \${t}\`)}var v2,w2,T0=U(()=>{vo();v2=!1,w2=new Map});var _2=U(()=>{});function G0(e){let t=e.stateData.CENTERS.pieces[0],r=e.stateData.CENTERS.pieces[5],n=e.stateData.CENTERS.pieces[1],o=n;return t<n&&o--,r<n&&o--,[t,o]}function Fm(){if(!hm){let e=["","z","x","z'","x'","x2"].map(r=>k.fromString(r)),t=new k("y");for(let r of e){let n=bn.algToTransformation(r);for(let o=0;o<4;o++){n=n.applyAlg(t);let[l,i]=G0(n.toKState());z2[l][i]=n.invert()}}}return z2}function Nl(e){let[t,r]=G0(e),n=Fm()[t][r];return e.applyTransformation(n)}var z2,hm,O0=U(()=>{Le();Ce();z2=new Array(6).fill(0).map(()=>new Array(6)),hm=!1});var I0=U(()=>{Ce();_2();O0()});var C2=U(()=>{});var P2=U(()=>{I0();C2();O0();I0()});function M2(e,t){return t.ignorePuzzleOrientation&&(e=Nl(e)),t.ignoreCenterOrientation&&(e=new fe(e.kpuzzle,{EDGES:e.stateData.EDGES,CORNERS:e.stateData.CORNERS,CENTERS:{pieces:e.stateData.CENTERS.pieces,orientation:new Array(6).fill(0)}})),!!e.experimentalToTransformation()?.isIdentityTransformation()}var N2=U(()=>{P2();Eo()});var fe,Eo=U(()=>{N2();Ml();ko();fe=class{constructor(t,r){this.kpuzzle=t;this.stateData=r}toJSON(){return{experimentalPuzzleName:this.kpuzzle.name(),stateData:this.stateData}}static fromTransformation(t){let r=N0(t.kpuzzle.definition,t.kpuzzle.definition.startStateData,t.transformationData);return new fe(t.kpuzzle,r)}apply(t){return this.applyTransformation(this.kpuzzle.toTransformation(t))}applyTransformation(t){if(t.isIdentityTransformation())return new fe(this.kpuzzle,this.stateData);let r=N0(this.kpuzzle.definition,this.stateData,t.transformationData);return new fe(this.kpuzzle,r)}applyMove(t){return this.applyTransformation(this.kpuzzle.moveToTransformation(t))}applyAlg(t){return this.applyTransformation(this.kpuzzle.algToTransformation(t))}experimentalToTransformation(){if(!this.kpuzzle.canConvertStateToUniqueTransformation())return null;let t={};for(let[r,n]of Object.entries(this.stateData)){let o={permutation:n.pieces,orientation:n.orientation};t[r]=o}return new Ut(this.kpuzzle,t)}experimentalIs3x3x3Solved(t){if(this.kpuzzle.name()!=="3x3x3")throw new Error("\`KState.experimentalIs3x3x3Solved()\` only supports 3x3x3 states.");return M2(this,t)}}});var Wr,pr,Ut,ko=U(()=>{vo();Ml();T0();Eo();pr=class{constructor(t,r){this.kpuzzle=t;this.transformationData=r;re(this,Wr,void 0)}toJSON(){return{experimentalPuzzleName:this.kpuzzle.name(),transformationData:this.transformationData}}invert(){return new pr(this.kpuzzle,W0(this.kpuzzle,this.transformationData))}isIdentityTransformation(){return d(this,Wr)??j(this,Wr,this.isIdentical(this.kpuzzle.identityTransformation()))}static experimentalConstructIdentity(t){let r=new pr(t,E2(t.definition));return j(r,Wr,!0),r}isIdentical(t){return T2(this.kpuzzle,this.transformationData,t.transformationData)}apply(t){return this.applyTransformation(this.kpuzzle.toTransformation(t))}applyTransformation(t){if(this.kpuzzle!==t.kpuzzle)throw new Error(\`Tried to apply a transformation for a KPuzzle (\${t.kpuzzle.name()}) to a different KPuzzle (\${this.kpuzzle.name()}).\`);return d(this,Wr)?new pr(this.kpuzzle,t.transformationData):d(t,Wr)?new pr(this.kpuzzle,this.transformationData):new pr(this.kpuzzle,wo(this.kpuzzle.definition,this.transformationData,t.transformationData))}applyMove(t){return this.applyTransformation(this.kpuzzle.moveToTransformation(t))}applyAlg(t){return this.applyTransformation(this.kpuzzle.algToTransformation(t))}toKState(){return fe.fromTransformation(this)}repetitionOrder(){return G2(this.kpuzzle.definition,this)}selfMultiply(t){return new pr(this.kpuzzle,gr(this.kpuzzle,this.transformationData,t))}},Ut=pr;Wr=new WeakMap});function So(e,t){let{permutation:r}=t,n=r.length;for(let o=0;o<n;o++)if(r[o]!==o)return!1;if(e>1){let{orientation:o}=t;for(let l=0;l<n;l++)if(o[l]!==0)return!1}return!0}function Dm(e,t,r,n={}){for(let o=0;o<e.numPieces;o++)if(!n?.ignoreOrientation&&t.orientation[o]!==r.orientation[o]||!n?.ignorePermutation&&t.permutation[o]!==r.permutation[o])return!1;return!0}function T2(e,t,r){for(let[n,o]of Object.entries(e.definition.orbits))if(!Dm(o,t[n],r[n]))return!1;return!0}function W0(e,t){let r={};for(let n in e.definition.orbits){let o=e.definition.orbits[n],l=t[n];if(So(o.numOrientations,l))r[n]=l;else if(o.numOrientations===1){let i=new Array(o.numPieces);for(let a=0;a<o.numPieces;a++)i[l.permutation[a]]=a;r[n]={permutation:i,orientation:l.orientation}}else{let i=new Array(o.numPieces),a=new Array(o.numPieces);for(let s=0;s<o.numPieces;s++){let f=l.permutation[s];i[f]=s,a[f]=(o.numOrientations-l.orientation[s]+o.numOrientations)%o.numOrientations}r[n]={permutation:i,orientation:a}}}return r}function gr(e,t,r){if(r===1)return t;if(r<0)return gr(e,W0(e,t),-r);if(r===0){let{transformationData:l}=e.identityTransformation();return l}let n=t;r!==2&&(n=gr(e,t,Math.floor(r/2)));let o=wo(e.definition,n,n);return r%2===0?o:wo(e.definition,t,o)}function K0(e,t){return t?K0(t,e%t):e}function G2(e,t){let r=1;for(let n in e.orbits){let o=e.orbits[n],l=t.transformationData[n],i=new Array(o.numPieces);for(let a=0;a<o.numPieces;a++)if(!i[a]){let s=a,f=0,g=0;for(;i[s]=!0,f=f+l.orientation[s],g=g+1,s=l.permutation[s],s!==a;);f!==0&&(g=g*o.numOrientations/K0(o.numOrientations,f)),r=r*g/K0(r,g)}}return r}var I2,O2,W2,vo=U(()=>{Le();Ml();ko();I2=class extends yn{traverseAlg(t,r){let n=null;for(let o of t.units())n?n=n.applyTransformation(this.traverseUnit(o,r)):n=this.traverseUnit(o,r);return n??r.identityTransformation()}traverseGrouping(t,r){let n=this.traverseAlg(t.alg,r);return new Ut(r,gr(r,n.transformationData,t.amount))}traverseMove(t,r){return r.moveToTransformation(t)}traverseCommutator(t,r){let n=this.traverseAlg(t.A,r),o=this.traverseAlg(t.B,r);return n.applyTransformation(o).applyTransformation(n.invert()).applyTransformation(o.invert())}traverseConjugate(t,r){let n=this.traverseAlg(t.A,r),o=this.traverseAlg(t.B,r);return n.applyTransformation(o).applyTransformation(n.invert())}traversePause(t,r){return r.identityTransformation()}traverseNewline(t,r){return r.identityTransformation()}traverseLineComment(t,r){return r.identityTransformation()}},O2=new I2,W2=O2.traverseAlg.bind(O2)});var xn,Tl,be,Q0=U(()=>{Le();vo();T0();Eo();ko();be=class{constructor(t,r){this.definition=t;re(this,xn,new Map);re(this,Tl,void 0);this.experimentalPGNotation=r?.experimentalPGNotation}name(){return this.definition.name}identityTransformation(){return Ut.experimentalConstructIdentity(this)}moveToTransformation(t){typeof t=="string"&&(t=new B(t));let r=t.toString(),n=d(this,xn).get(r);if(n)return new Ut(this,n);if(this.experimentalPGNotation){let l=this.experimentalPGNotation.lookupMove(t);if(!l)throw new Error(\`could not map to internal move: \${t}\`);return d(this,xn).set(r,l),new Ut(this,l)}let o=k2(this,t);return d(this,xn).set(r,o),new Ut(this,o)}algToTransformation(t){return typeof t=="string"&&(t=new k(t)),W2(t,this)}toTransformation(t){return typeof t=="string"?this.algToTransformation(t):t?.is?.(k)?this.algToTransformation(t):t?.is?.(B)?this.moveToTransformation(t):t}startState(){return new fe(this,this.definition.startStateData)}canConvertStateToUniqueTransformation(){return d(this,Tl)??j(this,Tl,(()=>{for(let[t,r]of Object.entries(this.definition.orbits)){let n=new Array(r.numPieces).fill(!1);for(let o of this.definition.startStateData[t].pieces)n[o]=!0;for(let o of n)if(!o)return!1}return!0})())}get state(){throw new Error("KPuzzle is now a different (stateless) class.")}reset(){throw new Error("KPuzzle is now a different (stateless) class.")}applyMove(t){throw new Error("KPuzzle is now a different class. Try \`.moveToTransformation()\` to get the transformation for a move.")}applyAlg(t){throw new Error("KPuzzle is now a different class. Try \`.algToTransformation()\` to get the transformation for an alg.")}};xn=new WeakMap,Tl=new WeakMap});var Fe,K2=U(()=>{Fe={name:"3x3x3",orbits:{EDGES:{numPieces:12,numOrientations:2},CORNERS:{numPieces:8,numOrientations:3},CENTERS:{numPieces:6,numOrientations:4}},startStateData:{EDGES:{pieces:[0,1,2,3,4,5,6,7,8,9,10,11],orientation:[0,0,0,0,0,0,0,0,0,0,0,0]},CORNERS:{pieces:[0,1,2,3,4,5,6,7],orientation:[0,0,0,0,0,0,0,0]},CENTERS:{pieces:[0,1,2,3,4,5],orientation:[0,0,0,0,0,0]}},moves:{U:{EDGES:{permutation:[1,2,3,0,4,5,6,7,8,9,10,11],orientation:[0,0,0,0,0,0,0,0,0,0,0,0]},CORNERS:{permutation:[1,2,3,0,4,5,6,7],orientation:[0,0,0,0,0,0,0,0]},CENTERS:{permutation:[0,1,2,3,4,5],orientation:[1,0,0,0,0,0]}},y:{EDGES:{permutation:[1,2,3,0,5,6,7,4,10,8,11,9],orientation:[0,0,0,0,0,0,0,0,1,1,1,1]},CORNERS:{permutation:[1,2,3,0,7,4,5,6],orientation:[0,0,0,0,0,0,0,0]},CENTERS:{permutation:[0,2,3,4,1,5],orientation:[1,0,0,0,0,3]}},x:{EDGES:{permutation:[4,8,0,9,6,10,2,11,5,7,1,3],orientation:[1,0,1,0,1,0,1,0,0,0,0,0]},CORNERS:{permutation:[4,0,3,5,7,6,2,1],orientation:[2,1,2,1,1,2,1,2]},CENTERS:{permutation:[2,1,5,3,0,4],orientation:[0,3,0,1,2,2]}},L:{EDGES:{permutation:[0,1,2,11,4,5,6,9,8,3,10,7],orientation:[0,0,0,0,0,0,0,0,0,0,0,0]},CORNERS:{permutation:[0,1,6,2,4,3,5,7],orientation:[0,0,2,1,0,2,1,0]},CENTERS:{permutation:[0,1,2,3,4,5],orientation:[0,1,0,0,0,0]}},F:{EDGES:{permutation:[9,1,2,3,8,5,6,7,0,4,10,11],orientation:[1,0,0,0,1,0,0,0,1,1,0,0]},CORNERS:{permutation:[3,1,2,5,0,4,6,7],orientation:[1,0,0,2,2,1,0,0]},CENTERS:{permutation:[0,1,2,3,4,5],orientation:[0,0,1,0,0,0]}},R:{EDGES:{permutation:[0,8,2,3,4,10,6,7,5,9,1,11],orientation:[0,0,0,0,0,0,0,0,0,0,0,0]},CORNERS:{permutation:[4,0,2,3,7,5,6,1],orientation:[2,1,0,0,1,0,0,2]},CENTERS:{permutation:[0,1,2,3,4,5],orientation:[0,0,0,1,0,0]}},B:{EDGES:{permutation:[0,1,10,3,4,5,11,7,8,9,6,2],orientation:[0,0,1,0,0,0,1,0,0,0,1,1]},CORNERS:{permutation:[0,7,1,3,4,5,2,6],orientation:[0,2,1,0,0,0,2,1]},CENTERS:{permutation:[0,1,2,3,4,5],orientation:[0,0,0,0,1,0]}},D:{EDGES:{permutation:[0,1,2,3,7,4,5,6,8,9,10,11],orientation:[0,0,0,0,0,0,0,0,0,0,0,0]},CORNERS:{permutation:[0,1,2,3,5,6,7,4],orientation:[0,0,0,0,0,0,0,0]},CENTERS:{permutation:[0,1,2,3,4,5],orientation:[0,0,0,0,0,1]}},z:{EDGES:{permutation:[9,3,11,7,8,1,10,5,0,4,2,6],orientation:[1,1,1,1,1,1,1,1,1,1,1,1]},CORNERS:{permutation:[3,2,6,5,0,4,7,1],orientation:[1,2,1,2,2,1,2,1]},CENTERS:{permutation:[1,5,2,0,4,3],orientation:[1,1,1,1,3,1]}},M:{EDGES:{permutation:[2,1,6,3,0,5,4,7,8,9,10,11],orientation:[1,0,1,0,1,0,1,0,0,0,0,0]},CORNERS:{permutation:[0,1,2,3,4,5,6,7],orientation:[0,0,0,0,0,0,0,0]},CENTERS:{permutation:[4,1,0,3,5,2],orientation:[2,0,0,0,2,0]}},E:{EDGES:{permutation:[0,1,2,3,4,5,6,7,9,11,8,10],orientation:[0,0,0,0,0,0,0,0,1,1,1,1]},CORNERS:{permutation:[0,1,2,3,4,5,6,7],orientation:[0,0,0,0,0,0,0,0]},CENTERS:{permutation:[0,4,1,2,3,5],orientation:[0,0,0,0,0,0]}},S:{EDGES:{permutation:[0,3,2,7,4,1,6,5,8,9,10,11],orientation:[0,1,0,1,0,1,0,1,0,0,0,0]},CORNERS:{permutation:[0,1,2,3,4,5,6,7],orientation:[0,0,0,0,0,0,0,0]},CENTERS:{permutation:[1,5,2,0,4,3],orientation:[1,1,0,1,0,1]}},u:{EDGES:{permutation:[1,2,3,0,4,5,6,7,10,8,11,9],orientation:[0,0,0,0,0,0,0,0,1,1,1,1]},CORNERS:{permutation:[1,2,3,0,4,5,6,7],orientation:[0,0,0,0,0,0,0,0]},CENTERS:{permutation:[0,2,3,4,1,5],orientation:[1,0,0,0,0,0]}},l:{EDGES:{permutation:[2,1,6,11,0,5,4,9,8,3,10,7],orientation:[1,0,1,0,1,0,1,0,0,0,0,0]},CORNERS:{permutation:[0,1,6,2,4,3,5,7],orientation:[0,0,2,1,0,2,1,0]},CENTERS:{permutation:[4,1,0,3,5,2],orientation:[2,1,0,0,2,0]}},f:{EDGES:{permutation:[9,3,2,7,8,1,6,5,0,4,10,11],orientation:[1,1,0,1,1,1,0,1,1,1,0,0]},CORNERS:{permutation:[3,1,2,5,0,4,6,7],orientation:[1,0,0,2,2,1,0,0]},CENTERS:{permutation:[1,5,2,0,4,3],orientation:[1,1,1,1,0,1]}},r:{EDGES:{permutation:[4,8,0,3,6,10,2,7,5,9,1,11],orientation:[1,0,1,0,1,0,1,0,0,0,0,0]},CORNERS:{permutation:[4,0,2,3,7,5,6,1],orientation:[2,1,0,0,1,0,0,2]},CENTERS:{permutation:[2,1,5,3,0,4],orientation:[0,0,0,1,2,2]}},b:{EDGES:{permutation:[0,5,10,1,4,7,11,3,8,9,6,2],orientation:[0,1,1,1,0,1,1,1,0,0,1,1]},CORNERS:{permutation:[0,7,1,3,4,5,2,6],orientation:[0,2,1,0,0,0,2,1]},CENTERS:{permutation:[3,0,2,5,4,1],orientation:[3,3,0,3,1,3]}},d:{EDGES:{permutation:[0,1,2,3,7,4,5,6,9,11,8,10],orientation:[0,0,0,0,0,0,0,0,1,1,1,1]},CORNERS:{permutation:[0,1,2,3,5,6,7,4],orientation:[0,0,0,0,0,0,0,0]},CENTERS:{permutation:[0,4,1,2,3,5],orientation:[0,0,0,0,0,1]}}}};Fe.moves.Uw=Fe.moves.u;Fe.moves.Lw=Fe.moves.l;Fe.moves.Fw=Fe.moves.f;Fe.moves.Rw=Fe.moves.r;Fe.moves.Bw=Fe.moves.b;Fe.moves.Dw=Fe.moves.d;Fe.moves.Rv=Fe.moves.x;Fe.moves.Uv=Fe.moves.y;Fe.moves.Fv=Fe.moves.z;Fe.moves.Lv={EDGES:{permutation:[2,10,6,11,0,8,4,9,1,3,5,7],orientation:[1,0,1,0,1,0,1,0,0,0,0,0]},CORNERS:{permutation:[1,7,6,2,0,3,5,4],orientation:[2,1,2,1,1,2,1,2]},CENTERS:{permutation:[4,1,0,3,5,2],orientation:[2,1,0,3,2,0]}};Fe.moves.Dv={EDGES:{permutation:[3,0,1,2,7,4,5,6,9,11,8,10],orientation:[0,0,0,0,0,0,0,0,1,1,1,1]},CORNERS:{permutation:[3,0,1,2,5,6,7,4],orientation:[0,0,0,0,0,0,0,0]},CENTERS:{permutation:[0,4,1,2,3,5],orientation:[3,0,0,0,0,1]}};Fe.moves.Bv={EDGES:{permutation:[8,5,10,1,9,7,11,3,4,0,6,2],orientation:[1,1,1,1,1,1,1,1,1,1,1,1]},CORNERS:{permutation:[4,7,1,0,5,3,2,6],orientation:[1,2,1,2,2,1,2,1]},CENTERS:{permutation:[3,0,2,5,4,1],orientation:[3,3,3,3,1,3]}}});var bn,Ce=U(()=>{Q0();Eo();ko();K2();Q0();bn=new be(Fe)});var Q2=U(()=>{Ce()});var Am,i8,j2=U(()=>{Am={"333":{puzzleID:"3x3x3",eventName:"3x3x3 Cube"},"222":{puzzleID:"2x2x2",eventName:"2x2x2 Cube"},"444":{puzzleID:"4x4x4",eventName:"4x4x4 Cube"},"555":{puzzleID:"5x5x5",eventName:"5x5x5 Cube"},"666":{puzzleID:"6x6x6",eventName:"6x6x6 Cube"},"777":{puzzleID:"7x7x7",eventName:"7x7x7 Cube"},"333bf":{puzzleID:"3x3x3",eventName:"3x3x3 Blindfolded"},"333fm":{puzzleID:"3x3x3",eventName:"3x3x3 Fewest Moves"},"333oh":{puzzleID:"3x3x3",eventName:"3x3x3 One-Handed"},clock:{puzzleID:"clock",eventName:"Clock"},minx:{puzzleID:"megaminx",eventName:"Megaminx"},pyram:{puzzleID:"pyraminx",eventName:"Pyraminx"},skewb:{puzzleID:"skewb",eventName:"Skewb"},sq1:{puzzleID:"square1",eventName:"Square-1"},"444bf":{puzzleID:"4x4x4",eventName:"4x4x4 Blindfolded"},"555bf":{puzzleID:"5x5x5",eventName:"5x5x5 Blindfolded"},"333mb":{puzzleID:"3x3x3",eventName:"3x3x3 Multi-Blind"}},i8={...Am,fto:{puzzleID:"fto",eventName:"Face-Turning Octahedron"},master_tetraminx:{puzzleID:"master_tetraminx",eventName:"Master Tetraminx"},kilominx:{puzzleID:"kilominx",eventName:"Kilominx"},redi_cube:{puzzleID:"redi_cube",eventName:"Redi Cube"}}});function _m(e){switch(e){case"Regular":return ym;case"Dim":return vm;case"Ignored":return Um;case"OrientationStickers":return bm;case"Invisible":return xm;case"IgnoreNonPrimary":return Sm;case"PermuteNonPrimary":return wm;case"Ignoriented":return Em;case"OrientationWithoutPermutation":return km}}var _o,wn,Ct,qe,Sn,Gl,Kr,ym,Um,bm,xm,Sm,wm,vm,Em,km,zo,Co,Po=U(()=>{_o=(f=>(f.Regular="Regular",f.Dim="Dim",f.Ignored="Ignored",f.OrientationStickers="OrientationStickers",f.Invisible="Invisible",f.Ignoriented="Ignoriented",f.IgnoreNonPrimary="IgnoreNonPrimary",f.PermuteNonPrimary="PermuteNonPrimary",f.OrientationWithoutPermutation="OrientationWithoutPermutation",f))(_o||{}),wn=class{constructor(t,r){this.stickerings=new Map;for(let[n,o]of Object.entries(t.definition.orbits))this.stickerings.set(n,new Array(o.numPieces).fill(r))}},Ct="regular",qe="ignored",Sn="oriented",Gl="invisible",Kr="dim",ym={facelets:[Ct,Ct,Ct,Ct,Ct]},Um={facelets:[qe,qe,qe,qe,qe]},bm={facelets:[Sn,Sn,Sn,Sn,Sn]},xm={facelets:[Gl,Gl,Gl,Gl]},Sm={facelets:[Ct,qe,qe,qe,qe]},wm={facelets:[Kr,Ct,Ct,Ct,Ct]},vm={facelets:[Kr,Kr,Kr,Kr,Kr]},Em={facelets:[Kr,qe,qe,qe,qe]},km={facelets:[Sn,qe,qe,qe,qe]};zo=class extends wn{constructor(t){super(t,"Regular")}set(t,r){for(let[n,o]of this.stickerings.entries())for(let l=0;l<o.length;l++)t.stickerings.get(n)[l]&&(o[l]=r);return this}toAppearance(){let t={orbits:{}};for(let[r,n]of this.stickerings.entries()){let o=[],l={pieces:o};t.orbits[r]=l;for(let i of n)o.push(_m(i))}return t}},Co=class{constructor(t){this.kpuzzle=t}and(t){let r=new wn(this.kpuzzle,!1);for(let[n,o]of Object.entries(this.kpuzzle.definition.orbits)){e:for(let l=0;l<o.numPieces;l++){r.stickerings.get(n)[l]=!0;for(let i of t)if(!i.stickerings.get(n)[l]){r.stickerings.get(n)[l]=!1;continue e}}}return r}or(t){let r=new wn(this.kpuzzle,!1);for(let[n,o]of Object.entries(this.kpuzzle.definition.orbits)){e:for(let l=0;l<o.numPieces;l++){r.stickerings.get(n)[l]=!1;for(let i of t)if(i.stickerings.get(n)[l]){r.stickerings.get(n)[l]=!0;continue e}}}return r}not(t){let r=new wn(this.kpuzzle,!1);for(let[n,o]of Object.entries(this.kpuzzle.definition.orbits))for(let l=0;l<o.numPieces;l++)r.stickerings.get(n)[l]=!t.stickerings.get(n)[l];return r}all(){return this.and(this.moves([]))}move(t){let r=this.kpuzzle.moveToTransformation(t),n=new wn(this.kpuzzle,!1);for(let[o,l]of Object.entries(this.kpuzzle.definition.orbits))for(let i=0;i<l.numPieces;i++)(r.transformationData[o].permutation[i]!==i||r.transformationData[o].orientation[i]!==0)&&(n.stickerings.get(o)[i]=!0);return n}moves(t){return t.map(r=>this.move(r))}}});function zm(e){(async()=>{q2=e;let t=Array.from(document.body.querySelectorAll("twisty-player"));console.log(\`Setting the custom stickering for \${t.length} players!\`);let r=[];for(let n of t)r.push((async()=>{let o=await n.experimentalModel.twistySceneModel.stickering.get();n.experimentalStickering=o==="experimental-global-custom-1"?"experimental-global-custom-2":"experimental-global-custom-1"})());await Promise.all(r),console.log("Success!")})()}function V2(e,t){q2(e,t)}var q2,H2=U(()=>{Po();q2=()=>{};globalThis.location&&new URL(location.href).searchParams.get("global-custom-stickerer")==="true"&&(window.setGlobalCustomStickerer=zm,window.PieceStickering=_o,console.log("Global custom stickerer enabled! (using: global-custom-stickerer=true)"),console.log("Look here for inspiration:","https://github.com/cubing/cubing.js/blob/81b5cab3e27d8defb39dd1e0a10bc9e8ba894d26/src/cubing/puzzles/stickerings/cube-stickerings.ts#L67"))});async function Pt(e,t){let r=await e.kpuzzle(),n=new zo(r),o=new Co(r),l=()=>o.move("U"),i=()=>o.or(o.moves(["U","D"])),a=()=>o.not(i()),s=()=>o.or(o.moves(["L","R"])),f=()=>o.not(s()),g=()=>o.or(o.moves(["F","B"])),p=()=>o.not(g()),u=()=>o.not(l()),c=()=>o.and([l(),f(),p()]),m=()=>o.and([o.and(o.moves(["F","R"])),o.not(i())]),L=()=>o.and(o.moves(["D","R","F"])),R=()=>o.or([L(),m()]),h=()=>o.or([o.and([f(),a()]),o.and([f(),p()]),o.and([a(),p()])]),y=()=>o.or([o.and([f(),i(),g()]),o.and([a(),s(),g()]),o.and([p(),i(),s()])]),A=()=>o.not(o.or([h(),y()])),E=()=>o.or([f(),o.and([l(),y()])]);function v(){n.set(u(),"Dim")}function K(){n.set(l(),"PermuteNonPrimary"),n.set(c(),"Dim")}function Z(){n.set(l(),"IgnoreNonPrimary"),n.set(c(),"Regular")}function M(){n.set(l(),"Ignoriented"),n.set(c(),"Dim")}switch(t){case"full":break;case"PLL":v(),K();break;case"CLS":v(),n.set(o.and(o.moves(["D","R","F"])),"Regular"),n.set(l(),"Ignoriented"),n.set(o.and([l(),f(),p()]),"Dim"),n.set(o.and([l(),A()]),"IgnoreNonPrimary");break;case"OLL":v(),Z();break;case"COLL":v(),K(),n.set(o.and([l(),A()]),"Regular");break;case"OCLL":v(),M(),n.set(o.and([l(),A()]),"IgnoreNonPrimary");break;case"CLL":v(),n.set(o.not(o.and([A(),l()])),"Dim");break;case"ELL":v(),n.set(l(),"Dim"),n.set(o.and([l(),y()]),"Regular");break;case"ELS":v(),Z(),n.set(o.and([l(),A()]),"Ignored"),n.set(m(),"Regular"),n.set(L(),"Ignored");break;case"LL":v();break;case"F2L":n.set(l(),"Ignored");break;case"ZBLL":v(),n.set(l(),"PermuteNonPrimary"),n.set(c(),"Dim"),n.set(o.and([l(),A()]),"Regular");break;case"ZBLS":v(),n.set(R(),"Regular"),Z(),n.set(o.and([l(),A()]),"Ignored");break;case"WVLS":case"VLS":v(),n.set(R(),"Regular"),Z();break;case"LS":v(),n.set(R(),"Regular"),n.set(l(),"Ignored"),n.set(c(),"Dim");break;case"EO":n.set(A(),"Ignored"),n.set(y(),"OrientationWithoutPermutation");break;case"EOline":n.set(A(),"Ignored"),n.set(y(),"OrientationWithoutPermutation"),n.set(o.and(o.moves(["D","M"])),"Regular");break;case"EOcross":n.set(y(),"OrientationWithoutPermutation"),n.set(o.move("D"),"Regular"),n.set(A(),"Ignored");break;case"CMLL":n.set(u(),"Dim"),n.set(E(),"Ignored"),n.set(o.and([l(),A()]),"Regular");break;case"L6E":n.set(o.not(E()),"Dim");break;case"L6EO":n.set(o.not(E()),"Dim"),n.set(E(),"OrientationWithoutPermutation"),n.set(o.and([h(),i()]),"OrientationStickers");break;case"Daisy":n.set(o.all(),"Ignored"),n.set(h(),"Dim"),n.set(o.and([o.move("D"),h()]),"Regular"),n.set(o.and([o.move("U"),y()]),"IgnoreNonPrimary");break;case"Cross":n.set(o.all(),"Ignored"),n.set(h(),"Dim"),n.set(o.and([o.move("D"),h()]),"Regular"),n.set(o.and([o.move("D"),y()]),"Regular");break;case"2x2x2":n.set(o.or(o.moves(["U","F","R"])),"Ignored"),n.set(o.and([o.or(o.moves(["U","F","R"])),h()]),"Dim");break;case"2x2x3":n.set(o.all(),"Dim"),n.set(o.or(o.moves(["U","F","R"])),"Ignored"),n.set(o.and([o.or(o.moves(["U","F","R"])),h()]),"Dim"),n.set(o.and([o.move("F"),o.not(o.or(o.moves(["U","R"])))]),"Regular");break;case"Void Cube":n.set(h(),"Invisible");break;case"picture":case"invisible":n.set(o.all(),"Invisible");break;case"centers-only":n.set(o.not(h()),"Ignored");break;case"experimental-global-custom-1":case"experimental-global-custom-2":V2(n,o);break;default:console.warn(\`Unsupported stickering for \${e.id}: \${t}. Setting all pieces to dim.\`),n.set(o.and(o.moves([])),"Dim")}return n.toAppearance()}async function vn(){return["full","PLL","CLS","OLL","COLL","OCLL","ELL","ELS","LL","F2L","ZBLL","ZBLS","WVLS","VLS","LS","EO","EOline","EOcross","CMLL","L6E","L6EO","Daisy","Cross","2x2x2","2x2x3","Void Cube","picture","invisible","centers-only"]}var En=U(()=>{Po();H2()});function de(e){let t=null;return()=>t??(t=e())}var Mt=U(()=>{});var Mo,Y2=U(()=>{Mo=class{constructor(t,r){this.facenames=t;this.prefixFree=!0;this.gripnames=[];r&&(this.gripnames=r);for(let n=0;this.prefixFree&&n<t.length;n++)for(let o=0;this.prefixFree&&o<t.length;o++)n!==o&&t[n].startsWith(t[o])&&(this.prefixFree=!1)}setGripNames(t){this.gripnames=t}splitByFaceNames(t){let r=[],n=0;for(;n<t.length;){n>0&&n<t.length&&t[n]==="_"&&n++;let o=-1;for(let l=0;l<this.facenames.length;l++)t.substr(n).startsWith(this.facenames[l])&&(o<0||this.facenames[l].length>this.facenames[o].length)&&(o=l);if(o>=0)r.push(o),n+=this.facenames[o].length;else throw new Error("Could not split "+t+" into face names.")}return r}joinByFaceIndices(t){let r="",n=[];for(let o=0;o<t.length;o++)n.push(r),n.push(this.facenames[t[o]]),this.prefixFree||(r="_");return n.join("")}spinmatch(t,r){if(t===r)return!0;try{let n=this.splitByFaceNames(t),o=this.splitByFaceNames(r);if(n.length!==o.length&&n.length<3)return!1;for(let l=0;l<n.length;l++){for(let a=0;a<l;a++)if(n[l]===n[a])return!1;let i=!1;for(let a=0;a<o.length;a++)if(n[l]===o[a]){i=!0;break}if(!i)return!1}return!0}catch{return!1}}spinmatchv(t,r){return t.endsWith("v")&&r.endsWith("v")?this.spinmatch(t.slice(0,t.length-1),r.slice(0,r.length-1)):this.spinmatch(t,r)}unswizzle(t){(t.endsWith("v")||t.endsWith("w"))&&t[0]<="Z"&&(t=t.slice(0,t.length-1));let r=t.toUpperCase();for(let n=0;n<this.gripnames.length;n++){let o=this.gripnames[n];if(this.spinmatch(r,o))return o}return t}}});var kn,J2=U(()=>{kn=class{notationToInternal(t){return t}notationToExternal(t){return t}}});var Ol,Z2=U(()=>{Le();Ol=class{constructor(t,r){this.child=t;this.sw=r}notationToInternal(t){return t.family==="T"&&t.innerLayer===void 0&&t.outerLayer===void 0?new B(new C("FLRv",t.innerLayer,t.outerLayer),t.amount):this.child.notationToInternal(t)}notationToExternal(t){let r=t.family;return r.length>0&&r[r.length-1]==="v"&&(r=r.substring(0,r.length-1)),this.sw.spinmatch(r,"FLUR")?new B(new C("T",t.innerLayer,t.outerLayer),t.amount):this.child.notationToExternal(t)}}});var No,X2=U(()=>{Le();No=class{constructor(t,r){this.internalNames=t;this.externalNames=r}convertString(t,r,n){let o="";(t.endsWith("v")||t.endsWith("v"))&&t<="_"&&(o=t.slice(t.length-1),t=t.slice(0,t.length-1));let l=t.toUpperCase(),i=!1;return t!==l&&(i=!0,t=l),t=n.joinByFaceIndices(r.splitByFaceNames(t)),i&&(t=t.toLowerCase()),t+o}convert(t,r,n){let o=t.family,l=this.convertString(o,r,n);return o===l?t:new B(new C(l,t.innerLayer,t.outerLayer),t.amount)}notationToInternal(t){return this.convert(t,this.externalNames,this.internalNames)}notationToExternal(t){return this.convert(t,this.internalNames,this.externalNames)}}});var Il,$2=U(()=>{Le();Il=class{constructor(t){this.child=t}notationToInternal(t){if(t.innerLayer===void 0&&t.outerLayer===void 0){if(Math.abs(t.amount)===1){if(t.family==="R++")return new B(new C("L",3,2),-2*t.amount);if(t.family==="R--")return new B(new C("L",3,2),2*t.amount);if(t.family==="D++")return new B(new C("U",3,2),-2*t.amount);if(t.family==="D--")return new B(new C("U",3,2),2*t.amount);if(t.family==="R_PLUSPLUS_")return new B(new C("L",3,2),-2*t.amount);if(t.family==="D_PLUSPLUS_")return new B(new C("U",3,2),-2*t.amount)}if(t.family==="y")return new B("Uv",t.amount)}return this.child.notationToInternal(t)}notationToExternal(t){return t.family==="Uv"?new B(new C("y",t.innerLayer,t.outerLayer),t.amount):t.family==="Dv"?new B("y",-t.amount):this.child.notationToExternal(t)}}});var Wl,ef=U(()=>{Le();Wl=class{constructor(t){this.slices=t}notationToInternal(t){let r=t.family;return!t.innerLayer&&!t.outerLayer&&(r==="x"?t=new B("Rv",t.amount):r==="y"?t=new B("Uv",t.amount):r==="z"&&(t=new B("Fv",t.amount)),(this.slices&1)===1&&(r==="E"?t=new B(new C("D",(this.slices+1)/2),t.amount):r==="M"?t=new B(new C("L",(this.slices+1)/2),t.amount):r==="S"&&(t=new B(new C("F",(this.slices+1)/2),t.amount))),this.slices>2&&(r==="e"?t=new B(new C("D",this.slices-1,2),t.amount):r==="m"?t=new B(new C("L",this.slices-1,2),t.amount):r==="s"&&(t=new B(new C("F",this.slices-1,2),t.amount)))),t}notationToExternal(t){let r=t.family;if(!t.innerLayer&&!t.outerLayer){if(r==="Rv")return new B("x",t.amount);if(r==="Uv")return new B("y",t.amount);if(r==="Fv")return new B("z",t.amount);if(r==="Lv")return new B("x",-t.amount);if(r==="Dv")return new B("y",-t.amount);if(r==="Bv")return new B("z",-t.amount)}return t}}});var Cm,Pm,tf,rf,nf,To,Kl,of=U(()=>{Le();Cm={U:"frl",L:"fld",R:"fdr",B:"dlr",u:"FRL",l:"FLD",r:"FDR",b:"DLR",Uv:"FRLv",Lv:"FLDv",Rv:"FDRv",Bv:"DLRv",D:"D",F:"F",BL:"L",BR:"R"},Pm={U:"FRL",L:"FLD",R:"FDR",B:"DLR",u:"frl",l:"fld",r:"fdr",b:"dlr",Uv:"FRLv",Lv:"FLDv",Rv:"FDRv",Bv:"DLRv",D:"D",F:"F",BL:"L",BR:"R",d:"d",f:"f",bl:"l",br:"r"},tf={U:"FRL",L:"FLD",R:"FDR",B:"DLR"},rf=new C("y"),nf=new C("Dv"),To=class{constructor(t){this.child=t;this.wcaHack=!1;this.map=Cm}notationToInternal(t){if(this.wcaHack&&t.innerLayer===2&&t.outerLayer===null){let n=tf[t.family];if(n)return new B(new C(n,t.innerLayer,t.outerLayer),t.amount)}let r=this.map[t.family];return r?new B(new C(r,t.innerLayer,t.outerLayer),t.amount):rf.isIdentical(t.quantum)?new B(nf,-t.amount):null}notationToExternal(t){if(this.wcaHack&&t.innerLayer===2&&t.outerLayer===null){for(let[r,n]of Object.entries(tf))if(this.child.spinmatch(t.family,n))return new B(new C(r,t.innerLayer,t.outerLayer),t.amount)}for(let[r,n]of Object.entries(this.map))if(this.child.spinmatch(t.family,n))return new B(new C(r,t.innerLayer,t.outerLayer),t.amount);return nf.isIdentical(t.quantum)?new B(rf,-t.amount):null}},Kl=class extends To{constructor(t){super(t);this.map=Pm}}});var lf,j0,af,Mm,q0,sf,Nm,V0,ff,Tm,Ql,uf=U(()=>{Le();lf={U:"UBL",UL:"ULF",F:"UFR",UR:"URB",B:"DBL",D:"DFR",L:"DLF",R:"DRB",Uv:"UBLv",ULv:"ULFv",Fv:"UFRv",URv:"URBv",Bv:"DBLv",Dv:"DFRv",Lv:"DLFv",Rv:"DRBv"},j0=new C("x"),af=new C("Rv"),Mm=new C("Lv"),q0=new C("y"),sf=new C("Uv"),Nm=new C("Dv"),V0=new C("z"),ff=new C("Fv"),Tm=new C("Bv"),Ql=class{constructor(t){this.child=t}notationToInternal(t){if(t.innerLayer||t.outerLayer)return null;let r=lf[t.family];return r?new B(new C(r,t.outerLayer,t.innerLayer),t.amount):j0.isIdentical(t.quantum)?new B(af,t.amount):q0.isIdentical(t.quantum)?new B(sf,t.amount):V0.isIdentical(t.quantum)?new B(ff,t.amount):null}notationToExternal(t){for(let[r,n]of Object.entries(lf))if(this.child.spinmatchv(t.family,n))return new B(new C(r,t.innerLayer,t.outerLayer),t.amount);return af.isIdentical(t.quantum)?new B(j0,t.amount):Mm.isIdentical(t.quantum)?new B(j0,-t.amount):sf.isIdentical(t.quantum)?new B(q0,t.amount):Nm.isIdentical(t.quantum)?new B(q0,-t.amount):ff.isIdentical(t.quantum)?new B(V0,t.amount):Tm.isIdentical(t.quantum)?new B(V0,-t.amount):null}}});var H0=U(()=>{J2();Z2();X2();$2();ef();of();uf()});function gf(e){let t=0,r={};for(;t<e.length&&e[t][0]==="-";){let o=e[t++];if(o==="--rotations")r.addRotations=!0;else if(o==="--allmoves")r.allMoves=!0;else if(o==="--outerblockmoves")r.outerBlockMoves=!0;else if(o==="--vertexmoves")r.vertexMoves=!0;else if(o==="--nocorners")r.includeCornerOrbits=!1;else if(o==="--noedges")r.includeEdgeOrbits=!1;else if(o==="--noorientation")r.fixedOrientation=!0;else if(o==="--nocenters")r.includeCenterOrbits=!1;else if(o==="--omit")r.excludeOrbits=e[t].split(","),t++;else if(o==="--moves")r.moveList=e[t].split(","),t++;else if(o==="--optimize")r.optimizeOrbits=!0;else if(o==="--scramble")r.scrambleAmount=100;else if(o==="--fixcorner")r.fixedPieceType="v";else if(o==="--fixedge")r.fixedPieceType="e";else if(o==="--fixcenter")r.fixedPieceType="f";else if(o==="--orientcenters")r.orientCenters=!0;else if(o==="--puzzleorientation")r.puzzleOrientation=JSON.parse(e[t]),t++;else throw new Error("Bad option: "+o)}return{puzzleDescription:Go(e.slice(t).join(" ")),options:r}}var Y0,J0=U(()=>{jl();Y0=class{constructor(t={}){this.verbosity=0;this.allMoves=!1;this.vertexMoves=!1;this.addRotations=!1;this.moveList=null;this.fixedOrientation=!1;this.fixedPieceType=null;this.orientCenters=!1;this.includeCornerOrbits=!0;this.includeCenterOrbits=!0;this.includeEdgeOrbits=!0;this.excludeOrbits=[];this.optimizeOrbits=!1;this.grayCorners=!1;this.grayCenters=!1;this.grayEdges=!1;this.puzzleOrientation=null;this.puzzleOrientations=null;this.scrambleAmount=0;Object.assign(this,t)}}});function cr(e){if(!Z0[e]){let t=Array(e);for(let r=0;r<e;r++)t[r]=0;Z0[e]=t}return Z0[e]}function Nt(e){if(!X0[e]){let t=Array(e);for(let r=0;r<e;r++)t[r]=r;X0[e]=t}return X0[e]}function pf(e){return new mt(Nt(e))}function cf(e){let t=1;for(;e>1;)t*=e,e--;return t}function Gm(e,t){if(e>t){let r=e;e=t,t=r}for(;e>0;){let r=t%e;t=e,e=r}return t}function $0(e,t){return e/Gm(e,t)*t}var Z0,X0,mt,ql=U(()=>{Z0=[],X0=[];mt=class{constructor(t){this.n=t.length,this.p=t}toString(){return"Perm["+this.p.join(" ")+"]"}mul(t){let r=Array(this.n);for(let n=0;n<this.n;n++)r[n]=t.p[this.p[n]];return new mt(r)}rmul(t){let r=Array(this.n);for(let n=0;n<this.n;n++)r[n]=this.p[t.p[n]];return new mt(r)}inv(){let t=Array(this.n);for(let r=0;r<this.n;r++)t[this.p[r]]=r;return new mt(t)}compareTo(t){for(let r=0;r<this.n;r++)if(this.p[r]!==t.p[r])return this.p[r]-t.p[r];return 0}toGap(){let t=new Array,r=new Array(this.n);for(let n=0;n<this.p.length;n++){if(r[n]||this.p[n]===n)continue;let o=new Array;for(let l=n;!r[l];l=this.p[l])o.push(1+l),r[l]=!0;t.push("("+o.join(",")+")")}return t.join("")}order(){let t=1,r=new Array(this.n);for(let n=0;n<this.p.length;n++){if(r[n]||this.p[n]===n)continue;let o=0;for(let l=n;!r[l];l=this.p[l])o++,r[l]=!0;t=$0(t,o)}return t}}});function ta(e,t){let r=B.fromString(t),n=e.notationToExternal(r);return n===null||r===n?t:n.toString()}function mf(e,t){let r=e.moveops.length;if(r>30)throw new Error("Canon info too big for bitmask");let n=[],o=[];for(let i=0;i<r;i++){let a=e.moveops[i];n.push(a.order());let s=0;for(let f=0;f<r;f++){if(f===i)continue;let g=e.moveops[f];a.mul(g).equal(g.mul(a))&&(s|=1<<f)}o.push(s)}let l={};l[0]=1;for(let i=0;i<100;i++){let a=0,s={},f=0;for(let g in l){let p=+g,u=l[p];a+=u,f++;for(let c=0;c<n.length;c++)if((p>>c&1)===0&&(p&o[c]&(1<<c)-1)===0){let m=p&o[c]|1<<c;s[m]===void 0&&(s[m]=0),s[m]+=(n[c]-1)*u}}t(\`\${i}: canonseq \${a} states \${f}\`),l=s}}var Oo,Om,_n,bt,Yt,ra,mr,zn,ea,Lf=U(()=>{Le();H0();ql();Oo=class{constructor(t,r){this.size=t;this.mod=r}reassemblySize(){return cf(this.size)*Math.pow(this.mod,this.size)}},Om=0;_n=class{constructor(t,r,n,o,l){this.orbitnames=t;this.orbitdefs=r;this.solved=n;this.movenames=o;this.moveops=l}transformToKTransformationData(t){let r={};for(let n=0;n<this.orbitnames.length;n++)r[this.orbitnames[n]]=t.orbits[n].toKPuzzle();return r}static transformToKTransformationData(t,r){let n={};for(let o=0;o<t.length;o++)n[t[o]]=r.orbits[o].toKPuzzle();return n}toKsolve(t,r=new kn){let n=[];n.push("Name "+t),n.push("");for(let o=0;o<this.orbitnames.length;o++)n.push(\`Set \${this.orbitnames[o]} \${this.orbitdefs[o].size} \${this.orbitdefs[o].mod}\`);n.push(""),n.push("Solved");for(let o=0;o<this.orbitnames.length;o++)this.solved.orbits[o].appendDefinition(n,this.orbitnames[o],!1,!1);n.push("End");for(let o=0;o<this.movenames.length;o++){n.push("");let l=ta(r,this.movenames[o]),i=!1;l[l.length-1]==="'"&&(i=!0,l=l.substring(0,l.length-1)),n.push("Move "+l);for(let a=0;a<this.orbitnames.length;a++)i?this.moveops[o].orbits[a].inv().appendDefinition(n,this.orbitnames[a],!0):this.moveops[o].orbits[a].appendDefinition(n,this.orbitnames[a],!0);n.push("End")}return n}toKPuzzleDefinition(t){let r={},n={};for(let l=0;l<this.orbitnames.length;l++){r[this.orbitnames[l]]={numPieces:this.orbitdefs[l].size,numOrientations:this.orbitdefs[l].mod};let i=this.solved.orbits[l].toKPuzzle();n[this.orbitnames[l]]={pieces:i.permutation,orientation:i.orientation}}let o={};if(t)for(let l=0;l<this.movenames.length;l++)o[this.movenames[l]]=this.transformToKTransformationData(this.moveops[l]);return{name:\`PG3D #\${++Om}\`,orbits:r,startStateData:n,moves:o}}optimize(){let t=[],r=[],n=[],o=[];for(let l=0;l<this.moveops.length;l++)o.push([]);for(let l=0;l<this.orbitdefs.length;l++){let i=this.orbitdefs[l].mod,a=this.orbitdefs[l].size,s=new ea(a),f=new Array(this.orbitdefs[l].size);for(let c=0;c<a;c++)f[c]=!1;for(let c=0;c<this.moveops.length;c++)for(let m=0;m<a;m++)(this.moveops[c].orbits[l].perm[m]!==m||this.moveops[c].orbits[l].ori[m]!==0)&&(f[m]=!0,s.union(m,this.moveops[c].orbits[l].perm[m]));let g=!0;if(i>1){g=!1;let c=new ea(this.orbitdefs[l].size*i);for(let m=0;m<this.moveops.length;m++)for(let L=0;L<a;L++)if(this.moveops[m].orbits[l].perm[L]!==L||this.moveops[m].orbits[l].ori[L]!==0)for(let R=0;R<i;R++)c.union(L*i+R,this.moveops[m].orbits[l].perm[L]*i+(R+this.moveops[m].orbits[l].ori[L])%i);for(let m=0;!g&&m<a;m++)for(let L=1;L<i;L++)c.find(m*i)===c.find(m*i+L)&&(g=!0);for(let m=0;!g&&m<a;m++)for(let L=0;L<m;L++)this.solved.orbits[l].perm[m]===this.solved.orbits[l].perm[L]&&(g=!0)}let p=-1,u=!1;for(let c=0;c<this.orbitdefs[l].size;c++)if(f[c]){let m=s.find(c);p<0?p=m:p!==m&&(u=!0)}for(let c=0;c<this.orbitdefs[l].size;c++){if(!f[c]||s.find(c)!==c)continue;let L=[],R=[],h=0;for(let y=0;y<this.orbitdefs[l].size;y++)s.find(y)===c&&(L[h]=y,R[y]=h,h++);if(u?t.push(\`\${this.orbitnames[l]}_p\${c}\`):t.push(this.orbitnames[l]),g){r.push(new Oo(h,this.orbitdefs[l].mod)),n.push(this.solved.orbits[l].remapVS(L,h));for(let y=0;y<this.moveops.length;y++)o[y].push(this.moveops[y].orbits[l].remap(L,R,h))}else{r.push(new Oo(h,1)),n.push(this.solved.orbits[l].remapVS(L,h).killOri());for(let y=0;y<this.moveops.length;y++)o[y].push(this.moveops[y].orbits[l].remap(L,R,h).killOri())}}}return new _n(t,r,new zn(n),this.movenames,o.map(l=>new mr(l)))}scramble(t){this.solved=this.solved.mul(this.getScrambleTransformation(t))}getScrambleTransformation(t){t<100&&(t=100);let r=[];for(let o=0;o<this.moveops.length;o++)r[o]=this.moveops[o];for(let o=0;o<r.length;o++){let l=Math.floor(Math.random()*r.length),i=r[o];r[o]=r[l],r[l]=i}t<r.length&&(t=r.length);for(let o=0;o<t;o++){let l=Math.floor(Math.random()*r.length),i=Math.floor(Math.random()*r.length),a=Math.floor(Math.random()*this.moveops.length);r[l]=r[l].mul(r[i]).mul(this.moveops[a]),Math.random()<.1&&(r[l]=r[l].mul(this.moveops[a]))}let n=r[0];for(let o=1;o<r.length;o++)n=n.mul(r[o]);return n}reassemblySize(){let t=1;for(let r=0;r<this.orbitdefs.length;r++)t*=this.orbitdefs[r].reassemblySize();return t}},bt=class{constructor(t,r,n){this.perm=t;this.ori=r;this.orimod=n}static e(t,r){return new bt(Nt(t),cr(t),r)}mul(t){let r=this.perm.length,n=new Array(r);if(this.orimod===1){for(let o=0;o<r;o++)n[o]=this.perm[t.perm[o]];return new bt(n,this.ori,this.orimod)}else{let o=new Array(r);for(let l=0;l<r;l++)n[l]=this.perm[t.perm[l]],o[l]=(this.ori[t.perm[l]]+t.ori[l])%this.orimod;return new bt(n,o,this.orimod)}}inv(){let t=this.perm.length,r=new Array(t),n=new Array(t);for(let o=0;o<t;o++)r[this.perm[o]]=o,n[this.perm[o]]=(this.orimod-this.ori[o])%this.orimod;return new bt(r,n,this.orimod)}equal(t){let r=this.perm.length;for(let n=0;n<r;n++)if(this.perm[n]!==t.perm[n]||this.ori[n]!==t.ori[n])return!1;return!0}killOri(){let t=this.perm.length;for(let r=0;r<t;r++)this.ori[r]=0;return this.orimod=1,this}toPerm(){let t=this.orimod;if(t===1)return new mt(this.perm);let r=this.perm.length,n=new Array(r*t);for(let o=0;o<r;o++)for(let l=0;l<t;l++)n[o*t+l]=t*this.perm[o]+(this.ori[o]+l)%t;return new mt(n)}identicalPieces(){let t=[],r=this.perm.length,n=[];for(let o=0;o<r;o++){let l=this.perm[o];if(t[l]===void 0){let i=[o];t[l]=!0;for(let a=o+1;a<r;a++)this.perm[a]===l&&i.push(a);n.push(i)}}return n}order(){return this.toPerm().order()}isIdentity(){let t=this.perm.length;if(this.perm===Nt(t)&&this.ori===cr(t))return!0;for(let r=0;r<t;r++)if(this.perm[r]!==r||this.ori[r]!==0)return!1;return!0}zeroOris(){let t=this.perm.length;if(this.ori===cr(t))return!0;for(let r=0;r<t;r++)if(this.ori[r]!==0)return!1;return!0}remap(t,r,n){let o=new Array(n),l=new Array(n);for(let i=0;i<n;i++)o[i]=r[this.perm[t[i]]],l[i]=this.ori[t[i]];return new bt(o,l,this.orimod)}remapVS(t,r){let n=new Array(r),o=new Array(r),l=0,i=[];for(let a=0;a<r;a++){let s=this.perm[t[a]];i[s]===void 0&&(i[s]=l++),n[a]=i[s],o[a]=this.ori[t[a]]}return new bt(n,o,this.orimod)}appendDefinition(t,r,n,o=!0){if(!(o&&this.isIdentity())&&(t.push(r),t.push(this.perm.map(l=>l+1).join(" ")),!this.zeroOris()))if(n){let l=new Array(this.ori.length);for(let i=0;i<l.length;i++)l[this.perm[i]]=this.ori[i];t.push(l.join(" "))}else t.push(this.ori.join(" "))}toKPuzzle(){let t=this.perm.length;return this.isIdentity()?(bt.kcache[t]||(bt.kcache[t]={permutation:Nt(t),orientation:cr(t)}),bt.kcache[t]):{permutation:this.perm,orientation:this.ori}}},Yt=bt;Yt.kcache=[];ra=class{constructor(t){this.orbits=t}internalMul(t){let r=[];for(let n=0;n<this.orbits.length;n++)r.push(this.orbits[n].mul(t.orbits[n]));return r}internalInv(){let t=[];for(let r of this.orbits)t.push(r.inv());return t}equal(t){for(let r=0;r<this.orbits.length;r++)if(!this.orbits[r].equal(t.orbits[r]))return!1;return!0}killOri(){for(let t of this.orbits)t.killOri();return this}toPerm(){let t=new Array,r=0;for(let o of this.orbits){let l=o.toPerm();t.push(l),r+=l.n}let n=new Array(r);r=0;for(let o of t){for(let l=0;l<o.n;l++)n[r+l]=r+o.p[l];r+=o.n}return new mt(n)}identicalPieces(){let t=[],r=0;for(let n of this.orbits){let o=n.orimod,l=n.identicalPieces();for(let i=0;i<l.length;i++)t.push(l[i].map(a=>a*o+r));r+=o*n.perm.length}return t}order(){let t=1;for(let r of this.orbits)t=$0(t,r.order());return t}},mr=class extends ra{constructor(t){super(t)}mul(t){return new mr(this.internalMul(t))}mulScalar(t){if(t===0)return this.e();let r=this;for(t<0&&(r=r.inv(),t=-t);(t&1)===0;)r=r.mul(r),t>>=1;if(t===1)return r;let n=r,o=this.e();for(;t>0;)t&1&&(o=o.mul(n)),t>1&&(n=n.mul(n)),t>>=1;return o}inv(){return new mr(this.internalInv())}e(){return new mr(this.orbits.map(t=>Yt.e(t.perm.length,t.orimod)))}},zn=class extends ra{constructor(t){super(t)}mul(t){return new zn(this.internalMul(t))}},ea=class{constructor(t){this.n=t;this.heads=new Array(t);for(let r=0;r<t;r++)this.heads[r]=r}find(t){let r=this.heads[t];return this.heads[r]===r||(r=this.find(this.heads[r]),this.heads[t]=r),r}union(t,r){let n=this.find(t),o=this.find(r);n<o?this.heads[o]=n:n>o&&(this.heads[n]=o)}}});var Vl,Bf=U(()=>{Vl={"2x2x2":"c f 0","3x3x3":"c f 0.333333333333333","4x4x4":"c f 0.5 f 0","5x5x5":"c f 0.6 f 0.2","6x6x6":"c f 0.666666666666667 f 0.333333333333333 f 0","7x7x7":"c f 0.714285714285714 f 0.428571428571429 f 0.142857142857143","8x8x8":"c f 0.75 f 0.5 f 0.25 f 0","9x9x9":"c f 0.777777777777778 f 0.555555555555556 f 0.333333333333333 f 0.111111111111111","10x10x10":"c f 0.8 f 0.6 f 0.4 f 0.2 f 0","11x11x11":"c f 0.818181818181818 f 0.636363636363636 f 0.454545454545455 f 0.272727272727273 f 0.0909090909090909","12x12x12":"c f 0.833333333333333 f 0.666666666666667 f 0.5 f 0.333333333333333 f 0.166666666666667 f 0","13x13x13":"c f 0.846153846153846 f 0.692307692307692 f 0.538461538461538 f 0.384615384615385 f 0.230769230769231 f 0.0769230769230769","20x20x20":"c f 0 f .1 f .2 f .3 f .4 f .5 f .6 f .7 f .8 f .9","30x30x30":"c f 0 f .066667 f .133333 f .2 f .266667 f .333333 f .4 f .466667 f .533333 f .6 f .666667 f .733333 f .8 f .866667 f .933333","40x40x40":"c f 0 f .05 f .1 f .15 f .2 f .25 f .3 f .35 f .4 f .45 f .5 f .55 f .6 f .65 f .7 f .75 f .8 f .85 f .9 f .95",skewb:"c v 0","master skewb":"c v 0.275","professor skewb":"c v 0 v 0.38","compy cube":"c v 0.915641442663986",helicopter:"c e 0.707106781186547","curvy copter":"c e 0.83",dino:"c v 0.577350269189626","little chop":"c e 0",pyramorphix:"t e 0",mastermorphix:"t e 0.346184634065199",pyraminx:"t v 0.333333333333333 v 1.66666666666667",tetraminx:"t v 0.333333333333333","master pyraminx":"t v 0 v 1 v 2","master tetraminx":"t v 0 v 1","professor pyraminx":"t v -0.2 v 0.6 v 1.4 v 2.2","professor tetraminx":"t v -0.2 v 0.6 v 1.4","Jing pyraminx":"t f 0","master pyramorphix":"t e 0.866025403784437",megaminx:"d f 0.7",gigaminx:"d f 0.64 f 0.82",teraminx:"d f 0.64 f 0.76 f 0.88",petaminx:"d f 0.64 f 0.73 f 0.82 f 0.91",examinx:"d f 0.64 f 0.712 f 0.784 f 0.856 f 0.928",zetaminx:"d f 0.64 f 0.7 f 0.76 f 0.82 f 0.88 f 0.94",yottaminx:"d f 0.64 f 0.6914 f 0.7429 f 0.7943 f 0.8457 f 0.8971 f 0.9486",pentultimate:"d f 0","master pentultimate":"d f 0.1","elite pentultimate":"d f 0 f 0.145905",starminx:"d v 0.937962370425399","starminx 2":"d f 0.23606797749979","pyraminx crystal":"d f 0.447213595499989",chopasaurus:"d v 0","big chop":"d e 0","skewb diamond":"o f 0",FTO:"o f 0.333333333333333","master FTO":"o f 0.5 f 0","Christopher's jewel":"o v 0.577350269189626",octastar:"o e 0","Trajber's octahedron":"o v 0.433012701892219","radio chop":"i f 0",icosamate:"i v 0","icosahedron 2":"i v 0.18759247376021","icosahedron 3":"i v 0.18759247376021 e 0","icosahedron static faces":"i v 0.84","icosahedron moving faces":"i v 0.73","Eitan's star":"i f 0.61803398874989","2x2x2 + dino":"c f 0 v 0.577350269189626","2x2x2 + little chop":"c f 0 e 0","dino + little chop":"c v 0.577350269189626 e 0","2x2x2 + dino + little chop":"c f 0 v 0.577350269189626 e 0","megaminx + chopasaurus":"d f 0.61803398875 v 0","starminx combo":"d f 0.23606797749979 v 0.937962370425399"}});function Hl(e){let t=new O(0,0,0,0);for(let r=0;r<e.length;r++)t=t.sum(e[r]);return t.smul(1/e.length)}function Rf(e,t,r,n){let o=n[e].intersect3(n[t],n[r]);if(!o)return o;for(let l=0;l<n.length;l++)if(l!==e&&l!==t&&l!==r){let i=n[l].b*o.b+n[l].c*o.c+n[l].d*o.d;if(n[l].a>0&&i>n[l].a||n[l].a<0&&i<n[l].a)return!1}return o}var O,Yl=U(()=>{O=class{constructor(t,r,n,o){this.a=t;this.b=r;this.c=n;this.d=o}mul(t){return new O(this.a*t.a-this.b*t.b-this.c*t.c-this.d*t.d,this.a*t.b+this.b*t.a+this.c*t.d-this.d*t.c,this.a*t.c-this.b*t.d+this.c*t.a+this.d*t.b,this.a*t.d+this.b*t.c-this.c*t.b+this.d*t.a)}toString(){return\`Q[\${this.a},\${this.b},\${this.c},\${this.d}]\`}dist(t){return Math.hypot(this.a-t.a,this.b-t.b,this.c-t.c,this.d-t.d)}len(){return Math.hypot(this.a,this.b,this.c,this.d)}cross(t){return new O(0,this.c*t.d-this.d*t.c,this.d*t.b-this.b*t.d,this.b*t.c-this.c*t.b)}dot(t){return this.b*t.b+this.c*t.c+this.d*t.d}normalize(){let t=Math.sqrt(this.dot(this));return new O(this.a/t,this.b/t,this.c/t,this.d/t)}makenormal(){return new O(0,this.b,this.c,this.d).normalize()}normalizeplane(){let t=Math.hypot(this.b,this.c,this.d);return new O(this.a/t,this.b/t,this.c/t,this.d/t)}smul(t){return new O(this.a*t,this.b*t,this.c*t,this.d*t)}sum(t){return new O(this.a+t.a,this.b+t.b,this.c+t.c,this.d+t.d)}sub(t){return new O(this.a-t.a,this.b-t.b,this.c-t.c,this.d-t.d)}angle(){return 2*Math.acos(this.a)}invrot(){return new O(this.a,-this.b,-this.c,-this.d)}det3x3(t,r,n,o,l,i,a,s,f){return t*(l*f-i*s)+r*(i*a-o*f)+n*(o*s-l*a)}rotateplane(t){let r=t.mul(new O(0,this.b,this.c,this.d)).mul(t.invrot());return r.a=this.a,r}orthogonal(){let t=Math.abs(this.b),r=Math.abs(this.c),n=Math.abs(this.d);return t<r&&t<n?this.cross(new O(0,1,0,0)).normalize():r<t&&r<n?this.cross(new O(0,0,1,0)).normalize():this.cross(new O(0,0,0,1)).normalize()}pointrotation(t){let r=this.normalize();if(t=t.normalize(),r.sub(t).len()<1e-9)return new O(1,0,0,0);let n=r.sum(t);n.len()<1e-9?n=n.orthogonal():n=n.normalize();let o=r.cross(n);return o.a=r.dot(n),o}unproject(t){return this.sum(t.smul(-this.dot(t)/(this.len()*t.len())))}rotatepoint(t){return t.mul(this).mul(t.invrot())}rotateface(t){return t.map(r=>r.rotatepoint(this))}intersect3(t,r){let n=this.det3x3(this.b,this.c,this.d,t.b,t.c,t.d,r.b,r.c,r.d);return Math.abs(n)<1e-9?!1:new O(0,this.det3x3(this.a,this.c,this.d,t.a,t.c,t.d,r.a,r.c,r.d)/n,this.det3x3(this.b,this.a,this.d,t.b,t.a,t.d,r.b,r.a,r.d)/n,this.det3x3(this.b,this.c,this.a,t.b,t.c,t.a,r.b,r.c,r.a)/n)}side(t){return t>1e-9?1:t<-1e-9?-1:0}cutface(t){let r=this.a,n=0,o=null;for(let l=0;l<t.length;l++)n|=1<<this.side(t[l].dot(this)-r)+1;if((n&5)===5){o=[];let l=t.map(i=>this.side(i.dot(this)-r));for(let i=-1;i<=1;i+=2){let a=[];for(let s=0;s<t.length;s++){(l[s]===i||l[s]===0)&&a.push(t[s]);let f=(s+1)%t.length;if(l[s]+l[f]===0&&l[s]!==0){let g=t[s].dot(this)-r,p=t[f].dot(this)-r,u=g/(g-p),c=t[s].smul(1-u).sum(t[f].smul(u));a.push(c)}}o.push(a)}}return o}cutfaces(t){let r=[];for(let n=0;n<t.length;n++){let o=t[n],l=this.cutface(o);l?(r.push(l[0]),r.push(l[1])):r.push(o)}return r}faceside(t){let r=this.a;for(let n=0;n<t.length;n++){let o=this.side(t[n].dot(this)-r);if(o!==0)return o}throw new Error("Could not determine side of plane in faceside")}sameplane(t){let r=this.normalize(),n=t.normalize();return r.dist(n)<1e-9||r.dist(n.smul(-1))<1e-9}makecut(t){return new O(t,this.b,this.c,this.d)}}});function df(){let e=Math.sqrt(.5);return[new O(e,e,0,0),new O(e,0,e,0)]}function hf(){return[new O(.5,.5,.5,.5),new O(.5,.5,.5,-.5)]}function Ff(){let e=2*Math.PI/10,t=.5+.3*Math.sqrt(5),r=.5+.1*Math.sqrt(5),n=Math.sqrt(t*t+r*r);return t/=n,r/=n,[new O(Math.cos(e),t*Math.sin(e),r*Math.sin(e),0),new O(.5,.5,.5,.5)]}function Df(){let e=.16666666666666666+Math.sqrt(5)/6,t=2/3+Math.sqrt(5)/3,r=Math.sqrt(e*e+t*t);e/=r,t/=r;let n=2*Math.PI/6;return[new O(Math.cos(n),e*Math.sin(n),t*Math.sin(n),0),new O(Math.cos(n),-e*Math.sin(n),t*Math.sin(n),0)]}function Af(){let e=Math.sqrt(.5);return[new O(.5,.5,.5,.5),new O(e,0,0,e)]}function yf(e){let t=[new O(1,0,0,0)];for(let r=0;r<t.length;r++)for(let n=0;n<e.length;n++){let o=e[n].mul(t[r]),l=o.smul(-1),i=!1;for(let a=0;a<t.length;a++)if(o.dist(t[a])<Jl||l.dist(t[a])<Jl){i=!0;break}i||t.push(o)}return t}function na(e,t){let r=[],n=[];for(let o=0;o<t.length;o++){let l=e.rotateplane(t[o]),i=!1;for(let a=0;a<r.length;a++)if(l.dist(r[a])<Jl){i=!0;break}i||(r.push(l),n.push(t[o]))}return n}function oa(e){let t=[];for(let r=1;r<e.length;r++)for(let n=r+1;n<e.length;n++){let o=Rf(0,r,n,e);if(o){let l=!1;for(let i=0;i<t.length;i++)if(o.dist(t[i])<Jl){l=!0;break}l||t.push(o)}}for(;;){let r=!1;for(let n=0;n<t.length;n++){let o=(n+1)%t.length;if(e[0].dot(t[n].cross(t[o]))<0){let l=t[n];t[n]=t[o],t[o]=l,r=!0}}if(!r)break}return t}var Jl,Uf=U(()=>{Yl();Jl=1e-9});function Zl(e,t){let r=e[0].p.length,n=pf(r),o=[],l=[],i=[],a=[],s=[];function f(c){for(let m=c.p.length-1;m>=0;m--){let L=c.p[m];if(L!==m){if(!o[m][L])return!1;c=c.mul(l[m][L])}}return!0}function g(c,m,L){a[c].push(m),s[c].push(L);for(let R=0;R<o[c].length;R++)o[c][R]&&p(c,o[c][R].mul(m),L+i[c][R])}function p(c,m,L){let R=m.p[c];if(!o[c][R]){o[c][R]=m,l[c][R]=m.inv(),i[c][R]=L;for(let y=0;y<a[c].length;y++)p(c,m.mul(a[c][y]),L+s[c][y]);return}let h=m.mul(l[c][R]);f(h)||g(c-1,h,L+i[c][R])}function u(){o=[],l=[],a=[],i=[],s=[];for(let L=0;L<r;L++)o.push([]),l.push([]),i.push([]),a.push([]),s.push([]),o[L][L]=n,l[L][L]=n,i[L][L]=0;let c=0,m=1;for(let L=0;L<e.length;L++){g(r-1,e[L],1),m=1;let R=0,h=0,y=[],A=new bf;for(let E=0;E<r;E++){let v=0,K=0;for(let M=0;M<r;M++)o[E][M]&&(v++,K+=i[E][M],E!==M&&c++);R+=a[E].length,m*=v,v>1&&A.multiply(v);let Z=K/v;y.push(Z),h+=Z}t(\`\${L}: sz \${m} T \${R} sol \${h} none \${c} mults \${A.toString()}\`)}return m}return u()}var bf,la=U(()=>{ql();bf=class{constructor(){this.mult=[]}multiply(t){for(let r=2;r*r<=t;r++)for(;t%r===0;)this.mult[r]!==void 0?this.mult[r]++:this.mult[r]=1,t/=r;t>1&&(this.mult[t]!==void 0?this.mult[t]++:this.mult[t]=1)}toString(){let t="";for(let r=0;r<this.mult.length;r++)this.mult[r]!==void 0&&(t!==""&&(t+="*"),t+=r,this.mult[r]>1&&(t+=\`^\${this.mult[r]}\`));return t}}});function Im(e,t){let r=[];for(let n of e)for(let o of t)r.push(o.rotate(n));return r}function Qm(){return{4:[["F","D","L","R"]],6:[["F","D","L","U","R"],["R","F","","B",""]],8:[["F","D","L","R"],["D","F","BR",""],["BR","D","","BB"],["BB","BR","U","BL"]],12:[["U","F","","","",""],["F","U","R","C","A","L"],["R","F","","","E",""],["E","R","","BF","",""],["BF","E","BR","BL","I","D"]],20:[["R","C","F","E"],["F","R","L","U"],["L","F","A",""],["E","R","G","I"],["I","E","S","H"],["S","I","J","B"],["B","S","K","D"],["K","B","M","O"],["O","K","P","N"],["P","O","Q",""]]}}function jm(){return{4:{F:"#00ff00",D:"#ffff00",L:"#ff0000",R:"#0000ff"},6:{U:"#ffffff",F:"#00ff00",R:"#ff0000",D:"#ffff00",B:"#0000ff",L:"#ff8000"},8:{U:"#ffffff",F:"#ff0000",R:"#00bb00",D:"#ffff00",BB:"#1122ff",L:"#9524c5",BL:"#ff8800",BR:"#aaaaaa"},12:{U:"#ffffff",F:"#006633",R:"#ff0000",C:"#ffffd0",A:"#3399ff",L:"#660099",E:"#ff66cc",BF:"#99ff00",BR:"#0000ff",BL:"#ffff00",I:"#ff6633",D:"#999999"},20:{R:"#db69f0",C:"#178fde",F:"#23238b",E:"#9cc726",L:"#2c212d",U:"#177fa7",A:"#e0de7f",G:"#2b57c0",I:"#41126b",S:"#4b8c28",H:"#7c098d",J:"#7fe7b4",B:"#85fb74",K:"#3f4bc3",D:"#0ff555",M:"#f1c2c8",O:"#58d340",P:"#c514f2",N:"#14494e",Q:"#8b1be1"}}}function qm(){return{4:["F","D","L","R"],6:["U","D","F","B","L","R"],8:["F","BB","D","U","BR","L","R","BL"],12:["L","E","F","BF","R","I","U","D","BR","A","BL","C"],20:["L","S","E","O","F","B","I","P","R","K","U","D","J","A","Q","H","G","N","M","C"]}}function Vm(){return{4:[["FLR",[0,1,0]],["F",[0,0,1]]],6:[["U",[0,1,0]],["F",[0,0,1]]],8:[["U",[0,1,0]],["F",[0,0,1]]],12:[["U",[0,1,0]],["F",[0,0,1]]],20:[["GUQMJ",[0,1,0]],["F",[0,0,1]]]}}function Xl(e,t){for(let r=0;r<e.length;r++)if(e[r][0].dist(t)<Ee)return r;throw new Error("Element not found")}function xf(){return Vl}function Sf(e){return Vl[e]}function Go(e){let t=e.split(/ /).filter(Boolean);if(t.length%2===0)return null;let r=t[0];if(r!=="o"&&r!=="c"&&r!=="i"&&r!=="d"&&r!=="t")return null;let n=[];for(let o=1;o<t.length;o+=2){if(t[o]!=="f"&&t[o]!=="v"&&t[o]!=="e")return null;n.push({cutType:t[o],distance:parseFloat(t[o+1])})}return{shape:r,cuts:n}}function aa(e,t={}){let r=Go(e);if(r===null)throw new Error("Could not parse the puzzle description");let n=new ei(r,Object.assign({},{allMoves:!0},t));return n.allstickers(),n.genperms(),n}function Pn(e,t){return aa(Vl[e],t)}function Hm(e,t,r){let n=!1;r-t[1]<t[0]&&(e=[e[2],e[3],e[0],e[1]],t=[r-t[1],r-t[0]],n=!0);let o=e[0],l="";if(t[0]===0&&t[1]===r)o=o+"v";else if(t[0]===t[1])t[1]>0&&(l=String(t[1]+1));else if(t[0]===0)o=o.toLowerCase(),t[1]>1&&(l=String(t[1]+1));else throw\`We only support slice and outer block moves right now. \${t}\`;return[l+o,n]}function Ym(e,t){let r=[],n=0;for(;n<e.length;){n>0&&n<e.length&&e[n]==="_"&&n++;let o="";for(let l of t)e.substr(n).startsWith(l[1])&&l[1].length>o.length&&(o=l[1]);if(o!=="")r.push(o),n+=o.length;else throw new Error("Could not split "+e+" into face names.")}return r}function $l(e,t){return[e.b/t,-e.c/t,e.d/t]}function ia(e,t){let r=[],n=e.length;for(let o=0;o<n;o++){let l=$l(e.get(n-o-1),t);r[3*o]=l[0],r[3*o+1]=l[1],r[3*o+2]=l[2]}return r}var Cn,Io,Ee,Wm,Km,ei,Qr,jl=U(()=>{Le();Y2();H0();J0();ql();Lf();Bf();Uf();Yl();la();Cn=class{constructor(t){this.coords=new Array(t.length*3);for(let r=0;r<t.length;r++)this.coords[3*r]=t[r].b,this.coords[3*r+1]=t[r].c,this.coords[3*r+2]=t[r].d;this.length=t.length}get(t){return new O(0,this.coords[3*t],this.coords[3*t+1],this.coords[3*t+2])}centermass(){let t=0,r=0,n=0;for(let o=0;o<this.length;o++)t+=this.coords[3*o],r+=this.coords[3*o+1],n+=this.coords[3*o+2];return new O(0,t/this.length,r/this.length,n/this.length)}rotate(t){let r=[];for(let n=0;n<this.length;n++)r.push(this.get(n).rotatepoint(t));return new Cn(r)}rotateforward(){let t=[];for(let r=1;r<this.length;r++)t.push(this.get(r));return t.push(this.get(0)),new Cn(t)}},Io=class{constructor(t,r,n){this.face=t;this.left=r;this.right=n}split(t){let r=t.cutface(this.face);return r!==null&&(this.left===void 0?(this.left=new Io(r[0]),this.right=new Io(r[1])):(this.left=this.left?.split(t),this.right=this.right?.split(t))),this}collect(t,r){return this.left===void 0?t.push(new Cn(this.face)):r?(this.left?.collect(t,!1),this.right?.collect(t,!0)):(this.right?.collect(t,!1),this.left?.collect(t,!0)),t}};Ee=1e-9,Wm="PuzzleGeometry 0.1 Copyright 2018 Tomas Rokicki.",Km=!1;ei=class{constructor(t,r){this.puzzleDescription=t;this.cmovesbyslice=[];this.duplicatedFaces=[];this.duplicatedCubies=[];this.fixedCubie=-1;this.net=[];this.colors=[];this.faceorder=[];this.faceprecedence=[];this.notationMapper=new kn;this.addNotationMapper="";this.setReidOrder=!1;let n="genperms";this.options=new Y0(r),this.options.verbosity>0&&console.log(this.header("# ")),this.create(t)}create(t){let{shape:r,cuts:n}=t;this.moveplanes=[],this.moveplanes2=[],this.faces=[],this.cubies=[];let o=null;switch(r){case"c":o=df();break;case"o":o=Af();break;case"i":o=Df();break;case"t":o=hf();break;case"d":o=Ff();break;default:throw new Error("Bad shape argument: "+r)}this.rotations=yf(o),this.options.verbosity&&console.log("# Rotations: "+this.rotations.length);let l=o[0];this.baseplanerot=na(l,this.rotations);let i=this.baseplanerot.map(D=>l.rotateplane(D));this.baseplanes=i,this.baseFaceCount=i.length;let a=Qm()[i.length];this.net=a,this.colors=jm()[i.length],this.faceorder=qm()[i.length],this.options.verbosity>0&&console.log("# Base planes: "+i.length);let s=oa(i),f=new O(0,0,0,0);this.options.verbosity>0&&console.log("# Face vertices: "+s.length);let g=i[0].makenormal(),p=s[0].sum(s[1]).makenormal(),u=s[0].makenormal(),c=new O(1,g.b,g.c,g.d);this.options.verbosity>0&&console.log("# Boundary is "+c);let L=na(c,this.rotations).map(D=>c.rotateplane(D)),R=oa(L);this.edgedistance=R[0].sum(R[1]).smul(.5).dist(f),this.vertexdistance=R[0].dist(f);let h=[],y=[],A=!1,E=!1,v=!1;for(let D of n){let w=null,T=0;switch(D.cutType){case"f":w=g,T=1,A=!0;break;case"v":w=u,T=this.vertexdistance,v=!0;break;case"e":w=p,T=this.edgedistance,E=!0;break;default:throw new Error("Bad cut argument: "+D.cutType)}h.push(w.makecut(D.distance)),y.push(D.distance<T)}this.options.addRotations&&(A||h.push(g.makecut(10)),v||h.push(u.makecut(10)),E||h.push(p.makecut(10))),this.basefaces=[];for(let D of this.baseplanerot){let w=D.rotateface(R);this.basefaces.push(new Cn(w))}let K=[],Z=[],M=[],ne=[],b=R.length;function _(D,w,T){for(let W of D)if(W[0].dist(w)<Ee){W.push(T);return}D.push([w,T])}for(let D=0;D<this.baseplanerot.length;D++){let w=this.baseplanerot[D].rotateface(R);for(let T=0;T<w.length;T++){let W=(T+1)%w.length,oe=w[T].sum(w[W]).smul(.5);_(ne,oe,D)}}let P=[];for(let D=0;D<this.baseplanerot.length;D++){let w=this.baseplanerot[D].rotateface(R),T=[];for(let W=0;W<w.length;W++){let oe=(W+1)%w.length,He=w[W].sum(w[oe]).smul(.5),ut=ne[Xl(ne,He)];if(D===ut[1])T.push(ut[2]);else if(D===ut[2])T.push(ut[1]);else throw new Error("Could not find edge")}P.push(T)}let x={},S=[];S.push(a[0][0]),x[a[0][0]]=0,S[P[0][0]]=a[0][1],x[a[0][1]]=P[0][0];for(let D of a){let w=D[0],T=x[w];if(T===void 0)throw new Error("Bad edge description; first edge not connected");let W=-1;for(let oe=0;oe<P[T].length;oe++){let He=S[P[T][oe]];if(He!==void 0&&He===D[1]){W=oe;break}}if(W<0)throw new Error("First element of a net not known");for(let oe=2;oe<D.length;oe++){if(D[oe]==="")continue;let He=P[T][(oe+W-1)%b],ut=S[He];if(ut!==void 0&&ut!==D[oe])throw new Error("Face mismatch in net");S[He]=D[oe],x[D[oe]]=He}}for(let D=0;D<S.length;D++){let w=!1;for(let T=0;T<this.faceorder.length;T++)if(S[D]===this.faceorder[T]){this.faceprecedence[D]=T,w=!0;break}if(!w)throw new Error("Could not find face "+S[D]+" in face order list "+this.faceorder)}for(let D=0;D<this.baseplanerot.length;D++){let w=this.baseplanerot[D].rotateface(R),T=c.rotateplane(this.baseplanerot[D]),W=S[D];K.push([w,W]),Z.push([T,W])}for(let D=0;D<this.baseplanerot.length;D++){let w=this.baseplanerot[D].rotateface(R),T=S[D];for(let W=0;W<w.length;W++){let oe=(W+1)%w.length,He=w[W].sum(w[oe]).smul(.5),ut=(W+2)%w.length,Kc=w[oe].sum(w[ut]).smul(.5),Qc=Xl(ne,He),jc=Xl(ne,Kc);_(M,w[oe],[T,jc,Qc])}}this.swizzler=new Mo(K.map(D=>D[1]));let z=this.swizzler.prefixFree?"":"_";for(let D=0;D<ne.length;D++){if(ne[D].length!==3)throw new Error("Bad length in edge names "+ne[D]);let w=S[ne[D][1]],T=S[ne[D][2]];this.faceprecedence[ne[D][1]]<this.faceprecedence[ne[D][2]]?w=w+z+T:w=T+z+w,ne[D]=[ne[D][0],w]}for(let D=0;D<M.length;D++){if(M[D].length<4)throw new Error("Bad length in vertex names");let w=1;for(let W=2;W<M[D].length;W++)this.faceprecedence[x[M[D][W][0]]]<this.faceprecedence[x[M[D][w][0]]]&&(w=W);let T="";for(let W=1;W<M[D].length;W++){W===1?T=M[D][w][0]:T=T+z+M[D][w][0];for(let oe=1;oe<M[D].length;oe++)if(M[D][w][1]===M[D][oe][2]){w=oe;break}}M[D]=[M[D][0],T]}this.options.verbosity>1&&(console.log("# Face precedence list: "+this.faceorder.join(" ")),console.log("# Face names: "+K.map(D=>D[1]).join(" ")),console.log("# Edge names: "+ne.map(D=>D[1]).join(" ")),console.log("# Vertex names: "+M.map(D=>D[1]).join(" ")));let Q=[];for(let D of Z)Q.push([D[0].makenormal(),D[1],"f"]);for(let D of ne)Q.push([D[0].makenormal(),D[1],"e"]);for(let D of M)Q.push([D[0].makenormal(),D[1],"v"]);this.facenames=K,this.faceplanes=Z,this.edgenames=ne,this.vertexnames=M,this.geonormals=Q;let H=Q.map(D=>D[1]);this.swizzler.setGripNames(H),this.options.verbosity>0&&console.log("# Distances: face "+1+" edge "+this.edgedistance+" vertex "+this.vertexdistance);for(let D=0;D<h.length;D++)for(let w of this.rotations){let T=h[D].rotateplane(w),W=!1;for(let oe of this.moveplanes)if(T.sameplane(oe)){W=!0;break}W||(this.moveplanes.push(T),y[D]&&this.moveplanes2.push(T))}let ce=new Io(R),Re=this.moveplanes2.slice(),Ue=31;for(let D=0;D<Re.length;D++){let w=D+Math.floor((Re.length-D)*(Ue/65536));ce=ce.split(Re[w]),Re[w]=Re[D],Ue=(Ue*1657+101)%65536}let ve=ce.collect([],!0);this.faces=ve,this.options.verbosity>0&&console.log("# Faces is now "+ve.length),this.stickersperface=ve.length;let zt=[],Oe=Hl(R);for(let D of this.rotations){let w=D.rotateface(R);Oe.dist(Hl(w))<Ee&&zt.push(D)}let nt=new Array(ve.length),ze=[];for(let D=0;D<ve.length;D++){let w=ve[D].centermass();ze.push([Oe.dist(w),w,D])}ze.sort((D,w)=>D[0]-w[0]);for(let D=0;D<ve.length;D++){let w=ze[D][2];if(!nt[w]){nt[w]=!0;for(let T of zt){let W=ve[w].rotate(T),oe=W.centermass();for(let He=D+1;He<ve.length&&!(ze[He][0]-ze[D][0]>Ee);He++){let ut=ze[He][2];if(!nt[ut]&&oe.dist(ze[He][1])<Ee){nt[ut]=!0,ve[ut]=W;break}}}}}this.shortedge=1e99;for(let D of ve)for(let w=0;w<D.length;w++){let T=(w+1)%D.length,W=D.get(w).dist(D.get(T));W<this.shortedge&&(this.shortedge=W)}this.options.verbosity>0&&console.log("# Short edge is "+this.shortedge),r==="c"&&A&&!E&&!v&&(this.addNotationMapper="NxNxNCubeMapper",this.setReidOrder=!0),r==="c"&&v&&!A&&!E&&(this.addNotationMapper="SkewbMapper"),r==="t"&&(v||A)&&!E&&(this.addNotationMapper="PyraminxOrTetraminxMapper"),r==="o"&&A&&(this.notationMapper=new No(this.swizzler,new Mo(["F","D","L","BL","R","U","BR","B"])),!E&&!v&&(this.addNotationMapper="FTOMapper")),r==="d"&&A&&(this.addNotationMapper="MegaminxMapper",this.notationMapper=new No(this.swizzler,new Mo(["U","F","L","BL","BR","R","FR","FL","DL","B","DR","D"])))}keyface(t){return this.keyface2(t.centermass())}keyface2(t){let r="",n=String.fromCharCode;for(let o of this.moveplanesets)if(o.length>0){let l=t.dot(o[0]),i=0,a=1;for(;a*2<=o.length;)a*=2;for(;a>0;a>>=1)i+a<=o.length&&l>o[i+a-1].a&&(i+=a);if(i<47)r=r+n(33+i);else if(i<47+47*47)r=r+n(33+47+Math.floor(i/47)-1)+n(33+i%47);else if(i<47+47*47+47*47*47)r=r+n(33+47+Math.floor((i-47)/(47*47)-1))+n(33+47+Math.floor((i-47)/47)%47)+n(33+i%47);else throw Error("Too many slices for cubie encoding")}return r}keyface3(t){let r=t.centermass(),n=[];for(let o of this.moveplanesets)if(o.length>0){let l=r.dot(o[0]),i=0,a=1;for(;a*2<=o.length;)a*=2;for(;a>0;a>>=1)i+a<=o.length&&l>o[i+a-1].a&&(i+=a);n.push(i)}return n}findface(t){let r=this.keyface2(t),n=this.facelisthash.get(r);if(n.length===1)return n[0];for(let o=0;o+1<n.length;o++){let l=this.facelisthash.get(r)[o];if(Math.abs(t.dist(this.facecentermass[l]))<Ee)return l}return n[n.length-1]}project2d(t,r,n){let o=this.facenames[t][0],l=(r+1)%o.length,i=this.baseplanes[t],a=o[l].sub(o[r]),s=a.len();a=a.normalize();let f=a.cross(i).normalize(),g=n[1].sub(n[0]),p=g.len()/s;g=g.normalize();let u=g.b,c=g.c,m=a.smul(u).sub(f.smul(c)).smul(p),L=f.smul(u).sum(a.smul(c)).smul(p),R=new O(0,n[0].b-m.dot(o[r]),n[0].c-L.dot(o[r]),0);return[m,L,R]}allstickers(){let t="allstickers";this.faces=Im(this.baseplanerot,this.faces),this.options.verbosity>0&&console.log("# Total stickers is now "+this.faces.length),this.facecentermass=new Array(this.faces.length);for(let b=0;b<this.faces.length;b++)this.facecentermass[b]=this.faces[b].centermass();let r=[],n=[];for(let b of this.moveplanes){let _=b.makenormal(),P=!1;for(let x of n)_.sameplane(x.makenormal())&&(P=!0);P||(n.push(_),r.push([]))}for(let b of this.moveplanes2){let _=b.makenormal();for(let P=0;P<n.length;P++)if(_.sameplane(n[P])){r[P].push(b);break}}for(let b=0;b<r.length;b++){let _=r[b].map(x=>x.normalizeplane()),P=n[b];for(let x=0;x<_.length;x++)_[x].makenormal().dist(P)>Ee&&(_[x]=_[x].smul(-1));_.sort((x,S)=>x.a-S.a),r[b]=_}this.moveplanesets=r,this.moveplanenormals=n;let o=r.map(b=>b.length);this.options.verbosity>0&&console.log("# Move plane sets: "+o);let l=[];for(let b=0;b<r.length;b++)l.push([]);for(let b of this.rotations){if(Math.abs(Math.abs(b.a)-1)<Ee)continue;let _=b.makenormal();for(let P=0;P<r.length;P++)if(_.sameplane(n[P])){l[P].push(b);break}}this.moverotations=l;for(let b=0;b<l.length;b++){let _=l[b],P=_[0].makenormal();for(let x=0;x<_.length;x++)P.dist(_[x].makenormal())>Ee&&(_[x]=_[x].smul(-1));_.sort((x,S)=>x.angle()-S.angle()),l[b][0].dot(n[b])<0&&_.reverse()}let i=l.map(b=>1+b.length);this.movesetorders=i;let a=[],s="?";for(let b=0;b<r.length;b++){let _=n[b],P=null,x=null;for(let S of this.geonormals){let z=_.dot(S[0]);Math.abs(z-1)<Ee?(x=[S[1],S[2]],s=S[2]):Math.abs(z+1)<Ee&&(P=[S[1],S[2]],s=S[2])}if(x===null||P===null)throw new Error("Saw positive or negative sides as null");a.push([x[0],x[1],P[0],P[1],1+r[b].length]),this.addNotationMapper==="NxNxNCubeMapper"&&s==="f"&&(this.notationMapper=new Wl(1+r[b].length),this.addNotationMapper=""),this.addNotationMapper==="SkewbMapper"&&r[0].length===1&&(this.notationMapper=new Ql(this.swizzler),this.addNotationMapper=""),this.addNotationMapper==="PyraminxOrTetraminxMapper"&&(r[0].length===2&&r[0][0].a===.333333333333333&&r[0][1].a===1.66666666666667?(this.notationMapper=new To(this.swizzler),this.addNotationMapper=""):(this.notationMapper=new Kl(this.swizzler),this.addNotationMapper="")),this.addNotationMapper==="MegaminxMapper"&&s==="f"&&(1+r[b].length===3&&(this.notationMapper=new Il(this.notationMapper)),this.addNotationMapper=""),this.addNotationMapper==="FTOMapper"&&s==="f"&&(1+r[b].length===3&&(this.notationMapper=new Ol(this.notationMapper,this.swizzler)),this.addNotationMapper="")}this.movesetgeos=a;let f=new Map,g=this.faces;for(let b=0;b<g.length;b++){let _=g[b],P=this.keyface(_);if(!f.get(P))f.set(P,[b]);else{let x=f.get(P);if(x.push(b),x.length===this.baseFaceCount){this.options.verbosity>0&&console.log("# Splitting core.");for(let S=0;S<x.length;S++){let z=P+" "+S;f.set(z,[x[S]])}}}}this.facelisthash=f,this.options.verbosity>0&&console.log("# Cubies: "+f.size);let p=[],u=[],c=[];for(let b of f.values())if(b.length!==this.baseFaceCount){if(b.length>1){let _=b.map(z=>g[z].centermass()),P=Hl(_);for(let z=0;b.length>2;z++){let Q=!1;for(let H=0;H<b.length;H++){let ce=(H+1)%b.length;if(P.dot(_[H].cross(_[ce]))<0){let Re=_[H];_[H]=_[ce],_[ce]=Re;let Ue=b[H];b[H]=b[ce],b[ce]=Ue,Q=!0}}if(!Q)break;if(z>1e3)throw new Error("Bad epsilon math; too close to border")}let x=0,S=b[x];for(let z=1;z<b.length;z++){let Q=b[z];this.faceprecedence[this.getfaceindex(Q)]<this.faceprecedence[this.getfaceindex(S)]&&(x=z,S=Q)}if(x!==0){let z=b.slice();for(let Q=0;Q<b.length;Q++)b[Q]=z[(x+Q)%b.length]}}for(let _=0;_<b.length;_++){let P=b[_];u[P]=p.length,c[P]=_}p.push(b)}this.cubies=p,this.facetocubie=u,this.facetoord=c;let m=["?","CENTERS","EDGES","CORNERS","C4RNER","C5RNER"],L=[],R=[0,0,0,0,0,0],h=[],y=[],A=0,E=[],v=[],K=[],Z=[],M=b=>p[b].map(_=>this.getfaceindex(_)).join(" "),ne=[];for(let b=0;b<p.length;b++){if(y[b])continue;let _=p[b];if(_.length===0)continue;let P={},x=0;K.push(0),ne.push([]);let S=_.length,z=R[S]++,Q=m[S];(Q===void 0||S===this.baseFaceCount)&&(Q="CORE"),Q=Q+(z===0?"":z+1),L[A]=Q,h[A]=S;let H=[b],ce=0;for(y[b]=!0;ce<H.length;){let Re=H[ce++],Ue=M(Re);if((_.length>1||P[Ue]===void 0)&&(P[Ue]=x++),Z[Re]=P[Ue],E[Re]=A,ne[A].push(Re),v[Re]=K[A]++,H.length<this.rotations.length){let ve=this.facecentermass[p[Re][0]];for(let zt of l){let Oe=this.facetocubie[this.findface(ve.rotatepoint(zt[0]))];y[Oe]||(H.push(Oe),y[Oe]=!0)}}}A++}if(this.setReidOrder&&4<=this.stickersperface&&this.stickersperface<=9){let b=[["UF","UR","UB","UL","DF","DR","DB","DL","FR","FL","BR","BL"],["UFR","URB","UBL","ULF","DRF","DFL","DLB","DBR"],["U","L","F","R","B","D"]],_={};for(let P of b)for(let x=0;x<P.length;x++){let S=0;for(let z=0;z<P[x].length;z++)S|=1<<P[x].charCodeAt(z)-65;_[S]=x}for(let P of ne)for(let x of P){let S=0;for(let z of p[x])S|=1<<this.facenames[this.getfaceindex(z)][1].charCodeAt(0)-65;v[x]=_[S]}}if(this.cubiesetnums=E,this.cubieordnums=v,this.cubiesetnames=L,this.cubieords=K,this.orbitoris=h,this.cubievaluemap=Z,this.cubiesetcubies=ne,this.options.fixedPieceType!==null){for(let b=0;b<p.length;b++)if(this.options.fixedPieceType==="v"&&p[b].length>2||this.options.fixedPieceType==="e"&&p[b].length===2||this.options.fixedPieceType==="f"&&p[b].length===1){this.fixedCubie=b;break}if(this.fixedCubie<0)throw new Error("Could not find a cubie of type "+this.options.fixedPieceType+" to fix.")}this.options.verbosity>0&&console.log("# Cubie orbit sizes "+K)}unswizzle(t){let r=this.notationMapper.notationToInternal(t);return r===null?null:r.modified({family:this.swizzler.unswizzle(r.family)})}stringToBlockMove(t){let r=RegExp("^(([0-9]+)-)?([0-9]+)?([^0-9]+)([0-9]+'?)?$"),n=t.match(r);if(n===null)throw new Error("Bad move passed "+t);let o=n[4],l,i;if(n[2]!==void 0){if(n[3]===void 0)throw new Error("Missing second number in range");l=parseInt(n[2],10)}n[3]!==void 0&&(i=parseInt(n[3],10));let a="1",s=1;return n[5]!==void 0&&(a=n[5],a[0]==="'"&&(a="-"+a.substring(1)),s=parseInt(a,10)),new B(new C(o,i,l),s)}parseMove(t){let r=this.notationMapper.notationToInternal(t);if(r===null)throw new Error("Bad move "+t.family);t=r;let n=t.family,o=!1;if(n.endsWith("v")&&n[0]<="Z"){if(t.innerLayer!==void 0||t.outerLayer!==void 0)throw new Error("Cannot use a prefix with full cube rotations");n=n.slice(0,-1),o=!0}n.endsWith("w")&&n[0]<="Z"&&(n=n.slice(0,-1).toLowerCase());let l,i=-1,a=this.swizzler.unswizzle(n),s=!1;for(let p=0;p<this.movesetgeos.length;p++){let u=this.movesetgeos[p];a===u[0]&&(s=!0,l=u,i=p),a===u[2]&&(s=!1,l=u,i=p)}let f=1,g=1;if(n.toUpperCase()!==n&&(g=2),l===void 0)throw new Error("Bad grip in move "+t.family);if(t.outerLayer!==void 0&&(f=t.outerLayer),t.innerLayer!==void 0&&(t.outerLayer===void 0?(g=t.innerLayer,n<="Z"?f=g:f=1):g=t.innerLayer),f--,g--,o&&(f=0,g=this.moveplanesets[i].length),f<0||f>this.moveplanesets[i].length||g<0||g>this.moveplanesets[i].length)throw new Error("Bad slice spec "+f+" "+g+" vs "+this.moveplanesets[i].length);if(!Km&&f===0&&g===this.moveplanesets[i].length&&!o)throw new Error("! full puzzle rotations must be specified with v suffix.");return[void 0,i,f,g,s,t.amount]}parsemove(t){let r=this.parseMove(this.stringToBlockMove(t));return r[0]=t,r}genperms(){let t="genperms";if(this.cmovesbyslice.length>0)return;let r=[];if(this.options.orientCenters){for(let n=0;n<this.cubies.length;n++)if(this.cubies[n].length===1){let o=this.cubies[n][0],l=this.getfaceindex(o);if(this.basefaces[l].centermass().dist(this.facecentermass[o])<Ee){let i=this.basefaces[l].length;for(let a=1;a<i;a++)this.cubies[n].push(this.cubies[n][a-1]);this.duplicatedFaces[o]=i,this.duplicatedCubies[n]=i,this.orbitoris[this.cubiesetnums[n]]=i}}}for(let n=0;n<this.moveplanesets.length;n++){let o=this.moveplanesets[n],l=[],i=[o.length+1,0],a=1;for(;a*2<=o.length;)a*=2;for(let g=0;g<this.faces.length;g++){let p=0;if(o.length>0){let u=this.facecentermass[g].dot(o[0]);for(let c=a;c>0;c>>=1)p+c<=o.length&&u>o[p+c-1].a&&(p+=c);p=o.length-p}for(l.push(p);i.length<=p;)i.push(0);i[p]++}let s=new Array(i.length);for(let g=0;g<i.length;g++)s[g]=[];let f=[];for(let g=0;g<this.faces.length;g++){if(l[g]<0)continue;let p=[this.facetocubie[g],this.facetoord[g]],u=this.facecentermass[g],c=u,m=g,L=l[m];for(;;){l[m]=-1;let R=u.rotatepoint(this.moverotations[n][0]);if(R.dist(c)<Ee)break;m=this.findface(R),p.push(this.facetocubie[m],this.facetoord[m]),u=R}if(p.length>2&&this.options.orientCenters&&(this.cubies[p[0]].length===1||this.duplicatedCubies[p[0]]>1)&&this.facecentermass[g].dist(this.basefaces[this.getfaceindex(g)].centermass())<Ee){let R=this.faces[this.cubies[p[0]][0]];for(let h=0;h<p.length;h+=2){let y=this.faces[this.cubies[p[h]][0]],A=-1;for(let E=0;E<R.length;E++)if(y.get(E).dist(R.get(0))<Ee){A=E;break}if(A<0)throw new Error("Couldn't find rotation of center faces; ignoring for now.");p[h+1]=A,R=R.rotate(this.moverotations[n][0])}}if(p.length===2&&this.options.orientCenters)for(let R=1;R<this.movesetorders[n];R++)L===0?p.push(p[0],R):p.push(p[0],(this.movesetorders[n]-R)%this.movesetorders[n]);if(p.length>2&&!f[p[0]]){if(p.length!==2*this.movesetorders[n])throw new Error("Bad length in perm gen");for(let R of p)s[L].push(R)}for(let R=0;R<p.length;R+=2)f[p[R]]=!0}for(let g=0;g<s.length;g++)s[g]=s[g].slice();r.push(s)}if(this.cmovesbyslice=r,this.options.moveList){let n=[];for(let o of this.options.moveList)n.push(this.parsemove(o));this.parsedmovelist=n}this.facelisthash.clear(),this.facecentermass=[]}getboundarygeometry(){return{baseplanes:this.baseplanes,facenames:this.facenames,faceplanes:this.faceplanes,vertexnames:this.vertexnames,edgenames:this.edgenames,geonormals:this.geonormals}}getmovesets(t){let r=this.moveplanesets[t].length,n=[];if(this.parsedmovelist!==void 0)for(let o of this.parsedmovelist)o[1]===t&&(o[4]?n.push([o[2],o[3]]):n.push([r-o[3],r-o[2]]),n.push(o[5]));else if(this.options.vertexMoves&&!this.options.allMoves){let o=this.movesetgeos[t];if(o[1]!==o[3])for(let l=0;l<r;l++)o[1]!=="v"?(this.options.outerBlockMoves?n.push([l+1,r]):n.push([l+1]),n.push(1)):(this.options.outerBlockMoves?n.push([0,l]):n.push([l,l]),n.push(1))}else for(let o=0;o<=r;o++)!this.options.allMoves&&o+o===r||(this.options.outerBlockMoves?o+o>r?n.push([o,r]):n.push([0,o]):n.push([o,o]),n.push(1));if(this.fixedCubie>=0){let o=this.keyface3(this.faces[this.cubies[this.fixedCubie][0]])[t],l=[];for(let i=0;i<n.length;i+=2){let a=n[i];if(o>=a[0]&&o<=a[1])if(a[0]===0)a=[a[1]+1,r];else if(r===a[1])a=[0,a[0]-1];else throw Error("fixed cubie option would disconnect move");let s=!1;for(let f=0;f<l.length;f+=2)if(l[f][0]===a[0]&&l[f][1]===a[1]&&l[f+1]===n[i+1]){s=!0;break}s||(l.push(a),l.push(n[i+1]))}n=l}return n}graybyori(t){let r=this.cubies[t].length;return this.duplicatedCubies[t]&&(r=1),r===1&&(this.options.grayCenters||!this.options.includeCenterOrbits)||r===2&&(this.options.grayEdges||!this.options.includeEdgeOrbits)||r>2&&(this.options.grayCorners||!this.options.includeCornerOrbits)}skipbyori(t){let r=this.cubies[t].length;return this.duplicatedCubies[t]&&(r=1),r===1&&!this.options.includeCenterOrbits||r===2&&!this.options.includeEdgeOrbits||r>2&&!this.options.includeCornerOrbits}skipcubie(t){return this.skipbyori(t)}header(t){return t+Wm+\`
|
|
8
|
+
\`:" "}var it,Ir,k,qt=U(()=>{jt();z0();Dt();E0();M0();Uo();Vt();bo();k0();Ir=class extends Ie{constructor(t){super();re(this,it,void 0);j(this,it,Array.from(y2(t)));for(let r of d(this,it))if(!d2(r))throw new Error("An alg can only contain units.")}isIdentical(t){let r=t;if(!t.is(Ir))return!1;let n=Array.from(d(this,it)),o=Array.from(d(r,it));if(n.length!==o.length)return!1;for(let l=0;l<n.length;l++)if(!n[l].isIdentical(o[l]))return!1;return!0}invert(){return new Ir(u2(Array.from(d(this,it)).map(t=>t.invert())))}*experimentalExpand(t=1,r){r??(r=1/0);for(let n of b0(d(this,it),t))yield*n.experimentalExpand(t,r)}expand(t){return new Ir(this.experimentalExpand(1,t?.depth??1/0))}*experimentalLeafMoves(){for(let t of this.experimentalExpand())t.is(B)&&(yield t)}concat(t){return new Ir(Array.from(d(this,it)).concat(Array.from(y2(t))))}experimentalIsEmpty(){for(let t of d(this,it))return!1;return!0}static fromString(t){return v0(t)}*units(){for(let t of d(this,it))yield t}experimentalNumUnits(){return Array.from(d(this,it)).length}get type(){return El("deprecated: type"),"sequence"}toString(){let t="",r=null;for(let n of d(this,it))r&&(t+=Bm(r,n)),t+=n.toString(),r=n;return t}simplify(t){return new Ir(A2(this,t??{}))}},k=Ir;it=new WeakMap});var Rm,U2=U(()=>{qt();Cl();Ao();yo();Vt();xo();Rm={Sune:new k([new B("R",1),new B("U",1),new B("R",-1),new B("U",1),new B("R",1),new B("U",-2),new B("R",-1)]),AntiSune:new k([new B("R",1),new B("U",2),new B("R",-1),new B("U",-1),new B("R",1),new B("U",-1),new B("R",-1)]),SuneCommutator:new k([new We(new k([new B("R",1),new B("U",1),new B("R",-2)]),new k([new Ke(new k([new B("R",1)]),new k([new B("U",1)]))]))]),Niklas:new k([new B("R",1),new B("U",-1),new B("L",-1),new B("U",1),new B("R",-1),new B("U",-1),new B("L",1),new B("U",1)]),EPerm:new k([new B("x",-1),new We(new k([new Ke(new k([new B("R",1)]),new k([new B("U",-1)]))]),new k([new B("D",1)])),new We(new k([new Ke(new k([new B("R",1)]),new k([new B("U",1)]))]),new k([new B("D",1)])),new B("x",1)]),FURURFCompact:new k([new Ke(new k([new B("F",1)]),new k([new We(new k([new B("U",1)]),new k([new B("R",1)]))]))]),APermCompact:new k([new Ke(new k([new B("R",2)]),new k([new We(new k([new B("F",2)]),new k([new B("R",-1),new B("B",-1),new B("R",1)]))]))]),FURURFMoves:new k([new B("F",1),new B("U",1),new B("R",1),new B("U",-1),new B("R",-1),new B("F",-1)]),TPerm:new k([new B("R",1),new B("U",1),new B("R",-1),new B("U",-1),new B("R",-1),new B("F",1),new B("R",2),new B("U",-1),new B("R",-1),new B("U",-1),new B("R",1),new B("U",1),new B("R",-1),new B("F",-1)]),HeadlightSwaps:new k([new Ke(new k([new B("F",1)]),new k([new gt(new k([new We(new k([new B("R",1)]),new k([new B("U",1)]))]),3)]))]),TriplePause:new k([new Xe,new Xe,new Xe])}});var DA,b2=U(()=>{Vt();DA={73:new B("R"),75:new B("R'"),87:new B("B"),79:new B("B'"),83:new B("D"),76:new B("D'"),68:new B("L"),69:new B("L'"),74:new B("U"),70:new B("U'"),72:new B("F"),71:new B("F'"),78:new B("x'"),67:new B("l"),82:new B("l'"),85:new B("r"),77:new B("r'"),88:new B("d"),188:new B("d'"),84:new B("x"),89:new B("x"),66:new B("x'"),186:new B("y"),59:new B("y"),65:new B("y'"),80:new B("z"),81:new B("z'"),90:new B("M'"),190:new B("M'")}});var x2=U(()=>{});var S2=U(()=>{qt()});var Le=U(()=>{qt();S0();M0();U2();b2();Cl();Vt();x2();S2();z0();Dt()});function wo(e,t,r){let n={};for(let o in e.orbits){let l=e.orbits[o],i=t[o],a=r[o];if(So(l.numOrientations,a))n[o]=i;else if(So(l.numOrientations,i))n[o]=a;else{let s=new Array(l.numPieces);if(l.numOrientations===1){for(let f=0;f<l.numPieces;f++)s[f]=i.permutation[a.permutation[f]];n[o]={permutation:s,orientation:i.orientation}}else{let f=new Array(l.numPieces);for(let g=0;g<l.numPieces;g++)f[g]=(i.orientation[a.permutation[g]]+a.orientation[g])%l.numOrientations,s[g]=i.permutation[a.permutation[g]];n[o]={permutation:s,orientation:f}}}}return n}function N0(e,t,r){let n={};for(let o in e.orbits){let l=e.orbits[o],i=t[o],a=r[o];if(So(l.numOrientations,a))n[o]=i;else{let s=new Array(l.numPieces);if(l.numOrientations===1){for(let f=0;f<l.numPieces;f++)s[f]=i.pieces[a.permutation[f]];n[o]={pieces:s,orientation:i.orientation}}else{let f=new Array(l.numPieces);for(let g=0;g<l.numPieces;g++)f[g]=(i.orientation[a.permutation[g]]+a.orientation[g])%l.numOrientations,s[g]=i.pieces[a.permutation[g]];n[o]={pieces:s,orientation:f}}}}return n}var Ml=U(()=>{vo()});function dm(e){let t=w2.get(e);if(t)return t;let r=new Array(e),n=new Array(e);for(let l=0;l<e;l++)r[l]=l,n[l]=0;let o={permutation:r,orientation:n};return v2&&(Object.freeze(r),Object.freeze(n),Object.freeze(o)),w2.set(e,o),o}function E2(e){let t={};for(let[r,n]of Object.entries(e.orbits))t[r]=dm(n.numPieces);return v2&&Object.freeze(t),t}function k2(e,t){let r=t.quantum.toString(),n=e.definition.moves[r];if(!n){let i=e.definition.experimentalDerivedMoves?.[r];i&&(n=e.algToTransformation(i).transformationData)}if(n)return gr(e,n,t.amount);let o=e.definition.moves[t.toString()];if(o)return o;let l=e.definition.moves[t.invert().toString()];if(l)return gr(e,l,-1);throw new Error(\`Invalid move for KPuzzle (\${e.name()}): \${t}\`)}var v2,w2,T0=U(()=>{vo();v2=!1,w2=new Map});var _2=U(()=>{});function G0(e){let t=e.stateData.CENTERS.pieces[0],r=e.stateData.CENTERS.pieces[5],n=e.stateData.CENTERS.pieces[1],o=n;return t<n&&o--,r<n&&o--,[t,o]}function Fm(){if(!hm){let e=["","z","x","z'","x'","x2"].map(r=>k.fromString(r)),t=new k("y");for(let r of e){let n=bn.algToTransformation(r);for(let o=0;o<4;o++){n=n.applyAlg(t);let[l,i]=G0(n.toKState());z2[l][i]=n.invert()}}}return z2}function Nl(e){let[t,r]=G0(e),n=Fm()[t][r];return e.applyTransformation(n)}var z2,hm,O0=U(()=>{Le();Ce();z2=new Array(6).fill(0).map(()=>new Array(6)),hm=!1});var I0=U(()=>{Ce();_2();O0()});var C2=U(()=>{});var P2=U(()=>{I0();C2();O0();I0()});function M2(e,t){return t.ignorePuzzleOrientation&&(e=Nl(e)),t.ignoreCenterOrientation&&(e=new fe(e.kpuzzle,{EDGES:e.stateData.EDGES,CORNERS:e.stateData.CORNERS,CENTERS:{pieces:e.stateData.CENTERS.pieces,orientation:new Array(6).fill(0)}})),!!e.experimentalToTransformation()?.isIdentityTransformation()}var N2=U(()=>{P2();Eo()});var fe,Eo=U(()=>{N2();Ml();ko();fe=class{constructor(t,r){this.kpuzzle=t;this.stateData=r}toJSON(){return{experimentalPuzzleName:this.kpuzzle.name(),stateData:this.stateData}}static fromTransformation(t){let r=N0(t.kpuzzle.definition,t.kpuzzle.definition.startStateData,t.transformationData);return new fe(t.kpuzzle,r)}apply(t){return this.applyTransformation(this.kpuzzle.toTransformation(t))}applyTransformation(t){if(t.isIdentityTransformation())return new fe(this.kpuzzle,this.stateData);let r=N0(this.kpuzzle.definition,this.stateData,t.transformationData);return new fe(this.kpuzzle,r)}applyMove(t){return this.applyTransformation(this.kpuzzle.moveToTransformation(t))}applyAlg(t){return this.applyTransformation(this.kpuzzle.algToTransformation(t))}experimentalToTransformation(){if(!this.kpuzzle.canConvertStateToUniqueTransformation())return null;let t={};for(let[r,n]of Object.entries(this.stateData)){let o={permutation:n.pieces,orientation:n.orientation};t[r]=o}return new Ut(this.kpuzzle,t)}experimentalIs3x3x3Solved(t){if(this.kpuzzle.name()!=="3x3x3")throw new Error("\`KState.experimentalIs3x3x3Solved()\` only supports 3x3x3 states.");return M2(this,t)}}});var Wr,pr,Ut,ko=U(()=>{vo();Ml();T0();Eo();pr=class{constructor(t,r){this.kpuzzle=t;this.transformationData=r;re(this,Wr,void 0)}toJSON(){return{experimentalPuzzleName:this.kpuzzle.name(),transformationData:this.transformationData}}invert(){return new pr(this.kpuzzle,W0(this.kpuzzle,this.transformationData))}isIdentityTransformation(){return d(this,Wr)??j(this,Wr,this.isIdentical(this.kpuzzle.identityTransformation()))}static experimentalConstructIdentity(t){let r=new pr(t,E2(t.definition));return j(r,Wr,!0),r}isIdentical(t){return T2(this.kpuzzle,this.transformationData,t.transformationData)}apply(t){return this.applyTransformation(this.kpuzzle.toTransformation(t))}applyTransformation(t){if(this.kpuzzle!==t.kpuzzle)throw new Error(\`Tried to apply a transformation for a KPuzzle (\${t.kpuzzle.name()}) to a different KPuzzle (\${this.kpuzzle.name()}).\`);return d(this,Wr)?new pr(this.kpuzzle,t.transformationData):d(t,Wr)?new pr(this.kpuzzle,this.transformationData):new pr(this.kpuzzle,wo(this.kpuzzle.definition,this.transformationData,t.transformationData))}applyMove(t){return this.applyTransformation(this.kpuzzle.moveToTransformation(t))}applyAlg(t){return this.applyTransformation(this.kpuzzle.algToTransformation(t))}toKState(){return fe.fromTransformation(this)}repetitionOrder(){return G2(this.kpuzzle.definition,this)}selfMultiply(t){return new pr(this.kpuzzle,gr(this.kpuzzle,this.transformationData,t))}},Ut=pr;Wr=new WeakMap});function So(e,t){let{permutation:r}=t,n=r.length;for(let o=0;o<n;o++)if(r[o]!==o)return!1;if(e>1){let{orientation:o}=t;for(let l=0;l<n;l++)if(o[l]!==0)return!1}return!0}function Dm(e,t,r,n={}){for(let o=0;o<e.numPieces;o++)if(!n?.ignoreOrientation&&t.orientation[o]!==r.orientation[o]||!n?.ignorePermutation&&t.permutation[o]!==r.permutation[o])return!1;return!0}function T2(e,t,r){for(let[n,o]of Object.entries(e.definition.orbits))if(!Dm(o,t[n],r[n]))return!1;return!0}function W0(e,t){let r={};for(let n in e.definition.orbits){let o=e.definition.orbits[n],l=t[n];if(So(o.numOrientations,l))r[n]=l;else if(o.numOrientations===1){let i=new Array(o.numPieces);for(let a=0;a<o.numPieces;a++)i[l.permutation[a]]=a;r[n]={permutation:i,orientation:l.orientation}}else{let i=new Array(o.numPieces),a=new Array(o.numPieces);for(let s=0;s<o.numPieces;s++){let f=l.permutation[s];i[f]=s,a[f]=(o.numOrientations-l.orientation[s]+o.numOrientations)%o.numOrientations}r[n]={permutation:i,orientation:a}}}return r}function gr(e,t,r){if(r===1)return t;if(r<0)return gr(e,W0(e,t),-r);if(r===0){let{transformationData:l}=e.identityTransformation();return l}let n=t;r!==2&&(n=gr(e,t,Math.floor(r/2)));let o=wo(e.definition,n,n);return r%2===0?o:wo(e.definition,t,o)}function K0(e,t){return t?K0(t,e%t):e}function G2(e,t){let r=1;for(let n in e.orbits){let o=e.orbits[n],l=t.transformationData[n],i=new Array(o.numPieces);for(let a=0;a<o.numPieces;a++)if(!i[a]){let s=a,f=0,g=0;for(;i[s]=!0,f=f+l.orientation[s],g=g+1,s=l.permutation[s],s!==a;);f!==0&&(g=g*o.numOrientations/K0(o.numOrientations,f)),r=r*g/K0(r,g)}}return r}var I2,O2,W2,vo=U(()=>{Le();Ml();ko();I2=class extends yn{traverseAlg(t,r){let n=null;for(let o of t.units())n?n=n.applyTransformation(this.traverseUnit(o,r)):n=this.traverseUnit(o,r);return n??r.identityTransformation()}traverseGrouping(t,r){let n=this.traverseAlg(t.alg,r);return new Ut(r,gr(r,n.transformationData,t.amount))}traverseMove(t,r){return r.moveToTransformation(t)}traverseCommutator(t,r){let n=this.traverseAlg(t.A,r),o=this.traverseAlg(t.B,r);return n.applyTransformation(o).applyTransformation(n.invert()).applyTransformation(o.invert())}traverseConjugate(t,r){let n=this.traverseAlg(t.A,r),o=this.traverseAlg(t.B,r);return n.applyTransformation(o).applyTransformation(n.invert())}traversePause(t,r){return r.identityTransformation()}traverseNewline(t,r){return r.identityTransformation()}traverseLineComment(t,r){return r.identityTransformation()}},O2=new I2,W2=O2.traverseAlg.bind(O2)});var xn,Tl,be,Q0=U(()=>{Le();vo();T0();Eo();ko();be=class{constructor(t,r){this.definition=t;re(this,xn,new Map);re(this,Tl,void 0);this.experimentalPGNotation=r?.experimentalPGNotation}name(){return this.definition.name}identityTransformation(){return Ut.experimentalConstructIdentity(this)}moveToTransformation(t){typeof t=="string"&&(t=new B(t));let r=t.toString(),n=d(this,xn).get(r);if(n)return new Ut(this,n);if(this.experimentalPGNotation){let l=this.experimentalPGNotation.lookupMove(t);if(!l)throw new Error(\`could not map to internal move: \${t}\`);return d(this,xn).set(r,l),new Ut(this,l)}let o=k2(this,t);return d(this,xn).set(r,o),new Ut(this,o)}algToTransformation(t){return typeof t=="string"&&(t=new k(t)),W2(t,this)}toTransformation(t){return typeof t=="string"?this.algToTransformation(t):t?.is?.(k)?this.algToTransformation(t):t?.is?.(B)?this.moveToTransformation(t):t}startState(){return new fe(this,this.definition.startStateData)}canConvertStateToUniqueTransformation(){return d(this,Tl)??j(this,Tl,(()=>{for(let[t,r]of Object.entries(this.definition.orbits)){let n=new Array(r.numPieces).fill(!1);for(let o of this.definition.startStateData[t].pieces)n[o]=!0;for(let o of n)if(!o)return!1}return!0})())}get state(){throw new Error("KPuzzle is now a different (stateless) class.")}reset(){throw new Error("KPuzzle is now a different (stateless) class.")}applyMove(t){throw new Error("KPuzzle is now a different class. Try \`.moveToTransformation()\` to get the transformation for a move.")}applyAlg(t){throw new Error("KPuzzle is now a different class. Try \`.algToTransformation()\` to get the transformation for an alg.")}};xn=new WeakMap,Tl=new WeakMap});var Fe,K2=U(()=>{Fe={name:"3x3x3",orbits:{EDGES:{numPieces:12,numOrientations:2},CORNERS:{numPieces:8,numOrientations:3},CENTERS:{numPieces:6,numOrientations:4}},startStateData:{EDGES:{pieces:[0,1,2,3,4,5,6,7,8,9,10,11],orientation:[0,0,0,0,0,0,0,0,0,0,0,0]},CORNERS:{pieces:[0,1,2,3,4,5,6,7],orientation:[0,0,0,0,0,0,0,0]},CENTERS:{pieces:[0,1,2,3,4,5],orientation:[0,0,0,0,0,0]}},moves:{U:{EDGES:{permutation:[1,2,3,0,4,5,6,7,8,9,10,11],orientation:[0,0,0,0,0,0,0,0,0,0,0,0]},CORNERS:{permutation:[1,2,3,0,4,5,6,7],orientation:[0,0,0,0,0,0,0,0]},CENTERS:{permutation:[0,1,2,3,4,5],orientation:[1,0,0,0,0,0]}},y:{EDGES:{permutation:[1,2,3,0,5,6,7,4,10,8,11,9],orientation:[0,0,0,0,0,0,0,0,1,1,1,1]},CORNERS:{permutation:[1,2,3,0,7,4,5,6],orientation:[0,0,0,0,0,0,0,0]},CENTERS:{permutation:[0,2,3,4,1,5],orientation:[1,0,0,0,0,3]}},x:{EDGES:{permutation:[4,8,0,9,6,10,2,11,5,7,1,3],orientation:[1,0,1,0,1,0,1,0,0,0,0,0]},CORNERS:{permutation:[4,0,3,5,7,6,2,1],orientation:[2,1,2,1,1,2,1,2]},CENTERS:{permutation:[2,1,5,3,0,4],orientation:[0,3,0,1,2,2]}},L:{EDGES:{permutation:[0,1,2,11,4,5,6,9,8,3,10,7],orientation:[0,0,0,0,0,0,0,0,0,0,0,0]},CORNERS:{permutation:[0,1,6,2,4,3,5,7],orientation:[0,0,2,1,0,2,1,0]},CENTERS:{permutation:[0,1,2,3,4,5],orientation:[0,1,0,0,0,0]}},F:{EDGES:{permutation:[9,1,2,3,8,5,6,7,0,4,10,11],orientation:[1,0,0,0,1,0,0,0,1,1,0,0]},CORNERS:{permutation:[3,1,2,5,0,4,6,7],orientation:[1,0,0,2,2,1,0,0]},CENTERS:{permutation:[0,1,2,3,4,5],orientation:[0,0,1,0,0,0]}},R:{EDGES:{permutation:[0,8,2,3,4,10,6,7,5,9,1,11],orientation:[0,0,0,0,0,0,0,0,0,0,0,0]},CORNERS:{permutation:[4,0,2,3,7,5,6,1],orientation:[2,1,0,0,1,0,0,2]},CENTERS:{permutation:[0,1,2,3,4,5],orientation:[0,0,0,1,0,0]}},B:{EDGES:{permutation:[0,1,10,3,4,5,11,7,8,9,6,2],orientation:[0,0,1,0,0,0,1,0,0,0,1,1]},CORNERS:{permutation:[0,7,1,3,4,5,2,6],orientation:[0,2,1,0,0,0,2,1]},CENTERS:{permutation:[0,1,2,3,4,5],orientation:[0,0,0,0,1,0]}},D:{EDGES:{permutation:[0,1,2,3,7,4,5,6,8,9,10,11],orientation:[0,0,0,0,0,0,0,0,0,0,0,0]},CORNERS:{permutation:[0,1,2,3,5,6,7,4],orientation:[0,0,0,0,0,0,0,0]},CENTERS:{permutation:[0,1,2,3,4,5],orientation:[0,0,0,0,0,1]}},z:{EDGES:{permutation:[9,3,11,7,8,1,10,5,0,4,2,6],orientation:[1,1,1,1,1,1,1,1,1,1,1,1]},CORNERS:{permutation:[3,2,6,5,0,4,7,1],orientation:[1,2,1,2,2,1,2,1]},CENTERS:{permutation:[1,5,2,0,4,3],orientation:[1,1,1,1,3,1]}},M:{EDGES:{permutation:[2,1,6,3,0,5,4,7,8,9,10,11],orientation:[1,0,1,0,1,0,1,0,0,0,0,0]},CORNERS:{permutation:[0,1,2,3,4,5,6,7],orientation:[0,0,0,0,0,0,0,0]},CENTERS:{permutation:[4,1,0,3,5,2],orientation:[2,0,0,0,2,0]}},E:{EDGES:{permutation:[0,1,2,3,4,5,6,7,9,11,8,10],orientation:[0,0,0,0,0,0,0,0,1,1,1,1]},CORNERS:{permutation:[0,1,2,3,4,5,6,7],orientation:[0,0,0,0,0,0,0,0]},CENTERS:{permutation:[0,4,1,2,3,5],orientation:[0,0,0,0,0,0]}},S:{EDGES:{permutation:[0,3,2,7,4,1,6,5,8,9,10,11],orientation:[0,1,0,1,0,1,0,1,0,0,0,0]},CORNERS:{permutation:[0,1,2,3,4,5,6,7],orientation:[0,0,0,0,0,0,0,0]},CENTERS:{permutation:[1,5,2,0,4,3],orientation:[1,1,0,1,0,1]}},u:{EDGES:{permutation:[1,2,3,0,4,5,6,7,10,8,11,9],orientation:[0,0,0,0,0,0,0,0,1,1,1,1]},CORNERS:{permutation:[1,2,3,0,4,5,6,7],orientation:[0,0,0,0,0,0,0,0]},CENTERS:{permutation:[0,2,3,4,1,5],orientation:[1,0,0,0,0,0]}},l:{EDGES:{permutation:[2,1,6,11,0,5,4,9,8,3,10,7],orientation:[1,0,1,0,1,0,1,0,0,0,0,0]},CORNERS:{permutation:[0,1,6,2,4,3,5,7],orientation:[0,0,2,1,0,2,1,0]},CENTERS:{permutation:[4,1,0,3,5,2],orientation:[2,1,0,0,2,0]}},f:{EDGES:{permutation:[9,3,2,7,8,1,6,5,0,4,10,11],orientation:[1,1,0,1,1,1,0,1,1,1,0,0]},CORNERS:{permutation:[3,1,2,5,0,4,6,7],orientation:[1,0,0,2,2,1,0,0]},CENTERS:{permutation:[1,5,2,0,4,3],orientation:[1,1,1,1,0,1]}},r:{EDGES:{permutation:[4,8,0,3,6,10,2,7,5,9,1,11],orientation:[1,0,1,0,1,0,1,0,0,0,0,0]},CORNERS:{permutation:[4,0,2,3,7,5,6,1],orientation:[2,1,0,0,1,0,0,2]},CENTERS:{permutation:[2,1,5,3,0,4],orientation:[0,0,0,1,2,2]}},b:{EDGES:{permutation:[0,5,10,1,4,7,11,3,8,9,6,2],orientation:[0,1,1,1,0,1,1,1,0,0,1,1]},CORNERS:{permutation:[0,7,1,3,4,5,2,6],orientation:[0,2,1,0,0,0,2,1]},CENTERS:{permutation:[3,0,2,5,4,1],orientation:[3,3,0,3,1,3]}},d:{EDGES:{permutation:[0,1,2,3,7,4,5,6,9,11,8,10],orientation:[0,0,0,0,0,0,0,0,1,1,1,1]},CORNERS:{permutation:[0,1,2,3,5,6,7,4],orientation:[0,0,0,0,0,0,0,0]},CENTERS:{permutation:[0,4,1,2,3,5],orientation:[0,0,0,0,0,1]}}}};Fe.moves.Uw=Fe.moves.u;Fe.moves.Lw=Fe.moves.l;Fe.moves.Fw=Fe.moves.f;Fe.moves.Rw=Fe.moves.r;Fe.moves.Bw=Fe.moves.b;Fe.moves.Dw=Fe.moves.d;Fe.moves.Rv=Fe.moves.x;Fe.moves.Uv=Fe.moves.y;Fe.moves.Fv=Fe.moves.z;Fe.moves.Lv={EDGES:{permutation:[2,10,6,11,0,8,4,9,1,3,5,7],orientation:[1,0,1,0,1,0,1,0,0,0,0,0]},CORNERS:{permutation:[1,7,6,2,0,3,5,4],orientation:[2,1,2,1,1,2,1,2]},CENTERS:{permutation:[4,1,0,3,5,2],orientation:[2,1,0,3,2,0]}};Fe.moves.Dv={EDGES:{permutation:[3,0,1,2,7,4,5,6,9,11,8,10],orientation:[0,0,0,0,0,0,0,0,1,1,1,1]},CORNERS:{permutation:[3,0,1,2,5,6,7,4],orientation:[0,0,0,0,0,0,0,0]},CENTERS:{permutation:[0,4,1,2,3,5],orientation:[3,0,0,0,0,1]}};Fe.moves.Bv={EDGES:{permutation:[8,5,10,1,9,7,11,3,4,0,6,2],orientation:[1,1,1,1,1,1,1,1,1,1,1,1]},CORNERS:{permutation:[4,7,1,0,5,3,2,6],orientation:[1,2,1,2,2,1,2,1]},CENTERS:{permutation:[3,0,2,5,4,1],orientation:[3,3,3,3,1,3]}}});var bn,Ce=U(()=>{Q0();Eo();ko();K2();Q0();bn=new be(Fe)});var Q2=U(()=>{Ce()});var Am,i8,j2=U(()=>{Am={"333":{puzzleID:"3x3x3",eventName:"3x3x3 Cube"},"222":{puzzleID:"2x2x2",eventName:"2x2x2 Cube"},"444":{puzzleID:"4x4x4",eventName:"4x4x4 Cube"},"555":{puzzleID:"5x5x5",eventName:"5x5x5 Cube"},"666":{puzzleID:"6x6x6",eventName:"6x6x6 Cube"},"777":{puzzleID:"7x7x7",eventName:"7x7x7 Cube"},"333bf":{puzzleID:"3x3x3",eventName:"3x3x3 Blindfolded"},"333fm":{puzzleID:"3x3x3",eventName:"3x3x3 Fewest Moves"},"333oh":{puzzleID:"3x3x3",eventName:"3x3x3 One-Handed"},clock:{puzzleID:"clock",eventName:"Clock"},minx:{puzzleID:"megaminx",eventName:"Megaminx"},pyram:{puzzleID:"pyraminx",eventName:"Pyraminx"},skewb:{puzzleID:"skewb",eventName:"Skewb"},sq1:{puzzleID:"square1",eventName:"Square-1"},"444bf":{puzzleID:"4x4x4",eventName:"4x4x4 Blindfolded"},"555bf":{puzzleID:"5x5x5",eventName:"5x5x5 Blindfolded"},"333mb":{puzzleID:"3x3x3",eventName:"3x3x3 Multi-Blind"}},i8={...Am,fto:{puzzleID:"fto",eventName:"Face-Turning Octahedron"},master_tetraminx:{puzzleID:"master_tetraminx",eventName:"Master Tetraminx"},kilominx:{puzzleID:"kilominx",eventName:"Kilominx"},redi_cube:{puzzleID:"redi_cube",eventName:"Redi Cube"}}});function _m(e){switch(e){case"Regular":return ym;case"Dim":return vm;case"Ignored":return Um;case"OrientationStickers":return bm;case"Invisible":return xm;case"IgnoreNonPrimary":return Sm;case"PermuteNonPrimary":return wm;case"Ignoriented":return Em;case"OrientationWithoutPermutation":return km}}var _o,wn,Ct,qe,Sn,Gl,Kr,ym,Um,bm,xm,Sm,wm,vm,Em,km,zo,Co,Po=U(()=>{_o=(f=>(f.Regular="Regular",f.Dim="Dim",f.Ignored="Ignored",f.OrientationStickers="OrientationStickers",f.Invisible="Invisible",f.Ignoriented="Ignoriented",f.IgnoreNonPrimary="IgnoreNonPrimary",f.PermuteNonPrimary="PermuteNonPrimary",f.OrientationWithoutPermutation="OrientationWithoutPermutation",f))(_o||{}),wn=class{constructor(t,r){this.stickerings=new Map;for(let[n,o]of Object.entries(t.definition.orbits))this.stickerings.set(n,new Array(o.numPieces).fill(r))}},Ct="regular",qe="ignored",Sn="oriented",Gl="invisible",Kr="dim",ym={facelets:[Ct,Ct,Ct,Ct,Ct]},Um={facelets:[qe,qe,qe,qe,qe]},bm={facelets:[Sn,Sn,Sn,Sn,Sn]},xm={facelets:[Gl,Gl,Gl,Gl]},Sm={facelets:[Ct,qe,qe,qe,qe]},wm={facelets:[Kr,Ct,Ct,Ct,Ct]},vm={facelets:[Kr,Kr,Kr,Kr,Kr]},Em={facelets:[Kr,qe,qe,qe,qe]},km={facelets:[Sn,qe,qe,qe,qe]};zo=class extends wn{constructor(t){super(t,"Regular")}set(t,r){for(let[n,o]of this.stickerings.entries())for(let l=0;l<o.length;l++)t.stickerings.get(n)[l]&&(o[l]=r);return this}toAppearance(){let t={orbits:{}};for(let[r,n]of this.stickerings.entries()){let o=[],l={pieces:o};t.orbits[r]=l;for(let i of n)o.push(_m(i))}return t}},Co=class{constructor(t){this.kpuzzle=t}and(t){let r=new wn(this.kpuzzle,!1);for(let[n,o]of Object.entries(this.kpuzzle.definition.orbits)){e:for(let l=0;l<o.numPieces;l++){r.stickerings.get(n)[l]=!0;for(let i of t)if(!i.stickerings.get(n)[l]){r.stickerings.get(n)[l]=!1;continue e}}}return r}or(t){let r=new wn(this.kpuzzle,!1);for(let[n,o]of Object.entries(this.kpuzzle.definition.orbits)){e:for(let l=0;l<o.numPieces;l++){r.stickerings.get(n)[l]=!1;for(let i of t)if(i.stickerings.get(n)[l]){r.stickerings.get(n)[l]=!0;continue e}}}return r}not(t){let r=new wn(this.kpuzzle,!1);for(let[n,o]of Object.entries(this.kpuzzle.definition.orbits))for(let l=0;l<o.numPieces;l++)r.stickerings.get(n)[l]=!t.stickerings.get(n)[l];return r}all(){return this.and(this.moves([]))}move(t){let r=this.kpuzzle.moveToTransformation(t),n=new wn(this.kpuzzle,!1);for(let[o,l]of Object.entries(this.kpuzzle.definition.orbits))for(let i=0;i<l.numPieces;i++)(r.transformationData[o].permutation[i]!==i||r.transformationData[o].orientation[i]!==0)&&(n.stickerings.get(o)[i]=!0);return n}moves(t){return t.map(r=>this.move(r))}}});function zm(e){(async()=>{q2=e;let t=Array.from(document.body.querySelectorAll("twisty-player"));console.log(\`Setting the custom stickering for \${t.length} players!\`);let r=[];for(let n of t)r.push((async()=>{let o=await n.experimentalModel.twistySceneModel.stickering.get();n.experimentalStickering=o==="experimental-global-custom-1"?"experimental-global-custom-2":"experimental-global-custom-1"})());await Promise.all(r),console.log("Success!")})()}function V2(e,t){q2(e,t)}var q2,H2=U(()=>{Po();q2=()=>{};globalThis.location&&new URL(location.href).searchParams.get("global-custom-stickerer")==="true"&&(window.setGlobalCustomStickerer=zm,window.PieceStickering=_o,console.log("Global custom stickerer enabled! (using: global-custom-stickerer=true)"),console.log("Look here for inspiration:","https://github.com/cubing/cubing.js/blob/81b5cab3e27d8defb39dd1e0a10bc9e8ba894d26/src/cubing/puzzles/stickerings/cube-stickerings.ts#L67"))});async function Pt(e,t){let r=await e.kpuzzle(),n=new zo(r),o=new Co(r),l=()=>o.move("U"),i=()=>o.or(o.moves(["U","D"])),a=()=>o.not(i()),s=()=>o.or(o.moves(["L","R"])),f=()=>o.not(s()),g=()=>o.or(o.moves(["F","B"])),p=()=>o.not(g()),u=()=>o.not(l()),c=()=>o.and([l(),f(),p()]),m=()=>o.and([o.and(o.moves(["F","R"])),o.not(i())]),L=()=>o.and(o.moves(["D","R","F"])),R=()=>o.or([L(),m()]),h=()=>o.or([o.and([f(),a()]),o.and([f(),p()]),o.and([a(),p()])]),y=()=>o.or([o.and([f(),i(),g()]),o.and([a(),s(),g()]),o.and([p(),i(),s()])]),A=()=>o.not(o.or([h(),y()])),E=()=>o.or([f(),o.and([l(),y()])]);function v(){n.set(u(),"Dim")}function K(){n.set(l(),"PermuteNonPrimary"),n.set(c(),"Dim")}function Z(){n.set(l(),"IgnoreNonPrimary"),n.set(c(),"Regular")}function M(){n.set(l(),"Ignoriented"),n.set(c(),"Dim")}switch(t){case"full":break;case"PLL":v(),K();break;case"CLS":v(),n.set(o.and(o.moves(["D","R","F"])),"Regular"),n.set(l(),"Ignoriented"),n.set(o.and([l(),f(),p()]),"Dim"),n.set(o.and([l(),A()]),"IgnoreNonPrimary");break;case"OLL":v(),Z();break;case"COLL":v(),K(),n.set(o.and([l(),A()]),"Regular");break;case"OCLL":v(),M(),n.set(o.and([l(),A()]),"IgnoreNonPrimary");break;case"CLL":v(),n.set(o.not(o.and([A(),l()])),"Dim");break;case"ELL":v(),n.set(l(),"Dim"),n.set(o.and([l(),y()]),"Regular");break;case"ELS":v(),Z(),n.set(o.and([l(),A()]),"Ignored"),n.set(m(),"Regular"),n.set(L(),"Ignored");break;case"LL":v();break;case"F2L":n.set(l(),"Ignored");break;case"ZBLL":v(),n.set(l(),"PermuteNonPrimary"),n.set(c(),"Dim"),n.set(o.and([l(),A()]),"Regular");break;case"ZBLS":v(),n.set(R(),"Regular"),Z(),n.set(o.and([l(),A()]),"Ignored");break;case"WVLS":case"VLS":v(),n.set(R(),"Regular"),Z();break;case"LS":v(),n.set(R(),"Regular"),n.set(l(),"Ignored"),n.set(c(),"Dim");break;case"EO":n.set(A(),"Ignored"),n.set(y(),"OrientationWithoutPermutation");break;case"EOline":n.set(A(),"Ignored"),n.set(y(),"OrientationWithoutPermutation"),n.set(o.and(o.moves(["D","M"])),"Regular");break;case"EOcross":n.set(y(),"OrientationWithoutPermutation"),n.set(o.move("D"),"Regular"),n.set(A(),"Ignored");break;case"CMLL":n.set(u(),"Dim"),n.set(E(),"Ignored"),n.set(o.and([l(),A()]),"Regular");break;case"L6E":n.set(o.not(E()),"Dim");break;case"L6EO":n.set(o.not(E()),"Dim"),n.set(E(),"OrientationWithoutPermutation"),n.set(o.and([h(),i()]),"OrientationStickers");break;case"Daisy":n.set(o.all(),"Ignored"),n.set(h(),"Dim"),n.set(o.and([o.move("D"),h()]),"Regular"),n.set(o.and([o.move("U"),y()]),"IgnoreNonPrimary");break;case"Cross":n.set(o.all(),"Ignored"),n.set(h(),"Dim"),n.set(o.and([o.move("D"),h()]),"Regular"),n.set(o.and([o.move("D"),y()]),"Regular");break;case"2x2x2":n.set(o.or(o.moves(["U","F","R"])),"Ignored"),n.set(o.and([o.or(o.moves(["U","F","R"])),h()]),"Dim");break;case"2x2x3":n.set(o.all(),"Dim"),n.set(o.or(o.moves(["U","F","R"])),"Ignored"),n.set(o.and([o.or(o.moves(["U","F","R"])),h()]),"Dim"),n.set(o.and([o.move("F"),o.not(o.or(o.moves(["U","R"])))]),"Regular");break;case"Void Cube":n.set(h(),"Invisible");break;case"picture":case"invisible":n.set(o.all(),"Invisible");break;case"centers-only":n.set(o.not(h()),"Ignored");break;case"experimental-global-custom-1":case"experimental-global-custom-2":V2(n,o);break;default:console.warn(\`Unsupported stickering for \${e.id}: \${t}. Setting all pieces to dim.\`),n.set(o.and(o.moves([])),"Dim")}return n.toAppearance()}async function vn(){return["full","PLL","CLS","OLL","COLL","OCLL","ELL","ELS","LL","F2L","ZBLL","ZBLS","WVLS","VLS","LS","EO","EOline","EOcross","CMLL","L6E","L6EO","Daisy","Cross","2x2x2","2x2x3","Void Cube","picture","invisible","centers-only"]}var En=U(()=>{Po();H2()});function de(e){let t=null;return()=>t??(t=e())}var Mt=U(()=>{});var Mo,Y2=U(()=>{Mo=class{constructor(t,r){this.facenames=t;this.prefixFree=!0;this.gripnames=[];r&&(this.gripnames=r);for(let n=0;this.prefixFree&&n<t.length;n++)for(let o=0;this.prefixFree&&o<t.length;o++)n!==o&&t[n].startsWith(t[o])&&(this.prefixFree=!1)}setGripNames(t){this.gripnames=t}splitByFaceNames(t){let r=[],n=0;for(;n<t.length;){n>0&&n<t.length&&t[n]==="_"&&n++;let o=-1;for(let l=0;l<this.facenames.length;l++)t.substr(n).startsWith(this.facenames[l])&&(o<0||this.facenames[l].length>this.facenames[o].length)&&(o=l);if(o>=0)r.push(o),n+=this.facenames[o].length;else throw new Error("Could not split "+t+" into face names.")}return r}joinByFaceIndices(t){let r="",n=[];for(let o=0;o<t.length;o++)n.push(r),n.push(this.facenames[t[o]]),this.prefixFree||(r="_");return n.join("")}spinmatch(t,r){if(t===r)return!0;try{let n=this.splitByFaceNames(t),o=this.splitByFaceNames(r);if(n.length!==o.length&&n.length<3)return!1;for(let l=0;l<n.length;l++){for(let a=0;a<l;a++)if(n[l]===n[a])return!1;let i=!1;for(let a=0;a<o.length;a++)if(n[l]===o[a]){i=!0;break}if(!i)return!1}return!0}catch{return!1}}spinmatchv(t,r){return t.endsWith("v")&&r.endsWith("v")?this.spinmatch(t.slice(0,t.length-1),r.slice(0,r.length-1)):this.spinmatch(t,r)}unswizzle(t){(t.endsWith("v")||t.endsWith("w"))&&t[0]<="Z"&&(t=t.slice(0,t.length-1));let r=t.toUpperCase();for(let n=0;n<this.gripnames.length;n++){let o=this.gripnames[n];if(this.spinmatch(r,o))return o}return t}}});var kn,J2=U(()=>{kn=class{notationToInternal(t){return t}notationToExternal(t){return t}}});var Ol,Z2=U(()=>{Le();Ol=class{constructor(t,r){this.child=t;this.sw=r}notationToInternal(t){return t.family==="T"&&t.innerLayer===void 0&&t.outerLayer===void 0?new B(new C("FLRv",t.innerLayer,t.outerLayer),t.amount):this.child.notationToInternal(t)}notationToExternal(t){let r=t.family;return r.length>0&&r[r.length-1]==="v"&&(r=r.substring(0,r.length-1)),this.sw.spinmatch(r,"FLUR")?new B(new C("T",t.innerLayer,t.outerLayer),t.amount):this.child.notationToExternal(t)}}});var No,X2=U(()=>{Le();No=class{constructor(t,r){this.internalNames=t;this.externalNames=r}convertString(t,r,n){let o="";(t.endsWith("v")||t.endsWith("v"))&&t<="_"&&(o=t.slice(t.length-1),t=t.slice(0,t.length-1));let l=t.toUpperCase(),i=!1;return t!==l&&(i=!0,t=l),t=n.joinByFaceIndices(r.splitByFaceNames(t)),i&&(t=t.toLowerCase()),t+o}convert(t,r,n){let o=t.family,l=this.convertString(o,r,n);return o===l?t:new B(new C(l,t.innerLayer,t.outerLayer),t.amount)}notationToInternal(t){return this.convert(t,this.externalNames,this.internalNames)}notationToExternal(t){return this.convert(t,this.internalNames,this.externalNames)}}});var Il,$2=U(()=>{Le();Il=class{constructor(t){this.child=t}notationToInternal(t){if(t.innerLayer===void 0&&t.outerLayer===void 0){if(Math.abs(t.amount)===1){if(t.family==="R++")return new B(new C("L",3,2),-2*t.amount);if(t.family==="R--")return new B(new C("L",3,2),2*t.amount);if(t.family==="D++")return new B(new C("U",3,2),-2*t.amount);if(t.family==="D--")return new B(new C("U",3,2),2*t.amount);if(t.family==="R_PLUSPLUS_")return new B(new C("L",3,2),-2*t.amount);if(t.family==="D_PLUSPLUS_")return new B(new C("U",3,2),-2*t.amount)}if(t.family==="y")return new B("Uv",t.amount)}return this.child.notationToInternal(t)}notationToExternal(t){return t.family==="Uv"?new B(new C("y",t.innerLayer,t.outerLayer),t.amount):t.family==="Dv"?new B("y",-t.amount):this.child.notationToExternal(t)}}});var Wl,ef=U(()=>{Le();Wl=class{constructor(t){this.slices=t}notationToInternal(t){let r=t.family;return!t.innerLayer&&!t.outerLayer&&(r==="x"?t=new B("Rv",t.amount):r==="y"?t=new B("Uv",t.amount):r==="z"&&(t=new B("Fv",t.amount)),(this.slices&1)===1&&(r==="E"?t=new B(new C("D",(this.slices+1)/2),t.amount):r==="M"?t=new B(new C("L",(this.slices+1)/2),t.amount):r==="S"&&(t=new B(new C("F",(this.slices+1)/2),t.amount))),this.slices>2&&(r==="e"?t=new B(new C("D",this.slices-1,2),t.amount):r==="m"?t=new B(new C("L",this.slices-1,2),t.amount):r==="s"&&(t=new B(new C("F",this.slices-1,2),t.amount)))),t}notationToExternal(t){let r=t.family;if(!t.innerLayer&&!t.outerLayer){if(r==="Rv")return new B("x",t.amount);if(r==="Uv")return new B("y",t.amount);if(r==="Fv")return new B("z",t.amount);if(r==="Lv")return new B("x",-t.amount);if(r==="Dv")return new B("y",-t.amount);if(r==="Bv")return new B("z",-t.amount)}return t}}});var Cm,Pm,tf,rf,nf,To,Kl,of=U(()=>{Le();Cm={U:"frl",L:"fld",R:"fdr",B:"dlr",u:"FRL",l:"FLD",r:"FDR",b:"DLR",Uv:"FRLv",Lv:"FLDv",Rv:"FDRv",Bv:"DLRv",D:"D",F:"F",BL:"L",BR:"R"},Pm={U:"FRL",L:"FLD",R:"FDR",B:"DLR",u:"frl",l:"fld",r:"fdr",b:"dlr",Uv:"FRLv",Lv:"FLDv",Rv:"FDRv",Bv:"DLRv",D:"D",F:"F",BL:"L",BR:"R",d:"d",f:"f",bl:"l",br:"r"},tf={U:"FRL",L:"FLD",R:"FDR",B:"DLR"},rf=new C("y"),nf=new C("Dv"),To=class{constructor(t){this.child=t;this.wcaHack=!1;this.map=Cm}notationToInternal(t){if(this.wcaHack&&t.innerLayer===2&&t.outerLayer===null){let n=tf[t.family];if(n)return new B(new C(n,t.innerLayer,t.outerLayer),t.amount)}let r=this.map[t.family];return r?new B(new C(r,t.innerLayer,t.outerLayer),t.amount):rf.isIdentical(t.quantum)?new B(nf,-t.amount):null}notationToExternal(t){if(this.wcaHack&&t.innerLayer===2&&t.outerLayer===null){for(let[r,n]of Object.entries(tf))if(this.child.spinmatch(t.family,n))return new B(new C(r,t.innerLayer,t.outerLayer),t.amount)}for(let[r,n]of Object.entries(this.map))if(this.child.spinmatch(t.family,n))return new B(new C(r,t.innerLayer,t.outerLayer),t.amount);return nf.isIdentical(t.quantum)?new B(rf,-t.amount):null}},Kl=class extends To{constructor(t){super(t);this.wcaHack=!0;this.map=Pm}}});var lf,j0,af,Mm,q0,sf,Nm,V0,ff,Tm,Ql,uf=U(()=>{Le();lf={U:"UBL",UL:"ULF",F:"UFR",UR:"URB",B:"DBL",D:"DFR",L:"DLF",R:"DRB",Uv:"UBLv",ULv:"ULFv",Fv:"UFRv",URv:"URBv",Bv:"DBLv",Dv:"DFRv",Lv:"DLFv",Rv:"DRBv"},j0=new C("x"),af=new C("Rv"),Mm=new C("Lv"),q0=new C("y"),sf=new C("Uv"),Nm=new C("Dv"),V0=new C("z"),ff=new C("Fv"),Tm=new C("Bv"),Ql=class{constructor(t){this.child=t}notationToInternal(t){if(t.innerLayer||t.outerLayer)return null;let r=lf[t.family];return r?new B(new C(r,t.outerLayer,t.innerLayer),t.amount):j0.isIdentical(t.quantum)?new B(af,t.amount):q0.isIdentical(t.quantum)?new B(sf,t.amount):V0.isIdentical(t.quantum)?new B(ff,t.amount):null}notationToExternal(t){for(let[r,n]of Object.entries(lf))if(this.child.spinmatchv(t.family,n))return new B(new C(r,t.innerLayer,t.outerLayer),t.amount);return af.isIdentical(t.quantum)?new B(j0,t.amount):Mm.isIdentical(t.quantum)?new B(j0,-t.amount):sf.isIdentical(t.quantum)?new B(q0,t.amount):Nm.isIdentical(t.quantum)?new B(q0,-t.amount):ff.isIdentical(t.quantum)?new B(V0,t.amount):Tm.isIdentical(t.quantum)?new B(V0,-t.amount):null}}});var H0=U(()=>{J2();Z2();X2();$2();ef();of();uf()});function gf(e){let t=0,r={};for(;t<e.length&&e[t][0]==="-";){let o=e[t++];if(o==="--rotations")r.addRotations=!0;else if(o==="--allmoves")r.allMoves=!0;else if(o==="--outerblockmoves")r.outerBlockMoves=!0;else if(o==="--vertexmoves")r.vertexMoves=!0;else if(o==="--nocorners")r.includeCornerOrbits=!1;else if(o==="--noedges")r.includeEdgeOrbits=!1;else if(o==="--noorientation")r.fixedOrientation=!0;else if(o==="--nocenters")r.includeCenterOrbits=!1;else if(o==="--omit")r.excludeOrbits=e[t].split(","),t++;else if(o==="--moves")r.moveList=e[t].split(","),t++;else if(o==="--optimize")r.optimizeOrbits=!0;else if(o==="--scramble")r.scrambleAmount=100;else if(o==="--fixcorner")r.fixedPieceType="v";else if(o==="--fixedge")r.fixedPieceType="e";else if(o==="--fixcenter")r.fixedPieceType="f";else if(o==="--orientcenters")r.orientCenters=!0;else if(o==="--puzzleorientation")r.puzzleOrientation=JSON.parse(e[t]),t++;else throw new Error("Bad option: "+o)}return{puzzleDescription:Go(e.slice(t).join(" ")),options:r}}var Y0,J0=U(()=>{jl();Y0=class{constructor(t={}){this.verbosity=0;this.allMoves=!1;this.vertexMoves=!1;this.addRotations=!1;this.moveList=null;this.fixedOrientation=!1;this.fixedPieceType=null;this.orientCenters=!1;this.includeCornerOrbits=!0;this.includeCenterOrbits=!0;this.includeEdgeOrbits=!0;this.excludeOrbits=[];this.optimizeOrbits=!1;this.grayCorners=!1;this.grayCenters=!1;this.grayEdges=!1;this.puzzleOrientation=null;this.puzzleOrientations=null;this.scrambleAmount=0;Object.assign(this,t)}}});function cr(e){if(!Z0[e]){let t=Array(e);for(let r=0;r<e;r++)t[r]=0;Z0[e]=t}return Z0[e]}function Nt(e){if(!X0[e]){let t=Array(e);for(let r=0;r<e;r++)t[r]=r;X0[e]=t}return X0[e]}function pf(e){return new mt(Nt(e))}function cf(e){let t=1;for(;e>1;)t*=e,e--;return t}function Gm(e,t){if(e>t){let r=e;e=t,t=r}for(;e>0;){let r=t%e;t=e,e=r}return t}function $0(e,t){return e/Gm(e,t)*t}var Z0,X0,mt,ql=U(()=>{Z0=[],X0=[];mt=class{constructor(t){this.n=t.length,this.p=t}toString(){return"Perm["+this.p.join(" ")+"]"}mul(t){let r=Array(this.n);for(let n=0;n<this.n;n++)r[n]=t.p[this.p[n]];return new mt(r)}rmul(t){let r=Array(this.n);for(let n=0;n<this.n;n++)r[n]=this.p[t.p[n]];return new mt(r)}inv(){let t=Array(this.n);for(let r=0;r<this.n;r++)t[this.p[r]]=r;return new mt(t)}compareTo(t){for(let r=0;r<this.n;r++)if(this.p[r]!==t.p[r])return this.p[r]-t.p[r];return 0}toGap(){let t=new Array,r=new Array(this.n);for(let n=0;n<this.p.length;n++){if(r[n]||this.p[n]===n)continue;let o=new Array;for(let l=n;!r[l];l=this.p[l])o.push(1+l),r[l]=!0;t.push("("+o.join(",")+")")}return t.join("")}order(){let t=1,r=new Array(this.n);for(let n=0;n<this.p.length;n++){if(r[n]||this.p[n]===n)continue;let o=0;for(let l=n;!r[l];l=this.p[l])o++,r[l]=!0;t=$0(t,o)}return t}}});function ta(e,t){let r=B.fromString(t),n=e.notationToExternal(r);return n===null||r===n?t:n.toString()}function mf(e,t){let r=e.moveops.length;if(r>30)throw new Error("Canon info too big for bitmask");let n=[],o=[];for(let i=0;i<r;i++){let a=e.moveops[i];n.push(a.order());let s=0;for(let f=0;f<r;f++){if(f===i)continue;let g=e.moveops[f];a.mul(g).equal(g.mul(a))&&(s|=1<<f)}o.push(s)}let l={};l[0]=1;for(let i=0;i<100;i++){let a=0,s={},f=0;for(let g in l){let p=+g,u=l[p];a+=u,f++;for(let c=0;c<n.length;c++)if((p>>c&1)===0&&(p&o[c]&(1<<c)-1)===0){let m=p&o[c]|1<<c;s[m]===void 0&&(s[m]=0),s[m]+=(n[c]-1)*u}}t(\`\${i}: canonseq \${a} states \${f}\`),l=s}}var Oo,Om,_n,bt,Yt,ra,mr,zn,ea,Lf=U(()=>{Le();H0();ql();Oo=class{constructor(t,r){this.size=t;this.mod=r}reassemblySize(){return cf(this.size)*Math.pow(this.mod,this.size)}},Om=0;_n=class{constructor(t,r,n,o,l){this.orbitnames=t;this.orbitdefs=r;this.solved=n;this.movenames=o;this.moveops=l}transformToKTransformationData(t){let r={};for(let n=0;n<this.orbitnames.length;n++)r[this.orbitnames[n]]=t.orbits[n].toKPuzzle();return r}static transformToKTransformationData(t,r){let n={};for(let o=0;o<t.length;o++)n[t[o]]=r.orbits[o].toKPuzzle();return n}toKsolve(t,r=new kn){let n=[];n.push("Name "+t),n.push("");for(let o=0;o<this.orbitnames.length;o++)n.push(\`Set \${this.orbitnames[o]} \${this.orbitdefs[o].size} \${this.orbitdefs[o].mod}\`);n.push(""),n.push("Solved");for(let o=0;o<this.orbitnames.length;o++)this.solved.orbits[o].appendDefinition(n,this.orbitnames[o],!1,!1);n.push("End");for(let o=0;o<this.movenames.length;o++){n.push("");let l=ta(r,this.movenames[o]),i=!1;l[l.length-1]==="'"&&(i=!0,l=l.substring(0,l.length-1)),n.push("Move "+l);for(let a=0;a<this.orbitnames.length;a++)i?this.moveops[o].orbits[a].inv().appendDefinition(n,this.orbitnames[a],!0):this.moveops[o].orbits[a].appendDefinition(n,this.orbitnames[a],!0);n.push("End")}return n}toKPuzzleDefinition(t){let r={},n={};for(let l=0;l<this.orbitnames.length;l++){r[this.orbitnames[l]]={numPieces:this.orbitdefs[l].size,numOrientations:this.orbitdefs[l].mod};let i=this.solved.orbits[l].toKPuzzle();n[this.orbitnames[l]]={pieces:i.permutation,orientation:i.orientation}}let o={};if(t)for(let l=0;l<this.movenames.length;l++)o[this.movenames[l]]=this.transformToKTransformationData(this.moveops[l]);return{name:\`PG3D #\${++Om}\`,orbits:r,startStateData:n,moves:o}}optimize(){let t=[],r=[],n=[],o=[];for(let l=0;l<this.moveops.length;l++)o.push([]);for(let l=0;l<this.orbitdefs.length;l++){let i=this.orbitdefs[l].mod,a=this.orbitdefs[l].size,s=new ea(a),f=new Array(this.orbitdefs[l].size);for(let c=0;c<a;c++)f[c]=!1;for(let c=0;c<this.moveops.length;c++)for(let m=0;m<a;m++)(this.moveops[c].orbits[l].perm[m]!==m||this.moveops[c].orbits[l].ori[m]!==0)&&(f[m]=!0,s.union(m,this.moveops[c].orbits[l].perm[m]));let g=!0;if(i>1){g=!1;let c=new ea(this.orbitdefs[l].size*i);for(let m=0;m<this.moveops.length;m++)for(let L=0;L<a;L++)if(this.moveops[m].orbits[l].perm[L]!==L||this.moveops[m].orbits[l].ori[L]!==0)for(let R=0;R<i;R++)c.union(L*i+R,this.moveops[m].orbits[l].perm[L]*i+(R+this.moveops[m].orbits[l].ori[L])%i);for(let m=0;!g&&m<a;m++)for(let L=1;L<i;L++)c.find(m*i)===c.find(m*i+L)&&(g=!0);for(let m=0;!g&&m<a;m++)for(let L=0;L<m;L++)this.solved.orbits[l].perm[m]===this.solved.orbits[l].perm[L]&&(g=!0)}let p=-1,u=!1;for(let c=0;c<this.orbitdefs[l].size;c++)if(f[c]){let m=s.find(c);p<0?p=m:p!==m&&(u=!0)}for(let c=0;c<this.orbitdefs[l].size;c++){if(!f[c]||s.find(c)!==c)continue;let L=[],R=[],h=0;for(let y=0;y<this.orbitdefs[l].size;y++)s.find(y)===c&&(L[h]=y,R[y]=h,h++);if(u?t.push(\`\${this.orbitnames[l]}_p\${c}\`):t.push(this.orbitnames[l]),g){r.push(new Oo(h,this.orbitdefs[l].mod)),n.push(this.solved.orbits[l].remapVS(L,h));for(let y=0;y<this.moveops.length;y++)o[y].push(this.moveops[y].orbits[l].remap(L,R,h))}else{r.push(new Oo(h,1)),n.push(this.solved.orbits[l].remapVS(L,h).killOri());for(let y=0;y<this.moveops.length;y++)o[y].push(this.moveops[y].orbits[l].remap(L,R,h).killOri())}}}return new _n(t,r,new zn(n),this.movenames,o.map(l=>new mr(l)))}scramble(t){this.solved=this.solved.mul(this.getScrambleTransformation(t))}getScrambleTransformation(t){t<100&&(t=100);let r=[];for(let o=0;o<this.moveops.length;o++)r[o]=this.moveops[o];for(let o=0;o<r.length;o++){let l=Math.floor(Math.random()*r.length),i=r[o];r[o]=r[l],r[l]=i}t<r.length&&(t=r.length);for(let o=0;o<t;o++){let l=Math.floor(Math.random()*r.length),i=Math.floor(Math.random()*r.length),a=Math.floor(Math.random()*this.moveops.length);r[l]=r[l].mul(r[i]).mul(this.moveops[a]),Math.random()<.1&&(r[l]=r[l].mul(this.moveops[a]))}let n=r[0];for(let o=1;o<r.length;o++)n=n.mul(r[o]);return n}reassemblySize(){let t=1;for(let r=0;r<this.orbitdefs.length;r++)t*=this.orbitdefs[r].reassemblySize();return t}},bt=class{constructor(t,r,n){this.perm=t;this.ori=r;this.orimod=n}static e(t,r){return new bt(Nt(t),cr(t),r)}mul(t){let r=this.perm.length,n=new Array(r);if(this.orimod===1){for(let o=0;o<r;o++)n[o]=this.perm[t.perm[o]];return new bt(n,this.ori,this.orimod)}else{let o=new Array(r);for(let l=0;l<r;l++)n[l]=this.perm[t.perm[l]],o[l]=(this.ori[t.perm[l]]+t.ori[l])%this.orimod;return new bt(n,o,this.orimod)}}inv(){let t=this.perm.length,r=new Array(t),n=new Array(t);for(let o=0;o<t;o++)r[this.perm[o]]=o,n[this.perm[o]]=(this.orimod-this.ori[o])%this.orimod;return new bt(r,n,this.orimod)}equal(t){let r=this.perm.length;for(let n=0;n<r;n++)if(this.perm[n]!==t.perm[n]||this.ori[n]!==t.ori[n])return!1;return!0}killOri(){let t=this.perm.length;for(let r=0;r<t;r++)this.ori[r]=0;return this.orimod=1,this}toPerm(){let t=this.orimod;if(t===1)return new mt(this.perm);let r=this.perm.length,n=new Array(r*t);for(let o=0;o<r;o++)for(let l=0;l<t;l++)n[o*t+l]=t*this.perm[o]+(this.ori[o]+l)%t;return new mt(n)}identicalPieces(){let t=[],r=this.perm.length,n=[];for(let o=0;o<r;o++){let l=this.perm[o];if(t[l]===void 0){let i=[o];t[l]=!0;for(let a=o+1;a<r;a++)this.perm[a]===l&&i.push(a);n.push(i)}}return n}order(){return this.toPerm().order()}isIdentity(){let t=this.perm.length;if(this.perm===Nt(t)&&this.ori===cr(t))return!0;for(let r=0;r<t;r++)if(this.perm[r]!==r||this.ori[r]!==0)return!1;return!0}zeroOris(){let t=this.perm.length;if(this.ori===cr(t))return!0;for(let r=0;r<t;r++)if(this.ori[r]!==0)return!1;return!0}remap(t,r,n){let o=new Array(n),l=new Array(n);for(let i=0;i<n;i++)o[i]=r[this.perm[t[i]]],l[i]=this.ori[t[i]];return new bt(o,l,this.orimod)}remapVS(t,r){let n=new Array(r),o=new Array(r),l=0,i=[];for(let a=0;a<r;a++){let s=this.perm[t[a]];i[s]===void 0&&(i[s]=l++),n[a]=i[s],o[a]=this.ori[t[a]]}return new bt(n,o,this.orimod)}appendDefinition(t,r,n,o=!0){if(!(o&&this.isIdentity())&&(t.push(r),t.push(this.perm.map(l=>l+1).join(" ")),!this.zeroOris()))if(n){let l=new Array(this.ori.length);for(let i=0;i<l.length;i++)l[this.perm[i]]=this.ori[i];t.push(l.join(" "))}else t.push(this.ori.join(" "))}toKPuzzle(){let t=this.perm.length;return this.isIdentity()?(bt.kcache[t]||(bt.kcache[t]={permutation:Nt(t),orientation:cr(t)}),bt.kcache[t]):{permutation:this.perm,orientation:this.ori}}},Yt=bt;Yt.kcache=[];ra=class{constructor(t){this.orbits=t}internalMul(t){let r=[];for(let n=0;n<this.orbits.length;n++)r.push(this.orbits[n].mul(t.orbits[n]));return r}internalInv(){let t=[];for(let r of this.orbits)t.push(r.inv());return t}equal(t){for(let r=0;r<this.orbits.length;r++)if(!this.orbits[r].equal(t.orbits[r]))return!1;return!0}killOri(){for(let t of this.orbits)t.killOri();return this}toPerm(){let t=new Array,r=0;for(let o of this.orbits){let l=o.toPerm();t.push(l),r+=l.n}let n=new Array(r);r=0;for(let o of t){for(let l=0;l<o.n;l++)n[r+l]=r+o.p[l];r+=o.n}return new mt(n)}identicalPieces(){let t=[],r=0;for(let n of this.orbits){let o=n.orimod,l=n.identicalPieces();for(let i=0;i<l.length;i++)t.push(l[i].map(a=>a*o+r));r+=o*n.perm.length}return t}order(){let t=1;for(let r of this.orbits)t=$0(t,r.order());return t}},mr=class extends ra{constructor(t){super(t)}mul(t){return new mr(this.internalMul(t))}mulScalar(t){if(t===0)return this.e();let r=this;for(t<0&&(r=r.inv(),t=-t);(t&1)===0;)r=r.mul(r),t>>=1;if(t===1)return r;let n=r,o=this.e();for(;t>0;)t&1&&(o=o.mul(n)),t>1&&(n=n.mul(n)),t>>=1;return o}inv(){return new mr(this.internalInv())}e(){return new mr(this.orbits.map(t=>Yt.e(t.perm.length,t.orimod)))}},zn=class extends ra{constructor(t){super(t)}mul(t){return new zn(this.internalMul(t))}},ea=class{constructor(t){this.n=t;this.heads=new Array(t);for(let r=0;r<t;r++)this.heads[r]=r}find(t){let r=this.heads[t];return this.heads[r]===r||(r=this.find(this.heads[r]),this.heads[t]=r),r}union(t,r){let n=this.find(t),o=this.find(r);n<o?this.heads[o]=n:n>o&&(this.heads[n]=o)}}});var Vl,Bf=U(()=>{Vl={"2x2x2":"c f 0","3x3x3":"c f 0.333333333333333","4x4x4":"c f 0.5 f 0","5x5x5":"c f 0.6 f 0.2","6x6x6":"c f 0.666666666666667 f 0.333333333333333 f 0","7x7x7":"c f 0.714285714285714 f 0.428571428571429 f 0.142857142857143","8x8x8":"c f 0.75 f 0.5 f 0.25 f 0","9x9x9":"c f 0.777777777777778 f 0.555555555555556 f 0.333333333333333 f 0.111111111111111","10x10x10":"c f 0.8 f 0.6 f 0.4 f 0.2 f 0","11x11x11":"c f 0.818181818181818 f 0.636363636363636 f 0.454545454545455 f 0.272727272727273 f 0.0909090909090909","12x12x12":"c f 0.833333333333333 f 0.666666666666667 f 0.5 f 0.333333333333333 f 0.166666666666667 f 0","13x13x13":"c f 0.846153846153846 f 0.692307692307692 f 0.538461538461538 f 0.384615384615385 f 0.230769230769231 f 0.0769230769230769","20x20x20":"c f 0 f .1 f .2 f .3 f .4 f .5 f .6 f .7 f .8 f .9","30x30x30":"c f 0 f .066667 f .133333 f .2 f .266667 f .333333 f .4 f .466667 f .533333 f .6 f .666667 f .733333 f .8 f .866667 f .933333","40x40x40":"c f 0 f .05 f .1 f .15 f .2 f .25 f .3 f .35 f .4 f .45 f .5 f .55 f .6 f .65 f .7 f .75 f .8 f .85 f .9 f .95",skewb:"c v 0","master skewb":"c v 0.275","professor skewb":"c v 0 v 0.38","compy cube":"c v 0.915641442663986",helicopter:"c e 0.707106781186547","curvy copter":"c e 0.83",dino:"c v 0.577350269189626","little chop":"c e 0",pyramorphix:"t e 0",mastermorphix:"t e 0.346184634065199",pyraminx:"t v 0.333333333333333 v 1.66666666666667",tetraminx:"t v 0.333333333333333","master pyraminx":"t v 0 v 1 v 2","master tetraminx":"t v 0 v 1","professor pyraminx":"t v -0.2 v 0.6 v 1.4 v 2.2","professor tetraminx":"t v -0.2 v 0.6 v 1.4","Jing pyraminx":"t f 0","master pyramorphix":"t e 0.866025403784437",megaminx:"d f 0.7",gigaminx:"d f 0.64 f 0.82",teraminx:"d f 0.64 f 0.76 f 0.88",petaminx:"d f 0.64 f 0.73 f 0.82 f 0.91",examinx:"d f 0.64 f 0.712 f 0.784 f 0.856 f 0.928",zetaminx:"d f 0.64 f 0.7 f 0.76 f 0.82 f 0.88 f 0.94",yottaminx:"d f 0.64 f 0.6914 f 0.7429 f 0.7943 f 0.8457 f 0.8971 f 0.9486",pentultimate:"d f 0","master pentultimate":"d f 0.1","elite pentultimate":"d f 0 f 0.145905",starminx:"d v 0.937962370425399","starminx 2":"d f 0.23606797749979","pyraminx crystal":"d f 0.447213595499989",chopasaurus:"d v 0","big chop":"d e 0","skewb diamond":"o f 0",FTO:"o f 0.333333333333333","master FTO":"o f 0.5 f 0","Christopher's jewel":"o v 0.577350269189626",octastar:"o e 0","Trajber's octahedron":"o v 0.433012701892219","radio chop":"i f 0",icosamate:"i v 0","icosahedron 2":"i v 0.18759247376021","icosahedron 3":"i v 0.18759247376021 e 0","icosahedron static faces":"i v 0.84","icosahedron moving faces":"i v 0.73","Eitan's star":"i f 0.61803398874989","2x2x2 + dino":"c f 0 v 0.577350269189626","2x2x2 + little chop":"c f 0 e 0","dino + little chop":"c v 0.577350269189626 e 0","2x2x2 + dino + little chop":"c f 0 v 0.577350269189626 e 0","megaminx + chopasaurus":"d f 0.61803398875 v 0","starminx combo":"d f 0.23606797749979 v 0.937962370425399"}});function Hl(e){let t=new O(0,0,0,0);for(let r=0;r<e.length;r++)t=t.sum(e[r]);return t.smul(1/e.length)}function Rf(e,t,r,n){let o=n[e].intersect3(n[t],n[r]);if(!o)return o;for(let l=0;l<n.length;l++)if(l!==e&&l!==t&&l!==r){let i=n[l].b*o.b+n[l].c*o.c+n[l].d*o.d;if(n[l].a>0&&i>n[l].a||n[l].a<0&&i<n[l].a)return!1}return o}var O,Yl=U(()=>{O=class{constructor(t,r,n,o){this.a=t;this.b=r;this.c=n;this.d=o}mul(t){return new O(this.a*t.a-this.b*t.b-this.c*t.c-this.d*t.d,this.a*t.b+this.b*t.a+this.c*t.d-this.d*t.c,this.a*t.c-this.b*t.d+this.c*t.a+this.d*t.b,this.a*t.d+this.b*t.c-this.c*t.b+this.d*t.a)}toString(){return\`Q[\${this.a},\${this.b},\${this.c},\${this.d}]\`}dist(t){return Math.hypot(this.a-t.a,this.b-t.b,this.c-t.c,this.d-t.d)}len(){return Math.hypot(this.a,this.b,this.c,this.d)}cross(t){return new O(0,this.c*t.d-this.d*t.c,this.d*t.b-this.b*t.d,this.b*t.c-this.c*t.b)}dot(t){return this.b*t.b+this.c*t.c+this.d*t.d}normalize(){let t=Math.sqrt(this.dot(this));return new O(this.a/t,this.b/t,this.c/t,this.d/t)}makenormal(){return new O(0,this.b,this.c,this.d).normalize()}normalizeplane(){let t=Math.hypot(this.b,this.c,this.d);return new O(this.a/t,this.b/t,this.c/t,this.d/t)}smul(t){return new O(this.a*t,this.b*t,this.c*t,this.d*t)}sum(t){return new O(this.a+t.a,this.b+t.b,this.c+t.c,this.d+t.d)}sub(t){return new O(this.a-t.a,this.b-t.b,this.c-t.c,this.d-t.d)}angle(){return 2*Math.acos(this.a)}invrot(){return new O(this.a,-this.b,-this.c,-this.d)}det3x3(t,r,n,o,l,i,a,s,f){return t*(l*f-i*s)+r*(i*a-o*f)+n*(o*s-l*a)}rotateplane(t){let r=t.mul(new O(0,this.b,this.c,this.d)).mul(t.invrot());return r.a=this.a,r}orthogonal(){let t=Math.abs(this.b),r=Math.abs(this.c),n=Math.abs(this.d);return t<r&&t<n?this.cross(new O(0,1,0,0)).normalize():r<t&&r<n?this.cross(new O(0,0,1,0)).normalize():this.cross(new O(0,0,0,1)).normalize()}pointrotation(t){let r=this.normalize();if(t=t.normalize(),r.sub(t).len()<1e-9)return new O(1,0,0,0);let n=r.sum(t);n.len()<1e-9?n=n.orthogonal():n=n.normalize();let o=r.cross(n);return o.a=r.dot(n),o}unproject(t){return this.sum(t.smul(-this.dot(t)/(this.len()*t.len())))}rotatepoint(t){return t.mul(this).mul(t.invrot())}rotateface(t){return t.map(r=>r.rotatepoint(this))}intersect3(t,r){let n=this.det3x3(this.b,this.c,this.d,t.b,t.c,t.d,r.b,r.c,r.d);return Math.abs(n)<1e-9?!1:new O(0,this.det3x3(this.a,this.c,this.d,t.a,t.c,t.d,r.a,r.c,r.d)/n,this.det3x3(this.b,this.a,this.d,t.b,t.a,t.d,r.b,r.a,r.d)/n,this.det3x3(this.b,this.c,this.a,t.b,t.c,t.a,r.b,r.c,r.a)/n)}side(t){return t>1e-9?1:t<-1e-9?-1:0}cutface(t){let r=this.a,n=0,o=null;for(let l=0;l<t.length;l++)n|=1<<this.side(t[l].dot(this)-r)+1;if((n&5)===5){o=[];let l=t.map(i=>this.side(i.dot(this)-r));for(let i=-1;i<=1;i+=2){let a=[];for(let s=0;s<t.length;s++){(l[s]===i||l[s]===0)&&a.push(t[s]);let f=(s+1)%t.length;if(l[s]+l[f]===0&&l[s]!==0){let g=t[s].dot(this)-r,p=t[f].dot(this)-r,u=g/(g-p),c=t[s].smul(1-u).sum(t[f].smul(u));a.push(c)}}o.push(a)}}return o}cutfaces(t){let r=[];for(let n=0;n<t.length;n++){let o=t[n],l=this.cutface(o);l?(r.push(l[0]),r.push(l[1])):r.push(o)}return r}faceside(t){let r=this.a;for(let n=0;n<t.length;n++){let o=this.side(t[n].dot(this)-r);if(o!==0)return o}throw new Error("Could not determine side of plane in faceside")}sameplane(t){let r=this.normalize(),n=t.normalize();return r.dist(n)<1e-9||r.dist(n.smul(-1))<1e-9}makecut(t){return new O(t,this.b,this.c,this.d)}}});function df(){let e=Math.sqrt(.5);return[new O(e,e,0,0),new O(e,0,e,0)]}function hf(){return[new O(.5,.5,.5,.5),new O(.5,.5,.5,-.5)]}function Ff(){let e=2*Math.PI/10,t=.5+.3*Math.sqrt(5),r=.5+.1*Math.sqrt(5),n=Math.sqrt(t*t+r*r);return t/=n,r/=n,[new O(Math.cos(e),t*Math.sin(e),r*Math.sin(e),0),new O(.5,.5,.5,.5)]}function Df(){let e=.16666666666666666+Math.sqrt(5)/6,t=2/3+Math.sqrt(5)/3,r=Math.sqrt(e*e+t*t);e/=r,t/=r;let n=2*Math.PI/6;return[new O(Math.cos(n),e*Math.sin(n),t*Math.sin(n),0),new O(Math.cos(n),-e*Math.sin(n),t*Math.sin(n),0)]}function Af(){let e=Math.sqrt(.5);return[new O(.5,.5,.5,.5),new O(e,0,0,e)]}function yf(e){let t=[new O(1,0,0,0)];for(let r=0;r<t.length;r++)for(let n=0;n<e.length;n++){let o=e[n].mul(t[r]),l=o.smul(-1),i=!1;for(let a=0;a<t.length;a++)if(o.dist(t[a])<Jl||l.dist(t[a])<Jl){i=!0;break}i||t.push(o)}return t}function na(e,t){let r=[],n=[];for(let o=0;o<t.length;o++){let l=e.rotateplane(t[o]),i=!1;for(let a=0;a<r.length;a++)if(l.dist(r[a])<Jl){i=!0;break}i||(r.push(l),n.push(t[o]))}return n}function oa(e){let t=[];for(let r=1;r<e.length;r++)for(let n=r+1;n<e.length;n++){let o=Rf(0,r,n,e);if(o){let l=!1;for(let i=0;i<t.length;i++)if(o.dist(t[i])<Jl){l=!0;break}l||t.push(o)}}for(;;){let r=!1;for(let n=0;n<t.length;n++){let o=(n+1)%t.length;if(e[0].dot(t[n].cross(t[o]))<0){let l=t[n];t[n]=t[o],t[o]=l,r=!0}}if(!r)break}return t}var Jl,Uf=U(()=>{Yl();Jl=1e-9});function Zl(e,t){let r=e[0].p.length,n=pf(r),o=[],l=[],i=[],a=[],s=[];function f(c){for(let m=c.p.length-1;m>=0;m--){let L=c.p[m];if(L!==m){if(!o[m][L])return!1;c=c.mul(l[m][L])}}return!0}function g(c,m,L){a[c].push(m),s[c].push(L);for(let R=0;R<o[c].length;R++)o[c][R]&&p(c,o[c][R].mul(m),L+i[c][R])}function p(c,m,L){let R=m.p[c];if(!o[c][R]){o[c][R]=m,l[c][R]=m.inv(),i[c][R]=L;for(let y=0;y<a[c].length;y++)p(c,m.mul(a[c][y]),L+s[c][y]);return}let h=m.mul(l[c][R]);f(h)||g(c-1,h,L+i[c][R])}function u(){o=[],l=[],a=[],i=[],s=[];for(let L=0;L<r;L++)o.push([]),l.push([]),i.push([]),a.push([]),s.push([]),o[L][L]=n,l[L][L]=n,i[L][L]=0;let c=0,m=1;for(let L=0;L<e.length;L++){g(r-1,e[L],1),m=1;let R=0,h=0,y=[],A=new bf;for(let E=0;E<r;E++){let v=0,K=0;for(let M=0;M<r;M++)o[E][M]&&(v++,K+=i[E][M],E!==M&&c++);R+=a[E].length,m*=v,v>1&&A.multiply(v);let Z=K/v;y.push(Z),h+=Z}t(\`\${L}: sz \${m} T \${R} sol \${h} none \${c} mults \${A.toString()}\`)}return m}return u()}var bf,la=U(()=>{ql();bf=class{constructor(){this.mult=[]}multiply(t){for(let r=2;r*r<=t;r++)for(;t%r===0;)this.mult[r]!==void 0?this.mult[r]++:this.mult[r]=1,t/=r;t>1&&(this.mult[t]!==void 0?this.mult[t]++:this.mult[t]=1)}toString(){let t="";for(let r=0;r<this.mult.length;r++)this.mult[r]!==void 0&&(t!==""&&(t+="*"),t+=r,this.mult[r]>1&&(t+=\`^\${this.mult[r]}\`));return t}}});function Im(e,t){let r=[];for(let n of e)for(let o of t)r.push(o.rotate(n));return r}function Qm(){return{4:[["F","D","L","R"]],6:[["F","D","L","U","R"],["R","F","","B",""]],8:[["F","D","L","R"],["D","F","BR",""],["BR","D","","BB"],["BB","BR","U","BL"]],12:[["U","F","","","",""],["F","U","R","C","A","L"],["R","F","","","E",""],["E","R","","BF","",""],["BF","E","BR","BL","I","D"]],20:[["R","C","F","E"],["F","R","L","U"],["L","F","A",""],["E","R","G","I"],["I","E","S","H"],["S","I","J","B"],["B","S","K","D"],["K","B","M","O"],["O","K","P","N"],["P","O","Q",""]]}}function jm(){return{4:{F:"#00ff00",D:"#ffff00",L:"#ff0000",R:"#0000ff"},6:{U:"#ffffff",F:"#00ff00",R:"#ff0000",D:"#ffff00",B:"#0000ff",L:"#ff8000"},8:{U:"#ffffff",F:"#ff0000",R:"#00bb00",D:"#ffff00",BB:"#1122ff",L:"#9524c5",BL:"#ff8800",BR:"#aaaaaa"},12:{U:"#ffffff",F:"#006633",R:"#ff0000",C:"#ffffd0",A:"#3399ff",L:"#660099",E:"#ff66cc",BF:"#99ff00",BR:"#0000ff",BL:"#ffff00",I:"#ff6633",D:"#999999"},20:{R:"#db69f0",C:"#178fde",F:"#23238b",E:"#9cc726",L:"#2c212d",U:"#177fa7",A:"#e0de7f",G:"#2b57c0",I:"#41126b",S:"#4b8c28",H:"#7c098d",J:"#7fe7b4",B:"#85fb74",K:"#3f4bc3",D:"#0ff555",M:"#f1c2c8",O:"#58d340",P:"#c514f2",N:"#14494e",Q:"#8b1be1"}}}function qm(){return{4:["F","D","L","R"],6:["U","D","F","B","L","R"],8:["F","BB","D","U","BR","L","R","BL"],12:["L","E","F","BF","R","I","U","D","BR","A","BL","C"],20:["L","S","E","O","F","B","I","P","R","K","U","D","J","A","Q","H","G","N","M","C"]}}function Vm(){return{4:[["FLR",[0,1,0]],["F",[0,0,1]]],6:[["U",[0,1,0]],["F",[0,0,1]]],8:[["U",[0,1,0]],["F",[0,0,1]]],12:[["U",[0,1,0]],["F",[0,0,1]]],20:[["GUQMJ",[0,1,0]],["F",[0,0,1]]]}}function Xl(e,t){for(let r=0;r<e.length;r++)if(e[r][0].dist(t)<Ee)return r;throw new Error("Element not found")}function xf(){return Vl}function Sf(e){return Vl[e]}function Go(e){let t=e.split(/ /).filter(Boolean);if(t.length%2===0)return null;let r=t[0];if(r!=="o"&&r!=="c"&&r!=="i"&&r!=="d"&&r!=="t")return null;let n=[];for(let o=1;o<t.length;o+=2){if(t[o]!=="f"&&t[o]!=="v"&&t[o]!=="e")return null;n.push({cutType:t[o],distance:parseFloat(t[o+1])})}return{shape:r,cuts:n}}function aa(e,t={}){let r=Go(e);if(r===null)throw new Error("Could not parse the puzzle description");let n=new ei(r,Object.assign({},{allMoves:!0},t));return n.allstickers(),n.genperms(),n}function Pn(e,t){return aa(Vl[e],t)}function Hm(e,t,r){let n=!1;r-t[1]<t[0]&&(e=[e[2],e[3],e[0],e[1]],t=[r-t[1],r-t[0]],n=!0);let o=e[0],l="";if(t[0]===0&&t[1]===r)o=o+"v";else if(t[0]===t[1])t[1]>0&&(l=String(t[1]+1));else if(t[0]===0)o=o.toLowerCase(),t[1]>1&&(l=String(t[1]+1));else throw\`We only support slice and outer block moves right now. \${t}\`;return[l+o,n]}function Ym(e,t){let r=[],n=0;for(;n<e.length;){n>0&&n<e.length&&e[n]==="_"&&n++;let o="";for(let l of t)e.substr(n).startsWith(l[1])&&l[1].length>o.length&&(o=l[1]);if(o!=="")r.push(o),n+=o.length;else throw new Error("Could not split "+e+" into face names.")}return r}function $l(e,t){return[e.b/t,-e.c/t,e.d/t]}function ia(e,t){let r=[],n=e.length;for(let o=0;o<n;o++){let l=$l(e.get(n-o-1),t);r[3*o]=l[0],r[3*o+1]=l[1],r[3*o+2]=l[2]}return r}var Cn,Io,Ee,Wm,Km,ei,Qr,jl=U(()=>{Le();Y2();H0();J0();ql();Lf();Bf();Uf();Yl();la();Cn=class{constructor(t){this.coords=new Array(t.length*3);for(let r=0;r<t.length;r++)this.coords[3*r]=t[r].b,this.coords[3*r+1]=t[r].c,this.coords[3*r+2]=t[r].d;this.length=t.length}get(t){return new O(0,this.coords[3*t],this.coords[3*t+1],this.coords[3*t+2])}centermass(){let t=0,r=0,n=0;for(let o=0;o<this.length;o++)t+=this.coords[3*o],r+=this.coords[3*o+1],n+=this.coords[3*o+2];return new O(0,t/this.length,r/this.length,n/this.length)}rotate(t){let r=[];for(let n=0;n<this.length;n++)r.push(this.get(n).rotatepoint(t));return new Cn(r)}rotateforward(){let t=[];for(let r=1;r<this.length;r++)t.push(this.get(r));return t.push(this.get(0)),new Cn(t)}},Io=class{constructor(t,r,n){this.face=t;this.left=r;this.right=n}split(t){let r=t.cutface(this.face);return r!==null&&(this.left===void 0?(this.left=new Io(r[0]),this.right=new Io(r[1])):(this.left=this.left?.split(t),this.right=this.right?.split(t))),this}collect(t,r){return this.left===void 0?t.push(new Cn(this.face)):r?(this.left?.collect(t,!1),this.right?.collect(t,!0)):(this.right?.collect(t,!1),this.left?.collect(t,!0)),t}};Ee=1e-9,Wm="PuzzleGeometry 0.1 Copyright 2018 Tomas Rokicki.",Km=!1;ei=class{constructor(t,r){this.puzzleDescription=t;this.cmovesbyslice=[];this.duplicatedFaces=[];this.duplicatedCubies=[];this.fixedCubie=-1;this.net=[];this.colors=[];this.faceorder=[];this.faceprecedence=[];this.notationMapper=new kn;this.addNotationMapper="";this.setReidOrder=!1;let n="genperms";this.options=new Y0(r),this.options.verbosity>0&&console.log(this.header("# ")),this.create(t)}create(t){let{shape:r,cuts:n}=t;this.moveplanes=[],this.moveplanes2=[],this.faces=[],this.cubies=[];let o=null;switch(r){case"c":o=df();break;case"o":o=Af();break;case"i":o=Df();break;case"t":o=hf();break;case"d":o=Ff();break;default:throw new Error("Bad shape argument: "+r)}this.rotations=yf(o),this.options.verbosity&&console.log("# Rotations: "+this.rotations.length);let l=o[0];this.baseplanerot=na(l,this.rotations);let i=this.baseplanerot.map(D=>l.rotateplane(D));this.baseplanes=i,this.baseFaceCount=i.length;let a=Qm()[i.length];this.net=a,this.colors=jm()[i.length],this.faceorder=qm()[i.length],this.options.verbosity>0&&console.log("# Base planes: "+i.length);let s=oa(i),f=new O(0,0,0,0);this.options.verbosity>0&&console.log("# Face vertices: "+s.length);let g=i[0].makenormal(),p=s[0].sum(s[1]).makenormal(),u=s[0].makenormal(),c=new O(1,g.b,g.c,g.d);this.options.verbosity>0&&console.log("# Boundary is "+c);let L=na(c,this.rotations).map(D=>c.rotateplane(D)),R=oa(L);this.edgedistance=R[0].sum(R[1]).smul(.5).dist(f),this.vertexdistance=R[0].dist(f);let h=[],y=[],A=!1,E=!1,v=!1;for(let D of n){let w=null,T=0;switch(D.cutType){case"f":w=g,T=1,A=!0;break;case"v":w=u,T=this.vertexdistance,v=!0;break;case"e":w=p,T=this.edgedistance,E=!0;break;default:throw new Error("Bad cut argument: "+D.cutType)}h.push(w.makecut(D.distance)),y.push(D.distance<T)}this.options.addRotations&&(A||h.push(g.makecut(10)),v||h.push(u.makecut(10)),E||h.push(p.makecut(10))),this.basefaces=[];for(let D of this.baseplanerot){let w=D.rotateface(R);this.basefaces.push(new Cn(w))}let K=[],Z=[],M=[],ne=[],b=R.length;function _(D,w,T){for(let W of D)if(W[0].dist(w)<Ee){W.push(T);return}D.push([w,T])}for(let D=0;D<this.baseplanerot.length;D++){let w=this.baseplanerot[D].rotateface(R);for(let T=0;T<w.length;T++){let W=(T+1)%w.length,oe=w[T].sum(w[W]).smul(.5);_(ne,oe,D)}}let P=[];for(let D=0;D<this.baseplanerot.length;D++){let w=this.baseplanerot[D].rotateface(R),T=[];for(let W=0;W<w.length;W++){let oe=(W+1)%w.length,He=w[W].sum(w[oe]).smul(.5),ut=ne[Xl(ne,He)];if(D===ut[1])T.push(ut[2]);else if(D===ut[2])T.push(ut[1]);else throw new Error("Could not find edge")}P.push(T)}let x={},S=[];S.push(a[0][0]),x[a[0][0]]=0,S[P[0][0]]=a[0][1],x[a[0][1]]=P[0][0];for(let D of a){let w=D[0],T=x[w];if(T===void 0)throw new Error("Bad edge description; first edge not connected");let W=-1;for(let oe=0;oe<P[T].length;oe++){let He=S[P[T][oe]];if(He!==void 0&&He===D[1]){W=oe;break}}if(W<0)throw new Error("First element of a net not known");for(let oe=2;oe<D.length;oe++){if(D[oe]==="")continue;let He=P[T][(oe+W-1)%b],ut=S[He];if(ut!==void 0&&ut!==D[oe])throw new Error("Face mismatch in net");S[He]=D[oe],x[D[oe]]=He}}for(let D=0;D<S.length;D++){let w=!1;for(let T=0;T<this.faceorder.length;T++)if(S[D]===this.faceorder[T]){this.faceprecedence[D]=T,w=!0;break}if(!w)throw new Error("Could not find face "+S[D]+" in face order list "+this.faceorder)}for(let D=0;D<this.baseplanerot.length;D++){let w=this.baseplanerot[D].rotateface(R),T=c.rotateplane(this.baseplanerot[D]),W=S[D];K.push([w,W]),Z.push([T,W])}for(let D=0;D<this.baseplanerot.length;D++){let w=this.baseplanerot[D].rotateface(R),T=S[D];for(let W=0;W<w.length;W++){let oe=(W+1)%w.length,He=w[W].sum(w[oe]).smul(.5),ut=(W+2)%w.length,Kc=w[oe].sum(w[ut]).smul(.5),Qc=Xl(ne,He),jc=Xl(ne,Kc);_(M,w[oe],[T,jc,Qc])}}this.swizzler=new Mo(K.map(D=>D[1]));let z=this.swizzler.prefixFree?"":"_";for(let D=0;D<ne.length;D++){if(ne[D].length!==3)throw new Error("Bad length in edge names "+ne[D]);let w=S[ne[D][1]],T=S[ne[D][2]];this.faceprecedence[ne[D][1]]<this.faceprecedence[ne[D][2]]?w=w+z+T:w=T+z+w,ne[D]=[ne[D][0],w]}for(let D=0;D<M.length;D++){if(M[D].length<4)throw new Error("Bad length in vertex names");let w=1;for(let W=2;W<M[D].length;W++)this.faceprecedence[x[M[D][W][0]]]<this.faceprecedence[x[M[D][w][0]]]&&(w=W);let T="";for(let W=1;W<M[D].length;W++){W===1?T=M[D][w][0]:T=T+z+M[D][w][0];for(let oe=1;oe<M[D].length;oe++)if(M[D][w][1]===M[D][oe][2]){w=oe;break}}M[D]=[M[D][0],T]}this.options.verbosity>1&&(console.log("# Face precedence list: "+this.faceorder.join(" ")),console.log("# Face names: "+K.map(D=>D[1]).join(" ")),console.log("# Edge names: "+ne.map(D=>D[1]).join(" ")),console.log("# Vertex names: "+M.map(D=>D[1]).join(" ")));let Q=[];for(let D of Z)Q.push([D[0].makenormal(),D[1],"f"]);for(let D of ne)Q.push([D[0].makenormal(),D[1],"e"]);for(let D of M)Q.push([D[0].makenormal(),D[1],"v"]);this.facenames=K,this.faceplanes=Z,this.edgenames=ne,this.vertexnames=M,this.geonormals=Q;let H=Q.map(D=>D[1]);this.swizzler.setGripNames(H),this.options.verbosity>0&&console.log("# Distances: face "+1+" edge "+this.edgedistance+" vertex "+this.vertexdistance);for(let D=0;D<h.length;D++)for(let w of this.rotations){let T=h[D].rotateplane(w),W=!1;for(let oe of this.moveplanes)if(T.sameplane(oe)){W=!0;break}W||(this.moveplanes.push(T),y[D]&&this.moveplanes2.push(T))}let ce=new Io(R),Re=this.moveplanes2.slice(),Ue=31;for(let D=0;D<Re.length;D++){let w=D+Math.floor((Re.length-D)*(Ue/65536));ce=ce.split(Re[w]),Re[w]=Re[D],Ue=(Ue*1657+101)%65536}let ve=ce.collect([],!0);this.faces=ve,this.options.verbosity>0&&console.log("# Faces is now "+ve.length),this.stickersperface=ve.length;let zt=[],Oe=Hl(R);for(let D of this.rotations){let w=D.rotateface(R);Oe.dist(Hl(w))<Ee&&zt.push(D)}let nt=new Array(ve.length),ze=[];for(let D=0;D<ve.length;D++){let w=ve[D].centermass();ze.push([Oe.dist(w),w,D])}ze.sort((D,w)=>D[0]-w[0]);for(let D=0;D<ve.length;D++){let w=ze[D][2];if(!nt[w]){nt[w]=!0;for(let T of zt){let W=ve[w].rotate(T),oe=W.centermass();for(let He=D+1;He<ve.length&&!(ze[He][0]-ze[D][0]>Ee);He++){let ut=ze[He][2];if(!nt[ut]&&oe.dist(ze[He][1])<Ee){nt[ut]=!0,ve[ut]=W;break}}}}}this.shortedge=1e99;for(let D of ve)for(let w=0;w<D.length;w++){let T=(w+1)%D.length,W=D.get(w).dist(D.get(T));W<this.shortedge&&(this.shortedge=W)}this.options.verbosity>0&&console.log("# Short edge is "+this.shortedge),r==="c"&&A&&!E&&!v&&(this.addNotationMapper="NxNxNCubeMapper",this.setReidOrder=!0),r==="c"&&v&&!A&&!E&&(this.addNotationMapper="SkewbMapper"),r==="t"&&(v||A)&&!E&&(this.addNotationMapper="PyraminxOrTetraminxMapper"),r==="o"&&A&&(this.notationMapper=new No(this.swizzler,new Mo(["F","D","L","BL","R","U","BR","B"])),!E&&!v&&(this.addNotationMapper="FTOMapper")),r==="d"&&A&&(this.addNotationMapper="MegaminxMapper",this.notationMapper=new No(this.swizzler,new Mo(["U","F","L","BL","BR","R","FR","FL","DL","B","DR","D"])))}keyface(t){return this.keyface2(t.centermass())}keyface2(t){let r="",n=String.fromCharCode;for(let o of this.moveplanesets)if(o.length>0){let l=t.dot(o[0]),i=0,a=1;for(;a*2<=o.length;)a*=2;for(;a>0;a>>=1)i+a<=o.length&&l>o[i+a-1].a&&(i+=a);if(i<47)r=r+n(33+i);else if(i<47+47*47)r=r+n(33+47+Math.floor(i/47)-1)+n(33+i%47);else if(i<47+47*47+47*47*47)r=r+n(33+47+Math.floor((i-47)/(47*47)-1))+n(33+47+Math.floor((i-47)/47)%47)+n(33+i%47);else throw Error("Too many slices for cubie encoding")}return r}keyface3(t){let r=t.centermass(),n=[];for(let o of this.moveplanesets)if(o.length>0){let l=r.dot(o[0]),i=0,a=1;for(;a*2<=o.length;)a*=2;for(;a>0;a>>=1)i+a<=o.length&&l>o[i+a-1].a&&(i+=a);n.push(i)}return n}findface(t){let r=this.keyface2(t),n=this.facelisthash.get(r);if(n.length===1)return n[0];for(let o=0;o+1<n.length;o++){let l=this.facelisthash.get(r)[o];if(Math.abs(t.dist(this.facecentermass[l]))<Ee)return l}return n[n.length-1]}project2d(t,r,n){let o=this.facenames[t][0],l=(r+1)%o.length,i=this.baseplanes[t],a=o[l].sub(o[r]),s=a.len();a=a.normalize();let f=a.cross(i).normalize(),g=n[1].sub(n[0]),p=g.len()/s;g=g.normalize();let u=g.b,c=g.c,m=a.smul(u).sub(f.smul(c)).smul(p),L=f.smul(u).sum(a.smul(c)).smul(p),R=new O(0,n[0].b-m.dot(o[r]),n[0].c-L.dot(o[r]),0);return[m,L,R]}allstickers(){let t="allstickers";this.faces=Im(this.baseplanerot,this.faces),this.options.verbosity>0&&console.log("# Total stickers is now "+this.faces.length),this.facecentermass=new Array(this.faces.length);for(let b=0;b<this.faces.length;b++)this.facecentermass[b]=this.faces[b].centermass();let r=[],n=[];for(let b of this.moveplanes){let _=b.makenormal(),P=!1;for(let x of n)_.sameplane(x.makenormal())&&(P=!0);P||(n.push(_),r.push([]))}for(let b of this.moveplanes2){let _=b.makenormal();for(let P=0;P<n.length;P++)if(_.sameplane(n[P])){r[P].push(b);break}}for(let b=0;b<r.length;b++){let _=r[b].map(x=>x.normalizeplane()),P=n[b];for(let x=0;x<_.length;x++)_[x].makenormal().dist(P)>Ee&&(_[x]=_[x].smul(-1));_.sort((x,S)=>x.a-S.a),r[b]=_}this.moveplanesets=r,this.moveplanenormals=n;let o=r.map(b=>b.length);this.options.verbosity>0&&console.log("# Move plane sets: "+o);let l=[];for(let b=0;b<r.length;b++)l.push([]);for(let b of this.rotations){if(Math.abs(Math.abs(b.a)-1)<Ee)continue;let _=b.makenormal();for(let P=0;P<r.length;P++)if(_.sameplane(n[P])){l[P].push(b);break}}this.moverotations=l;for(let b=0;b<l.length;b++){let _=l[b],P=_[0].makenormal();for(let x=0;x<_.length;x++)P.dist(_[x].makenormal())>Ee&&(_[x]=_[x].smul(-1));_.sort((x,S)=>x.angle()-S.angle()),l[b][0].dot(n[b])<0&&_.reverse()}let i=l.map(b=>1+b.length);this.movesetorders=i;let a=[],s="?";for(let b=0;b<r.length;b++){let _=n[b],P=null,x=null;for(let S of this.geonormals){let z=_.dot(S[0]);Math.abs(z-1)<Ee?(x=[S[1],S[2]],s=S[2]):Math.abs(z+1)<Ee&&(P=[S[1],S[2]],s=S[2])}if(x===null||P===null)throw new Error("Saw positive or negative sides as null");a.push([x[0],x[1],P[0],P[1],1+r[b].length]),this.addNotationMapper==="NxNxNCubeMapper"&&s==="f"&&(this.notationMapper=new Wl(1+r[b].length),this.addNotationMapper=""),this.addNotationMapper==="SkewbMapper"&&r[0].length===1&&(this.notationMapper=new Ql(this.swizzler),this.addNotationMapper=""),this.addNotationMapper==="PyraminxOrTetraminxMapper"&&(r[0].length===2&&r[0][0].a===.333333333333333&&r[0][1].a===1.66666666666667?(this.notationMapper=new To(this.swizzler),this.addNotationMapper=""):(this.notationMapper=new Kl(this.swizzler),this.addNotationMapper="")),this.addNotationMapper==="MegaminxMapper"&&s==="f"&&(1+r[b].length===3&&(this.notationMapper=new Il(this.notationMapper)),this.addNotationMapper=""),this.addNotationMapper==="FTOMapper"&&s==="f"&&(1+r[b].length===3&&(this.notationMapper=new Ol(this.notationMapper,this.swizzler)),this.addNotationMapper="")}this.movesetgeos=a;let f=new Map,g=this.faces;for(let b=0;b<g.length;b++){let _=g[b],P=this.keyface(_);if(!f.get(P))f.set(P,[b]);else{let x=f.get(P);if(x.push(b),x.length===this.baseFaceCount){this.options.verbosity>0&&console.log("# Splitting core.");for(let S=0;S<x.length;S++){let z=P+" "+S;f.set(z,[x[S]])}}}}this.facelisthash=f,this.options.verbosity>0&&console.log("# Cubies: "+f.size);let p=[],u=[],c=[];for(let b of f.values())if(b.length!==this.baseFaceCount){if(b.length>1){let _=b.map(z=>g[z].centermass()),P=Hl(_);for(let z=0;b.length>2;z++){let Q=!1;for(let H=0;H<b.length;H++){let ce=(H+1)%b.length;if(P.dot(_[H].cross(_[ce]))<0){let Re=_[H];_[H]=_[ce],_[ce]=Re;let Ue=b[H];b[H]=b[ce],b[ce]=Ue,Q=!0}}if(!Q)break;if(z>1e3)throw new Error("Bad epsilon math; too close to border")}let x=0,S=b[x];for(let z=1;z<b.length;z++){let Q=b[z];this.faceprecedence[this.getfaceindex(Q)]<this.faceprecedence[this.getfaceindex(S)]&&(x=z,S=Q)}if(x!==0){let z=b.slice();for(let Q=0;Q<b.length;Q++)b[Q]=z[(x+Q)%b.length]}}for(let _=0;_<b.length;_++){let P=b[_];u[P]=p.length,c[P]=_}p.push(b)}this.cubies=p,this.facetocubie=u,this.facetoord=c;let m=["?","CENTERS","EDGES","CORNERS","C4RNER","C5RNER"],L=[],R=[0,0,0,0,0,0],h=[],y=[],A=0,E=[],v=[],K=[],Z=[],M=b=>p[b].map(_=>this.getfaceindex(_)).join(" "),ne=[];for(let b=0;b<p.length;b++){if(y[b])continue;let _=p[b];if(_.length===0)continue;let P={},x=0;K.push(0),ne.push([]);let S=_.length,z=R[S]++,Q=m[S];(Q===void 0||S===this.baseFaceCount)&&(Q="CORE"),Q=Q+(z===0?"":z+1),L[A]=Q,h[A]=S;let H=[b],ce=0;for(y[b]=!0;ce<H.length;){let Re=H[ce++],Ue=M(Re);if((_.length>1||P[Ue]===void 0)&&(P[Ue]=x++),Z[Re]=P[Ue],E[Re]=A,ne[A].push(Re),v[Re]=K[A]++,H.length<this.rotations.length){let ve=this.facecentermass[p[Re][0]];for(let zt of l){let Oe=this.facetocubie[this.findface(ve.rotatepoint(zt[0]))];y[Oe]||(H.push(Oe),y[Oe]=!0)}}}A++}if(this.setReidOrder&&4<=this.stickersperface&&this.stickersperface<=9){let b=[["UF","UR","UB","UL","DF","DR","DB","DL","FR","FL","BR","BL"],["UFR","URB","UBL","ULF","DRF","DFL","DLB","DBR"],["U","L","F","R","B","D"]],_={};for(let P of b)for(let x=0;x<P.length;x++){let S=0;for(let z=0;z<P[x].length;z++)S|=1<<P[x].charCodeAt(z)-65;_[S]=x}for(let P of ne)for(let x of P){let S=0;for(let z of p[x])S|=1<<this.facenames[this.getfaceindex(z)][1].charCodeAt(0)-65;v[x]=_[S]}}if(this.cubiesetnums=E,this.cubieordnums=v,this.cubiesetnames=L,this.cubieords=K,this.orbitoris=h,this.cubievaluemap=Z,this.cubiesetcubies=ne,this.options.fixedPieceType!==null){for(let b=0;b<p.length;b++)if(this.options.fixedPieceType==="v"&&p[b].length>2||this.options.fixedPieceType==="e"&&p[b].length===2||this.options.fixedPieceType==="f"&&p[b].length===1){this.fixedCubie=b;break}if(this.fixedCubie<0)throw new Error("Could not find a cubie of type "+this.options.fixedPieceType+" to fix.")}this.options.verbosity>0&&console.log("# Cubie orbit sizes "+K)}unswizzle(t){let r=this.notationMapper.notationToInternal(t);return r===null?null:r.modified({family:this.swizzler.unswizzle(r.family)})}stringToBlockMove(t){let r=RegExp("^(([0-9]+)-)?([0-9]+)?([^0-9]+)([0-9]+'?)?$"),n=t.match(r);if(n===null)throw new Error("Bad move passed "+t);let o=n[4],l,i;if(n[2]!==void 0){if(n[3]===void 0)throw new Error("Missing second number in range");l=parseInt(n[2],10)}n[3]!==void 0&&(i=parseInt(n[3],10));let a="1",s=1;return n[5]!==void 0&&(a=n[5],a[0]==="'"&&(a="-"+a.substring(1)),s=parseInt(a,10)),new B(new C(o,i,l),s)}parseMove(t){let r=this.notationMapper.notationToInternal(t);if(r===null)throw new Error("Bad move "+t.family);t=r;let n=t.family,o=!1;if(n.endsWith("v")&&n[0]<="Z"){if(t.innerLayer!==void 0||t.outerLayer!==void 0)throw new Error("Cannot use a prefix with full cube rotations");n=n.slice(0,-1),o=!0}n.endsWith("w")&&n[0]<="Z"&&(n=n.slice(0,-1).toLowerCase());let l,i=-1,a=this.swizzler.unswizzle(n),s=!1;for(let p=0;p<this.movesetgeos.length;p++){let u=this.movesetgeos[p];a===u[0]&&(s=!0,l=u,i=p),a===u[2]&&(s=!1,l=u,i=p)}let f=1,g=1;if(n.toUpperCase()!==n&&(g=2),l===void 0)throw new Error("Bad grip in move "+t.family);if(t.outerLayer!==void 0&&(f=t.outerLayer),t.innerLayer!==void 0&&(t.outerLayer===void 0?(g=t.innerLayer,n<="Z"?f=g:f=1):g=t.innerLayer),f--,g--,o&&(f=0,g=this.moveplanesets[i].length),f<0||f>this.moveplanesets[i].length||g<0||g>this.moveplanesets[i].length)throw new Error("Bad slice spec "+f+" "+g+" vs "+this.moveplanesets[i].length);if(!Km&&f===0&&g===this.moveplanesets[i].length&&!o)throw new Error("! full puzzle rotations must be specified with v suffix.");return[void 0,i,f,g,s,t.amount]}parsemove(t){let r=this.parseMove(this.stringToBlockMove(t));return r[0]=t,r}genperms(){let t="genperms";if(this.cmovesbyslice.length>0)return;let r=[];if(this.options.orientCenters){for(let n=0;n<this.cubies.length;n++)if(this.cubies[n].length===1){let o=this.cubies[n][0],l=this.getfaceindex(o);if(this.basefaces[l].centermass().dist(this.facecentermass[o])<Ee){let i=this.basefaces[l].length;for(let a=1;a<i;a++)this.cubies[n].push(this.cubies[n][a-1]);this.duplicatedFaces[o]=i,this.duplicatedCubies[n]=i,this.orbitoris[this.cubiesetnums[n]]=i}}}for(let n=0;n<this.moveplanesets.length;n++){let o=this.moveplanesets[n],l=[],i=[o.length+1,0],a=1;for(;a*2<=o.length;)a*=2;for(let g=0;g<this.faces.length;g++){let p=0;if(o.length>0){let u=this.facecentermass[g].dot(o[0]);for(let c=a;c>0;c>>=1)p+c<=o.length&&u>o[p+c-1].a&&(p+=c);p=o.length-p}for(l.push(p);i.length<=p;)i.push(0);i[p]++}let s=new Array(i.length);for(let g=0;g<i.length;g++)s[g]=[];let f=[];for(let g=0;g<this.faces.length;g++){if(l[g]<0)continue;let p=[this.facetocubie[g],this.facetoord[g]],u=this.facecentermass[g],c=u,m=g,L=l[m];for(;;){l[m]=-1;let R=u.rotatepoint(this.moverotations[n][0]);if(R.dist(c)<Ee)break;m=this.findface(R),p.push(this.facetocubie[m],this.facetoord[m]),u=R}if(p.length>2&&this.options.orientCenters&&(this.cubies[p[0]].length===1||this.duplicatedCubies[p[0]]>1)&&this.facecentermass[g].dist(this.basefaces[this.getfaceindex(g)].centermass())<Ee){let R=this.faces[this.cubies[p[0]][0]];for(let h=0;h<p.length;h+=2){let y=this.faces[this.cubies[p[h]][0]],A=-1;for(let E=0;E<R.length;E++)if(y.get(E).dist(R.get(0))<Ee){A=E;break}if(A<0)throw new Error("Couldn't find rotation of center faces; ignoring for now.");p[h+1]=A,R=R.rotate(this.moverotations[n][0])}}if(p.length===2&&this.options.orientCenters)for(let R=1;R<this.movesetorders[n];R++)L===0?p.push(p[0],R):p.push(p[0],(this.movesetorders[n]-R)%this.movesetorders[n]);if(p.length>2&&!f[p[0]]){if(p.length!==2*this.movesetorders[n])throw new Error("Bad length in perm gen");for(let R of p)s[L].push(R)}for(let R=0;R<p.length;R+=2)f[p[R]]=!0}for(let g=0;g<s.length;g++)s[g]=s[g].slice();r.push(s)}if(this.cmovesbyslice=r,this.options.moveList){let n=[];for(let o of this.options.moveList)n.push(this.parsemove(o));this.parsedmovelist=n}this.facelisthash.clear(),this.facecentermass=[]}getboundarygeometry(){return{baseplanes:this.baseplanes,facenames:this.facenames,faceplanes:this.faceplanes,vertexnames:this.vertexnames,edgenames:this.edgenames,geonormals:this.geonormals}}getmovesets(t){let r=this.moveplanesets[t].length,n=[];if(this.parsedmovelist!==void 0)for(let o of this.parsedmovelist)o[1]===t&&(o[4]?n.push([o[2],o[3]]):n.push([r-o[3],r-o[2]]),n.push(o[5]));else if(this.options.vertexMoves&&!this.options.allMoves){let o=this.movesetgeos[t];if(o[1]!==o[3])for(let l=0;l<r;l++)o[1]!=="v"?(this.options.outerBlockMoves?n.push([l+1,r]):n.push([l+1]),n.push(1)):(this.options.outerBlockMoves?n.push([0,l]):n.push([l,l]),n.push(1))}else for(let o=0;o<=r;o++)!this.options.allMoves&&o+o===r||(this.options.outerBlockMoves?o+o>r?n.push([o,r]):n.push([0,o]):n.push([o,o]),n.push(1));if(this.fixedCubie>=0){let o=this.keyface3(this.faces[this.cubies[this.fixedCubie][0]])[t],l=[];for(let i=0;i<n.length;i+=2){let a=n[i];if(o>=a[0]&&o<=a[1])if(a[0]===0)a=[a[1]+1,r];else if(r===a[1])a=[0,a[0]-1];else throw Error("fixed cubie option would disconnect move");let s=!1;for(let f=0;f<l.length;f+=2)if(l[f][0]===a[0]&&l[f][1]===a[1]&&l[f+1]===n[i+1]){s=!0;break}s||(l.push(a),l.push(n[i+1]))}n=l}return n}graybyori(t){let r=this.cubies[t].length;return this.duplicatedCubies[t]&&(r=1),r===1&&(this.options.grayCenters||!this.options.includeCenterOrbits)||r===2&&(this.options.grayEdges||!this.options.includeEdgeOrbits)||r>2&&(this.options.grayCorners||!this.options.includeCornerOrbits)}skipbyori(t){let r=this.cubies[t].length;return this.duplicatedCubies[t]&&(r=1),r===1&&!this.options.includeCenterOrbits||r===2&&!this.options.includeEdgeOrbits||r>2&&!this.options.includeCornerOrbits}skipcubie(t){return this.skipbyori(t)}header(t){return t+Wm+\`
|
|
9
9
|
\`+t+\`
|
|
10
10
|
\`}writegap(){let t=this.getOrbitsDef(!1),r=[],n=[];for(let l=0;l<t.moveops.length;l++){let i="M_"+ta(this.notationMapper,t.movenames[l]),a=!1;i[i.length-1]==="'"&&(i=i.substring(0,i.length-1),a=!0),n.push(i),a?r.push(i+":="+t.moveops[l].toPerm().inv().toGap()+";"):r.push(i+":="+t.moveops[l].toPerm().toGap()+";")}r.push("Gen:=["),r.push(n.join(",")),r.push("];");let o=t.solved.identicalPieces();return r.push("ip:=["+o.map(l=>"["+l.map(i=>i+1).join(",")+"]").join(",")+"];"),r.push("# Size(Group(Gen));"),r.push("# Size(Stabilizer(Group(Gen), ip, OnTuplesSets));"),r.push(""),this.header("# ")+r.join(\`
|
|
11
11
|
\`)}writeksolve(t="PuzzleGeometryPuzzle"){let r=this.getOrbitsDef(!1);return this.header("# ")+r.toKsolve(t,this.notationMapper).join(\`
|
|
@@ -3765,4 +3765,4 @@ Alg R' U' R U B' U' B L\`)}var WF,KF,Ws=U(()=>{Ce();Mn();Nn();WF=null;KF=null});
|
|
|
3765
3765
|
export {
|
|
3766
3766
|
workerSource
|
|
3767
3767
|
};
|
|
3768
|
-
//# sourceMappingURL=worker-inside-generated-string-
|
|
3768
|
+
//# sourceMappingURL=worker-inside-generated-string-J4XQMLW2.js.map
|