egatari 0.6.13 → 0.6.15

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 (260) hide show
  1. package/CHANGELOG.md +60 -1
  2. package/README.ja.md +46 -46
  3. package/bin/egatari.mjs +6 -6
  4. package/components.lock.json +507 -153
  5. package/components2.lock.json +1710 -33
  6. package/kit/build.mjs +3 -1
  7. package/kit/check-messages.mjs +23 -8
  8. package/kit/check.mjs +27 -15
  9. package/kit/core/article-messages.mjs +4 -4
  10. package/kit/core/article-render.mjs +1 -1
  11. package/kit/core/article-text.mjs +3 -1
  12. package/kit/core/build-core.mjs +28 -6
  13. package/kit/core/check-parity.mjs +3 -1
  14. package/kit/core/check-rules.mjs +6 -4
  15. package/kit/core/colab-core.mjs +3 -3
  16. package/kit/core/comment-core.mjs +6 -0
  17. package/kit/core/image-size.mjs +35 -0
  18. package/kit/core/layout-scan.mjs +89 -2
  19. package/kit/core/llm-fix.mjs +39 -6
  20. package/kit/core/llm-pack-assemble.mjs +5 -2
  21. package/kit/core/llm-pack-data.mjs +269 -83
  22. package/kit/core/llm-pack.mjs +3 -3
  23. package/kit/core/new-deck.mjs +17 -3
  24. package/kit/core/part-labels.mjs +9 -3
  25. package/kit/core/parts2.mjs +1 -1
  26. package/kit/core/player.mjs +18 -0
  27. package/kit/core/portable.mjs +44 -4
  28. package/kit/core/purposes.mjs +6 -3
  29. package/kit/core/readable-parts.mjs +42 -0
  30. package/kit/core/themes-lock.mjs +1 -1
  31. package/kit/core/tier-a.mjs +14 -2
  32. package/kit/deck.js +49 -2
  33. package/kit/instruction-version.json +1 -1
  34. package/kit/live.js +6 -6
  35. package/kit/player.json +1 -1
  36. package/kit/player.lock.json +2 -2
  37. package/kit/presenter.js +3 -1
  38. package/kit/readable-parts.mjs +25 -0
  39. package/kit/tools.js +11 -4
  40. package/package.json +4 -2
  41. package/server/dev.mjs +7 -6
  42. package/server/editor-ui.js +9 -4
  43. package/server/hints.js +22 -2
  44. package/tts/yomi.yaml +1 -1
  45. package/vendor/components/CATALOG.md +21 -14
  46. package/vendor/components/sha256/000cc8b85d22854d93587d53fe07585e0d9f0abee86d863c5ed1f6c53967912b/README.en.md +40 -0
  47. package/vendor/components/sha256/000cc8b85d22854d93587d53fe07585e0d9f0abee86d863c5ed1f6c53967912b/index.js +408 -0
  48. package/vendor/components/sha256/0396a1895978803ae342b7f598f187b17ead47800e8f8317a5cb041111349813/index.js +278 -0
  49. package/vendor/components/sha256/07b8bfd9240585ee76082632c6f9483017d46ad3c74e509e715c27294970606c/README.en.md +26 -0
  50. package/vendor/components/sha256/07b8bfd9240585ee76082632c6f9483017d46ad3c74e509e715c27294970606c/index.js +322 -0
  51. package/vendor/components/sha256/08778858e2fb42765077b50e08f848089b1d11ea394909a4f611557b94b3acf2/README.en.md +54 -0
  52. package/vendor/components/sha256/08778858e2fb42765077b50e08f848089b1d11ea394909a4f611557b94b3acf2/index.js +470 -0
  53. package/vendor/components/sha256/0a08eb254e59cb306adb32c940ffe54e88efa3c9b7ef05ee021c38995996e742/README.en.md +18 -0
  54. package/vendor/components/sha256/0a08eb254e59cb306adb32c940ffe54e88efa3c9b7ef05ee021c38995996e742/index.js +279 -0
  55. package/vendor/components/sha256/1001b3cfcd3fbc34370accbb37aa550c8cadbb54bf8e8155d417219de3797be9/README.en.md +31 -0
  56. package/vendor/components/sha256/1001b3cfcd3fbc34370accbb37aa550c8cadbb54bf8e8155d417219de3797be9/index.js +267 -0
  57. package/vendor/components/sha256/109c302247e0c62720872be35392a73bea72804b0ed421ef8ced3f030f72e537/README.en.md +53 -0
  58. package/vendor/components/sha256/109c302247e0c62720872be35392a73bea72804b0ed421ef8ced3f030f72e537/index.js +171 -0
  59. package/vendor/components/sha256/1117758820dc561f41cf9d1cc0bab8cf3173cde7771ac10a12b94c96007c0f55/index.js +268 -0
  60. package/vendor/components/sha256/137017ad452afe209bdff81bc02ffae99c6b60a1c4aed2383515974f65511ff2/index.js +205 -0
  61. package/vendor/components/sha256/1a1471ba5f68e54304825a64e736afeda421e3763cdcbcdab2e45509562a0291/index.js +607 -0
  62. package/vendor/components/sha256/1b15fcc12b2fa43821e6299e87aae31aa69dbbc5a0d1b80088a5d7c5f8b8f7f5/index.js +429 -0
  63. package/vendor/components/sha256/1cc1732d052e58f7913ee50c0fc834d896db6b00ba779164de11b442347863db/README.en.md +23 -0
  64. package/vendor/components/sha256/1cc1732d052e58f7913ee50c0fc834d896db6b00ba779164de11b442347863db/index.js +147 -0
  65. package/vendor/components/sha256/21c099461befc0d382ddfe982f2a6cd8eeb6dd731252164ac619525e4bacdf0d/index.js +242 -0
  66. package/vendor/components/sha256/2352e0e22460f4a3c46dca6cef27cd9c63f161a411f1cf56c75c585e9124503c/index.js +315 -0
  67. package/vendor/components/sha256/2564dd8096be4cb3ba43703dc76029c1ba3965b831e430597c754865df4b67f4/README.en.md +53 -0
  68. package/vendor/components/sha256/2564dd8096be4cb3ba43703dc76029c1ba3965b831e430597c754865df4b67f4/index.js +171 -0
  69. package/vendor/components/sha256/2bae0f89ba91574c6ffb654e246365acd9aaf16a7aae92d95e1bad045671fbd2/README.en.md +38 -0
  70. package/vendor/components/sha256/2bae0f89ba91574c6ffb654e246365acd9aaf16a7aae92d95e1bad045671fbd2/index.js +414 -0
  71. package/vendor/components/sha256/2c68c355d60fdc879728c39245b7cf964b193628b63e9ab87df09c6bc2bfa7d3/README.en.md +45 -0
  72. package/vendor/components/sha256/2c68c355d60fdc879728c39245b7cf964b193628b63e9ab87df09c6bc2bfa7d3/index.js +211 -0
  73. package/vendor/components/sha256/2f111b900898579b3ec1611c2110db336a46d9133171a0cbb125ee37bd1f24f8/index.js +592 -0
  74. package/vendor/components/sha256/2fd81df4107ecb28c0dcecfdb3fd8fb9a474b5a7e0aeb16d8c0c6b1275c3a178/README.en.md +45 -0
  75. package/vendor/components/sha256/2fd81df4107ecb28c0dcecfdb3fd8fb9a474b5a7e0aeb16d8c0c6b1275c3a178/index.js +211 -0
  76. package/vendor/components/sha256/337febae1374670413653c453feee7cec169892e130248617c6642a91678564e/README.en.md +20 -0
  77. package/vendor/components/sha256/337febae1374670413653c453feee7cec169892e130248617c6642a91678564e/index.js +310 -0
  78. package/vendor/components/sha256/38f6385118112c679b520909d677935176e0c7aa2183a877324eeb5108606eae/README.en.md +35 -0
  79. package/vendor/components/sha256/38f6385118112c679b520909d677935176e0c7aa2183a877324eeb5108606eae/index.js +179 -0
  80. package/vendor/components/sha256/3af0b84b1799fc64ec74d6da9cbd343eccd89e8a11c81bfb444562c911284442/index.js +342 -0
  81. package/vendor/components/sha256/3c69bf3b3c6b9f76048fbc0839b3aa9699723570086d3d44bac799230ed6de5b/index.js +121 -0
  82. package/vendor/components/sha256/3f2f66da34496213cf6140ae041122c31f13c77e5ee18ad11a3390fbc4a6ecca/README.en.md +37 -0
  83. package/vendor/components/sha256/3f2f66da34496213cf6140ae041122c31f13c77e5ee18ad11a3390fbc4a6ecca/index.js +501 -0
  84. package/vendor/components/sha256/41b82d13037c4597e560cf2b3adebea4495ebb4711a8bb82b1a84495839b8fc8/README.en.md +38 -0
  85. package/vendor/components/sha256/41b82d13037c4597e560cf2b3adebea4495ebb4711a8bb82b1a84495839b8fc8/index.js +414 -0
  86. package/vendor/components/sha256/4220949efd68ff86e73ee6a0920b9f5b53f445cfcd657db72ecb2b55da1cc019/README.en.md +30 -0
  87. package/vendor/components/sha256/4220949efd68ff86e73ee6a0920b9f5b53f445cfcd657db72ecb2b55da1cc019/index.js +305 -0
  88. package/vendor/components/sha256/47f7ea3e2551abb250a9f5883716791026f0f54ae9cca6d82fabdb92478c69ae/README.en.md +31 -0
  89. package/vendor/components/sha256/47f7ea3e2551abb250a9f5883716791026f0f54ae9cca6d82fabdb92478c69ae/index.js +236 -0
  90. package/vendor/components/sha256/4b515bfb3a39a6c1e2b04f235affc5bc84e74d80bfd7f9e6d9b5d84d0a9eeb57/README.en.md +21 -0
  91. package/vendor/components/sha256/4b515bfb3a39a6c1e2b04f235affc5bc84e74d80bfd7f9e6d9b5d84d0a9eeb57/index.js +108 -0
  92. package/vendor/components/sha256/4e7ba7759ddebfa5432b733e5f10abfd336ef7d6cc4d46305d5ff7d00ed3a423/README.en.md +28 -0
  93. package/vendor/components/sha256/4e7ba7759ddebfa5432b733e5f10abfd336ef7d6cc4d46305d5ff7d00ed3a423/index.js +213 -0
  94. package/vendor/components/sha256/52149f061935e65502b8353cf70285bba93ab24451d2daac26b994d3901d3864/README.en.md +35 -0
  95. package/vendor/components/sha256/52149f061935e65502b8353cf70285bba93ab24451d2daac26b994d3901d3864/index.js +179 -0
  96. package/vendor/components/sha256/5644e63364f46ee53d5f8623355149753147cdc4720e4c66fc9b8a32627e68a5/README.en.md +53 -0
  97. package/vendor/components/sha256/5644e63364f46ee53d5f8623355149753147cdc4720e4c66fc9b8a32627e68a5/index.js +171 -0
  98. package/vendor/components/sha256/5662bea8cc48f484ccf14c5a8ac12d64b2c5ab032a26176d133ed3a8eb33a557/fixtures/ABCJS-ADAPTER.md +101 -0
  99. package/vendor/components/sha256/5662bea8cc48f484ccf14c5a8ac12d64b2c5ab032a26176d133ed3a8eb33a557/fixtures/LICENSE-abcjs.txt +21 -0
  100. package/vendor/components/sha256/5662bea8cc48f484ccf14c5a8ac12d64b2c5ab032a26176d133ed3a8eb33a557/fixtures/chords.json +89 -0
  101. package/vendor/components/sha256/5662bea8cc48f484ccf14c5a8ac12d64b2c5ab032a26176d133ed3a8eb33a557/fixtures/doremi.json +261 -0
  102. package/vendor/components/sha256/5662bea8cc48f484ccf14c5a8ac12d64b2c5ab032a26176d133ed3a8eb33a557/fixtures/extras.json +192 -0
  103. package/vendor/components/sha256/5662bea8cc48f484ccf14c5a8ac12d64b2c5ab032a26176d133ed3a8eb33a557/fixtures/kaeru.json +521 -0
  104. package/vendor/components/sha256/5662bea8cc48f484ccf14c5a8ac12d64b2c5ab032a26176d133ed3a8eb33a557/fixtures/rhythm.json +248 -0
  105. package/vendor/components/sha256/5662bea8cc48f484ccf14c5a8ac12d64b2c5ab032a26176d133ed3a8eb33a557/fixtures/ties.json +360 -0
  106. package/vendor/components/sha256/5662bea8cc48f484ccf14c5a8ac12d64b2c5ab032a26176d133ed3a8eb33a557/index.js +508 -0
  107. package/vendor/components/sha256/59996a56df462b36e24a928d4397c9308d9e39ad8224ebd19fb5c981608ef458/index.js +521 -0
  108. package/vendor/components/sha256/5afcaf27e9209a32a8a8e6667b637ea434326b76f563689552716de953c94a98/README.en.md +30 -0
  109. package/vendor/components/sha256/5afcaf27e9209a32a8a8e6667b637ea434326b76f563689552716de953c94a98/index.js +305 -0
  110. package/vendor/components/sha256/5cf9baec12bac716d9218d6fbc4f95446adf31658da62564aa403bb5bdee542e/README.en.md +30 -0
  111. package/vendor/components/sha256/5cf9baec12bac716d9218d6fbc4f95446adf31658da62564aa403bb5bdee542e/index.js +192 -0
  112. package/vendor/components/sha256/5ffac218340cc51ce842a530f6021fc916090376b243e2ad5d4c0ef48a040ce9/README.en.md +20 -0
  113. package/vendor/components/sha256/5ffac218340cc51ce842a530f6021fc916090376b243e2ad5d4c0ef48a040ce9/index.js +307 -0
  114. package/vendor/components/sha256/6084fd3102b7d450db3804120ac27aa585ab44937734d980fb50c51f39fc98a7/README.en.md +24 -0
  115. package/vendor/components/sha256/6084fd3102b7d450db3804120ac27aa585ab44937734d980fb50c51f39fc98a7/index.js +554 -0
  116. package/vendor/components/sha256/60e3e41c34034e16f9f7ee9ce6c8d669ebb753614989fc2e5e181ef295e83631/README.en.md +25 -0
  117. package/vendor/components/sha256/60e3e41c34034e16f9f7ee9ce6c8d669ebb753614989fc2e5e181ef295e83631/index.js +316 -0
  118. package/vendor/components/sha256/6156a8a03235e1ed92d3cd3ba1f40df86667059003d82e47297bd3917ef562b8/README.en.md +18 -0
  119. package/vendor/components/sha256/6156a8a03235e1ed92d3cd3ba1f40df86667059003d82e47297bd3917ef562b8/index.js +279 -0
  120. package/vendor/components/sha256/624acb997c4975ace65570b529b3ba00baa421c80ecb7fc80f392a64e8c573a7/index.js +107 -0
  121. package/vendor/components/sha256/62602488ee33dd4bdef8516de16da5ab27d7f7265d5041681beab80e08f1d482/index.js +97 -0
  122. package/vendor/components/sha256/67eaf344bddac79b74ed03fdcd70285c7b52b160e6c5ffbd6897848179aa5230/index.js +818 -0
  123. package/vendor/components/sha256/682c9c8871eccd19ff1264e0323a2e4c5798b0488b612ba0339c6fe85aab5914/index.js +926 -0
  124. package/vendor/components/sha256/6937967bbf62098aca7cef99f14f97fa11c861a12da6a1d8fe5fa55a6b4551f2/README.en.md +51 -0
  125. package/vendor/components/sha256/6937967bbf62098aca7cef99f14f97fa11c861a12da6a1d8fe5fa55a6b4551f2/index.js +230 -0
  126. package/vendor/components/sha256/72138936ed0b8fd3cb0214ae7ed250ae3f1f8b21ed6fd593544947774064ba0d/index.js +250 -0
  127. package/vendor/components/sha256/74c1a0f3ed1370c5003aa5770ee28cea2ce994d415680116a92fdbcd5854ba62/index.js +198 -0
  128. package/vendor/components/sha256/76125035eb153b98befa9c735bcd9fc4f99f774dc1d082fdae40acaadfe7d95b/index.js +818 -0
  129. package/vendor/components/sha256/7728cf7dde88a6688aba0ed70f23f7e21362a147beac09c1fa1a4b773e08e93b/index.js +354 -0
  130. package/vendor/components/sha256/7822f137d446604a83c1dbc3b40fdb455001dc55da12276ff3e7079d270dd143/README.en.md +23 -0
  131. package/vendor/components/sha256/7822f137d446604a83c1dbc3b40fdb455001dc55da12276ff3e7079d270dd143/index.js +289 -0
  132. package/vendor/components/sha256/7c2b93508a09a5dd36639ab1329ca6d00487b326c53db436b14295174dc03369/README.en.md +31 -0
  133. package/vendor/components/sha256/7c2b93508a09a5dd36639ab1329ca6d00487b326c53db436b14295174dc03369/index.js +236 -0
  134. package/vendor/components/sha256/7d50e50fbb6c5ec636b62509bd88ddaac1870e0522cf11bcc293ce924d48072d/index.js +312 -0
  135. package/vendor/components/sha256/82ffee434e7f2213031190f832f3a75a8cdf59554fdbc092c0b079d6b0753cad/README.en.md +42 -0
  136. package/vendor/components/sha256/82ffee434e7f2213031190f832f3a75a8cdf59554fdbc092c0b079d6b0753cad/index.js +549 -0
  137. package/vendor/components/sha256/87fc302c41b2bfeea88951ed689ec01b4dc79218c4bc69b310dc2228dfa2e153/index.js +926 -0
  138. package/vendor/components/sha256/8886ccd82d68dc1bbf5b7ffcef746074ce8a3d26414d55691dc5e691e4976ded/README.en.md +24 -0
  139. package/vendor/components/sha256/8886ccd82d68dc1bbf5b7ffcef746074ce8a3d26414d55691dc5e691e4976ded/index.js +103 -0
  140. package/vendor/components/sha256/89c8c16788e24df17920542ed6eb6557dea4a10e835de8fe839e439ccbba8014/index.js +69 -0
  141. package/vendor/components/sha256/8beed7e471fa0d6b801b5c540f69ab77220e228c58ff16b0bc2b1a6eef30800e/README.en.md +44 -0
  142. package/vendor/components/sha256/8beed7e471fa0d6b801b5c540f69ab77220e228c58ff16b0bc2b1a6eef30800e/index.js +304 -0
  143. package/vendor/components/sha256/8d9af78aef44ad2f98101c67d32473373d39725a09c923969aa621d5f5b124bb/index.js +121 -0
  144. package/vendor/components/sha256/8f861d71df72a82be86a3e63abf7d69bbab5aac6fa68be6e077c4e19c3519ed8/index.js +312 -0
  145. package/vendor/components/sha256/90415da5ad04e1944258e29c929c5de65c8152c829414e911ba55a84ac89f348/README.en.md +54 -0
  146. package/vendor/components/sha256/90415da5ad04e1944258e29c929c5de65c8152c829414e911ba55a84ac89f348/index.js +470 -0
  147. package/vendor/components/sha256/91a1e0e48e20cac705cbe6e33e66a24a2851b1dc88c5164ed906bcecba4d943f/README.en.md +24 -0
  148. package/vendor/components/sha256/91a1e0e48e20cac705cbe6e33e66a24a2851b1dc88c5164ed906bcecba4d943f/index.js +214 -0
  149. package/vendor/components/sha256/91a9353a0c3b3744765944783aa1537b3f6ff1677c67caede643cdf2f52289cf/README.en.md +33 -0
  150. package/vendor/components/sha256/91a9353a0c3b3744765944783aa1537b3f6ff1677c67caede643cdf2f52289cf/index.js +390 -0
  151. package/vendor/components/sha256/9289efef4a75afe011e54a17e34db08cfb16a450b2e0653e6a98525495cfba99/index.js +315 -0
  152. package/vendor/components/sha256/93256a923199ea51108cdb7491c3c96f376dbef15b64cbf1a1aa7cc5726b4970/index.js +429 -0
  153. package/vendor/components/sha256/94f4891971b26f5bc157ef9f7f630b1528fc7e2a4c63e84e01951a5a3f94cedc/README.en.md +24 -0
  154. package/vendor/components/sha256/94f4891971b26f5bc157ef9f7f630b1528fc7e2a4c63e84e01951a5a3f94cedc/index.js +550 -0
  155. package/vendor/components/sha256/94f4f798fdd070fc1693494e772ff479d3e694a07a0c97b6e97c3b3895cad478/README.en.md +28 -0
  156. package/vendor/components/sha256/94f4f798fdd070fc1693494e772ff479d3e694a07a0c97b6e97c3b3895cad478/index.js +213 -0
  157. package/vendor/components/sha256/95583538da2982ec5f508217a8f2821796e6a34cf755baa66f2aaeb1c6dae814/README.en.md +40 -0
  158. package/vendor/components/sha256/95583538da2982ec5f508217a8f2821796e6a34cf755baa66f2aaeb1c6dae814/index.js +348 -0
  159. package/vendor/components/sha256/97c074a5473618c65f4c23263f056870a0b7940e73475f2a1f32f68c08d8eb0f/index.js +198 -0
  160. package/vendor/components/sha256/98e1957b1fac2d55d9bfa6a0990ead6a2730d571c988055ca280df05a0e9ea37/README.en.md +66 -0
  161. package/vendor/components/sha256/98e1957b1fac2d55d9bfa6a0990ead6a2730d571c988055ca280df05a0e9ea37/index.js +984 -0
  162. package/vendor/components/sha256/99a26795f8b351ade4a4cbbea845aeb149c96b09fe96151edda57128082185fa/README.en.md +34 -0
  163. package/vendor/components/sha256/99a26795f8b351ade4a4cbbea845aeb149c96b09fe96151edda57128082185fa/index.js +244 -0
  164. package/vendor/components/sha256/a18b2b15d00c76462a43823b5c270c7ddd7c31794da9c236f74f20f80ec2ffdb/index.js +354 -0
  165. package/vendor/components/sha256/a744049fc56e0a5d5b1638bef597a4e65f99d0776a35d830a389f216f314f1bc/README.en.md +32 -0
  166. package/vendor/components/sha256/a744049fc56e0a5d5b1638bef597a4e65f99d0776a35d830a389f216f314f1bc/index.js +222 -0
  167. package/vendor/components/sha256/a979207c60fbd2a12cb557297eb0217eb098d660de684530a0f43d0d9c64e6ef/index.js +312 -0
  168. package/vendor/components/sha256/aba898152e40ca44e1e7bea22242bd6897a31e0254cbfd70e426907b65379af2/README.en.md +34 -0
  169. package/vendor/components/sha256/aba898152e40ca44e1e7bea22242bd6897a31e0254cbfd70e426907b65379af2/index.js +244 -0
  170. package/vendor/components/sha256/af7ed69b8969f6da14784b6e9d26e4dfd20147772ea172a99bd936a71be10fcd/index.js +278 -0
  171. package/vendor/components/sha256/b08a536a07498629c026f8fc2962acda791c83a99268ac715db5e764087000e2/fixtures/ABCJS-ADAPTER.md +101 -0
  172. package/vendor/components/sha256/b08a536a07498629c026f8fc2962acda791c83a99268ac715db5e764087000e2/fixtures/LICENSE-abcjs.txt +21 -0
  173. package/vendor/components/sha256/b08a536a07498629c026f8fc2962acda791c83a99268ac715db5e764087000e2/fixtures/chords.json +89 -0
  174. package/vendor/components/sha256/b08a536a07498629c026f8fc2962acda791c83a99268ac715db5e764087000e2/fixtures/doremi.json +261 -0
  175. package/vendor/components/sha256/b08a536a07498629c026f8fc2962acda791c83a99268ac715db5e764087000e2/fixtures/extras.json +192 -0
  176. package/vendor/components/sha256/b08a536a07498629c026f8fc2962acda791c83a99268ac715db5e764087000e2/fixtures/kaeru.json +521 -0
  177. package/vendor/components/sha256/b08a536a07498629c026f8fc2962acda791c83a99268ac715db5e764087000e2/fixtures/rhythm.json +248 -0
  178. package/vendor/components/sha256/b08a536a07498629c026f8fc2962acda791c83a99268ac715db5e764087000e2/fixtures/ties.json +360 -0
  179. package/vendor/components/sha256/b08a536a07498629c026f8fc2962acda791c83a99268ac715db5e764087000e2/index.js +508 -0
  180. package/vendor/components/sha256/b28d136dffb03a3e855b2ff959712a143da9a84c3a4fd13a1126d7711083a2d6/README.en.md +66 -0
  181. package/vendor/components/sha256/b28d136dffb03a3e855b2ff959712a143da9a84c3a4fd13a1126d7711083a2d6/index.js +990 -0
  182. package/vendor/components/sha256/b2d9c417f258745c56c04e05dc9463a412a4978d46c3ffff2556f0b0fafbbfc2/README.en.md +24 -0
  183. package/vendor/components/sha256/b2d9c417f258745c56c04e05dc9463a412a4978d46c3ffff2556f0b0fafbbfc2/index.js +550 -0
  184. package/vendor/components/sha256/b8096d7a60609520981273673761a110e40e3bdf52a7ab5548363b20e16f6e93/index.js +404 -0
  185. package/vendor/components/sha256/b9e27e84b2c534b87d6da5da30ee808d7863cbd1b818082b4c11d1f8b7129b1a/README.en.md +32 -0
  186. package/vendor/components/sha256/b9e27e84b2c534b87d6da5da30ee808d7863cbd1b818082b4c11d1f8b7129b1a/index.js +222 -0
  187. package/vendor/components/sha256/bd8e3893df02411deccc1d6d7b02292ca0d59dfeddfafcf99419430981572c82/index.js +351 -0
  188. package/vendor/components/sha256/c201dbc3f1f790c59cc010b3be3566daa9085754614402e9dc1296dba9e87769/fixtures/ABCJS-ADAPTER.md +101 -0
  189. package/vendor/components/sha256/c201dbc3f1f790c59cc010b3be3566daa9085754614402e9dc1296dba9e87769/fixtures/LICENSE-abcjs.txt +21 -0
  190. package/vendor/components/sha256/c201dbc3f1f790c59cc010b3be3566daa9085754614402e9dc1296dba9e87769/fixtures/chords.json +89 -0
  191. package/vendor/components/sha256/c201dbc3f1f790c59cc010b3be3566daa9085754614402e9dc1296dba9e87769/fixtures/doremi.json +261 -0
  192. package/vendor/components/sha256/c201dbc3f1f790c59cc010b3be3566daa9085754614402e9dc1296dba9e87769/fixtures/extras.json +192 -0
  193. package/vendor/components/sha256/c201dbc3f1f790c59cc010b3be3566daa9085754614402e9dc1296dba9e87769/fixtures/kaeru.json +521 -0
  194. package/vendor/components/sha256/c201dbc3f1f790c59cc010b3be3566daa9085754614402e9dc1296dba9e87769/fixtures/rhythm.json +248 -0
  195. package/vendor/components/sha256/c201dbc3f1f790c59cc010b3be3566daa9085754614402e9dc1296dba9e87769/fixtures/ties.json +360 -0
  196. package/vendor/components/sha256/c201dbc3f1f790c59cc010b3be3566daa9085754614402e9dc1296dba9e87769/index.js +508 -0
  197. package/vendor/components/sha256/c5226220649a5854d56ceeaea16722fe54a79b4197f71c51c4e1523bf22bec32/README.en.md +31 -0
  198. package/vendor/components/sha256/c5226220649a5854d56ceeaea16722fe54a79b4197f71c51c4e1523bf22bec32/index.js +267 -0
  199. package/vendor/components/sha256/c691f9c83d06502bf20f86df02ee5a516063d6af1e9ee8204aad8fd8c1a44a71/LICENSE-strokesvg.txt +115 -0
  200. package/vendor/components/sha256/c691f9c83d06502bf20f86df02ee5a516063d6af1e9ee8204aad8fd8c1a44a71/OFL.txt +93 -0
  201. package/vendor/components/sha256/c691f9c83d06502bf20f86df02ee5a516063d6af1e9ee8204aad8fd8c1a44a71/index.js +749 -0
  202. package/vendor/components/sha256/c691f9c83d06502bf20f86df02ee5a516063d6af1e9ee8204aad8fd8c1a44a71/strokes-CHANGES.md +20 -0
  203. package/vendor/components/sha256/c791e69e722f64146242f97acb29a341160d0c327cfe1d76307954d80e70db85/index.js +268 -0
  204. package/vendor/components/sha256/c8c0de41d603b61c6ec4dc1da5b50559e213dd1f3693ee5019df858016fd6daf/index.js +747 -0
  205. package/vendor/components/sha256/c99d4f2ab443484b9f462e405c72ea4794838b88f8823f27c606d12cbbedb996/index.js +404 -0
  206. package/vendor/components/sha256/cbde046e30c35db60259911a88e2ae0bedaf545e29b1da8b8ce13bc602a33c19/index.js +465 -0
  207. package/vendor/components/sha256/ccdd16ed76838ac9d6abb4ee695769bfecb802ae490ac91914ed68131ad04434/README.en.md +51 -0
  208. package/vendor/components/sha256/ccdd16ed76838ac9d6abb4ee695769bfecb802ae490ac91914ed68131ad04434/index.js +228 -0
  209. package/vendor/components/sha256/ce0a52fa13ae579020d1172845647daee9ba78e070736e47740f2d2feabffe7e/README.en.md +35 -0
  210. package/vendor/components/sha256/ce0a52fa13ae579020d1172845647daee9ba78e070736e47740f2d2feabffe7e/index.js +179 -0
  211. package/vendor/components/sha256/cf0985ffcd8e7cbe2175ddb9a4342b2a4aa3f322794188fc99af8789b494460d/index.js +521 -0
  212. package/vendor/components/sha256/cff7ed8a0e0708bcef2e13105b28810bda867251a9f205ad9c2f1a5b4f759866/LICENSE-strokesvg.txt +115 -0
  213. package/vendor/components/sha256/cff7ed8a0e0708bcef2e13105b28810bda867251a9f205ad9c2f1a5b4f759866/OFL.txt +93 -0
  214. package/vendor/components/sha256/cff7ed8a0e0708bcef2e13105b28810bda867251a9f205ad9c2f1a5b4f759866/index.js +749 -0
  215. package/vendor/components/sha256/cff7ed8a0e0708bcef2e13105b28810bda867251a9f205ad9c2f1a5b4f759866/strokes-CHANGES.md +20 -0
  216. package/vendor/components/sha256/d01dc7fd78d08dd720ed86b39d7877dc0913d72e914036088a86af2df2faee52/index.js +484 -0
  217. package/vendor/components/sha256/d448fec2aeb436f187875c493b1592b373c6a18274ffc64231dbe3f1b54f8cbc/README.en.md +24 -0
  218. package/vendor/components/sha256/d448fec2aeb436f187875c493b1592b373c6a18274ffc64231dbe3f1b54f8cbc/index.js +214 -0
  219. package/vendor/components/sha256/d4aa3ffb394d5db7f47081b1818958547fe164bb968df03131f9400c103b97c4/README.en.md +31 -0
  220. package/vendor/components/sha256/d4aa3ffb394d5db7f47081b1818958547fe164bb968df03131f9400c103b97c4/index.js +271 -0
  221. package/vendor/components/sha256/d582d02ceeaf1ec4d94115b806852ddb66c009788e67728ae0e08cb8d29ca546/README.en.md +25 -0
  222. package/vendor/components/sha256/d582d02ceeaf1ec4d94115b806852ddb66c009788e67728ae0e08cb8d29ca546/index.js +316 -0
  223. package/vendor/components/sha256/d75ab2c8f6c01082bfcaeaba44290367d6b49654e2bf538422b7b3e499de9acf/README.en.md +23 -0
  224. package/vendor/components/sha256/d75ab2c8f6c01082bfcaeaba44290367d6b49654e2bf538422b7b3e499de9acf/index.js +120 -0
  225. package/vendor/components/sha256/d8f5272dac33066a04ecefa9a828ca11d18dec581866899f55433573ba4472d6/README.en.md +40 -0
  226. package/vendor/components/sha256/d8f5272dac33066a04ecefa9a828ca11d18dec581866899f55433573ba4472d6/index.js +405 -0
  227. package/vendor/components/sha256/dd1ff8de877573e30635928e9abce0b1fba8dfc95a079eca86703a884d3c3d59/README.en.md +66 -0
  228. package/vendor/components/sha256/dd1ff8de877573e30635928e9abce0b1fba8dfc95a079eca86703a884d3c3d59/index.js +984 -0
  229. package/vendor/components/sha256/ddd4b9cbbc282cbb3117ff662e1a14ecdb3cc7c16072a574418ec6a6eecef4d8/index.js +107 -0
  230. package/vendor/components/sha256/e24a4235a661bfda4049e1c72b6c376066fcc65e27a2bdfe77942a3394726c81/README.en.md +22 -0
  231. package/vendor/components/sha256/e24a4235a661bfda4049e1c72b6c376066fcc65e27a2bdfe77942a3394726c81/index.js +145 -0
  232. package/vendor/components/sha256/e2da948daac7bfac158857877b5a6932dbd2369e73901abcef118c92dd20b725/index.js +747 -0
  233. package/vendor/components/sha256/e40201a655bf5c556d70fbf45b5052dd48c33fc8030b331a9d9cbc96913d02a6/README.en.md +42 -0
  234. package/vendor/components/sha256/e40201a655bf5c556d70fbf45b5052dd48c33fc8030b331a9d9cbc96913d02a6/index.js +268 -0
  235. package/vendor/components/sha256/e653a4da80f7761442dc5b504ea5b0700fd0acf1979beeff56122cfdb3d4654c/index.js +607 -0
  236. package/vendor/components/sha256/ea217c6821e931b2d8474bf56d38f2dcc89ec705fe1d276f313e1c7e8db2b98a/index.js +233 -0
  237. package/vendor/components/sha256/ea2e4e24838574f607879c7d05556281258c018331e4da3e6f3a5263173f2e99/index.js +75 -0
  238. package/vendor/components/sha256/eb0b402dc4738b2dca2918c7f64a4d6fc3c27b4ba419270bbe8240a3c8a77f0c/README.en.md +42 -0
  239. package/vendor/components/sha256/eb0b402dc4738b2dca2918c7f64a4d6fc3c27b4ba419270bbe8240a3c8a77f0c/index.js +549 -0
  240. package/vendor/components/sha256/f219b47f32b0a78e8f8f5dac83596acfed24dd6e8bfe3f05f8ebfb9582d64485/README.en.md +44 -0
  241. package/vendor/components/sha256/f219b47f32b0a78e8f8f5dac83596acfed24dd6e8bfe3f05f8ebfb9582d64485/index.js +203 -0
  242. package/vendor/components/sha256/f4204773037ae296786e3614b5bfd7487b0f5ba6d5cf92ce20262bb7613e1b6b/README.en.md +34 -0
  243. package/vendor/components/sha256/f4204773037ae296786e3614b5bfd7487b0f5ba6d5cf92ce20262bb7613e1b6b/index.js +244 -0
  244. package/vendor/components/sha256/fa1a09c10181456143d125d68dbbdcacde6bab2e4a2b3e573367103ce28ebf55/index.js +228 -0
  245. package/vendor/components/sha256/fa9c9f63d74a514636961bcb8af75063e00e39bdf85655ecf5d4d7bbc05a831a/README.en.md +51 -0
  246. package/vendor/components/sha256/fa9c9f63d74a514636961bcb8af75063e00e39bdf85655ecf5d4d7bbc05a831a/index.js +228 -0
  247. package/vendor/components/sha256/facebe095849528396ee91d7d6856cb6945ba89ca8b1f34dce488dccb29e9d40/README.en.md +23 -0
  248. package/vendor/components/sha256/facebe095849528396ee91d7d6856cb6945ba89ca8b1f34dce488dccb29e9d40/index.js +147 -0
  249. package/vendor/components/sha256/fb0a77a344098c53cc90215685cee32b0d31362a1de5b5ac0eee422ed2c3c430/README.en.md +20 -0
  250. package/vendor/components/sha256/fb0a77a344098c53cc90215685cee32b0d31362a1de5b5ac0eee422ed2c3c430/index.js +307 -0
  251. package/vendor/components/sha256/fc48e703adab4715157f8dbb0e33c8b5c00099358ae522484290a7098fda2910/README.en.md +26 -0
  252. package/vendor/components/sha256/fc48e703adab4715157f8dbb0e33c8b5c00099358ae522484290a7098fda2910/index.js +322 -0
  253. package/vendor/components-2/manifest-2.12.0.json +2348 -0
  254. package/vendor/components-2/manifest-2.13.0.json +2477 -0
  255. package/vendor/components-2/manifest-2.14.0.json +2460 -0
  256. package/vendor/components-2/manifest-2.14.1.json +2460 -0
  257. package/vendor/components-2/manifest-2.15.0.json +2460 -0
  258. package/vendor/egatari-spec/SOURCE.json +3 -3
  259. package/vendor/egatari-spec/schema/deck-meta.schema.json +15 -0
  260. package/vendor/egatari-spec/schema/egatari-metadata.schema.json +15 -0
