Solution is implemented in JavaScript in the file solve-puzzle.js.
Lockpad puzzle solution - implemented in JS