diff --git a/dist/pinyin2ipa.min.js b/dist/pinyin2ipa.min.js index a4be307..4b14663 100644 --- a/dist/pinyin2ipa.min.js +++ b/dist/pinyin2ipa.min.js @@ -1,80 +1,17 @@ +/*! + * pinyin2ipa v1.0.1 (March 16th 2019) + * Converts Mandarin Chinese pinyin notation to IPA (international phonetic alphabet) notation + * + * https://github.com/Connum/npm-pinyin2ipa#readme + * + * @author Connum + * @license MIT + */ (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.pinyin2ipa = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i { - let totalTones = 1; - let pregMatch = p.match(new RegExp(`([${tones}])`, 'g')); - if (pregMatch) { - totalTones = pregMatch.length; - } - - if (p.length > 4 || totalTones > 1) { - separate(p) - .split(' ') - .forEach(newP => { - pregMatch = newP.match(new RegExp(`([${tones}])`, 'g')); - if (pregMatch) { - totalTones = pregMatch.length; - } - - if (newP.length > 4 || totalTones > 1) { - separate(newP) - .split(' ') - .forEach(newP2 => { - newPinyin.push(newP2.trim()); - }); - } else { - newPinyin.push(newP.trim()); - } - }); - } else { - newPinyin.push(p.trim()); - } - }); - - return newPinyin; -}; - -},{}]},{},[1])(1) +'use strict';Object.defineProperty(exports,'__esModule',{value:!0});var _pinyinSeparate=require('pinyin-separate'),_pinyinSeparate2=_interopRequireDefault(_pinyinSeparate);function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}var defaultMethod={a:'a',ê:'\u025B',ai:'ai',an:'an',ang:'a\u014B',ao:'au',bai:'pai',bang:'pa\u014B',ban:'pan',bao:'pau',ba:'pa',bei:'pei',beng:'p\u0259\u014B',ben:'p\u0259n',bian:'pi\u025Bn',biao:'piau',bie:'pi\u025B',bing:'pi\u014B',bin:'pin',bi:'pi',bo:'po',bu:'pu',cai:'ts\u02B0ai',cang:'ts\u02B0a\u014B',can:'ts\u02B0an',cao:'ts\u02B0au',ca:'ts\u02B0a',cei:'ts\u02B0ei',ceng:'ts\u02B0\u0259\u014B',cen:'ts\u02B0\u0259n',ce5:'ts\u02B0\u0259',ce:'ts\u02B0\u0264',chai:'t\u0282\u02B0ai',chang:'t\u0282\u02B0a\u014B',chan:'t\u0282\u02B0an',chao:'t\u0282\u02B0au',cha:'t\u0282\u02B0a',cheng:'t\u0282\u02B0\u0259\u014B',chen:'t\u0282\u02B0\u0259n',che5:'t\u0282\u02B0\u02595',che:'t\u0282\u02B0\u0264',chi:'t\u0282\u02B0\u0285',chong:'t\u0282\u02B0u\u014B',chou:'t\u0282\u02B0ou',chuai:'t\u0282\u02B0uai',chuang:'t\u0282\u02B0ua\u014B',chuan:'t\u0282\u02B0uan',chua:'t\u0282\u02B0ua',chui:'t\u0282\u02B0uei',chun:'t\u0282\u02B0u\u0259n',chuo:'t\u0282\u02B0uo',chu:'t\u0282\u02B0u',ci:'ts\u02B0\u027F',cong:'ts\u02B0u\u014B',cou:'ts\u02B0ou',cuan:'ts\u02B0uan',cui:'ts\u02B0uei',cun:'ts\u02B0u\u0259n',cuo:'ts\u02B0uo',cu:'ts\u02B0u',dai:'tai',dang:'ta\u014B',dan:'tan',dao:'tau',da:'ta',dei:'tei',deng:'t\u0259\u014B',den:'t\u0259n',de5:'t\u0259',de:'t\u0264',dian:'ti\u025Bn',diao:'tiau',dia:'tia',die:'ti\u025B',ding:'ti\u014B',di:'ti',diu:'ti\u0259u',dong:'tu\u014B',dou:'tou',duan:'tuan',dui:'tuei',dun:'tu\u0259n',duo:'tuo',du:'tu',e5:'\u0259',e:'\u0264',ei:'ei',en:'\u0259n',eng:'\u0259\u014B',er:'\u0259r',fa:'fa',fan:'fan',fang:'fa\u014B',fe5:'f\u0259',fe:'f\u0264',fei:'fei',fen:'f\u0259n',feng:'f\u0259\u014B',fo:'fo',fou:'fou',fu:'fu',gai:'kai',ga:'ka',gang:'ka\u014B',gan:'kan',gao:'kau',gei:'kei',ge5:'k\u0259',ge:'k\u0264',geng:'k\u0259\u014B',gen:'k\u0259n',gong:'ku\u014B',gou:'kou',guai:'kuai',gua:'kua',guang:'kua\u014B',guan:'kuan',gui:'kuei',gu:'ku',gun:'ku\u0259n',guo:'kuo',hai:'xai',hang:'xa\u014B',han:'xan',hao:'xau',ha:'xa',hei:'xei',heng:'x\u0259\u014B',hen:'x\u0259n',he5:'x\u0259',he:'x\u0264',hong:'xu\u014B',hou:'xou',huai:'xuai',huang:'xua\u014B',huan:'xuan',hua:'xua',hui:'xuei',hun:'xu\u0259n',huo:'xuo',hu:'xu',jiang:'t\u0255i\u0251\u014B',jian:'t\u0255i\u025Bn',jiao:'t\u0255iau',jia:'t\u0255ia',jie:'t\u0255i\u025B',jing:'t\u0255i\u014B',jin:'t\u0255in',jiong:'t\u0255y\u014B',ji:'t\u0255i',jiu:'t\u0255i\u0259u',juan:'t\u0255yan',jue:'t\u0255y\u025B',jun:'t\u0255yn',ju:'t\u0255y',kai:'k\u02B0ai',ka:'k\u02B0a',kang:'k\u02B0a\u014B',kan:'k\u02B0an',kao:'k\u02B0au',kei:'k\u02B0ei',ke5:'k\u02B0\u0259',ke:'k\u02B0\u0264',keng:'k\u02B0\u0259\u014B',ken:'k\u02B0\u0259n',kong:'k\u02B0u\u014B',kou:'k\u02B0ou',kuai:'k\u02B0uai',kua:'k\u02B0ua',kuang:'k\u02B0ua\u014B',kuan:'k\u02B0uan',kui:'k\u02B0uei',ku:'k\u02B0u',kun:'k\u02B0u\u0259n',kuo:'k\u02B0uo',lai:'lai',la:'la',lang:'la\u014B',lan:'lan',lüe:'ly\u025B',lü:'ly',lao:'lau',lei:'lei',le5:'l\u0259',le:'l\u0264',leng:'l\u0259\u014B',lia:'lia',liang:'li\u0251\u014B',lian:'li\u025Bn',liao:'liau',lie:'li\u025B',li:'li',ling:'li\u014B',lin:'lin',liu:'li\u0259u',lo:'lo',long:'lu\u014B',lou:'lou',luan:'luan',lu:'lu',lun:'lu\u0259n',luo:'luo',mai:'mai',ma:'ma',mang:'ma\u014B',man:'man',mao:'mau',mei:'mei',me5:'m\u0259',me:'m\u0264',meng:'m\u0259\u014B',men:'m\u0259n',mian:'mi\u025Bn',miao:'miau',mie:'mi\u025B',mi:'mi',ming:'mi\u014B',min:'min',miu:'mi\u0259u',mo:'mo',mou:'mou',mu:'mu',nai:'nai',na:'na',nang:'na\u014B',nan:'nan',nüe:'ny\u025B',nü:'ny',nao:'nau',nei:'nei',ne5:'n\u0259',ne:'n\u0264',neng:'n\u0259\u014B',nen:'n\u0259n',niang:'ni\u0251\u014B',nian:'ni\u025Bn',niao:'niau',nie:'ni\u025B',ning:'ni\u014B',ni:'ni',nin:'nin',niu:'ni\u0259u',nong:'nu\u014B',nou:'nou',nuan:'nuan',nun:'nu\u0259n',nu:'nu',nuo:'nuo',o:'o',ou:'ou',pai:'p\u02B0ai',pang:'p\u02B0a\u014B',pan:'p\u02B0an',pao:'p\u02B0au',pa:'p\u02B0a',pei:'p\u02B0ei',peng:'p\u02B0\u0259\u014B',pen:'p\u02B0\u0259n',pian:'p\u02B0i\u025Bn',piao:'p\u02B0iau',pie:'p\u02B0i\u025B',ping:'p\u02B0i\u014B',pin:'p\u02B0in',pi:'p\u02B0i',po:'p\u02B0o',pou:'p\u02B0ou',pu:'p\u02B0u',qiang:'t\u0255\u02B0i\u0251\u014B',qian:'t\u0255\u02B0i\u025Bn',qiao:'t\u0255\u02B0iau',qia:'t\u0255\u02B0ia',qie:'t\u0255\u02B0i\u025B',qing:'t\u0255\u02B0i\u014B',qin:'t\u0255\u02B0in',qiong:'t\u0255\u02B0y\u014B',qi:'t\u0255\u02B0i',qiu:'t\u0255\u02B0i\u0259u',quan:'t\u0255\u02B0yan',que:'t\u0255\u02B0y\u025B',qun:'t\u0255\u02B0yn',qu:'t\u0255\u02B0y',ran:'\u0290an',rang:'\u0290a\u014B',rao:'\u0290au',re5:'\u0290\u0259',re:'\u0290\u0264',ren:'\u0290\u0259n',reng:'\u0290\u0259\u014B',ri:'\u0290\u0285',rong:'\u0290u\u014B',rou:'\u0290ou',rua:'\u0290ua',ruan:'\u0290uan',ru:'\u0290u',rui:'\u0290uei',run:'\u0290u\u0259n',ruo:'\u0290uo',sai:'sai',sang:'sa\u014B',san:'san',sao:'sau',sa:'sa',seng:'s\u0259\u014B',sen:'s\u0259n',se5:'s\u0259',se:'s\u0264',sha:'\u0282a',shai:'\u0282ai',shan:'\u0282an',shang:'\u0282a\u014B',shao:'\u0282au',she5:'\u0282\u0259',she:'\u0282\u0264',shei:'\u0282ei',shen:'\u0282\u0259n',sheng:'\u0282\u0259\u014B',shi:'\u0282\u0285',shou:'\u0282ou',shua:'\u0282ua',shuai:'\u0282uai',shuan:'\u0282uan',shuang:'\u0282ua\u014B',shu:'\u0282u',shui:'\u0282uei',shun:'\u0282u\u0259n',shuo:'\u0282uo',si:'s\u027F',song:'su\u014B',sou:'sou',suan:'suan',sui:'suei',sun:'su\u0259n',suo:'suo',su:'su',tai:'t\u02B0ai',tang:'t\u02B0a\u014B',tan:'t\u02B0an',tao:'t\u02B0au',ta:'t\u02B0a',teng:'t\u02B0\u0259\u014B',te5:'t\u02B0\u0259',te:'t\u02B0\u0264',tian:'t\u02B0i\u025Bn',tiao:'t\u02B0iau',tie:'t\u02B0i\u025B',ting:'t\u02B0i\u014B',ti:'t\u02B0i',tong:'t\u02B0u\u014B',tou:'t\u02B0ou',tuan:'t\u02B0uan',tui:'t\u02B0uei',tun:'t\u02B0u\u0259n',tuo:'t\u02B0uo',tu:'t\u02B0u',wai:'uai',wang:'ua\u014B',wan:'uan',wa:'ua',wei:'uei',weng:'u\u0259\u014B',wen:'u\u0259n',wo:'uo',wu:'u',xia:'\u0255ia',xian:'\u0255i\u025Bn',xiang:'\u0255i\u0251\u014B',xiao:'\u0255iau',xie:'\u0255i\u025B',xi:'\u0255i',xin:'\u0255in',xing:'\u0255i\u014B',xiong:'\u0255y\u014B',xiu:'\u0255i\u0259u',xuan:'\u0255yan',xue:'\u0255y\u025B',xu:'\u0255y',xun:'\u0255yn',ya:'ia',yang:'i\u0251\u014B',yan:'i\u025Bn',yao:'iau',ye:'i\u025B',yi:'i',ying:'i\u014B',yin:'in',yong:'y\u014B',you:'i\u0259u',yuan:'yan',yue:'y\u025B',yun:'yn',yu:'y',zai:'tsai',zang:'tsa\u014B',zan:'tsan',zao:'tsau',za:'tsa',zei:'tsei',zeng:'ts\u0259\u014B',zen:'ts\u0259n',ze5:'ts\u0259',ze:'ts\u0264',zhai:'t\u0282ai',zhang:'t\u0282a\u014B',zhan:'t\u0282an',zhao:'t\u0282au',zha:'t\u0282a',zhei:'t\u0282ei',zheng:'t\u0282\u0259\u014B',zhen:'t\u0282\u0259n',zhe5:'t\u0282\u0259',zhe:'t\u0282\u0264',zhi:'t\u0282\u0285',zhong:'t\u0282u\u014B',zhou:'t\u0282ou',zhuai:'t\u0282uai',zhuang:'t\u0282ua\u014B',zhuan:'t\u0282uan',zhua:'t\u0282ua',zhui:'t\u0282uei',zhun:'t\u0282u\u0259n',zhuo:'t\u0282uo',zhu:'t\u0282u',zi:'ts\u027F',zong:'tsu\u014B',zou:'tsou',zuan:'tsuan',zui:'tsuei',zun:'tsu\u0259n',zuo:'tsuo',zu:'tsu'},sophisticatedMethod={an:'an',ai:'a\u026A\u032F',ei:'e\u026A\u032F',fan:'fan',fei:'fe\u026A\u032F',fu:'fu',fo:'fu\u032F\u0254',fa:'f\u0251',fang:'f\u0251\u014B',fen:'f\u0259n',feng:'f\u0259\u014B',fou:'f\u0264\u028A\u032F',yi:'i',yin:'in',ying:'i\u014B',yong:'j\u028A\u014B',ye:'i\u025B',yan:'i\u025Bn',ya:'i\u032F\u0251',yang:'i\u032F\u0251\u014B',yao:'i\u032F\u0251\u028A\u032F',you:'i\u032F\u0264\u028A\u032F',gan:'kan',gai:'ka\u026A\u032F',gei:'ke\u026A\u032F',gu:'ku',guan:'ku\u032Fan',guai:'ku\u032Fa\u026A\u032F',gui:'ku\u032Fe\u026A\u032F',gua:'ku\u032F\u0251',guang:'ku\u032F\u0251\u014B',guo:'ku\u032F\u0254',gun:'ku\u032F\u0259n',ga:'k\u0251',gang:'k\u0251\u014B',gao:'k\u0251\u028A\u032F',gen:'k\u0259n',geng:'k\u0259\u014B',gou:'k\u0264\u028A\u032F',ge:'k\u026F\u032F\u028C',gong:'k\u028A\u014B',kan:'k\u02B0an',kai:'k\u02B0a\u026A\u032F',kei:'k\u02B0e\u026A\u032F',ku:'k\u02B0u',kuan:'k\u02B0u\u032Fan',kuai:'k\u02B0u\u032Fa\u026A\u032F',kui:'k\u02B0u\u032Fe\u026A\u032F',kua:'k\u02B0u\u032F\u0251',kuang:'k\u02B0u\u032F\u0251\u014B',kuo:'k\u02B0u\u032F\u0254',kun:'k\u02B0u\u032F\u0259n',ka:'k\u02B0\u0251',kang:'k\u02B0\u0251\u014B',kao:'k\u02B0\u0251\u028A\u032F',ken:'k\u02B0\u0259n',keng:'k\u02B0\u0259\u014B',kou:'k\u02B0\u0264\u028A\u032F',ke:'k\u02B0\u026F\u032F\u028C',kong:'k\u02B0\u028A\u014B',lan:'lan',lai:'la\u026A\u032F',lei:'le\u026A\u032F',li:'li',lin:'lin',ling:'li\u014B',lie:'li\u025B',lian:'li\u025Bn',lia:'li\u032F\u0251',liang:'li\u032F\u0251\u014B',liao:'li\u032F\u0251\u028A\u032F',liu:'li\u032F\u0264\u028A\u032F',lu:'lu',luan:'lu\u032Fan',lo:'lu\u032F\u0254',luo:'lu\u032F\u0254',lun:'lu\u032F\u0259n',lü:'ly',lüe:'ly\u032F\u0153',la:'l\u0251',lang:'l\u0251\u014B',lao:'l\u0251\u028A\u032F',leng:'l\u0259\u014B',lou:'l\u0264\u028A\u032F',le:'l\u026F\u032F\u028C',long:'l\u028A\u014B',man:'man',mai:'ma\u026A\u032F',mei:'me\u026A\u032F',mi:'mi',min:'min',ming:'mi\u014B',mie:'mi\u025B',mian:'mi\u025Bn',miao:'mi\u032F\u0251\u028A\u032F',miu:'mi\u032F\u0264\u028A\u032F',mu:'mu',mo:'mu\u032F\u0254',ma:'m\u0251',mang:'m\u0251\u014B',mao:'m\u0251\u028A\u032F',men:'m\u0259n',meng:'m\u0259\u014B',mou:'m\u0264\u028A\u032F',me:'m\u026F\u032F\u028C',nan:'nan',nai:'na\u026A\u032F',nei:'ne\u026A\u032F',ni:'ni',nin:'nin',ning:'ni\u014B',nie:'ni\u025B',nian:'ni\u025Bn',niang:'ni\u032F\u0251\u014B',niao:'ni\u032F\u0251\u028A\u032F',niu:'ni\u032F\u0264\u028A\u032F',nu:'nu',nuan:'nu\u032Fan',nuo:'nu\u032F\u0254',nü:'ny',nüe:'ny\u032F\u0153',na:'n\u0251',nang:'n\u0251\u014B',nao:'n\u0251\u028A\u032F',nen:'n\u0259n',neng:'n\u0259\u014B',nou:'n\u0264\u028A\u032F',ne:'n\u026F\u032F\u028C',nong:'n\u028A\u014B',ban:'pan',bai:'pa\u026A\u032F',bei:'pe\u026A\u032F',bi:'pi',bin:'pin',bing:'pi\u014B',bie:'pi\u025B',bian:'pi\u025Bn',biang:'pi\u032F\u0251\u014B',biao:'pi\u032F\u0251\u028A\u032F',bu:'pu',bo:'pu\u032F\u0254',ba:'p\u0251',bang:'p\u0251\u014B',bao:'p\u0251\u028A\u032F',ben:'p\u0259n',beng:'p\u0259\u014B',pan:'p\u02B0an',pai:'p\u02B0a\u026A\u032F',pei:'p\u02B0e\u026A\u032F',pi:'p\u02B0i',pin:'p\u02B0in',ping:'p\u02B0i\u014B',pie:'p\u02B0i\u025B',pian:'p\u02B0i\u025Bn',piao:'p\u02B0i\u032F\u0251\u028A\u032F',pu:'p\u02B0u',po:'p\u02B0u\u032F\u0254',pa:'p\u02B0\u0251',pang:'p\u02B0\u0251\u014B',pao:'p\u02B0\u0251\u028A\u032F',pen:'p\u02B0\u0259n',peng:'p\u02B0\u0259\u014B',pou:'p\u02B0\u0264\u028A\u032F',san:'san',sai:'sa\u026A\u032F',su:'su',suan:'su\u032Fan',sui:'su\u032Fe\u026A\u032F',suo:'su\u032F\u0254',sun:'su\u032F\u0259n',sa:'s\u0251',sang:'s\u0251\u014B',sao:'s\u0251\u028A\u032F',sen:'s\u0259n',seng:'s\u0259\u014B',sou:'s\u0264\u028A\u032F',se:'s\u026F\u032F\u028C',si:'s\u027F',song:'s\u028A\u014B',dan:'tan',dai:'ta\u026A\u032F',dei:'te\u026A\u032F',di:'ti',ding:'ti\u014B',die:'ti\u025B',dian:'ti\u025Bn',diao:'ti\u032F\u0251\u028A\u032F',diu:'ti\u032F\u0264\u028A\u032F',zan:'tsan',zai:'tsa\u026A\u032F',zei:'tse\u026A\u032F',zu:'tsu',zuan:'tsu\u032Fan',zui:'tsu\u032Fe\u026A\u032F',zuo:'tsu\u032F\u0254',zun:'tsu\u032F\u0259n',za:'ts\u0251',zang:'ts\u0251\u014B',zao:'ts\u0251\u028A\u032F',zen:'ts\u0259n',zeng:'ts\u0259\u014B',zou:'ts\u0264\u028A\u032F',ze:'ts\u026F\u032F\u028C',zi:'ts\u027F',zong:'ts\u028A\u014B',can:'ts\u02B0an',cai:'ts\u02B0a\u026A\u032F',cei:'ts\u02B0e\u026A\u032F',cu:'ts\u02B0u',cuan:'ts\u02B0u\u032Fan',cui:'ts\u02B0u\u032Fe\u026A\u032F',cuo:'ts\u02B0u\u032F\u0254',cun:'ts\u02B0u\u032F\u0259n',ca:'ts\u02B0\u0251',cang:'ts\u02B0\u0251\u014B',cao:'ts\u02B0\u0251\u028A\u032F',cen:'ts\u02B0\u0259n',ceng:'ts\u02B0\u0259\u014B',cou:'ts\u02B0\u0264\u028A\u032F',ce:'ts\u02B0\u026F\u032F\u028C',ci:'ts\u02B0\u027F',cong:'ts\u02B0\u028A\u014B',du:'tu',duan:'tu\u032Fan',dui:'tu\u032Fe\u026A\u032F',duo:'tu\u032F\u0254',dun:'tu\u032F\u0259n',da:'t\u0251',dang:'t\u0251\u014B',dao:'t\u0251\u028A\u032F',ji:'t\u0255i',jin:'t\u0255in',jing:'t\u0255i\u014B',jie:'t\u0255i\u025B',jian:'t\u0255i\u025Bn',jia:'t\u0255i\u032F\u0251',jiang:'t\u0255i\u032F\u0251\u014B',jiao:'t\u0255i\u032F\u0251\u028A\u032F',jiu:'t\u0255i\u032F\u0264\u028A\u032F',jiong:'t\u0255i\u032F\u028A\u014B',ju:'t\u0255y',jun:'t\u0255yn',jue:'t\u0255y\u032F\u0153',juan:'t\u0255y\u032F\u025Bn',qi:'t\u0255\u02B0i',qin:'t\u0255\u02B0in',qing:'t\u0255\u02B0i\u014B',qie:'t\u0255\u02B0i\u025B',qian:'t\u0255\u02B0i\u025Bn',qia:'t\u0255\u02B0i\u032F\u0251',qiang:'t\u0255\u02B0i\u032F\u0251\u014B',qiao:'t\u0255\u02B0i\u032F\u0251\u028A\u032F',qiu:'t\u0255\u02B0i\u032F\u0264\u028A\u032F',qiong:'t\u0255\u02B0i\u032F\u028A\u014B',qu:'t\u0255\u02B0y',qun:'t\u0255\u02B0yn',que:'t\u0255\u02B0y\u032F\u0153',quan:'t\u0255\u02B0y\u032F\u025Bn',den:'t\u0259n',deng:'t\u0259\u014B',dou:'t\u0264\u028A\u032F',de:'t\u026F\u032F\u028C',de5:'t\u0259',zhan:'t\u0282an',zhai:'t\u0282a\u026A\u032F',zhei:'t\u0282e\u026A\u032F',zhu:'t\u0282u',zhuan:'t\u0282u\u032Fan',zhuai:'t\u0282u\u032Fa\u026A\u032F',zhui:'t\u0282u\u032Fe\u026A\u032F',zhua:'t\u0282u\u032F\u0251',zhuo:'t\u0282u\u032F\u0254',zhun:'t\u0282u\u032F\u0259n',zha:'t\u0282\u0251',zhang:'t\u0282\u0251\u014B',zhao:'t\u0282\u0251\u028A\u032F',zhen:'t\u0282\u0259n',zheng:'t\u0282\u0259\u014B',zhou:'t\u0282\u0264\u028A\u032F',zhe:'t\u0282\u026F\u032F\u028C',zhi:'t\u0282\u0285',zhong:'t\u0282\u028A\u014B',chan:'t\u0282\u02B0an',chai:'t\u0282\u02B0a\u026A\u032F',chu:'t\u0282\u02B0u',chuan:'t\u0282\u02B0u\u032Fan',chuai:'t\u0282\u02B0u\u032Fa\u026A\u032F',chui:'t\u0282\u02B0u\u032Fe\u026A\u032F',chua:'t\u0282\u02B0u\u032F\u0251',chuang:'t\u0282\u02B0u\u032F\u0251\u014B',chuo:'t\u0282\u02B0u\u032F\u0254',chun:'t\u0282\u02B0u\u032F\u0259n',cha:'t\u0282\u02B0\u0251',chang:'t\u0282\u02B0\u0251\u014B',chao:'t\u0282\u02B0\u0251\u028A\u032F',chen:'t\u0282\u02B0\u0259n',cheng:'t\u0282\u02B0\u0259\u014B',chou:'t\u0282\u02B0\u0264\u028A\u032F',che:'t\u0282\u02B0\u026F\u032F\u028C',chi:'t\u0282\u02B0\u0285',chong:'t\u0282\u02B0\u028A\u014B',zhuang:'t\u0282\u032Fu\u032F\u0251\u014B',dong:'t\u028A\u014B',tan:'t\u02B0an',tai:'t\u02B0a\u026A\u032F',ti:'t\u02B0i',ting:'t\u02B0i\u014B',tie:'t\u02B0i\u025B',tian:'t\u02B0i\u025Bn',tiao:'t\u02B0i\u032F\u0251\u028A\u032F',tu:'t\u02B0u',tuan:'t\u02B0u\u032Fan',tui:'t\u02B0u\u032Fe\u026A\u032F',tuo:'t\u02B0u\u032F\u0254',tun:'t\u02B0u\u032F\u0259n',ta:'t\u02B0\u0251',tang:'t\u02B0\u0251\u014B',tao:'t\u02B0\u0251\u028A\u032F',teng:'t\u02B0\u0259\u014B',tou:'t\u02B0\u0264\u028A\u032F',te:'t\u02B0\u026F\u032F\u028C',tong:'t\u02B0\u028A\u014B',wu:'u',wan:'u\u032Fan',wai:'u\u032Fa\u026A\u032F',wei:'u\u032Fe\u026A\u032F',wa:'u\u032F\u0251',wang:'u\u032F\u0251\u014B',wo:'u\u032F\u0254',wen:'u\u032F\u0259n',weng:'u\u032F\u0259\u014B',han:'xan',hai:'xa\u026A\u032F',hei:'xe\u026A\u032F',hu:'xu',huan:'xu\u032Fan',huai:'xu\u032Fa\u026A\u032F',hui:'xu\u032Fe\u026A\u032F',hua:'xu\u032F\u0251',huang:'xu\u032F\u0251\u014B',huo:'xu\u032F\u0254',hun:'xu\u032F\u0259n',ha:'x\u0251',hang:'x\u0251\u014B',hao:'x\u0251\u028A\u032F',hen:'x\u0259n',heng:'x\u0259\u014B',hou:'x\u0264\u028A\u032F',he:'x\u026F\u032F\u028C',hong:'x\u028A\u014B',yu:'y',yun:'yn',yue:'y\u032F\u0153',yuan:'y\u032F\u025Bn',a:'\u0251',ang:'\u0251\u014B',er:'\u0251\u027B',ao:'\u0251\u028A\u032F',o:'\u0254',xi:'\u0255i',xin:'\u0255in',xing:'\u0255i\u014B',xie:'\u0255i\u025B',xian:'\u0255i\u025Bn',xia:'\u0255i\u032F\u0251',xiang:'\u0255i\u032F\u0251\u014B',xiao:'\u0255i\u032F\u0251\u028A\u032F',xiu:'\u0255i\u032F\u0264\u028A\u032F',xiong:'\u0255i\u032F\u028A\u014B',xu:'\u0255y',xun:'\u0255yn',xue:'\u0255y\u032F\u0153',xuan:'\u0255y\u032F\u025Bn',en:'\u0259n',eng:'\u0259\u014B',ou:'\u0264\u028A\u032F',e:'\u026F\u032F\u028C',shan:'\u0282an',shai:'\u0282a\u026A\u032F',shei:'\u0282e\u026A\u032F',shu:'\u0282u',shuan:'\u0282u\u032Fan',shuai:'\u0282u\u032Fa\u026A\u032F',shui:'\u0282u\u032Fe\u026A\u032F',shua:'\u0282u\u032F\u0251',shuang:'\u0282u\u032F\u0251\u014B',shuo:'\u0282u\u032F\u0254',shun:'\u0282u\u032F\u0259n',sha:'\u0282\u0251',shang:'\u0282\u0251\u014B',shao:'\u0282\u0251\u028A\u032F',shen:'\u0282\u0259n',sheng:'\u0282\u0259\u014B',shou:'\u0282\u0264\u028A\u032F',she:'\u0282\u026F\u032F\u028C',shi:'\u0282\u0285',ran:'\u0290an',ru:'\u0290u',ruan:'\u0290u\u032Fan',rui:'\u0290u\u032Fe\u026A\u032F',rua:'\u0290u\u032F\u0251',ruo:'\u0290u\u032F\u0254',run:'\u0290u\u032F\u0259n',rang:'\u0290\u0251\u014B',rao:'\u0290\u0251\u028A\u032F',ren:'\u0290\u0259n',reng:'\u0290\u0259\u014B',rou:'\u0290\u0264\u028A\u032F',re:'\u0290\u026F\u032F\u028C',ri:'\u0290\u0285',rong:'\u0290\u028A\u014B'},defaultOptions={method:'default',toneMarker:'number',markNeutral:!1,superscript:!1,filterUnknown:!0},toneReps={number:['1','2','3','4','5'],numberSuperscript:['\xB9','\xB2','\xB3','\u2074','\u2075'],chaonumber:['55','35','214','51',''],chaonumberSuperscript:['\u2075\u2075','\xB3\u2075','\xB2\xB9\u2074','\u2075\xB9',''],chaoletter:['\u02E5','\u02E7\u02E5','\u02E8\u02E9\u02E6','\u02E5\u02E9','']},pinyinRegEx=/^(((miu|[pm]ou|[bpm](o|e(i|ng?)?|a(ng?|i|o)?|i(e|ng?|a[no])?|u))|(f(ou?|[ae](ng?|i)?|u))|(d(e(i|ng?)|i(a[on]?|u))|[dt](a(i|ng?|o)?|e(i|ng)?|i(a[on]?|e|ng|u)?|o(ng?|u)|u(o|i|an?|n)?))|(neng?|[ln](a(i|ng?|o)?|e(i|ng)?|i(ang|a[on]?|e|ng?|u)?|o(ng?|u)|u(o|i|an?|n)?|ve?))|([ghk](a(i|ng?|o)?|e(i|ng?)?|o(u|ng)|u(a(i|ng?)?|i|n|o)?))|(zh?ei|[cz]h?(e(ng?)?|o(ng?|u)?|ao|u?a(i|ng?)?|u?(o|i|n)?))|(song|shua(i|ng?)?|shei|sh?(a(i|ng?|o)?|en?g?|ou|u(a?n|o|i)?|i))|(r([ae]ng?|i|e|ao|ou|ong|u[oin]|ua?n?))|([jqx](i(a(o|ng?)?|[eu]|ong|ng?)?|u(e|a?n)?))|((a(i|o|ng?)?|ou?|e(i|ng?|r)?))|(w(a(i|ng?)?|o|e(i|ng?)?|u))|y(a(o|ng?)?|e|in?g?|o(u|ng)?|u(e|a?n)?))[0-5]?)+$/i;function removeDiacritics(a){return a.replace(/[āáǎăà]/ig,'a').replace(/[ēéěěĕè]/ig,'e').replace(/[īíǐĭì]/ig,'i').replace(/[ōóǒŏò]/ig,'o').replace(/[ūúǔŭù]/ig,'u').replace(/([ǖǘǚǚü̆ǜv̄v́v̆v̌v̀]|[ūúǔŭù]:)/ig,'\xFC')}function numberifyTones(a){var b=a;return /\d$/.test(b)?b:(b+=/[āēīōūǖv̄]/.test(b)?'1':/[áéíóúǘv́]/.test(b)?'2':/[ǎăěĕǐĭǒŏǔŭǚǚü̆v̆v̌]/.test(b)?'3':/[àèìòùǜv̀]/.test(b)?'4':'5',removeDiacritics(b))}function isNumberPinYin(a){var b=a;return b=b.replace(/\r?\n/g,''),pinyinRegEx.test(b)}function isPinYin(a){var b=a;return b=removeDiacritics(b.replace(/\r?\n/g,'')),pinyinRegEx.test(b)}function pinyinWord2IPA(a,b,c,d){var e=a;if('#~linebreak~#'===e)return'\n';if(parseInt(e,10)===e)return e;if(!isNumberPinYin(e)){var f=(0,_pinyinSeparate2.default)(e),g=[];if(1