@@ -0,0 +1,316 @@
1
+ // m-vector:平面のベクトルと 2 × 2 の行列。座標平面にベクトルを描き、和・差・スカラー倍・正射影・内積を 1 ステップずつ、
2
+ // 行列の 1 次変換(格子と単位正方形が I から M へ動く。固有ベクトルの向きは変わらない。面積は |det|)と、基底の取り替えを見せる。
3
+ // 2 次元の計算はパーツがする(書いた value は計算と比べて確かめる)。右の欄に、ステップごとの式を 1 行ずつ足す。
4
+ // <m-vector style="height:440px"><script type="application/json">
5
+ // {"range": [-4, 4, -3, 3], "vectors": [{"id": "a", "v": [2, 1], "label": "*a*"}, {"id": "b", "v": [-1, 2], "label": "*b*"}],
6
+ // "ops": [{"sum": ["a", "b"], "as": "c", "label": "*a* + *b*"}, {"dot": ["a", "b"]}]}
7
+ // (JSON の終わり)</m-vector>
8
+ // 色:ベクトル --term、そのステップの結果 --emph、補助の線(平行移動・垂線)--muted の破線、変換した格子・新しい基底 --accent2、
9
+ // 固有ベクトルの向き --emph の破線。
10
+ egatariParts.define({name: "vector", version: "2.0.0", requires: {base: "1.2.0"}, element: "m-vector"}, function(deps){
11
+ "use strict";
12
+ var base = deps.base, D = base, clipN = 0;
13
+ var NUM = {type: "number"}, V2 = {type: "array", minItems: 2, maxItems: 2, items: NUM}, ID = {type: "string"};
14
+ var T = {
15
+ ja: {proj: function(a, b){ return a + " の " + b + " への正射影"; }, det: function(d){ return "det *M* = " + d + "(単位正方形の面積が " + d.replace(/^−/, "") + " 倍" + (d.indexOf("−") === 0 ? "、向きが裏返る" : "") + ")"; },
16
+ eigen: function(l){ return "固有値 " + l.join("、") + "(固有ベクトルの向きは変わらない)"; }, complex: "固有値は複素数(向きの変わらないベクトルはない)",
17
+ basis: function(b1, b2){ return "新しい基底 " + b1 + "、" + b2; }, inBasis: function(lab, s){ return lab + " = " + s; }, area: function(d){ return "面積 " + d; }},
18
+ en: {proj: function(a, b){ return "proj of " + a + " onto " + b; }, det: function(d){ return "det *M* = " + d + " (the unit square's area × " + d.replace(/^−/, "") + (d.indexOf("−") === 0 ? ", flipped" : "") + ")"; },
19
+ eigen: function(l){ return "eigenvalues " + l.join(", ") + " (eigenvectors keep their direction)"; }, complex: "complex eigenvalues (no direction is kept)",
20
+ basis: function(b1, b2){ return "new basis " + b1 + ", " + b2; }, inBasis: function(lab, s){ return lab + " = " + s; }, area: function(d){ return "area " + d; }}
21
+ };
22
+ // 数の字:小数 2 桁まで、末尾の 0 は書かない、負号は −
23
+ function num(v){ var r = Math.round(v * 100) / 100; if (Object.is(r, -0) || Math.abs(r) < 1e-12) r = 0; return (r < 0 ? "−" : "") + String(Math.abs(r)); }
24
+ function pair(v){ return "(" + num(v[0]) + ", " + num(v[1]) + ")"; }
25
+ function paren(v){ var s = num(v); return v < 0 ? "(" + s + ")" : s; }
26
+ function mul(M, v){ return [M[0][0] * v[0] + M[0][1] * v[1], M[1][0] * v[0] + M[1][1] * v[1]]; }
27
+ function dec(v){ var s = String(v).split(".")[1]; return s ? s.length : 0; }
28
+ return class extends base.MotionElement {
29
+ static partName = "vector";
30
+ static preview = "none";
31
+ static shape = {schema: {type: "object", additionalProperties: false, required: ["vectors"], properties: {
32
+ range: {type: "array", minItems: 4, maxItems: 4, items: NUM},
33
+ vectors: {type: "array", minItems: 1, maxItems: 6, items: {type: "object", additionalProperties: false, required: ["id", "v"], properties: {id: ID, v: V2, label: {type: "string"}, from: V2}}},
34
+ ops: {type: "array", maxItems: 8, items: {type: "object", additionalProperties: false, anyOf: [{required: ["sum"]}, {required: ["diff"]}, {required: ["scale"]}, {required: ["proj"]}, {required: ["dot"]}], properties: {
35
+ sum: {type: "array", minItems: 2, maxItems: 2, items: ID}, diff: {type: "array", minItems: 2, maxItems: 2, items: ID},
36
+ scale: {type: "array", minItems: 2, maxItems: 2, items: {type: ["string", "number"]}}, proj: {type: "array", minItems: 2, maxItems: 2, items: ID}, dot: {type: "array", minItems: 2, maxItems: 2, items: ID},
37
+ as: ID, label: {type: "string"}, value: {type: ["number", "array"], items: NUM}, note: {type: "string"}}}},
38
+ matrix: {type: "array", minItems: 2, maxItems: 2, items: V2},
39
+ basis: {type: "array", minItems: 2, maxItems: 2, items: V2},
40
+ basisLabels: {type: "array", minItems: 2, maxItems: 2, items: {type: "string"}},
41
+ show: {type: "array", items: {type: "string", enum: ["grid", "unit", "eigen", "det"]}}
42
+ }}, example: /*@egatari-block example*/{"range":[-4,4,-3,3],"vectors":[{"id":"a","v":[2,1],"label":"*a*"},{"id":"b","v":[-1,2],"label":"*b*"}],"ops":[{"sum":["a","b"],"as":"c","label":"*a* + *b*"},{"dot":["a","b"],"value":0}]}/*@egatari-block-end*/};
43
+ static props = {
44
+ dur: {type: "number", default: 1, doc: "1 ステップの秒数"},
45
+ size: {type: "number", default: 26, doc: "字の大きさ(px、24 以上)"}
46
+ };
47
+ get steps(){ var p = this.plan(); return p.steps.length; }
48
+ duration(k){ return k >= 1 && k <= this.plan().steps.length ? this.props.dur : 0; }
49
+ // データだけから決まる計算:ベクトル(id → 値と名前)、ステップ(種類・図形・右の欄の行)、確かめ(bad)
50
+ plan(){
51
+ if (this._plan) return this._plan;
52
+ var d = this.data || {}, bad = [], ja = !/^en\b/i.test(this.getAttribute("lang") || (this.closest && this.closest("[lang]") ? this.closest("[lang]").getAttribute("lang") : "ja") || "ja");
53
+ var L = ja ? T.ja : T.en, vec = {}, steps = [], show = d.show || ["grid", "unit"];
54
+ var lab = function(id){ return vec[id] ? vec[id].label : id; };
55
+ (d.vectors || []).forEach(function(o, i){
56
+ if (vec[o.id]) bad.push("vectors[" + i + "]: id \"" + o.id + "\" is used twice");
57
+ vec[o.id] = {v: o.v, label: o.label || "*" + o.id + "*", from: o.from || [0, 0], base: true};
58
+ });
59
+ steps.push({kind: "vectors", lines: (d.vectors || []).map(function(o){ return lab(o.id) + " = " + pair(o.v); })});
60
+ var need = function(id, j){ if (!vec[id]){ bad.push("ops[" + j + "]: unknown vector \"" + id + "\""); return false; } return true; };
61
+ var check = function(j, got, want){
62
+ if (got === undefined) return;
63
+ var g = [].concat(got), w = [].concat(want);
64
+ var okv = g.length === w.length && g.every(function(x, i){ return Math.abs(x - w[i]) <= 0.51 * Math.pow(10, -dec(x)) + 1e-9; });
65
+ if (!okv) bad.push("ops[" + j + "].value is " + JSON.stringify(got) + " but the part computes " + (w.length === 1 ? +w[0].toFixed(6) : "[" + w.map(function(x){ return +x.toFixed(6); }).join(", ") + "]"));
66
+ };
67
+ (d.ops || []).forEach(function(op, j){
68
+ var s = null;
69
+ if (op.sum && need(op.sum[0], j) && need(op.sum[1], j)){
70
+ var A = vec[op.sum[0]].v, B = vec[op.sum[1]].v, r = [A[0] + B[0], A[1] + B[1]];
71
+ s = {kind: "sum", a: op.sum[0], b: op.sum[1], r: r, lines: [lab(op.sum[0]) + " + " + lab(op.sum[1]) + " = " + pair(r)]}; check(j, op.value, r);
72
+ } else if (op.diff && need(op.diff[0], j) && need(op.diff[1], j)){
73
+ var A2 = vec[op.diff[0]].v, B2 = vec[op.diff[1]].v, r2 = [A2[0] - B2[0], A2[1] - B2[1]];
74
+ s = {kind: "diff", a: op.diff[0], b: op.diff[1], r: r2, lines: [lab(op.diff[0]) + " − " + lab(op.diff[1]) + " = " + pair(r2)]}; check(j, op.value, r2);
75
+ } else if (op.scale){
76
+ var id = typeof op.scale[0] === "string" ? op.scale[0] : op.scale[1], k = typeof op.scale[0] === "number" ? op.scale[0] : op.scale[1];
77
+ if (typeof id !== "string" || typeof k !== "number") bad.push("ops[" + j + "].scale is [vector id, number]");
78
+ else if (need(id, j)){ var r3 = [k * vec[id].v[0], k * vec[id].v[1]]; s = {kind: "scale", a: id, k: k, r: r3, lines: [num(k) + lab(id) + " = " + pair(r3)]}; check(j, op.value, r3); }
79
+ } else if ((op.proj || op.dot) && need((op.proj || op.dot)[0], j) && need((op.proj || op.dot)[1], j)){
80
+ var ids = op.proj || op.dot, A4 = vec[ids[0]].v, B4 = vec[ids[1]].v, bb = B4[0] * B4[0] + B4[1] * B4[1], dot = A4[0] * B4[0] + A4[1] * B4[1];
81
+ if (bb === 0){ bad.push("ops[" + j + "]: " + ids[1] + " is the zero vector"); }
82
+ else {
83
+ var c = dot / bb, r4 = [c * B4[0], c * B4[1]];
84
+ if (op.proj){ s = {kind: "proj", a: ids[0], b: ids[1], r: r4, lines: [L.proj(lab(ids[0]), lab(ids[1])) + " = " + pair(r4)]}; check(j, op.value, r4); }
85
+ else { s = {kind: "dot", a: ids[0], b: ids[1], r: r4, value: dot, lines: [lab(ids[0]) + "·" + lab(ids[1]) + " = " + paren(A4[0]) + "×" + paren(B4[0]) + " + " + paren(A4[1]) + "×" + paren(B4[1]) + " = " + num(dot)]}; check(j, op.value, dot); }
86
+ }
87
+ }
88
+ if (!s){ if (!bad.length) bad.push("ops[" + j + "] needs one of sum, diff, scale, proj, dot"); steps.push({kind: "none", lines: []}); return; }
89
+ if (op.note) s.lines.push(op.note);
90
+ s.label = op.label || (op.as ? "*" + op.as + "*" : s.kind === "scale" ? num(s.k) + lab(s.a) : "");
91
+ if (op.as){
92
+ if (vec[op.as]) bad.push("ops[" + j + "].as \"" + op.as + "\" is already a vector");
93
+ else if (s.kind !== "dot") vec[op.as] = {v: s.r, label: op.label || "*" + op.as + "*", from: [0, 0]};
94
+ }
95
+ steps.push(s);
96
+ });
97
+ if (d.matrix && d.basis) bad.push("matrix and basis are separate lessons: give one of them");
98
+ if (d.matrix){
99
+ var M = d.matrix, det = M[0][0] * M[1][1] - M[0][1] * M[1][0], tr = M[0][0] + M[1][1], disc = tr * tr - 4 * det, ev = [];
100
+ var lines = ["*M* = ((" + num(M[0][0]) + ", " + num(M[0][1]) + "), (" + num(M[1][0]) + ", " + num(M[1][1]) + "))"];
101
+ if (show.indexOf("det") >= 0 || show.indexOf("unit") >= 0) lines.push(L.det(num(det)));
102
+ if (show.indexOf("eigen") >= 0){
103
+ if (disc < -1e-12){ bad.push("matrix has complex eigenvalues; its eigenvector spans are not drawn (leave eigen out of show)"); lines.push(L.complex); }
104
+ else {
105
+ var sq = Math.sqrt(Math.max(0, disc)), ls = disc > 1e-12 ? [(tr + sq) / 2, (tr - sq) / 2] : [tr / 2];
106
+ ls.forEach(function(l){
107
+ // (M − λI) x = 0 の解の向き
108
+ var a = M[0][0] - l, b = M[0][1], c2 = M[1][0], e = M[1][1] - l, u = Math.abs(a) + Math.abs(b) > 1e-9 ? [-b, a] : Math.abs(c2) + Math.abs(e) > 1e-9 ? [-e, c2] : [1, 0];
109
+ var n = Math.hypot(u[0], u[1]); ev.push({l: l, u: [u[0] / n, u[1] / n]});
110
+ if (Math.abs(a) + Math.abs(b) + Math.abs(c2) + Math.abs(e) < 1e-9) ev.push({l: l, u: [0, 1]}); // M = λI:どの向きも
111
+ });
112
+ lines.push(L.eigen(ls.map(num)));
113
+ }
114
+ }
115
+ steps.push({kind: "matrix", M: M, det: det, ev: ev, lines: lines});
116
+ }
117
+ if (d.basis){
118
+ var Bm = d.basis, bd = Bm[0][0] * Bm[1][1] - Bm[1][0] * Bm[0][1], bl = d.basisLabels || ["*b*_1", "*b*_2"];
119
+ if (Math.abs(bd) < 1e-12) bad.push("basis vectors are parallel (not a basis)");
120
+ var lines2 = [L.basis(bl[0] + " = " + pair(Bm[0]), bl[1] + " = " + pair(Bm[1]))];
121
+ if (Math.abs(bd) >= 1e-12) (d.vectors || []).forEach(function(o){
122
+ // v = c1 b1 + c2 b2 → (c1, c2) = B⁻¹ v(B の列が b1, b2)
123
+ var c1 = (o.v[0] * Bm[1][1] - o.v[1] * Bm[1][0]) / bd, c2 = (Bm[0][0] * o.v[1] - Bm[0][1] * o.v[0]) / bd;
124
+ var term = function(c, l, first){ if (Math.abs(c) < 1e-12) return ""; var s = Math.abs(Math.abs(c) - 1) < 1e-12 ? l : num(Math.abs(c)) + l; return (c < 0 ? (first ? "−" : " − ") : (first ? "" : " + ")) + s; };
125
+ var t1 = term(c1, bl[0], true), t2 = term(c2, bl[1], !t1);
126
+ lines2.push(L.inBasis(lab(o.id), (t1 + t2) || "0"));
127
+ });
128
+ steps.push({kind: "basis", B: Bm, labels: bl, lines: lines2});
129
+ }
130
+ // 範囲:書いていなければ、すべてのベクトルと結果が入る整数の範囲(1 の余白)
131
+ var r = d.range;
132
+ if (!r){
133
+ var xs = [0], ys = [0];
134
+ Object.keys(vec).forEach(function(id){ var o = vec[id]; xs.push(o.from[0], o.from[0] + o.v[0]); ys.push(o.from[1], o.from[1] + o.v[1]); });
135
+ steps.forEach(function(s){ if (s.r){ xs.push(s.r[0]); ys.push(s.r[1]); } if (s.kind === "sum"){ var A = vec[s.a].v, B = vec[s.b].v; xs.push(A[0] + B[0]); ys.push(A[1] + B[1]); } });
136
+ if (d.matrix) Object.keys(vec).forEach(function(id){ var w = mul(d.matrix, vec[id].v); xs.push(w[0]); ys.push(w[1]); });
137
+ if (d.basis) d.basis.forEach(function(b){ xs.push(b[0]); ys.push(b[1]); });
138
+ r = [Math.floor(Math.min.apply(null, xs)) - 1, Math.ceil(Math.max.apply(null, xs)) + 1, Math.floor(Math.min.apply(null, ys)) - 1, Math.ceil(Math.max.apply(null, ys)) + 1];
139
+ } else if (!(r[1] > r[0] && r[3] > r[2])) { bad.push("range is [xmin, xmax, ymin, ymax] with min < max"); r = [-4, 4, -3, 3]; }
140
+ return (this._plan = {vec: vec, steps: steps, bad: bad, range: r, show: show, L: L, ja: ja, d: d});
141
+ }
142
+ mount(ctx){
143
+ var self = this, P = this.props, pl = this.plan(), d = pl.d;
144
+ if (!(Number.isFinite(P.dur) && P.dur > 0)){ ctx.report("attr", "[vector] dur must be positive; using 1"); P.dur = 1; }
145
+ if (!(Number.isFinite(P.size) && P.size >= 24)){ ctx.report("attr", "[vector] size must be at least 24; using 26"); P.size = 26; }
146
+ pl.bad.forEach(function(s){ ctx.report("data", "[vector] " + s); });
147
+ this.style.display = "block"; this.style.position = "relative";
148
+ var W = Math.max(1, this.clientWidth), H = Math.max(1, this.clientHeight), fs = P.size, tick = 24, row = Math.ceil(fs * 1.65), r = pl.range;
149
+ // 右の欄の行(ステップごとに足す)
150
+ var allLines = [].concat.apply([], pl.steps.map(function(s){ return s.lines; }));
151
+ var tw = function(s){ return base.textWidth(s.replace(/\*/g, "").replace(/_(\d)/g, "$1"), fs, {font: self}); };
152
+ var panelNatural = Math.max(200, Math.max.apply(null, allLines.map(tw).concat([0]))) + 32;
153
+ var m = {l: 44, r: 16, t: 24, b: 42}; // 目盛りの数字の分
154
+ var sx = r[1] - r[0], sy = r[3] - r[2];
155
+ var s0 = Math.min((W - panelNatural - 24 - m.l - m.r) / sx, (H - m.t - m.b) / sy);
156
+ var s = Math.max(4, Math.min(s0, (H - m.t - m.b) / sy));
157
+ if (s0 < 30) s = Math.max(4, Math.min((W * 0.6 - m.l - m.r) / sx, (H - m.t - m.b) / sy));
158
+ var pw = sx * s, ph = sy * s, ox = m.l, oy = Math.max(m.t, (H - m.b - ph) / 2 + m.t / 2);
159
+ var panelX = ox + pw + m.r + 24, panelW = Math.max(1, W - panelX);
160
+ if (s < 30 || panelW < 200) ctx.report("size", "[vector] element is " + W + " × " + H + " px; allow about " + Math.ceil(m.l + m.r + 30 * sx + 24 + panelNatural) + " × " + Math.ceil(m.t + m.b + 30 * sy) + " px for this range and the formulas (a unit of at least 30 px)");
161
+ var X = function(x){ return ox + (x - r[0]) * s; }, Y = function(y){ return oy + (r[3] - y) * s; };
162
+ this.geo = {X: X, Y: Y, s: s, ox: ox, oy: oy, pw: pw, ph: ph, fs: fs};
163
+ this.setAttribute("role", "img");
164
+ if (this._aria === undefined) this._aria = this.getAttribute("aria-label");
165
+ if (!this._aria) this.setAttribute("aria-label", allLines.map(function(t){ return t.replace(/\*/g, "").replace(/_(\d)/g, "$1"); }).join("; "));
166
+ var svg = this.svg = D.el("svg", {viewBox: "0 0 " + W + " " + H, width: W, height: H, "aria-hidden": "true"}, this);
167
+ var id = "vector-2-0-0-clip" + (++clipN), defs = D.el("defs", {}, svg), cp = D.el("clipPath", {id: id}, defs);
168
+ D.el("rect", {x: ox, y: oy, width: pw, height: ph}, cp);
169
+ var plane = D.el("g", {"clip-path": "url(#" + id + ")"}, svg);
170
+ // 格子と軸
171
+ var step = sx > 16 || sy > 16 ? 2 : 1, gx = [], gy = [];
172
+ for (var x = Math.ceil(r[0] / step) * step; x <= r[1] + 1e-9; x += step) gx.push(x);
173
+ for (var y = Math.ceil(r[2] / step) * step; y <= r[3] + 1e-9; y += step) gy.push(y);
174
+ this.gridG = D.el("g", {}, plane);
175
+ if (pl.show.indexOf("grid") >= 0){
176
+ gx.forEach(function(x){ D.el("line", {x1: X(x), y1: Y(r[2]), x2: X(x), y2: Y(r[3]), stroke: "var(--line)", "stroke-width": x === 0 ? 0 : 1.5}, self.gridG); });
177
+ gy.forEach(function(y){ D.el("line", {x1: X(r[0]), y1: Y(y), x2: X(r[1]), y2: Y(y), stroke: "var(--line)", "stroke-width": y === 0 ? 0 : 1.5}, self.gridG); });
178
+ }
179
+ if (r[0] <= 0 && r[1] >= 0) D.el("line", {x1: X(0), y1: Y(r[2]), x2: X(0), y2: Y(r[3]), stroke: "var(--muted)", "stroke-width": 2}, plane);
180
+ if (r[2] <= 0 && r[3] >= 0) D.el("line", {x1: X(r[0]), y1: Y(0), x2: X(r[1]), y2: Y(0), stroke: "var(--muted)", "stroke-width": 2}, plane);
181
+ D.el("rect", {x: ox, y: oy, width: pw, height: ph, fill: "none", stroke: "var(--line)", "stroke-width": 2}, svg);
182
+ // 目盛りの数字(0 は書かない。混むときは 1 つおき)
183
+ var every = Math.max(1, Math.ceil(36 / (s * step)));
184
+ gx.forEach(function(x, i){ if (x !== 0 && i % every === 0) D.el("text", {x: X(x), y: oy + ph + tick + 2, "font-size": tick, "text-anchor": "middle", fill: "var(--muted)"}, svg).textContent = num(x); });
185
+ gy.forEach(function(y, i){ if (y !== 0 && y !== r[2] && i % every === 0) D.el("text", {x: ox - 8, y: Y(y) + tick * 0.36, "font-size": tick, "text-anchor": "end", fill: "var(--muted)"}, svg).textContent = num(y); });
186
+ // 変換する層(格子・単位正方形・固有ベクトルの向き)と、新しい基底の格子
187
+ var mx = pl.steps.find(function(q){ return q.kind === "matrix"; }), bs = pl.steps.find(function(q){ return q.kind === "basis"; });
188
+ var R = Math.max(Math.abs(r[0]), Math.abs(r[1]), Math.abs(r[2]), Math.abs(r[3])) * 4 + 4;
189
+ this.tGrid = []; this.eigenL = []; this.unit = null; this.bGrid = [];
190
+ if (mx){
191
+ var gT = this.tGridG = D.el("g", {opacity: 0}, plane);
192
+ for (var i = -Math.ceil(R); i <= Math.ceil(R); i++){
193
+ this.tGrid.push({p: [i, -R], q: [i, R], e: D.el("line", {stroke: "var(--accent2)", "stroke-width": i === 0 ? 3 : 1.5}, gT)});
194
+ this.tGrid.push({p: [-R, i], q: [R, i], e: D.el("line", {stroke: "var(--accent2)", "stroke-width": i === 0 ? 3 : 1.5}, gT)});
195
+ }
196
+ if (pl.show.indexOf("unit") >= 0) this.unit = D.el("path", {fill: "var(--accent2)", "fill-opacity": 0.25, stroke: "var(--accent2)", "stroke-width": 2, opacity: 0}, plane);
197
+ mx.ev.forEach(function(e){ self.eigenL.push(D.el("line", {x1: X(-R * e.u[0]), y1: Y(-R * e.u[1]), x2: X(R * e.u[0]), y2: Y(R * e.u[1]), stroke: "var(--emph)", "stroke-width": 2.5, "stroke-dasharray": "10 8", opacity: 0}, plane)); });
198
+ }
199
+ if (bs){
200
+ var gB = this.bGridG = D.el("g", {opacity: 0}, plane), B = bs.B;
201
+ for (var i2 = -Math.ceil(R); i2 <= Math.ceil(R); i2++){
202
+ [[[i2, -R], [i2, R]], [[-R, i2], [R, i2]]].forEach(function(pq){
203
+ var p = [pq[0][0] * B[0][0] + pq[0][1] * B[1][0], pq[0][0] * B[0][1] + pq[0][1] * B[1][1]], q = [pq[1][0] * B[0][0] + pq[1][1] * B[1][0], pq[1][0] * B[0][1] + pq[1][1] * B[1][1]];
204
+ D.el("line", {x1: X(p[0]), y1: Y(p[1]), x2: X(q[0]), y2: Y(q[1]), stroke: "var(--accent2)", "stroke-width": i2 === 0 ? 3 : 1.5}, gB);
205
+ });
206
+ }
207
+ }
208
+ // 矢印(線と先の三角)。描くたびに座標を書く
209
+ var arrowG = D.el("g", {}, svg);
210
+ var all = this.allArrows = [], labs = this.allLabels = [];
211
+ var mk = function(col, dash, wd){ var g = D.el("g", {opacity: 0}, arrowG); return all[all.length] = {g: g, line: D.el("line", Object.assign({stroke: col, "stroke-width": wd || 4, "stroke-linecap": "round"}, dash ? {"stroke-dasharray": "10 8"} : {}), g), head: D.el("path", {fill: col}, g), col: col}; };
212
+ this.arrows = {};
213
+ Object.keys(pl.vec).forEach(function(k){ if (pl.vec[k].base) self.arrows[k] = mk("var(--term)"); });
214
+ this.labG = D.el("g", {}, svg);
215
+ this.labels = {};
216
+ // 添え字(_1・^2)のある名前は 32px 以上で組む:mtext の添え字は 24px より小さくしないので、本文が 24〜26px だと同じ大きさに見える
217
+ var mkLab = function(t){ var g = D.el("g", {opacity: 0}, self.labG); D.mtext(g, 0, 0, t, {"font-size": /(^|[^\\])[_^]./.test(t) ? Math.max(fs, 32) : fs, "text-anchor": "middle", fill: "var(--fg)"}); labs.push(g); return g; };
218
+ Object.keys(pl.vec).forEach(function(k){ if (pl.vec[k].base) self.labels[k] = mkLab(pl.vec[k].label); });
219
+ // ステップごとの補助と結果
220
+ this.opG = pl.steps.map(function(st){
221
+ var o = {};
222
+ if (st.kind === "sum" || st.kind === "diff" || st.kind === "proj" || st.kind === "dot") o.help = mk("var(--muted)", true, 3);
223
+ if (st.kind === "proj" || st.kind === "dot"){ var b2 = pl.vec[st.b].v, nb = Math.hypot(b2[0], b2[1]) || 1, RR = 1000; o.lineB = D.el("line", {x1: X(-RR * b2[0] / nb), y1: Y(-RR * b2[1] / nb), x2: X(RR * b2[0] / nb), y2: Y(RR * b2[1] / nb), stroke: "var(--muted)", "stroke-width": 1.5, opacity: 0}, plane); }
224
+ if (st.kind !== "vectors" && st.kind !== "matrix" && st.kind !== "basis" && st.kind !== "none"){ o.res = mk("var(--emph)", false, 5); if (st.label) o.lab = mkLab(st.label); }
225
+ if (st.kind === "basis"){ o.b1 = mk("var(--accent2)", false, 5); o.b2 = mk("var(--accent2)", false, 5); o.l1 = mkLab(st.labels[0]); o.l2 = mkLab(st.labels[1]); }
226
+ return o;
227
+ });
228
+ // 右の欄
229
+ var lg = D.el("g", {}, svg), y0 = oy + fs, maxLines = Math.floor((H - y0 + fs) / row);
230
+ if (allLines.length > maxLines) ctx.report("layout", "[vector] the formulas need " + allLines.length + " lines; the panel holds " + maxLines + " (fewer ops, or a taller element)");
231
+ var n = 0;
232
+ this.lineG = pl.steps.map(function(st){
233
+ return st.lines.map(function(t){
234
+ var g = D.el("g", {opacity: 0}, lg), yy = y0 + Math.min(n, maxLines - 1) * row; n++;
235
+ var txt = t; if (tw(t) > panelW - 8){ ctx.report("layout", "[vector] the line \"" + t.replace(/\*/g, "").slice(0, 24) + "…\" is wider than the panel (" + Math.floor(panelW) + " px)"); }
236
+ D.mtext(g, panelX, yy, txt, {"font-size": fs, fill: "var(--fg)"});
237
+ return g;
238
+ });
239
+ });
240
+ }
241
+ // 矢印を p から q へ(e は 0〜1 の伸び)
242
+ arrow(a, p, q, e){
243
+ var G = this.geo, x0 = G.X(p[0]), y0 = G.Y(p[1]), x1 = G.X(p[0] + (q[0] - p[0]) * e), y1 = G.Y(p[1] + (q[1] - p[1]) * e), dx = x1 - x0, dy = y1 - y0, n = Math.hypot(dx, dy);
244
+ if (n < 1){ a.g.setAttribute("opacity", 0); return; }
245
+ var ux = dx / n, uy = dy / n, h = Math.min(18, n * 0.6), w = h * 0.55, bx = x1 - ux * h, by = y1 - uy * h;
246
+ a.line.setAttribute("x1", x0.toFixed(1)); a.line.setAttribute("y1", y0.toFixed(1)); a.line.setAttribute("x2", bx.toFixed(1)); a.line.setAttribute("y2", by.toFixed(1));
247
+ a.head.setAttribute("d", "M" + x1.toFixed(1) + " " + y1.toFixed(1) + " L" + (bx - uy * w).toFixed(1) + " " + (by + ux * w).toFixed(1) + " L" + (bx + uy * w).toFixed(1) + " " + (by - ux * w).toFixed(1) + " Z");
248
+ a.g.setAttribute("opacity", 1);
249
+ }
250
+ // 名前を矢印の先の少し先に
251
+ place(g, p, q, op){
252
+ var G = this.geo, dx = q[0] - p[0], dy = q[1] - p[1], n = Math.hypot(dx, dy) || 1, off = G.fs * 0.9;
253
+ var x = G.X(q[0]) + dx / n * off, y = G.Y(q[1]) - dy / n * off + G.fs * 0.35;
254
+ g.setAttribute("transform", "translate(" + x.toFixed(1) + " " + y.toFixed(1) + ")"); g.setAttribute("opacity", op);
255
+ }
256
+ render(k, t){
257
+ if (!this.svg) return;
258
+ var self = this, pl = this.plan(), G = this.geo, dur = this.props.dur, steps = pl.steps, ph = function(i){ return k > i + 1 ? 1 : k < i + 1 ? 0 : base.prog(t, 0, dur); };
259
+ var mi = steps.findIndex(function(q){ return q.kind === "matrix"; }), bi = steps.findIndex(function(q){ return q.kind === "basis"; });
260
+ var em = mi >= 0 ? ph(mi) : 0, M = mi >= 0 ? steps[mi].M : null;
261
+ var A = M ? [[1 + (M[0][0] - 1) * em, M[0][1] * em], [M[1][0] * em, 1 + (M[1][1] - 1) * em]] : null;
262
+ var tf = function(v){ return A ? mul(A, v) : v; };
263
+ // ベクトル
264
+ this.allArrows.forEach(function(a){ a.line.setAttribute("x1", 0); a.line.setAttribute("y1", 0); a.line.setAttribute("x2", 0); a.line.setAttribute("y2", 0); a.head.setAttribute("d", ""); a.head.setAttribute("opacity", 1); a.g.setAttribute("opacity", 0); });
265
+ this.allLabels.forEach(function(g){ g.setAttribute("transform", "translate(0 0)"); g.setAttribute("opacity", 0); });
266
+ var e0 = ph(0);
267
+ Object.keys(this.arrows).forEach(function(id){
268
+ var o = pl.vec[id], p = tf(o.from), q = tf([o.from[0] + o.v[0], o.from[1] + o.v[1]]);
269
+ if (e0 <= 0){ self.arrows[id].g.setAttribute("opacity", 0); self.labels[id].setAttribute("opacity", 0); return; }
270
+ self.arrows[id].g.setAttribute("opacity", 1); self.arrow(self.arrows[id], p, q, e0); self.place(self.labels[id], p, [p[0] + (q[0] - p[0]) * e0, p[1] + (q[1] - p[1]) * e0], e0.toFixed(3));
271
+ });
272
+ // 操作:補助は そのステップの間だけ(次のステップで消える)、結果は残す(行列の変換にも付いていく)
273
+ steps.forEach(function(st, i){
274
+ var o = self.opG[i], e = ph(i);
275
+ var e1 = k > i + 1 ? 1 : k < i + 1 ? 0 : base.prog(t, 0, dur / 2), e2 = k > i + 1 ? 1 : k < i + 1 ? 0 : base.prog(t, dur / 2, dur / 2);
276
+ var helpOn = k === i + 1;
277
+ if (o.help) o.help.g.setAttribute("opacity", 0);
278
+ if (o.lineB) o.lineB.setAttribute("opacity", 0);
279
+ if (st.kind === "sum" || st.kind === "diff"){
280
+ var a = pl.vec[st.a].v, b = pl.vec[st.b].v;
281
+ if (helpOn){
282
+ if (st.kind === "sum") self.arrow(o.help, tf([a[0] * e1, a[1] * e1]), tf([a[0] * e1 + b[0], a[1] * e1 + b[1]]), 1); // b を a の先へ平行移動
283
+ else self.arrow(o.help, tf(b), tf(a), e1); // b の先から a の先へ
284
+ }
285
+ if (e2 > 0) self.arrow(o.res, [0, 0], tf(st.r), e2); else o.res.g.setAttribute("opacity", 0);
286
+ } else if (st.kind === "scale"){
287
+ var v = pl.vec[st.a].v;
288
+ if (e > 0) self.arrow(o.res, [0, 0], tf([v[0] * (1 + (st.k - 1) * e), v[1] * (1 + (st.k - 1) * e)]), 1); else o.res.g.setAttribute("opacity", 0);
289
+ } else if (st.kind === "proj" || st.kind === "dot"){
290
+ var a2 = pl.vec[st.a].v;
291
+ if (helpOn){
292
+ o.lineB.setAttribute("opacity", 1);
293
+ self.arrow(o.help, a2, st.r, e1); o.help.head.setAttribute("opacity", 0);
294
+ }
295
+ if (e2 > 0) self.arrow(o.res, [0, 0], tf(st.r), e2); else o.res.g.setAttribute("opacity", 0);
296
+ } else if (st.kind === "basis"){
297
+ var B = st.B;
298
+ if (e > 0){ self.arrow(o.b1, [0, 0], B[0], e); self.arrow(o.b2, [0, 0], B[1], e); self.place(o.l1, [0, 0], [B[0][0] * e, B[0][1] * e], e.toFixed(3)); self.place(o.l2, [0, 0], [B[1][0] * e, B[1][1] * e], e.toFixed(3)); }
299
+ else { o.b1.g.setAttribute("opacity", 0); o.b2.g.setAttribute("opacity", 0); o.l1.setAttribute("opacity", 0); o.l2.setAttribute("opacity", 0); }
300
+ }
301
+ if (o.lab){ if (o.res && o.res.g.getAttribute("opacity") !== "0" && (e2 > 0 || st.kind === "scale" && e > 0)) self.place(o.lab, [0, 0], tf(st.kind === "scale" ? [pl.vec[st.a].v[0] * (1 + (st.k - 1) * e), pl.vec[st.a].v[1] * (1 + (st.k - 1) * e)] : st.r), (st.kind === "scale" ? e : e2).toFixed(3)); else o.lab.setAttribute("opacity", 0); }
302
+ // 右の欄:そのステップで出す
303
+ self.lineG[i].forEach(function(g){ g.setAttribute("opacity", (k > i + 1 ? 1 : k < i + 1 ? 0 : base.prog(t, 0, dur / 2)).toFixed(3)); });
304
+ });
305
+ // 行列:格子・単位正方形・固有ベクトルの向き
306
+ if (A){
307
+ this.tGrid.forEach(function(L){ var p = mul(A, L.p), q = mul(A, L.q); L.e.setAttribute("x1", G.X(p[0]).toFixed(1)); L.e.setAttribute("y1", G.Y(p[1]).toFixed(1)); L.e.setAttribute("x2", G.X(q[0]).toFixed(1)); L.e.setAttribute("y2", G.Y(q[1]).toFixed(1)); });
308
+ this.tGridG.setAttribute("opacity", k >= mi + 1 ? 1 : 0);
309
+ this.gridG.setAttribute("opacity", k >= mi + 1 ? 0.35 : 1);
310
+ if (this.unit){ var c = [[0, 0], [1, 0], [1, 1], [0, 1]].map(function(v){ var w = mul(A, v); return G.X(w[0]).toFixed(1) + " " + G.Y(w[1]).toFixed(1); }); this.unit.setAttribute("d", "M" + c.join(" L") + " Z"); this.unit.setAttribute("opacity", k >= mi + 1 ? 1 : 0); }
311
+ this.eigenL.forEach(function(l){ l.setAttribute("opacity", k >= mi + 1 ? 1 : 0); });
312
+ }
313
+ if (bi >= 0){ var eb = ph(bi); this.bGridG.setAttribute("opacity", eb.toFixed(3)); this.gridG.setAttribute("opacity", (1 - 0.65 * eb).toFixed(3)); }
314
+ }
315
+ };
316
+ });
@@ -0,0 +1,18 @@
1
+ ---
2
+ summary: ANOVA, contingency and potential-outcome tables filled by step; sources, results and a formula line; arithmetic checked
3
+ steps: fill stages
4
+ props:
5
+ dur: s per step
6
+ digits: decimals
7
+ size: text px
8
+ example: {"kind": "anova", "rows": [{"name": "A", "ss": 120, "df": 2, "ms": 60, "f": 7.5}, {"name": "E", "ss": 96, "df": 12, "ms": 8}, {"name": "T", "ss": 216, "df": 14}]}
9
+ ---
10
+
11
+ From a script; arithmetic checked. `kind`: anova, contingency, po, table.
12
+ <!-- llm: omit -->
13
+ - `anova`: rows `{name, ss, df, ms, f, p}`; the last row is the total, the one before it the error (`role` overrides); columns filled SS → df → MS → F → p. `contingency`: `rows`, `cols`, `n`; `margins` (default true), `expected`, `chi2` (no continuity correction), `or` (2 × 2). `po`: units `{id, t, y0, y1}`; the unobserved side is "?" on a light ground; steps reveal it, then Y(1) − Y(0), then the ATE and the naive difference (`ate`, `naive` checked). `table`: `header` and `rows`, one row per step.
14
+ - Checks (data) within the rounding written; p is not checked. Source cells `--accent2`, filled cells `--emph` during their step. The whole table is in `table[data-readable]`. No answer preview.
15
+ <!-- llm: end -->
16
+ <!-- llm: omit -->
17
+ Notes: keep decimals consistent per column; say in the script that real data shows only one of the two potential outcomes.
18
+ <!-- llm: end -->