export const LIGATURES = [ { matches : [ '\u0628\u0633\u0645\u0020' , '\u0627\u0644\u0644\u0647\u0020' , '\u0627\u0644\u0631\u062D\u0645\u0646\u0020' , '\u0627\u0644\u0631\u062D\u064A\u0645' ] , forms : { isolated : '\uFDFD' } } , { matches : [ '\u062C\u0644\u0020\u062C\u0644\u0627\u0644\u0647' ] , forms : { isolated : '\uFDFB' } } , { matches : [ '\u0635\u0644\u0649\u0020' , '\u0627\u0644\u0644\u0647\u0020' , '\u0639\u0644\u064A\u0647\u0020' , '\u0648\u0633\u0644\u0645' ] , forms : { isolated : '\uFDFA' } } , { matches : [ '\u0627\u0644\u0644\u0647' ] , forms : { isolated : '\uFDF2' } } , { matches : [ '\u0623\u0643\u0628\u0631' ] , forms : { isolated : '\uFDF3' } } , { matches : [ '\u0639\u0644\u064A\u0647' ] , forms : { isolated : '\uFDF7' } } , { matches : [ '\u0645\u062D\u0645\u062F' ] , forms : { isolated : '\uFDF4' } } , { matches : [ '\u0631\u0633\u0648\u0644' ] , forms : { isolated : '\uFDF6' } } , { matches : [ '\u0635\u0644\u0639\u0645' ] , forms : { isolated : '\uFDF5' } } , { matches : [ '\u0635\u0644\u0649' ] , forms : { isolated : '\uFDF9' } } , { matches : [ '\u0648\u0633\u0644\u0645' ] , forms : { isolated : '\uFDF8' } } , { matches : [ '\u0631[\u06CC\u064A]\u0627\u0644' ] , forms : { isolated : '\uFDFC' } } , { matches : [ '\u0639\u0649' ] , forms : { isolated : '\uFCF7' , final : '\uFD13' } } , { matches : [ '\u0639\u062C' ] , forms : { isolated : '\uFC29' , initial : '\uFCBA' } } , { matches : [ '\u0639\u062C\u0645' ] , forms : { initial : '\uFDC4' , final : '\uFD75' } } , { matches : [ '\u0639\u0645' ] , forms : { isolated : '\uFC2A' , initial : '\uFCBB' } } , { matches : [ '\u0639\u0645\u0649' ] , forms : { final : '\uFD78' } } , { matches : [ '\u0639\u0645\u0645' ] , forms : { initial : '\uFD77' , final : '\uFD76' } } , { matches : [ '\u0639\u0645\u064A' ] , forms : { final : '\uFDB6' } } , { matches : [ '\u0639\u064A' ] , forms : { isolated : '\uFCF8' , final : '\uFD14' } } , { matches : [ '\u0649\u0670' ] , forms : { isolated : '\uFC5D' , final : '\uFC90' } } , { matches : [ '\u0627\u064B' ] , forms : { isolated : '\uFD3D' , final : '\uFD3C' } } , { matches : [ '\u0628\u0649' ] , forms : { isolated : '\uFC09' , final : '\uFC6E' } } , { matches : [ '\u0628\u062D' ] , forms : { isolated : '\uFC06' , initial : '\uFC9D' } } , { matches : [ '\u0628\u062D\u064A' ] , forms : { final : '\uFDC2' } } , { matches : [ '\u0628\u0647' ] , forms : { initial : '\uFCA0' , medial : '\uFCE2' } } , { matches : [ '\u0628\u062C' ] , forms : { isolated : '\uFC05' , initial : '\uFC9C' } } , { matches : [ '\u0628\u062E' ] , forms : { isolated : '\uFC07' , initial : '\uFC9E' } } , { matches : [ '\u0628\u062E\u064A' ] , forms : { final : '\uFD9E' } } , { matches : [ '\u0628\u0645' ] , forms : { isolated : '\uFC08' , initial : '\uFC9F' , medial : '\uFCE1' , final : '\uFC6C' } } , { matches : [ '\u0628\u0646' ] , forms : { final : '\uFC6D' } } , { matches : [ '\u0628\u0631' ] , forms : { final : '\uFC6A' } } , { matches : [ '\u0639\u0649' ] , forms : { isolated : '\uFCF7' , final : '\uFD13' } } , { matches : [ '\u0639\u062C' ] , forms : { isolated : '\uFC29' , initial : '\uFCBA' } } , { matches : [ '\u0639\u062C\u0645' ] , forms : { initial : '\uFDC4' , final : '\uFD75' } } , { matches : [ '\u0639\u0645' ] , forms : { isolated : '\uFC2A' , initial : '\uFCBB' } } , { matches : [ '\u0639\u0645\u0649' ] , forms : { final : '\uFD78' } } , { matches : [ '\u0639\u0645\u0645' ] , forms : { initial : '\uFD77' , final : '\uFD76' } } , { matches : [ '\u0639\u0645\u064A' ] , forms : { final : '\uFDB6' } } , { matches : [ '\u0639\u064A' ] , forms : { isolated : '\uFCF8' , final : '\uFD14' } } , { matches : [ '\u0649\u0670' ] , forms : { isolated : '\uFC5D' , final : '\uFC90' } } , { matches : [ '\u0627\u064B' ] , forms : { isolated : '\uFD3D' , final : '\uFD3C' } } , { matches : [ '\u0628\u0649' ] , forms : { isolated : '\uFC09' , final : '\uFC6E' } } , { matches : [ '\u0628\u062D' ] , forms : { isolated : '\uFC06' , initial : '\uFC9D' } } , { matches : [ '\u0628\u062D\u064A' ] , forms : { final : '\uFDC2' } } , { matches : [ '\u0628\u0647' ] , forms : { initial : '\uFCA0' , medial : '\uFCE2' } } , { matches : [ '\u0628\u062C' ] , forms : { isolated : '\uFC05' , initial : '\uFC9C' } } , { matches : [ '\u0628\u062E' ] , forms : { isolated : '\uFC07' , initial : '\uFC9E' } } , { matches : [ '\u0628\u062E\u064A' ] , forms : { final : '\uFD9E' } } , { matches : [ '\u0628\u0645' ] , forms : { isolated : '\uFC08' , initial : '\uFC9F' , medial : '\uFCE1' , final : '\uFC6C' } } , { matches : [ '\u0628\u0646' ] , forms : { final : '\uFC6D' } } , { matches : [ '\u0628\u0631' ] , forms : { final : '\uFC6A' } } , { matches : [ '\u0628\u064A' ] , forms : { isolated : '\uFC0A' , final : '\uFC6F' } } , { matches : [ '\u0628\u0632' ] , forms : { final : '\uFC6B' } } , { matches : [ '\u0636\u0649' ] , forms : { isolated : '\uFD07' , final : '\uFD23' } } , { matches : [ '\u0636\u062D' ] , forms : { isolated : '\uFC23' , initial : '\uFCB5' } } , { matches : [ '\u0636\u062D\u0649' ] , forms : { final : '\uFD6E' } } , { matches : [ '\u0636\u062D\u064A' ] , forms : { final : '\uFDAB' } } , { matches : [ '\u0636\u062C' ] , forms : { isolated : '\uFC22' , initial : '\uFCB4' } } , { matches : [ '\u0636\u062E' ] , forms : { isolated : '\uFC24' , initial : '\uFCB6' } } , { matches : [ '\u0636\u062E\u0645' ] , forms : { initial : '\uFD70' , final : '\uFD6F' } } , { matches : [ '\u0636\u0645' ] , forms : { isolated : '\uFC25' , initial : '\uFCB7' } } , { matches : [ '\u0636\u0631' ] , forms : { isolated : '\uFD10' , final : '\uFD2C' } } , { matches : [ '\u0636\u064A' ] , forms : { isolated : '\uFD08' , final : '\uFD24' } } , { matches : [ '\u0641\u0649' ] , forms : { isolated : '\uFC31' , final : '\uFC7C' } } , { matches : [ '\u0641\u062D' ] , forms : { isolated : '\uFC2E' , initial : '\uFCBF' } } , { matches : [ '\u0641\u062C' ] , forms : { isolated : '\uFC2D' , initial : '\uFCBE' } } , { matches : [ '\u0641\u062E' ] , forms : { isolated : '\uFC2F' , initial : '\uFCC0' } } , { matches : [ '\u0641\u062E\u0645' ] , forms : { initial : '\uFD7D' , final : '\uFD7C' } } , { matches : [ '\u0641\u0645' ] , forms : { isolated : '\uFC30' , initial : '\uFCC1' } } , { matches : [ '\u0641\u0645\u064A' ] , forms : { final : '\uFDC1' } } , { matches : [ '\u0641\u064A' ] , forms : { isolated : '\uFC32' , final : '\uFC7D' } } , { matches : [ '\u063A\u0649' ] , forms : { isolated : '\uFCF9' , final : '\uFD15' } } , { matches : [ '\u063A\u062C' ] , forms : { isolated : '\uFC2B' , initial : '\uFCBC' } } , { matches : [ '\u063A\u0645' ] , forms : { isolated : '\uFC2C' , initial : '\uFCBD' } } , { matches : [ '\u063A\u0645\u0649' ] , forms : { final : '\uFD7B' } } , { matches : [ '\u063A\u0645\u0645' ] , forms : { final : '\uFD79' } } , { matches : [ '\u063A\u0645\u064A' ] , forms : { final : '\uFD7A' } } , { matches : [ '\u063A\u064A' ] , forms : { isolated : '\uFCFA' , final : '\uFD16' } } , { matches : [ '\u062D\u0649' ] , forms : { isolated : '\uFCFF' , final : '\uFD1B' } } , { matches : [ '\u062D\u062C' ] , forms : { isolated : '\uFC17' , initial : '\uFCA9' } } , { matches : [ '\u062D\u062C\u064A' ] , forms : { final : '\uFDBF' } } , { matches : [ '\u062D\u0645' ] , forms : { isolated : '\uFC18' , initial : '\uFCAA' } } , { matches : [ '\u062D\u0645\u0649' ] , forms : { final : '\uFD5B' } } , { matches : [ '\u062D\u0645\u064A' ] , forms : { final : '\uFD5A' } } , { matches : [ '\u062D\u064A' ] , forms : { isolated : '\uFD00' , final : '\uFD1C' } } , { matches : [ '\u0647\u0649' ] , forms : { isolated : '\uFC53' } } , { matches : [ '\u0647\u062C' ] , forms : { isolated : '\uFC51' , initial : '\uFCD7' } } , { matches : [ '\u0647\u0645' ] , forms : { isolated : '\uFC52' , initial : '\uFCD8' } } , { matches : [ '\u0647\u0645\u062C' ] , forms : { initial : '\uFD93' } } , { matches : [ '\u0647\u0645\u0645' ] , forms : { initial : '\uFD94' } } , { matches : [ '\u0647\u0670' ] , forms : { initial : '\uFCD9' } } , { matches : [ '\u0647\u064A' ] , forms : { isolated : '\uFC54' } } , { matches : [ '\u062C\u0649' ] , forms : { isolated : '\uFD01' , final : '\uFD1D' } } , { matches : [ '\u062C\u062D' ] , forms : { isolated : '\uFC15' , initial : '\uFCA7' } } , { matches : [ '\u062C\u062D\u0649' ] , forms : { final : '\uFDA6' } } , { matches : [ '\u062C\u062D\u064A' ] , forms : { final : '\uFDBE' } } , { matches : [ '\u062C\u0645' ] , forms : { isolated : '\uFC16' , initial : '\uFCA8' } } , { matches : [ '\u062C\u0645\u0649' ] , forms : { final : '\uFDA7' } } , { matches : [ '\u062C\u0645\u062D' ] , forms : { initial : '\uFD59' , final : '\uFD58' } } , { matches : [ '\u062C\u0645\u064A' ] , forms : { final : '\uFDA5' } } , { matches : [ '\u062C\u064A' ] , forms : { isolated : '\uFD02' , final : '\uFD1E' } } , { matches : [ '\u0643\u0627' ] , forms : { isolated : '\uFC37' , final : '\uFC80' } } , { matches : [ '\u0643\u0649' ] , forms : { isolated : '\uFC3D' , final : '\uFC83' } } , { matches : [ '\u0643\u062D' ] , forms : { isolated : '\uFC39' , initial : '\uFCC5' } } , { matches : [ '\u0643\u062C' ] , forms : { isolated : '\uFC38' , initial : '\uFCC4' } } , { matches : [ '\u0643\u062E' ] , forms : { isolated : '\uFC3A' , initial : '\uFCC6' } } , { matches : [ '\u0643\u0644' ] , forms : { isolated : '\uFC3B' , initial : '\uFCC7' , medial : '\uFCEB' , final : '\uFC81' } } , { matches : [ '\u0643\u0645' ] , forms : { isolated : '\uFC3C' , initial : '\uFCC8' , medial : '\uFCEC' , final : '\uFC82' } } , { matches : [ '\u0643\u0645\u0645' ] , forms : { initial : '\uFDC3' , final : '\uFDBB' } } , { matches : [ '\u0643\u0645\u064A' ] , forms : { final : '\uFDB7' } } , { matches : [ '\u0643\u064A' ] , forms : { isolated : '\uFC3E' , final : '\uFC84' } } , { matches : [ '\u062E\u0649' ] , forms : { isolated : '\uFD03' , final : '\uFD1F' } } , { matches : [ '\u062E\u062D' ] , forms : { isolated : '\uFC1A' } } , { matches : [ '\u062E\u062C' ] , forms : { isolated : '\uFC19' , initial : '\uFCAB' } } , { matches : [ '\u062E\u0645' ] , forms : { isolated : '\uFC1B' , initial : '\uFCAC' } } , { matches : [ '\u062E\u064A' ] , forms : { isolated : '\uFD04' , final : '\uFD20' } } , { matches : [ '\u0644\u0627' ] , forms : { isolated : '\uFEFB' , final : '\uFEFC' } } , { matches : [ '\u0644\u0649' ] , forms : { isolated : '\uFC43' , final : '\uFC86' } } , { matches : [ '\u0644\u0623' ] , forms : { isolated : '\uFEF7' , final : '\uFEF8' } } , { matches : [ '\u0644\u0625' ] , forms : { isolated : '\uFEF9' , final : '\uFEFA' } } , { matches : [ '\u0644\u0622' ] , forms : { isolated : '\uFEF5' , final : '\uFEF6' } } , { matches : [ '\u0644\u062D' ] , forms : { isolated : '\uFC40' , initial : '\uFCCA' } } , { matches : [ '\u0644\u062D\u0649' ] , forms : { final : '\uFD82' } } , { matches : [ '\u0644\u062D\u0645' ] , forms : { initial : '\uFDB5' , final : '\uFD80' } } , { matches : [ '\u0644\u062D\u064A' ] , forms : { final : '\uFD81' } } , { matches : [ '\u0644\u0647' ] , forms : { initial : '\uFCCD' } } , { matches : [ '\u0644\u062C' ] , forms : { isolated : '\uFC3F' , initial : '\uFCC9' } } , { matches : [ '\u0644\u062C\u062C' ] , forms : { initial : '\uFD83' , final : '\uFD84' } } , { matches : [ '\u0644\u062C\u0645' ] , forms : { initial : '\uFDBA' , final : '\uFDBC' } } , { matches : [ '\u0644\u062C\u064A' ] , forms : { final : '\uFDAC' } } , { matches : [ '\u0644\u062E' ] , forms : { isolated : '\uFC41' , initial : '\uFCCB' } } , { matches : [ '\u0644\u062E\u0645' ] , forms : { initial : '\uFD86' , final : '\uFD85' } } , { matches : [ '\u0644\u0645' ] , forms : { isolated : '\uFC42' , initial : '\uFCCC' , medial : '\uFCED' , final : '\uFC85' } } , { matches : [ '\u0644\u0645\u062D' ] , forms : { initial : '\uFD88' , final : '\uFD87' } } , { matches : [ '\u0644\u0645\u064A' ] , forms : { final : '\uFDAD' } } , { matches : [ '\u0644\u064A' ] , forms : { isolated : '\uFC44' , final : '\uFC87' } } , { matches : [ '\u0645\u0627' ] , forms : { final : '\uFC88' } } , { matches : [ '\u0645\u0649' ] , forms : { isolated : '\uFC49' } } , { matches : [ '\u0645\u062D' ] , forms : { isolated : '\uFC46' , initial : '\uFCCF' } } , { matches : [ '\u0645\u062D\u062C' ] , forms : { initial : '\uFD89' } } , { matches : [ '\u0645\u062D\u0645' ] , forms : { initial : '\uFD8A' } } , { matches : [ '\u0645\u062D\u064A' ] , forms : { final : '\uFD8B' } } , { matches : [ '\u0645\u062C' ] , forms : { isolated : '\uFC45' , initial : '\uFCCE' } } , { matches : [ '\u0645\u062C\u062D' ] , forms : { initial : '\uFD8C' } } , { matches : [ '\u0645\u062C\u062E' ] , forms : { initial : '\uFD92' } } , { matches : [ '\u0645\u062C\u0645' ] , forms : { initial : '\uFD8D' } } , { matches : [ '\u0645\u062C\u064A' ] , forms : { final : '\uFDC0' } } , { matches : [ '\u0645\u062E' ] , forms : { isolated : '\uFC47' , initial : '\uFCD0' } } , { matches : [ '\u0645\u062E\u062C' ] , forms : { initial : '\uFD8E' } } , { matches : [ '\u0645\u062E\u0645' ] , forms : { initial : '\uFD8F' } } , { matches : [ '\u0645\u062E\u064A' ] , forms : { final : '\uFDB9' } } , { matches : [ '\u0645\u0645' ] , forms : { isolated : '\uFC48' , initial : '\uFCD1' , final : '\uFC89' } } , { matches : [ '\u0645\u0645\u064A' ] , forms : { final : '\uFDB1' } } , { matches : [ '\u0645\u064A' ] , forms : { isolated : '\uFC4A' } } , { matches : [ '\u0646\u0649' ] , forms : { isolated : '\uFC4F' , final : '\uFC8E' } } , { matches : [ '\u0646\u062D' ] , forms : { isolated : '\uFC4C' , initial : '\uFCD3' } } , { matches : [ '\u0646\u062D\u0649' ] , forms : { final : '\uFD96' } } , { matches : [ '\u0646\u062D\u0645' ] , forms : { initial : '\uFD95' } } , { matches : [ '\u0646\u062D\u064A' ] , forms : { final : '\uFDB3' } } , { matches : [ '\u0646\u0647' ] , forms : { initial : '\uFCD6' , medial : '\uFCEF' } } , { matches : [ '\u0646\u062C' ] , forms : { isolated : '\uFC4B' , initial : '\uFCD2' } } , { matches : [ '\u0646\u062C\u0649' ] , forms : { final : '\uFD99' } } , { matches : [ '\u0646\u062C\u062D' ] , forms : { initial : '\uFDB8' , final : '\uFDBD' } } , { matches : [ '\u0646\u062C\u0645' ] , forms : { initial : '\uFD98' , final : '\uFD97' } } , { matches : [ '\u0646\u062C\u064A' ] , forms : { final : '\uFDC7' } } , { matches : [ '\u0646\u062E' ] , forms : { isolated : '\uFC4D' , initial : '\uFCD4' } } , { matches : [ '\u0646\u0645' ] , forms : { isolated : '\uFC4E' , initial : '\uFCD5' , medial : '\uFCEE' , final : '\uFC8C' } } , { matches : [ '\u0646\u0645\u0649' ] , forms : { final : '\uFD9B' } } , { matches : [ '\u0646\u0645\u064A' ] , forms : { final : '\uFD9A' } } , { matches : [ '\u0646\u0646' ] , forms : { final : '\uFC8D' } } , { matches : [ '\u0646\u0631' ] , forms : { final : '\uFC8A' } } , { matches : [ '\u0646\u064A' ] , forms : { isolated : '\uFC50' , final : '\uFC8F' } } , { matches : [ '\u0646\u0632' ] , forms : { final : '\uFC8B' } } , { matches : [ '\u0642\u0649' ] , forms : { isolated : '\uFC35' , final : '\uFC7E' } } , { matches : [ '\u0642\u062D' ] , forms : { isolated : '\uFC33' , initial : '\uFCC2' } } , { matches : [ '\u0642\u0645' ] , forms : { isolated : '\uFC34' , initial : '\uFCC3' } } , { matches : [ '\u0642\u0645\u062D' ] , forms : { initial : '\uFDB4' , final : '\uFD7E' } } , { matches : [ '\u0642\u0645\u0645' ] , forms : { final : '\uFD7F' } } , { matches : [ '\u0642\u0645\u064A' ] , forms : { final : '\uFDB2' } } , { matches : [ '\u0642\u064A' ] , forms : { isolated : '\uFC36' , final : '\uFC7F' } } , { matches : [ '\u0631\u0670' ] , forms : { isolated : '\uFC5C' } } , { matches : [ '\u0635\u0649' ] , forms : { isolated : '\uFD05' , final : '\uFD21' } } , { matches : [ '\u0635\u062D' ] , forms : { isolated : '\uFC20' , initial : '\uFCB1' } } , { matches : [ '\u0635\u062D\u062D' ] , forms : { initial : '\uFD65' , final : '\uFD64' } } , { matches : [ '\u0635\u062D\u064A' ] , forms : { final : '\uFDA9' } } , { matches : [ '\u0635\u062E' ] , forms : { initial : '\uFCB2' } } , { matches : [ '\u0635\u0645' ] , forms : { isolated : '\uFC21' , initial : '\uFCB3' } } , { matches : [ '\u0635\u0645\u0645' ] , forms : { initial : '\uFDC5' , final : '\uFD66' } } , { matches : [ '\u0635\u0631' ] , forms : { isolated : '\uFD0F' , final : '\uFD2B' } } , { matches : [ '\u0635\u064A' ] , forms : { isolated : '\uFD06' , final : '\uFD22' } } , { matches : [ '\u0633\u0649' ] , forms : { isolated : '\uFCFB' , final : '\uFD17' } } , { matches : [ '\u0633\u062D' ] , forms : { isolated : '\uFC1D' , initial : '\uFCAE' , medial : '\uFD35' } } , { matches : [ '\u0633\u062D\u062C' ] , forms : { initial : '\uFD5C' } } , { matches : [ '\u0633\u0647' ] , forms : { initial : '\uFD31' , medial : '\uFCE8' } } , { matches : [ '\u0633\u062C' ] , forms : { isolated : '\uFC1C' , initial : '\uFCAD' , medial : '\uFD34' } } , { matches : [ '\u0633\u062C\u0649' ] , forms : { final : '\uFD5E' } } , { matches : [ '\u0633\u062C\u062D' ] , forms : { initial : '\uFD5D' } } , { matches : [ '\u0633\u062E' ] , forms : { isolated : '\uFC1E' , initial : '\uFCAF' , medial : '\uFD36' } } , { matches : [ '\u0633\u062E\u0649' ] , forms : { final : '\uFDA8' } } , { matches : [ '\u0633\u062E\u064A' ] , forms : { final : '\uFDC6' } } , { matches : [ '\u0633\u0645' ] , forms : { isolated : '\uFC1F' , initial : '\uFCB0' , medial : '\uFCE7' } } , { matches : [ '\u0633\u0645\u062D' ] , forms : { initial : '\uFD60' , final : '\uFD5F' } } , { matches : [ '\u0633\u0645\u062C' ] , forms : { initial : '\uFD61' } } , { matches : [ '\u0633\u0645\u0645' ] , forms : { initial : '\uFD63' , final : '\uFD62' } } , { matches : [ '\u0633\u0631' ] , forms : { isolated : '\uFD0E' , final : '\uFD2A' } } , { matches : [ '\u0633\u064A' ] , forms : { isolated : '\uFCFC' , final : '\uFD18' } } , { matches : [ '\u0640\u064F\u0651' ] , forms : { medial : '\uFCF3' } } , { matches : [ '\u0640\u064E\u0651' ] , forms : { medial : '\uFCF2' } } , { matches : [ '\u0640\u0650\u0651' ] , forms : { medial : '\uFCF4' } } , { matches : [ '\u0634\u0649' ] , forms : { isolated : '\uFCFD' , final : '\uFD19' } } , { matches : [ '\u0634\u062D' ] , forms : { isolated : '\uFD0A' , initial : '\uFD2E' , medial : '\uFD38' , final : '\uFD26' } } , { matches : [ '\u0634\u062D\u0645' ] , forms : { initial : '\uFD68' , final : '\uFD67' } } , { matches : [ '\u0634\u062D\u064A' ] , forms : { final : '\uFDAA' } } , { matches : [ '\u0634\u0647' ] , forms : { initial : '\uFD32' , medial : '\uFCEA' } } , { matches : [ '\u0634\u062C' ] , forms : { isolated : '\uFD09' , initial : '\uFD2D' , medial : '\uFD37' , final : '\uFD25' } } , { matches : [ '\u0634\u062C\u064A' ] , forms : { final : '\uFD69' } } , { matches : [ '\u0634\u062E' ] , forms : { isolated : '\uFD0B' , initial : '\uFD2F' , medial : '\uFD39' , final : '\uFD27' } } , { matches : [ '\u0634\u0645' ] , forms : { isolated : '\uFD0C' , initial : '\uFD30' , medial : '\uFCE9' , final : '\uFD28' } } , { matches : [ '\u0634\u0645\u062E' ] , forms : { initial : '\uFD6B' , final : '\uFD6A' } } , { matches : [ '\u0634\u0645\u0645' ] , forms : { initial : '\uFD6D' , final : '\uFD6C' } } , { matches : [ '\u0634\u0631' ] , forms : { isolated : '\uFD0D' , final : '\uFD29' } } , { matches : [ '\u0634\u064A' ] , forms : { isolated : '\uFCFE' , final : '\uFD1A' } } , { matches : [ '\u0637\u0649' ] , forms : { isolated : '\uFCF5' , final : '\uFD11' } } , { matches : [ '\u0637\u062D' ] , forms : { isolated : '\uFC26' , initial : '\uFCB8' } } , { matches : [ '\u0637\u0645' ] , forms : { isolated : '\uFC27' , initial : '\uFD33' , medial : '\uFD3A' } } , { matches : [ '\u0637\u0645\u062D' ] , forms : { initial : '\uFD72' , final : '\uFD71' } } , { matches : [ '\u0637\u0645\u0645' ] , forms : { initial : '\uFD73' } } , { matches : [ '\u0637\u0645\u064A' ] , forms : { final : '\uFD74' } } , { matches : [ '\u0637\u064A' ] , forms : { isolated : '\uFCF6' , final : '\uFD12' } } , { matches : [ '\u062A\u0649' ] , forms : { isolated : '\uFC0F' , final : '\uFC74' } } , { matches : [ '\u062A\u062D' ] , forms : { isolated : '\uFC0C' , initial : '\uFCA2' } } , { matches : [ '\u062A\u062D\u062C' ] , forms : { initial : '\uFD52' , final : '\uFD51' } } , { matches : [ '\u062A\u062D\u0645' ] , forms : { initial : '\uFD53' } } , { matches : [ '\u062A\u0647' ] , forms : { initial : '\uFCA5' , medial : '\uFCE4' } } , { matches : [ '\u062A\u062C' ] , forms : { isolated : '\uFC0B' , initial : '\uFCA1' } } , { matches : [ '\u062A\u062C\u0649' ] , forms : { final : '\uFDA0' } } , { matches : [ '\u062A\u062C\u0645' ] , forms : { initial : '\uFD50' } } , { matches : [ '\u062A\u062C\u064A' ] , forms : { final : '\uFD9F' } } , { matches : [ '\u062A\u062E' ] , forms : { isolated : '\uFC0D' , initial : '\uFCA3' } } , { matches : [ '\u062A\u062E\u0649' ] , forms : { final : '\uFDA2' } } , { matches : [ '\u062A\u062E\u0645' ] , forms : { initial : '\uFD54' } } , { matches : [ '\u062A\u062E\u064A' ] , forms : { final : '\uFDA1' } } , { matches : [ '\u062A\u0645' ] , forms : { isolated : '\uFC0E' , initial : '\uFCA4' , medial : '\uFCE3' , final : '\uFC72' } } , { matches : [ '\u062A\u0645\u0649' ] , forms : { final : '\uFDA4' } } , { matches : [ '\u062A\u0645\u062D' ] , forms : { initial : '\uFD56' } } , { matches : [ '\u062A\u0645\u062C' ] , forms : { initial : '\uFD55' } } , { matches : [ '\u062A\u0645\u062E' ] , forms : { initial : '\uFD57' } } , { matches : [ '\u062A\u0645\u064A' ] , forms : { final : '\uFDA3' } } , { matches : [ '\u062A\u0646' ] , forms : { final : '\uFC73' } } , { matches : [ '\u062A\u0631' ] , forms : { final : '\uFC70' } } , { matches : [ '\u062A\u064A' ] , forms : { isolated : '\uFC10' , final : '\uFC75' } } , { matches : [ '\u062A\u0632' ] , forms : { final : '\uFC71' } } , { matches : [ '\u0630\u0670' ] , forms : { isolated : '\uFC5B' } } , { matches : [ '\u062B\u0649' ] , forms : { isolated : '\uFC13' , final : '\uFC7A' } } , { matches : [ '\u062B\u0647' ] , forms : { medial : '\uFCE6' } } , { matches : [ '\u062B\u062C' ] , forms : { isolated : '\uFC11' } } , { matches : [ '\u062B\u0645' ] , forms : { isolated : '\uFC12' , initial : '\uFCA6' , medial : '\uFCE5' , final : '\uFC78' } } , { matches : [ '\u062B\u0646' ] , forms : { final : '\uFC79' } } , { matches : [ '\u062B\u0631' ] , forms : { final : '\uFC76' } } , { matches : [ '\u062B\u064A' ] , forms : { isolated : '\uFC14' , final : '\uFC7B' } } , { matches : [ '\u062B\u0632' ] , forms : { final : '\uFC77' } } , { matches : [ '\u0626\u0649' ] , forms : { isolated : '\uFBF9' , initial : '\uFBFB' , final : '\uFBFA' } } , { matches : [ '\u064A\u0649' ] , forms : { isolated : '\uFC59' , final : '\uFC95' } } , { matches : [ '\u064A\u062D' ] , forms : { isolated : '\uFC56' , initial : '\uFCDB' } } , { matches : [ '\u064A\u062D\u064A' ] , forms : { final : '\uFDAE' } } , { matches : [ '\u0626\u06D5' ] , forms : { isolated : '\uFBEC' , final : '\uFBED' } } , { matches : [ '\u0626\u0627' ] , forms : { isolated : '\uFBEA' , final : '\uFBEB' } } , { matches : [ '\u0626\u0649' ] , forms : { isolated : '\uFC03' , final : '\uFC68' } } , { matches : [ '\u0626\u06D0' ] , forms : { isolated : '\uFBF6' , initial : '\uFBF8' , final : '\uFBF7' } } , { matches : [ '\u0626\u062D' ] , forms : { isolated : '\uFC01' , initial : '\uFC98' } } , { matches : [ '\u0626\u0647' ] , forms : { initial : '\uFC9B' , medial : '\uFCE0' } } , { matches : [ '\u0626\u062C' ] , forms : { isolated : '\uFC00' , initial : '\uFC97' } } , { matches : [ '\u0626\u062E' ] , forms : { initial : '\uFC99' } } , { matches : [ '\u0626\u0645' ] , forms : { isolated : '\uFC02' , initial : '\uFC9A' , medial : '\uFCDF' , final : '\uFC66' } } , { matches : [ '\u0626\u0646' ] , forms : { final : '\uFC67' } } , { matches : [ '\u0626\u06C6' ] , forms : { isolated : '\uFBF2' , final : '\uFBF3' } } , { matches : [ '\u0626\u0631' ] , forms : { final : '\uFC64' } } , { matches : [ '\u0626\u06C7' ] , forms : { isolated : '\uFBF0' , final : '\uFBF1' } } , { matches : [ '\u0626\u0648' ] , forms : { isolated : '\uFBEE' , final : '\uFBEF' } } , { matches : [ '\u0626\u064A' ] , forms : { isolated : '\uFC04' , final : '\uFC69' } } , { matches : [ '\u0626\u06C8' ] , forms : { isolated : '\uFBF4' , final : '\uFBF5' } } , { matches : [ '\u0626\u0632' ] , forms : { final : '\uFC65' } } , { matches : [ '\u064A\u0647' ] , forms : { initial : '\uFCDE' , medial : '\uFCF1' } } , { matches : [ '\u064A\u062C' ] , forms : { isolated : '\uFC55' , initial : '\uFCDA' } } , { matches : [ '\u064A\u062C\u064A' ] , forms : { final : '\uFDAF' } } , { matches : [ '\u064A\u062E' ] , forms : { isolated : '\uFC57' , initial : '\uFCDC' } } , { matches : [ '\u064A\u0645' ] , forms : { isolated : '\uFC58' , initial : '\uFCDD' , medial : '\uFCF0' , final : '\uFC93' } } , { matches : [ '\u064A\u0645\u0645' ] , forms : { initial : '\uFD9D' , final : '\uFD9C' } } , { matches : [ '\u064A\u0645\u064A' ] , forms : { final : '\uFDB0' } } , { matches : [ '\u064A\u0646' ] , forms : { final : '\uFC94' } } , { matches : [ '\u064A\u0631' ] , forms : { final : '\uFC91' } } , { matches : [ '\u064A\u064A' ] , forms : { isolated : '\uFC5A' , final : '\uFC96' } } , { matches : [ '\u064A\u0632' ] , forms : { final : '\uFC92' } } , { matches : [ '\u0638\u0645' ] , forms : { isolated : '\uFC28' , initial : '\uFCB9' , medial : '\uFD3B' } } ] ; export const LETTERS = { '\u0621' : { isolated : '\uFE80' } , '\u0622' : { isolated : '\uFE81' , final : '\uFE82' } , '\u0623' : { isolated : '\uFE83' , final : '\uFE84' } , '\u0624' : { isolated : '\uFE85' , final : '\uFE86' } , '\u0625' : { isolated : '\uFE87' , final : '\uFE88' } , '\u0626' : { isolated : '\uFE89' , initial : '\uFE8B' , medial : '\uFE8C' , final : '\uFE8A' } , '\u0627' : { isolated : '\uFE8D' , final : '\uFE8E' } , '\u0628' : { isolated : '\uFE8F' , initial : '\uFE91' , medial : '\uFE92' , final : '\uFE90' } , '\u0629' : { isolated : '\uFE93' , final : '\uFE94' } , '\u062A' : { isolated : '\uFE95' , initial : '\uFE97' , medial : '\uFE98' , final : '\uFE96' } , '\u062B' : { isolated : '\uFE99' , initial : '\uFE9B' , medial : '\uFE9C' , final : '\uFE9A' } , '\u062C' : { isolated : '\uFE9D' , initial : '\uFE9F' , medial : '\uFEA0' , final : '\uFE9E' } , '\u062D' : { isolated : '\uFEA1' , initial : '\uFEA3' , medial : '\uFEA4' , final : '\uFEA2' } , '\u062E' : { isolated : '\uFEA5' , initial : '\uFEA7' , medial : '\uFEA8' , final : '\uFEA6' } , '\u062F' : { isolated : '\uFEA9' , final : '\uFEAA' } , '\u0630' : { isolated : '\uFEAB' , final : '\uFEAC' } , '\u0631' : { isolated : '\uFEAD' , final : '\uFEAE' } , '\u0632' : { isolated : '\uFEAF' , final : '\uFEB0' } , '\u0633' : { isolated : '\uFEB1' , initial : '\uFEB3' , medial : '\uFEB4' , final : '\uFEB2' } , '\u0634' : { isolated : '\uFEB5' , initial : '\uFEB7' , medial : '\uFEB8' , final : '\uFEB6' } , '\u0635' : { isolated : '\uFEB9' , initial : '\uFEBB' , medial : '\uFEBC' , final : '\uFEBA' } , '\u0636' : { isolated : '\uFEBD' , initial : '\uFEBF' , medial : '\uFEC0' , final : '\uFEBE' } , '\u0637' : { isolated : '\uFEC1' , initial : '\uFEC3' , medial : '\uFEC4' , final : '\uFEC2' } , '\u0638' : { isolated : '\uFEC5' , initial : '\uFEC7' , medial : '\uFEC8' , final : '\uFEC6' } , '\u0639' : { isolated : '\uFEC9' , initial : '\uFECB' , medial : '\uFECC' , final : '\uFECA' } , '\u063A' : { isolated : '\uFECD' , initial : '\uFECF' , medial : '\uFED0' , final : '\uFECE' } , '\u0640' : { isolated : '\u0640' , initial : '\u0640' , medial : '\u0640' , final : '\u0640' } , '\u0641' : { isolated : '\uFED1' , initial : '\uFED3' , medial : '\uFED4' , final : '\uFED2' } , '\u0642' : { isolated : '\uFED5' , initial : '\uFED7' , medial : '\uFED8' , final : '\uFED6' } , '\u0643' : { isolated : '\uFED9' , initial : '\uFEDB' , medial : '\uFEDC' , final : '\uFEDA' } , '\u0644' : { isolated : '\uFEDD' , initial : '\uFEDF' , medial : '\uFEE0' , final : '\uFEDE' } , '\u0645' : { isolated : '\uFEE1' , initial : '\uFEE3' , medial : '\uFEE4' , final : '\uFEE2' } , '\u0646' : { isolated : '\uFEE5' , initial : '\uFEE7' , medial : '\uFEE8' , final : '\uFEE6' } , '\u0647' : { isolated : '\uFEE9' , initial : '\uFEEB' , medial : '\uFEEC' , final : '\uFEEA' } , '\u0648' : { isolated : '\uFEED' , final : '\uFEEE' } , '\u0649' : { isolated : '\uFEEF' , final : '\uFEF0' } , '\u064A' : { isolated : '\uFEF1' , initial : '\uFEF3' , medial : '\uFEF4' , final : '\uFEF2' } , '\u0671' : { isolated : '\uFB50' , final : '\uFB51' } , '\u0677' : { isolated : '\uFBDD' } , '\u0679' : { isolated : '\uFB66' , initial : '\uFB68' , medial : '\uFB69' , final : '\uFB67' } , '\u067A' : { isolated : '\uFB5E' , initial : '\uFB60' , medial : '\uFB61' , final : '\uFB5F' } , '\u067B' : { isolated : '\uFB52' , initial : '\uFB54' , medial : '\uFB55' , final : '\uFB53' } , '\u067E' : { isolated : '\uFB56' , initial : '\uFB58' , medial : '\uFB59' , final : '\uFB57' } , '\u067F' : { isolated : '\uFB62' , initial : '\uFB64' , medial : '\uFB65' , final : '\uFB63' } , '\u0680' : { isolated : '\uFB5A' , initial : '\uFB5C' , medial : '\uFB5D' , final : '\uFB5B' } , '\u0683' : { isolated : '\uFB76' , initial : '\uFB78' , medial : '\uFB79' , final : '\uFB77' } , '\u0684' : { isolated : '\uFB72' , initial : '\uFB74' , medial : '\uFB75' , final : '\uFB73' } , '\u0686' : { isolated : '\uFB7A' , initial : '\uFB7C' , medial : '\uFB7D' , final : '\uFB7B' } , '\u0687' : { isolated : '\uFB7E' , initial : '\uFB80' , medial : '\uFB81' , final : '\uFB7F' } , '\u0688' : { isolated : '\uFB88' , final : '\uFB89' } , '\u068C' : { isolated : '\uFB84' , final : '\uFB85' } , '\u068D' : { isolated : '\uFB82' , final : '\uFB83' } , '\u068E' : { isolated : '\uFB86' , final : '\uFB87' } , '\u0691' : { isolated : '\uFB8C' , final : '\uFB8D' } , '\u0698' : { isolated : '\uFB8A' , final : '\uFB8B' } , '\u06A4' : { isolated : '\uFB6A' , initial : '\uFB6C' , medial : '\uFB6D' , final : '\uFB6B' } , '\u06A6' : { isolated : '\uFB6E' , initial : '\uFB70' , medial : '\uFB71' , final : '\uFB6F' } , '\u06A9' : { isolated : '\uFB8E' , initial : '\uFB90' , medial : '\uFB91' , final : '\uFB8F' } , '\u06AD' : { isolated : '\uFBD3' , initial : '\uFBD5' , medial : '\uFBD6' , final : '\uFBD4' } , '\u06AF' : { isolated : '\uFB92' , initial : '\uFB94' , medial : '\uFB95' , final : '\uFB93' } , '\u06B1' : { isolated : '\uFB9A' , initial : '\uFB9C' , medial : '\uFB9D' , final : '\uFB9B' } , '\u06B3' : { isolated : '\uFB96' , initial : '\uFB98' , medial : '\uFB99' , final : '\uFB97' } , '\u06BA' : { isolated : '\uFB9E' , final : '\uFB9F' } , '\u06BB' : { isolated : '\uFBA0' , initial : '\uFBA2' , medial : '\uFBA3' , final : '\uFBA1' } , '\u06BE' : { isolated : '\uFBAA' , initial : '\uFBAC' , medial : '\uFBAD' , final : '\uFBAB' } , '\u06C0' : { isolated : '\uFBA4' , final : '\uFBA5' } , '\u06C1' : { isolated : '\uFBA6' , initial : '\uFBA8' , medial : '\uFBA9' , final : '\uFBA7' } , '\u06C5' : { isolated : '\uFBE0' , final : '\uFBE1' } , '\u06C6' : { isolated : '\uFBD9' , final : '\uFBDA' } , '\u06C7' : { isolated : '\uFBD7' , final : '\uFBD8' } , '\u06C8' : { isolated : '\uFBDB' , final : '\uFBDC' } , '\u06C9' : { isolated : '\uFBE2' , final : '\uFBE3' } , '\u06CB' : { isolated : '\uFBDE' , final : '\uFBDF' } , '\u06CC' : { isolated : '\uFBFC' , initial : '\uFBFE' , medial : '\uFBFF' , final : '\uFBFD' } , '\u06D0' : { isolated : '\uFBE4' , initial : '\uFBE6' , medial : '\uFBE7' , final : '\uFBE5' } , '\u06D2' : { isolated : '\uFBAE' , final : '\uFBAF' } , '\u06D3' : { isolated : '\uFBB0' , final : '\uFBB1' } } ; const HARAKAT_RE = new RegExp ( '[\u0610-\u061a\u064b-\u065f\u0670\u06d6-\u06dc\u06df-\u06e8\u06ea-\u06ed\u08d4-\u08e1\u08d4-\u08ed\u08e3-\u08ff]' ) ; function _connects_with_letter_before ( letter ) { if ( ! LETTERS [ letter ] ) { return false ; } let forms = LETTERS [ letter ] ; return forms . final || forms . medial ; } function _connects_with_letter_after ( letter ) { if ( ! LETTERS [ letter ] ) { return false ; } let forms = LETTERS [ letter ] ; return forms . initial || forms . medial ; } function _connects_with_letters_before_and_after ( letter ) { if ( ! LETTERS [ letter ] ) { return false ; } let forms = LETTERS [ letter ] ; return forms . medial ; } export function reshape ( text , options ) { if ( ! text ) { return '' ; } if ( ! options ) { options = { } ; } let output = [ ] ; const LETTER = 0 ; const FORM = 1 ; const NOT_SUPPORTED = - 1 ; let delete_harakat = options . delete_harakat || false ; for ( let i = 0 ; i < text . length ; i ++ ) { let letter = text [ i ] ; if ( delete_harakat && HARAKAT_RE . exec ( letter ) ) { output . push ( [ '' , NOT_SUPPORTED ] ) ; } if ( ! LETTERS [ letter ] ) { output . push ( [ letter , NOT_SUPPORTED ] ) ; } else if ( ! output . length ) { output . push ( [ letter , 'isolated' ] ) ; } else { let previous_output = output [ output . length - 1 ] ; if ( previous_output [ FORM ] === NOT_SUPPORTED ) { output . push ( [ letter , 'isolated' ] ) ; } else if ( ! ( _connects_with_letter_before ( letter ) ) ) { output . push ( [ letter , 'isolated' ] ) ; } else if ( ! ( _connects_with_letter_after ( previous_output [ LETTER ] ) ) ) { output . push ( [ letter , 'isolated' ] ) ; } else if ( previous_output [ FORM ] === 'final' && ! _connects_with_letters_before_and_after ( previous_output [ LETTER ] ) ) { output . push ( [ letter , 'isolated' ] ) ; } else if ( previous_output [ FORM ] == 'isolated' ) { output [ output . length - 1 ] [ 1 ] = 'initial' ; output . push ( [ letter , 'final' ] ) ; } else { output [ output . length - 1 ] [ 1 ] = 'medial' ; output . push ( [ letter , 'final' ] ) ; } } } if ( options . ligatures !== false ) { for ( let x = 0 ; x < LIGATURES . length ; x ++ ) { let ligature = LIGATURES [ x ] ; for ( let y = 0 ; y < ligature . matches . length ; y ++ ) { let pattern = ligature . matches [ y ] ; let textFragment = text ; let textFragmentOffset = 0 ; while ( textFragment . indexOf ( pattern ) > - 1 ) { let a = textFragment . indexOf ( pattern ) ; let start_form = output [ a + textFragmentOffset ] [ FORM ] ; let end_form = output [ a + textFragmentOffset + pattern . length - 1 ] [ FORM ] ; let ligature_form = null ; if ( start_form === 'isolated' || start_form === 'initial' ) { if ( end_form === 'isolated' || end_form === 'final' ) { ligature_form = 'isolated' ; } else { ligature_form = 'initial' ; } } else { if ( end_form === 'isolated' || end_form === 'final' ) { ligature_form = 'final' ; } else { ligature_form = 'medial' ; } } if ( ! ligature . forms [ ligature_form ] ) { textFragmentOffset += a + 1 ; textFragment = textFragment . substring ( textFragmentOffset ) ; continue ; } output [ a + textFragmentOffset ] [ 0 ] = ligature . forms [ ligature_form ] ; output [ a + textFragmentOffset ] [ 1 ] = NOT_SUPPORTED ; for ( let z = a + textFragmentOffset + 1 ; z < a + textFragmentOffset + pattern . length ; z ++ ) { output [ z ] = [ '' , NOT_SUPPORTED ] ; } textFragmentOffset += a + 1 ; textFragment = textFragment . substring ( textFragmentOffset ) ; } } } } return output . map ( function ( o ) { if ( o [ FORM ] === NOT_SUPPORTED && o [ LETTER ] . length ) { return o [ LETTER ] ; } else if ( options . ignoreIsolates && o [ FORM ] === 'isolated' ) { return o [ LETTER ] || '' ; } else { return ( LETTERS [ o [ LETTER ] ] || { } ) [ o [ FORM ] ] || '' ; } } ) . join ( '' ) ; }