lipilekhika 0.1.6 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a="other",l="Romanized",r=12,n="a",m=[[".",{krama:[115],next:["."]}],["..",{krama:[116]}],["C",{krama:[61],next:["h"]}],["Ch",{krama:[62]}],["L",{next:["̥"]}],["L̥",{krama:[41],next:["̄"]}],["L̥̄",{krama:[43]}],["M",{next:["̐"]}],["M̐",{krama:[46]}],["R",{next:["̥"]}],["R̥",{krama:[37],next:["̄"]}],["R̥̄",{krama:[39]}],["a",{krama:[1],next:["i","u"]}],["ai",{krama:[25]}],["au",{krama:[33]}],["b",{krama:[85],next:["h"]}],["bh",{krama:[87]}],["c",{next:["h"]}],["ch",{krama:[61],next:["h"]}],["chh",{krama:[62]}],["d",{krama:[70],next:["h"]}],["dh",{krama:[71]}],["g",{krama:[56],next:["z","h"]}],["gh",{krama:[59]}],["gz",{krama:[57]}],["j",{krama:[63],next:["z","h"]}],["jh",{krama:[66]}],["jz",{krama:[64]}],["k",{krama:[52],next:["z","h"]}],["kh",{krama:[54],next:["z"]}],["khz",{krama:[55]}],["kz",{krama:[53]}],["l",{krama:[94],next:["̥"]}],["l̥",{krama:[41],next:["̄"]}],["l̥̄",{krama:[43]}],["m",{krama:[88],next:["̐"]}],["m̐",{krama:[46]}],["p",{krama:[82],next:["h"]}],["ph",{krama:[83],next:["z"]}],["phz",{krama:[84]}],["r",{krama:[92],next:["̥"]}],["r̥",{krama:[37],next:["̄"]}],["r̥̄",{krama:[39]}],["t",{krama:[68],next:["h"]}],["th",{krama:[69]}],["Ê",{krama:[27]}],["Ñ",{krama:[67]}],["Ô",{krama:[35]}],["Ā",{krama:[5]}],["ā",{krama:[5],next:["ū"]}],["āū",{krama:[5,17],next:["ṁ"]}],["āūṁ",{krama:[0]}],["Ē",{krama:[21]}],["Ī",{krama:[11]}],["Ō",{krama:[29]}],["Ś",{krama:[99]}],["Ū",{krama:[17]}],["Ḍ",{krama:[76],next:["h"]}],["Ḍh",{krama:[79]}],["ḍ",{krama:[76],next:["h"]}],["ḍh",{krama:[79]}],["Ḥ",{krama:[47]}],["Ḷ",{krama:[95]}],["Ḻ",{krama:[96]}],["Ṁ",{krama:[45]}],["Ṅ",{krama:[81]}],["Ṇ",{krama:[81]}],["Ṉ",{krama:[73]}],["Ṛ",{krama:[77],next:["h"]}],["Ṛh",{krama:[80]}],["ṛ",{krama:[77],next:["h"]}],["ṛh",{krama:[80]}],["Ṟ",{krama:[93]}],["Ṣ",{krama:[100]}],["Ṭ",{krama:[74],next:["h"]}],["Ṭh",{krama:[75]}],["ṭ",{krama:[74],next:["h"]}],["ṭh",{krama:[75]}],["↑",{krama:[102],next:["↑"]}],["↑↑",{krama:[103],next:["↑"]}],["↑↑↑",{krama:[104]}]],k=[],u=[["āūṁ",null],["a",null],["a",null],["a",null],["a",null],["ā",null],["ā",null],["ā",null],["ā",null],["i",null],["i",null],["ī",null],["ī",null],["u",null],["u",null],["u",null],["u",null],["ū",null],["ū",null],["ū",null],["ū",null],["ē",null],["ē",null],["e",null],["e",null],["ai",null],["ai",null],["ê",null],["ê",null],["ō",null],["ō",null],["o",null],["o",null],["au",null],["au",null],["ô",null],["ô",null],["r̥",null],["r̥",null],["r̥̄",null],["r̥̄",null],["l̥",null],["l̥",null],["l̥̄",null],["l̥̄",null],["ṁ",null],["m̐",null],["ḥ",null],["`",null],["",null],["",null],["",null],["k",null],["kz",null],["kh",null],["khz",null],["g",null],["gz",null],["g",null],["gh",null],["ṅ",null],["C",null],["Ch",null],["j",null],["jz",null],["j",null],["jh",null],["ñ",null],["t",null],["th",null],["d",null],["dh",null],["n",null],["ṉ",null],["ṭ",null],["ṭh",null],["ḍ",null],["ṛ",null],["ḍ",null],["ḍh",null],["ṛh",null],["ṇ",null],["p",null],["ph",null],["phz",null],["b",null],["b",null],["bh",null],["m",null],["y",null],["y",null],["v",null],["r",null],["ṟ",null],["l",null],["ḷ",null],["ḻ",null],["h",null],["s",null],["ś",null],["ṣ",null],["↓",null],["↑",null],["↑↑",null],["↑↑↑",null],["0",null],["1",null],["2",null],["3",null],["4",null],["5",null],["6",null],["7",null],["8",null],["9",null],[".",null],["..",null]],t=[49,50,51,115,116,105,106,107,108,109,110,111,112,113,114,61,62,48,1,2,3,4,25,26,33,34,85,86,87,70,71,23,24,56,58,59,57,97,9,10,63,65,66,64,52,54,55,53,94,41,42,43,44,88,46,72,31,32,82,83,84,92,37,38,39,40,98,68,69,13,14,15,16,91,89,90,27,28,67,35,36,5,6,7,8,0,21,22,11,12,29,30,99,17,18,19,20,76,78,79,47,95,96,45,60,81,73,77,80,93,100,74,75,102,103,104,101],e=[["'",{next:["'"],krama:[102]}],["''",{next:["'"],krama:[103]}],["'''",{krama:[104]}],[".",{krama:[115],next:[".","q","h","A","i","I","u","U","e","E","a","O","o","R","L"]}],["..",{krama:[116]}],[".A",{krama:[6],next:["1"]}],[".A1",{krama:[8]}],[".E",{krama:[22]}],[".I",{krama:[12]}],[".L",{next:["R"],krama:[2,95]}],[".LR",{krama:[42],next:["R"]}],[".LRR",{krama:[44]}],[".O",{krama:[30]}],[".R",{krama:[38],next:["R"]}],[".RR",{krama:[40]}],[".U",{krama:[18],next:["1"]}],[".U1",{krama:[20]}],[".a",{next:["i","u"],krama:[2,2]}],[".ai",{next:["I"],krama:[2,2,2]}],[".aiI",{krama:[28]}],[".au",{next:["U"],krama:[2,2,2]}],[".auU",{krama:[36]}],[".e",{krama:[24]}],[".h",{krama:[49]}],[".i",{krama:[10]}],[".o",{krama:[32]}],[".q",{custom_back_ref:3}],[".u",{krama:[14],next:["1"]}],[".u1",{krama:[16]}],[";",{krama:[48]}],["A",{krama:[5],next:["U"]}],["AU",{krama:[5,17],next:["M"]}],["AUM",{krama:[0]}],["C",{krama:[61],next:["h"]}],["Ch",{krama:[62]}],["D",{krama:[76],next:["z","h"]}],["Dh",{krama:[79],next:["z"]}],["Dhz",{krama:[80]}],["Dz",{krama:[77]}],["L",{krama:[95],next:["R","z"]}],["LR",{krama:[41],next:["R"]}],["LRR",{krama:[43]}],["Lz",{krama:[96]}],["M",{krama:[45],next:["M"]}],["MM",{krama:[46]}],["Q",{krama:[51],next:["Q"]}],["QQ",{custom_back_ref:1}],["R",{krama:[37],next:["R"]}],["RR",{krama:[39]}],["S",{krama:[-1],next:["h"]}],["Sh",{krama:[100]}],["T",{krama:[74],next:["h"]}],["Th",{krama:[75]}],["_",{krama:[101]}],["a",{krama:[1],next:["i","u","a"]}],["aa",{krama:[5]}],["ai",{krama:[25]}],["au",{krama:[33]}],["b",{krama:[85],next:["h"]}],["bh",{krama:[87]}],["c",{next:["h"]}],["ch",{krama:[61],next:["h"]}],["chh",{krama:[62]}],["d",{krama:[70],next:["h"]}],["dh",{krama:[71]}],["e",{next:["e"],krama:[23]}],["ee",{krama:[11]}],["f",{krama:[84]}],["g",{krama:[56],next:["z","h"]}],["gh",{krama:[59]}],["gz",{krama:[57]}],["i",{next:["i"],krama:[9]}],["ii",{krama:[11]}],["j",{krama:[63],next:["z","h"]}],["jh",{krama:[66]}],["jz",{krama:[64]}],["k",{krama:[52],next:["z","h"]}],["kh",{krama:[54],next:["z"]}],["khz",{krama:[55]}],["kz",{krama:[53]}],["n",{krama:[72],next:["z","1"]}],["n1",{krama:[73]}],["nz",{krama:[73]}],["o",{next:["o"],krama:[31]}],["oo",{krama:[17]}],["p",{krama:[82],next:["h"]}],["ph",{krama:[83],next:["z"]}],["phz",{krama:[84]}],["q",{custom_back_ref:0,next:["q"]}],["qq",{custom_back_ref:2}],["r",{krama:[92],next:["z","1"]}],["r1",{krama:[93]}],["rz",{krama:[93]}],["s",{krama:[98],next:["h"]}],["sh",{krama:[99]}],["t",{krama:[68],next:["h"]}],["th",{krama:[69]}],["u",{next:["u"],krama:[13]}],["uu",{krama:[17]}],["z",{krama:[64],next:["h"]}],["zh",{krama:[96]}],["↑",{krama:[102],next:["↑"]}],["↑↑",{krama:[103],next:["↑"]}],["↑↑↑",{krama:[104]}]],h=[["",null,88],["Q",null,46],["q",null,89],["‍",null,26]],x={script_type:a,script_name:l,script_id:r,schwa_character:n,text_to_krama_map:m,list:k,krama_text_arr:u,krama_text_arr_index:t,typing_text_to_krama_map:e,custom_script_chars_arr:h};exports.custom_script_chars_arr=h;exports.default=x;exports.krama_text_arr=u;exports.krama_text_arr_index=t;exports.list=k;exports.schwa_character=n;exports.script_id=r;exports.script_name=l;exports.script_type=a;exports.text_to_krama_map=m;exports.typing_text_to_krama_map=e;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a="other",l="Romanized",n=12,r="a",m=[[".",{krama:[115],next:["."]}],["..",{krama:[116]}],["C",{krama:[61],next:["h"]}],["Ch",{krama:[62]}],["L",{next:["̥"]}],["L̥",{krama:[41],next:["̄"]}],["L̥̄",{krama:[43]}],["M",{next:["̐"]}],["M̐",{krama:[46]}],["R",{next:["̥"]}],["R̥",{krama:[37],next:["̄"]}],["R̥̄",{krama:[39]}],["a",{krama:[1],next:["i","u"]}],["ai",{krama:[25]}],["au",{krama:[33]}],["b",{krama:[85],next:["h"]}],["bh",{krama:[87]}],["c",{next:["h"]}],["ch",{krama:[61],next:["h"]}],["chh",{krama:[62]}],["d",{krama:[70],next:["h"]}],["dh",{krama:[71]}],["g",{krama:[56],next:["z","h"]}],["gh",{krama:[59]}],["gz",{krama:[57]}],["j",{krama:[63],next:["z","h"]}],["jh",{krama:[66]}],["jz",{krama:[64]}],["k",{krama:[52],next:["z","h"]}],["kh",{krama:[54],next:["z"]}],["khz",{krama:[55]}],["kz",{krama:[53]}],["l",{krama:[94],next:["̥"]}],["l̥",{krama:[41],next:["̄"]}],["l̥̄",{krama:[43]}],["m",{krama:[88],next:["̐"]}],["m̐",{krama:[46]}],["p",{krama:[82],next:["h"]}],["ph",{krama:[83],next:["z"]}],["phz",{krama:[84]}],["r",{krama:[92],next:["̥"]}],["r̥",{krama:[37],next:["̄"]}],["r̥̄",{krama:[39]}],["t",{krama:[68],next:["h"]}],["th",{krama:[69]}],["Ê",{krama:[27]}],["Ñ",{krama:[67]}],["Ô",{krama:[35]}],["Ā",{krama:[5]}],["ā",{krama:[5],next:["ū"]}],["āū",{krama:[5,17],next:["ṁ"]}],["āūṁ",{krama:[0]}],["Ē",{krama:[21]}],["Ī",{krama:[11]}],["Ō",{krama:[29]}],["Ś",{krama:[99]}],["Ū",{krama:[17]}],["Ḍ",{krama:[76],next:["h"]}],["Ḍh",{krama:[79]}],["ḍ",{krama:[76],next:["h"]}],["ḍh",{krama:[79]}],["Ḥ",{krama:[47]}],["Ḷ",{krama:[95]}],["Ḻ",{krama:[96]}],["Ṁ",{krama:[45]}],["Ṅ",{krama:[60]}],["Ṇ",{krama:[81]}],["Ṉ",{krama:[73]}],["Ṛ",{krama:[77],next:["h"]}],["Ṛh",{krama:[80]}],["ṛ",{krama:[77],next:["h"]}],["ṛh",{krama:[80]}],["Ṟ",{krama:[93]}],["Ṣ",{krama:[100]}],["Ṭ",{krama:[74],next:["h"]}],["Ṭh",{krama:[75]}],["ṭ",{krama:[74],next:["h"]}],["ṭh",{krama:[75]}],["↑",{krama:[102],next:["↑"]}],["↑↑",{krama:[103],next:["↑"]}],["↑↑↑",{krama:[104]}]],k=[],u=[["āūṁ",null],["a",null],["a",null],["a",null],["a",null],["ā",null],["ā",null],["ā",null],["ā",null],["i",null],["i",null],["ī",null],["ī",null],["u",null],["u",null],["u",null],["u",null],["ū",null],["ū",null],["ū",null],["ū",null],["ē",null],["ē",null],["e",null],["e",null],["ai",null],["ai",null],["ê",null],["ê",null],["ō",null],["ō",null],["o",null],["o",null],["au",null],["au",null],["ô",null],["ô",null],["r̥",null],["r̥",null],["r̥̄",null],["r̥̄",null],["l̥",null],["l̥",null],["l̥̄",null],["l̥̄",null],["ṁ",null],["m̐",null],["ḥ",null],["`",null],["",null],["",null],["",null],["k",null],["kz",null],["kh",null],["khz",null],["g",null],["gz",null],["g",null],["gh",null],["ṅ",null],["C",null],["Ch",null],["j",null],["jz",null],["j",null],["jh",null],["ñ",null],["t",null],["th",null],["d",null],["dh",null],["n",null],["ṉ",null],["ṭ",null],["ṭh",null],["ḍ",null],["ṛ",null],["ḍ",null],["ḍh",null],["ṛh",null],["ṇ",null],["p",null],["ph",null],["phz",null],["b",null],["b",null],["bh",null],["m",null],["y",null],["y",null],["v",null],["r",null],["ṟ",null],["l",null],["ḷ",null],["ḻ",null],["h",null],["s",null],["ś",null],["ṣ",null],["↓",null],["↑",null],["↑↑",null],["↑↑↑",null],["0",null],["1",null],["2",null],["3",null],["4",null],["5",null],["6",null],["7",null],["8",null],["9",null],[".",null],["..",null]],t=[49,50,51,115,116,105,106,107,108,109,110,111,112,113,114,61,62,48,1,2,3,4,25,26,33,34,85,86,87,70,71,23,24,56,58,59,57,97,9,10,63,65,66,64,52,54,55,53,94,41,42,43,44,88,46,72,31,32,82,83,84,92,37,38,39,40,98,68,69,13,14,15,16,91,89,90,27,28,67,35,36,5,6,7,8,0,21,22,11,12,29,30,99,17,18,19,20,76,78,79,47,95,96,45,60,81,73,77,80,93,100,74,75,102,103,104,101],e=[["'",{next:["'"],krama:[102]}],["''",{next:["'"],krama:[103]}],["'''",{krama:[104]}],[".",{krama:[115],next:[".","q","h","A","i","I","u","U","e","E","a","O","o","R","L"]}],["..",{krama:[116]}],[".A",{krama:[6],next:["1"]}],[".A1",{krama:[8]}],[".E",{krama:[22]}],[".I",{krama:[12]}],[".L",{next:["R"],krama:[2,95]}],[".LR",{krama:[42],next:["R"]}],[".LRR",{krama:[44]}],[".O",{krama:[30]}],[".R",{krama:[38],next:["R"]}],[".RR",{krama:[40]}],[".U",{krama:[18],next:["1"]}],[".U1",{krama:[20]}],[".a",{next:["i","u"],krama:[2,2]}],[".ai",{next:["I"],krama:[2,2,2]}],[".aiI",{krama:[28]}],[".au",{next:["U"],krama:[2,2,2]}],[".auU",{krama:[36]}],[".e",{krama:[24]}],[".h",{krama:[49]}],[".i",{krama:[10]}],[".o",{krama:[32]}],[".q",{custom_back_ref:32}],[".u",{krama:[14],next:["1"]}],[".u1",{krama:[16]}],[";",{krama:[48]}],["A",{krama:[5],next:["U","^"]}],["AU",{krama:[5,17],next:["M"]}],["AUM",{krama:[0]}],["A^",{custom_back_ref:11}],["C",{krama:[61],next:["h"]}],["Ch",{krama:[62]}],["D",{krama:[76],next:["z","h","^"]}],["D^",{custom_back_ref:17}],["Dh",{krama:[79],next:["z","^"]}],["Dh^",{custom_back_ref:18}],["Dhz",{krama:[80],next:["^"]}],["Dhz^",{custom_back_ref:27}],["Dz",{krama:[77],next:["^"]}],["Dz^",{custom_back_ref:26}],["E",{next:["^"],krama:[21]}],["E^",{custom_back_ref:12}],["G",{next:["^"],krama:[60]}],["G^",{custom_back_ref:23}],["H",{next:["^"],krama:[47]}],["H^",{custom_back_ref:19}],["I",{next:["^"],krama:[11]}],["I^",{custom_back_ref:13}],["J",{next:["^"],krama:[67]}],["J^",{custom_back_ref:9}],["L",{krama:[95],next:["R","z","^"]}],["LR",{krama:[41],next:["R","^"]}],["LRR",{krama:[43],next:["^"]}],["LRR^",{custom_back_ref:2}],["LR^",{custom_back_ref:1}],["L^",{custom_back_ref:20}],["Lz",{krama:[96],next:["^"]}],["Lz^",{custom_back_ref:21}],["M",{krama:[45],next:["M","^"]}],["MM",{krama:[46],next:["^"]}],["MM^",{custom_back_ref:3}],["M^",{custom_back_ref:22}],["N",{next:["^"],krama:[81]}],["N^",{custom_back_ref:24}],["O",{next:["^"],krama:[29]}],["O^",{custom_back_ref:14}],["Q",{krama:[51],next:["Q"]}],["QQ",{custom_back_ref:4}],["R",{krama:[37],next:["R","^"]}],["RR",{krama:[39],next:["^"]}],["RR^",{custom_back_ref:6}],["R^",{custom_back_ref:5}],["S",{krama:[-1],next:["h"]}],["Sh",{krama:[100],next:["^"]}],["Sh^",{custom_back_ref:29}],["T",{krama:[74],next:["h","^"]}],["T^",{custom_back_ref:30}],["Th",{krama:[75],next:["^"]}],["Th^",{custom_back_ref:31}],["U",{next:["^"],krama:[17]}],["U^",{custom_back_ref:16}],["_",{krama:[101]}],["a",{krama:[1],next:["i","u","a"]}],["aa",{krama:[5]}],["ai",{krama:[25],next:["I"]}],["aiI",{next:["^"],krama:[2,2,2]}],["aiI^",{custom_back_ref:8}],["au",{krama:[33],next:["U"]}],["auU",{next:["^"],krama:[2,2,2]}],["auU^",{custom_back_ref:10}],["b",{krama:[85],next:["h"]}],["bh",{krama:[87]}],["c",{next:["h"]}],["ch",{krama:[61],next:["h"]}],["chh",{krama:[62]}],["d",{krama:[70],next:["h"]}],["dh",{krama:[71]}],["e",{next:["e"],krama:[23]}],["ee",{krama:[11]}],["f",{krama:[84]}],["g",{krama:[56],next:["z","h"]}],["gh",{krama:[59]}],["gz",{krama:[57]}],["i",{next:["i"],krama:[9]}],["ii",{krama:[11]}],["j",{krama:[63],next:["z","h"]}],["jh",{krama:[66]}],["jz",{krama:[64]}],["k",{krama:[52],next:["z","h"]}],["kh",{krama:[54],next:["z"]}],["khz",{krama:[55]}],["kz",{krama:[53]}],["n",{krama:[72],next:["z","1"]}],["n1",{krama:[73]}],["nz",{krama:[73],next:["^"]}],["nz^",{custom_back_ref:25}],["o",{next:["o"],krama:[31]}],["oo",{krama:[17]}],["p",{krama:[82],next:["h"]}],["ph",{krama:[83],next:["z"]}],["phz",{krama:[84]}],["q",{custom_back_ref:0,next:["q"]}],["qq",{custom_back_ref:7}],["r",{krama:[92],next:["z","1"]}],["r1",{krama:[93]}],["rz",{krama:[93],next:["^"]}],["rz^",{custom_back_ref:28}],["s",{krama:[98],next:["h"]}],["sh",{krama:[99],next:["^"]}],["sh^",{custom_back_ref:15}],["t",{krama:[68],next:["h"]}],["th",{krama:[69]}],["u",{next:["u"],krama:[13]}],["uu",{krama:[17]}],["z",{krama:[64],next:["h"]}],["zh",{krama:[96]}],["↑",{krama:[102],next:["↑"]}],["↑↑",{krama:[103],next:["↑"]}],["↑↑↑",{krama:[104]}]],x=[["",null,125],["L̥",null,58],["L̥̄",null,57],["M̐",null,64],["Q",null,71],["R̥",null,75],["R̥̄",null,74],["q",null,126],["Ê",null,90],["Ñ",null,53],["Ô",null,93],["Ā",null,33],["Ē",null,45],["Ī",null,51],["Ō",null,69],["Ś",null,133],["Ū",null,84],["Ḍ",null,37],["Ḍh",null,39],["Ḥ",null,49],["Ḷ",null,59],["Ḻ",null,61],["Ṁ",null,65],["Ṅ",null,47],["Ṇ",null,67],["Ṉ",null,119],["Ṛ",null,43],["Ṛh",null,41],["Ṟ",null,130],["Ṣ",null,78],["Ṭ",null,80],["Ṭh",null,82],["‍",null,26]],_={script_type:a,script_name:l,script_id:n,schwa_character:r,text_to_krama_map:m,list:k,krama_text_arr:u,krama_text_arr_index:t,typing_text_to_krama_map:e,custom_script_chars_arr:x};exports.custom_script_chars_arr=x;exports.default=_;exports.krama_text_arr=u;exports.krama_text_arr_index=t;exports.list=k;exports.schwa_character=r;exports.script_id=n;exports.script_name=l;exports.script_type=a;exports.text_to_krama_map=m;exports.typing_text_to_krama_map=e;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./script_normalization-C4f8lsi1.cjs"),s=async r=>{const a=t.getNormalizedScriptName(r);if(!a)throw new Error(`Invalid script name: ${r}`);return await t.getScriptData(a)};async function l(r,a,e,n){const i=t.getNormalizedScriptName(a);if(!i)throw new Error(`Invalid script name: ${a}`);const o=t.getNormalizedScriptName(e);if(!o)throw new Error(`Invalid script name: ${e}`);return i===o?r:(await t.transliterate_text(r,i,o,n)).output}async function p(r,a){const e=t.getNormalizedScriptName(r);if(!e)throw new Error(`Invalid script name: ${r}`);const n=t.getNormalizedScriptName(a);if(!n)throw new Error(`Invalid script name: ${a}`);const i=await t.getScriptData(e),o=await t.getScriptData(n);return Object.keys(t.get_active_custom_options(i,o,Object.fromEntries(Object.keys(t.custom_options_json).map(c=>[c,!0]))))}exports.ALL_LANG_SCRIPT_LIST=t.ALL_LANG_SCRIPT_LIST;exports.LANG_LIST=t.LANG_LIST;exports.SCRIPT_LIST=t.SCRIPT_LIST;exports.getAllOptions=p;exports.preloadScriptData=s;exports.transliterate=l;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./script_normalization-BlG9S8Ex.cjs"),s=async r=>{const a=t.getNormalizedScriptName(r);if(!a)throw new Error(`Invalid script name: ${r}`);return await t.getScriptData(a)};async function l(r,a,e,n){const i=t.getNormalizedScriptName(a);if(!i)throw new Error(`Invalid script name: ${a}`);const o=t.getNormalizedScriptName(e);if(!o)throw new Error(`Invalid script name: ${e}`);return i===o?r:(await t.transliterate_text(r,i,o,n)).output}async function p(r,a){const e=t.getNormalizedScriptName(r);if(!e)throw new Error(`Invalid script name: ${r}`);const n=t.getNormalizedScriptName(a);if(!n)throw new Error(`Invalid script name: ${a}`);const i=await t.getScriptData(e),o=await t.getScriptData(n);return Object.keys(t.get_active_custom_options(i,o,Object.fromEntries(Object.keys(t.custom_options_json).map(c=>[c,!0]))))}exports.ALL_LANG_SCRIPT_LIST=t.ALL_LANG_SCRIPT_LIST;exports.LANG_LIST=t.LANG_LIST;exports.SCRIPT_LIST=t.SCRIPT_LIST;exports.getAllOptions=p;exports.preloadScriptData=s;exports.transliterate=l;
@@ -1,2 +1,2 @@
1
- "use strict";function Q(n,e,l,t){const{accessor:a,compareFn:c}=t??{},s=a??((i,r)=>i[r]);let o=0,p=e.length-1,_=-1;for(;o<=p;){const i=Math.floor((o+p)/2),r=e[i],u=s(n,r);let m;c?m=c(l,u):m=l<u?-1:l>u?1:0,m===0?(_=r,p=i-1):m<0?p=i-1:o=i+1}return _}function Y(n,e,l){const{accessor:t,compareFn:a}=l??{},c=t??((_,i)=>_[i]);let s=0,o=n.length-1,p=-1;for(;s<=o;){const _=Math.floor((s+o)/2),i=c(n,_);let r;a?r=a(e,i):r=e<i?-1:e>i?1:0,r===0?(p=_,o=_-1):r<0?o=_-1:s=_+1}return p}const we=(n,e,l)=>{const t=n[e];return t?typeof t=="function"?t():Promise.resolve(t):new Promise((a,c)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(c.bind(null,new Error("Unknown variable dynamic import: "+e+(e.split("/").length!==l?". Note that variables only represent file names one level deep.":""))))})},le={},_e=async n=>(le[n]||(le[n]=we(Object.assign({"../script_data/Assamese.json":()=>Promise.resolve().then(()=>require("./Assamese-D-JeQpHm.cjs")),"../script_data/Bengali.json":()=>Promise.resolve().then(()=>require("./Bengali-Cb8p6Ss6.cjs")),"../script_data/Brahmi.json":()=>Promise.resolve().then(()=>require("./Brahmi-WrTB6e7g.cjs")),"../script_data/Devanagari.json":()=>Promise.resolve().then(()=>require("./Devanagari-CubB6Ubb.cjs")),"../script_data/Granth.json":()=>Promise.resolve().then(()=>require("./Granth-C6Es6NQ-.cjs")),"../script_data/Gujarati.json":()=>Promise.resolve().then(()=>require("./Gujarati-ToSwR4ym.cjs")),"../script_data/Gurumukhi.json":()=>Promise.resolve().then(()=>require("./Gurumukhi-enKEt02s.cjs")),"../script_data/Kannada.json":()=>Promise.resolve().then(()=>require("./Kannada-BuxZGQgS.cjs")),"../script_data/Malayalam.json":()=>Promise.resolve().then(()=>require("./Malayalam-DrxDIRjl.cjs")),"../script_data/Modi.json":()=>Promise.resolve().then(()=>require("./Modi-CYRCB8M0.cjs")),"../script_data/Normal.json":()=>Promise.resolve().then(()=>require("./Normal-BfIhy-Ts.cjs")),"../script_data/Odia.json":()=>Promise.resolve().then(()=>require("./Odia-DyI85meX.cjs")),"../script_data/Purna-Devanagari.json":()=>Promise.resolve().then(()=>require("./Purna-Devanagari-72KHauTF.cjs")),"../script_data/Romanized.json":()=>Promise.resolve().then(()=>require("./Romanized-CORlHeSC.cjs")),"../script_data/Sharada.json":()=>Promise.resolve().then(()=>require("./Sharada-CsNaWIt6.cjs")),"../script_data/Siddham.json":()=>Promise.resolve().then(()=>require("./Siddham-Do9NoVoz.cjs")),"../script_data/Sinhala.json":()=>Promise.resolve().then(()=>require("./Sinhala-Cu5sdgUY.cjs")),"../script_data/Tamil-Extended.json":()=>Promise.resolve().then(()=>require("./Tamil-Extended-PyLgZJyX.cjs")),"../script_data/Tamil.json":()=>Promise.resolve().then(()=>require("./Tamil-CiqM4WXX.cjs")),"../script_data/Telugu.json":()=>Promise.resolve().then(()=>require("./Telugu-CaCRkj-p.cjs"))}),`../script_data/${n}.json`,3).then(e=>e.default)),le[n]),$={"all_to_normal:replace_pancham_varga_varna_with_n":{from_script_type:"all",to_script_name:["Normal"],check_in:"output",rules:[{type:"replace_prev_krama_keys",check_in:"output",prev:[60],following:[52,53,54,55,56,57,58,59],replace_with:[72]},{type:"replace_prev_krama_keys",check_in:"output",prev:[67],following:[61,62,63,64,65,66],replace_with:[72]}]},"brahmic_to_brahmic:replace_pancham_varga_varna_with_anusvAra":{from_script_type:"brahmic",to_script_type:"brahmic",check_in:"input",rules:[{type:"replace_prev_krama_keys",check_in:"input",prev:[60,49],following:[52,53,54,55,56,57,58,59],replace_with:[45]},{type:"replace_prev_krama_keys",check_in:"input",prev:[67,49],following:[61,62,63,64,65,66],replace_with:[45]},{type:"replace_prev_krama_keys",check_in:"input",prev:[81,49],following:[74,75,76,77,78,79,80],replace_with:[45]},{type:"replace_prev_krama_keys",check_in:"input",prev:[72,49],following:[68,69,70,71],replace_with:[45]},{type:"replace_prev_krama_keys",check_in:"input",prev:[88,49],following:[82,83,85,86,87],replace_with:[45]}]},"all_to_sinhala:use_conjunct_enabling_halant":{from_script_type:"all",to_script_name:["Sinhala"],check_in:"output",rules:[{type:"direct_replace",check_in:"output",to_replace:[[49]],replace_text:"්‍",replace_with:[]}]},"all_to_normal:remove_virAma_and_double_virAma":{from_script_type:"all",to_script_name:["Normal","Romanized"],check_in:"output",rules:[{type:"direct_replace",check_in:"output",to_replace:[[116],[115]],replace_with:[-1]}]},"all_to_normal:replace_avagraha_with_a":{from_script_type:"all",to_script_name:["Normal","Romanized"],check_in:"output",rules:[{type:"direct_replace",check_in:"output",to_replace:[[48]],replace_with:[1]}]},"normal_to_all:use_typing_chars":{from_script_name:["Normal"],to_script_type:"all",check_in:"output",rules:[]},"all_to_normal:preserve_specific_chars":{from_script_type:"all",to_script_name:["Normal"],check_in:"output",rules:[]}},Te=(n,e)=>{const l=n.krama_text_arr[e]?.[0];return typeof l=="string"?l:null},H=(n,e)=>Te(n,e)??"",Z=(n,e)=>Q(n.krama_text_arr,n.krama_text_arr_index,e,{accessor:(l,t)=>l[t][0]}),be=()=>{let n=[];function e(i){i&&n.push(i)}function l(i){for(const r of i)e(r)}function t(){return n.at(-1)}function a(){return t()?.at(-1)}function c(){const i=t();if(!i)return;const r=i.at(-1),u=i.slice(0,-1);return u?n[n.length-1]=u:n.pop(),r}function s(i,r){n.splice(-i,i,...r.filter(Boolean))}function o(i,r){const u=c();if(!u){l(i),l(r);return}l(i),e(u),l(r)}function p(i){const r=n.at(i);return r?{cp:i,ch:r,width:r.length}:null}function _(i,r){i<0&&(i=n.length+i),!(i<0||i>=n.length)&&(n[i]=r)}return{emit:e,emitPieces:l,lastPiece:t,lastChar:a,popLastChar:c,rewriteTailPieces:s,withLastCharMovedAfter:o,toString:()=>n.join(""),rewriteAt:_,peekAt:p}},Se=n=>{let e=[];function l(){e=[]}function t(){return e.length}function a(u){return e.at(u)}function c(){return e.at(-1)}function s(){return c()?.[0]}function o(){return c()?.[1]?.type}function p(u){return a(u)?.[1]?.type}function _(u){return a(u)?.[0]}function i(u){return o()===u}function r(u){const m=u[0];m!==void 0&&m.length>0&&e.push(u),e.length>n&&e.shift()}return{clear:l,length:t,at:a,last:c,lastText:s,lastType:o,typeAt:p,textAt:_,isLastType:i,push:r}},je=n=>{let e=0;function l(o){const p=n.codePointAt(o);if(p===void 0)return null;const _=String.fromCodePoint(p);return{cp:p,ch:_,width:_.length}}function t(){return l(e)}function a(o){return l(e+o)}function c(o){e+=o}function s(o,p){return n.substring(o,p)}return{get pos(){return e},peek:t,peekAt:l,peekAtOffsetUnits:a,advance:c,slice:s}},se=(n,e,l,t)=>{for(let a=0;a<l.length;a++){const c=l[l.length-1-a],s=n(e-a);if(s===null)return{matched:!1,matchedLen:0};const o=Z(t,s.ch);if(o===-1||o!==c)return{matched:!1,matchedLen:0}}return{matched:!0,matchedLen:l.length}},ce=(n,e)=>n.map(l=>H(e,l)).filter(Boolean),Pe=["²","³","⁴"],j=n=>!!n&&Pe.indexOf(n)!==-1,Ne=["॒","॑","᳚","᳛"],oe=n=>!!n&&Ne.indexOf(n)!==-1,N=n=>n==="Tamil-Extended",B=(n,e,l,t)=>{if(e.length===0)return;if(!t){n.emitPieces(e);return}const a=e[0]??"";if(a[0]===l){const c=a.slice(1),s=[];c&&s.push(c);for(let o=1;o<e.length;o++)s.push(e[o]);n.withLastCharMovedAfter([l],s)}else n.withLastCharMovedAfter(e,[])},me=["#an","#sss","#ss","#s"],Le=["↓","↑↑↑","↑↑","↑"],Ce=(n,e)=>{if(!n)return n;if(n.indexOf("x")!==-1&&(n=n.replaceAll("x","kSh")),e==="Tamil-Extended")for(let l=0;l<me.length;l++){const t=me[l];n.indexOf(t)!==-1&&(n=n.replaceAll(t,Le[l]))}return n},Ee=[" ",`
1
+ "use strict";function Q(n,e,l,t){const{accessor:a,compareFn:c}=t??{},s=a??((i,r)=>i[r]);let o=0,p=e.length-1,_=-1;for(;o<=p;){const i=Math.floor((o+p)/2),r=e[i],u=s(n,r);let m;c?m=c(l,u):m=l<u?-1:l>u?1:0,m===0?(_=r,p=i-1):m<0?p=i-1:o=i+1}return _}function Y(n,e,l){const{accessor:t,compareFn:a}=l??{},c=t??((_,i)=>_[i]);let s=0,o=n.length-1,p=-1;for(;s<=o;){const _=Math.floor((s+o)/2),i=c(n,_);let r;a?r=a(e,i):r=e<i?-1:e>i?1:0,r===0?(p=_,o=_-1):r<0?o=_-1:s=_+1}return p}const we=(n,e,l)=>{const t=n[e];return t?typeof t=="function"?t():Promise.resolve(t):new Promise((a,c)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(c.bind(null,new Error("Unknown variable dynamic import: "+e+(e.split("/").length!==l?". Note that variables only represent file names one level deep.":""))))})},le={},_e=async n=>(le[n]||(le[n]=we(Object.assign({"../script_data/Assamese.json":()=>Promise.resolve().then(()=>require("./Assamese-D-JeQpHm.cjs")),"../script_data/Bengali.json":()=>Promise.resolve().then(()=>require("./Bengali-Cb8p6Ss6.cjs")),"../script_data/Brahmi.json":()=>Promise.resolve().then(()=>require("./Brahmi-WrTB6e7g.cjs")),"../script_data/Devanagari.json":()=>Promise.resolve().then(()=>require("./Devanagari-CubB6Ubb.cjs")),"../script_data/Granth.json":()=>Promise.resolve().then(()=>require("./Granth-C6Es6NQ-.cjs")),"../script_data/Gujarati.json":()=>Promise.resolve().then(()=>require("./Gujarati-ToSwR4ym.cjs")),"../script_data/Gurumukhi.json":()=>Promise.resolve().then(()=>require("./Gurumukhi-enKEt02s.cjs")),"../script_data/Kannada.json":()=>Promise.resolve().then(()=>require("./Kannada-BuxZGQgS.cjs")),"../script_data/Malayalam.json":()=>Promise.resolve().then(()=>require("./Malayalam-DrxDIRjl.cjs")),"../script_data/Modi.json":()=>Promise.resolve().then(()=>require("./Modi-CYRCB8M0.cjs")),"../script_data/Normal.json":()=>Promise.resolve().then(()=>require("./Normal-BfIhy-Ts.cjs")),"../script_data/Odia.json":()=>Promise.resolve().then(()=>require("./Odia-DyI85meX.cjs")),"../script_data/Purna-Devanagari.json":()=>Promise.resolve().then(()=>require("./Purna-Devanagari-72KHauTF.cjs")),"../script_data/Romanized.json":()=>Promise.resolve().then(()=>require("./Romanized-Dy_qfDqa.cjs")),"../script_data/Sharada.json":()=>Promise.resolve().then(()=>require("./Sharada-CsNaWIt6.cjs")),"../script_data/Siddham.json":()=>Promise.resolve().then(()=>require("./Siddham-Do9NoVoz.cjs")),"../script_data/Sinhala.json":()=>Promise.resolve().then(()=>require("./Sinhala-Cu5sdgUY.cjs")),"../script_data/Tamil-Extended.json":()=>Promise.resolve().then(()=>require("./Tamil-Extended-PyLgZJyX.cjs")),"../script_data/Tamil.json":()=>Promise.resolve().then(()=>require("./Tamil-CiqM4WXX.cjs")),"../script_data/Telugu.json":()=>Promise.resolve().then(()=>require("./Telugu-CaCRkj-p.cjs"))}),`../script_data/${n}.json`,3).then(e=>e.default)),le[n]),$={"all_to_normal:replace_pancham_varga_varna_with_n":{from_script_type:"all",to_script_name:["Normal"],check_in:"output",rules:[{type:"replace_prev_krama_keys",check_in:"output",prev:[60],following:[52,53,54,55,56,57,58,59],replace_with:[72]},{type:"replace_prev_krama_keys",check_in:"output",prev:[67],following:[61,62,63,64,65,66],replace_with:[72]}]},"brahmic_to_brahmic:replace_pancham_varga_varna_with_anusvAra":{from_script_type:"brahmic",to_script_type:"brahmic",check_in:"input",rules:[{type:"replace_prev_krama_keys",check_in:"input",prev:[60,49],following:[52,53,54,55,56,57,58,59],replace_with:[45]},{type:"replace_prev_krama_keys",check_in:"input",prev:[67,49],following:[61,62,63,64,65,66],replace_with:[45]},{type:"replace_prev_krama_keys",check_in:"input",prev:[81,49],following:[74,75,76,77,78,79,80],replace_with:[45]},{type:"replace_prev_krama_keys",check_in:"input",prev:[72,49],following:[68,69,70,71],replace_with:[45]},{type:"replace_prev_krama_keys",check_in:"input",prev:[88,49],following:[82,83,85,86,87],replace_with:[45]}]},"all_to_sinhala:use_conjunct_enabling_halant":{from_script_type:"all",to_script_name:["Sinhala"],check_in:"output",rules:[{type:"direct_replace",check_in:"output",to_replace:[[49]],replace_text:"්‍",replace_with:[]}]},"all_to_normal:remove_virAma_and_double_virAma":{from_script_type:"all",to_script_name:["Normal","Romanized"],check_in:"output",rules:[{type:"direct_replace",check_in:"output",to_replace:[[116],[115]],replace_with:[-1]}]},"all_to_normal:replace_avagraha_with_a":{from_script_type:"all",to_script_name:["Normal","Romanized"],check_in:"output",rules:[{type:"direct_replace",check_in:"output",to_replace:[[48]],replace_with:[1]}]},"normal_to_all:use_typing_chars":{from_script_name:["Normal"],to_script_type:"all",check_in:"output",rules:[]},"all_to_normal:preserve_specific_chars":{from_script_type:"all",to_script_name:["Normal"],check_in:"output",rules:[]}},Te=(n,e)=>{const l=n.krama_text_arr[e]?.[0];return typeof l=="string"?l:null},H=(n,e)=>Te(n,e)??"",Z=(n,e)=>Q(n.krama_text_arr,n.krama_text_arr_index,e,{accessor:(l,t)=>l[t][0]}),be=()=>{let n=[];function e(i){i&&n.push(i)}function l(i){for(const r of i)e(r)}function t(){return n.at(-1)}function a(){return t()?.at(-1)}function c(){const i=t();if(!i)return;const r=i.at(-1),u=i.slice(0,-1);return u?n[n.length-1]=u:n.pop(),r}function s(i,r){n.splice(-i,i,...r.filter(Boolean))}function o(i,r){const u=c();if(!u){l(i),l(r);return}l(i),e(u),l(r)}function p(i){const r=n.at(i);return r?{cp:i,ch:r,width:r.length}:null}function _(i,r){i<0&&(i=n.length+i),!(i<0||i>=n.length)&&(n[i]=r)}return{emit:e,emitPieces:l,lastPiece:t,lastChar:a,popLastChar:c,rewriteTailPieces:s,withLastCharMovedAfter:o,toString:()=>n.join(""),rewriteAt:_,peekAt:p}},Se=n=>{let e=[];function l(){e=[]}function t(){return e.length}function a(u){return e.at(u)}function c(){return e.at(-1)}function s(){return c()?.[0]}function o(){return c()?.[1]?.type}function p(u){return a(u)?.[1]?.type}function _(u){return a(u)?.[0]}function i(u){return o()===u}function r(u){const m=u[0];m!==void 0&&m.length>0&&e.push(u),e.length>n&&e.shift()}return{clear:l,length:t,at:a,last:c,lastText:s,lastType:o,typeAt:p,textAt:_,isLastType:i,push:r}},je=n=>{let e=0;function l(o){const p=n.codePointAt(o);if(p===void 0)return null;const _=String.fromCodePoint(p);return{cp:p,ch:_,width:_.length}}function t(){return l(e)}function a(o){return l(e+o)}function c(o){e+=o}function s(o,p){return n.substring(o,p)}return{get pos(){return e},peek:t,peekAt:l,peekAtOffsetUnits:a,advance:c,slice:s}},se=(n,e,l,t)=>{for(let a=0;a<l.length;a++){const c=l[l.length-1-a],s=n(e-a);if(s===null)return{matched:!1,matchedLen:0};const o=Z(t,s.ch);if(o===-1||o!==c)return{matched:!1,matchedLen:0}}return{matched:!0,matchedLen:l.length}},ce=(n,e)=>n.map(l=>H(e,l)).filter(Boolean),Pe=["²","³","⁴"],j=n=>!!n&&Pe.indexOf(n)!==-1,Ne=["॒","॑","᳚","᳛"],oe=n=>!!n&&Ne.indexOf(n)!==-1,N=n=>n==="Tamil-Extended",B=(n,e,l,t)=>{if(e.length===0)return;if(!t){n.emitPieces(e);return}const a=e[0]??"";if(a[0]===l){const c=a.slice(1),s=[];c&&s.push(c);for(let o=1;o<e.length;o++)s.push(e[o]);n.withLastCharMovedAfter([l],s)}else n.withLastCharMovedAfter(e,[])},me=["#an","#sss","#ss","#s"],Le=["↓","↑↑↑","↑↑","↑"],Ce=(n,e)=>{if(!n)return n;if(n.indexOf("x")!==-1&&(n=n.replaceAll("x","kSh")),e==="Tamil-Extended")for(let l=0;l<me.length;l++){const t=me[l];n.indexOf(t)!==-1&&(n=n.replaceAll(t,Le[l]))}return n},Ee=[" ",`
2
2
  `,"\r"," ",",","~","!","@","?","%"],Oe=3;function S(n,e,l){const{from_script_name:t,to_script_name:a,from_script_data:c,to_script_data:s,trans_options:o,result:p,prev_context:_,BRAHMIC_HALANT:i,BRAHMIC_NUQTA:r,typing_mode:u,include_inherent_vowel:m}=n,{next:v,last_extra_call:L}=l??{};let V=!1;if((r&&_.typeAt(-3)==="vyanjana"&&_.textAt(-2)===r&&_.typeAt(-1)==="mAtrA"||_.typeAt(-2)==="vyanjana"&&_.typeAt(-1)==="mAtrA")&&(!e||e[1]?.type==="anya")&&_.clear(),c.script_type==="brahmic"&&s.script_type==="other")e[0]!==i&&(!(N(t)&&e[0]&&e[0].length>0)||e[0].charAt(0)!==i)&&(!r||e[0]!==r)&&(_.typeAt(-1)==="vyanjana"||r&&_.typeAt(-2)==="vyanjana"&&_.textAt(-1)===r)&&(e[1]?.type!=="mAtrA"&&e[0]!==i||e[1]?.type==="anya"||e[1]===null||e[1]===void 0)&&p.emit(s.schwa_character);else if(c.script_type==="other"&&s.script_type==="brahmic")if(_.typeAt(-1)==="vyanjana"&&(e[1]?.type==="mAtrA"||e[1]?.type==="svara")){const y=e[1].type==="svara"?H(s,e[1].mAtrA_krama_ref?.[0]??-1):e[0];N(a)&&j(p.lastChar())?B(p,[y],s.halant,!0):B(p,[y],s.halant,!1),V=!0}else!m&&_.typeAt(-1)==="vyanjana"&&!(e[0]===i||e[1]?.type==="mAtrA")?N(a)&&j(p.lastChar())?B(p,[i],s.halant,!0):(B(p,[i],s.halant,!1),a==="Sinhala"&&o["all_to_sinhala:use_conjunct_enabling_halant"]&&p.rewriteAt(-1,p.lastPiece()+"‍")):m&&e&&e[1]?.type==="vyanjana"&&(_.typeAt(-1)==="vyanjana"||r&&_.typeAt(-2)==="vyanjana"&&_.textAt(-1)===r)&&(N(a)&&j(p.lastChar())?B(p,[i],s.halant,!0):(B(p,[i],s.halant,!1),a==="Sinhala"&&o["all_to_sinhala:use_conjunct_enabling_halant"]&&p.rewriteAt(-1,p.lastPiece()+"‍")));let K=!1;return u&&(v===void 0||v.length===0)&&!L&&!(N(a)&&j(p.lastChar()))&&(K=!0,e[1]?.type==="vyanjana"&&(K=!1),K&&_.clear()),(!u||!L&&!K)&&_.push(e),V}function fe(n,e,l){const{custom_rules:t,cursor:a,result:c,from_script_data:s,to_script_data:o}=n,p=e+l;for(let _=0;_<t.length;_++){if(t[_].use_replace===!0)continue;const i=t[_];if(i.type==="replace_prev_krama_keys"){if(i.check_in==="input"){const r=se(a.peekAt,p,i.prev,s),u=a.peekAt(e);if(r.matched&&u!==null){const m=u.ch,v=Z(s,m);if(v!==-1&&i.following.indexOf(v)!==-1){const L=ce(i.replace_with,o);c.rewriteTailPieces(r.matchedLen,L)}}}else if(i.check_in==="output"){const r=c.lastPiece();if(!r)continue;const u=Z(o,r);if(u!==-1&&i.following.indexOf(u)!==-1){const m=se(c.peekAt,-2,i.prev,o);if(m.matched){const v=ce(i.replace_with,o);c.rewriteTailPieces(m.matchedLen+1,[...v,r])}}}}else if(i.type==="direct_replace"){const r=i.check_in==="output"?o:s;for(const u of i.to_replace){const m=se(c.peekAt,-1,u,r);if(!m.matched)continue;if(i.replace_text){c.rewriteTailPieces(m.matchedLen,[i.replace_text]);break}const v=ce(i.replace_with,r);c.rewriteTailPieces(m.matchedLen,v);break}}}}const de=(n,e,l)=>{if(!l)return{};const t={};for(const[a,c]of Object.entries(l??{})){if(!(a in $))continue;const s=$[a];(s.from_script_type==="all"&&s.to_script_type==="all"||(s.from_script_type!==void 0&&(s.from_script_type==="all"||s.from_script_type===n.script_type)||s.from_script_name!==void 0&&s.from_script_name.includes(n.script_name))&&(s.to_script_type!==void 0&&(s.to_script_type==="all"||s.to_script_type===e.script_type)||s.to_script_name!==void 0&&s.to_script_name.includes(e.script_name)))&&(t[a]=c)}return t},ge=(n,e,l)=>{const t=de(n,e,l),a=Object.keys(t).flatMap(c=>t[c]===!0?$[c].rules:[]);return{trans_options:t,custom_rules:a}},ye=(n,e)=>n.replace_with.map(l=>H(e,l)).join(""),ke=(n,e,l,t)=>{if(l.length===0)return n;for(const a of l)if(!(a.use_replace!==!0||a.check_in!==t)){if(a.type==="replace_prev_krama_keys"){const c=a.prev.map(s=>H(e,s)).join("");for(let s of a.following){const o=H(e,s);if(!o)continue;const p=ye(a,e)+o;n=n.replaceAll(c+o,p)}}else if(a.type==="direct_replace"){const c=a.to_replace.map(s=>s.map(o=>H(e,o)).join(""));for(let s of c)n=n.replaceAll(s,ye(a,e))}}return n},Ie=!0,Me=!1,xe=(n,e,l,t,a,c,s,o)=>{const p=o?.useNativeNumerals??Ie,_=o?.typing_mode??!1,i=o?.includeInherentVowel??Me;if(_&&e!=="Normal")throw new Error("Typing mode is only supported with Normal script as the input");_&&(c["normal_to_all:use_typing_chars"]=!0),_&&e==="Normal"&&(n=Ce(n,l)),n=ke(n,t,s,"input");const r=be();let u=0;const m=je(n),v=Se(Oe),L=t.script_type==="brahmic"&&a.script_type==="other"||t.script_type==="other"&&a.script_type==="brahmic"||_&&e==="Normal"&&a.script_type==="other",V=t.script_type==="brahmic"&&a.script_type==="other"?t.nuqta??null:t.script_type==="other"&&a.script_type==="brahmic"?a.nuqta??null:null,K=t.script_type==="brahmic"&&a.script_type==="other"?t.halant:t.script_type==="other"&&a.script_type==="brahmic"?a.halant:null,y={from_script_name:e,to_script_name:l,from_script_data:t,to_script_data:a,trans_options:c,custom_rules:s,cursor:m,result:r,prev_context:v,BRAHMIC_NUQTA:V,BRAHMIC_HALANT:K,typing_mode:_,include_inherent_vowel:i},ee=(c["normal_to_all:use_typing_chars"]||_)&&e==="Normal"?a.typing_text_to_krama_map:t.text_to_krama_map;let g=-1;for(;m.pos<n.length;){u=m.pos;const ne=m.peek();if(!ne)break;const U=ne.ch,z=ne.width,pe=z===2?1:z;if(g!==-1&&u>=g){g=-1,m.advance(z);continue}if(Ee.indexOf(U)!==-1){m.advance(z),L&&(S(y,[" ",null]),v.clear()),r.emit(U);continue}if(U.match(/^\d$/)&&!p){r.emit(U),m.advance(z),S(y,[U,null]);continue}if(c["all_to_normal:preserve_specific_chars"]&&l==="Normal"){const x=Y(t.custom_script_chars_arr,U,{accessor:(A,b)=>A[b][0]});if(x!==-1){const A=t.custom_script_chars_arr[x];S(y,[A[0],t.list[A[1]??-1]??null]);const b=t.typing_text_to_krama_map[A[2]??-1]?.[0];r.emit(b??""),m.advance(A[0].length);continue}}let R=-1;{let x=0,A=-1;const b=L&&t.script_type==="other"&&a.script_type==="brahmic"&&(v.typeAt(-1)==="vyanjana"||V&&v.typeAt(-2)==="vyanjana"&&v.textAt(-1)===V);for(;;){const q=m.peekAt(u+pe+x),J=q?.ch??"";g!==-1&&J&&j(J)&&(x+=q?.width??0);const w=u+pe+x,f=g!==-1?m.slice(u,g)+(w>g?m.slice(g+1,w):""):m.slice(u,w),P=Y(ee,f,{accessor:(T,C)=>T[C][0]});if(P===-1){R=-1;break}const k=ee[P];if(b&&k[1].krama&&k[1].krama.length>=1){const T=k[1].krama,C=T[0],E=a.krama_text_arr[C]?.[1],re=a.list[E??-1]?.type;if(T.length===1&&E!==null&&E!==void 0&&(re==="svara"||re==="mAtrA"))A=P;else if(A!==-1){R=A;break}}if(k[1].next&&k[1].next.length>0){const T=m.peekAt(w),C=T?.ch;if(N(e)&&t.script_type==="brahmic"){const F=T?m.peekAt(w+T.width):null,E=F?.ch,I=(T&&F?m.peekAt(w+T.width+F.width):null)?.ch;if(g===-1&&E!==void 0&&j(E)&&k[1].next.indexOf(E)!==-1){const G=Y(t.text_to_krama_map,f+E,{accessor:(O,d)=>O[d][0]}),M=Q(t.krama_text_arr,t.krama_text_arr_index,C??"",{accessor:(O,d)=>O[d][0]});if(G!==-1&&M!==-1){R=G;const O=t.krama_text_arr[M],d=t.list[O[1]??-1]?.type;if(C===t.halant||d==="mAtrA"){g=w+(T?.width??0);break}}}else if(g===-1&&I!==void 0&&j(I)&&k[1].next.indexOf(I)!==-1){const G=Y(t.text_to_krama_map,f+I,{accessor:(d,D)=>d[D][0]}),M=Q(t.krama_text_arr,t.krama_text_arr_index,C??"",{accessor:(d,D)=>d[D][0]}),O=Q(t.krama_text_arr,t.krama_text_arr_index,E??"",{accessor:(d,D)=>d[D][0]});if(G!==-1&&M!==-1&&O!==-1){const d=t.krama_text_arr[M],D=t.krama_text_arr[O];R=G;const ie=t.list[d[1]??-1]?.type,Ae=t.list[D[1]??-1]?.type;if(ie==="mAtrA"&&Ae==="mAtrA"){g=w+(T?.width??0)+(F?.width??0);break}}}if(g===-1&&C!==void 0&&E!==void 0&&oe(E)&&I!==void 0&&j(I)&&k[1].next.indexOf(I)!==-1){const G=Q(t.krama_text_arr,t.krama_text_arr_index,C??"",{accessor:(M,O)=>M[O][0]});if(G!==-1){const M=t.krama_text_arr[G];if(t.list[M[1]??-1]?.type==="mAtrA"){const d=Y(t.text_to_krama_map,f+I,{accessor:(D,ie)=>D[ie][0]});if(d!==-1){R=d,g=w+(T?.width??0)+(F?.width??0);break}}}}}if(C!==void 0&&k[1].next.indexOf(C)!==-1){x+=T?.width??0;continue}}R=P;break}}const h=R!==-1?ee[R]:null;if(h!==null){const x=g!==-1&&h[0].length>1&&t.list[t.krama_text_arr[h[1].krama?.[0]??-1]?.[1]??-1]?.type==="vyanjana"&&j(h[0].at(-1)??void 0)?1:0,A=h[0].length-x;if(m.advance(A),u=m.pos,c["normal_to_all:use_typing_chars"]&&"custom_back_ref"in h[1]&&h[1].custom_back_ref!==void 0&&h[1].custom_back_ref!==null){const b=a.custom_script_chars_arr[h[1].custom_back_ref]??null;$!==null&&(r.emit(b[0]),S(y,[h[0],a.list[b[1]??-1]??null],{next:h[1].next??void 0}));continue}if(h[1].krama!==null&&h[1].krama!==void 0&&h[1].krama.some(b=>b!==-1)){const q=h[1].krama.map(f=>H(a,f)),J=q.join("");let w=!1;if(L)if(t.script_type==="brahmic"&&a.script_type==="other"){let f=null;if(!c["normal_to_all:use_typing_chars"]&&h[1].fallback_list_ref!==void 0&&h[1].fallback_list_ref!==null)f=t.list[h[1].fallback_list_ref];else if(!h[1].krama||h[1].krama.length===0)f=null;else{const P=h[1].krama.map(k=>t.list[t.krama_text_arr[k][1]??-1]);N(e)&&P.some(k=>k?.type==="mAtrA")&&P.some(k=>k?.type==="vyanjana")?f={...P[0],type:"anya"}:N(e)&&P.length>1&&P.some(k=>k==null)?f=P.at(-1):f=P[0]}w=S(y,[h[0],f])}else if(a.script_type==="brahmic"&&t.script_type==="other"){let f=null;h[1].fallback_list_ref!==void 0&&h[1].fallback_list_ref!==null?f=a.list[h[1].fallback_list_ref]:f=h[1].krama&&h[1].krama.length>0?a.list[a.krama_text_arr[h[1].krama[0]]?.[1]??-1]??null:null,_&&e==="Normal"?w=S(y,[h[0],f],{next:h[1].next??void 0}):w=S(y,[h[0],f])}else _&&e==="Normal"&&a.script_type==="other"&&(w=S(y,[h[0],null],{next:h[1].next??void 0}));if(!w)if(a.script_type==="brahmic"&&N(l)&&(a.list[h[1].krama?.at(-1)??-1]?.type==="mAtrA"||J===a.halant)&&j(r.lastChar()))B(r,q,a.halant,!0);else if(N(l)&&oe(q.at(-1)?.at(-1)??"")&&j(r.lastChar())){const f=r.popLastChar();r.emitPieces(q),r.emit(f??"")}else r.emitPieces(q);fe(y,u,-A);continue}else if(h[1].krama!==null&&h[1].krama!==void 0&&h[1].krama.some(b=>b===-1)){r.emit(h[0]),_&&S(y,[h[0],null],{next:h[1].next??void 0});continue}}else m.advance(z),u=m.pos;const W=h===null?U:h[0],X=Z(t,W);if(X===-1){L&&(S(y,[W,null]),v.clear()),r.emit(W);continue}let ae=!1;if(L&&(t.script_type==="brahmic"?ae=S(y,[W,t.list[t.krama_text_arr[X][1]??-1]]):a.script_type==="brahmic"&&(ae=S(y,[W,a.list[a.krama_text_arr[X][1]??-1]]))),!ae){const x=H(a,X);if(a.script_type==="brahmic"&&N(l)&&(a.list[a.krama_text_arr[X][1]??-1]?.type==="mAtrA"||x===a.halant)&&j(r.lastChar()))B(r,[x],a.halant,!0);else if(N(l)&&oe(x)&&j(r.lastChar())){const A=r.popLastChar();r.emit(x),r.emit(A??"")}else r.emit(x)}fe(y,u,-z)}L&&S(y,[void 0,null],{last_extra_call:!0});let te=r.toString();return te=ke(te,a,s,"output"),{output:te,context_length:v.length()}},De=async(n,e,l,t,a)=>{const[c,s]=await Promise.all([_e(e),_e(l)]),{trans_options:o,custom_rules:p}=ge(c,s,t);return xe(n,e,l,c,s,o,p,a)},Re={Devanagari:1,Telugu:2,Tamil:3,"Tamil-Extended":4,Bengali:5,Kannada:6,Gujarati:7,Malayalam:8,Odia:9,Sinhala:10,Normal:11,Romanized:12,Gurumukhi:13,Assamese:14,"Purna-Devanagari":15,Brahmi:16,Granth:17,Modi:18,Sharada:20,Siddham:21},qe={English:1,Sanskrit:2,Hindi:3,Telugu:4,Tamil:5,Bengali:6,Kannada:7,Gujarati:8,Malayalam:9,Odia:10,Sinhala:11,Marathi:12,Nepali:13,Punjabi:14,Assamese:15},Ge={script_list:Re,lang_list:qe},{script_list:Be,lang_list:He}=Ge,ue=Object.keys(Be),he=Object.keys(He),Ue=Array.from(new Set([...he,...ue])),ze={Bengali:"Bengali",Gujarati:"Gujarati",Hindi:"Devanagari",Kannada:"Kannada",Malayalam:"Malayalam",Odia:"Odia",Sinhala:"Sinhala",Tamil:"Tamil",Telugu:"Telugu",English:"Normal",Sanskrit:"Devanagari",Marathi:"Devanagari",Nepali:"Devanagari",Punjabi:"Gurumukhi",Assamese:"Assamese"},ve={dev:"Devanagari",te:"Telugu",tel:"Telugu",tam:"Tamil","tam-ex":"Tamil-Extended",ben:"Bengali",be:"Bengali",ka:"Kannada",kan:"Kannada",gu:"Gujarati",guj:"Gujarati",mal:"Malayalam",or:"Odia",od:"Odia",oriya:"Odia",si:"Sinhala",sinh:"Sinhala",sin:"Sinhala",en:"Normal",eng:"Normal",la:"Normal",lat:"Normal",nor:"Normal",norm:"Normal",rom:"Romanized",gur:"Gurumukhi",as:"Assamese",sa:"Devanagari",san:"Devanagari",hin:"Devanagari",hi:"Devanagari",mar:"Devanagari",ne:"Devanagari",nep:"Devanagari",pun:"Gurumukhi"};function Ve(n){return n.toLowerCase().replace(/(^|-)([a-z])/g,(e,l,t)=>l+t.toUpperCase())}const Ke=n=>{const e=Ve(n);return ue.includes(e)?e:he.includes(e)?ze[e]:n.toLocaleLowerCase()in ve?ve[n.toLocaleLowerCase()]:null};exports.ALL_LANG_SCRIPT_LIST=Ue;exports.LANG_LIST=he;exports.SCRIPT_LIST=ue;exports.custom_options_json=$;exports.getNormalizedScriptName=Ke;exports.getScriptData=_e;exports.get_active_custom_options=de;exports.resolve_transliteration_rules=ge;exports.transliterate_text=De;exports.transliterate_text_core=xe;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("./script_normalization-C4f8lsi1.cjs"),N=4500,v=!0,D=!1;function U(r,n){const{autoContextTClearTimeMs:t}=n??{};let s=n?.useNativeNumerals??v,l=n?.includeInherentVowel??D;const i=g.getNormalizedScriptName(r);if(!i)throw new Error(`Invalid script name: ${r}`);let e="",a="";const o=t??N;let c=null,u=null,m=null,f={},_=[];const p=(async()=>{const[y,h]=await Promise.all([g.getScriptData("Normal"),g.getScriptData(i)]);u=y,m=h;const S=g.resolve_transliteration_rules(y,h);f=S.trans_options,_=S.custom_rules})();function d(){c=null,e="",a=""}function E(y){if(!u||!m)throw new Error("Typing context not ready. Await `ctx.ready` before calling takeKeyInputSync.");const h=Date.now();c&&h-c>o&&d();let S=y?.[0]??"";e+=S;let x=a;const{context_length:k,output:w}=g.transliterate_text_core(e,"Normal",i,u,m,f,_,{typing_mode:!0,useNativeNumerals:s,includeInherentVowel:l});k>0?a=w:k===0&&d();let T=0;for(;T<w.length&&T<x.length&&w[T]===x[T];)T++;let I=w.substring(T),A=x.length-T;return c=Date.now(),{to_delete_chars_count:A,diff_add_text:I}}return{ready:p,clearContext:d,takeKeyInput:E,updateUseNativeNumerals:y=>{s=y??v},updateIncludeInherentVowel:y=>{l=y??D}}}async function L(r,n,t,s){if(!(s??!0)){t?.(n?.currentTarget?.value);return}const i=n?.nativeEvent??n,e="nativeEvent"in n,a=n?.currentTarget??i?.target;if(!i||!a||i.isComposing)return;if(i.inputType!=="insertText"){t?.(a.value),r.clearContext();return}const o=i.data;if(typeof o!="string"||o.length!==1){t?.(a.value),r.clearContext();return}const c=a.selectionStart??0,u=a.selectionEnd??c;if(c!==u){t?.(a.value),r.clearContext();return}e&&t&&t(n.currentTarget.value),await r.ready;const{diff_add_text:m,to_delete_chars_count:f}=r.takeKeyInput(o),_=c,p=Math.max(0,_-f-o.length);a.setRangeText(m,p,_,"end"),t?.(a.value)}async function M(r,n,t,s){if(!(s??!0))return;const e="nativeEvent"in n?n.nativeEvent:n,a=n?.currentTarget??e?.target;if(!e||!a||e.isComposing||(!e.inputType||e.inputType!=="insertText")&&(!e.type||e.type!=="textInput"))return;const o=e.data;if(typeof o!="string"||o.length===0)return;if(o.length!==1){r.clearContext();return}const c=a.selectionStart??0,u=a.selectionEnd??c;if(c!==u){r.clearContext();return}e.preventDefault?.(),await r.ready;const{diff_add_text:m,to_delete_chars_count:f}=r.takeKeyInput(o),_=c,p=Math.max(0,_-f);a.setRangeText(m,p,_,"end"),t?.(a.value)}const b=new Set(["Backspace","Delete","Enter","Tab","Escape","ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End","PageUp","PageDown"]);function K(r,n){const t=r?.nativeEvent??r;if(t instanceof KeyboardEvent){if(t.isComposing)return!1;const s=t.key;if(!s||s==="Unidentified"||s==="Process"||s==="Dead"||t.ctrlKey||t.metaKey||t.altKey)return!1;if(b.has(s))return n.clearContext(),!0}return!1}async function R(r){const n=g.getNormalizedScriptName(r);if(!n||n==="Normal")throw new Error(`Invalid script name: ${r}`);const t=await g.getScriptData(n);return t.krama_text_arr.map(l=>[l[0],t.list[l[1]??-1]?.type??"anya"])}async function C(r){const n=g.getNormalizedScriptName(r);if(!n||n==="Normal")throw new Error(`Invalid script name: ${r}`);const t=await g.getScriptData(n),s=i=>{const e=new Map,a=[],o=[];for(const[c,u,m]of i){const f=`${c}\0${u}`,_=e.get(f);if(_===void 0){const p=[],d=new Set;for(const E of m)d.has(E)||(d.add(E),p.push(E));o.push([c,u,p]),e.set(f,o.length-1),a.push(d)}else{const p=a[_],d=o[_][2];for(const E of m)p.has(E)||(p.add(E),d.push(E))}}return o.filter(([,,c])=>c.length>0)},l={common_krama_map:t.krama_text_arr.map(i=>[i[0],t.list[i[1]??-1]?.type??"anya",[]]),script_specific_krama_map:t.custom_script_chars_arr.map(i=>[i[0],t.list[i[1]??-1]?.type??"anya",[]])};for(let i=0;i<t.typing_text_to_krama_map.length;i++){const e=t.typing_text_to_krama_map[i],a=e[0];if(a!==""){if(e[1]&&e[1].custom_back_ref)l.script_specific_krama_map[e[1].custom_back_ref][2].push(a);else if(e[1]&&e[1].krama&&e[1].krama.length===1){const o=e[1].krama[0]??-1;o!==-1&&l.common_krama_map[o][2].push(a)}}}return l.common_krama_map=s(l.common_krama_map),l.script_specific_krama_map=s(l.script_specific_krama_map),l}exports.DEFAULT_AUTO_CONTEXT_CLEAR_TIME_MS=N;exports.DEFAULT_INCLUDE_INHERENT_VOWEL=D;exports.DEFAULT_USE_NATIVE_NUMERALS=v;exports.clearTypingContextOnKeyDown=K;exports.createTypingContext=U;exports.getScriptKramaData=R;exports.getScriptTypingDataMap=C;exports.handleTypingBeforeInputEvent=M;exports.handleTypingInputEvent=L;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("./script_normalization-BlG9S8Ex.cjs"),N=4500,v=!0,D=!1;function U(r,n){const{autoContextTClearTimeMs:t}=n??{};let s=n?.useNativeNumerals??v,l=n?.includeInherentVowel??D;const i=g.getNormalizedScriptName(r);if(!i)throw new Error(`Invalid script name: ${r}`);let e="",a="";const o=t??N;let c=null,u=null,m=null,f={},_=[];const p=(async()=>{const[y,h]=await Promise.all([g.getScriptData("Normal"),g.getScriptData(i)]);u=y,m=h;const S=g.resolve_transliteration_rules(y,h);f=S.trans_options,_=S.custom_rules})();function d(){c=null,e="",a=""}function E(y){if(!u||!m)throw new Error("Typing context not ready. Await `ctx.ready` before calling takeKeyInputSync.");const h=Date.now();c&&h-c>o&&d();let S=y?.[0]??"";e+=S;let x=a;const{context_length:k,output:w}=g.transliterate_text_core(e,"Normal",i,u,m,f,_,{typing_mode:!0,useNativeNumerals:s,includeInherentVowel:l});k>0?a=w:k===0&&d();let T=0;for(;T<w.length&&T<x.length&&w[T]===x[T];)T++;let I=w.substring(T),A=x.length-T;return c=Date.now(),{to_delete_chars_count:A,diff_add_text:I}}return{ready:p,clearContext:d,takeKeyInput:E,updateUseNativeNumerals:y=>{s=y??v},updateIncludeInherentVowel:y=>{l=y??D}}}async function L(r,n,t,s){if(!(s??!0)){t?.(n?.currentTarget?.value);return}const i=n?.nativeEvent??n,e="nativeEvent"in n,a=n?.currentTarget??i?.target;if(!i||!a||i.isComposing)return;if(i.inputType!=="insertText"){t?.(a.value),r.clearContext();return}const o=i.data;if(typeof o!="string"||o.length!==1){t?.(a.value),r.clearContext();return}const c=a.selectionStart??0,u=a.selectionEnd??c;if(c!==u){t?.(a.value),r.clearContext();return}e&&t&&t(n.currentTarget.value),await r.ready;const{diff_add_text:m,to_delete_chars_count:f}=r.takeKeyInput(o),_=c,p=Math.max(0,_-f-o.length);a.setRangeText(m,p,_,"end"),t?.(a.value)}async function M(r,n,t,s){if(!(s??!0))return;const e="nativeEvent"in n?n.nativeEvent:n,a=n?.currentTarget??e?.target;if(!e||!a||e.isComposing||(!e.inputType||e.inputType!=="insertText")&&(!e.type||e.type!=="textInput"))return;const o=e.data;if(typeof o!="string"||o.length===0)return;if(o.length!==1){r.clearContext();return}const c=a.selectionStart??0,u=a.selectionEnd??c;if(c!==u){r.clearContext();return}e.preventDefault?.(),await r.ready;const{diff_add_text:m,to_delete_chars_count:f}=r.takeKeyInput(o),_=c,p=Math.max(0,_-f);a.setRangeText(m,p,_,"end"),t?.(a.value)}const b=new Set(["Backspace","Delete","Enter","Tab","Escape","ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End","PageUp","PageDown"]);function K(r,n){const t=r?.nativeEvent??r;if(t instanceof KeyboardEvent){if(t.isComposing)return!1;const s=t.key;if(!s||s==="Unidentified"||s==="Process"||s==="Dead"||t.ctrlKey||t.metaKey||t.altKey)return!1;if(b.has(s))return n.clearContext(),!0}return!1}async function R(r){const n=g.getNormalizedScriptName(r);if(!n||n==="Normal")throw new Error(`Invalid script name: ${r}`);const t=await g.getScriptData(n);return t.krama_text_arr.map(l=>[l[0],t.list[l[1]??-1]?.type??"anya"])}async function C(r){const n=g.getNormalizedScriptName(r);if(!n||n==="Normal")throw new Error(`Invalid script name: ${r}`);const t=await g.getScriptData(n),s=i=>{const e=new Map,a=[],o=[];for(const[c,u,m]of i){const f=`${c}\0${u}`,_=e.get(f);if(_===void 0){const p=[],d=new Set;for(const E of m)d.has(E)||(d.add(E),p.push(E));o.push([c,u,p]),e.set(f,o.length-1),a.push(d)}else{const p=a[_],d=o[_][2];for(const E of m)p.has(E)||(p.add(E),d.push(E))}}return o.filter(([,,c])=>c.length>0)},l={common_krama_map:t.krama_text_arr.map(i=>[i[0],t.list[i[1]??-1]?.type??"anya",[]]),script_specific_krama_map:t.custom_script_chars_arr.map(i=>[i[0],t.list[i[1]??-1]?.type??"anya",[]])};for(let i=0;i<t.typing_text_to_krama_map.length;i++){const e=t.typing_text_to_krama_map[i],a=e[0];if(a!==""){if(e[1]&&e[1].custom_back_ref)l.script_specific_krama_map[e[1].custom_back_ref][2].push(a);else if(e[1]&&e[1].krama&&e[1].krama.length===1){const o=e[1].krama[0]??-1;o!==-1&&l.common_krama_map[o][2].push(a)}}}return l.common_krama_map=s(l.common_krama_map),l.script_specific_krama_map=s(l.script_specific_krama_map),l}exports.DEFAULT_AUTO_CONTEXT_CLEAR_TIME_MS=N;exports.DEFAULT_INCLUDE_INHERENT_VOWEL=D;exports.DEFAULT_USE_NATIVE_NUMERALS=v;exports.clearTypingContextOnKeyDown=K;exports.createTypingContext=U;exports.getScriptKramaData=R;exports.getScriptTypingDataMap=C;exports.handleTypingBeforeInputEvent=M;exports.handleTypingInputEvent=L;
@@ -1,4 +1,4 @@
1
- const a = "other", l = "Romanized", e = 12, h = "a", n = [[".", { krama: [115], next: ["."] }], ["..", { krama: [116] }], ["C", { krama: [61], next: ["h"] }], ["Ch", { krama: [62] }], ["L", { next: ["̥"] }], ["L̥", { krama: [41], next: ["̄"] }], ["L̥̄", { krama: [43] }], ["M", { next: ["̐"] }], ["M̐", { krama: [46] }], ["R", { next: ["̥"] }], ["R̥", { krama: [37], next: ["̄"] }], ["R̥̄", { krama: [39] }], ["a", { krama: [1], next: ["i", "u"] }], ["ai", { krama: [25] }], ["au", { krama: [33] }], ["b", { krama: [85], next: ["h"] }], ["bh", { krama: [87] }], ["c", { next: ["h"] }], ["ch", { krama: [61], next: ["h"] }], ["chh", { krama: [62] }], ["d", { krama: [70], next: ["h"] }], ["dh", { krama: [71] }], ["g", { krama: [56], next: ["z", "h"] }], ["gh", { krama: [59] }], ["gz", { krama: [57] }], ["j", { krama: [63], next: ["z", "h"] }], ["jh", { krama: [66] }], ["jz", { krama: [64] }], ["k", { krama: [52], next: ["z", "h"] }], ["kh", { krama: [54], next: ["z"] }], ["khz", { krama: [55] }], ["kz", { krama: [53] }], ["l", { krama: [94], next: ["̥"] }], ["l̥", { krama: [41], next: ["̄"] }], ["l̥̄", { krama: [43] }], ["m", { krama: [88], next: ["̐"] }], ["m̐", { krama: [46] }], ["p", { krama: [82], next: ["h"] }], ["ph", { krama: [83], next: ["z"] }], ["phz", { krama: [84] }], ["r", { krama: [92], next: ["̥"] }], ["r̥", { krama: [37], next: ["̄"] }], ["r̥̄", { krama: [39] }], ["t", { krama: [68], next: ["h"] }], ["th", { krama: [69] }], ["Ê", { krama: [27] }], ["Ñ", { krama: [67] }], ["Ô", { krama: [35] }], ["Ā", { krama: [5] }], ["ā", { krama: [5], next: ["ū"] }], ["āū", { krama: [5, 17], next: ["ṁ"] }], ["āūṁ", { krama: [0] }], ["Ē", { krama: [21] }], ["Ī", { krama: [11] }], ["Ō", { krama: [29] }], ["Ś", { krama: [99] }], ["Ū", { krama: [17] }], ["Ḍ", { krama: [76], next: ["h"] }], ["Ḍh", { krama: [79] }], ["ḍ", { krama: [76], next: ["h"] }], ["ḍh", { krama: [79] }], ["Ḥ", { krama: [47] }], ["Ḷ", { krama: [95] }], ["Ḻ", { krama: [96] }], ["Ṁ", { krama: [45] }], ["Ṅ", { krama: [81] }], ["Ṇ", { krama: [81] }], ["Ṉ", { krama: [73] }], ["Ṛ", { krama: [77], next: ["h"] }], ["Ṛh", { krama: [80] }], ["ṛ", { krama: [77], next: ["h"] }], ["ṛh", { krama: [80] }], ["Ṟ", { krama: [93] }], ["Ṣ", { krama: [100] }], ["Ṭ", { krama: [74], next: ["h"] }], ["Ṭh", { krama: [75] }], ["ṭ", { krama: [74], next: ["h"] }], ["ṭh", { krama: [75] }], ["↑", { krama: [102], next: ["↑"] }], ["↑↑", { krama: [103], next: ["↑"] }], ["↑↑↑", { krama: [104] }]], r = [], k = [["āūṁ", null], ["a", null], ["a", null], ["a", null], ["a", null], ["ā", null], ["ā", null], ["ā", null], ["ā", null], ["i", null], ["i", null], ["ī", null], ["ī", null], ["u", null], ["u", null], ["u", null], ["u", null], ["ū", null], ["ū", null], ["ū", null], ["ū", null], ["ē", null], ["ē", null], ["e", null], ["e", null], ["ai", null], ["ai", null], ["ê", null], ["ê", null], ["ō", null], ["ō", null], ["o", null], ["o", null], ["au", null], ["au", null], ["ô", null], ["ô", null], ["r̥", null], ["r̥", null], ["r̥̄", null], ["r̥̄", null], ["l̥", null], ["l̥", null], ["l̥̄", null], ["l̥̄", null], ["ṁ", null], ["m̐", null], ["ḥ", null], ["`", null], ["", null], ["", null], ["", null], ["k", null], ["kz", null], ["kh", null], ["khz", null], ["g", null], ["gz", null], ["g", null], ["gh", null], ["ṅ", null], ["C", null], ["Ch", null], ["j", null], ["jz", null], ["j", null], ["jh", null], ["ñ", null], ["t", null], ["th", null], ["d", null], ["dh", null], ["n", null], ["ṉ", null], ["ṭ", null], ["ṭh", null], ["ḍ", null], ["ṛ", null], ["ḍ", null], ["ḍh", null], ["ṛh", null], ["ṇ", null], ["p", null], ["ph", null], ["phz", null], ["b", null], ["b", null], ["bh", null], ["m", null], ["y", null], ["y", null], ["v", null], ["r", null], ["ṟ", null], ["l", null], ["ḷ", null], ["ḻ", null], ["h", null], ["s", null], ["ś", null], ["ṣ", null], ["↓", null], ["↑", null], ["↑↑", null], ["↑↑↑", null], ["0", null], ["1", null], ["2", null], ["3", null], ["4", null], ["5", null], ["6", null], ["7", null], ["8", null], ["9", null], [".", null], ["..", null]], m = [49, 50, 51, 115, 116, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 61, 62, 48, 1, 2, 3, 4, 25, 26, 33, 34, 85, 86, 87, 70, 71, 23, 24, 56, 58, 59, 57, 97, 9, 10, 63, 65, 66, 64, 52, 54, 55, 53, 94, 41, 42, 43, 44, 88, 46, 72, 31, 32, 82, 83, 84, 92, 37, 38, 39, 40, 98, 68, 69, 13, 14, 15, 16, 91, 89, 90, 27, 28, 67, 35, 36, 5, 6, 7, 8, 0, 21, 22, 11, 12, 29, 30, 99, 17, 18, 19, 20, 76, 78, 79, 47, 95, 96, 45, 60, 81, 73, 77, 80, 93, 100, 74, 75, 102, 103, 104, 101], u = [["'", { next: ["'"], krama: [102] }], ["''", { next: ["'"], krama: [103] }], ["'''", { krama: [104] }], [".", { krama: [115], next: [".", "q", "h", "A", "i", "I", "u", "U", "e", "E", "a", "O", "o", "R", "L"] }], ["..", { krama: [116] }], [".A", { krama: [6], next: ["1"] }], [".A1", { krama: [8] }], [".E", { krama: [22] }], [".I", { krama: [12] }], [".L", { next: ["R"], krama: [2, 95] }], [".LR", { krama: [42], next: ["R"] }], [".LRR", { krama: [44] }], [".O", { krama: [30] }], [".R", { krama: [38], next: ["R"] }], [".RR", { krama: [40] }], [".U", { krama: [18], next: ["1"] }], [".U1", { krama: [20] }], [".a", { next: ["i", "u"], krama: [2, 2] }], [".ai", { next: ["I"], krama: [2, 2, 2] }], [".aiI", { krama: [28] }], [".au", { next: ["U"], krama: [2, 2, 2] }], [".auU", { krama: [36] }], [".e", { krama: [24] }], [".h", { krama: [49] }], [".i", { krama: [10] }], [".o", { krama: [32] }], [".q", { custom_back_ref: 3 }], [".u", { krama: [14], next: ["1"] }], [".u1", { krama: [16] }], [";", { krama: [48] }], ["A", { krama: [5], next: ["U"] }], ["AU", { krama: [5, 17], next: ["M"] }], ["AUM", { krama: [0] }], ["C", { krama: [61], next: ["h"] }], ["Ch", { krama: [62] }], ["D", { krama: [76], next: ["z", "h"] }], ["Dh", { krama: [79], next: ["z"] }], ["Dhz", { krama: [80] }], ["Dz", { krama: [77] }], ["L", { krama: [95], next: ["R", "z"] }], ["LR", { krama: [41], next: ["R"] }], ["LRR", { krama: [43] }], ["Lz", { krama: [96] }], ["M", { krama: [45], next: ["M"] }], ["MM", { krama: [46] }], ["Q", { krama: [51], next: ["Q"] }], ["QQ", { custom_back_ref: 1 }], ["R", { krama: [37], next: ["R"] }], ["RR", { krama: [39] }], ["S", { krama: [-1], next: ["h"] }], ["Sh", { krama: [100] }], ["T", { krama: [74], next: ["h"] }], ["Th", { krama: [75] }], ["_", { krama: [101] }], ["a", { krama: [1], next: ["i", "u", "a"] }], ["aa", { krama: [5] }], ["ai", { krama: [25] }], ["au", { krama: [33] }], ["b", { krama: [85], next: ["h"] }], ["bh", { krama: [87] }], ["c", { next: ["h"] }], ["ch", { krama: [61], next: ["h"] }], ["chh", { krama: [62] }], ["d", { krama: [70], next: ["h"] }], ["dh", { krama: [71] }], ["e", { next: ["e"], krama: [23] }], ["ee", { krama: [11] }], ["f", { krama: [84] }], ["g", { krama: [56], next: ["z", "h"] }], ["gh", { krama: [59] }], ["gz", { krama: [57] }], ["i", { next: ["i"], krama: [9] }], ["ii", { krama: [11] }], ["j", { krama: [63], next: ["z", "h"] }], ["jh", { krama: [66] }], ["jz", { krama: [64] }], ["k", { krama: [52], next: ["z", "h"] }], ["kh", { krama: [54], next: ["z"] }], ["khz", { krama: [55] }], ["kz", { krama: [53] }], ["n", { krama: [72], next: ["z", "1"] }], ["n1", { krama: [73] }], ["nz", { krama: [73] }], ["o", { next: ["o"], krama: [31] }], ["oo", { krama: [17] }], ["p", { krama: [82], next: ["h"] }], ["ph", { krama: [83], next: ["z"] }], ["phz", { krama: [84] }], ["q", { custom_back_ref: 0, next: ["q"] }], ["qq", { custom_back_ref: 2 }], ["r", { krama: [92], next: ["z", "1"] }], ["r1", { krama: [93] }], ["rz", { krama: [93] }], ["s", { krama: [98], next: ["h"] }], ["sh", { krama: [99] }], ["t", { krama: [68], next: ["h"] }], ["th", { krama: [69] }], ["u", { next: ["u"], krama: [13] }], ["uu", { krama: [17] }], ["z", { krama: [64], next: ["h"] }], ["zh", { krama: [96] }], ["↑", { krama: [102], next: ["↑"] }], ["↑↑", { krama: [103], next: ["↑"] }], ["↑↑↑", { krama: [104] }]], t = [["", null, 88], ["Q", null, 46], ["q", null, 89], ["‍", null, 26]], x = {
1
+ const a = "other", l = "Romanized", e = 12, x = "a", n = [[".", { krama: [115], next: ["."] }], ["..", { krama: [116] }], ["C", { krama: [61], next: ["h"] }], ["Ch", { krama: [62] }], ["L", { next: ["̥"] }], ["L̥", { krama: [41], next: ["̄"] }], ["L̥̄", { krama: [43] }], ["M", { next: ["̐"] }], ["M̐", { krama: [46] }], ["R", { next: ["̥"] }], ["R̥", { krama: [37], next: ["̄"] }], ["R̥̄", { krama: [39] }], ["a", { krama: [1], next: ["i", "u"] }], ["ai", { krama: [25] }], ["au", { krama: [33] }], ["b", { krama: [85], next: ["h"] }], ["bh", { krama: [87] }], ["c", { next: ["h"] }], ["ch", { krama: [61], next: ["h"] }], ["chh", { krama: [62] }], ["d", { krama: [70], next: ["h"] }], ["dh", { krama: [71] }], ["g", { krama: [56], next: ["z", "h"] }], ["gh", { krama: [59] }], ["gz", { krama: [57] }], ["j", { krama: [63], next: ["z", "h"] }], ["jh", { krama: [66] }], ["jz", { krama: [64] }], ["k", { krama: [52], next: ["z", "h"] }], ["kh", { krama: [54], next: ["z"] }], ["khz", { krama: [55] }], ["kz", { krama: [53] }], ["l", { krama: [94], next: ["̥"] }], ["l̥", { krama: [41], next: ["̄"] }], ["l̥̄", { krama: [43] }], ["m", { krama: [88], next: ["̐"] }], ["m̐", { krama: [46] }], ["p", { krama: [82], next: ["h"] }], ["ph", { krama: [83], next: ["z"] }], ["phz", { krama: [84] }], ["r", { krama: [92], next: ["̥"] }], ["r̥", { krama: [37], next: ["̄"] }], ["r̥̄", { krama: [39] }], ["t", { krama: [68], next: ["h"] }], ["th", { krama: [69] }], ["Ê", { krama: [27] }], ["Ñ", { krama: [67] }], ["Ô", { krama: [35] }], ["Ā", { krama: [5] }], ["ā", { krama: [5], next: ["ū"] }], ["āū", { krama: [5, 17], next: ["ṁ"] }], ["āūṁ", { krama: [0] }], ["Ē", { krama: [21] }], ["Ī", { krama: [11] }], ["Ō", { krama: [29] }], ["Ś", { krama: [99] }], ["Ū", { krama: [17] }], ["Ḍ", { krama: [76], next: ["h"] }], ["Ḍh", { krama: [79] }], ["ḍ", { krama: [76], next: ["h"] }], ["ḍh", { krama: [79] }], ["Ḥ", { krama: [47] }], ["Ḷ", { krama: [95] }], ["Ḻ", { krama: [96] }], ["Ṁ", { krama: [45] }], ["Ṅ", { krama: [60] }], ["Ṇ", { krama: [81] }], ["Ṉ", { krama: [73] }], ["Ṛ", { krama: [77], next: ["h"] }], ["Ṛh", { krama: [80] }], ["ṛ", { krama: [77], next: ["h"] }], ["ṛh", { krama: [80] }], ["Ṟ", { krama: [93] }], ["Ṣ", { krama: [100] }], ["Ṭ", { krama: [74], next: ["h"] }], ["Ṭh", { krama: [75] }], ["ṭ", { krama: [74], next: ["h"] }], ["ṭh", { krama: [75] }], ["↑", { krama: [102], next: ["↑"] }], ["↑↑", { krama: [103], next: ["↑"] }], ["↑↑↑", { krama: [104] }]], r = [], k = [["āūṁ", null], ["a", null], ["a", null], ["a", null], ["a", null], ["ā", null], ["ā", null], ["ā", null], ["ā", null], ["i", null], ["i", null], ["ī", null], ["ī", null], ["u", null], ["u", null], ["u", null], ["u", null], ["ū", null], ["ū", null], ["ū", null], ["ū", null], ["ē", null], ["ē", null], ["e", null], ["e", null], ["ai", null], ["ai", null], ["ê", null], ["ê", null], ["ō", null], ["ō", null], ["o", null], ["o", null], ["au", null], ["au", null], ["ô", null], ["ô", null], ["r̥", null], ["r̥", null], ["r̥̄", null], ["r̥̄", null], ["l̥", null], ["l̥", null], ["l̥̄", null], ["l̥̄", null], ["ṁ", null], ["m̐", null], ["ḥ", null], ["`", null], ["", null], ["", null], ["", null], ["k", null], ["kz", null], ["kh", null], ["khz", null], ["g", null], ["gz", null], ["g", null], ["gh", null], ["ṅ", null], ["C", null], ["Ch", null], ["j", null], ["jz", null], ["j", null], ["jh", null], ["ñ", null], ["t", null], ["th", null], ["d", null], ["dh", null], ["n", null], ["ṉ", null], ["ṭ", null], ["ṭh", null], ["ḍ", null], ["ṛ", null], ["ḍ", null], ["ḍh", null], ["ṛh", null], ["ṇ", null], ["p", null], ["ph", null], ["phz", null], ["b", null], ["b", null], ["bh", null], ["m", null], ["y", null], ["y", null], ["v", null], ["r", null], ["ṟ", null], ["l", null], ["ḷ", null], ["ḻ", null], ["h", null], ["s", null], ["ś", null], ["ṣ", null], ["↓", null], ["↑", null], ["↑↑", null], ["↑↑↑", null], ["0", null], ["1", null], ["2", null], ["3", null], ["4", null], ["5", null], ["6", null], ["7", null], ["8", null], ["9", null], [".", null], ["..", null]], m = [49, 50, 51, 115, 116, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 61, 62, 48, 1, 2, 3, 4, 25, 26, 33, 34, 85, 86, 87, 70, 71, 23, 24, 56, 58, 59, 57, 97, 9, 10, 63, 65, 66, 64, 52, 54, 55, 53, 94, 41, 42, 43, 44, 88, 46, 72, 31, 32, 82, 83, 84, 92, 37, 38, 39, 40, 98, 68, 69, 13, 14, 15, 16, 91, 89, 90, 27, 28, 67, 35, 36, 5, 6, 7, 8, 0, 21, 22, 11, 12, 29, 30, 99, 17, 18, 19, 20, 76, 78, 79, 47, 95, 96, 45, 60, 81, 73, 77, 80, 93, 100, 74, 75, 102, 103, 104, 101], u = [["'", { next: ["'"], krama: [102] }], ["''", { next: ["'"], krama: [103] }], ["'''", { krama: [104] }], [".", { krama: [115], next: [".", "q", "h", "A", "i", "I", "u", "U", "e", "E", "a", "O", "o", "R", "L"] }], ["..", { krama: [116] }], [".A", { krama: [6], next: ["1"] }], [".A1", { krama: [8] }], [".E", { krama: [22] }], [".I", { krama: [12] }], [".L", { next: ["R"], krama: [2, 95] }], [".LR", { krama: [42], next: ["R"] }], [".LRR", { krama: [44] }], [".O", { krama: [30] }], [".R", { krama: [38], next: ["R"] }], [".RR", { krama: [40] }], [".U", { krama: [18], next: ["1"] }], [".U1", { krama: [20] }], [".a", { next: ["i", "u"], krama: [2, 2] }], [".ai", { next: ["I"], krama: [2, 2, 2] }], [".aiI", { krama: [28] }], [".au", { next: ["U"], krama: [2, 2, 2] }], [".auU", { krama: [36] }], [".e", { krama: [24] }], [".h", { krama: [49] }], [".i", { krama: [10] }], [".o", { krama: [32] }], [".q", { custom_back_ref: 32 }], [".u", { krama: [14], next: ["1"] }], [".u1", { krama: [16] }], [";", { krama: [48] }], ["A", { krama: [5], next: ["U", "^"] }], ["AU", { krama: [5, 17], next: ["M"] }], ["AUM", { krama: [0] }], ["A^", { custom_back_ref: 11 }], ["C", { krama: [61], next: ["h"] }], ["Ch", { krama: [62] }], ["D", { krama: [76], next: ["z", "h", "^"] }], ["D^", { custom_back_ref: 17 }], ["Dh", { krama: [79], next: ["z", "^"] }], ["Dh^", { custom_back_ref: 18 }], ["Dhz", { krama: [80], next: ["^"] }], ["Dhz^", { custom_back_ref: 27 }], ["Dz", { krama: [77], next: ["^"] }], ["Dz^", { custom_back_ref: 26 }], ["E", { next: ["^"], krama: [21] }], ["E^", { custom_back_ref: 12 }], ["G", { next: ["^"], krama: [60] }], ["G^", { custom_back_ref: 23 }], ["H", { next: ["^"], krama: [47] }], ["H^", { custom_back_ref: 19 }], ["I", { next: ["^"], krama: [11] }], ["I^", { custom_back_ref: 13 }], ["J", { next: ["^"], krama: [67] }], ["J^", { custom_back_ref: 9 }], ["L", { krama: [95], next: ["R", "z", "^"] }], ["LR", { krama: [41], next: ["R", "^"] }], ["LRR", { krama: [43], next: ["^"] }], ["LRR^", { custom_back_ref: 2 }], ["LR^", { custom_back_ref: 1 }], ["L^", { custom_back_ref: 20 }], ["Lz", { krama: [96], next: ["^"] }], ["Lz^", { custom_back_ref: 21 }], ["M", { krama: [45], next: ["M", "^"] }], ["MM", { krama: [46], next: ["^"] }], ["MM^", { custom_back_ref: 3 }], ["M^", { custom_back_ref: 22 }], ["N", { next: ["^"], krama: [81] }], ["N^", { custom_back_ref: 24 }], ["O", { next: ["^"], krama: [29] }], ["O^", { custom_back_ref: 14 }], ["Q", { krama: [51], next: ["Q"] }], ["QQ", { custom_back_ref: 4 }], ["R", { krama: [37], next: ["R", "^"] }], ["RR", { krama: [39], next: ["^"] }], ["RR^", { custom_back_ref: 6 }], ["R^", { custom_back_ref: 5 }], ["S", { krama: [-1], next: ["h"] }], ["Sh", { krama: [100], next: ["^"] }], ["Sh^", { custom_back_ref: 29 }], ["T", { krama: [74], next: ["h", "^"] }], ["T^", { custom_back_ref: 30 }], ["Th", { krama: [75], next: ["^"] }], ["Th^", { custom_back_ref: 31 }], ["U", { next: ["^"], krama: [17] }], ["U^", { custom_back_ref: 16 }], ["_", { krama: [101] }], ["a", { krama: [1], next: ["i", "u", "a"] }], ["aa", { krama: [5] }], ["ai", { krama: [25], next: ["I"] }], ["aiI", { next: ["^"], krama: [2, 2, 2] }], ["aiI^", { custom_back_ref: 8 }], ["au", { krama: [33], next: ["U"] }], ["auU", { next: ["^"], krama: [2, 2, 2] }], ["auU^", { custom_back_ref: 10 }], ["b", { krama: [85], next: ["h"] }], ["bh", { krama: [87] }], ["c", { next: ["h"] }], ["ch", { krama: [61], next: ["h"] }], ["chh", { krama: [62] }], ["d", { krama: [70], next: ["h"] }], ["dh", { krama: [71] }], ["e", { next: ["e"], krama: [23] }], ["ee", { krama: [11] }], ["f", { krama: [84] }], ["g", { krama: [56], next: ["z", "h"] }], ["gh", { krama: [59] }], ["gz", { krama: [57] }], ["i", { next: ["i"], krama: [9] }], ["ii", { krama: [11] }], ["j", { krama: [63], next: ["z", "h"] }], ["jh", { krama: [66] }], ["jz", { krama: [64] }], ["k", { krama: [52], next: ["z", "h"] }], ["kh", { krama: [54], next: ["z"] }], ["khz", { krama: [55] }], ["kz", { krama: [53] }], ["n", { krama: [72], next: ["z", "1"] }], ["n1", { krama: [73] }], ["nz", { krama: [73], next: ["^"] }], ["nz^", { custom_back_ref: 25 }], ["o", { next: ["o"], krama: [31] }], ["oo", { krama: [17] }], ["p", { krama: [82], next: ["h"] }], ["ph", { krama: [83], next: ["z"] }], ["phz", { krama: [84] }], ["q", { custom_back_ref: 0, next: ["q"] }], ["qq", { custom_back_ref: 7 }], ["r", { krama: [92], next: ["z", "1"] }], ["r1", { krama: [93] }], ["rz", { krama: [93], next: ["^"] }], ["rz^", { custom_back_ref: 28 }], ["s", { krama: [98], next: ["h"] }], ["sh", { krama: [99], next: ["^"] }], ["sh^", { custom_back_ref: 15 }], ["t", { krama: [68], next: ["h"] }], ["th", { krama: [69] }], ["u", { next: ["u"], krama: [13] }], ["uu", { krama: [17] }], ["z", { krama: [64], next: ["h"] }], ["zh", { krama: [96] }], ["↑", { krama: [102], next: ["↑"] }], ["↑↑", { krama: [103], next: ["↑"] }], ["↑↑↑", { krama: [104] }]], t = [["", null, 125], ["L̥", null, 58], ["L̥̄", null, 57], ["M̐", null, 64], ["Q", null, 71], ["R̥", null, 75], ["R̥̄", null, 74], ["q", null, 126], ["Ê", null, 90], ["Ñ", null, 53], ["Ô", null, 93], ["Ā", null, 33], ["Ē", null, 45], ["Ī", null, 51], ["Ō", null, 69], ["Ś", null, 133], ["Ū", null, 84], ["Ḍ", null, 37], ["Ḍh", null, 39], ["Ḥ", null, 49], ["Ḷ", null, 59], ["Ḻ", null, 61], ["Ṁ", null, 65], ["Ṅ", null, 47], ["Ṇ", null, 67], ["Ṉ", null, 119], ["Ṛ", null, 43], ["Ṛh", null, 41], ["Ṟ", null, 130], ["Ṣ", null, 78], ["Ṭ", null, 80], ["Ṭh", null, 82], ["‍", null, 26]], h = {
2
2
  script_type: a,
3
3
  script_name: l,
4
4
  script_id: 12,
@@ -12,11 +12,11 @@ const a = "other", l = "Romanized", e = 12, h = "a", n = [[".", { krama: [115],
12
12
  };
13
13
  export {
14
14
  t as custom_script_chars_arr,
15
- x as default,
15
+ h as default,
16
16
  k as krama_text_arr,
17
17
  m as krama_text_arr_index,
18
18
  r as list,
19
- h as schwa_character,
19
+ x as schwa_character,
20
20
  e as script_id,
21
21
  l as script_name,
22
22
  a as script_type,
@@ -1,5 +1,5 @@
1
- import { g as i, a as e, t as p, b as l, c as m } from "./script_normalization-CClbGD1S.js";
2
- import { A as S, L, S as v } from "./script_normalization-CClbGD1S.js";
1
+ import { g as i, a as e, t as p, b as l, c as m } from "./script_normalization-D8Eu1NYy.js";
2
+ import { A as S, L, S as v } from "./script_normalization-D8Eu1NYy.js";
3
3
  const d = async (t) => {
4
4
  const r = i(t);
5
5
  if (!r)
@@ -23,7 +23,7 @@ const ve = (n, e, l) => {
23
23
  return t ? typeof t == "function" ? t() : Promise.resolve(t) : new Promise((a, s) => {
24
24
  (typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(s.bind(null, /* @__PURE__ */ new Error("Unknown variable dynamic import: " + e + (e.split("/").length !== l ? ". Note that variables only represent file names one level deep." : ""))));
25
25
  });
26
- }, le = {}, ue = async (n) => (le[n] || (le[n] = ve(/* @__PURE__ */ Object.assign({ "../script_data/Assamese.json": () => import("./Assamese-4WO2wzXg.js"), "../script_data/Bengali.json": () => import("./Bengali-Dhlxv7Pr.js"), "../script_data/Brahmi.json": () => import("./Brahmi-BvC4Luvf.js"), "../script_data/Devanagari.json": () => import("./Devanagari-C4NmXCKb.js"), "../script_data/Granth.json": () => import("./Granth-B3US1gHe.js"), "../script_data/Gujarati.json": () => import("./Gujarati-DfQS2sSY.js"), "../script_data/Gurumukhi.json": () => import("./Gurumukhi-dVJRMJNL.js"), "../script_data/Kannada.json": () => import("./Kannada-ZB5P9u4T.js"), "../script_data/Malayalam.json": () => import("./Malayalam-BQROfOnO.js"), "../script_data/Modi.json": () => import("./Modi-B16t9oPJ.js"), "../script_data/Normal.json": () => import("./Normal-Chi5ccip.js"), "../script_data/Odia.json": () => import("./Odia-hd6WA8ll.js"), "../script_data/Purna-Devanagari.json": () => import("./Purna-Devanagari-CqkVL5zc.js"), "../script_data/Romanized.json": () => import("./Romanized-CAwj04a2.js"), "../script_data/Sharada.json": () => import("./Sharada-Bk4pUPeN.js"), "../script_data/Siddham.json": () => import("./Siddham-Cf9Jp5KF.js"), "../script_data/Sinhala.json": () => import("./Sinhala-C6t7GaP6.js"), "../script_data/Tamil-Extended.json": () => import("./Tamil-Extended-nmDMmVeX.js"), "../script_data/Tamil.json": () => import("./Tamil-CR4VFQvV.js"), "../script_data/Telugu.json": () => import("./Telugu-BCg-EHjf.js") }), `../script_data/${n}.json`, 3).then(
26
+ }, le = {}, ue = async (n) => (le[n] || (le[n] = ve(/* @__PURE__ */ Object.assign({ "../script_data/Assamese.json": () => import("./Assamese-4WO2wzXg.js"), "../script_data/Bengali.json": () => import("./Bengali-Dhlxv7Pr.js"), "../script_data/Brahmi.json": () => import("./Brahmi-BvC4Luvf.js"), "../script_data/Devanagari.json": () => import("./Devanagari-C4NmXCKb.js"), "../script_data/Granth.json": () => import("./Granth-B3US1gHe.js"), "../script_data/Gujarati.json": () => import("./Gujarati-DfQS2sSY.js"), "../script_data/Gurumukhi.json": () => import("./Gurumukhi-dVJRMJNL.js"), "../script_data/Kannada.json": () => import("./Kannada-ZB5P9u4T.js"), "../script_data/Malayalam.json": () => import("./Malayalam-BQROfOnO.js"), "../script_data/Modi.json": () => import("./Modi-B16t9oPJ.js"), "../script_data/Normal.json": () => import("./Normal-Chi5ccip.js"), "../script_data/Odia.json": () => import("./Odia-hd6WA8ll.js"), "../script_data/Purna-Devanagari.json": () => import("./Purna-Devanagari-CqkVL5zc.js"), "../script_data/Romanized.json": () => import("./Romanized-CQkrk7RV.js"), "../script_data/Sharada.json": () => import("./Sharada-Bk4pUPeN.js"), "../script_data/Siddham.json": () => import("./Siddham-Cf9Jp5KF.js"), "../script_data/Sinhala.json": () => import("./Sinhala-C6t7GaP6.js"), "../script_data/Tamil-Extended.json": () => import("./Tamil-Extended-nmDMmVeX.js"), "../script_data/Tamil.json": () => import("./Tamil-CR4VFQvV.js"), "../script_data/Telugu.json": () => import("./Telugu-BCg-EHjf.js") }), `../script_data/${n}.json`, 3).then(
27
27
  (e) => e.default
28
28
  )), le[n]), J = {
29
29
  "all_to_normal:replace_pancham_varga_varna_with_n": { from_script_type: "all", to_script_name: ["Normal"], check_in: "output", rules: [{ type: "replace_prev_krama_keys", check_in: "output", prev: [60], following: [52, 53, 54, 55, 56, 57, 58, 59], replace_with: [72] }, { type: "replace_prev_krama_keys", check_in: "output", prev: [67], following: [61, 62, 63, 64, 65, 66], replace_with: [72] }] },
@@ -1,4 +1,4 @@
1
- import { g as v, a as x, r as b, d as K } from "./script_normalization-CClbGD1S.js";
1
+ import { g as v, a as x, r as b, d as K } from "./script_normalization-D8Eu1NYy.js";
2
2
  const U = 4500, D = !0, I = !1;
3
3
  function L(r, n) {
4
4
  const { autoContextTClearTimeMs: t } = n ?? {};
@@ -1,2 +1,2 @@
1
- (function(O,U){typeof exports=="object"&&typeof module<"u"?U(exports):typeof define=="function"&&define.amd?define(["exports"],U):(O=typeof globalThis<"u"?globalThis:O||self,U(O.lipilekhika={}))})(this,(function(O){"use strict";function U(t,e,r,n){const{accessor:a,compareFn:l}=n??{},i=a??((s,c)=>s[c]);let o=0,u=e.length-1,_=-1;for(;o<=u;){const s=Math.floor((o+u)/2),c=e[s],p=i(t,c);let h;l?h=l(r,p):h=r<p?-1:r>p?1:0,h===0?(_=c,u=s-1):h<0?u=s-1:o=s+1}return _}function ee(t,e,r){const{accessor:n,compareFn:a}=r??{},l=n??((_,s)=>_[s]);let i=0,o=t.length-1,u=-1;for(;i<=o;){const _=Math.floor((i+o)/2),s=l(t,_);let c;a?c=a(e,s):c=e<s?-1:e>s?1:0,c===0?(u=_,o=_-1):c<0?o=_-1:i=_+1}return u}const ce={},K=async t=>{{if(ce[t])return ce[t];const r=`https://cdn.jsdelivr.net/npm/lipilekhika@0.1.6/dist/umd_json/script_data/${t}.json`,a=(await fetch(r)).json();return ce[t]=a,a}},te={"all_to_normal:replace_pancham_varga_varna_with_n":{from_script_type:"all",to_script_name:["Normal"],check_in:"output",rules:[{type:"replace_prev_krama_keys",check_in:"output",prev:[60],following:[52,53,54,55,56,57,58,59],replace_with:[72]},{type:"replace_prev_krama_keys",check_in:"output",prev:[67],following:[61,62,63,64,65,66],replace_with:[72]}]},"brahmic_to_brahmic:replace_pancham_varga_varna_with_anusvAra":{from_script_type:"brahmic",to_script_type:"brahmic",check_in:"input",rules:[{type:"replace_prev_krama_keys",check_in:"input",prev:[60,49],following:[52,53,54,55,56,57,58,59],replace_with:[45]},{type:"replace_prev_krama_keys",check_in:"input",prev:[67,49],following:[61,62,63,64,65,66],replace_with:[45]},{type:"replace_prev_krama_keys",check_in:"input",prev:[81,49],following:[74,75,76,77,78,79,80],replace_with:[45]},{type:"replace_prev_krama_keys",check_in:"input",prev:[72,49],following:[68,69,70,71],replace_with:[45]},{type:"replace_prev_krama_keys",check_in:"input",prev:[88,49],following:[82,83,85,86,87],replace_with:[45]}]},"all_to_sinhala:use_conjunct_enabling_halant":{from_script_type:"all",to_script_name:["Sinhala"],check_in:"output",rules:[{type:"direct_replace",check_in:"output",to_replace:[[49]],replace_text:"්‍",replace_with:[]}]},"all_to_normal:remove_virAma_and_double_virAma":{from_script_type:"all",to_script_name:["Normal","Romanized"],check_in:"output",rules:[{type:"direct_replace",check_in:"output",to_replace:[[116],[115]],replace_with:[-1]}]},"all_to_normal:replace_avagraha_with_a":{from_script_type:"all",to_script_name:["Normal","Romanized"],check_in:"output",rules:[{type:"direct_replace",check_in:"output",to_replace:[[48]],replace_with:[1]}]},"normal_to_all:use_typing_chars":{from_script_name:["Normal"],to_script_type:"all",check_in:"output",rules:[]},"all_to_normal:preserve_specific_chars":{from_script_type:"all",to_script_name:["Normal"],check_in:"output",rules:[]}},be=(t,e)=>{const r=t.krama_text_arr[e]?.[0];return typeof r=="string"?r:null},H=(t,e)=>be(t,e)??"",re=(t,e)=>U(t.krama_text_arr,t.krama_text_arr_index,e,{accessor:(r,n)=>r[n][0]}),Ne=()=>{let t=[];function e(s){s&&t.push(s)}function r(s){for(const c of s)e(c)}function n(){return t.at(-1)}function a(){return n()?.at(-1)}function l(){const s=n();if(!s)return;const c=s.at(-1),p=s.slice(0,-1);return p?t[t.length-1]=p:t.pop(),c}function i(s,c){t.splice(-s,s,...c.filter(Boolean))}function o(s,c){const p=l();if(!p){r(s),r(c);return}r(s),e(p),r(c)}function u(s){const c=t.at(s);return c?{cp:s,ch:c,width:c.length}:null}function _(s,c){s<0&&(s=t.length+s),!(s<0||s>=t.length)&&(t[s]=c)}return{emit:e,emitPieces:r,lastPiece:n,lastChar:a,popLastChar:l,rewriteTailPieces:i,withLastCharMovedAfter:o,toString:()=>t.join(""),rewriteAt:_,peekAt:u}},Ie=t=>{let e=[];function r(){e=[]}function n(){return e.length}function a(p){return e.at(p)}function l(){return e.at(-1)}function i(){return l()?.[0]}function o(){return l()?.[1]?.type}function u(p){return a(p)?.[1]?.type}function _(p){return a(p)?.[0]}function s(p){return o()===p}function c(p){const h=p[0];h!==void 0&&h.length>0&&e.push(p),e.length>t&&e.shift()}return{clear:r,length:n,at:a,last:l,lastText:i,lastType:o,typeAt:u,textAt:_,isLastType:s,push:c}},Le=t=>{let e=0;function r(o){const u=t.codePointAt(o);if(u===void 0)return null;const _=String.fromCodePoint(u);return{cp:u,ch:_,width:_.length}}function n(){return r(e)}function a(o){return r(e+o)}function l(o){e+=o}function i(o,u){return t.substring(o,u)}return{get pos(){return e},peek:n,peekAt:r,peekAtOffsetUnits:a,advance:l,slice:i}},se=(t,e,r,n)=>{for(let a=0;a<r.length;a++){const l=r[r.length-1-a],i=t(e-a);if(i===null)return{matched:!1,matchedLen:0};const o=re(n,i.ch);if(o===-1||o!==l)return{matched:!1,matchedLen:0}}return{matched:!0,matchedLen:r.length}},oe=(t,e)=>t.map(r=>H(e,r)).filter(Boolean),De=["²","³","⁴"],I=t=>!!t&&De.indexOf(t)!==-1,Oe=["॒","॑","᳚","᳛"],_e=t=>!!t&&Oe.indexOf(t)!==-1,C=t=>t==="Tamil-Extended",V=(t,e,r,n)=>{if(e.length===0)return;if(!n){t.emitPieces(e);return}const a=e[0]??"";if(a[0]===r){const l=a.slice(1),i=[];l&&i.push(l);for(let o=1;o<e.length;o++)i.push(e[o]);t.withLastCharMovedAfter([r],i)}else t.withLastCharMovedAfter(e,[])},ke=["#an","#sss","#ss","#s"],Ce=["↓","↑↑↑","↑↑","↑"],je=(t,e)=>{if(!t)return t;if(t.indexOf("x")!==-1&&(t=t.replaceAll("x","kSh")),e==="Tamil-Extended")for(let r=0;r<ke.length;r++){const n=ke[r];t.indexOf(n)!==-1&&(t=t.replaceAll(n,Ce[r]))}return t},Me=[" ",`
1
+ (function(O,U){typeof exports=="object"&&typeof module<"u"?U(exports):typeof define=="function"&&define.amd?define(["exports"],U):(O=typeof globalThis<"u"?globalThis:O||self,U(O.lipilekhika={}))})(this,(function(O){"use strict";function U(t,e,r,n){const{accessor:a,compareFn:l}=n??{},i=a??((s,c)=>s[c]);let o=0,u=e.length-1,_=-1;for(;o<=u;){const s=Math.floor((o+u)/2),c=e[s],p=i(t,c);let h;l?h=l(r,p):h=r<p?-1:r>p?1:0,h===0?(_=c,u=s-1):h<0?u=s-1:o=s+1}return _}function ee(t,e,r){const{accessor:n,compareFn:a}=r??{},l=n??((_,s)=>_[s]);let i=0,o=t.length-1,u=-1;for(;i<=o;){const _=Math.floor((i+o)/2),s=l(t,_);let c;a?c=a(e,s):c=e<s?-1:e>s?1:0,c===0?(u=_,o=_-1):c<0?o=_-1:i=_+1}return u}const ce={},K=async t=>{{if(ce[t])return ce[t];const r=`https://cdn.jsdelivr.net/npm/lipilekhika@1.0.0/dist/umd_json/script_data/${t}.json`,a=(await fetch(r)).json();return ce[t]=a,a}},te={"all_to_normal:replace_pancham_varga_varna_with_n":{from_script_type:"all",to_script_name:["Normal"],check_in:"output",rules:[{type:"replace_prev_krama_keys",check_in:"output",prev:[60],following:[52,53,54,55,56,57,58,59],replace_with:[72]},{type:"replace_prev_krama_keys",check_in:"output",prev:[67],following:[61,62,63,64,65,66],replace_with:[72]}]},"brahmic_to_brahmic:replace_pancham_varga_varna_with_anusvAra":{from_script_type:"brahmic",to_script_type:"brahmic",check_in:"input",rules:[{type:"replace_prev_krama_keys",check_in:"input",prev:[60,49],following:[52,53,54,55,56,57,58,59],replace_with:[45]},{type:"replace_prev_krama_keys",check_in:"input",prev:[67,49],following:[61,62,63,64,65,66],replace_with:[45]},{type:"replace_prev_krama_keys",check_in:"input",prev:[81,49],following:[74,75,76,77,78,79,80],replace_with:[45]},{type:"replace_prev_krama_keys",check_in:"input",prev:[72,49],following:[68,69,70,71],replace_with:[45]},{type:"replace_prev_krama_keys",check_in:"input",prev:[88,49],following:[82,83,85,86,87],replace_with:[45]}]},"all_to_sinhala:use_conjunct_enabling_halant":{from_script_type:"all",to_script_name:["Sinhala"],check_in:"output",rules:[{type:"direct_replace",check_in:"output",to_replace:[[49]],replace_text:"්‍",replace_with:[]}]},"all_to_normal:remove_virAma_and_double_virAma":{from_script_type:"all",to_script_name:["Normal","Romanized"],check_in:"output",rules:[{type:"direct_replace",check_in:"output",to_replace:[[116],[115]],replace_with:[-1]}]},"all_to_normal:replace_avagraha_with_a":{from_script_type:"all",to_script_name:["Normal","Romanized"],check_in:"output",rules:[{type:"direct_replace",check_in:"output",to_replace:[[48]],replace_with:[1]}]},"normal_to_all:use_typing_chars":{from_script_name:["Normal"],to_script_type:"all",check_in:"output",rules:[]},"all_to_normal:preserve_specific_chars":{from_script_type:"all",to_script_name:["Normal"],check_in:"output",rules:[]}},be=(t,e)=>{const r=t.krama_text_arr[e]?.[0];return typeof r=="string"?r:null},H=(t,e)=>be(t,e)??"",re=(t,e)=>U(t.krama_text_arr,t.krama_text_arr_index,e,{accessor:(r,n)=>r[n][0]}),Ne=()=>{let t=[];function e(s){s&&t.push(s)}function r(s){for(const c of s)e(c)}function n(){return t.at(-1)}function a(){return n()?.at(-1)}function l(){const s=n();if(!s)return;const c=s.at(-1),p=s.slice(0,-1);return p?t[t.length-1]=p:t.pop(),c}function i(s,c){t.splice(-s,s,...c.filter(Boolean))}function o(s,c){const p=l();if(!p){r(s),r(c);return}r(s),e(p),r(c)}function u(s){const c=t.at(s);return c?{cp:s,ch:c,width:c.length}:null}function _(s,c){s<0&&(s=t.length+s),!(s<0||s>=t.length)&&(t[s]=c)}return{emit:e,emitPieces:r,lastPiece:n,lastChar:a,popLastChar:l,rewriteTailPieces:i,withLastCharMovedAfter:o,toString:()=>t.join(""),rewriteAt:_,peekAt:u}},Ie=t=>{let e=[];function r(){e=[]}function n(){return e.length}function a(p){return e.at(p)}function l(){return e.at(-1)}function i(){return l()?.[0]}function o(){return l()?.[1]?.type}function u(p){return a(p)?.[1]?.type}function _(p){return a(p)?.[0]}function s(p){return o()===p}function c(p){const h=p[0];h!==void 0&&h.length>0&&e.push(p),e.length>t&&e.shift()}return{clear:r,length:n,at:a,last:l,lastText:i,lastType:o,typeAt:u,textAt:_,isLastType:s,push:c}},Le=t=>{let e=0;function r(o){const u=t.codePointAt(o);if(u===void 0)return null;const _=String.fromCodePoint(u);return{cp:u,ch:_,width:_.length}}function n(){return r(e)}function a(o){return r(e+o)}function l(o){e+=o}function i(o,u){return t.substring(o,u)}return{get pos(){return e},peek:n,peekAt:r,peekAtOffsetUnits:a,advance:l,slice:i}},se=(t,e,r,n)=>{for(let a=0;a<r.length;a++){const l=r[r.length-1-a],i=t(e-a);if(i===null)return{matched:!1,matchedLen:0};const o=re(n,i.ch);if(o===-1||o!==l)return{matched:!1,matchedLen:0}}return{matched:!0,matchedLen:r.length}},oe=(t,e)=>t.map(r=>H(e,r)).filter(Boolean),De=["²","³","⁴"],I=t=>!!t&&De.indexOf(t)!==-1,Oe=["॒","॑","᳚","᳛"],_e=t=>!!t&&Oe.indexOf(t)!==-1,C=t=>t==="Tamil-Extended",V=(t,e,r,n)=>{if(e.length===0)return;if(!n){t.emitPieces(e);return}const a=e[0]??"";if(a[0]===r){const l=a.slice(1),i=[];l&&i.push(l);for(let o=1;o<e.length;o++)i.push(e[o]);t.withLastCharMovedAfter([r],i)}else t.withLastCharMovedAfter(e,[])},ke=["#an","#sss","#ss","#s"],Ce=["↓","↑↑↑","↑↑","↑"],je=(t,e)=>{if(!t)return t;if(t.indexOf("x")!==-1&&(t=t.replaceAll("x","kSh")),e==="Tamil-Extended")for(let r=0;r<ke.length;r++){const n=ke[r];t.indexOf(n)!==-1&&(t=t.replaceAll(n,Ce[r]))}return t},Me=[" ",`
2
2
  `,"\r"," ",",","~","!","@","?","%"],Pe=3;function L(t,e,r){const{from_script_name:n,to_script_name:a,from_script_data:l,to_script_data:i,trans_options:o,result:u,prev_context:_,BRAHMIC_HALANT:s,BRAHMIC_NUQTA:c,typing_mode:p,include_inherent_vowel:h}=t,{next:f,last_extra_call:d}=r??{};let x=!1;if((c&&_.typeAt(-3)==="vyanjana"&&_.textAt(-2)===c&&_.typeAt(-1)==="mAtrA"||_.typeAt(-2)==="vyanjana"&&_.typeAt(-1)==="mAtrA")&&(!e||e[1]?.type==="anya")&&_.clear(),l.script_type==="brahmic"&&i.script_type==="other")e[0]!==s&&(!(C(n)&&e[0]&&e[0].length>0)||e[0].charAt(0)!==s)&&(!c||e[0]!==c)&&(_.typeAt(-1)==="vyanjana"||c&&_.typeAt(-2)==="vyanjana"&&_.textAt(-1)===c)&&(e[1]?.type!=="mAtrA"&&e[0]!==s||e[1]?.type==="anya"||e[1]===null||e[1]===void 0)&&u.emit(i.schwa_character);else if(l.script_type==="other"&&i.script_type==="brahmic")if(_.typeAt(-1)==="vyanjana"&&(e[1]?.type==="mAtrA"||e[1]?.type==="svara")){const y=e[1].type==="svara"?H(i,e[1].mAtrA_krama_ref?.[0]??-1):e[0];C(a)&&I(u.lastChar())?V(u,[y],i.halant,!0):V(u,[y],i.halant,!1),x=!0}else!h&&_.typeAt(-1)==="vyanjana"&&!(e[0]===s||e[1]?.type==="mAtrA")?C(a)&&I(u.lastChar())?V(u,[s],i.halant,!0):(V(u,[s],i.halant,!1),a==="Sinhala"&&o["all_to_sinhala:use_conjunct_enabling_halant"]&&u.rewriteAt(-1,u.lastPiece()+"‍")):h&&e&&e[1]?.type==="vyanjana"&&(_.typeAt(-1)==="vyanjana"||c&&_.typeAt(-2)==="vyanjana"&&_.textAt(-1)===c)&&(C(a)&&I(u.lastChar())?V(u,[s],i.halant,!0):(V(u,[s],i.halant,!1),a==="Sinhala"&&o["all_to_sinhala:use_conjunct_enabling_halant"]&&u.rewriteAt(-1,u.lastPiece()+"‍")));let w=!1;return p&&(f===void 0||f.length===0)&&!d&&!(C(a)&&I(u.lastChar()))&&(w=!0,e[1]?.type==="vyanjana"&&(w=!1),w&&_.clear()),(!p||!d&&!w)&&_.push(e),x}function ge(t,e,r){const{custom_rules:n,cursor:a,result:l,from_script_data:i,to_script_data:o}=t,u=e+r;for(let _=0;_<n.length;_++){if(n[_].use_replace===!0)continue;const s=n[_];if(s.type==="replace_prev_krama_keys"){if(s.check_in==="input"){const c=se(a.peekAt,u,s.prev,i),p=a.peekAt(e);if(c.matched&&p!==null){const h=p.ch,f=re(i,h);if(f!==-1&&s.following.indexOf(f)!==-1){const d=oe(s.replace_with,o);l.rewriteTailPieces(c.matchedLen,d)}}}else if(s.check_in==="output"){const c=l.lastPiece();if(!c)continue;const p=re(o,c);if(p!==-1&&s.following.indexOf(p)!==-1){const h=se(l.peekAt,-2,s.prev,o);if(h.matched){const f=oe(s.replace_with,o);l.rewriteTailPieces(h.matchedLen+1,[...f,c])}}}}else if(s.type==="direct_replace"){const c=s.check_in==="output"?o:i;for(const p of s.to_replace){const h=se(l.peekAt,-1,p,c);if(!h.matched)continue;if(s.replace_text){l.rewriteTailPieces(h.matchedLen,[s.replace_text]);break}const f=oe(s.replace_with,c);l.rewriteTailPieces(h.matchedLen,f);break}}}}const ve=(t,e,r)=>{if(!r)return{};const n={};for(const[a,l]of Object.entries(r??{})){if(!(a in te))continue;const i=te[a];(i.from_script_type==="all"&&i.to_script_type==="all"||(i.from_script_type!==void 0&&(i.from_script_type==="all"||i.from_script_type===t.script_type)||i.from_script_name!==void 0&&i.from_script_name.includes(t.script_name))&&(i.to_script_type!==void 0&&(i.to_script_type==="all"||i.to_script_type===e.script_type)||i.to_script_name!==void 0&&i.to_script_name.includes(e.script_name)))&&(n[a]=l)}return n},xe=(t,e,r)=>{const n=ve(t,e,r),a=Object.keys(n).flatMap(l=>n[l]===!0?te[l].rules:[]);return{trans_options:n,custom_rules:a}},Ae=(t,e)=>t.replace_with.map(r=>H(e,r)).join(""),we=(t,e,r,n)=>{if(r.length===0)return t;for(const a of r)if(!(a.use_replace!==!0||a.check_in!==n)){if(a.type==="replace_prev_krama_keys"){const l=a.prev.map(i=>H(e,i)).join("");for(let i of a.following){const o=H(e,i);if(!o)continue;const u=Ae(a,e)+o;t=t.replaceAll(l+o,u)}}else if(a.type==="direct_replace"){const l=a.to_replace.map(i=>i.map(o=>H(e,o)).join(""));for(let i of l)t=t.replaceAll(i,Ae(a,e))}}return t},Re=!0,Ue=!1,Te=(t,e,r,n,a,l,i,o)=>{const u=o?.useNativeNumerals??Re,_=o?.typing_mode??!1,s=o?.includeInherentVowel??Ue;if(_&&e!=="Normal")throw new Error("Typing mode is only supported with Normal script as the input");_&&(l["normal_to_all:use_typing_chars"]=!0),_&&e==="Normal"&&(t=je(t,r)),t=we(t,n,i,"input");const c=Ne();let p=0;const h=Le(t),f=Ie(Pe),d=n.script_type==="brahmic"&&a.script_type==="other"||n.script_type==="other"&&a.script_type==="brahmic"||_&&e==="Normal"&&a.script_type==="other",x=n.script_type==="brahmic"&&a.script_type==="other"?n.nuqta??null:n.script_type==="other"&&a.script_type==="brahmic"?a.nuqta??null:null,w=n.script_type==="brahmic"&&a.script_type==="other"?n.halant:n.script_type==="other"&&a.script_type==="brahmic"?a.halant:null,y={from_script_name:e,to_script_name:r,from_script_data:n,to_script_data:a,trans_options:l,custom_rules:i,cursor:h,result:c,prev_context:f,BRAHMIC_NUQTA:x,BRAHMIC_HALANT:w,typing_mode:_,include_inherent_vowel:s},X=(l["normal_to_all:use_typing_chars"]||_)&&e==="Normal"?a.typing_text_to_krama_map:n.text_to_krama_map;let g=-1;for(;h.pos<t.length;){p=h.pos;const W=h.peek();if(!W)break;const T=W.ch,z=W.width,ie=z===2?1:z;if(g!==-1&&p>=g){g=-1,h.advance(z);continue}if(Me.indexOf(T)!==-1){h.advance(z),d&&(L(y,[" ",null]),f.clear()),c.emit(T);continue}if(T.match(/^\d$/)&&!u){c.emit(T),h.advance(z),L(y,[T,null]);continue}if(l["all_to_normal:preserve_specific_chars"]&&r==="Normal"){const E=ee(n.custom_script_chars_arr,T,{accessor:(S,D)=>S[D][0]});if(E!==-1){const S=n.custom_script_chars_arr[E];L(y,[S[0],n.list[S[1]??-1]??null]);const D=n.typing_text_to_krama_map[S[2]??-1]?.[0];c.emit(D??""),h.advance(S[0].length);continue}}let q=-1;{let E=0,S=-1;const D=d&&n.script_type==="other"&&a.script_type==="brahmic"&&(f.typeAt(-1)==="vyanjana"||x&&f.typeAt(-2)==="vyanjana"&&f.textAt(-1)===x);for(;;){const Y=h.peekAt(p+ie+E),le=Y?.ch??"";g!==-1&&le&&I(le)&&(E+=Y?.width??0);const b=p+ie+E,k=g!==-1?h.slice(p,g)+(b>g?h.slice(g+1,b):""):h.slice(p,b),j=ee(X,k,{accessor:(N,M)=>N[M][0]});if(j===-1){q=-1;break}const v=X[j];if(D&&v[1].krama&&v[1].krama.length>=1){const N=v[1].krama,M=N[0],P=a.krama_text_arr[M]?.[1],ye=a.list[P??-1]?.type;if(N.length===1&&P!==null&&P!==void 0&&(ye==="svara"||ye==="mAtrA"))S=j;else if(S!==-1){q=S;break}}if(v[1].next&&v[1].next.length>0){const N=h.peekAt(b),M=N?.ch;if(C(e)&&n.script_type==="brahmic"){const Z=N?h.peekAt(b+N.width):null,P=Z?.ch,B=(N&&Z?h.peekAt(b+N.width+Z.width):null)?.ch;if(g===-1&&P!==void 0&&I(P)&&v[1].next.indexOf(P)!==-1){const Q=ee(n.text_to_krama_map,k+P,{accessor:(R,A)=>R[A][0]}),G=U(n.krama_text_arr,n.krama_text_arr_index,M??"",{accessor:(R,A)=>R[A][0]});if(Q!==-1&&G!==-1){q=Q;const R=n.krama_text_arr[G],A=n.list[R[1]??-1]?.type;if(M===n.halant||A==="mAtrA"){g=b+(N?.width??0);break}}}else if(g===-1&&B!==void 0&&I(B)&&v[1].next.indexOf(B)!==-1){const Q=ee(n.text_to_krama_map,k+B,{accessor:(A,$)=>A[$][0]}),G=U(n.krama_text_arr,n.krama_text_arr_index,M??"",{accessor:(A,$)=>A[$][0]}),R=U(n.krama_text_arr,n.krama_text_arr_index,P??"",{accessor:(A,$)=>A[$][0]});if(Q!==-1&&G!==-1&&R!==-1){const A=n.krama_text_arr[G],$=n.krama_text_arr[R];q=Q;const de=n.list[A[1]??-1]?.type,at=n.list[$[1]??-1]?.type;if(de==="mAtrA"&&at==="mAtrA"){g=b+(N?.width??0)+(Z?.width??0);break}}}if(g===-1&&M!==void 0&&P!==void 0&&_e(P)&&B!==void 0&&I(B)&&v[1].next.indexOf(B)!==-1){const Q=U(n.krama_text_arr,n.krama_text_arr_index,M??"",{accessor:(G,R)=>G[R][0]});if(Q!==-1){const G=n.krama_text_arr[Q];if(n.list[G[1]??-1]?.type==="mAtrA"){const A=ee(n.text_to_krama_map,k+B,{accessor:($,de)=>$[de][0]});if(A!==-1){q=A,g=b+(N?.width??0)+(Z?.width??0);break}}}}}if(M!==void 0&&v[1].next.indexOf(M)!==-1){E+=N?.width??0;continue}}q=j;break}}const m=q!==-1?X[q]:null;if(m!==null){const E=g!==-1&&m[0].length>1&&n.list[n.krama_text_arr[m[1].krama?.[0]??-1]?.[1]??-1]?.type==="vyanjana"&&I(m[0].at(-1)??void 0)?1:0,S=m[0].length-E;if(h.advance(S),p=h.pos,l["normal_to_all:use_typing_chars"]&&"custom_back_ref"in m[1]&&m[1].custom_back_ref!==void 0&&m[1].custom_back_ref!==null){const D=a.custom_script_chars_arr[m[1].custom_back_ref]??null;te!==null&&(c.emit(D[0]),L(y,[m[0],a.list[D[1]??-1]??null],{next:m[1].next??void 0}));continue}if(m[1].krama!==null&&m[1].krama!==void 0&&m[1].krama.some(D=>D!==-1)){const Y=m[1].krama.map(k=>H(a,k)),le=Y.join("");let b=!1;if(d)if(n.script_type==="brahmic"&&a.script_type==="other"){let k=null;if(!l["normal_to_all:use_typing_chars"]&&m[1].fallback_list_ref!==void 0&&m[1].fallback_list_ref!==null)k=n.list[m[1].fallback_list_ref];else if(!m[1].krama||m[1].krama.length===0)k=null;else{const j=m[1].krama.map(v=>n.list[n.krama_text_arr[v][1]??-1]);C(e)&&j.some(v=>v?.type==="mAtrA")&&j.some(v=>v?.type==="vyanjana")?k={...j[0],type:"anya"}:C(e)&&j.length>1&&j.some(v=>v==null)?k=j.at(-1):k=j[0]}b=L(y,[m[0],k])}else if(a.script_type==="brahmic"&&n.script_type==="other"){let k=null;m[1].fallback_list_ref!==void 0&&m[1].fallback_list_ref!==null?k=a.list[m[1].fallback_list_ref]:k=m[1].krama&&m[1].krama.length>0?a.list[a.krama_text_arr[m[1].krama[0]]?.[1]??-1]??null:null,_&&e==="Normal"?b=L(y,[m[0],k],{next:m[1].next??void 0}):b=L(y,[m[0],k])}else _&&e==="Normal"&&a.script_type==="other"&&(b=L(y,[m[0],null],{next:m[1].next??void 0}));if(!b)if(a.script_type==="brahmic"&&C(r)&&(a.list[m[1].krama?.at(-1)??-1]?.type==="mAtrA"||le===a.halant)&&I(c.lastChar()))V(c,Y,a.halant,!0);else if(C(r)&&_e(Y.at(-1)?.at(-1)??"")&&I(c.lastChar())){const k=c.popLastChar();c.emitPieces(Y),c.emit(k??"")}else c.emitPieces(Y);ge(y,p,-S);continue}else if(m[1].krama!==null&&m[1].krama!==void 0&&m[1].krama.some(D=>D===-1)){c.emit(m[0]),_&&L(y,[m[0],null],{next:m[1].next??void 0});continue}}else h.advance(z),p=h.pos;const ne=m===null?T:m[0],ae=re(n,ne);if(ae===-1){d&&(L(y,[ne,null]),f.clear()),c.emit(ne);continue}let fe=!1;if(d&&(n.script_type==="brahmic"?fe=L(y,[ne,n.list[n.krama_text_arr[ae][1]??-1]]):a.script_type==="brahmic"&&(fe=L(y,[ne,a.list[a.krama_text_arr[ae][1]??-1]]))),!fe){const E=H(a,ae);if(a.script_type==="brahmic"&&C(r)&&(a.list[a.krama_text_arr[ae][1]??-1]?.type==="mAtrA"||E===a.halant)&&I(c.lastChar()))V(c,[E],a.halant,!0);else if(C(r)&&_e(E)&&I(c.lastChar())){const S=c.popLastChar();c.emit(E),c.emit(S??"")}else c.emit(E)}ge(y,p,-z)}d&&L(y,[void 0,null],{last_extra_call:!0});let J=c.toString();return J=we(J,a,i,"output"),{output:J,context_length:f.length()}},Ke=async(t,e,r,n,a)=>{const[l,i]=await Promise.all([K(e),K(r)]),{trans_options:o,custom_rules:u}=xe(l,i,n);return Te(t,e,r,l,i,o,u,a)},ze={script_list:{Devanagari:1,Telugu:2,Tamil:3,"Tamil-Extended":4,Bengali:5,Kannada:6,Gujarati:7,Malayalam:8,Odia:9,Sinhala:10,Normal:11,Romanized:12,Gurumukhi:13,Assamese:14,"Purna-Devanagari":15,Brahmi:16,Granth:17,Modi:18,Sharada:20,Siddham:21},lang_list:{English:1,Sanskrit:2,Hindi:3,Telugu:4,Tamil:5,Bengali:6,Kannada:7,Gujarati:8,Malayalam:9,Odia:10,Sinhala:11,Marathi:12,Nepali:13,Punjabi:14,Assamese:15}},{script_list:Be,lang_list:Ge}=ze,ue=Object.keys(Be),pe=Object.keys(Ge),$e=Array.from(new Set([...pe,...ue])),He={Bengali:"Bengali",Gujarati:"Gujarati",Hindi:"Devanagari",Kannada:"Kannada",Malayalam:"Malayalam",Odia:"Odia",Sinhala:"Sinhala",Tamil:"Tamil",Telugu:"Telugu",English:"Normal",Sanskrit:"Devanagari",Marathi:"Devanagari",Nepali:"Devanagari",Punjabi:"Gurumukhi",Assamese:"Assamese"},Ee={dev:"Devanagari",te:"Telugu",tel:"Telugu",tam:"Tamil","tam-ex":"Tamil-Extended",ben:"Bengali",be:"Bengali",ka:"Kannada",kan:"Kannada",gu:"Gujarati",guj:"Gujarati",mal:"Malayalam",or:"Odia",od:"Odia",oriya:"Odia",si:"Sinhala",sinh:"Sinhala",sin:"Sinhala",en:"Normal",eng:"Normal",la:"Normal",lat:"Normal",nor:"Normal",norm:"Normal",rom:"Romanized",gur:"Gurumukhi",as:"Assamese",sa:"Devanagari",san:"Devanagari",hin:"Devanagari",hi:"Devanagari",mar:"Devanagari",ne:"Devanagari",nep:"Devanagari",pun:"Gurumukhi"};function Ve(t){return t.toLowerCase().replace(/(^|-)([a-z])/g,(e,r,n)=>r+n.toUpperCase())}const F=t=>{const e=Ve(t);return ue.includes(e)?e:pe.includes(e)?He[e]:t.toLocaleLowerCase()in Ee?Ee[t.toLocaleLowerCase()]:null},Fe=async t=>{const e=F(t);if(!e)throw new Error(`Invalid script name: ${t}`);return await K(e)};async function Xe(t,e,r,n){const a=F(e);if(!a)throw new Error(`Invalid script name: ${e}`);const l=F(r);if(!l)throw new Error(`Invalid script name: ${r}`);return a===l?t:(await Ke(t,a,l,n)).output}async function We(t,e){const r=F(t);if(!r)throw new Error(`Invalid script name: ${t}`);const n=F(e);if(!n)throw new Error(`Invalid script name: ${e}`);const a=await K(r),l=await K(n);return Object.keys(ve(a,l,Object.fromEntries(Object.keys(te).map(i=>[i,!0]))))}const Se=4500,he=!0,me=!1;function qe(t,e){const{autoContextTClearTimeMs:r}=e??{};let n=e?.useNativeNumerals??he,a=e?.includeInherentVowel??me;const l=F(t);if(!l)throw new Error(`Invalid script name: ${t}`);let i="",o="";const u=r??Se;let _=null,s=null,c=null,p={},h=[];const f=(async()=>{const[w,y]=await Promise.all([K("Normal"),K(l)]);s=w,c=y;const X=xe(w,y);p=X.trans_options,h=X.custom_rules})();function d(){_=null,i="",o=""}function x(w){if(!s||!c)throw new Error("Typing context not ready. Await `ctx.ready` before calling takeKeyInputSync.");const y=Date.now();_&&y-_>u&&d();let X=w?.[0]??"";i+=X;let g=o;const{context_length:J,output:W}=Te(i,"Normal",l,s,c,p,h,{typing_mode:!0,useNativeNumerals:n,includeInherentVowel:a});J>0?o=W:J===0&&d();let T=0;for(;T<W.length&&T<g.length&&W[T]===g[T];)T++;let z=W.substring(T),ie=g.length-T;return _=Date.now(),{to_delete_chars_count:ie,diff_add_text:z}}return{ready:f,clearContext:d,takeKeyInput:x,updateUseNativeNumerals:w=>{n=w??he},updateIncludeInherentVowel:w=>{a=w??me}}}async function Ye(t,e,r,n){if(!(n??!0)){r?.(e?.currentTarget?.value);return}const l=e?.nativeEvent??e,i="nativeEvent"in e,o=e?.currentTarget??l?.target;if(!l||!o||l.isComposing)return;if(l.inputType!=="insertText"){r?.(o.value),t.clearContext();return}const u=l.data;if(typeof u!="string"||u.length!==1){r?.(o.value),t.clearContext();return}const _=o.selectionStart??0,s=o.selectionEnd??_;if(_!==s){r?.(o.value),t.clearContext();return}i&&r&&r(e.currentTarget.value),await t.ready;const{diff_add_text:c,to_delete_chars_count:p}=t.takeKeyInput(u),h=_,f=Math.max(0,h-p-u.length);o.setRangeText(c,f,h,"end"),r?.(o.value)}async function Qe(t,e,r,n){if(!(n??!0))return;const i="nativeEvent"in e?e.nativeEvent:e,o=e?.currentTarget??i?.target;if(!i||!o||i.isComposing||(!i.inputType||i.inputType!=="insertText")&&(!i.type||i.type!=="textInput"))return;const u=i.data;if(typeof u!="string"||u.length===0)return;if(u.length!==1){t.clearContext();return}const _=o.selectionStart??0,s=o.selectionEnd??_;if(_!==s){t.clearContext();return}i.preventDefault?.(),await t.ready;const{diff_add_text:c,to_delete_chars_count:p}=t.takeKeyInput(u),h=_,f=Math.max(0,h-p);o.setRangeText(c,f,h,"end"),r?.(o.value)}const Je=new Set(["Backspace","Delete","Enter","Tab","Escape","ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End","PageUp","PageDown"]);function Ze(t,e){const r=t?.nativeEvent??t;if(r instanceof KeyboardEvent){if(r.isComposing)return!1;const n=r.key;if(!n||n==="Unidentified"||n==="Process"||n==="Dead"||r.ctrlKey||r.metaKey||r.altKey)return!1;if(Je.has(n))return e.clearContext(),!0}return!1}async function et(t){const e=F(t);if(!e||e==="Normal")throw new Error(`Invalid script name: ${t}`);const r=await K(e);return r.krama_text_arr.map(a=>[a[0],r.list[a[1]??-1]?.type??"anya"])}async function tt(t){const e=F(t);if(!e||e==="Normal")throw new Error(`Invalid script name: ${t}`);const r=await K(e),n=l=>{const i=new Map,o=[],u=[];for(const[_,s,c]of l){const p=`${_}\0${s}`,h=i.get(p);if(h===void 0){const f=[],d=new Set;for(const x of c)d.has(x)||(d.add(x),f.push(x));u.push([_,s,f]),i.set(p,u.length-1),o.push(d)}else{const f=o[h],d=u[h][2];for(const x of c)f.has(x)||(f.add(x),d.push(x))}}return u.filter(([,,_])=>_.length>0)},a={common_krama_map:r.krama_text_arr.map(l=>[l[0],r.list[l[1]??-1]?.type??"anya",[]]),script_specific_krama_map:r.custom_script_chars_arr.map(l=>[l[0],r.list[l[1]??-1]?.type??"anya",[]])};for(let l=0;l<r.typing_text_to_krama_map.length;l++){const i=r.typing_text_to_krama_map[l],o=i[0];if(o!==""){if(i[1]&&i[1].custom_back_ref)a.script_specific_krama_map[i[1].custom_back_ref][2].push(o);else if(i[1]&&i[1].krama&&i[1].krama.length===1){const u=i[1].krama[0]??-1;u!==-1&&a.common_krama_map[u][2].push(o)}}}return a.common_krama_map=n(a.common_krama_map),a.script_specific_krama_map=n(a.script_specific_krama_map),a}const nt=Object.freeze(Object.defineProperty({__proto__:null,DEFAULT_AUTO_CONTEXT_CLEAR_TIME_MS:Se,DEFAULT_INCLUDE_INHERENT_VOWEL:me,DEFAULT_USE_NATIVE_NUMERALS:he,clearTypingContextOnKeyDown:Ze,createTypingContext:qe,getScriptKramaData:et,getScriptTypingDataMap:tt,handleTypingBeforeInputEvent:Qe,handleTypingInputEvent:Ye},Symbol.toStringTag,{value:"Module"}));O.ALL_LANG_SCRIPT_LIST=$e,O.LANG_LIST=pe,O.SCRIPT_LIST=ue,O.getAllOptions=We,O.preloadScriptData=Fe,O.transliterate=Xe,O.typing=nt,Object.defineProperty(O,Symbol.toStringTag,{value:"Module"})}));
@@ -1 +1 @@
1
- {"script_type":"other","script_name":"Romanized","script_id":12,"schwa_character":"a","text_to_krama_map":[[".",{"krama":[115],"next":["."]}],["..",{"krama":[116]}],["C",{"krama":[61],"next":["h"]}],["Ch",{"krama":[62]}],["L",{"next":["̥"]}],["L̥",{"krama":[41],"next":["̄"]}],["L̥̄",{"krama":[43]}],["M",{"next":["̐"]}],["M̐",{"krama":[46]}],["R",{"next":["̥"]}],["R̥",{"krama":[37],"next":["̄"]}],["R̥̄",{"krama":[39]}],["a",{"krama":[1],"next":["i","u"]}],["ai",{"krama":[25]}],["au",{"krama":[33]}],["b",{"krama":[85],"next":["h"]}],["bh",{"krama":[87]}],["c",{"next":["h"]}],["ch",{"krama":[61],"next":["h"]}],["chh",{"krama":[62]}],["d",{"krama":[70],"next":["h"]}],["dh",{"krama":[71]}],["g",{"krama":[56],"next":["z","h"]}],["gh",{"krama":[59]}],["gz",{"krama":[57]}],["j",{"krama":[63],"next":["z","h"]}],["jh",{"krama":[66]}],["jz",{"krama":[64]}],["k",{"krama":[52],"next":["z","h"]}],["kh",{"krama":[54],"next":["z"]}],["khz",{"krama":[55]}],["kz",{"krama":[53]}],["l",{"krama":[94],"next":["̥"]}],["l̥",{"krama":[41],"next":["̄"]}],["l̥̄",{"krama":[43]}],["m",{"krama":[88],"next":["̐"]}],["m̐",{"krama":[46]}],["p",{"krama":[82],"next":["h"]}],["ph",{"krama":[83],"next":["z"]}],["phz",{"krama":[84]}],["r",{"krama":[92],"next":["̥"]}],["r̥",{"krama":[37],"next":["̄"]}],["r̥̄",{"krama":[39]}],["t",{"krama":[68],"next":["h"]}],["th",{"krama":[69]}],["Ê",{"krama":[27]}],["Ñ",{"krama":[67]}],["Ô",{"krama":[35]}],["Ā",{"krama":[5]}],["ā",{"krama":[5],"next":["ū"]}],["āū",{"krama":[5,17],"next":["ṁ"]}],["āūṁ",{"krama":[0]}],["Ē",{"krama":[21]}],["Ī",{"krama":[11]}],["Ō",{"krama":[29]}],["Ś",{"krama":[99]}],["Ū",{"krama":[17]}],["Ḍ",{"krama":[76],"next":["h"]}],["Ḍh",{"krama":[79]}],["ḍ",{"krama":[76],"next":["h"]}],["ḍh",{"krama":[79]}],["Ḥ",{"krama":[47]}],["Ḷ",{"krama":[95]}],["Ḻ",{"krama":[96]}],["Ṁ",{"krama":[45]}],["Ṅ",{"krama":[81]}],["Ṇ",{"krama":[81]}],["Ṉ",{"krama":[73]}],["Ṛ",{"krama":[77],"next":["h"]}],["Ṛh",{"krama":[80]}],["ṛ",{"krama":[77],"next":["h"]}],["ṛh",{"krama":[80]}],["Ṟ",{"krama":[93]}],["Ṣ",{"krama":[100]}],["Ṭ",{"krama":[74],"next":["h"]}],["Ṭh",{"krama":[75]}],["ṭ",{"krama":[74],"next":["h"]}],["ṭh",{"krama":[75]}],["↑",{"krama":[102],"next":["↑"]}],["↑↑",{"krama":[103],"next":["↑"]}],["↑↑↑",{"krama":[104]}]],"list":[],"krama_text_arr":[["āūṁ",null],["a",null],["a",null],["a",null],["a",null],["ā",null],["ā",null],["ā",null],["ā",null],["i",null],["i",null],["ī",null],["ī",null],["u",null],["u",null],["u",null],["u",null],["ū",null],["ū",null],["ū",null],["ū",null],["ē",null],["ē",null],["e",null],["e",null],["ai",null],["ai",null],["ê",null],["ê",null],["ō",null],["ō",null],["o",null],["o",null],["au",null],["au",null],["ô",null],["ô",null],["r̥",null],["r̥",null],["r̥̄",null],["r̥̄",null],["l̥",null],["l̥",null],["l̥̄",null],["l̥̄",null],["ṁ",null],["m̐",null],["ḥ",null],["`",null],["",null],["",null],["",null],["k",null],["kz",null],["kh",null],["khz",null],["g",null],["gz",null],["g",null],["gh",null],["ṅ",null],["C",null],["Ch",null],["j",null],["jz",null],["j",null],["jh",null],["ñ",null],["t",null],["th",null],["d",null],["dh",null],["n",null],["ṉ",null],["ṭ",null],["ṭh",null],["ḍ",null],["ṛ",null],["ḍ",null],["ḍh",null],["ṛh",null],["ṇ",null],["p",null],["ph",null],["phz",null],["b",null],["b",null],["bh",null],["m",null],["y",null],["y",null],["v",null],["r",null],["ṟ",null],["l",null],["ḷ",null],["ḻ",null],["h",null],["s",null],["ś",null],["ṣ",null],["↓",null],["↑",null],["↑↑",null],["↑↑↑",null],["0",null],["1",null],["2",null],["3",null],["4",null],["5",null],["6",null],["7",null],["8",null],["9",null],[".",null],["..",null]],"krama_text_arr_index":[49,50,51,115,116,105,106,107,108,109,110,111,112,113,114,61,62,48,1,2,3,4,25,26,33,34,85,86,87,70,71,23,24,56,58,59,57,97,9,10,63,65,66,64,52,54,55,53,94,41,42,43,44,88,46,72,31,32,82,83,84,92,37,38,39,40,98,68,69,13,14,15,16,91,89,90,27,28,67,35,36,5,6,7,8,0,21,22,11,12,29,30,99,17,18,19,20,76,78,79,47,95,96,45,60,81,73,77,80,93,100,74,75,102,103,104,101],"typing_text_to_krama_map":[["'",{"next":["'"],"krama":[102]}],["''",{"next":["'"],"krama":[103]}],["'''",{"krama":[104]}],[".",{"krama":[115],"next":[".","q","h","A","i","I","u","U","e","E","a","O","o","R","L"]}],["..",{"krama":[116]}],[".A",{"krama":[6],"next":["1"]}],[".A1",{"krama":[8]}],[".E",{"krama":[22]}],[".I",{"krama":[12]}],[".L",{"next":["R"],"krama":[2,95]}],[".LR",{"krama":[42],"next":["R"]}],[".LRR",{"krama":[44]}],[".O",{"krama":[30]}],[".R",{"krama":[38],"next":["R"]}],[".RR",{"krama":[40]}],[".U",{"krama":[18],"next":["1"]}],[".U1",{"krama":[20]}],[".a",{"next":["i","u"],"krama":[2,2]}],[".ai",{"next":["I"],"krama":[2,2,2]}],[".aiI",{"krama":[28]}],[".au",{"next":["U"],"krama":[2,2,2]}],[".auU",{"krama":[36]}],[".e",{"krama":[24]}],[".h",{"krama":[49]}],[".i",{"krama":[10]}],[".o",{"krama":[32]}],[".q",{"custom_back_ref":3}],[".u",{"krama":[14],"next":["1"]}],[".u1",{"krama":[16]}],[";",{"krama":[48]}],["A",{"krama":[5],"next":["U"]}],["AU",{"krama":[5,17],"next":["M"]}],["AUM",{"krama":[0]}],["C",{"krama":[61],"next":["h"]}],["Ch",{"krama":[62]}],["D",{"krama":[76],"next":["z","h"]}],["Dh",{"krama":[79],"next":["z"]}],["Dhz",{"krama":[80]}],["Dz",{"krama":[77]}],["L",{"krama":[95],"next":["R","z"]}],["LR",{"krama":[41],"next":["R"]}],["LRR",{"krama":[43]}],["Lz",{"krama":[96]}],["M",{"krama":[45],"next":["M"]}],["MM",{"krama":[46]}],["Q",{"krama":[51],"next":["Q"]}],["QQ",{"custom_back_ref":1}],["R",{"krama":[37],"next":["R"]}],["RR",{"krama":[39]}],["S",{"krama":[-1],"next":["h"]}],["Sh",{"krama":[100]}],["T",{"krama":[74],"next":["h"]}],["Th",{"krama":[75]}],["_",{"krama":[101]}],["a",{"krama":[1],"next":["i","u","a"]}],["aa",{"krama":[5]}],["ai",{"krama":[25]}],["au",{"krama":[33]}],["b",{"krama":[85],"next":["h"]}],["bh",{"krama":[87]}],["c",{"next":["h"]}],["ch",{"krama":[61],"next":["h"]}],["chh",{"krama":[62]}],["d",{"krama":[70],"next":["h"]}],["dh",{"krama":[71]}],["e",{"next":["e"],"krama":[23]}],["ee",{"krama":[11]}],["f",{"krama":[84]}],["g",{"krama":[56],"next":["z","h"]}],["gh",{"krama":[59]}],["gz",{"krama":[57]}],["i",{"next":["i"],"krama":[9]}],["ii",{"krama":[11]}],["j",{"krama":[63],"next":["z","h"]}],["jh",{"krama":[66]}],["jz",{"krama":[64]}],["k",{"krama":[52],"next":["z","h"]}],["kh",{"krama":[54],"next":["z"]}],["khz",{"krama":[55]}],["kz",{"krama":[53]}],["n",{"krama":[72],"next":["z","1"]}],["n1",{"krama":[73]}],["nz",{"krama":[73]}],["o",{"next":["o"],"krama":[31]}],["oo",{"krama":[17]}],["p",{"krama":[82],"next":["h"]}],["ph",{"krama":[83],"next":["z"]}],["phz",{"krama":[84]}],["q",{"custom_back_ref":0,"next":["q"]}],["qq",{"custom_back_ref":2}],["r",{"krama":[92],"next":["z","1"]}],["r1",{"krama":[93]}],["rz",{"krama":[93]}],["s",{"krama":[98],"next":["h"]}],["sh",{"krama":[99]}],["t",{"krama":[68],"next":["h"]}],["th",{"krama":[69]}],["u",{"next":["u"],"krama":[13]}],["uu",{"krama":[17]}],["z",{"krama":[64],"next":["h"]}],["zh",{"krama":[96]}],["↑",{"krama":[102],"next":["↑"]}],["↑↑",{"krama":[103],"next":["↑"]}],["↑↑↑",{"krama":[104]}]],"custom_script_chars_arr":[["",null,88],["Q",null,46],["q",null,89],["‍",null,26]]}
1
+ {"script_type":"other","script_name":"Romanized","script_id":12,"schwa_character":"a","text_to_krama_map":[[".",{"krama":[115],"next":["."]}],["..",{"krama":[116]}],["C",{"krama":[61],"next":["h"]}],["Ch",{"krama":[62]}],["L",{"next":["̥"]}],["L̥",{"krama":[41],"next":["̄"]}],["L̥̄",{"krama":[43]}],["M",{"next":["̐"]}],["M̐",{"krama":[46]}],["R",{"next":["̥"]}],["R̥",{"krama":[37],"next":["̄"]}],["R̥̄",{"krama":[39]}],["a",{"krama":[1],"next":["i","u"]}],["ai",{"krama":[25]}],["au",{"krama":[33]}],["b",{"krama":[85],"next":["h"]}],["bh",{"krama":[87]}],["c",{"next":["h"]}],["ch",{"krama":[61],"next":["h"]}],["chh",{"krama":[62]}],["d",{"krama":[70],"next":["h"]}],["dh",{"krama":[71]}],["g",{"krama":[56],"next":["z","h"]}],["gh",{"krama":[59]}],["gz",{"krama":[57]}],["j",{"krama":[63],"next":["z","h"]}],["jh",{"krama":[66]}],["jz",{"krama":[64]}],["k",{"krama":[52],"next":["z","h"]}],["kh",{"krama":[54],"next":["z"]}],["khz",{"krama":[55]}],["kz",{"krama":[53]}],["l",{"krama":[94],"next":["̥"]}],["l̥",{"krama":[41],"next":["̄"]}],["l̥̄",{"krama":[43]}],["m",{"krama":[88],"next":["̐"]}],["m̐",{"krama":[46]}],["p",{"krama":[82],"next":["h"]}],["ph",{"krama":[83],"next":["z"]}],["phz",{"krama":[84]}],["r",{"krama":[92],"next":["̥"]}],["r̥",{"krama":[37],"next":["̄"]}],["r̥̄",{"krama":[39]}],["t",{"krama":[68],"next":["h"]}],["th",{"krama":[69]}],["Ê",{"krama":[27]}],["Ñ",{"krama":[67]}],["Ô",{"krama":[35]}],["Ā",{"krama":[5]}],["ā",{"krama":[5],"next":["ū"]}],["āū",{"krama":[5,17],"next":["ṁ"]}],["āūṁ",{"krama":[0]}],["Ē",{"krama":[21]}],["Ī",{"krama":[11]}],["Ō",{"krama":[29]}],["Ś",{"krama":[99]}],["Ū",{"krama":[17]}],["Ḍ",{"krama":[76],"next":["h"]}],["Ḍh",{"krama":[79]}],["ḍ",{"krama":[76],"next":["h"]}],["ḍh",{"krama":[79]}],["Ḥ",{"krama":[47]}],["Ḷ",{"krama":[95]}],["Ḻ",{"krama":[96]}],["Ṁ",{"krama":[45]}],["Ṅ",{"krama":[60]}],["Ṇ",{"krama":[81]}],["Ṉ",{"krama":[73]}],["Ṛ",{"krama":[77],"next":["h"]}],["Ṛh",{"krama":[80]}],["ṛ",{"krama":[77],"next":["h"]}],["ṛh",{"krama":[80]}],["Ṟ",{"krama":[93]}],["Ṣ",{"krama":[100]}],["Ṭ",{"krama":[74],"next":["h"]}],["Ṭh",{"krama":[75]}],["ṭ",{"krama":[74],"next":["h"]}],["ṭh",{"krama":[75]}],["↑",{"krama":[102],"next":["↑"]}],["↑↑",{"krama":[103],"next":["↑"]}],["↑↑↑",{"krama":[104]}]],"list":[],"krama_text_arr":[["āūṁ",null],["a",null],["a",null],["a",null],["a",null],["ā",null],["ā",null],["ā",null],["ā",null],["i",null],["i",null],["ī",null],["ī",null],["u",null],["u",null],["u",null],["u",null],["ū",null],["ū",null],["ū",null],["ū",null],["ē",null],["ē",null],["e",null],["e",null],["ai",null],["ai",null],["ê",null],["ê",null],["ō",null],["ō",null],["o",null],["o",null],["au",null],["au",null],["ô",null],["ô",null],["r̥",null],["r̥",null],["r̥̄",null],["r̥̄",null],["l̥",null],["l̥",null],["l̥̄",null],["l̥̄",null],["ṁ",null],["m̐",null],["ḥ",null],["`",null],["",null],["",null],["",null],["k",null],["kz",null],["kh",null],["khz",null],["g",null],["gz",null],["g",null],["gh",null],["ṅ",null],["C",null],["Ch",null],["j",null],["jz",null],["j",null],["jh",null],["ñ",null],["t",null],["th",null],["d",null],["dh",null],["n",null],["ṉ",null],["ṭ",null],["ṭh",null],["ḍ",null],["ṛ",null],["ḍ",null],["ḍh",null],["ṛh",null],["ṇ",null],["p",null],["ph",null],["phz",null],["b",null],["b",null],["bh",null],["m",null],["y",null],["y",null],["v",null],["r",null],["ṟ",null],["l",null],["ḷ",null],["ḻ",null],["h",null],["s",null],["ś",null],["ṣ",null],["↓",null],["↑",null],["↑↑",null],["↑↑↑",null],["0",null],["1",null],["2",null],["3",null],["4",null],["5",null],["6",null],["7",null],["8",null],["9",null],[".",null],["..",null]],"krama_text_arr_index":[49,50,51,115,116,105,106,107,108,109,110,111,112,113,114,61,62,48,1,2,3,4,25,26,33,34,85,86,87,70,71,23,24,56,58,59,57,97,9,10,63,65,66,64,52,54,55,53,94,41,42,43,44,88,46,72,31,32,82,83,84,92,37,38,39,40,98,68,69,13,14,15,16,91,89,90,27,28,67,35,36,5,6,7,8,0,21,22,11,12,29,30,99,17,18,19,20,76,78,79,47,95,96,45,60,81,73,77,80,93,100,74,75,102,103,104,101],"typing_text_to_krama_map":[["'",{"next":["'"],"krama":[102]}],["''",{"next":["'"],"krama":[103]}],["'''",{"krama":[104]}],[".",{"krama":[115],"next":[".","q","h","A","i","I","u","U","e","E","a","O","o","R","L"]}],["..",{"krama":[116]}],[".A",{"krama":[6],"next":["1"]}],[".A1",{"krama":[8]}],[".E",{"krama":[22]}],[".I",{"krama":[12]}],[".L",{"next":["R"],"krama":[2,95]}],[".LR",{"krama":[42],"next":["R"]}],[".LRR",{"krama":[44]}],[".O",{"krama":[30]}],[".R",{"krama":[38],"next":["R"]}],[".RR",{"krama":[40]}],[".U",{"krama":[18],"next":["1"]}],[".U1",{"krama":[20]}],[".a",{"next":["i","u"],"krama":[2,2]}],[".ai",{"next":["I"],"krama":[2,2,2]}],[".aiI",{"krama":[28]}],[".au",{"next":["U"],"krama":[2,2,2]}],[".auU",{"krama":[36]}],[".e",{"krama":[24]}],[".h",{"krama":[49]}],[".i",{"krama":[10]}],[".o",{"krama":[32]}],[".q",{"custom_back_ref":32}],[".u",{"krama":[14],"next":["1"]}],[".u1",{"krama":[16]}],[";",{"krama":[48]}],["A",{"krama":[5],"next":["U","^"]}],["AU",{"krama":[5,17],"next":["M"]}],["AUM",{"krama":[0]}],["A^",{"custom_back_ref":11}],["C",{"krama":[61],"next":["h"]}],["Ch",{"krama":[62]}],["D",{"krama":[76],"next":["z","h","^"]}],["D^",{"custom_back_ref":17}],["Dh",{"krama":[79],"next":["z","^"]}],["Dh^",{"custom_back_ref":18}],["Dhz",{"krama":[80],"next":["^"]}],["Dhz^",{"custom_back_ref":27}],["Dz",{"krama":[77],"next":["^"]}],["Dz^",{"custom_back_ref":26}],["E",{"next":["^"],"krama":[21]}],["E^",{"custom_back_ref":12}],["G",{"next":["^"],"krama":[60]}],["G^",{"custom_back_ref":23}],["H",{"next":["^"],"krama":[47]}],["H^",{"custom_back_ref":19}],["I",{"next":["^"],"krama":[11]}],["I^",{"custom_back_ref":13}],["J",{"next":["^"],"krama":[67]}],["J^",{"custom_back_ref":9}],["L",{"krama":[95],"next":["R","z","^"]}],["LR",{"krama":[41],"next":["R","^"]}],["LRR",{"krama":[43],"next":["^"]}],["LRR^",{"custom_back_ref":2}],["LR^",{"custom_back_ref":1}],["L^",{"custom_back_ref":20}],["Lz",{"krama":[96],"next":["^"]}],["Lz^",{"custom_back_ref":21}],["M",{"krama":[45],"next":["M","^"]}],["MM",{"krama":[46],"next":["^"]}],["MM^",{"custom_back_ref":3}],["M^",{"custom_back_ref":22}],["N",{"next":["^"],"krama":[81]}],["N^",{"custom_back_ref":24}],["O",{"next":["^"],"krama":[29]}],["O^",{"custom_back_ref":14}],["Q",{"krama":[51],"next":["Q"]}],["QQ",{"custom_back_ref":4}],["R",{"krama":[37],"next":["R","^"]}],["RR",{"krama":[39],"next":["^"]}],["RR^",{"custom_back_ref":6}],["R^",{"custom_back_ref":5}],["S",{"krama":[-1],"next":["h"]}],["Sh",{"krama":[100],"next":["^"]}],["Sh^",{"custom_back_ref":29}],["T",{"krama":[74],"next":["h","^"]}],["T^",{"custom_back_ref":30}],["Th",{"krama":[75],"next":["^"]}],["Th^",{"custom_back_ref":31}],["U",{"next":["^"],"krama":[17]}],["U^",{"custom_back_ref":16}],["_",{"krama":[101]}],["a",{"krama":[1],"next":["i","u","a"]}],["aa",{"krama":[5]}],["ai",{"krama":[25],"next":["I"]}],["aiI",{"next":["^"],"krama":[2,2,2]}],["aiI^",{"custom_back_ref":8}],["au",{"krama":[33],"next":["U"]}],["auU",{"next":["^"],"krama":[2,2,2]}],["auU^",{"custom_back_ref":10}],["b",{"krama":[85],"next":["h"]}],["bh",{"krama":[87]}],["c",{"next":["h"]}],["ch",{"krama":[61],"next":["h"]}],["chh",{"krama":[62]}],["d",{"krama":[70],"next":["h"]}],["dh",{"krama":[71]}],["e",{"next":["e"],"krama":[23]}],["ee",{"krama":[11]}],["f",{"krama":[84]}],["g",{"krama":[56],"next":["z","h"]}],["gh",{"krama":[59]}],["gz",{"krama":[57]}],["i",{"next":["i"],"krama":[9]}],["ii",{"krama":[11]}],["j",{"krama":[63],"next":["z","h"]}],["jh",{"krama":[66]}],["jz",{"krama":[64]}],["k",{"krama":[52],"next":["z","h"]}],["kh",{"krama":[54],"next":["z"]}],["khz",{"krama":[55]}],["kz",{"krama":[53]}],["n",{"krama":[72],"next":["z","1"]}],["n1",{"krama":[73]}],["nz",{"krama":[73],"next":["^"]}],["nz^",{"custom_back_ref":25}],["o",{"next":["o"],"krama":[31]}],["oo",{"krama":[17]}],["p",{"krama":[82],"next":["h"]}],["ph",{"krama":[83],"next":["z"]}],["phz",{"krama":[84]}],["q",{"custom_back_ref":0,"next":["q"]}],["qq",{"custom_back_ref":7}],["r",{"krama":[92],"next":["z","1"]}],["r1",{"krama":[93]}],["rz",{"krama":[93],"next":["^"]}],["rz^",{"custom_back_ref":28}],["s",{"krama":[98],"next":["h"]}],["sh",{"krama":[99],"next":["^"]}],["sh^",{"custom_back_ref":15}],["t",{"krama":[68],"next":["h"]}],["th",{"krama":[69]}],["u",{"next":["u"],"krama":[13]}],["uu",{"krama":[17]}],["z",{"krama":[64],"next":["h"]}],["zh",{"krama":[96]}],["↑",{"krama":[102],"next":["↑"]}],["↑↑",{"krama":[103],"next":["↑"]}],["↑↑↑",{"krama":[104]}]],"custom_script_chars_arr":[["",null,125],["L̥",null,58],["L̥̄",null,57],["M̐",null,64],["Q",null,71],["R̥",null,75],["R̥̄",null,74],["q",null,126],["Ê",null,90],["Ñ",null,53],["Ô",null,93],["Ā",null,33],["Ē",null,45],["Ī",null,51],["Ō",null,69],["Ś",null,133],["Ū",null,84],["Ḍ",null,37],["Ḍh",null,39],["Ḥ",null,49],["Ḷ",null,59],["Ḻ",null,61],["Ṁ",null,65],["Ṅ",null,47],["Ṇ",null,67],["Ṉ",null,119],["Ṛ",null,43],["Ṛh",null,41],["Ṟ",null,130],["Ṣ",null,78],["Ṭ",null,80],["Ṭh",null,82],["‍",null,26]]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lipilekhika",
3
- "version": "0.1.6",
3
+ "version": "1.0.0",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "homepage": "https://lipilekhika.in",