@helloao/tools 0.0.11 → 0.0.13

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 (34) hide show
  1. package/dist/cjs/generation/api.cjs +26 -3
  2. package/dist/cjs/generation/api.cjs.map +2 -2
  3. package/dist/cjs/generation/audio.cjs +1 -1
  4. package/dist/cjs/generation/audio.cjs.map +2 -2
  5. package/dist/cjs/generation/book-order.cjs +241 -398
  6. package/dist/cjs/generation/book-order.cjs.map +2 -2
  7. package/dist/cjs/generation/common-types.cjs.map +1 -1
  8. package/dist/cjs/generation/dataset.cjs +20 -8
  9. package/dist/cjs/generation/dataset.cjs.map +2 -2
  10. package/dist/cjs/parser/types.cjs.map +1 -1
  11. package/dist/cjs/parser/usx-parser.cjs +41 -1
  12. package/dist/cjs/parser/usx-parser.cjs.map +2 -2
  13. package/dist/cjs/utils.cjs +20 -1
  14. package/dist/cjs/utils.cjs.map +2 -2
  15. package/dist/esm/generation/api.js +26 -3
  16. package/dist/esm/generation/api.js.map +2 -2
  17. package/dist/esm/generation/audio.js +1 -1
  18. package/dist/esm/generation/audio.js.map +2 -2
  19. package/dist/esm/generation/book-order.js +239 -398
  20. package/dist/esm/generation/book-order.js.map +2 -2
  21. package/dist/esm/generation/dataset.js +25 -9
  22. package/dist/esm/generation/dataset.js.map +2 -2
  23. package/dist/esm/parser/usx-parser.js +41 -1
  24. package/dist/esm/parser/usx-parser.js.map +2 -2
  25. package/dist/esm/utils.js +18 -1
  26. package/dist/esm/utils.js.map +2 -2
  27. package/dist/types/generation/api.d.ts +12 -0
  28. package/dist/types/generation/book-order.d.ts +4 -0
  29. package/dist/types/generation/common-types.d.ts +5 -1
  30. package/dist/types/generation/dataset.d.ts +4 -0
  31. package/dist/types/parser/types.d.ts +8 -0
  32. package/dist/types/parser/usx-parser.d.ts +4 -0
  33. package/dist/types/utils.d.ts +5 -0
  34. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../generation/book-order.ts"],
