@lichess-org/pgn-viewer 0.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) hide show
  1. package/LICENSE +674 -0
  2. package/README.md +127 -0
  3. package/demo/demo.js +241 -0
  4. package/demo/frame.html +11 -0
  5. package/demo/full-screen.html +19 -0
  6. package/demo/index.html +30 -0
  7. package/demo/lichess-pgn-viewer.css +734 -0
  8. package/demo/lichess-pgn-viewer.demo.css +17 -0
  9. package/demo/lichess-pgn-viewer.js +5916 -0
  10. package/demo/one.html +25 -0
  11. package/demo/one.js +32 -0
  12. package/dist/config.d.ts +30 -0
  13. package/dist/config.js +54 -0
  14. package/dist/config.js.map +1 -0
  15. package/dist/events.d.ts +4 -0
  16. package/dist/events.js +42 -0
  17. package/dist/events.js.map +1 -0
  18. package/dist/game.d.ts +20 -0
  19. package/dist/game.js +45 -0
  20. package/dist/game.js.map +1 -0
  21. package/dist/interfaces.d.ts +95 -0
  22. package/dist/interfaces.js +2 -0
  23. package/dist/interfaces.js.map +1 -0
  24. package/dist/lichess-pgn-viewer.css +1 -0
  25. package/dist/lichess-pgn-viewer.min.js +4 -0
  26. package/dist/main.d.ts +3 -0
  27. package/dist/main.js +18 -0
  28. package/dist/main.js.map +1 -0
  29. package/dist/path.d.ts +16 -0
  30. package/dist/path.js +18 -0
  31. package/dist/path.js.map +1 -0
  32. package/dist/pgn.d.ts +4 -0
  33. package/dist/pgn.js +128 -0
  34. package/dist/pgn.js.map +1 -0
  35. package/dist/pgnViewer.d.ts +34 -0
  36. package/dist/pgnViewer.js +90 -0
  37. package/dist/pgnViewer.js.map +1 -0
  38. package/dist/translation.d.ts +2 -0
  39. package/dist/translation.js +14 -0
  40. package/dist/translation.js.map +1 -0
  41. package/dist/tsconfig.tsbuildinfo +1 -0
  42. package/dist/view/glyph.d.ts +1 -0
  43. package/dist/view/glyph.js +104 -0
  44. package/dist/view/glyph.js.map +1 -0
  45. package/dist/view/main.d.ts +5 -0
  46. package/dist/view/main.js +78 -0
  47. package/dist/view/main.js.map +1 -0
  48. package/dist/view/menu.d.ts +3 -0
  49. package/dist/view/menu.js +61 -0
  50. package/dist/view/menu.js.map +1 -0
  51. package/dist/view/player.d.ts +3 -0
  52. package/dist/view/player.js +32 -0
  53. package/dist/view/player.js.map +1 -0
  54. package/dist/view/side.d.ts +3 -0
  55. package/dist/view/side.js +102 -0
  56. package/dist/view/side.js.map +1 -0
  57. package/dist/view/util.d.ts +4 -0
  58. package/dist/view/util.js +23 -0
  59. package/dist/view/util.js.map +1 -0
  60. package/package.json +73 -0
  61. package/scss/_chessground.base.scss +164 -0
  62. package/scss/_chessground.cburnett.css +37 -0
  63. package/scss/_chessground.transp.css +57 -0
  64. package/scss/_controls.scss +30 -0
  65. package/scss/_fbt.scss +32 -0
  66. package/scss/_font-embed.scss +30 -0
  67. package/scss/_font.scss +33 -0
  68. package/scss/_layout.scss +147 -0
  69. package/scss/_lichess-pgn-viewer.lib.scss +78 -0
  70. package/scss/_pane.scss +31 -0
  71. package/scss/_player.scss +39 -0
  72. package/scss/_scrollbar.scss +16 -0
  73. package/scss/_side.scss +155 -0
  74. package/scss/_util.scss +7 -0
  75. package/scss/lichess-pgn-viewer.scss +4 -0
  76. package/src/config.ts +53 -0
  77. package/src/events.ts +42 -0
  78. package/src/game.ts +61 -0
  79. package/src/interfaces.ts +108 -0
  80. package/src/main.ts +24 -0
  81. package/src/path.ts +28 -0
  82. package/src/pgn.ts +141 -0
  83. package/src/pgnViewer.ts +114 -0
  84. package/src/translation.ts +17 -0
  85. package/src/view/glyph.ts +113 -0
  86. package/src/view/main.ts +99 -0
  87. package/src/view/menu.ts +92 -0
  88. package/src/view/player.ts +41 -0
  89. package/src/view/side.ts +123 -0
  90. package/src/view/util.ts +40 -0