4
- "sourcesContent": ["\r\n/**\r\n * Defines a map that maps the book ID to the numerical order of the book.\r\n */\r\nexport const bookOrderMap = new Map([\r\n [\"GEN\", 1]\r\n , [\"EXO\", 2]\r\n , [\"LEV\", 3]\r\n , [\"NUM\", 4]\r\n , [\"DEU\", 5]\r\n , [\"JOS\", 6]\r\n , [\"JDG\", 7]\r\n , [\"RUT\", 8]\r\n , [\"1SA\", 9]\r\n , [\"2SA\", 10]\r\n , [\"1KI\", 11]\r\n , [\"2KI\", 12]\r\n , [\"1CH\", 13]\r\n , [\"2CH\", 14]\r\n , [\"EZR\", 15]\r\n , [\"NEH\", 16]\r\n , [\"EST\", 17]\r\n , [\"JOB\", 18]\r\n , [\"PSA\", 19]\r\n , [\"PRO\", 20]\r\n , [\"ECC\", 21]\r\n , [\"SNG\", 22]\r\n , [\"ISA\", 23]\r\n , [\"JER\", 24]\r\n , [\"LAM\", 25]\r\n , [\"EZK\", 26]\r\n , [\"DAN\", 27]\r\n , [\"HOS\", 28]\r\n , [\"JOL\", 29]\r\n , [\"AMO\", 30]\r\n , [\"OBA\", 31]\r\n , [\"JON\", 32]\r\n , [\"MIC\", 33]\r\n , [\"NAM\", 34]\r\n , [\"HAB\", 35]\r\n , [\"ZEP\", 36]\r\n , [\"HAG\", 37]\r\n , [\"ZEC\", 38]\r\n , [\"MAL\", 39]\r\n , [\"MAT\", 40]\r\n , [\"MRK\", 41]\r\n , [\"LUK\", 42]\r\n , [\"JHN\", 43]\r\n , [\"ACT\", 44]\r\n , [\"ROM\", 45]\r\n , [\"1CO\", 46]\r\n , [\"2CO\", 47]\r\n , [\"GAL\", 48]\r\n , [\"EPH\", 49]\r\n , [\"PHP\", 50]\r\n , [\"COL\", 51]\r\n , [\"1TH\", 52]\r\n , [\"2TH\", 53]\r\n , [\"1TI\", 54]\r\n , [\"2TI\", 55]\r\n , [\"TIT\", 56]\r\n , [\"PHM\", 57]\r\n , [\"HEB\", 58]\r\n , [\"JAS\", 59]\r\n , [\"1PE\", 60]\r\n , [\"2PE\", 61]\r\n , [\"1JN\", 62]\r\n , [\"2JN\", 63]\r\n , [\"3JN\", 64]\r\n , [\"JUD\", 65]\r\n , [\"REV\", 66]\r\n]);\r\n\r\n/**\r\n * Defines a map that maps the book ID to the number of chapters the book has.\r\n */\r\nexport const bookChapterCountMap = new Map([\r\n [\r\n \"GEN\",\r\n 50\r\n ],\r\n [\r\n \"EXO\",\r\n 40\r\n ],\r\n [\r\n \"LEV\",\r\n 27\r\n ],\r\n [\r\n \"NUM\",\r\n 36\r\n ],\r\n [\r\n \"DEU\",\r\n 34\r\n ],\r\n [\r\n \"JOS\",\r\n 24\r\n ],\r\n [\r\n \"JDG\",\r\n 21\r\n ],\r\n [\r\n \"RUT\",\r\n 4\r\n ],\r\n [\r\n \"1SA\",\r\n 31\r\n ],\r\n [\r\n \"2SA\",\r\n 24\r\n ],\r\n [\r\n \"1KI\",\r\n 22\r\n ],\r\n [\r\n \"2KI\",\r\n 25\r\n ],\r\n [\r\n \"1CH\",\r\n 29\r\n ],\r\n [\r\n \"2CH\",\r\n 36\r\n ],\r\n [\r\n \"EZR\",\r\n 10\r\n ],\r\n [\r\n \"NEH\",\r\n 13\r\n ],\r\n [\r\n \"EST\",\r\n 10\r\n ],\r\n [\r\n \"JOB\",\r\n 42\r\n ],\r\n [\r\n \"PSA\",\r\n 150\r\n ],\r\n [\r\n \"PRO\",\r\n 31\r\n ],\r\n [\r\n \"ECC\",\r\n 12\r\n ],\r\n [\r\n \"SNG\",\r\n 8\r\n ],\r\n [\r\n \"ISA\",\r\n 66\r\n ],\r\n [\r\n \"JER\",\r\n 52\r\n ],\r\n [\r\n \"LAM\",\r\n 5\r\n ],\r\n [\r\n \"EZK\",\r\n 48\r\n ],\r\n [\r\n \"DAN\",\r\n 12\r\n ],\r\n [\r\n \"HOS\",\r\n 14\r\n ],\r\n [\r\n \"JOL\",\r\n 3\r\n ],\r\n [\r\n \"AMO\",\r\n 9\r\n ],\r\n [\r\n \"OBA\",\r\n 1\r\n ],\r\n [\r\n \"JON\",\r\n 4\r\n ],\r\n [\r\n \"MIC\",\r\n 7\r\n ],\r\n [\r\n \"NAM\",\r\n 3\r\n ],\r\n [\r\n \"HAB\",\r\n 3\r\n ],\r\n [\r\n \"ZEP\",\r\n 3\r\n ],\r\n [\r\n \"HAG\",\r\n 2\r\n ],\r\n [\r\n \"ZEC\",\r\n 14\r\n ],\r\n [\r\n \"MAL\",\r\n 4\r\n ],\r\n [\r\n \"MAT\",\r\n 28\r\n ],\r\n [\r\n \"MRK\",\r\n 16\r\n ],\r\n [\r\n \"LUK\",\r\n 24\r\n ],\r\n [\r\n \"JHN\",\r\n 21\r\n ],\r\n [\r\n \"ACT\",\r\n 28\r\n ],\r\n [\r\n \"ROM\",\r\n 16\r\n ],\r\n [\r\n \"1CO\",\r\n 16\r\n ],\r\n [\r\n \"2CO\",\r\n 13\r\n ],\r\n [\r\n \"GAL\",\r\n 6\r\n ],\r\n [\r\n \"EPH\",\r\n 6\r\n ],\r\n [\r\n \"PHP\",\r\n 4\r\n ],\r\n [\r\n \"COL\",\r\n 4\r\n ],\r\n [\r\n \"1TH\",\r\n 5\r\n ],\r\n [\r\n \"2TH\",\r\n 3\r\n ],\r\n [\r\n \"1TI\",\r\n 6\r\n ],\r\n [\r\n \"2TI\",\r\n 4\r\n ],\r\n [\r\n \"TIT\",\r\n 3\r\n ],\r\n [\r\n \"PHM\",\r\n 1\r\n ],\r\n [\r\n \"HEB\",\r\n 13\r\n ],\r\n [\r\n \"JAS\",\r\n 5\r\n ],\r\n [\r\n \"1PE\",\r\n 5\r\n ],\r\n [\r\n \"2PE\",\r\n 3\r\n ],\r\n [\r\n \"1JN\",\r\n 5\r\n ],\r\n [\r\n \"2JN\",\r\n 1\r\n ],\r\n [\r\n \"3JN\",\r\n 1\r\n ],\r\n [\r\n \"JUD\",\r\n 1\r\n ],\r\n [\r\n \"REV\",\r\n 22\r\n ]\r\n]);\r\n\r\n/**\r\n * Defines a map that maps the book ID to the \"common\" enligsh name for the book.\r\n */\r\nconst englishBookMap = new Map([\r\n [\"GEN\", { \"commonName\": \"Genesis\" }]\r\n , [\"EXO\", { \"commonName\": \"Exodus\" }]\r\n , [\"LEV\", { \"commonName\": \"Leviticus\" }]\r\n , [\"NUM\", { \"commonName\": \"Numbers\" }]\r\n , [\"DEU\", { \"commonName\": \"Deuteronomy\" }]\r\n , [\"JOS\", { \"commonName\": \"Joshua\" }]\r\n , [\"JDG\", { \"commonName\": \"Judges\" }]\r\n , [\"RUT\", { \"commonName\": \"Ruth\" }]\r\n , [\"1SA\", { \"commonName\": \"1 Samuel\" }]\r\n , [\"2SA\", { \"commonName\": \"2 Samuel\" }]\r\n , [\"1KI\", { \"commonName\": \"1 Kings\" }]\r\n , [\"2KI\", { \"commonName\": \"2 Kings\" }]\r\n , [\"1CH\", { \"commonName\": \"1 Chronicles\" }]\r\n , [\"2CH\", { \"commonName\": \"2 Chronicles\" }]\r\n , [\"EZR\", { \"commonName\": \"Ezra\" }]\r\n , [\"NEH\", { \"commonName\": \"Nehemiah\" }]\r\n , [\"EST\", { \"commonName\": \"Esther\" }]\r\n , [\"JOB\", { \"commonName\": \"Job\" }]\r\n , [\"PSA\", { \"commonName\": \"Psalms\" }]\r\n , [\"PRO\", { \"commonName\": \"Proverbs\" }]\r\n , [\"ECC\", { \"commonName\": \"Ecclesiastes\" }]\r\n , [\"SNG\", { \"commonName\": \"Song of Songs\" }]\r\n , [\"ISA\", { \"commonName\": \"Isaiah\" }]\r\n , [\"JER\", { \"commonName\": \"Jeremiah\" }]\r\n , [\"LAM\", { \"commonName\": \"Lamentations\" }]\r\n , [\"EZK\", { \"commonName\": \"Ezekiel\" }]\r\n , [\"DAN\", { \"commonName\": \"Daniel\" }]\r\n , [\"HOS\", { \"commonName\": \"Hosea\" }]\r\n , [\"JOL\", { \"commonName\": \"Joel\" }]\r\n , [\"AMO\", { \"commonName\": \"Amos\" }]\r\n , [\"OBA\", { \"commonName\": \"Obadiah\" }]\r\n , [\"JON\", { \"commonName\": \"Jonah\" }]\r\n , [\"MIC\", { \"commonName\": \"Micah\" }]\r\n , [\"NAM\", { \"commonName\": \"Nahum\" }]\r\n , [\"HAB\", { \"commonName\": \"Habakkuk\" }]\r\n , [\"ZEP\", { \"commonName\": \"Zephaniah\" }]\r\n , [\"HAG\", { \"commonName\": \"Haggai\" }]\r\n , [\"ZEC\", { \"commonName\": \"Zechariah\" }]\r\n , [\"MAL\", { \"commonName\": \"Malachi\" }]\r\n , [\"MAT\", { \"commonName\": \"Matthew\" }]\r\n , [\"MRK\", { \"commonName\": \"Mark\" }]\r\n , [\"LUK\", { \"commonName\": \"Luke\" }]\r\n , [\"JHN\", { \"commonName\": \"John\" }]\r\n , [\"ACT\", { \"commonName\": \"Acts\" }]\r\n , [\"ROM\", { \"commonName\": \"Romans\" }]\r\n , [\"1CO\", { \"commonName\": \"1 Corinthians\" }]\r\n , [\"2CO\", { \"commonName\": \"2 Corinthians\" }]\r\n , [\"GAL\", { \"commonName\": \"Galatians\" }]\r\n , [\"EPH\", { \"commonName\": \"Ephesians\" }]\r\n , [\"PHP\", { \"commonName\": \"Philippians\" }]\r\n , [\"COL\", { \"commonName\": \"Colossians\" }]\r\n , [\"1TH\", { \"commonName\": \"1 Thessalonians\" }]\r\n , [\"2TH\", { \"commonName\": \"2 Thessalonians\" }]\r\n , [\"1TI\", { \"commonName\": \"1 Timothy\" }]\r\n , [\"2TI\", { \"commonName\": \"2 Timothy\" }]\r\n , [\"TIT\", { \"commonName\": \"Titus\" }]\r\n , [\"PHM\", { \"commonName\": \"Philemon\" }]\r\n , [\"HEB\", { \"commonName\": \"Hebrews\" }]\r\n , [\"JAS\", { \"commonName\": \"James\" }]\r\n , [\"1PE\", { \"commonName\": \"1 Peter\" }]\r\n , [\"2PE\", { \"commonName\": \"2 Peter\" }]\r\n , [\"1JN\", { \"commonName\": \"1 John\" }]\r\n , [\"2JN\", { \"commonName\": \"2 John\" }]\r\n , [\"3JN\", { \"commonName\": \"3 John\" }]\r\n , [\"JUD\", { \"commonName\": \"Jude\" }]\r\n , [\"REV\", { \"commonName\": \"Revelation\" }]\r\n]);\r\n\r\n/**\r\n * Defines a map that maps the book ID to the \"common\" arabic name for the book.\r\n */\r\nconst arabicBookMap = new Map([\r\n [\"GEN\", { \"commonName\": \"\u0627\u0644\u062A\u064E\u0651\u0643\u0648\u064A\u0646\" }]\r\n , [\"EXO\", { \"commonName\": \"\u0627\u0644\u062E\u064F\u0631\u064F\u0648\u062C\" }]\r\n , [\"LEV\", { \"commonName\": \"\u0627\u0644\u0644\u0651\u0627\u0648\u064A\u0650\u0651\u064A\u0646\" }]\r\n , [\"NUM\", { \"commonName\": \"\u0627\u0644\u0639\u064E\u062F\u064E\u062F\" }]\r\n , [\"DEU\", { \"commonName\": \"\u0627\u0644\u062A\u064E\u0651\u062B\u0652\u0646\u0650\u064A\u064E\u0629\" }]\r\n , [\"JOS\", { \"commonName\": \"\u064A\u064E\u0634\u064F\u0648\u0639\" }]\r\n , [\"JDG\", { \"commonName\": \"\u0627\u0644\u0642\u064F\u0636\u0627\u0629\" }]\r\n , [\"RUT\", { \"commonName\": \"\u0631\u0627\u0639\u064F\u0648\u062B\" }]\r\n , [\"1SA\", { \"commonName\": \"\u0635\u064E\u0645\u064F\u0648\u0626\u064A\u0644\u064E \u0627\u0644\u0623\u0648\u064E\u0651\u0644\u064F\" }]\r\n , [\"2SA\", { \"commonName\": \"\u0635\u0645\u0648\u0626\u064A\u0644\u064E \u0627\u0644\u062B\u0651\u0627\u0646\u0650\u064A\" }]\r\n , [\"1KI\", { \"commonName\": \"\u0627\u0644\u0645\u064F\u0644\u064F\u0648\u0643\u0650 \u0627\u0644\u0623\u0648\u064E\u0651\u0644\u064F\" }]\r\n , [\"2KI\", { \"commonName\": \"\u0627\u0644\u0645\u064F\u0644\u064F\u0648\u0643\u0650 \u0627\u0644\u062B\u0651\u0627\u0646\u0650\u064A\" }]\r\n , [\"1CH\", { \"commonName\": \"\u0623\u062E\u0628\u0627\u0631\u0650 \u0627\u0644\u0623\u064A\u0651\u0627\u0645\u0650 \u0627\u0644\u0623\u0648\u0651\u0644\u064F\" }]\r\n , [\"2CH\", { \"commonName\": \" \u0623\u062E\u0628\u0627\u0631\u0650 \u0627\u0644\u0623\u064A\u0651\u0627\u0645\u0650 \u0627\u0644\u062B\u0651\u0627\u0646\u0650\u064A\" }]\r\n , [\"EZR\", { \"commonName\": \"\u0639\u064E\u0632\u0652\u0631\u0627\" }]\r\n , [\"NEH\", { \"commonName\": \"\u0646\u064E\u062D\u064E\u0645\u0652\u064A\u0627\" }]\r\n , [\"EST\", { \"commonName\": \"\u0623\u0633\u0652\u062A\u0650\u064A\u0631\" }]\r\n , [\"JOB\", { \"commonName\": \"\u0623\u064A\u064F\u0651\u0648\u0628\" }]\r\n , [\"PSA\", { \"commonName\": \"\u0627\u0644\u0645\u064E\u0632\u0627\u0645\u0650\u064A\u0631\" }]\r\n , [\"PRO\", { \"commonName\": \"\u0627\u0644\u0623\u0645\u062B\u0627\u0644\" }]\r\n , [\"ECC\", { \"commonName\": \"\u0627\u0644\u062C\u0627\u0645\u0650\u0639\u064E\u0629\" }]\r\n , [\"SNG\", { \"commonName\": \"\u0646\u064E\u0634\u0650\u064A\u062F\u0650 \u0627\u0644\u0623\u0646\u0634\u0627\u062F\" }]\r\n , [\"ISA\", { \"commonName\": \"\u0625\u0634\u064E\u0639\u0652\u064A\u0627\u0621\" }]\r\n , [\"JER\", { \"commonName\": \"\u0625\u0631\u0652\u0645\u0650\u064A\u0627\" }]\r\n , [\"LAM\", { \"commonName\": \"\uFEE3\uFEAE\uFE8D\uFE9B\uFEF2 \uFE87\uFEAD\uFEE3\uFEF4\uFE8E\" }]\r\n , [\"EZK\", { \"commonName\": \"\u062D\u0650\u0632\u0652\u0642\u0650\u064A\u0627\u0644\" }]\r\n , [\"DAN\", { \"commonName\": \"\u062F\u0627\u0646\u064A\u0627\u0644\" }]\r\n , [\"HOS\", { \"commonName\": \"\u0647\u064F\u0648\u0634\u064E\u0639\" }]\r\n , [\"JOL\", { \"commonName\": \"\u064A\u064F\u0648\u0626\u064A\u0644\" }]\r\n , [\"AMO\", { \"commonName\": \"\u0639\u0627\u0645\u064F\u0648\u0633\" }]\r\n , [\"OBA\", { \"commonName\": \"\u0639\u064F\u0648\u0628\u064E\u062F\u0652\u064A\u0627\" }]\r\n , [\"JON\", { \"commonName\": \"\uFEF3\uFEEE\uFEE7\uFE8E\uFEE5\" }]\r\n , [\"MIC\", { \"commonName\": \"\u0645\u064A\u062E\u0627\" }]\r\n , [\"NAM\", { \"commonName\": \"\u0646\u0627\u062D\u064F\u0648\u0645\" }]\r\n , [\"HAB\", { \"commonName\": \"\u062D\u064E\u0628\u064E\u0642\u064F\u0651\u0648\u0642\" }]\r\n , [\"ZEP\", { \"commonName\": \"\u0635\u064E\u0641\u064E\u0646\u0652\u064A\u0627\" }]\r\n , [\"HAG\", { \"commonName\": \"\u062D\u064E\u062C\u064E\u0651\u064A\" }]\r\n , [\"ZEC\", { \"commonName\": \"\u0632\u064E\u0643\u064E\u0631\u064A\u0651\u0627\" }]\r\n , [\"MAL\", { \"commonName\": \"\u0645\u064E\u0644\u0627\u062E\u0650\u064A\" }]\r\n , [\"MAT\", { \"commonName\": \"\uFEE3\uFE98\uFEF0\" }]\r\n , [\"MRK\", { \"commonName\": \"\u0645\u064E\u0631\u0652\u0642\u064F\u0633\" }]\r\n , [\"LUK\", { \"commonName\": \"\u0644\u064F\u0648\u0642\u0627\" }]\r\n , [\"JHN\", { \"commonName\": \"\u064A\u064F\u0648\u062D\u064E\u0646\u0651\u0627\" }]\r\n , [\"ACT\", { \"commonName\": \"\u0627\u0639\u0645\u0627\u0644 \u0627\u0644\u0631\u0633\u0644\" }]\r\n , [\"ROM\", { \"commonName\": \"\uFEAD\uFEED\uFEE3\uFEF4\uFE94\" }]\r\n , [\"1CO\", { \"commonName\": \"\uFEDB\uFEEE\uFEAD\uFEE7\uFE9C\uFEEE\uFEB1 \uFE8D\uFEFB\uFEED\uFEDD\" }]\r\n , [\"2CO\", { \"commonName\": \"\uFEDB\uFEEE\uFEAD\uFEE7\uFE9C\uFEEE\uFEB1 \uFE8D\uFEDF\uFE9C\uFE8E\uFEE7\uFEF4\uFE94\" }]\r\n , [\"GAL\", { \"commonName\": \"\u063A\u064E\u0644\u0627\u0637\u0650\u064A\u064E\u0651\u0629\" }]\r\n , [\"EPH\", { \"commonName\": \"\u0623\u0641\u064E\u0633\u064F\u0633\" }]\r\n , [\"PHP\", { \"commonName\": \"\u0641\u0650\u064A\u0644\u0650\u0628\u0650\u0651\u064A\" }]\r\n , [\"COL\", { \"commonName\": \"\u0643\u064F\u0648\u0644\u064F\u0648\u0633\u0650\u064A\" }]\r\n , [\"1TH\", { \"commonName\": \"\u0627\u0644\u0631\u0650\u0651\u0633\u0627\u0644\u064E\u0629\u064F \u0627\u0644\u0623\u064F\u0648\u0644\u064E\u0649 \u0625\u0644\u064E\u0649 \u062A\u064E\u0633\u0627\u0644\u064F\u0648\u0646\u0650\u064A\u0643\u0650\u064A\" }]\r\n , [\"2TH\", { \"commonName\": \"\u0627\u0644\u0631\u0650\u0651\u0633\u0627\u0644\u064E\u0629\u064F \u0627\u0644\u062B\u0651\u0627\u0646\u064A\u064E\u0629\u064F \u0625\u0644\u064E\u0649 \u062A\u064E\u0633\u0627\u0644\u064F\u0648\u0646\u0650\u064A\u0643\u0650\u064A\" }]\r\n , [\"1TI\", { \"commonName\": \"\u0627\u0644\u0631\u0650\u0651\u0633\u0627\u0644\u064E\u0629\u064F \u0627\u0644\u0623\u064F\u0648\u0644\u064E\u0649 \u0625\u0644\u064E\u0649 \u062A\u0650\u064A\u0645\u064F\u0648\u062B\u0627\u0648\u064F\u0633\" }]\r\n , [\"2TI\", { \"commonName\": \"\u0627\u0644\u0631\u0650\u0651\u0633\u0627\u0644\u064E\u0629\u064F \u0627\u0644\u062B\u0651\u0627\u0646\u064A\u064E\u0629\u064F \u0625\u0644\u064E\u0649 \u062A\u0650\u064A\u0645\u064F\u0648\u062B\u0627\u0648\u064F\u0633\" }]\r\n , [\"TIT\", { \"commonName\": \"\u062A\u0650\u064A\u0637\u064F\u0633\" }]\r\n , [\"PHM\", { \"commonName\": \"\u0641\u0650\u0644\u0650\u064A\u0652\u0645\u064F\u0648\u0646\" }]\r\n , [\"HEB\", { \"commonName\": \"\u0627\u0644\u0639\u0650\u0628\u0631\u0627\u0646\u0650\u064A\u0651\u064A\u0646\" }]\r\n , [\"JAS\", { \"commonName\": \"\u064A\u064E\u0639\u0642\u064F\u0648\u0628\" }]\r\n , [\"1PE\", { \"commonName\": \"\u0631\u0633\u0627\u0644\u064E\u0629\u064F \u0628\u064F\u0637\u0631\u064F\u0633\u064E \u0627\u0644\u0623\u064F\u0648\u0644\u064E\u0649\" }]\r\n , [\"2PE\", { \"commonName\": \"\u0631\u0633\u0627\u0644\u064E\u0629\u064F \u0628\u064F\u0637\u0631\u064F\u0633\u064E \u0627\u0644\u062B\u0651\u0627\u0646\u064A\u064E\u0629\" }]\r\n , [\"1JN\", { \"commonName\": \"\u0631\u0633\u0627\u0644\u064E\u0629\u064F \u064A\u064F\u0648\u062D\u064E\u0646\u0651\u0627 \u0627\u0644\u0623\u064F\u0648\u0644\u064E\u0649\" }]\r\n , [\"2JN\", { \"commonName\": \"\u0631\u0633\u0627\u0644\u064E\u0629\u064F \u064A\u064F\u0648\u062D\u064E\u0646\u0651\u0627 \u0627\u0644\u062B\u0651\u0627\u0646\u064A\u064E\u0629\" }]\r\n , [\"3JN\", { \"commonName\": \"\u0631\u0633\u0627\u0644\u064E\u0629\u064F \u064A\u064F\u0648\u062D\u064E\u0646\u0651\u0627 \u0627\u0644\u062B\u0651\u0627\u0644\u062B\u064E\u0629\" }]\r\n , [\"JUD\", { \"commonName\": \"\u064A\u064E\u0647\u064F\u0648\u0630\u0627\" }]\r\n , [\"REV\", { \"commonName\": \"\u0631\u064F\u0624\u064A\u0627 \u064A\u064F\u0648\u062D\u064E\u0646\u0651\u0627\" }]\r\n]);\r\n\r\n/**\r\n * Defines a map that maps a locale ID to a book name map.\r\n */\r\nexport const bookIdMap = new Map([\r\n ['en', englishBookMap],\r\n ['en-US', englishBookMap],\r\n ['eng', englishBookMap],\r\n ['arb', arabicBookMap]\r\n]);"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAIO,MAAM,eAAe,oBAAI,IAAI;AAAA,EAChC,CAAC,OAAO,CAAC;AAAA,EACP,CAAC,OAAO,CAAC;AAAA,EACT,CAAC,OAAO,CAAC;AAAA,EACT,CAAC,OAAO,CAAC;AAAA,EACT,CAAC,OAAO,CAAC;AAAA,EACT,CAAC,OAAO,CAAC;AAAA,EACT,CAAC,OAAO,CAAC;AAAA,EACT,CAAC,OAAO,CAAC;AAAA,EACT,CAAC,OAAO,CAAC;AAAA,EACT,CAAC,OAAO,EAAE;AAAA,EACV,CAAC,OAAO,EAAE;AAAA,EACV,CAAC,OAAO,EAAE;AAAA,EACV,CAAC,OAAO,EAAE;AAAA,EACV,CAAC,OAAO,EAAE;AAAA,EACV,CAAC,OAAO,EAAE;AAAA,EACV,CAAC,OAAO,EAAE;AAAA,EACV,CAAC,OAAO,EAAE;AAAA,EACV,CAAC,OAAO,EAAE;AAAA,EACV,CAAC,OAAO,EAAE;AAAA,EACV,CAAC,OAAO,EAAE;AAAA,EACV,CAAC,OAAO,EAAE;AAAA,EACV,CAAC,OAAO,EAAE;AAAA,EACV,CAAC,OAAO,EAAE;AAAA,EACV,CAAC,OAAO,EAAE;AAAA,EACV,CAAC,OAAO,EAAE;AAAA,EACV,CAAC,OAAO,EAAE;AAAA,EACV,CAAC,OAAO,EAAE;AAAA,EACV,CAAC,OAAO,EAAE;AAAA,EACV,CAAC,OAAO,EAAE;AAAA,EACV,CAAC,OAAO,EAAE;AAAA,EACV,CAAC,OAAO,EAAE;AAAA,EACV,CAAC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CAAC;AAAA,EACnE,CAAC,OAAO,EAAE,cAAc,0OAA4C,CAAC;AAAA,EACrE,CAAC,OAAO,EAAE,cAAc,kNAAwC,CAAC;AAAA,EACjE,CAAC,OAAO,EAAE,cAAc,8NAA0C,CAAC;AAAA,EACnE,CAAC,OAAO,EAAE,cAAc,uCAAS,CAAC;AAAA,EAClC,CAAC,OAAO,EAAE,cAAc,+DAAa,CAAC;AAAA,EACtC,CAAC,OAAO,EAAE,cAAc,iFAAgB,CAAC;AAAA,EACzC,CAAC,OAAO,EAAE,cAAc,6CAAU,CAAC;AAAA,EACnC,CAAC,OAAO,EAAE,cAAc,yIAA2B,CAAC;AAAA,EACpD,CAAC,OAAO,EAAE,cAAc,+IAA4B,CAAC;AAAA,EACrD,CAAC,OAAO,EAAE,cAAc,+IAA4B,CAAC;AAAA,EACrD,CAAC,OAAO,EAAE,cAAc,qJAA6B,CAAC;AAAA,EACtD,CAAC,OAAO,EAAE,cAAc,qJAA6B,CAAC;AAAA,EACtD,CAAC,OAAO,EAAE,cAAc,6CAAU,CAAC;AAAA,EACnC,CAAC,OAAO,EAAE,cAAc,kFAAiB,CAAC;AAChD,CAAC;AAKM,MAAM,YAAY,oBAAI,IAAI;AAAA,EAC7B,CAAC,MAAM,cAAc;AAAA,EACrB,CAAC,SAAS,cAAc;AAAA,EACxB,CAAC,OAAO,cAAc;AAAA,EACtB,CAAC,OAAO,aAAa;AACzB,CAAC;",
4
+ "sourcesContent": ["/**\n * Defines a map that maps the book ID of apocryphal books to the numerical order of the book.\n */\nexport const apocryphaBooks = new Map([\n // Apocryphal books\n ['TOB', 67],\n ['JDT', 68],\n ['ESG', 69],\n ['WIS', 70],\n ['SIR', 71],\n ['BAR', 72],\n ['LJE', 73],\n ['S3Y', 74],\n ['SUS', 75],\n ['BEL', 76],\n ['1MA', 77],\n ['2MA', 78],\n ['3MA', 79],\n ['4MA', 80],\n ['1ES', 81],\n ['2ES', 82],\n ['MAN', 83],\n ['PS2', 84],\n ['ODA', 85],\n ['PSS', 86],\n ['EZA', 87],\n ['5EZ', 88],\n ['6EZ', 89],\n ['DAG', 90],\n ['PS3', 91],\n ['2BA', 92],\n ['LBA', 93],\n ['JUB', 94],\n ['ENO', 95],\n ['1MQ', 96],\n ['2MQ', 97],\n ['3MQ', 98],\n ['REP', 99],\n ['4BA', 100],\n ['LAO', 101],\n]);\n\n/**\n * Defines a map that maps the book ID to the numerical order of the book.\n */\nexport const bookOrderMap = new Map([\n ['GEN', 1],\n ['EXO', 2],\n ['LEV', 3],\n ['NUM', 4],\n ['DEU', 5],\n ['JOS', 6],\n ['JDG', 7],\n ['RUT', 8],\n ['1SA', 9],\n ['2SA', 10],\n ['1KI', 11],\n ['2KI', 12],\n ['1CH', 13],\n ['2CH', 14],\n ['EZR', 15],\n ['NEH', 16],\n ['EST', 17],\n ['JOB', 18],\n ['PSA', 19],\n ['PRO', 20],\n ['ECC', 21],\n ['SNG', 22],\n ['ISA', 23],\n ['JER', 24],\n ['LAM', 25],\n ['EZK', 26],\n ['DAN', 27],\n ['HOS', 28],\n ['JOL', 29],\n ['AMO', 30],\n ['OBA', 31],\n ['JON', 32],\n ['MIC', 33],\n ['NAM', 34],\n ['HAB', 35],\n ['ZEP', 36],\n ['HAG', 37],\n ['ZEC', 38],\n ['MAL', 39],\n ['MAT', 40],\n ['MRK', 41],\n ['LUK', 42],\n ['JHN', 43],\n ['ACT', 44],\n ['ROM', 45],\n ['1CO', 46],\n ['2CO', 47],\n ['GAL', 48],\n ['EPH', 49],\n ['PHP', 50],\n ['COL', 51],\n ['1TH', 52],\n ['2TH', 53],\n ['1TI', 54],\n ['2TI', 55],\n ['TIT', 56],\n ['PHM', 57],\n ['HEB', 58],\n ['JAS', 59],\n ['1PE', 60],\n ['2PE', 61],\n ['1JN', 62],\n ['2JN', 63],\n ['3JN', 64],\n ['JUD', 65],\n ['REV', 66],\n ...apocryphaBooks,\n]);\n\n/**\n * Defines a map that maps the book ID to the number of chapters the book has.\n */\nexport const bookChapterCountMap = new Map([\n ['GEN', 50],\n ['EXO', 40],\n ['LEV', 27],\n ['NUM', 36],\n ['DEU', 34],\n ['JOS', 24],\n ['JDG', 21],\n ['RUT', 4],\n ['1SA', 31],\n ['2SA', 24],\n ['1KI', 22],\n ['2KI', 25],\n ['1CH', 29],\n ['2CH', 36],\n ['EZR', 10],\n ['NEH', 13],\n ['EST', 10],\n ['JOB', 42],\n ['PSA', 150],\n ['PRO', 31],\n ['ECC', 12],\n ['SNG', 8],\n ['ISA', 66],\n ['JER', 52],\n ['LAM', 5],\n ['EZK', 48],\n ['DAN', 12],\n ['HOS', 14],\n ['JOL', 3],\n ['AMO', 9],\n ['OBA', 1],\n ['JON', 4],\n ['MIC', 7],\n ['NAM', 3],\n ['HAB', 3],\n ['ZEP', 3],\n ['HAG', 2],\n ['ZEC', 14],\n ['MAL', 4],\n ['MAT', 28],\n ['MRK', 16],\n ['LUK', 24],\n ['JHN', 21],\n ['ACT', 28],\n ['ROM', 16],\n ['1CO', 16],\n ['2CO', 13],\n ['GAL', 6],\n ['EPH', 6],\n ['PHP', 4],\n ['COL', 4],\n ['1TH', 5],\n ['2TH', 3],\n ['1TI', 6],\n ['2TI', 4],\n ['TIT', 3],\n ['PHM', 1],\n ['HEB', 13],\n ['JAS', 5],\n ['1PE', 5],\n ['2PE', 3],\n ['1JN', 5],\n ['2JN', 1],\n ['3JN', 1],\n ['JUD', 1],\n ['REV', 22],\n]);\n\n/**\n * Defines a map that maps the book ID to the \"common\" enligsh name for the book.\n */\nconst englishBookMap = new Map([\n ['GEN', { commonName: 'Genesis' }],\n ['EXO', { commonName: 'Exodus' }],\n ['LEV', { commonName: 'Leviticus' }],\n ['NUM', { commonName: 'Numbers' }],\n ['DEU', { commonName: 'Deuteronomy' }],\n ['JOS', { commonName: 'Joshua' }],\n ['JDG', { commonName: 'Judges' }],\n ['RUT', { commonName: 'Ruth' }],\n ['1SA', { commonName: '1 Samuel' }],\n ['2SA', { commonName: '2 Samuel' }],\n ['1KI', { commonName: '1 Kings' }],\n ['2KI', { commonName: '2 Kings' }],\n ['1CH', { commonName: '1 Chronicles' }],\n ['2CH', { commonName: '2 Chronicles' }],\n ['EZR', { commonName: 'Ezra' }],\n ['NEH', { commonName: 'Nehemiah' }],\n ['EST', { commonName: 'Esther' }],\n ['JOB', { commonName: 'Job' }],\n ['PSA', { commonName: 'Psalms' }],\n ['PRO', { commonName: 'Proverbs' }],\n ['ECC', { commonName: 'Ecclesiastes' }],\n ['SNG', { commonName: 'Song of Songs' }],\n ['ISA', { commonName: 'Isaiah' }],\n ['JER', { commonName: 'Jeremiah' }],\n ['LAM', { commonName: 'Lamentations' }],\n ['EZK', { commonName: 'Ezekiel' }],\n ['DAN', { commonName: 'Daniel' }],\n ['HOS', { commonName: 'Hosea' }],\n ['JOL', { commonName: 'Joel' }],\n ['AMO', { commonName: 'Amos' }],\n ['OBA', { commonName: 'Obadiah' }],\n ['JON', { commonName: 'Jonah' }],\n ['MIC', { commonName: 'Micah' }],\n ['NAM', { commonName: 'Nahum' }],\n ['HAB', { commonName: 'Habakkuk' }],\n ['ZEP', { commonName: 'Zephaniah' }],\n ['HAG', { commonName: 'Haggai' }],\n ['ZEC', { commonName: 'Zechariah' }],\n ['MAL', { commonName: 'Malachi' }],\n ['MAT', { commonName: 'Matthew' }],\n ['MRK', { commonName: 'Mark' }],\n ['LUK', { commonName: 'Luke' }],\n ['JHN', { commonName: 'John' }],\n ['ACT', { commonName: 'Acts' }],\n ['ROM', { commonName: 'Romans' }],\n ['1CO', { commonName: '1 Corinthians' }],\n ['2CO', { commonName: '2 Corinthians' }],\n ['GAL', { commonName: 'Galatians' }],\n ['EPH', { commonName: 'Ephesians' }],\n ['PHP', { commonName: 'Philippians' }],\n ['COL', { commonName: 'Colossians' }],\n ['1TH', { commonName: '1 Thessalonians' }],\n ['2TH', { commonName: '2 Thessalonians' }],\n ['1TI', { commonName: '1 Timothy' }],\n ['2TI', { commonName: '2 Timothy' }],\n ['TIT', { commonName: 'Titus' }],\n ['PHM', { commonName: 'Philemon' }],\n ['HEB', { commonName: 'Hebrews' }],\n ['JAS', { commonName: 'James' }],\n ['1PE', { commonName: '1 Peter' }],\n ['2PE', { commonName: '2 Peter' }],\n ['1JN', { commonName: '1 John' }],\n ['2JN', { commonName: '2 John' }],\n ['3JN', { commonName: '3 John' }],\n ['JUD', { commonName: 'Jude' }],\n ['REV', { commonName: 'Revelation' }],\n]);\n\n/**\n * Defines a map that maps the book ID to the \"common\" arabic name for the book.\n */\nconst arabicBookMap = new Map([\n ['GEN', { commonName: '\u0627\u0644\u062A\u064E\u0651\u0643\u0648\u064A\u0646' }],\n ['EXO', { commonName: '\u0627\u0644\u062E\u064F\u0631\u064F\u0648\u062C' }],\n ['LEV', { commonName: '\u0627\u0644\u0644\u0651\u0627\u0648\u064A\u0650\u0651\u064A\u0646' }],\n ['NUM', { commonName: '\u0627\u0644\u0639\u064E\u062F\u064E\u062F' }],\n ['DEU', { commonName: '\u0627\u0644\u062A\u064E\u0651\u062B\u0652\u0646\u0650\u064A\u064E\u0629' }],\n ['JOS', { commonName: '\u064A\u064E\u0634\u064F\u0648\u0639' }],\n ['JDG', { commonName: '\u0627\u0644\u0642\u064F\u0636\u0627\u0629' }],\n ['RUT', { commonName: '\u0631\u0627\u0639\u064F\u0648\u062B' }],\n ['1SA', { commonName: '\u0635\u064E\u0645\u064F\u0648\u0626\u064A\u0644\u064E \u0627\u0644\u0623\u0648\u064E\u0651\u0644\u064F' }],\n ['2SA', { commonName: '\u0635\u0645\u0648\u0626\u064A\u0644\u064E \u0627\u0644\u062B\u0651\u0627\u0646\u0650\u064A' }],\n ['1KI', { commonName: '\u0627\u0644\u0645\u064F\u0644\u064F\u0648\u0643\u0650 \u0627\u0644\u0623\u0648\u064E\u0651\u0644\u064F' }],\n ['2KI', { commonName: '\u0627\u0644\u0645\u064F\u0644\u064F\u0648\u0643\u0650 \u0627\u0644\u062B\u0651\u0627\u0646\u0650\u064A' }],\n ['1CH', { commonName: '\u0623\u062E\u0628\u0627\u0631\u0650 \u0627\u0644\u0623\u064A\u0651\u0627\u0645\u0650 \u0627\u0644\u0623\u0648\u0651\u0644\u064F' }],\n ['2CH', { commonName: ' \u0623\u062E\u0628\u0627\u0631\u0650 \u0627\u0644\u0623\u064A\u0651\u0627\u0645\u0650 \u0627\u0644\u062B\u0651\u0627\u0646\u0650\u064A' }],\n ['EZR', { commonName: '\u0639\u064E\u0632\u0652\u0631\u0627' }],\n ['NEH', { commonName: '\u0646\u064E\u062D\u064E\u0645\u0652\u064A\u0627' }],\n ['EST', { commonName: '\u0623\u0633\u0652\u062A\u0650\u064A\u0631' }],\n ['JOB', { commonName: '\u0623\u064A\u064F\u0651\u0648\u0628' }],\n ['PSA', { commonName: '\u0627\u0644\u0645\u064E\u0632\u0627\u0645\u0650\u064A\u0631' }],\n ['PRO', { commonName: '\u0627\u0644\u0623\u0645\u062B\u0627\u0644' }],\n ['ECC', { commonName: '\u0627\u0644\u062C\u0627\u0645\u0650\u0639\u064E\u0629' }],\n ['SNG', { commonName: '\u0646\u064E\u0634\u0650\u064A\u062F\u0650 \u0627\u0644\u0623\u0646\u0634\u0627\u062F' }],\n ['ISA', { commonName: '\u0625\u0634\u064E\u0639\u0652\u064A\u0627\u0621' }],\n ['JER', { commonName: '\u0625\u0631\u0652\u0645\u0650\u064A\u0627' }],\n ['LAM', { commonName: '\uFEE3\uFEAE\uFE8D\uFE9B\uFEF2 \uFE87\uFEAD\uFEE3\uFEF4\uFE8E' }],\n ['EZK', { commonName: '\u062D\u0650\u0632\u0652\u0642\u0650\u064A\u0627\u0644' }],\n ['DAN', { commonName: '\u062F\u0627\u0646\u064A\u0627\u0644' }],\n ['HOS', { commonName: '\u0647\u064F\u0648\u0634\u064E\u0639' }],\n ['JOL', { commonName: '\u064A\u064F\u0648\u0626\u064A\u0644' }],\n ['AMO', { commonName: '\u0639\u0627\u0645\u064F\u0648\u0633' }],\n ['OBA', { commonName: '\u0639\u064F\u0648\u0628\u064E\u062F\u0652\u064A\u0627' }],\n ['JON', { commonName: '\uFEF3\uFEEE\uFEE7\uFE8E\uFEE5' }],\n ['MIC', { commonName: '\u0645\u064A\u062E\u0627' }],\n ['NAM', { commonName: '\u0646\u0627\u062D\u064F\u0648\u0645' }],\n ['HAB', { commonName: '\u062D\u064E\u0628\u064E\u0642\u064F\u0651\u0648\u0642' }],\n ['ZEP', { commonName: '\u0635\u064E\u0641\u064E\u0646\u0652\u064A\u0627' }],\n ['HAG', { commonName: '\u062D\u064E\u062C\u064E\u0651\u064A' }],\n ['ZEC', { commonName: '\u0632\u064E\u0643\u064E\u0631\u064A\u0651\u0627' }],\n ['MAL', { commonName: '\u0645\u064E\u0644\u0627\u062E\u0650\u064A' }],\n ['MAT', { commonName: '\uFEE3\uFE98\uFEF0' }],\n ['MRK', { commonName: '\u0645\u064E\u0631\u0652\u0642\u064F\u0633' }],\n ['LUK', { commonName: '\u0644\u064F\u0648\u0642\u0627' }],\n ['JHN', { commonName: '\u064A\u064F\u0648\u062D\u064E\u0646\u0651\u0627' }],\n ['ACT', { commonName: '\u0627\u0639\u0645\u0627\u0644 \u0627\u0644\u0631\u0633\u0644' }],\n ['ROM', { commonName: '\uFEAD\uFEED\uFEE3\uFEF4\uFE94' }],\n ['1CO', { commonName: '\uFEDB\uFEEE\uFEAD\uFEE7\uFE9C\uFEEE\uFEB1 \uFE8D\uFEFB\uFEED\uFEDD' }],\n ['2CO', { commonName: '\uFEDB\uFEEE\uFEAD\uFEE7\uFE9C\uFEEE\uFEB1 \uFE8D\uFEDF\uFE9C\uFE8E\uFEE7\uFEF4\uFE94' }],\n ['GAL', { commonName: '\u063A\u064E\u0644\u0627\u0637\u0650\u064A\u064E\u0651\u0629' }],\n ['EPH', { commonName: '\u0623\u0641\u064E\u0633\u064F\u0633' }],\n ['PHP', { commonName: '\u0641\u0650\u064A\u0644\u0650\u0628\u0650\u0651\u064A' }],\n ['COL', { commonName: '\u0643\u064F\u0648\u0644\u064F\u0648\u0633\u0650\u064A' }],\n ['1TH', { commonName: '\u0627\u0644\u0631\u0650\u0651\u0633\u0627\u0644\u064E\u0629\u064F \u0627\u0644\u0623\u064F\u0648\u0644\u064E\u0649 \u0625\u0644\u064E\u0649 \u062A\u064E\u0633\u0627\u0644\u064F\u0648\u0646\u0650\u064A\u0643\u0650\u064A' }],\n ['2TH', { commonName: '\u0627\u0644\u0631\u0650\u0651\u0633\u0627\u0644\u064E\u0629\u064F \u0627\u0644\u062B\u0651\u0627\u0646\u064A\u064E\u0629\u064F \u0625\u0644\u064E\u0649 \u062A\u064E\u0633\u0627\u0644\u064F\u0648\u0646\u0650\u064A\u0643\u0650\u064A' }],\n ['1TI', { commonName: '\u0627\u0644\u0631\u0650\u0651\u0633\u0627\u0644\u064E\u0629\u064F \u0627\u0644\u0623\u064F\u0648\u0644\u064E\u0649 \u0625\u0644\u064E\u0649 \u062A\u0650\u064A\u0645\u064F\u0648\u062B\u0627\u0648\u064F\u0633' }],\n ['2TI', { commonName: '\u0627\u0644\u0631\u0650\u0651\u0633\u0627\u0644\u064E\u0629\u064F \u0627\u0644\u062B\u0651\u0627\u0646\u064A\u064E\u0629\u064F \u0625\u0644\u064E\u0649 \u062A\u0650\u064A\u0645\u064F\u0648\u062B\u0627\u0648\u064F\u0633' }],\n ['TIT', { commonName: '\u062A\u0650\u064A\u0637\u064F\u0633' }],\n ['PHM', { commonName: '\u0641\u0650\u0644\u0650\u064A\u0652\u0645\u064F\u0648\u0646' }],\n ['HEB', { commonName: '\u0627\u0644\u0639\u0650\u0628\u0631\u0627\u0646\u0650\u064A\u0651\u064A\u0646' }],\n ['JAS', { commonName: '\u064A\u064E\u0639\u0642\u064F\u0648\u0628' }],\n ['1PE', { commonName: '\u0631\u0633\u0627\u0644\u064E\u0629\u064F \u0628\u064F\u0637\u0631\u064F\u0633\u064E \u0627\u0644\u0623\u064F\u0648\u0644\u064E\u0649' }],\n ['2PE', { commonName: '\u0631\u0633\u0627\u0644\u064E\u0629\u064F \u0628\u064F\u0637\u0631\u064F\u0633\u064E \u0627\u0644\u062B\u0651\u0627\u0646\u064A\u064E\u0629' }],\n ['1JN', { commonName: '\u0631\u0633\u0627\u0644\u064E\u0629\u064F \u064A\u064F\u0648\u062D\u064E\u0646\u0651\u0627 \u0627\u0644\u0623\u064F\u0648\u0644\u064E\u0649' }],\n ['2JN', { commonName: '\u0631\u0633\u0627\u0644\u064E\u0629\u064F \u064A\u064F\u0648\u062D\u064E\u0646\u0651\u0627 \u0627\u0644\u062B\u0651\u0627\u0646\u064A\u064E\u0629' }],\n ['3JN', { commonName: '\u0631\u0633\u0627\u0644\u064E\u0629\u064F \u064A\u064F\u0648\u062D\u064E\u0646\u0651\u0627 \u0627\u0644\u062B\u0651\u0627\u0644\u062B\u064E\u0629' }],\n ['JUD', { commonName: '\u064A\u064E\u0647\u064F\u0648\u0630\u0627' }],\n ['REV', { commonName: '\u0631\u064F\u0624\u064A\u0627 \u064A\u064F\u0648\u062D\u064E\u0646\u0651\u0627' }],\n]);\n\n/**\n * Defines a map that maps a locale ID to a book name map.\n */\nexport const bookIdMap = new Map([\n ['en', englishBookMap],\n ['en-US', englishBookMap],\n ['eng', englishBookMap],\n ['arb', arabicBookMap],\n]);\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGO,MAAM,iBAAiB,oBAAI,IAAI;AAAA;AAAA,EAElC,CAAC,OAAO,EAAE;AAAA,EACV,CAAC,OAAO,EAAE;AAAA,EACV,CAAC,OAAO,EAAE;AAAA,EACV,CAAC,OAAO,EAAE;AAAA,EACV,CAAC,OAAO,EAAE;AAAA,EACV,CAAC,OAAO,EAAE;AAAA,EACV,CAAC,OAAO,EAAE;AAAA,EACV,CAAC,OAAO,EAAE;AAAA,EACV,CAAC,OAAO,EAAE;AAAA,EACV,CAAC,OAAO,EAAE;AAAA,EACV,CAAC,OAAO,EAAE;AAAA,EACV,CAAC,OAAO,EAAE;AAAA,EACV,CAA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AO,EAAE,YAAY,6CAAU,CAAC;AAAA,EACjC,CAAC,OAAO,EAAE,YAAY,kFAAiB,CAAC;AAC5C,CAAC;AAKM,MAAM,YAAY,oBAAI,IAAI;AAAA,EAC7B,CAAC,MAAM,cAAc;AAAA,EACrB,CAAC,SAAS,cAAc;AAAA,EACxB,CAAC,OAAO,cAAc;AAAA,EACtB,CAAC,OAAO,aAAa;AACzB,CAAC;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../generation/common-types.ts"],
4
- "sourcesContent": ["import { VerseRef } from '../utils.js';\n\n/**\n * Defines an interface that contains information about a input file.\n */\nexport type InputFile = InputTranslationFile | InputCommentaryFile;\n\nexport interface InputFileBase {\n name?: string;\n content: string;\n sha256?: string;\n}\n\nexport type InputFileMetadata =\n | InputTranslationMetadata\n | InputCommentaryMetadata;\n\nexport interface InputTranslationFile extends InputFileBase {\n fileType: 'usfm' | 'usx' | 'json';\n metadata: InputTranslationMetadata;\n}\n\nexport interface InputCommentaryFile extends InputFileBase {\n fileType: 'commentary/csv' | 'commentary/tyndale-xml';\n metadata: InputCommentaryMetadata;\n}\n\nexport type OutputFileContent = object | ReadableStream;\n\n/**\n * Defines an interface that contains information about a output file.\n */\nexport interface OutputFile {\n /**\n * The path that the file should be stored at.\n */\n path: string;\n\n /**\n * The content of the file.\n */\n content: OutputFileContent | (() => Promise<OutputFileContent>);\n\n /**\n * Whether the file can be merged with files of the same name but from other datasets.\n */\n mergable?: boolean;\n}\n\nexport interface MetadataBase {\n /**\n * The name of the translation.\n */\n name: string;\n\n /**\n * The english name of the translation.\n */\n englishName: string;\n\n /**\n * The website for the translation.\n */\n website: string;\n\n /**\n * The URL that the license for the translation can be found.\n */\n licenseUrl: string;\n\n /**\n * The ISO 639 letter language tag that the translation is primarily in.\n */\n language: string;\n\n /**\n * The direction that the text is written in.\n */\n direction: 'ltr' | 'rtl';\n}\n\n/**\n * The metadata for a translation that is input into the generator.\n */\nexport interface InputTranslationMetadata extends MetadataBase {\n /**\n * The ID of the translation.\n */\n id: string;\n\n /**\n * The short name for the translation.\n */\n shortName?: string;\n}\n\n/**\n * The metadata for a translation that is input into the generator.\n */\nexport interface InputCommentaryMetadata extends MetadataBase {\n /**\n * The ID of the commentary.\n */\n id: string;\n}\n\n/**\n * Defines an interface that contains information about a translation.\n */\nexport interface Translation {\n /**\n * The ID of the translation.\n */\n id: string;\n\n /**\n * The name of the translation.\n */\n name: string;\n\n /**\n * The website for the translation.\n */\n website: string;\n\n /**\n * The URL that the license for the translation can be found.\n */\n licenseUrl: string;\n\n /**\n * The API-added notes for the license.\n */\n licenseNotes?: string | null;\n\n /**\n * The short name for the translation.\n */\n shortName?: string;\n\n /**\n * The English name for the translation.\n */\n englishName: string;\n\n /**\n * The ISO 639 3-letter language tag that the translation is primarily in.\n */\n language: string;\n\n /**\n * The direction that the language is written in.\n * \"ltr\" indicates that the text is written from the left side of the page to the right.\n * \"rtl\" indicates that the text is written from the right side of the page to the left.\n */\n textDirection: 'ltr' | 'rtl';\n}\n\n/**\n * Defines an interface that contains information about a commentary.\n */\nexport interface Commentary {\n /**\n * The ID of the commentary.\n */\n id: string;\n\n /**\n * The name of the commentary.\n */\n name: string;\n\n /**\n * The website for the commentary.\n */\n website: string;\n\n /**\n * The URL that the license for the commentary can be found.\n */\n licenseUrl: string;\n\n /**\n * The API-added notes for the license.\n */\n licenseNotes?: string | null;\n\n /**\n * The english name for the commentary.\n */\n englishName: string;\n\n /**\n * The ISO 639 3-letter language tag that the translation is primarily in.\n */\n language: string;\n\n /**\n * The direction that the language is written in.\n * \"ltr\" indicates that the text is written from the left side of the page to the right.\n * \"rtl\" indicates that the text is written from the right side of the page to the left.\n */\n textDirection: 'ltr' | 'rtl';\n}\n\n/**\n * Defines an interface that contains information about a book.\n */\nexport interface TranslationBook {\n /**\n * The ID of the book. Should match the USFM book ID.\n */\n id: string;\n\n /**\n * The name that the translation provided for the book.\n */\n name: string;\n\n /**\n * The common name for the book.\n */\n commonName: string;\n\n /**\n * The title of the book.\n * This is usually a more descriptive version of the book name.\n * If not available, then one was not provided by the translation.\n */\n title: string | null;\n\n /**\n * The numerical order of the book in the translation.\n */\n order: number;\n}\n\n/**\n * Defines an interface that contains information about a book in a commentary.\n */\nexport interface CommentaryBook {\n /**\n * The ID of the book. Should match the USFM book ID.\n */\n id: string;\n\n /**\n * The name that the commentary provided for the book.\n */\n name: string;\n\n /**\n * The common name for the book.\n */\n commonName: string;\n\n /**\n * The commentary's introduction for the book.\n */\n introduction?: string;\n\n /**\n * The summary of the commentary's introduction for the book.\n */\n introductionSummary?: string;\n\n /**\n * The order of the book in the Bible.\n */\n order: number;\n}\n\n/**\n * Defines an interface that contains information about a profile in a commentary.\n */\nexport interface CommentaryProfile {\n /**\n * The ID of the profile.\n */\n id: string;\n\n /**\n * The subject of the profile.\n */\n subject: string;\n\n /**\n * The Bible reference that the profile is associated with.\n */\n reference: VerseRef | null;\n}\n\n/**\n * Defines an interface that contains information about a book chapter.\n */\nexport interface TranslationBookChapter {\n /**\n * The information for the chapter.\n */\n chapter: ChapterData;\n\n /**\n * The links to different audio versions for the chapter.\n */\n thisChapterAudioLinks: TranslationBookChapterAudioLinks;\n}\n\n/**\n * Defines an interface that contains information about a book chapter in a commentary.\n */\nexport interface CommentaryBookChapter {\n /**\n * The information for the chapter.\n */\n chapter: CommentaryChapterData;\n}\n\n/**\n * Defines an interface that contains the audio links for a book chapter.\n */\nexport interface TranslationBookChapterAudioLinks {\n /**\n * The reader for the chapter and the URL link to the audio file.\n */\n [reader: string]: string;\n}\n\n/**\n * Defines an interface that represents data in a chapter.\n */\nexport interface ChapterData {\n /**\n * The number of the chapter.\n */\n number: number;\n\n /**\n * The content of the chapter.\n */\n content: ChapterContent[];\n\n /**\n * The list of footnotes for the chapter.\n */\n footnotes: ChapterFootnote[];\n}\n\n/**\n * Defines an interface that represents data in a chapter in a commentary.\n */\nexport interface CommentaryChapterData {\n /**\n * The number of the chapter.\n */\n number: number;\n\n /**\n * The introduction that the commentary provided to the chapter.\n * Not all commentaries provide an introduction to a chapter.\n */\n introduction?: string;\n\n /**\n * The content of the chapter.\n */\n content: ChapterVerse[];\n}\n\n/**\n * A union type that represents a single piece of chapter content.\n * A piece of chapter content can be one of the following things:\n * - A heading.\n * - A line break.\n * - A verse.\n * - A Hebrew Subtitle.\n */\nexport type ChapterContent =\n | ChapterHeading\n | ChapterLineBreak\n | ChapterVerse\n | ChapterHebrewSubtitle;\n\n/**\n * A heading in a chapter.\n */\nexport interface ChapterHeading {\n /**\n * Indicates that the content represents a heading.\n */\n type: 'heading';\n\n /**\n * The content for the heading.\n * If multiple strings are included in the array, they should be concatenated with a space.\n */\n content: string[];\n}\n\n/**\n * A line break in a chapter.\n */\nexport interface ChapterLineBreak {\n /**\n * Indicates that the content represents a line break.\n */\n type: 'line_break';\n}\n\n/**\n * A Hebrew Subtitle in a chapter.\n * These are often used included as informational content that appeared in the original manuscripts.\n * For example, Psalms 49 has the Hebrew Subtitle \"To the choirmaster. A Psalm of the Sons of Korah.\"\n */\nexport interface ChapterHebrewSubtitle {\n /**\n * Indicates that the content represents a Hebrew Subtitle.\n */\n type: 'hebrew_subtitle';\n\n /**\n * The list of content that is contained in the subtitle.\n * Each element in the list could be a string, formatted text, or a footnote reference.\n */\n content: (string | FormattedText | VerseFootnoteReference)[];\n}\n\n/**\n * A verse in a chapter.\n */\nexport interface ChapterVerse {\n /**\n * Indicates that the content is a verse.\n */\n type: 'verse';\n\n /**\n * The number of the verse.\n */\n number: number;\n\n /**\n * The list of content for the verse.\n * Each element in the list could be a string, formatted text, or a footnote reference.\n */\n content: (\n | string\n | FormattedText\n | InlineHeading\n | InlineLineBreak\n | VerseFootnoteReference\n )[];\n}\n\n/**\n * Formatted text. That is, text that is formated in a particular manner.\n */\nexport interface FormattedText {\n /**\n * The text that is formatted.\n */\n text: string;\n\n /**\n * Whether the text represents a poem.\n * The number indicates the level of indent.\n *\n * Common in Psalms.\n */\n poem?: number;\n\n /**\n * Whether the text represents the Words of Jesus.\n */\n wordsOfJesus?: boolean;\n}\n\n/**\n * Defines an interface that represents a heading that is embedded in a verse.\n */\nexport interface InlineHeading {\n /**\n * The text of the heading.\n */\n heading: string;\n}\n\n/**\n * Defines an interface that represents a line break that is embedded in a verse.\n */\nexport interface InlineLineBreak {\n lineBreak: true;\n}\n\n/**\n * A footnote reference in a verse or a Hebrew Subtitle.\n */\nexport interface VerseFootnoteReference {\n /**\n * The ID of the note.\n */\n noteId: number;\n}\n\n/**\n * Information about a footnote.\n */\nexport interface ChapterFootnote {\n /**\n * The ID of the note that is referenced.\n */\n noteId: number;\n\n /**\n * The text of the footnote.\n */\n text: string;\n\n /**\n * The verse reference for the footnote.\n */\n reference?: {\n chapter: number;\n verse: number;\n };\n\n /**\n * The caller that should be used for the footnote.\n * For footnotes, a \"caller\" is the character that is used in the text to reference to footnote.\n *\n * For example, in the text:\n * Hello (a) World\n *\n * ----\n * (a) This is a footnote.\n *\n * The \"(a)\" is the caller.\n *\n * If \"+\", then the caller should be autogenerated.\n * If null, then the caller should be empty.\n * If a string, then the caller should be that string.\n */\n caller: '+' | string | null;\n}\n"],
4
+ "sourcesContent": ["import { VerseRef } from '../utils.js';\n\n/**\n * Defines an interface that contains information about a input file.\n */\nexport type InputFile = InputTranslationFile | InputCommentaryFile;\n\nexport interface InputFileBase {\n name?: string;\n content: string;\n sha256?: string;\n}\n\nexport type InputFileMetadata =\n | InputTranslationMetadata\n | InputCommentaryMetadata;\n\nexport interface InputTranslationFile extends InputFileBase {\n fileType: 'usfm' | 'usx' | 'json';\n metadata: InputTranslationMetadata;\n}\n\nexport interface InputCommentaryFile extends InputFileBase {\n fileType: 'commentary/csv' | 'commentary/tyndale-xml';\n metadata: InputCommentaryMetadata;\n}\n\nexport type OutputFileContent = object | ReadableStream;\n\n/**\n * Defines an interface that contains information about a output file.\n */\nexport interface OutputFile {\n /**\n * The path that the file should be stored at.\n */\n path: string;\n\n /**\n * The content of the file.\n */\n content: OutputFileContent | (() => Promise<OutputFileContent>);\n\n /**\n * Whether the file can be merged with files of the same name but from other datasets.\n */\n mergable?: boolean;\n}\n\nexport interface MetadataBase {\n /**\n * The name of the translation.\n */\n name: string;\n\n /**\n * The english name of the translation.\n */\n englishName: string;\n\n /**\n * The website for the translation.\n */\n website: string;\n\n /**\n * The URL that the license for the translation can be found.\n */\n licenseUrl: string;\n\n /**\n * The ISO 639 letter language tag that the translation is primarily in.\n */\n language: string;\n\n /**\n * The direction that the text is written in.\n */\n direction: 'ltr' | 'rtl';\n}\n\n/**\n * The metadata for a translation that is input into the generator.\n */\nexport interface InputTranslationMetadata extends MetadataBase {\n /**\n * The ID of the translation.\n */\n id: string;\n\n /**\n * The short name for the translation.\n */\n shortName: string;\n}\n\n/**\n * The metadata for a translation that is input into the generator.\n */\nexport interface InputCommentaryMetadata extends MetadataBase {\n /**\n * The ID of the commentary.\n */\n id: string;\n}\n\n/**\n * Defines an interface that contains information about a translation.\n */\nexport interface Translation {\n /**\n * The ID of the translation.\n */\n id: string;\n\n /**\n * The name of the translation.\n */\n name: string;\n\n /**\n * The website for the translation.\n */\n website: string;\n\n /**\n * The URL that the license for the translation can be found.\n */\n licenseUrl: string;\n\n /**\n * The API-added notes for the license.\n */\n licenseNotes?: string | null;\n\n /**\n * The short name for the translation.\n */\n shortName?: string;\n\n /**\n * The English name for the translation.\n */\n englishName: string;\n\n /**\n * The ISO 639 3-letter language tag that the translation is primarily in.\n */\n language: string;\n\n /**\n * The direction that the language is written in.\n * \"ltr\" indicates that the text is written from the left side of the page to the right.\n * \"rtl\" indicates that the text is written from the right side of the page to the left.\n */\n textDirection: 'ltr' | 'rtl';\n}\n\n/**\n * Defines an interface that contains information about a commentary.\n */\nexport interface Commentary {\n /**\n * The ID of the commentary.\n */\n id: string;\n\n /**\n * The name of the commentary.\n */\n name: string;\n\n /**\n * The website for the commentary.\n */\n website: string;\n\n /**\n * The URL that the license for the commentary can be found.\n */\n licenseUrl: string;\n\n /**\n * The API-added notes for the license.\n */\n licenseNotes?: string | null;\n\n /**\n * The english name for the commentary.\n */\n englishName: string;\n\n /**\n * The ISO 639 3-letter language tag that the translation is primarily in.\n */\n language: string;\n\n /**\n * The direction that the language is written in.\n * \"ltr\" indicates that the text is written from the left side of the page to the right.\n * \"rtl\" indicates that the text is written from the right side of the page to the left.\n */\n textDirection: 'ltr' | 'rtl';\n}\n\n/**\n * Defines an interface that contains information about a book.\n */\nexport interface TranslationBook {\n /**\n * The ID of the book. Should match the USFM book ID.\n */\n id: string;\n\n /**\n * The name that the translation provided for the book.\n */\n name: string;\n\n /**\n * The common name for the book.\n */\n commonName: string;\n\n /**\n * The title of the book.\n * This is usually a more descriptive version of the book name.\n * If not available, then one was not provided by the translation.\n */\n title: string | null;\n\n /**\n * The numerical order of the book in the translation.\n */\n order: number;\n\n /**\n * Whether the book is an apocryphal book.\n */\n isApocryphal?: boolean;\n}\n\n/**\n * Defines an interface that contains information about a book in a commentary.\n */\nexport interface CommentaryBook {\n /**\n * The ID of the book. Should match the USFM book ID.\n */\n id: string;\n\n /**\n * The name that the commentary provided for the book.\n */\n name: string;\n\n /**\n * The common name for the book.\n */\n commonName: string;\n\n /**\n * The commentary's introduction for the book.\n */\n introduction?: string;\n\n /**\n * The summary of the commentary's introduction for the book.\n */\n introductionSummary?: string;\n\n /**\n * The order of the book in the Bible.\n */\n order: number;\n}\n\n/**\n * Defines an interface that contains information about a profile in a commentary.\n */\nexport interface CommentaryProfile {\n /**\n * The ID of the profile.\n */\n id: string;\n\n /**\n * The subject of the profile.\n */\n subject: string;\n\n /**\n * The Bible reference that the profile is associated with.\n */\n reference: VerseRef | null;\n}\n\n/**\n * Defines an interface that contains information about a book chapter.\n */\nexport interface TranslationBookChapter {\n /**\n * The information for the chapter.\n */\n chapter: ChapterData;\n\n /**\n * The links to different audio versions for the chapter.\n */\n thisChapterAudioLinks: TranslationBookChapterAudioLinks;\n}\n\n/**\n * Defines an interface that contains information about a book chapter in a commentary.\n */\nexport interface CommentaryBookChapter {\n /**\n * The information for the chapter.\n */\n chapter: CommentaryChapterData;\n}\n\n/**\n * Defines an interface that contains the audio links for a book chapter.\n */\nexport interface TranslationBookChapterAudioLinks {\n /**\n * The reader for the chapter and the URL link to the audio file.\n */\n [reader: string]: string;\n}\n\n/**\n * Defines an interface that represents data in a chapter.\n */\nexport interface ChapterData {\n /**\n * The number of the chapter.\n */\n number: number;\n\n /**\n * The content of the chapter.\n */\n content: ChapterContent[];\n\n /**\n * The list of footnotes for the chapter.\n */\n footnotes: ChapterFootnote[];\n}\n\n/**\n * Defines an interface that represents data in a chapter in a commentary.\n */\nexport interface CommentaryChapterData {\n /**\n * The number of the chapter.\n */\n number: number;\n\n /**\n * The introduction that the commentary provided to the chapter.\n * Not all commentaries provide an introduction to a chapter.\n */\n introduction?: string;\n\n /**\n * The content of the chapter.\n */\n content: ChapterVerse[];\n}\n\n/**\n * A union type that represents a single piece of chapter content.\n * A piece of chapter content can be one of the following things:\n * - A heading.\n * - A line break.\n * - A verse.\n * - A Hebrew Subtitle.\n */\nexport type ChapterContent =\n | ChapterHeading\n | ChapterLineBreak\n | ChapterVerse\n | ChapterHebrewSubtitle;\n\n/**\n * A heading in a chapter.\n */\nexport interface ChapterHeading {\n /**\n * Indicates that the content represents a heading.\n */\n type: 'heading';\n\n /**\n * The content for the heading.\n * If multiple strings are included in the array, they should be concatenated with a space.\n */\n content: string[];\n}\n\n/**\n * A line break in a chapter.\n */\nexport interface ChapterLineBreak {\n /**\n * Indicates that the content represents a line break.\n */\n type: 'line_break';\n}\n\n/**\n * A Hebrew Subtitle in a chapter.\n * These are often used included as informational content that appeared in the original manuscripts.\n * For example, Psalms 49 has the Hebrew Subtitle \"To the choirmaster. A Psalm of the Sons of Korah.\"\n */\nexport interface ChapterHebrewSubtitle {\n /**\n * Indicates that the content represents a Hebrew Subtitle.\n */\n type: 'hebrew_subtitle';\n\n /**\n * The list of content that is contained in the subtitle.\n * Each element in the list could be a string, formatted text, or a footnote reference.\n */\n content: (string | FormattedText | VerseFootnoteReference)[];\n}\n\n/**\n * A verse in a chapter.\n */\nexport interface ChapterVerse {\n /**\n * Indicates that the content is a verse.\n */\n type: 'verse';\n\n /**\n * The number of the verse.\n */\n number: number;\n\n /**\n * The list of content for the verse.\n * Each element in the list could be a string, formatted text, or a footnote reference.\n */\n content: (\n | string\n | FormattedText\n | InlineHeading\n | InlineLineBreak\n | VerseFootnoteReference\n )[];\n}\n\n/**\n * Formatted text. That is, text that is formated in a particular manner.\n */\nexport interface FormattedText {\n /**\n * The text that is formatted.\n */\n text: string;\n\n /**\n * Whether the text represents a poem.\n * The number indicates the level of indent.\n *\n * Common in Psalms.\n */\n poem?: number;\n\n /**\n * Whether the text represents the Words of Jesus.\n */\n wordsOfJesus?: boolean;\n}\n\n/**\n * Defines an interface that represents a heading that is embedded in a verse.\n */\nexport interface InlineHeading {\n /**\n * The text of the heading.\n */\n heading: string;\n}\n\n/**\n * Defines an interface that represents a line break that is embedded in a verse.\n */\nexport interface InlineLineBreak {\n lineBreak: true;\n}\n\n/**\n * A footnote reference in a verse or a Hebrew Subtitle.\n */\nexport interface VerseFootnoteReference {\n /**\n * The ID of the note.\n */\n noteId: number;\n}\n\n/**\n * Information about a footnote.\n */\nexport interface ChapterFootnote {\n /**\n * The ID of the note that is referenced.\n */\n noteId: number;\n\n /**\n * The text of the footnote.\n */\n text: string;\n\n /**\n * The verse reference for the footnote.\n */\n reference?: {\n chapter: number;\n verse: number;\n };\n\n /**\n * The caller that should be used for the footnote.\n * For footnotes, a \"caller\" is the character that is used in the text to reference to footnote.\n *\n * For example, in the text:\n * Hello (a) World\n *\n * ----\n * (a) This is a footnote.\n *\n * The \"(a)\" is the caller.\n *\n * If \"+\", then the caller should be autogenerated.\n * If null, then the caller should be empty.\n * If a string, then the caller should be that string.\n */\n caller: '+' | string | null;\n}\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;AAAA;AAAA;",
6
6
  "names": []
7
7
  }
@@ -65,6 +65,10 @@ function generateDataset(files, parser = new globalThis.DOMParser(), bookMap) {
65
65
  continue;
66
66
  }
67
67
  const parsed = parser2.parse(file.content);
68
+ if ("parseMessages" in parsed && parsed.parseMessages && file.name) {
69
+ const messages = output.parseMessages = output.parseMessages || {};
70
+ messages[file.name] = parsed.parseMessages;
71
+ }
68
72
  if (parsed.type === "root") {
69
73
  addTranslationTree(file, parsed);
70
74
  } else {
@@ -92,6 +96,7 @@ function generateDataset(files, parser = new globalThis.DOMParser(), bookMap) {
92
96
  logger.warn("[generate] Book does not have an order!", id);
93
97
  return;
94
98
  }
99
+ const isApocryphal = import_book_order.apocryphaBooks.has(id);
95
100
  const bookName = getBookNames(file, file.metadata, id);
96
101
  let translation = parsedTranslations.get(file.metadata.id);
97
102
  if (!translation) {
@@ -103,12 +108,12 @@ function generateDataset(files, parser = new globalThis.DOMParser(), bookMap) {
103
108
  output.translations.push(translation);
104
109
  parsedTranslations.set(file.metadata.id, translation);
105
110
  }
106
- const name = parsed.header ?? bookName?.bookName?.commonName ?? parsed.title;
111
+ const name = parsed.header ?? (bookName?.exactMatch ? bookName?.bookName?.commonName : null) ?? parsed.title ?? bookName?.bookName?.commonName;
107
112
  if (!name) {
108
113
  logger.warn("[generate] Book does not have a name!", file.name, id);
109
114
  return;
110
115
  }
111
- const commonName = bookName?.bookName?.commonName ?? parsed.header ?? parsed.title ?? id;
116
+ const commonName = (bookName?.exactMatch ? bookName?.bookName?.commonName : null) ?? parsed.header ?? parsed.title ?? bookName?.bookName?.commonName ?? id;
112
117
  const book = {
113
118
  id,
114
119
  name,
@@ -117,6 +122,9 @@ function generateDataset(files, parser = new globalThis.DOMParser(), bookMap) {
117
122
  order,
118
123
  chapters: []
119
124
  };
125
+ if (isApocryphal) {
126
+ book.isApocryphal = true;
127
+ }
120
128
  for (let content of parsed.content) {
121
129
  if (content.type === "chapter") {
122
130
  book.chapters.push({
@@ -216,9 +224,11 @@ function generateDataset(files, parser = new globalThis.DOMParser(), bookMap) {
216
224
  commentary.profiles = (0, import_lodash.sortBy)(commentary.profiles, (p) => p.id);
217
225
  }
218
226
  function getBookNames(file, metadata, id) {
219
- if (!bookMap) {
220
- bookMap = import_book_order.bookIdMap.get(metadata.language);
221
- if (!bookMap) {
227
+ let exactMatch = true;
228
+ let map = bookMap;
229
+ if (!map) {
230
+ map = import_book_order.bookIdMap.get(metadata.language);
231
+ if (!map) {
222
232
  if (!unknownLanguages.has(metadata.language)) {
223
233
  logger.warn(
224
234
  "[generate] File does not have a known language!",
@@ -230,11 +240,12 @@ function generateDataset(files, parser = new globalThis.DOMParser(), bookMap) {
230
240
  logger.warn(
231
241
  "[generate] Using English book map for unknown language! This might result in outputting english book names."
232
242
  );
233
- bookMap = import_book_order.bookIdMap.get("en");
243
+ exactMatch = false;
244
+ map = import_book_order.bookIdMap.get("en");
234
245
  }
235
246
  }
236
- const bookName = bookMap?.get(id);
237
- if (!!bookMap && !bookName) {
247
+ const bookName = map?.get(id);
248
+ if (!!map && !bookName) {
238
249
  logger.warn(
239
250
  "[generate] Book name not found for ID!",
240
251
  file.name,
@@ -243,6 +254,7 @@ function generateDataset(files, parser = new globalThis.DOMParser(), bookMap) {
243
254
  return null;
244
255
  }
245
256
  return {
257
+ exactMatch,
246
258
  bookName
247
259
  };
248
260
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../generation/dataset.ts"],
4
- "sourcesContent": ["import { UsfmParser } from '../parser/usfm-parser.js';\nimport { USXParser } from '../parser/usx-parser.js';\nimport {\n Commentary,\n CommentaryBook,\n CommentaryBookChapter,\n CommentaryChapterData,\n CommentaryProfile,\n InputCommentaryFile,\n InputFile,\n InputFileBase,\n InputTranslationFile,\n MetadataBase,\n Translation,\n TranslationBook,\n TranslationBookChapter,\n} from './common-types.js';\nimport { bookIdMap as defaultBookIdMap, bookOrderMap } from './book-order.js';\nimport { omit, sortBy, sortedIndexBy } from 'lodash';\nimport { getAudioUrlsForChapter } from './audio.js';\nimport { CodexParser } from '../parser/codex-parser.js';\nimport { CommentaryCsvParser } from '../parser/commentary-csv-parser.js';\nimport { CommentaryParseTree, ParseTree } from '../parser/types.js';\nimport { TyndaleXmlParser } from '../parser/tyndale-xml-parser.js';\nimport { getLogger } from '../log.js';\n\n/**\n * Defines an interface that contains generated dataset info.\n */\nexport interface DatasetOutput {\n /**\n * The list of translations that are available in the dataset.\n */\n translations: DatasetTranslation[];\n\n /**\n * The list of commentaries that are available in the dataset.\n */\n commentaries: DatasetCommentary[];\n}\n\n/**\n * Defines a translation that is used in the dataset.\n */\nexport interface DatasetTranslation extends Translation {\n /**\n * The list of books that are available for the translation.\n */\n books: DatasetTranslationBook[];\n}\n\n/**\n * Defines a commentary that is used in the dataset.\n */\nexport interface DatasetCommentary extends Commentary {\n /**\n * The list of books that are available for the commentary.\n */\n books: DatasetCommentaryBook[];\n\n /**\n * The list of profiles that are available for the commentary.\n */\n profiles: DatasetCommentaryProfile[];\n}\n\n/**\n * Defines a translation book that is used in the dataset.\n */\nexport interface DatasetTranslationBook extends TranslationBook {\n /**\n * The list of chapters that are available for the book.\n */\n chapters: TranslationBookChapter[];\n}\n\n/**\n * Defines a commentary book that is used in the dataset.\n */\nexport interface DatasetCommentaryBook extends CommentaryBook {\n /**\n * The list of chapters that are available for the book.\n */\n chapters: CommentaryBookChapter[];\n}\n\nexport interface DatasetCommentaryProfile extends CommentaryProfile {\n /**\n * The contents of the profile.\n */\n content: string[];\n}\n\n/**\n * Generates a list of output files from the given list of input files.\n * @param file The list of files.\n * @param parser The parser to use for parsing the files.\n * @param bookMap The map of book IDs to names. If undefined, then a default map will be used.\n */\nexport function generateDataset(\n files: InputFile[],\n parser: DOMParser = new globalThis.DOMParser(),\n bookMap?: Map<string, { commonName: string }> | undefined\n): DatasetOutput {\n const logger = getLogger();\n let output: DatasetOutput = {\n translations: [],\n commentaries: [],\n };\n\n let usfmParser = new UsfmParser();\n let usxParser = new USXParser(parser);\n let codexParser = new CodexParser();\n let csvCommentaryParser = new CommentaryCsvParser();\n let tyndaleXmlParser = new TyndaleXmlParser(parser);\n\n let parsedTranslations = new Map<string, DatasetTranslation>();\n let parsedCommentaries = new Map<string, DatasetCommentary>();\n\n const unknownLanguages = new Set<string>();\n for (let file of files) {\n try {\n let parser:\n | UsfmParser\n | USXParser\n | CodexParser\n | CommentaryCsvParser\n | TyndaleXmlParser;\n if (file.fileType === 'usfm') {\n parser = usfmParser;\n } else if (file.fileType === 'usx') {\n parser = usxParser;\n } else if (file.fileType === 'json') {\n parser = codexParser;\n } else if (file.fileType === 'commentary/csv') {\n parser = csvCommentaryParser;\n } else if (file.fileType === 'commentary/tyndale-xml') {\n parser = tyndaleXmlParser;\n } else {\n logger.warn(\n '[generate] File does not have a valid type!',\n file.name\n );\n continue;\n }\n\n const parsed = parser.parse(file.content);\n\n if (parsed.type === 'root') {\n addTranslationTree(file as InputTranslationFile, parsed);\n } else {\n addCommentaryTree(file as InputCommentaryFile, parsed);\n }\n } catch (err) {\n logger.error(\n `[generate] Error occurred while parsing ${file.name}`,\n err\n );\n }\n }\n\n function addTranslationTree(file: InputTranslationFile, parsed: ParseTree) {\n const id = parsed.id;\n\n if (!id) {\n logger.warn(\n '[generate] File does not have a valid book ID!',\n file.name,\n id\n );\n return;\n }\n\n const order = bookOrderMap.get(id);\n\n if (typeof order !== 'number') {\n logger.warn('[generate] Book does not have an order!', id);\n return;\n }\n\n const bookName = getBookNames(file, file.metadata, id);\n\n let translation = parsedTranslations.get(file.metadata.id);\n\n if (!translation) {\n translation = {\n ...omit(file.metadata, 'direction'),\n textDirection: file.metadata.direction,\n books: [],\n };\n output.translations.push(translation);\n parsedTranslations.set(file.metadata.id, translation);\n }\n\n const name =\n parsed.header ?? bookName?.bookName?.commonName ?? parsed.title;\n\n if (!name) {\n logger.warn('[generate] Book does not have a name!', file.name, id);\n return;\n }\n\n const commonName =\n bookName?.bookName?.commonName ??\n parsed.header ??\n parsed.title ??\n id;\n\n const book: DatasetTranslationBook = {\n id: id,\n name,\n commonName,\n title: parsed.title ?? null,\n order,\n chapters: [],\n };\n\n for (let content of parsed.content) {\n if (content.type === 'chapter') {\n book.chapters.push({\n chapter: {\n number: content.number,\n content: content.content,\n footnotes: content.footnotes,\n },\n thisChapterAudioLinks: getAudioUrlsForChapter(\n translation.id,\n id,\n content.number\n ),\n });\n }\n }\n\n book.chapters = sortBy(book.chapters, (c) => c.chapter.number);\n\n const index = sortedIndexBy(translation.books, book, (b) => b.order);\n translation.books.splice(index, 0, book);\n }\n\n function addCommentaryTree(\n file: InputCommentaryFile,\n parsed: CommentaryParseTree\n ) {\n let commentary = parsedCommentaries.get(file.metadata.id);\n\n if (!commentary) {\n commentary = {\n ...omit(file.metadata, 'direction'),\n textDirection: file.metadata.direction,\n books: [],\n profiles: [],\n };\n output.commentaries.push(commentary);\n parsedCommentaries.set(file.metadata.id, commentary);\n }\n\n for (let parsedBook of parsed.books) {\n let book = commentary.books.find((b) => b.id === parsedBook.book);\n if (book && book.introduction && parsedBook.introduction) {\n logger.warn(\n '[generate] Book already exists in commentary!',\n file.name,\n parsedBook.book\n );\n continue;\n }\n\n if (!book) {\n const name = getBookNames(file, file.metadata, parsedBook.book);\n book = {\n id: parsedBook.book,\n order: bookOrderMap.get(parsedBook.book) ?? -1,\n commonName: name?.bookName?.commonName ?? parsedBook.book,\n name: name?.bookName?.commonName ?? parsedBook.book,\n chapters: [],\n };\n }\n\n if (parsedBook.introduction) {\n book.introduction = parsedBook.introduction;\n }\n\n if (parsedBook.introductionSummary && !book.introductionSummary) {\n book.introductionSummary = parsedBook.introductionSummary;\n }\n\n for (let chapter of parsedBook.chapters) {\n let data: CommentaryChapterData = {\n number: chapter.number,\n content: chapter.verses,\n };\n\n if (chapter.introduction) {\n data.introduction = chapter.introduction;\n }\n\n book.chapters.push({\n chapter: data,\n });\n }\n\n book.chapters = sortBy(book.chapters, (c) => c.chapter.number);\n commentary.books.push(book);\n }\n\n if (parsed.profiles) {\n for (let profile of parsed.profiles) {\n const existing = commentary.profiles.find(\n (p) => p.id === profile.id\n );\n if (existing) {\n logger.warn(\n '[generate] Profile already exists in commentary!',\n file.name,\n profile.id\n );\n continue;\n }\n\n const datasetProfile: DatasetCommentaryProfile = {\n id: profile.id,\n subject: profile.subject,\n reference: profile.reference,\n content: profile.content,\n };\n\n commentary.profiles.push(datasetProfile);\n }\n }\n\n commentary.books = sortBy(commentary.books, (b) => b.order);\n commentary.profiles = sortBy(commentary.profiles, (p) => p.id);\n }\n\n function getBookNames(\n file: InputFileBase,\n metadata: MetadataBase,\n id: string\n ) {\n if (!bookMap) {\n bookMap = defaultBookIdMap.get(metadata.language);\n\n if (!bookMap) {\n if (!unknownLanguages.has(metadata.language)) {\n logger.warn(\n '[generate] File does not have a known language!',\n file.name,\n metadata.language\n );\n unknownLanguages.add(metadata.language);\n }\n\n logger.warn(\n '[generate] Using English book map for unknown language! This might result in outputting english book names.'\n );\n bookMap = defaultBookIdMap.get('en');\n }\n }\n\n const bookName = bookMap?.get(id);\n\n if (!!bookMap && !bookName) {\n logger.warn(\n '[generate] Book name not found for ID!',\n file.name,\n id\n );\n return null;\n }\n\n return {\n bookName,\n };\n }\n\n return output;\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,yBAA2B;AAC3B,wBAA0B;AAgB1B,wBAA4D;AAC5D,oBAA4C;AAC5C,mBAAuC;AACvC,0BAA4B;AAC5B,mCAAoC;AAEpC,gCAAiC;AACjC,iBAA0B;AA2EnB,SAAS,gBACZ,OACA,SAAoB,IAAI,WAAW,UAAU,GAC7C,SACa;AACb,QAAM,aAAS,sBAAU;AACzB,MAAI,SAAwB;AAAA,IACxB,cAAc,CAAC;AAAA,IACf,cAAc,CAAC;AAAA,EACnB;AAEA,MAAI,aAAa,IAAI,8BAAW;AAChC,MAAI,YAAY,IAAI,4BAAU,MAAM;AACpC,MAAI,cAAc,IAAI,gCAAY;AAClC,MAAI,sBAAsB,IAAI,iD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U;AACjC,cAAM,WAAW,WAAW,SAAS;AAAA,UACjC,CAAC,MAAM,EAAE,OAAO,QAAQ;AAAA,QAC5B;AACA,YAAI,UAAU;AACV,iBAAO;AAAA,YACH;AAAA,YACA,KAAK;AAAA,YACL,QAAQ;AAAA,UACZ;AACA;AAAA,QACJ;AAEA,cAAM,iBAA2C;AAAA,UAC7C,IAAI,QAAQ;AAAA,UACZ,SAAS,QAAQ;AAAA,UACjB,WAAW,QAAQ;AAAA,UACnB,SAAS,QAAQ;AAAA,QACrB;AAEA,mBAAW,SAAS,KAAK,cAAc;AAAA,MAC3C;AAAA,IACJ;AAEA,eAAW,YAAQ,sBAAO,WAAW,OAAO,CAAC,MAAM,EAAE,KAAK;AAC1D,eAAW,eAAW,sBAAO,WAAW,UAAU,CAAC,MAAM,EAAE,EAAE;AAAA,EACjE;AAEA,WAAS,aACL,MACA,UACA,IACF;AACE,QAAI,CAAC,SAAS;AACV,gBAAU,kBAAAC,UAAiB,IAAI,SAAS,QAAQ;AAEhD,UAAI,CAAC,SAAS;AACV,YAAI,CAAC,iBAAiB,IAAI,SAAS,QAAQ,GAAG;AAC1C,iBAAO;AAAA,YACH;AAAA,YACA,KAAK;AAAA,YACL,SAAS;AAAA,UACb;AACA,2BAAiB,IAAI,SAAS,QAAQ;AAAA,QAC1C;AAEA,eAAO;AAAA,UACH;AAAA,QACJ;AACA,kBAAU,kBAAAA,UAAiB,IAAI,IAAI;AAAA,MACvC;AAAA,IACJ;AAEA,UAAM,WAAW,SAAS,IAAI,EAAE;AAEhC,QAAI,CAAC,CAAC,WAAW,CAAC,UAAU;AACxB,aAAO;AAAA,QACH;AAAA,QACA,KAAK;AAAA,QACL;AAAA,MACJ;AACA,aAAO;AAAA,IACX;AAEA,WAAO;AAAA,MACH;AAAA,IACJ;AAAA,EACJ;AAEA,SAAO;AACX;",
4
+ "sourcesContent": ["import { UsfmParser } from '../parser/usfm-parser.js';\nimport { USXParser } from '../parser/usx-parser.js';\nimport {\n Commentary,\n CommentaryBook,\n CommentaryBookChapter,\n CommentaryChapterData,\n CommentaryProfile,\n InputCommentaryFile,\n InputFile,\n InputFileBase,\n InputTranslationFile,\n MetadataBase,\n Translation,\n TranslationBook,\n TranslationBookChapter,\n} from './common-types.js';\nimport {\n bookIdMap as defaultBookIdMap,\n bookOrderMap,\n apocryphaBooks,\n} from './book-order.js';\nimport { omit, sortBy, sortedIndexBy } from 'lodash';\nimport { getAudioUrlsForChapter } from './audio.js';\nimport { CodexParser } from '../parser/codex-parser.js';\nimport { CommentaryCsvParser } from '../parser/commentary-csv-parser.js';\nimport {\n CommentaryParseTree,\n ParseMessage,\n ParseTree,\n} from '../parser/types.js';\nimport { TyndaleXmlParser } from '../parser/tyndale-xml-parser.js';\nimport { getLogger } from '../log.js';\n\n/**\n * Defines an interface that contains generated dataset info.\n */\nexport interface DatasetOutput {\n /**\n * The list of translations that are available in the dataset.\n */\n translations: DatasetTranslation[];\n\n /**\n * The list of commentaries that are available in the dataset.\n */\n commentaries: DatasetCommentary[];\n\n parseMessages?: {\n [key: string]: ParseMessage[];\n };\n}\n\n/**\n * Defines a translation that is used in the dataset.\n */\nexport interface DatasetTranslation extends Translation {\n /**\n * The list of books that are available for the translation.\n */\n books: DatasetTranslationBook[];\n}\n\n/**\n * Defines a commentary that is used in the dataset.\n */\nexport interface DatasetCommentary extends Commentary {\n /**\n * The list of books that are available for the commentary.\n */\n books: DatasetCommentaryBook[];\n\n /**\n * The list of profiles that are available for the commentary.\n */\n profiles: DatasetCommentaryProfile[];\n}\n\n/**\n * Defines a translation book that is used in the dataset.\n */\nexport interface DatasetTranslationBook extends TranslationBook {\n /**\n * The list of chapters that are available for the book.\n */\n chapters: TranslationBookChapter[];\n}\n\n/**\n * Defines a commentary book that is used in the dataset.\n */\nexport interface DatasetCommentaryBook extends CommentaryBook {\n /**\n * The list of chapters that are available for the book.\n */\n chapters: CommentaryBookChapter[];\n}\n\nexport interface DatasetCommentaryProfile extends CommentaryProfile {\n /**\n * The contents of the profile.\n */\n content: string[];\n}\n\n/**\n * Generates a list of output files from the given list of input files.\n * @param file The list of files.\n * @param parser The parser to use for parsing the files.\n * @param bookMap The map of book IDs to names. If undefined, then a default map will be used.\n */\nexport function generateDataset(\n files: InputFile[],\n parser: DOMParser = new globalThis.DOMParser(),\n bookMap?: Map<string, { commonName: string }> | undefined\n): DatasetOutput {\n const logger = getLogger();\n let output: DatasetOutput = {\n translations: [],\n commentaries: [],\n };\n\n let usfmParser = new UsfmParser();\n let usxParser = new USXParser(parser);\n let codexParser = new CodexParser();\n let csvCommentaryParser = new CommentaryCsvParser();\n let tyndaleXmlParser = new TyndaleXmlParser(parser);\n\n let parsedTranslations = new Map<string, DatasetTranslation>();\n let parsedCommentaries = new Map<string, DatasetCommentary>();\n\n const unknownLanguages = new Set<string>();\n for (let file of files) {\n try {\n let parser:\n | UsfmParser\n | USXParser\n | CodexParser\n | CommentaryCsvParser\n | TyndaleXmlParser;\n if (file.fileType === 'usfm') {\n parser = usfmParser;\n } else if (file.fileType === 'usx') {\n parser = usxParser;\n } else if (file.fileType === 'json') {\n parser = codexParser;\n } else if (file.fileType === 'commentary/csv') {\n parser = csvCommentaryParser;\n } else if (file.fileType === 'commentary/tyndale-xml') {\n parser = tyndaleXmlParser;\n } else {\n logger.warn(\n '[generate] File does not have a valid type!',\n file.name\n );\n continue;\n }\n\n const parsed = parser.parse(file.content);\n\n if (\n 'parseMessages' in parsed &&\n parsed.parseMessages &&\n file.name\n ) {\n const messages = (output.parseMessages =\n output.parseMessages || {});\n messages[file.name] = parsed.parseMessages;\n }\n\n if (parsed.type === 'root') {\n addTranslationTree(file as InputTranslationFile, parsed);\n } else {\n addCommentaryTree(file as InputCommentaryFile, parsed);\n }\n } catch (err) {\n logger.error(\n `[generate] Error occurred while parsing ${file.name}`,\n err\n );\n }\n }\n\n function addTranslationTree(file: InputTranslationFile, parsed: ParseTree) {\n const id = parsed.id;\n\n if (!id) {\n logger.warn(\n '[generate] File does not have a valid book ID!',\n file.name,\n id\n );\n return;\n }\n\n const order = bookOrderMap.get(id);\n\n if (typeof order !== 'number') {\n logger.warn('[generate] Book does not have an order!', id);\n return;\n }\n\n const isApocryphal = apocryphaBooks.has(id);\n\n const bookName = getBookNames(file, file.metadata, id);\n\n let translation = parsedTranslations.get(file.metadata.id);\n\n if (!translation) {\n translation = {\n ...omit(file.metadata, 'direction'),\n textDirection: file.metadata.direction,\n books: [],\n };\n output.translations.push(translation);\n parsedTranslations.set(file.metadata.id, translation);\n }\n\n const name =\n parsed.header ??\n (bookName?.exactMatch ? bookName?.bookName?.commonName : null) ??\n parsed.title ??\n bookName?.bookName?.commonName;\n\n if (!name) {\n logger.warn('[generate] Book does not have a name!', file.name, id);\n return;\n }\n\n const commonName =\n (bookName?.exactMatch ? bookName?.bookName?.commonName : null) ??\n parsed.header ??\n parsed.title ??\n bookName?.bookName?.commonName ??\n id;\n\n const book: DatasetTranslationBook = {\n id: id,\n name,\n commonName,\n title: parsed.title ?? null,\n order,\n chapters: [],\n };\n\n if (isApocryphal) {\n book.isApocryphal = true;\n }\n\n for (let content of parsed.content) {\n if (content.type === 'chapter') {\n book.chapters.push({\n chapter: {\n number: content.number,\n content: content.content,\n footnotes: content.footnotes,\n },\n thisChapterAudioLinks: getAudioUrlsForChapter(\n translation.id,\n id,\n content.number\n ),\n });\n }\n }\n\n book.chapters = sortBy(book.chapters, (c) => c.chapter.number);\n\n const index = sortedIndexBy(translation.books, book, (b) => b.order);\n translation.books.splice(index, 0, book);\n }\n\n function addCommentaryTree(\n file: InputCommentaryFile,\n parsed: CommentaryParseTree\n ) {\n let commentary = parsedCommentaries.get(file.metadata.id);\n\n if (!commentary) {\n commentary = {\n ...omit(file.metadata, 'direction'),\n textDirection: file.metadata.direction,\n books: [],\n profiles: [],\n };\n output.commentaries.push(commentary);\n parsedCommentaries.set(file.metadata.id, commentary);\n }\n\n for (let parsedBook of parsed.books) {\n let book = commentary.books.find((b) => b.id === parsedBook.book);\n if (book && book.introduction && parsedBook.introduction) {\n logger.warn(\n '[generate] Book already exists in commentary!',\n file.name,\n parsedBook.book\n );\n continue;\n }\n\n if (!book) {\n const name = getBookNames(file, file.metadata, parsedBook.book);\n book = {\n id: parsedBook.book,\n order: bookOrderMap.get(parsedBook.book) ?? -1,\n commonName: name?.bookName?.commonName ?? parsedBook.book,\n name: name?.bookName?.commonName ?? parsedBook.book,\n chapters: [],\n };\n }\n\n if (parsedBook.introduction) {\n book.introduction = parsedBook.introduction;\n }\n\n if (parsedBook.introductionSummary && !book.introductionSummary) {\n book.introductionSummary = parsedBook.introductionSummary;\n }\n\n for (let chapter of parsedBook.chapters) {\n let data: CommentaryChapterData = {\n number: chapter.number,\n content: chapter.verses,\n };\n\n if (chapter.introduction) {\n data.introduction = chapter.introduction;\n }\n\n book.chapters.push({\n chapter: data,\n });\n }\n\n book.chapters = sortBy(book.chapters, (c) => c.chapter.number);\n commentary.books.push(book);\n }\n\n if (parsed.profiles) {\n for (let profile of parsed.profiles) {\n const existing = commentary.profiles.find(\n (p) => p.id === profile.id\n );\n if (existing) {\n logger.warn(\n '[generate] Profile already exists in commentary!',\n file.name,\n profile.id\n );\n continue;\n }\n\n const datasetProfile: DatasetCommentaryProfile = {\n id: profile.id,\n subject: profile.subject,\n reference: profile.reference,\n content: profile.content,\n };\n\n commentary.profiles.push(datasetProfile);\n }\n }\n\n commentary.books = sortBy(commentary.books, (b) => b.order);\n commentary.profiles = sortBy(commentary.profiles, (p) => p.id);\n }\n\n function getBookNames(\n file: InputFileBase,\n metadata: MetadataBase,\n id: string\n ) {\n let exactMatch = true;\n let map = bookMap;\n if (!map) {\n map = defaultBookIdMap.get(metadata.language);\n\n if (!map) {\n if (!unknownLanguages.has(metadata.language)) {\n logger.warn(\n '[generate] File does not have a known language!',\n file.name,\n metadata.language\n );\n unknownLanguages.add(metadata.language);\n }\n\n logger.warn(\n '[generate] Using English book map for unknown language! This might result in outputting english book names.'\n );\n exactMatch = false;\n map = defaultBookIdMap.get('en');\n }\n }\n\n const bookName = map?.get(id);\n\n if (!!map && !bookName) {\n logger.warn(\n '[generate] Book name not found for ID!',\n file.name,\n id\n );\n return null;\n }\n\n return {\n exactMatch,\n bookName,\n };\n }\n\n return output;\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,yBAA2B;AAC3B,wBAA0B;AAgB1B,wBAIO;AACP,oBAA4C;AAC5C,mBAAuC;AACvC,0BAA4B;AAC5B,mCAAoC;AAMpC,gCAAiC;AACjC,iBAA0B;AA+EnB,SAAS,gBACZ,OACA,SAAoB,IAAI,WAAW,UAAU,GAC7C,SACa;AACb,QAAM,aAAS,sBAAU;AACzB,MAAI,SAAwB;AAAA,IACxB,cAAc,CAAC;AAAA,IACf,cAAc,CAAC;AAAA,EACnB;AAEA,MAAI,aAAa,IAAI,8BAAW;AAChC,MAAI,YAAY,IAAI,4BAAU,MAAM;AACpC,MAAI,cAAc,IAAI,gCAAY;AAClC,MAAI,sBAAsB,IAAI,iDAAoB;AAClD,MAAI,mBAAmB,IAAI,2CAAiB,MAAM;AAElD,MAAI,qBAAqB,oBAAI,IAAgC;AAC7D,MAAI,qBAAqB,oBAAI,IAA+B;AAE5D,QAAM,mBAAmB,oBAAI,IAAY;AACzC,WAAS,QAAQ,OAAO;AACpB,QAAI;AACA,UAAIA;AAMJ,UAAI,KAAK,aAAa,QAAQ;AAC1B,QAAAA,UAAS;AAAA,MACb,WAAW,KAAK,aAAa,OAAO;AAChC,QAAAA,UAAS;AAAA,MACb,WAAW,KAAK,aAAa,QAAQ;AACjC,QAAAA,UAAS;AAAA,MACb,WAAW,KAAK,aAAa,kBAAkB;AAC3C,QAAAA,UAAS;AAAA,MACb,WAAW,KAAK,aAAa,0BAA0B;AACnD,QAAAA,UAAS;AAAA,MACb,OAAO;AACH,eAAO;AAAA,UACH;AAAA,UACA,KAAK;AAAA,QACT;AACA;AAAA,MACJ;AAEA,YAAM,SAASA,QAAO,MAAM,KAAK,OA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ACnB,SAAS,QAAQ;AAAA,QACrB;AAEA,mBAAW,SAAS,KAAK,cAAc;AAAA,MAC3C;AAAA,IACJ;AAEA,eAAW,YAAQ,sBAAO,WAAW,OAAO,CAAC,MAAM,EAAE,KAAK;AAC1D,eAAW,eAAW,sBAAO,WAAW,UAAU,CAAC,MAAM,EAAE,EAAE;AAAA,EACjE;AAEA,WAAS,aACL,MACA,UACA,IACF;AACE,QAAI,aAAa;AACjB,QAAI,MAAM;AACV,QAAI,CAAC,KAAK;AACN,YAAM,kBAAAC,UAAiB,IAAI,SAAS,QAAQ;AAE5C,UAAI,CAAC,KAAK;AACN,YAAI,CAAC,iBAAiB,IAAI,SAAS,QAAQ,GAAG;AAC1C,iBAAO;AAAA,YACH;AAAA,YACA,KAAK;AAAA,YACL,SAAS;AAAA,UACb;AACA,2BAAiB,IAAI,SAAS,QAAQ;AAAA,QAC1C;AAEA,eAAO;AAAA,UACH;AAAA,QACJ;AACA,qBAAa;AACb,cAAM,kBAAAA,UAAiB,IAAI,IAAI;AAAA,MACnC;AAAA,IACJ;AAEA,UAAM,WAAW,KAAK,IAAI,EAAE;AAE5B,QAAI,CAAC,CAAC,OAAO,CAAC,UAAU;AACpB,aAAO;AAAA,QACH;AAAA,QACA,KAAK;AAAA,QACL;AAAA,MACJ;AACA,aAAO;AAAA,IACX;AAEA,WAAO;AAAA,MACH;AAAA,MACA;AAAA,IACJ;AAAA,EACJ;AAEA,SAAO;AACX;",
6
6
  "names": ["parser", "defaultBookIdMap"]
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../parser/types.ts"],
4
- "sourcesContent": ["import { VerseRef } from '../utils.js';\r\n\r\n/**\r\n * The parse tree that is gathered.\r\n */\r\nexport interface ParseTree {\r\n type: 'root';\r\n\r\n /**\r\n * The ID of the parse tree.\r\n */\r\n id?: string;\r\n\r\n /**\r\n * The header that was associated with the tree.\r\n */\r\n header?: string;\r\n\r\n /**\r\n * The major title that was associated with the tree.\r\n */\r\n title?: string;\r\n\r\n /**\r\n * The list of chapters for the tree.\r\n */\r\n content: (Heading | Chapter)[];\r\n}\r\n\r\nexport interface Heading {\r\n type: 'heading';\r\n content: string[];\r\n}\r\n\r\nexport type ChapterContent = Heading | Verse | HebrewSubtitle | LineBreak;\r\n\r\nexport type VerseContent = string | FootnoteReference | Text;\r\n\r\n/**\r\n * Defines an interface that represents a chapter.\r\n */\r\nexport interface Chapter {\r\n type: 'chapter';\r\n number: number;\r\n\r\n /**\r\n * The contents of the chapter.\r\n */\r\n content: ChapterContent[];\r\n\r\n /**\r\n * The list of footnotes for the chapter.\r\n */\r\n footnotes: Footnote[];\r\n}\r\n\r\n/**\r\n * Defines an interface that represents a hebrew subtitle.\r\n */\r\nexport interface HebrewSubtitle {\r\n type: 'hebrew_subtitle';\r\n\r\n /**\r\n * The contents of the subtitle.\r\n */\r\n content: (string | Text | FootnoteReference)[];\r\n}\r\n\r\n/**\r\n * Defines an interface that represents a verse.\r\n */\r\nexport interface Verse {\r\n type: 'verse';\r\n\r\n number: number;\r\n\r\n /**\r\n * The contents of the verse.\r\n */\r\n content: (\r\n | string\r\n | Text\r\n | InlineHeading\r\n | InlineLineBreak\r\n | FootnoteReference\r\n )[];\r\n}\r\n\r\n/**\r\n * Defines an interface that represents text that has some markup attributes applied to it.\r\n */\r\nexport interface Text {\r\n /**\r\n * The text that is contained.\r\n */\r\n text: string;\r\n\r\n /**\r\n * Whether the text represents a poem.\r\n * The number indicates the level of indent.\r\n */\r\n poem?: number;\r\n\r\n /**\r\n * Whether the text contains the words of Jesus.\r\n */\r\n wordsOfJesus?: boolean;\r\n\r\n /**\r\n * Whether the text is descriptive.\r\n *\r\n * This is only used for \"hebrew subtitles\" that are included inside the verse markers.\r\n */\r\n descriptive?: boolean;\r\n}\r\n\r\n/**\r\n * Defines an interface that represents a heading that is embedded in a verse.\r\n */\r\nexport interface InlineHeading {\r\n /**\r\n * The text of the heading.\r\n */\r\n heading: string;\r\n}\r\n\r\n/**\r\n * Defines an interface that represents a line break that is embedded in a verse.\r\n */\r\nexport interface InlineLineBreak {\r\n lineBreak: true;\r\n}\r\n\r\nexport interface FootnoteReference {\r\n /**\r\n * The ID of the note that is referenced.\r\n */\r\n noteId: number;\r\n}\r\n\r\nexport interface Footnote {\r\n noteId: number;\r\n\r\n /**\r\n * The text of the footnote.\r\n */\r\n text: string;\r\n\r\n /**\r\n * The caller that should be used for the footnote.\r\n * For footnotes, a \"caller\" is the character that is used in the text to reference to footnote.\r\n *\r\n * For example, in the text:\r\n * Hello (a) World\r\n *\r\n * ----\r\n * (a) This is a footnote.\r\n *\r\n * The \"(a)\" is the caller.\r\n *\r\n * If \"+\", then the caller should be autogenerated.\r\n * If null, then the caller should be empty.\r\n * If a string, then the caller should be that string.\r\n */\r\n caller: '+' | string | null;\r\n\r\n /**\r\n * The verse reference for the footnote.\r\n */\r\n reference?: {\r\n chapter: number;\r\n verse: number;\r\n };\r\n}\r\n\r\nexport interface LineBreak {\r\n type: 'line_break';\r\n}\r\n\r\n/**\r\n * The parse tree that is gathered.\r\n */\r\nexport interface CommentaryParseTree {\r\n type: 'commentary/root';\r\n\r\n /**\r\n * The books that are contained in the commentary.\r\n */\r\n books: CommentaryBookNode[];\r\n\r\n /**\r\n * The profiles that are contained in the commentary.\r\n */\r\n profiles?: CommentaryProfileNode[];\r\n}\r\n\r\nexport interface CommentaryBookNode {\r\n type: 'book';\r\n book: string;\r\n introduction: string | null;\r\n introductionSummary?: string | null;\r\n chapters: CommentaryChapterNode[];\r\n}\r\n\r\nexport interface CommentaryProfileNode {\r\n /**\r\n * The ID of the profile.\r\n * Used to identify the profile within a commentary.\r\n */\r\n id: string;\r\n\r\n /**\r\n * The subject(s) of the profile.\r\n */\r\n subject: string;\r\n\r\n /**\r\n * The Bible reference that the profile is associated with.\r\n */\r\n reference: VerseRef | null;\r\n\r\n /**\r\n * The content of the profile.\r\n */\r\n content: string[];\r\n}\r\n\r\nexport interface CommentaryChapterNode {\r\n type: 'chapter';\r\n number: number;\r\n introduction: string | null;\r\n verses: CommentaryVerseNode[];\r\n}\r\n\r\nexport interface CommentaryVerseNode {\r\n type: 'verse';\r\n number: number;\r\n content: string[];\r\n}\r\n"],
4
+ "sourcesContent": ["import { VerseRef } from '../utils.js';\n\n/**\n * The parse tree that is gathered.\n */\nexport interface ParseTree {\n type: 'root';\n\n /**\n * The ID of the parse tree.\n */\n id?: string;\n\n /**\n * The header that was associated with the tree.\n */\n header?: string;\n\n /**\n * The major title that was associated with the tree.\n */\n title?: string;\n\n /**\n * The list of chapters for the tree.\n */\n content: (Heading | Chapter)[];\n\n /**\n * The list of messages that were generated during parsing.\n */\n parseMessages?: ParseMessage[];\n}\n\nexport interface ParseMessage {\n type: 'warning' | 'error';\n message: string;\n}\n\nexport interface Heading {\n type: 'heading';\n content: string[];\n}\n\nexport type ChapterContent = Heading | Verse | HebrewSubtitle | LineBreak;\n\nexport type VerseContent = string | FootnoteReference | Text;\n\n/**\n * Defines an interface that represents a chapter.\n */\nexport interface Chapter {\n type: 'chapter';\n number: number;\n\n /**\n * The contents of the chapter.\n */\n content: ChapterContent[];\n\n /**\n * The list of footnotes for the chapter.\n */\n footnotes: Footnote[];\n}\n\n/**\n * Defines an interface that represents a hebrew subtitle.\n */\nexport interface HebrewSubtitle {\n type: 'hebrew_subtitle';\n\n /**\n * The contents of the subtitle.\n */\n content: (string | Text | FootnoteReference)[];\n}\n\n/**\n * Defines an interface that represents a verse.\n */\nexport interface Verse {\n type: 'verse';\n\n number: number;\n\n /**\n * The contents of the verse.\n */\n content: (\n | string\n | Text\n | InlineHeading\n | InlineLineBreak\n | FootnoteReference\n )[];\n}\n\n/**\n * Defines an interface that represents text that has some markup attributes applied to it.\n */\nexport interface Text {\n /**\n * The text that is contained.\n */\n text: string;\n\n /**\n * Whether the text represents a poem.\n * The number indicates the level of indent.\n */\n poem?: number;\n\n /**\n * Whether the text contains the words of Jesus.\n */\n wordsOfJesus?: boolean;\n\n /**\n * Whether the text is descriptive.\n *\n * This is only used for \"hebrew subtitles\" that are included inside the verse markers.\n */\n descriptive?: boolean;\n}\n\n/**\n * Defines an interface that represents a heading that is embedded in a verse.\n */\nexport interface InlineHeading {\n /**\n * The text of the heading.\n */\n heading: string;\n}\n\n/**\n * Defines an interface that represents a line break that is embedded in a verse.\n */\nexport interface InlineLineBreak {\n lineBreak: true;\n}\n\nexport interface FootnoteReference {\n /**\n * The ID of the note that is referenced.\n */\n noteId: number;\n}\n\nexport interface Footnote {\n noteId: number;\n\n /**\n * The text of the footnote.\n */\n text: string;\n\n /**\n * The caller that should be used for the footnote.\n * For footnotes, a \"caller\" is the character that is used in the text to reference to footnote.\n *\n * For example, in the text:\n * Hello (a) World\n *\n * ----\n * (a) This is a footnote.\n *\n * The \"(a)\" is the caller.\n *\n * If \"+\", then the caller should be autogenerated.\n * If null, then the caller should be empty.\n * If a string, then the caller should be that string.\n */\n caller: '+' | string | null;\n\n /**\n * The verse reference for the footnote.\n */\n reference?: {\n chapter: number;\n verse: number;\n };\n}\n\nexport interface LineBreak {\n type: 'line_break';\n}\n\n/**\n * The parse tree that is gathered.\n */\nexport interface CommentaryParseTree {\n type: 'commentary/root';\n\n /**\n * The books that are contained in the commentary.\n */\n books: CommentaryBookNode[];\n\n /**\n * The profiles that are contained in the commentary.\n */\n profiles?: CommentaryProfileNode[];\n}\n\nexport interface CommentaryBookNode {\n type: 'book';\n book: string;\n introduction: string | null;\n introductionSummary?: string | null;\n chapters: CommentaryChapterNode[];\n}\n\nexport interface CommentaryProfileNode {\n /**\n * The ID of the profile.\n * Used to identify the profile within a commentary.\n */\n id: string;\n\n /**\n * The subject(s) of the profile.\n */\n subject: string;\n\n /**\n * The Bible reference that the profile is associated with.\n */\n reference: VerseRef | null;\n\n /**\n * The content of the profile.\n */\n content: string[];\n}\n\nexport interface CommentaryChapterNode {\n type: 'chapter';\n number: number;\n introduction: string | null;\n verses: CommentaryVerseNode[];\n}\n\nexport interface CommentaryVerseNode {\n type: 'verse';\n number: number;\n content: string[];\n}\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;AAAA;AAAA;",
6
6
  "names": []
7
7
  }
@@ -23,6 +23,7 @@ __export(usx_parser_exports, {
23
23
  });
24
24
  module.exports = __toCommonJS(usx_parser_exports);
25
25
  var import_iterators = require("./iterators.js");
26
+ var import_utils = require("../utils.js");
26
27
  var NodeType = /* @__PURE__ */ ((NodeType2) => {
27
28
  NodeType2[NodeType2["Text"] = 3] = "Text";
28
29
  return NodeType2;
@@ -31,6 +32,10 @@ const PARSER_VERSION = "2";
31
32
  class USXParser {
32
33
  _domParser;
33
34
  _noteCounter = 0;
35
+ _messages = [];
36
+ _lastVerse = null;
37
+ _currentChapter = null;
38
+ _bookId = null;
34
39
  constructor(domParser) {
35
40
  this._domParser = domParser;
36
41
  }
@@ -41,6 +46,11 @@ class USXParser {
41
46
  * @returns The parse tree that was generated.
42
47
  */
43
48
  parse(usx) {
49
+ this._noteCounter = 0;
50
+ this._messages = [];
51
+ this._lastVerse = null;
52
+ this._currentChapter = null;
53
+ this._bookId = null;
44
54
  const parser = this._domParser;
45
55
  const doc = parser.parseFromString(usx, "application/xml");
46
56
  const usxElement = doc.documentElement;
@@ -58,7 +68,7 @@ class USXParser {
58
68
  "The book element does not contain a code attribute."
59
69
  );
60
70
  }
61
- root.id = bookCode;
71
+ this._bookId = root.id = bookCode;
62
72
  const header = usxElement.querySelector('para[style="h"]');
63
73
  if (header) {
64
74
  root.header = header.textContent || "";
@@ -72,6 +82,9 @@ class USXParser {
72
82
  for (let content of this.iterateRootContent(usxElement)) {
73
83
  root.content.push(content);
74
84
  }
85
+ if (this._messages.length > 0) {
86
+ root.parseMessages = this._messages.slice();
87
+ }
75
88
  return root;
76
89
  }
77
90
  *iterateRootContent(usxElement) {
@@ -94,6 +107,7 @@ class USXParser {
94
107
  content: [],
95
108
  footnotes: []
96
109
  };
110
+ this._currentChapter = chapter;
97
111
  for (let content of this.iterateChapterContent(
98
112
  chapter,
99
113
  iterator
@@ -153,6 +167,9 @@ class USXParser {
153
167
  break;
154
168
  }
155
169
  if (node.nodeName === "verse") {
170
+ if (!(node instanceof Element) || !node.hasAttribute("eid")) {
171
+ nodes.rewind(1);
172
+ }
156
173
  break;
157
174
  }
158
175
  const parent = node.parentElement;
@@ -221,6 +238,29 @@ class USXParser {
221
238
  number: parseInt(element.getAttribute("number") || "0", 10),
222
239
  content: []
223
240
  };
241
+ if (this._currentChapter && this._lastVerse) {
242
+ if (this._currentChapter.number === chapter.number) {
243
+ const delta = verse.number - this._lastVerse.number;
244
+ if (delta > 1) {
245
+ for (let v = this._lastVerse.number + 1; v < verse.number; v++) {
246
+ let isExpected = false;
247
+ if (this._bookId) {
248
+ const missingVerse = `${this._bookId} ${chapter.number}:${v}`;
249
+ if (import_utils.KNOWN_SKIPPED_VERSES.has(missingVerse)) {
250
+ isExpected = true;
251
+ }
252
+ }
253
+ if (!isExpected) {
254
+ this._messages.push({
255
+ type: "warning",
256
+ message: `Verse ${this._bookId ?? "(null)"} ${chapter.number}:${v} is missing.`
257
+ });
258
+ }
259
+ }
260
+ }
261
+ }
262
+ }
263
+ this._lastVerse = verse;
224
264
  for (let content of this.iterateVerseContent(chapter, verse, nodes)) {
225
265
  addOrJoin(verse.content, content);
226
266
  }