@@ -0,0 +1,14 @@
1
+ export default function translate(translator) {
2
+ return (key) => (translator && translator(key)) || defaultTranslator(key);
3
+ }
4
+ const defaultTranslator = (key) => defaultTranslations[key];
5
+ const defaultTranslations = {
6
+ flipTheBoard: 'Flip the board',
7
+ analysisBoard: 'Analysis board',
8
+ practiceWithComputer: 'Practice with computer',
9
+ getPgn: 'Get PGN',
10
+ download: 'Download',
11
+ viewOnLichess: 'View on Lichess',
12
+ viewOnSite: 'View on site',
13
+ };
14
+ //# sourceMappingURL=translation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"translation.js","sourceRoot":"","sources":["../src/translation.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,UAAsB;IACtD,OAAO,CAAC,GAAW,EAAE,EAAE,CAAC,CAAC,UAAU,IAAI,UAAU,CAAC,GAAG,CAAC,CAAC,IAAI,iBAAiB,CAAC,GAAG,CAAC,CAAC;AACpF,CAAC;AAED,MAAM,iBAAiB,GAAG,CAAC,GAAW,EAAE,EAAE,CAAC,mBAAmB,CAAC,GAAG,CAAC,CAAC;AAEpE,MAAM,mBAAmB,GAA8B;IACrD,YAAY,EAAE,gBAAgB;IAC9B,aAAa,EAAE,gBAAgB;IAC/B,oBAAoB,EAAE,wBAAwB;IAC9C,MAAM,EAAE,SAAS;IACjB,QAAQ,EAAE,UAAU;IACpB,aAAa,EAAE,iBAAiB;IAChC,UAAU,EAAE,cAAc;CAC3B,CAAC"}
@@ -0,0 +1 @@
1
+ {"fileNames":["../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es5.d.ts","../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2015.d.ts","../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2016.d.ts","../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2017.d.ts","../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2018.d.ts","../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2019.d.ts","../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2020.d.ts","../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.dom.d.ts","../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2015.core.d.ts","../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2015.collection.d.ts","../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2015.generator.d.ts","../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2015.promise.d.ts","../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2016.intl.d.ts","../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2017.date.d.ts","../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2017.object.d.ts","../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2017.string.d.ts","../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2017.intl.d.ts","../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2018.intl.d.ts","../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2018.promise.d.ts","../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2019.array.d.ts","../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2019.object.d.ts","../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2019.string.d.ts","../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2019.intl.d.ts","../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2020.date.d.ts","../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2020.promise.d.ts","../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2020.string.d.ts","../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2020.intl.d.ts","../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.es2020.number.d.ts","../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.decorators.d.ts","../node_modules/.pnpm/typescript@5.7.3/node_modules/typescript/lib/lib.decorators.legacy.d.ts","../node_modules/.pnpm/chessops@0.14.2/node_modules/chessops/dist/types/types.d.ts","../node_modules/.pnpm/chessops@0.14.2/node_modules/chessops/dist/types/util.d.ts","../node_modules/.pnpm/chessops@0.14.2/node_modules/chessops/dist/types/squareSet.d.ts","../node_modules/.pnpm/chessops@0.14.2/node_modules/chessops/dist/types/attacks.d.ts","../node_modules/.pnpm/chessops@0.14.2/node_modules/chessops/dist/types/board.d.ts","../node_modules/.pnpm/chessops@0.14.2/node_modules/chessops/dist/types/setup.d.ts","../node_modules/.pnpm/@badrap+result@0.2.13/node_modules/@badrap/result/dist/index.d.ts","../node_modules/.pnpm/chessops@0.14.2/node_modules/chessops/dist/types/chess.d.ts","../node_modules/.pnpm/chessops@0.14.2/node_modules/chessops/dist/types/compat.d.ts","../node_modules/.pnpm/chessops@0.14.2/node_modules/chessops/dist/types/debug.d.ts","../node_modules/.pnpm/chessops@0.14.2/node_modules/chessops/dist/types/fen.d.ts","../node_modules/.pnpm/chessops@0.14.2/node_modules/chessops/dist/types/san.d.ts","../node_modules/.pnpm/chessops@0.14.2/node_modules/chessops/dist/types/transform.d.ts","../node_modules/.pnpm/chessops@0.14.2/node_modules/chessops/dist/types/variant.d.ts","../node_modules/.pnpm/chessops@0.14.2/node_modules/chessops/dist/types/pgn.d.ts","../node_modules/.pnpm/chessops@0.14.2/node_modules/chessops/dist/types/index.d.ts","../node_modules/.pnpm/chessground@9.2.1/node_modules/chessground/dist/types.d.ts","../node_modules/.pnpm/chessground@9.2.1/node_modules/chessground/dist/anim.d.ts","../node_modules/.pnpm/chessground@9.2.1/node_modules/chessground/dist/drag.d.ts","../node_modules/.pnpm/chessground@9.2.1/node_modules/chessground/dist/draw.d.ts","../node_modules/.pnpm/chessground@9.2.1/node_modules/chessground/dist/state.d.ts","../node_modules/.pnpm/chessground@9.2.1/node_modules/chessground/dist/config.d.ts","../src/path.ts","../src/interfaces.ts","../src/config.ts","../node_modules/.pnpm/chessground@9.2.1/node_modules/chessground/dist/api.d.ts","../src/translation.ts","../node_modules/.pnpm/chessground@9.2.1/node_modules/chessground/dist/util.d.ts","../src/game.ts","../src/pgn.ts","../src/pgnViewer.ts","../src/events.ts","../node_modules/.pnpm/chessground@9.2.1/node_modules/chessground/dist/chessground.d.ts","../node_modules/.pnpm/snabbdom@3.6.2/node_modules/snabbdom/build/htmldomapi.d.ts","../node_modules/.pnpm/snabbdom@3.6.2/node_modules/snabbdom/build/helpers/attachto.d.ts","../node_modules/.pnpm/snabbdom@3.6.2/node_modules/snabbdom/build/modules/style.d.ts","../node_modules/.pnpm/snabbdom@3.6.2/node_modules/snabbdom/build/modules/eventlisteners.d.ts","../node_modules/.pnpm/snabbdom@3.6.2/node_modules/snabbdom/build/modules/attributes.d.ts","../node_modules/.pnpm/snabbdom@3.6.2/node_modules/snabbdom/build/modules/class.d.ts","../node_modules/.pnpm/snabbdom@3.6.2/node_modules/snabbdom/build/modules/props.d.ts","../node_modules/.pnpm/snabbdom@3.6.2/node_modules/snabbdom/build/modules/dataset.d.ts","../node_modules/.pnpm/snabbdom@3.6.2/node_modules/snabbdom/build/vnode.d.ts","../node_modules/.pnpm/snabbdom@3.6.2/node_modules/snabbdom/build/hooks.d.ts","../node_modules/.pnpm/snabbdom@3.6.2/node_modules/snabbdom/build/modules/module.d.ts","../node_modules/.pnpm/snabbdom@3.6.2/node_modules/snabbdom/build/init.d.ts","../node_modules/.pnpm/snabbdom@3.6.2/node_modules/snabbdom/build/thunk.d.ts","../node_modules/.pnpm/snabbdom@3.6.2/node_modules/snabbdom/build/is.d.ts","../node_modules/.pnpm/snabbdom@3.6.2/node_modules/snabbdom/build/tovnode.d.ts","../node_modules/.pnpm/snabbdom@3.6.2/node_modules/snabbdom/build/h.d.ts","../node_modules/.pnpm/snabbdom@3.6.2/node_modules/snabbdom/build/jsx.d.ts","../node_modules/.pnpm/snabbdom@3.6.2/node_modules/snabbdom/build/index.d.ts","../src/view/util.ts","../src/view/menu.ts","../src/view/glyph.ts","../src/view/side.ts","../src/view/player.ts","../src/view/main.ts","../src/main.ts","../node_modules/.pnpm/@types+node@22.13.4/node_modules/@types/node/compatibility/disposable.d.ts","../node_modules/.pnpm/@types+node@22.13.4/node_modules/@types/node/compatibility/indexable.d.ts","../node_modules/.pnpm/@types+node@22.13.4/node_modules/@types/node/compatibility/iterators.d.ts","../node_modules/.pnpm/@types+node@22.13.4/node_modules/@types/node/compatibility/index.d.ts","../node_modules/.pnpm/@types+node@22.13.4/node_modules/@types/node/globals.typedarray.d.ts","../node_modules/.pnpm/@types+node@22.13.4/node_modules/@types/node/buffer.buffer.d.ts","../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/header.d.ts","../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/readable.d.ts","../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/file.d.ts","../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/fetch.d.ts","../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/formdata.d.ts","../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/connector.d.ts","../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/client.d.ts","../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/errors.d.ts","../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/dispatcher.d.ts","../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/global-dispatcher.d.ts","../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/global-origin.d.ts","../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/pool-stats.d.ts","../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/pool.d.ts","../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/handlers.d.ts","../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/balanced-pool.d.ts","../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/agent.d.ts","../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/mock-interceptor.d.ts","../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/mock-agent.d.ts","../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/mock-client.d.ts","../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/mock-pool.d.ts","../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/mock-errors.d.ts","../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/proxy-agent.d.ts","../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/env-http-proxy-agent.d.ts","../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/retry-handler.d.ts","../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/retry-agent.d.ts","../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/api.d.ts","../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/interceptors.d.ts","../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/util.d.ts","../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/cookies.d.ts","../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/patch.d.ts","../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/websocket.d.ts","../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/eventsource.d.ts","../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/filereader.d.ts","../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/diagnostics-channel.d.ts","../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/content-type.d.ts","../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/cache.d.ts","../node_modules/.pnpm/undici-types@6.20.0/node_modules/undici-types/index.d.ts","../node_modules/.pnpm/@types+node@22.13.4/node_modules/@types/node/globals.d.ts","../node_modules/.pnpm/@types+node@22.13.4/node_modules/@types/node/assert.d.ts","../node_modules/.pnpm/@types+node@22.13.4/node_modules/@types/node/assert/strict.d.ts","../node_modules/.pnpm/@types+node@22.13.4/node_modules/@types/node/async_hooks.d.ts","../node_modules/.pnpm/@types+node@22.13.4/node_modules/@types/node/buffer.d.ts","../node_modules/.pnpm/@types+node@22.13.4/node_modules/@types/node/child_process.d.ts","../node_modules/.pnpm/@types+node@22.13.4/node_modules/@types/node/cluster.d.ts","../node_modules/.pnpm/@types+node@22.13.4/node_modules/@types/node/console.d.ts","../node_modules/.pnpm/@types+node@22.13.4/node_modules/@types/node/constants.d.ts","../node_modules/.pnpm/@types+node@22.13.4/node_modules/@types/node/crypto.d.ts","../node_modules/.pnpm/@types+node@22.13.4/node_modules/@types/node/dgram.d.ts","../node_modules/.pnpm/@types+node@22.13.4/node_modules/@types/node/diagnostics_channel.d.ts","../node_modules/.pnpm/@types+node@22.13.4/node_modules/@types/node/dns.d.ts","../node_modules/.pnpm/@types+node@22.13.4/node_modules/@types/node/dns/promises.d.ts","../node_modules/.pnpm/@types+node@22.13.4/node_modules/@types/node/domain.d.ts","../node_modules/.pnpm/@types+node@22.13.4/node_modules/@types/node/dom-events.d.ts","../node_modules/.pnpm/@types+node@22.13.4/node_modules/@types/node/events.d.ts","../node_modules/.pnpm/@types+node@22.13.4/node_modules/@types/node/fs.d.ts","../node_modules/.pnpm/@types+node@22.13.4/node_modules/@types/node/fs/promises.d.ts","../node_modules/.pnpm/@types+node@22.13.4/node_modules/@types/node/http.d.ts","../node_modules/.pnpm/@types+node@22.13.4/node_modules/@types/node/http2.d.ts","../node_modules/.pnpm/@types+node@22.13.4/node_modules/@types/node/https.d.ts","../node_modules/.pnpm/@types+node@22.13.4/node_modules/@types/node/inspector.d.ts","../node_modules/.pnpm/@types+node@22.13.4/node_modules/@types/node/module.d.ts","../node_modules/.pnpm/@types+node@22.13.4/node_modules/@types/node/net.d.ts","../node_modules/.pnpm/@types+node@22.13.4/node_modules/@types/node/os.d.ts","../node_modules/.pnpm/@types+node@22.13.4/node_modules/@types/node/path.d.ts","../node_modules/.pnpm/@types+node@22.13.4/node_modules/@types/node/perf_hooks.d.ts","../node_modules/.pnpm/@types+node@22.13.4/node_modules/@types/node/process.d.ts","../node_modules/.pnpm/@types+node@22.13.4/node_modules/@types/node/punycode.d.ts","../node_modules/.pnpm/@types+node@22.13.4/node_modules/@types/node/querystring.d.ts","../node_modules/.pnpm/@types+node@22.13.4/node_modules/@types/node/readline.d.ts","../node_modules/.pnpm/@types+node@22.13.4/node_modules/@types/node/readline/promises.d.ts","../node_modules/.pnpm/@types+node@22.13.4/node_modules/@types/node/repl.d.ts","../node_modules/.pnpm/@types+node@22.13.4/node_modules/@types/node/sea.d.ts","../node_modules/.pnpm/@types+node@22.13.4/node_modules/@types/node/sqlite.d.ts","../node_modules/.pnpm/@types+node@22.13.4/node_modules/@types/node/stream.d.ts","../node_modules/.pnpm/@types+node@22.13.4/node_modules/@types/node/stream/promises.d.ts","../node_modules/.pnpm/@types+node@22.13.4/node_modules/@types/node/stream/consumers.d.ts","../node_modules/.pnpm/@types+node@22.13.4/node_modules/@types/node/stream/web.d.ts","../node_modules/.pnpm/@types+node@22.13.4/node_modules/@types/node/string_decoder.d.ts","../node_modules/.pnpm/@types+node@22.13.4/node_modules/@types/node/test.d.ts","../node_modules/.pnpm/@types+node@22.13.4/node_modules/@types/node/timers.d.ts","../node_modules/.pnpm/@types+node@22.13.4/node_modules/@types/node/timers/promises.d.ts","../node_modules/.pnpm/@types+node@22.13.4/node_modules/@types/node/tls.d.ts","../node_modules/.pnpm/@types+node@22.13.4/node_modules/@types/node/trace_events.d.ts","../node_modules/.pnpm/@types+node@22.13.4/node_modules/@types/node/tty.d.ts","../node_modules/.pnpm/@types+node@22.13.4/node_modules/@types/node/url.d.ts","../node_modules/.pnpm/@types+node@22.13.4/node_modules/@types/node/util.d.ts","../node_modules/.pnpm/@types+node@22.13.4/node_modules/@types/node/v8.d.ts","../node_modules/.pnpm/@types+node@22.13.4/node_modules/@types/node/vm.d.ts","../node_modules/.pnpm/@types+node@22.13.4/node_modules/@types/node/wasi.d.ts","../node_modules/.pnpm/@types+node@22.13.4/node_modules/@types/node/worker_threads.d.ts","../node_modules/.pnpm/@types+node@22.13.4/node_modules/@types/node/zlib.d.ts","../node_modules/.pnpm/@types+node@22.13.4/node_modules/@types/node/index.d.ts"],"fileIdsList":[[110,152],[110,149,152],[110,151,152],[152],[110,152,157,187],[110,152,153,158,164,165,172,184,195],[110,152,153,154,164,172],[105,106,107,110,152],[110,152,155,196],[110,152,156,157,165,173],[110,152,157,184,192],[110,152,158,160,164,172],[110,151,152,159],[110,152,160,161],[110,152,164],[110,152,162,164],[110,151,152,164],[110,152,164,165,166,184,195],[110,152,164,165,166,179,184,187],[110,147,152,200],[110,147,152,160,164,167,172,184,195],[110,152,164,165,167,168,172,184,192,195],[110,152,167,169,184,192,195],[108,109,110,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201],[110,152,164,170],[110,152,171,195],[110,152,160,164,172,184],[110,152,173],[110,152,174],[110,151,152,175],[110,149,150,151,152,153,154,155,156,157,158,159,160,161,162,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201],[110,152,177],[110,152,178],[110,152,164,179,180],[110,152,179,181,196,198],[110,152,164,184,185,186,187],[110,152,184,186],[110,152,184,185],[110,152,187],[110,152,188],[110,149,152,184],[110,152,164,190,191],[110,152,190,191],[110,152,157,172,184,192],[110,152,193],[110,152,172,194],[110,152,167,178,195],[110,152,157,196],[110,152,184,197],[110,152,171,198],[110,152,199],[110,152,157,164,166,175,184,195,198,200],[110,152,184,201],[63,67,110,152],[63,66,67,68,110,152],[68,72,110,152],[63,66,67,110,152],[63,64,65,66,110,152],[63,110,152],[47,49,110,152],[47,49,51,52,53,110,152],[47,54,110,152],[47,49,51,54,110,152],[47,48,49,50,51,52,54,55,56,57,58,59,60,61,110,152],[47,53,54,57,110,152],[47,49,51,110,152],[47,110,152],[49,51,52,110,152],[47,49,52,53,54,110,152],[88,110,152],[80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,110,152],[80,88,90,110,152],[86,88,95,110,152],[90,110,152],[88,90,110,152],[89,110,152],[80,88,110,152],[81,82,83,84,85,86,87,89,110,152],[110,119,123,152,195],[110,119,152,184,195],[110,114,152],[110,116,119,152,192,195],[110,152,172,192],[110,152,202],[110,114,152,202],[110,116,119,152,172,195],[110,111,112,115,118,152,164,184,195],[110,119,126,152],[110,111,117,152],[110,119,140,141,152],[110,115,119,152,187,195,202],[110,140,152,202],[110,113,114,152,202],[110,119,152],[110,113,114,115,116,117,118,119,120,121,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,141,142,143,144,145,146,152],[110,119,134,152],[110,119,126,127,152],[110,117,119,127,128,152],[110,118,152],[110,111,114,119,152],[110,119,123,127,128,152],[110,123,152],[110,117,119,122,152,195],[110,111,116,119,126,152],[110,152,184],[110,114,119,140,152,200,202],[70,110,152],[77,110,152],[61,69,70,110,152],[61,62,63,68,69,110,152],[70,71,77,97,103,110,152],[55,57,58,61,62,69,70,75,110,152],[62,68,69,70,72,73,74,75,76,110,152],[97,110,152],[68,77,78,79,97,98,99,101,102,110,152],[70,77,78,97,98,110,152],[62,77,97,110,152],[69,70,75,77,97,100,110,152]],"fileInfos":[{"version":"e41c290ef7dd7dab3493e6cbe5909e0148edf4a8dad0271be08edec368a0f7b9","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"e44bb8bbac7f10ecc786703fe0a6a4b952189f908707980ba8f3c8975a760962","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"4fd3f3422b2d2a3dfd5cdd0f387b3a8ec45f006c6ea896a4cb41264c2100bb2c","affectsGlobalScope":true,"impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"62bb211266ee48b2d0edf0d8d1b191f0c24fc379a82bd4c1692a082c540bc6b1","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"936e80ad36a2ee83fc3caf008e7c4c5afe45b3cf3d5c24408f039c1d47bdc1df","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"fef8cfad2e2dc5f5b3d97a6f4f2e92848eb1b88e897bb7318cef0e2820bceaab","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"f1e2a172204962276504466a6393426d2ca9c54894b1ad0a6c9dad867a65f876","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"52ada8e0b6e0482b728070b7639ee42e83a9b1c22d205992756fe020fd9f4a47","affectsGlobalScope":true,"impliedFormat":1},{"version":"3bdefe1bfd4d6dee0e26f928f93ccc128f1b64d5d501ff4a8cf3c6371200e5e6","affectsGlobalScope":true,"impliedFormat":1},{"version":"59fb2c069260b4ba00b5643b907ef5d5341b167e7d1dbf58dfd895658bda2867","affectsGlobalScope":true,"impliedFormat":1},{"version":"639e512c0dfc3fad96a84caad71b8834d66329a1f28dc95e3946c9b58176c73a","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"56168723698771ffa441d745545b3840ec6a60a4a4b7e3bc53626ed6402848e9","impliedFormat":99},{"version":"29c4ef894d6cdc9effc3da2e45df39bd46173ab2e880669969363befa8ae9c59","impliedFormat":99},{"version":"9f1a606af4c42d72f626765f0cd71fe9b0aa0841ea3e837e7dc0f3248204b288","impliedFormat":99},{"version":"1ba6b78f7d38a841e0fdc106af31a144672583131b024e31378a27f881de9c34","impliedFormat":99},{"version":"12b8386146a8b9303d07de133de865e10b3cdb064a5483c784a791e8aa7376d1","impliedFormat":99},{"version":"83ef3841bae34e649fd7c1c6be499444d28eb962f57c50a55b8ada885f9ab089","impliedFormat":99},{"version":"20f7fef05a1f2d7f9ddcb64fac0e1029f9dd9ec3783e6330eb7c80375208ede3","impliedFormat":1},{"version":"4f480c4465d9977a759a8141deec88953d4a2d8aa3504edce7910b2db95a0d5d","impliedFormat":99},{"version":"8c323d171f1cd143cafdfceb8bef95f1f195211beac8e8e5f796a1b595e8d1cf","impliedFormat":99},{"version":"114aeac4618b952272947d290fc8aeba415d3ad560934df4c2809c58a02b55a3","impliedFormat":99},{"version":"1cde5056744518c5dfbdfc8d550330bbfe388fb3f105876bdca9676f7a237b29","impliedFormat":99},{"version":"4adc1c36904421747e3c6d5b70dbe9e1ed06c49f6ea2868b2ec6a334f85c35e5","impliedFormat":99},{"version":"53dc5dcff95f7a72e08124e57fe5c8e72e64f51e25eb77b3b375db24a7b9c86f","impliedFormat":99},{"version":"eec39d6c3bead7fa60bad28f01334484ee4587f371cf9e67ebb3d4c258a65ea4","impliedFormat":99},{"version":"9e3a64c568d637dfd6a99dc8f9921e2db8b65f4b730acb3fa80a8799164675c8","impliedFormat":99},{"version":"f69f219aa5b390999b7701f42cdf75e69cca92f50a00ef627e215cbfad241795","impliedFormat":99},{"version":"9a9e2a57052135eff04d8d3643e5f44e79bd99d0b98b76e6f557685f0175b123","impliedFormat":99},{"version":"4d2a9be5f03a0b85adff5cfa50a46e6bdc84cfb5186966ee83b5c4aa2d843bce","impliedFormat":99},{"version":"14fbc0091eb1d2d336d59a3c0771a9591e997fad2a1e2ad544ab53722249447e","impliedFormat":99},{"version":"c28fb943fc575035531e497c300bb85ad20c9ee34af6bc5f133a2480e9963325","impliedFormat":99},{"version":"1ba851490289552776917488106a39df84b29349eb2eb084ca193aa0c733e2b7","impliedFormat":99},{"version":"fc912b8633d525208feaa42263aa4dac1b4a67163ae22b17f234067d9eaf65f6","impliedFormat":99},{"version":"b2eb3e2e585446d4a521f21b20904581654925c3826bec560ad457fc39512a16","signature":"ab8d2ec9b55e4404c0214a28fb884c1490af913964b22c23d6a224d5ebda139a"},{"version":"e9d38d4a3e0925b444c12651ac55a467f768dd640762ec9c85d6b01af98e2b8b","signature":"d0c3ed504d174dae744e409c8cea251396616bfe2f78eda2c79d8f0bacdbe054"},{"version":"baae1124e718c52a55a37cae7c86dcca7919951644a73a2817a1cbda83741290","signature":"e2b7709634bb6f4698ef0e277ec41208ea9d80ca39a734fea59b219c74ef392f"},{"version":"bac3a4cd114dfcb542cc56834ed4813744daf1289d519afa90740f5b5746c750","impliedFormat":99},{"version":"c206a7650bc638ec785f8be52b5dfe8b5efef83dfd7fcc215f4186ba1e29656d","signature":"85406b29e0886b7f590471f17760786516f02effa0b317fc7567c55877be823c"},{"version":"3d2d1705a0e535639a1c7e45f9decfc259de4a789d5ad721b1a4dc895cbeaf2b","impliedFormat":99},{"version":"12b12dc3ee9d168cece989eee68e903071c69db808914cf2bb05b65ba9d5c76a","signature":"3aa388df5a873d69898c90fcc0f26d3d520dee117c17c4ce49cc132ed68db198"},{"version":"bc50e721604d26e21eb219ef26ffdd3a303bc4d51188cf95227510387169ac23","signature":"536d062cb2ebdec1d307aecdb77c2d6f89b4fce481f8f66d181886b2b5bf8fef"},{"version":"1b201aed7db4b7c692b23dd26cc141fd08227a047f7a05547836ebb3dbb88a3b","signature":"fd1e03cda69573da6b30706b97ce8b5ba4d0981ee37dca0a49aa22706d1bb317"},{"version":"be076041c123ed99f70f62fc8b4a9238ba31216b5bc7ab990669443eb8c2806f","signature":"4a0559a3703462a9186acc1cb843281d733bccca72f0e76888c1a113c59b2e5e"},{"version":"42de8107b60eedc59972b085a42b80a115e15a3427de7019881c336c80a08a97","impliedFormat":99},{"version":"095a402135de9fbfda29ba7c984bf54b9e65757396b4165706d898e9baa83ed5","impliedFormat":99},{"version":"0b6471168629b8a0cbac9f8f67bbbba83a1d64cf1424cd7d299439b3af88129a","impliedFormat":99},{"version":"3e0fa3b04086663fd406499ea37f0714b0d7cbc296eb81e244f2bf0ba4938bb2","impliedFormat":99},{"version":"3d11abe325e68a5b76d9f53ecc0b4ea29685ccbd8690b279f2177e0750d87f8c","impliedFormat":99},{"version":"f1952d24cb1344241341230924197977764249edcde80605e96454f073ebb35a","impliedFormat":99},{"version":"3b5b37b56d81802168c5b8df2f1d4a7ee018d67e7463f221d49b6ea20af00060","impliedFormat":99},{"version":"f3a6db8faeb959400a4d0e1100b9d5c54eb494800e6dc9a2452bb2e00a27397c","impliedFormat":99},{"version":"d278699a1c7e06a195ecc065c4965d1bbfb5bc2d67176e63bebf58b273158023","impliedFormat":99},{"version":"7065a325a451da4b8518ec20e93d240d49a5b088025853eabff1363519941351","impliedFormat":99},{"version":"28729ff7b2ea98a9ba6ca4490c5540be744a4d73b4199ff6094cb65c9db33607","impliedFormat":99},{"version":"6ac889647435812fb7ced7035daf90c1f307710056e4b496a3fd5cb97c87daed","impliedFormat":99},{"version":"29f60d17027d6bc8891797f6ed95ac84ee42313e6b03ddb49beff6f22f49f8c6","impliedFormat":99},{"version":"f71579228be8825267577e970c8f0ee2869cebae0bb7603b00644fec924c6717","impliedFormat":99},{"version":"e50f096cb424b63343ad5814622623f15cf3830f41710376bebb3c7f71554713","impliedFormat":99},{"version":"69ebae4354b59ff1ba38419d6033e22d0db6ffe6c1d562e78914f88f06ec517f","impliedFormat":99},{"version":"45f0aee62dc187cbde99b10987e1f8649a30bba8bf9c95957e37d1551d0626da","impliedFormat":99},{"version":"50b8314134276208f3fea1da3d0b27ced4dffa8e4477fadb248e02b75aebbd47","impliedFormat":99},{"version":"47747eabb3c64620a12f707bf30c7f7a211e25754a2da1f98267068f49bd0947","impliedFormat":99},{"version":"493a21bbf491e54b031a1b56b9773dd4030e2a8ef2f44ae3012a337da7103d73","signature":"83efa554b240302937a11ca4c9edfca3dbf4f2f9da1fa473fe9fc853c1a81ea1"},{"version":"a99256a83b93aec6b78cd13eb48550814df6f833ba430fffb01bebd9f9050b93","signature":"43410a98910901277e05b8515873f4e3cbb811cbacf78acfa440c28930b602a1"},{"version":"b34754e41d6e0f93d380e23c706689fdd682797f91326ab25bd9c7084ba775da","signature":"9d0637637bcb78238fa1ed5ddab6241174825d1b08a17ae64ecaf8cbd2ea6bf2"},{"version":"b12c2d6c3ca41a6e24da6c0209d4ac18221ae7f87900361e6ab747ef84b1d60a","signature":"5ca7728f8bd9bced5829f9886e7f6601f1e4e66f7c3c84c20c6709f828c06e38"},{"version":"10655099796134239b0ed19c0a0cb58cd1bcded387272877118fbfb62037a34b","signature":"6889eba0ca8fa41d1579787805dbb88d492650acda574a483df86744967cf4c8"},{"version":"ffd36b9fb9272a2981ee641fcbe15a9ce12c6bb1d42002a80d3134673b7d0acc","signature":"d63d0ccfe820e42892ab82d16397ae187a6d59d8549063405c7a26ce8f24e36b"},{"version":"760c57c05b5bba917a8290605e2aa8c67435015bd67590b97670eeadd9c16b00","signature":"81e7079e2896d84161cf5a16480bc746e9c513a8e21214348df92a0a946b6a5c"},{"version":"70521b6ab0dcba37539e5303104f29b721bfb2940b2776da4cc818c07e1fefc1","affectsGlobalScope":true,"impliedFormat":1},{"version":"030e350db2525514580ed054f712ffb22d273e6bc7eddc1bb7eda1e0ba5d395e","affectsGlobalScope":true,"impliedFormat":1},{"version":"d153a11543fd884b596587ccd97aebbeed950b26933ee000f94009f1ab142848","affectsGlobalScope":true,"impliedFormat":1},{"version":"21d819c173c0cf7cc3ce57c3276e77fd9a8a01d35a06ad87158781515c9a438a","impliedFormat":1},{"version":"a79e62f1e20467e11a904399b8b18b18c0c6eea6b50c1168bf215356d5bebfaf","affectsGlobalScope":true,"impliedFormat":1},{"version":"13af9e8fb6757946c48117315866177b95e554d1e773577bb6ca6e40083b6d73","affectsGlobalScope":true,"impliedFormat":1},{"version":"5929864ce17fba74232584d90cb721a89b7ad277220627cc97054ba15a98ea8f","impliedFormat":1},{"version":"24bd580b5743dc56402c440dc7f9a4f5d592ad7a419f25414d37a7bfe11e342b","impliedFormat":1},{"version":"25c8056edf4314820382a5fdb4bb7816999acdcb929c8f75e3f39473b87e85bc","impliedFormat":1},{"version":"c464d66b20788266e5353b48dc4aa6bc0dc4a707276df1e7152ab0c9ae21fad8","impliedFormat":1},{"version":"78d0d27c130d35c60b5e5566c9f1e5be77caf39804636bc1a40133919a949f21","impliedFormat":1},{"version":"c6fd2c5a395f2432786c9cb8deb870b9b0e8ff7e22c029954fabdd692bff6195","impliedFormat":1},{"version":"1d6e127068ea8e104a912e42fc0a110e2aa5a66a356a917a163e8cf9a65e4a75","impliedFormat":1},{"version":"5ded6427296cdf3b9542de4471d2aa8d3983671d4cac0f4bf9c637208d1ced43","impliedFormat":1},{"version":"6bdc71028db658243775263e93a7db2fd2abfce3ca569c3cca5aee6ed5eb186d","impliedFormat":1},{"version":"cadc8aced301244057c4e7e73fbcae534b0f5b12a37b150d80e5a45aa4bebcbd","impliedFormat":1},{"version":"385aab901643aa54e1c36f5ef3107913b10d1b5bb8cbcd933d4263b80a0d7f20","impliedFormat":1},{"version":"9670d44354bab9d9982eca21945686b5c24a3f893db73c0dae0fd74217a4c219","impliedFormat":1},{"version":"0b8a9268adaf4da35e7fa830c8981cfa22adbbe5b3f6f5ab91f6658899e657a7","impliedFormat":1},{"version":"11396ed8a44c02ab9798b7dca436009f866e8dae3c9c25e8c1fbc396880bf1bb","impliedFormat":1},{"version":"ba7bc87d01492633cb5a0e5da8a4a42a1c86270e7b3d2dea5d156828a84e4882","impliedFormat":1},{"version":"4893a895ea92c85345017a04ed427cbd6a1710453338df26881a6019432febdd","impliedFormat":1},{"version":"c21dc52e277bcfc75fac0436ccb75c204f9e1b3fa5e12729670910639f27343e","impliedFormat":1},{"version":"13f6f39e12b1518c6650bbb220c8985999020fe0f21d818e28f512b7771d00f9","impliedFormat":1},{"version":"9b5369969f6e7175740bf51223112ff209f94ba43ecd3bb09eefff9fd675624a","impliedFormat":1},{"version":"4fe9e626e7164748e8769bbf74b538e09607f07ed17c2f20af8d680ee49fc1da","impliedFormat":1},{"version":"24515859bc0b836719105bb6cc3d68255042a9f02a6022b3187948b204946bd2","impliedFormat":1},{"version":"ea0148f897b45a76544ae179784c95af1bd6721b8610af9ffa467a518a086a43","impliedFormat":1},{"version":"24c6a117721e606c9984335f71711877293a9651e44f59f3d21c1ea0856f9cc9","impliedFormat":1},{"version":"dd3273ead9fbde62a72949c97dbec2247ea08e0c6952e701a483d74ef92d6a17","impliedFormat":1},{"version":"405822be75ad3e4d162e07439bac80c6bcc6dbae1929e179cf467ec0b9ee4e2e","impliedFormat":1},{"version":"0db18c6e78ea846316c012478888f33c11ffadab9efd1cc8bcc12daded7a60b6","impliedFormat":1},{"version":"e61be3f894b41b7baa1fbd6a66893f2579bfad01d208b4ff61daef21493ef0a8","impliedFormat":1},{"version":"bd0532fd6556073727d28da0edfd1736417a3f9f394877b6d5ef6ad88fba1d1a","impliedFormat":1},{"version":"89167d696a849fce5ca508032aabfe901c0868f833a8625d5a9c6e861ef935d2","impliedFormat":1},{"version":"615ba88d0128ed16bf83ef8ccbb6aff05c3ee2db1cc0f89ab50a4939bfc1943f","impliedFormat":1},{"version":"a4d551dbf8746780194d550c88f26cf937caf8d56f102969a110cfaed4b06656","impliedFormat":1},{"version":"8bd86b8e8f6a6aa6c49b71e14c4ffe1211a0e97c80f08d2c8cc98838006e4b88","impliedFormat":1},{"version":"317e63deeb21ac07f3992f5b50cdca8338f10acd4fbb7257ebf56735bf52ab00","impliedFormat":1},{"version":"4732aec92b20fb28c5fe9ad99521fb59974289ed1e45aecb282616202184064f","impliedFormat":1},{"version":"2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","impliedFormat":1},{"version":"c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","impliedFormat":1},{"version":"bf67d53d168abc1298888693338cb82854bdb2e69ef83f8a0092093c2d562107","impliedFormat":1},{"version":"d2bc987ae352271d0d615a420dcf98cc886aa16b87fb2b569358c1fe0ca0773d","affectsGlobalScope":true,"impliedFormat":1},{"version":"4f0539c58717cbc8b73acb29f9e992ab5ff20adba5f9b57130691c7f9b186a4d","impliedFormat":1},{"version":"7394959e5a741b185456e1ef5d64599c36c60a323207450991e7a42e08911419","impliedFormat":1},{"version":"76103716ba397bbb61f9fa9c9090dca59f39f9047cb1352b2179c5d8e7f4e8d0","impliedFormat":1},{"version":"53eac70430b30089a3a1959d8306b0f9cfaf0de75224b68ef25243e0b5ad1ca3","affectsGlobalScope":true,"impliedFormat":1},{"version":"4314c7a11517e221f7296b46547dbc4df047115b182f544d072bdccffa57fc72","impliedFormat":1},{"version":"115971d64632ea4742b5b115fb64ed04bcaae2c3c342f13d9ba7e3f9ee39c4e7","impliedFormat":1},{"version":"c2510f124c0293ab80b1777c44d80f812b75612f297b9857406468c0f4dafe29","affectsGlobalScope":true,"impliedFormat":1},{"version":"a40826e8476694e90da94aa008283a7de50d1dafd37beada623863f1901cb7fb","impliedFormat":1},{"version":"86956cc2eb9dd371d6fab493d326a574afedebf76eef3fa7833b8e0d9b52d6f1","affectsGlobalScope":true,"impliedFormat":1},{"version":"19d5f8d3930e9f99aa2c36258bf95abbe5adf7e889e6181872d1cdba7c9a7dd5","impliedFormat":1},{"version":"e6f5a38687bebe43a4cef426b69d34373ef68be9a6b1538ec0a371e69f309354","impliedFormat":1},{"version":"a6bf63d17324010ca1fbf0389cab83f93389bb0b9a01dc8a346d092f65b3605f","impliedFormat":1},{"version":"e009777bef4b023a999b2e5b9a136ff2cde37dc3f77c744a02840f05b18be8ff","impliedFormat":1},{"version":"1e0d1f8b0adfa0b0330e028c7941b5a98c08b600efe7f14d2d2a00854fb2f393","impliedFormat":1},{"version":"ee1ee365d88c4c6c0c0a5a5701d66ebc27ccd0bcfcfaa482c6e2e7fe7b98edf7","affectsGlobalScope":true,"impliedFormat":1},{"version":"88bc59b32d0d5b4e5d9632ac38edea23454057e643684c3c0b94511296f2998c","affectsGlobalScope":true,"impliedFormat":1},{"version":"1ff5a53a58e756d2661b73ba60ffe274231a4432d21f7a2d0d9e4f6aa99f4283","impliedFormat":1},{"version":"1e289f30a48126935a5d408a91129a13a59c9b0f8c007a816f9f16ef821e144e","impliedFormat":1},{"version":"2ea254f944dfe131df1264d1fb96e4b1f7d110195b21f1f5dbb68fdd394e5518","impliedFormat":1},{"version":"5135bdd72cc05a8192bd2e92f0914d7fc43ee077d1293dc622a049b7035a0afb","impliedFormat":1},{"version":"4f80de3a11c0d2f1329a72e92c7416b2f7eab14f67e92cac63bb4e8d01c6edc8","impliedFormat":1},{"version":"6d386bc0d7f3afa1d401afc3e00ed6b09205a354a9795196caed937494a713e6","impliedFormat":1},{"version":"b11cb909327c874a4e81bfb390bf0d231e5bf9439052689ab80ba8afa50da17b","affectsGlobalScope":true,"impliedFormat":1},{"version":"23459c1915878a7c1e86e8bdb9c187cddd3aea105b8b1dfce512f093c969bc7e","impliedFormat":1},{"version":"b1b6ee0d012aeebe11d776a155d8979730440082797695fc8e2a5c326285678f","impliedFormat":1},{"version":"45875bcae57270aeb3ebc73a5e3fb4c7b9d91d6b045f107c1d8513c28ece71c0","impliedFormat":1},{"version":"1dc73f8854e5c4506131c4d95b3a6c24d0c80336d3758e95110f4c7b5cb16397","affectsGlobalScope":true,"impliedFormat":1},{"version":"5f6f1d54779d0b9ed152b0516b0958cd34889764c1190434bbf18e7a8bb884cd","affectsGlobalScope":true,"impliedFormat":1},{"version":"3f16a7e4deafa527ed9995a772bb380eb7d3c2c0fd4ae178c5263ed18394db2c","impliedFormat":1},{"version":"c6b4e0a02545304935ecbf7de7a8e056a31bb50939b5b321c9d50a405b5a0bba","impliedFormat":1},{"version":"fab29e6d649aa074a6b91e3bdf2bff484934a46067f6ee97a30fcd9762ae2213","impliedFormat":1},{"version":"8145e07aad6da5f23f2fcd8c8e4c5c13fb26ee986a79d03b0829b8fce152d8b2","impliedFormat":1},{"version":"e1120271ebbc9952fdc7b2dd3e145560e52e06956345e6fdf91d70ca4886464f","impliedFormat":1},{"version":"814118df420c4e38fe5ae1b9a3bafb6e9c2aa40838e528cde908381867be6466","impliedFormat":1},{"version":"1cbae62b67f180291d211f0e1045fb923a8ec800cfbf9caa13223d769013dae2","impliedFormat":1},{"version":"b52d379b4939681f3781d1cfd5b2c3cbb35e7e76f2425172e165782f8a08228c","impliedFormat":1},{"version":"37ba7b45141a45ce6e80e66f2a96c8a5ab1bcef0fc2d0f56bb58df96ec67e972","impliedFormat":1},{"version":"93452d394fdd1dc551ec62f5042366f011a00d342d36d50793b3529bfc9bd633","impliedFormat":1},{"version":"745c4240220559bd340c8aeb6e3c5270a709d3565e934dc22a69c304703956bc","affectsGlobalScope":true,"impliedFormat":1},{"version":"2754d8221d77c7b382096651925eb476f1066b3348da4b73fe71ced7801edada","impliedFormat":1},{"version":"993985beef40c7d113f6dd8f0ba26eed63028b691fbfeb6a5b63f26408dd2c6d","affectsGlobalScope":true,"impliedFormat":1},{"version":"bef91efa0baea5d0e0f0f27b574a8bc100ce62a6d7e70220a0d58af6acab5e89","affectsGlobalScope":true,"impliedFormat":1},{"version":"282fd2a1268a25345b830497b4b7bf5037a5e04f6a9c44c840cb605e19fea841","impliedFormat":1},{"version":"5360a27d3ebca11b224d7d3e38e3e2c63f8290cb1fcf6c3610401898f8e68bc3","impliedFormat":1},{"version":"66ba1b2c3e3a3644a1011cd530fb444a96b1b2dfe2f5e837a002d41a1a799e60","impliedFormat":1},{"version":"7e514f5b852fdbc166b539fdd1f4e9114f29911592a5eb10a94bb3a13ccac3c4","impliedFormat":1},{"version":"7d6ff413e198d25639f9f01f16673e7df4e4bd2875a42455afd4ecc02ef156da","affectsGlobalScope":true,"impliedFormat":1},{"version":"cb094bb347d7df3380299eb69836c2c8758626ecf45917577707c03cf816b6f4","affectsGlobalScope":true,"impliedFormat":1},{"version":"f689c4237b70ae6be5f0e4180e8833f34ace40529d1acc0676ab8fb8f70457d7","impliedFormat":1},{"version":"b02784111b3fc9c38590cd4339ff8718f9329a6f4d3fd66e9744a1dcd1d7e191","impliedFormat":1},{"version":"ac5ed35e649cdd8143131964336ab9076937fa91802ec760b3ea63b59175c10a","impliedFormat":1},{"version":"52a8e7e8a1454b6d1b5ad428efae3870ffc56f2c02d923467f2940c454aa9aec","affectsGlobalScope":true,"impliedFormat":1},{"version":"78dc0513cc4f1642906b74dda42146bcbd9df7401717d6e89ea6d72d12ecb539","impliedFormat":1},{"version":"ad90122e1cb599b3bc06a11710eb5489101be678f2920f2322b0ac3e195af78d","impliedFormat":1}],"root":[[69,71],73,[75,78],[98,104]],"options":{"declaration":true,"esModuleInterop":true,"module":99,"noImplicitAny":true,"noImplicitReturns":true,"noImplicitThis":true,"outDir":"./","sourceMap":true,"strict":true,"target":6},"referencedMap":[[53,1],[149,2],[150,2],[151,3],[110,4],[152,5],[153,6],[154,7],[105,1],[108,8],[106,1],[107,1],[155,9],[156,10],[157,11],[158,12],[159,13],[160,14],[161,14],[163,15],[162,16],[164,17],[165,18],[166,19],[148,20],[109,1],[167,21],[168,22],[169,23],[202,24],[170,25],[171,26],[172,27],[173,28],[174,29],[175,30],[176,31],[177,32],[178,33],[179,34],[180,34],[181,35],[182,1],[183,1],[184,36],[186,37],[185,38],[187,39],[188,40],[189,41],[190,42],[191,43],[192,44],[193,45],[194,46],[195,47],[196,48],[197,49],[198,50],[199,51],[200,52],[201,53],[64,54],[72,55],[79,56],[68,57],[65,54],[66,54],[67,58],[63,1],[74,59],[50,60],[51,60],[54,61],[55,62],[56,63],[57,61],[62,64],[61,65],[58,62],[52,66],[49,67],[59,68],[47,1],[48,67],[60,69],[95,70],[81,70],[89,70],[80,1],[97,71],[91,72],[93,1],[96,73],[84,74],[85,74],[87,74],[83,75],[90,76],[86,74],[82,74],[92,70],[94,77],[88,78],[45,1],[46,1],[8,1],[10,1],[9,1],[2,1],[11,1],[12,1],[13,1],[14,1],[15,1],[16,1],[17,1],[18,1],[3,1],[19,1],[20,1],[4,1],[21,1],[25,1],[22,1],[23,1],[24,1],[26,1],[27,1],[28,1],[5,1],[29,1],[30,1],[31,1],[32,1],[6,1],[36,1],[33,1],[34,1],[35,1],[37,1],[7,1],[38,1],[43,1],[44,1],[39,1],[40,1],[41,1],[42,1],[1,1],[126,79],[136,80],[125,79],[146,81],[117,82],[116,83],[145,84],[139,85],[144,86],[119,87],[133,88],[118,89],[142,90],[114,91],[113,84],[143,92],[115,93],[120,94],[121,1],[124,94],[111,1],[147,95],[137,96],[128,97],[129,98],[131,99],[127,100],[130,101],[140,84],[122,102],[123,103],[132,104],[112,105],[135,96],[134,94],[138,1],[141,106],[71,107],[78,108],[75,109],[70,110],[104,111],[69,107],[76,112],[77,113],[73,107],[100,114],[103,115],[99,116],[102,117],[101,118],[98,114]],"version":"5.7.3"}
@@ -0,0 +1 @@
1
+ export declare const renderNag: (nag: number) => import("snabbdom").VNode | undefined;
@@ -0,0 +1,104 @@
1
+ import { h } from 'snabbdom';
2
+ export const renderNag = (nag) => {
3
+ const glyph = glyphs[nag];
4
+ return glyph ? h('nag', { attrs: { title: glyph.name } }, glyph.symbol) : undefined;
5
+ };
6
+ const glyphs = {
7
+ 1: {
8
+ symbol: '!',
9
+ name: 'Good move',
10
+ },
11
+ 2: {
12
+ symbol: '?',
13
+ name: 'Mistake',
14
+ },
15
+ 3: {
16
+ symbol: '!!',
17
+ name: 'Brilliant move',
18
+ },
19
+ 4: {
20
+ symbol: '??',
21
+ name: 'Blunder',
22
+ },
23
+ 5: {
24
+ symbol: '!?',
25
+ name: 'Interesting move',
26
+ },
27
+ 6: {
28
+ symbol: '?!',
29
+ name: 'Dubious move',
30
+ },
31
+ 7: {
32
+ symbol: '□',
33
+ name: 'Only move',
34
+ },
35
+ 22: {
36
+ symbol: '⨀',
37
+ name: 'Zugzwang',
38
+ },
39
+ 10: {
40
+ symbol: '=',
41
+ name: 'Equal position',
42
+ },
43
+ 13: {
44
+ symbol: '∞',
45
+ name: 'Unclear position',
46
+ },
47
+ 14: {
48
+ symbol: '⩲',
49
+ name: 'White is slightly better',
50
+ },
51
+ 15: {
52
+ symbol: '⩱',
53
+ name: 'Black is slightly better',
54
+ },
55
+ 16: {
56
+ symbol: '±',
57
+ name: 'White is better',
58
+ },
59
+ 17: {
60
+ symbol: '∓',
61
+ name: 'Black is better',
62
+ },
63
+ 18: {
64
+ symbol: '+−',
65
+ name: 'White is winning',
66
+ },
67
+ 19: {
68
+ symbol: '-+',
69
+ name: 'Black is winning',
70
+ },
71
+ 146: {
72
+ symbol: 'N',
73
+ name: 'Novelty',
74
+ },
75
+ 32: {
76
+ symbol: '↑↑',
77
+ name: 'Development',
78
+ },
79
+ 36: {
80
+ symbol: '↑',
81
+ name: 'Initiative',
82
+ },
83
+ 40: {
84
+ symbol: '→',
85
+ name: 'Attack',
86
+ },
87
+ 132: {
88
+ symbol: '⇆',
89
+ name: 'Counterplay',
90
+ },
91
+ 138: {
92
+ symbol: '⊕',
93
+ name: 'Time trouble',
94
+ },
95
+ 44: {
96
+ symbol: '=∞',
97
+ name: 'With compensation',
98
+ },
99
+ 140: {
100
+ symbol: '∆',
101
+ name: 'With the idea',
102
+ },
103
+ };
104
+ //# sourceMappingURL=glyph.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"glyph.js","sourceRoot":"","sources":["../../src/view/glyph.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,UAAU,CAAC;AAE7B,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,GAAW,EAAE,EAAE;IACvC,MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;IAC1B,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,IAAI,EAAE,EAAE,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AACtF,CAAC,CAAC;AAUF,MAAM,MAAM,GAAW;IACrB,CAAC,EAAE;QACD,MAAM,EAAE,GAAG;QACX,IAAI,EAAE,WAAW;KAClB;IACD,CAAC,EAAE;QACD,MAAM,EAAE,GAAG;QACX,IAAI,EAAE,SAAS;KAChB;IACD,CAAC,EAAE;QACD,MAAM,EAAE,IAAI;QACZ,IAAI,EAAE,gBAAgB;KACvB;IACD,CAAC,EAAE;QACD,MAAM,EAAE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ACD,GAAG,EAAE;QACH,MAAM,EAAE,GAAG;QACX,IAAI,EAAE,cAAc;KACrB;IACD,EAAE,EAAE;QACF,MAAM,EAAE,IAAI;QACZ,IAAI,EAAE,mBAAmB;KAC1B;IACD,GAAG,EAAE;QACH,MAAM,EAAE,GAAG;QACX,IAAI,EAAE,eAAe;KACtB;CACF,CAAC"}
@@ -0,0 +1,5 @@
1
+ import PgnViewer from '../pgnViewer';
2
+ import { Config as CgConfig } from 'chessground/config';
3
+ import { VNode } from 'snabbdom';
4
+ export default function view(ctrl: PgnViewer): VNode;
5
+ export declare const makeConfig: (ctrl: PgnViewer, rootEl: HTMLElement) => CgConfig;
@@ -0,0 +1,78 @@
1
+ import { Chessground } from 'chessground';
2
+ import { h } from 'snabbdom';
3
+ import { onInsert } from './util';
4
+ import { onKeyDown, stepwiseScroll } from '../events';
5
+ import { renderMenu, renderControls } from './menu';
6
+ import { renderMoves } from './side';
7
+ import renderPlayer from './player';
8
+ export default function view(ctrl) {
9
+ const opts = ctrl.opts, staticClasses = `lpv.lpv--moves-${opts.showMoves}.lpv--controls-${opts.showControls}${opts.classes ? '.' + opts.classes.replace(' ', '.') : ''}`;
10
+ const showPlayers = opts.showPlayers == 'auto' ? ctrl.game.hasPlayerName() : opts.showPlayers;
11
+ return h(`div.${staticClasses}`, {
12
+ class: {
13
+ 'lpv--menu': ctrl.pane != 'board',
14
+ 'lpv--players': showPlayers,
15
+ },
16
+ attrs: {
17
+ tabindex: 0,
18
+ },
19
+ hook: onInsert(el => {
20
+ ctrl.setGround(Chessground(el.querySelector('.cg-wrap'), makeConfig(ctrl, el)));
21
+ if (opts.keyboardToMove)
22
+ el.addEventListener('keydown', onKeyDown(ctrl));
23
+ }),
24
+ }, [
25
+ showPlayers ? renderPlayer(ctrl, 'top') : undefined,
26
+ renderBoard(ctrl),
27
+ showPlayers ? renderPlayer(ctrl, 'bottom') : undefined,
28
+ opts.showControls ? renderControls(ctrl) : undefined,
29
+ opts.showMoves ? renderMoves(ctrl) : undefined,
30
+ ctrl.pane == 'menu' ? renderMenu(ctrl) : ctrl.pane == 'pgn' ? renderPgnPane(ctrl) : undefined,
31
+ ]);
32
+ }
33
+ const renderBoard = (ctrl) => h('div.lpv__board', {
34
+ hook: onInsert(el => {
35
+ el.addEventListener('click', ctrl.focus);
36
+ if (ctrl.opts.scrollToMove && !('ontouchstart' in window))
37
+ el.addEventListener('wheel', stepwiseScroll((e, scroll) => {
38
+ e.preventDefault();
39
+ if (e.deltaY > 0 && scroll)
40
+ ctrl.goTo('next', false);
41
+ else if (e.deltaY < 0 && scroll)
42
+ ctrl.goTo('prev', false);
43
+ }));
44
+ }),
45
+ }, h('div.cg-wrap'));
46
+ const renderPgnPane = (ctrl) => {
47
+ const blob = new Blob([ctrl.opts.pgn], { type: 'text/plain' });
48
+ return h('div.lpv__pgn.lpv__pane', [
49
+ h('a.lpv__pgn__download.lpv__fbt', {
50
+ attrs: {
51
+ href: window.URL.createObjectURL(blob),
52
+ download: ctrl.opts.menu.getPgn.fileName || `${ctrl.game.title()}.pgn`,
53
+ },
54
+ }, ctrl.translate('download')),
55
+ h('textarea.lpv__pgn__text', ctrl.opts.pgn),
56
+ ]);
57
+ };
58
+ export const makeConfig = (ctrl, rootEl) => ({
59
+ viewOnly: !ctrl.opts.drawArrows,
60
+ addDimensionsCssVarsTo: rootEl,
61
+ drawable: {
62
+ enabled: ctrl.opts.drawArrows,
63
+ visible: true,
64
+ },
65
+ disableContextMenu: ctrl.opts.drawArrows,
66
+ ...(ctrl.opts.chessground || {}),
67
+ movable: {
68
+ free: false,
69
+ },
70
+ draggable: {
71
+ enabled: false,
72
+ },
73
+ selectable: {
74
+ enabled: false,
75
+ },
76
+ ...ctrl.cgState(),
77
+ });
78
+ //# sourceMappingURL=main.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"main.js","sourceRoot":"","sources":["../../src/view/main.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE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KACZ;IACD,SAAS,EAAE;QACT,OAAO,EAAE,KAAK;KACf;IACD,UAAU,EAAE;QACV,OAAO,EAAE,KAAK;KACf;IACD,GAAG,IAAI,CAAC,OAAO,EAAE;CAClB,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import PgnViewer from '../pgnViewer';
2
+ export declare const renderMenu: (ctrl: PgnViewer) => import("snabbdom").VNode;
3
+ export declare const renderControls: (ctrl: PgnViewer) => import("snabbdom").VNode;
@@ -0,0 +1,61 @@
1
+ import { h } from 'snabbdom';
2
+ import { bind, bindMobileMousedown, onInsert } from './util';
3
+ import { eventRepeater } from '../events';
4
+ export const renderMenu = (ctrl) => {
5
+ var _a, _b;
6
+ return h('div.lpv__menu.lpv__pane', [
7
+ h('button.lpv__menu__entry.lpv__menu__flip.lpv__fbt', {
8
+ hook: bind('click', ctrl.flip),
9
+ }, ctrl.translate('flipTheBoard')),
10
+ ((_a = ctrl.opts.menu.analysisBoard) === null || _a === void 0 ? void 0 : _a.enabled)
11
+ ? h('a.lpv__menu__entry.lpv__menu__analysis.lpv__fbt', {
12
+ attrs: {
13
+ href: ctrl.analysisUrl(),
14
+ target: '_blank',
15
+ },
16
+ }, ctrl.translate('analysisBoard'))
17
+ : undefined,
18
+ ((_b = ctrl.opts.menu.practiceWithComputer) === null || _b === void 0 ? void 0 : _b.enabled)
19
+ ? h('a.lpv__menu__entry.lpv__menu__practice.lpv__fbt', {
20
+ attrs: {
21
+ href: ctrl.practiceUrl(),
22
+ target: '_blank',
23
+ },
24
+ }, ctrl.translate('practiceWithComputer'))
25
+ : undefined,
26
+ ctrl.opts.menu.getPgn.enabled
27
+ ? h('button.lpv__menu__entry.lpv__menu__pgn.lpv__fbt', {
28
+ hook: bind('click', ctrl.togglePgn),
29
+ }, ctrl.translate('getPgn'))
30
+ : undefined,
31
+ renderExternalLink(ctrl),
32
+ ]);
33
+ };
34
+ const renderExternalLink = (ctrl) => {
35
+ const link = ctrl.game.metadata.externalLink;
36
+ return (link &&
37
+ h('a.lpv__menu__entry.lpv__fbt', {
38
+ attrs: {
39
+ href: link,
40
+ target: '_blank',
41
+ },
42
+ }, ctrl.translate(ctrl.game.metadata.isLichess ? 'viewOnLichess' : 'viewOnSite')));
43
+ };
44
+ export const renderControls = (ctrl) => h('div.lpv__controls', [
45
+ ctrl.pane == 'board' ? undefined : dirButton(ctrl, 'first', 'step-backward'),
46
+ dirButton(ctrl, 'prev', 'left-open'),
47
+ h('button.lpv__fbt.lpv__controls__menu.lpv__icon', {
48
+ class: {
49
+ active: ctrl.pane != 'board',
50
+ 'lpv__icon-ellipsis-vert': ctrl.pane == 'board',
51
+ },
52
+ hook: bind('click', ctrl.toggleMenu),
53
+ }, ctrl.pane == 'board' ? undefined : 'X'),
54
+ dirButton(ctrl, 'next', 'right-open'),
55
+ ctrl.pane == 'board' ? undefined : dirButton(ctrl, 'last', 'step-forward'),
56
+ ]);
57
+ const dirButton = (ctrl, to, icon) => h(`button.lpv__controls__goto.lpv__controls__goto--${to}.lpv__fbt.lpv__icon.lpv__icon-${icon}`, {
58
+ class: { disabled: ctrl.pane == 'board' && !ctrl.canGoTo(to) },
59
+ hook: onInsert(el => bindMobileMousedown(el, e => eventRepeater(() => ctrl.goTo(to), e))),
60
+ });
61
+ //# sourceMappingURL=menu.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"menu.js","sourceRoot":"","sources":["../../src/view/menu.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,UAAU,CAAC;AAG7B,OAAO,EAAE,IAAI,EAAE,mBAAmB,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE1C,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,IAAe,EAAE,EAAE;;IAC5C,OAAA,CAAC,CAAC,yBAAyB,EAAE;QAC3B,CAAC,CACC,kDAAkD,EAClD;YACE,IAAI,EAAE,IAAI,CAAC,OAAO,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EAAE,CAAC,EAAE,CAAC,mBAAmB,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,aAAa,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;CAC1F,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { VNode } from 'snabbdom';
2
+ import PgnViewer from '../pgnViewer';
3
+ export default function renderPlayer(ctrl: PgnViewer, side: 'top' | 'bottom'): VNode;
@@ -0,0 +1,32 @@
1
+ import { opposite } from 'chessops';
2
+ import { h } from 'snabbdom';
3
+ export default function renderPlayer(ctrl, side) {
4
+ const color = side == 'bottom' ? ctrl.orientation() : opposite(ctrl.orientation());
5
+ const player = ctrl.game.players[color];
6
+ const personEls = [
7
+ player.title ? h('span.lpv__player__title', player.title) : undefined,
8
+ h('span.lpv__player__name', player.name),
9
+ player.rating ? h('span.lpv__player__rating', ['(', player.rating, ')']) : undefined,
10
+ ];
11
+ return h(`div.lpv__player.lpv__player--${side}`, [
12
+ player.isLichessUser
13
+ ? h('a.lpv__player__person.ulpt.user-link', { attrs: { href: `${ctrl.opts.lichess}/@/${player.name}` } }, personEls)
14
+ : h('span.lpv__player__person', personEls),
15
+ ctrl.opts.showClocks ? renderClock(ctrl, color) : undefined,
16
+ ]);
17
+ }
18
+ const renderClock = (ctrl, color) => {
19
+ const move = ctrl.curData();
20
+ const clock = move.clocks && move.clocks[color];
21
+ return typeof clock == undefined
22
+ ? undefined
23
+ : h('div.lpv__player__clock', { class: { active: color == move.turn } }, clockContent(clock));
24
+ };
25
+ const clockContent = (seconds) => {
26
+ if (!seconds && seconds !== 0)
27
+ return ['-'];
28
+ const date = new Date(seconds * 1000), sep = ':', baseStr = pad2(date.getUTCMinutes()) + sep + pad2(date.getUTCSeconds());
29
+ return seconds >= 3600 ? [Math.floor(seconds / 3600) + sep + baseStr] : [baseStr];
30
+ };
31
+ const pad2 = (num) => (num < 10 ? '0' : '') + num;
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-0,0 +1,3 @@
1
+ import { VNode } from 'snabbdom';
2
+ import PgnViewer from '../pgnViewer';
3
+ export declare const renderMoves: (ctrl: PgnViewer) => VNode;
@@ -0,0 +1,102 @@
1
+ import { h } from 'snabbdom';
2
+ import { Path } from '../path';
3
+ import { renderNag } from './glyph';
4
+ export const renderMoves = (ctrl) => h('div.lpv__side', [
5
+ h('div.lpv__moves', {
6
+ hook: {
7
+ insert: vnode => {
8
+ const el = vnode.elm;
9
+ if (!ctrl.path.empty())
10
+ autoScroll(ctrl, el);
11
+ el.addEventListener('mousedown', e => {
12
+ const path = e.target.getAttribute('p');
13
+ if (path)
14
+ ctrl.toPath(new Path(path));
15
+ }, { passive: true });
16
+ },
17
+ postpatch: (_, vnode) => {
18
+ if (ctrl.autoScrollRequested) {
19
+ autoScroll(ctrl, vnode.elm);
20
+ ctrl.autoScrollRequested = false;
21
+ }
22
+ },
23
+ },
24
+ }, [...ctrl.game.initial.comments.map(commentNode), ...makeMoveNodes(ctrl), ...renderResultComment(ctrl)]),
25
+ ]);
26
+ const renderResultComment = (ctrl) => {
27
+ const res = ctrl.game.metadata.result;
28
+ return res && res != '*' ? [h('comment.result', ctrl.game.metadata.result)] : [];
29
+ };
30
+ const emptyMove = () => h('move.empty', '...');
31
+ const indexNode = (turn) => h('index', `${turn}.`);
32
+ const commentNode = (comment) => h('comment', comment);
33
+ const parenOpen = () => h('paren.open', '(');
34
+ const parenClose = () => h('paren.close', ')');
35
+ const moveTurn = (move) => Math.floor((move.ply - 1) / 2) + 1;
36
+ const makeMoveNodes = (ctrl) => {
37
+ const moveDom = renderMove(ctrl);
38
+ const elms = [];
39
+ let node, variations = ctrl.game.moves.children.slice(1);
40
+ if (ctrl.game.initial.pos.turn == 'black' && ctrl.game.mainline[0])
41
+ elms.push(indexNode(ctrl.game.initial.pos.fullmoves), emptyMove());
42
+ while ((node = (node || ctrl.game.moves).children[0])) {
43
+ const move = node.data;
44
+ const oddMove = move.ply % 2 == 1;
45
+ if (oddMove)
46
+ elms.push(indexNode(moveTurn(move)));
47
+ elms.push(moveDom(move));
48
+ const addEmptyMove = oddMove && (variations.length || move.comments.length) && node.children.length;
49
+ if (addEmptyMove)
50
+ elms.push(emptyMove());
51
+ move.comments.forEach(comment => elms.push(commentNode(comment)));
52
+ variations.forEach(variation => elms.push(makeMainVariation(moveDom, variation)));
53
+ if (addEmptyMove)
54
+ elms.push(indexNode(moveTurn(move)), emptyMove());
55
+ variations = node.children.slice(1);
56
+ }
57
+ return elms;
58
+ };
59
+ const makeMainVariation = (moveDom, node) => h('variation', [...node.data.startingComments.map(commentNode), ...makeVariationMoves(moveDom, node)]);
60
+ const makeVariationMoves = (moveDom, node) => {
61
+ let elms = [];
62
+ let variations = [];
63
+ if (node.data.ply % 2 == 0)
64
+ elms.push(h('index', [moveTurn(node.data), '...']));
65
+ do {
66
+ const move = node.data;
67
+ if (move.ply % 2 == 1)
68
+ elms.push(h('index', [moveTurn(move), '.']));
69
+ elms.push(moveDom(move));
70
+ move.comments.forEach(comment => elms.push(commentNode(comment)));
71
+ variations.forEach(variation => {
72
+ elms = [...elms, parenOpen(), ...makeVariationMoves(moveDom, variation), parenClose()];
73
+ });
74
+ variations = node.children.slice(1);
75
+ node = node.children[0];
76
+ } while (node);
77
+ return elms;
78
+ };
79
+ const renderMove = (ctrl) => (move) => h('move', {
80
+ class: {
81
+ current: ctrl.path.equals(move.path),
82
+ ancestor: ctrl.path.contains(move.path),
83
+ good: move.nags.includes(1),
84
+ mistake: move.nags.includes(2),
85
+ brilliant: move.nags.includes(3),
86
+ blunder: move.nags.includes(4),
87
+ interesting: move.nags.includes(5),
88
+ inaccuracy: move.nags.includes(6),
89
+ },
90
+ attrs: {
91
+ p: move.path.path,
92
+ },
93
+ }, [move.san, ...move.nags.map(renderNag)]);
94
+ const autoScroll = (ctrl, cont) => {
95
+ const target = cont.querySelector('.current');
96
+ if (!target) {
97
+ cont.scrollTop = ctrl.path.empty() ? 0 : 99999;
98
+ return;
99
+ }
100
+ cont.scrollTop = target.offsetTop - cont.offsetHeight / 2 + target.offsetHeight;
101
+ };
102
+ //# sourceMappingURL=side.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"side.js","sourceRoot":"","sources":["../../src/view/side.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAS,MAAM,UAAU,CAAC;AAIpC,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEpC,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,IAAe,EAAE,EAAE,CAC7C,CAAC,CAAC,eAAe,EAAE;IACjB,CAAC,CACC,gBAAgB,EAChB;QACE,IAAI,EAAE;YACJ,MAAM,EAAE,KAAK,CAAC,EAAE;gBACd,MAAM,EAAE,GAAG,KAAK,CAAC,GAAkB,CAAC;gBACpC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE;oBAAE,UAAU,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;gBAC7C,EAAE,CAAC,gBAAgB,CACjB,WAAW,EACX,CAAC,CAAC,EAAE;oBACF,MAAM,IAAI,GAAI,CAAC,CAAC,MAAsB,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;oBACzD,IAAI,IAAI;wBAAE,IAAI,CAAC,MAAM,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;gBACxC,CAAC,EACD,EAAE,OAAO,EAAE,IAAI,EAAE,CAClB,CAAC;YACJ,CAAC;YACD,SAAS,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE;gBACtB,IAAI,IAAI,CAAC,mBAAmB,EAAE,CAAC;oBAC7B,UAAU,CAAC,IAAI,EAAE,KAAK,CAAC,GAAkB,CAAC,CAAC;oBAC3C,IAAI,CAAC,mBAAmB,GAAG,KAAK,CAAC;gBACnC,CAAC;YACH,CAAC;SACF;KACF,EACD,CAAC,GAAG,IAAI,CAAC,IAAI,CAA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C,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI;KAClB;CACF,EACD,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,CACxC,CAAC;AAEJ,MAAM,UAAU,GAAG,CAAC,IAAe,EAAE,IAAiB,EAAE,EAAE;IACxD,MAAM,MAAM,GAAG,IAAI,CAAC,aAAa,CAAc,UAAU,CAAC,CAAC;IAC3D,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;QAC/C,OAAO;IACT,CAAC;IACD,IAAI,CAAC,SAAS,GAAG,MAAM,CAAC,SAAS,GAAG,IAAI,CAAC,YAAY,GAAG,CAAC,GAAG,MAAM,CAAC,YAAY,CAAC;AAClF,CAAC,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { Hooks } from 'snabbdom';
2
+ export declare function bindMobileMousedown(el: HTMLElement, f: (e: Event) => unknown, redraw?: () => void): void;
3
+ export declare const bind: <E extends Event>(eventName: string, f: (e: E) => any, redraw?: () => void, passive?: boolean) => Hooks;
4
+ export declare function onInsert<A extends HTMLElement>(f: (element: A) => void): Hooks;
@@ -0,0 +1,23 @@
1
+ export function bindMobileMousedown(el, f, redraw) {
2
+ for (const mousedownEvent of ['touchstart', 'mousedown']) {
3
+ el.addEventListener(mousedownEvent, e => {
4
+ f(e);
5
+ e.preventDefault();
6
+ if (redraw)
7
+ redraw();
8
+ }, { passive: false });
9
+ }
10
+ }
11
+ export const bind = (eventName, f, redraw, passive = true) => onInsert(el => el.addEventListener(eventName, e => {
12
+ const res = f(e);
13
+ if (res === false)
14
+ e.preventDefault();
15
+ redraw === null || redraw === void 0 ? void 0 : redraw();
16
+ return res;
17
+ }, { passive }));
18
+ export function onInsert(f) {
19
+ return {
20
+ insert: vnode => f(vnode.elm),
21
+ };
22
+ }
23
+ //# sourceMappingURL=util.js.map