"use strict";function _export(e,t){for(var i in t)Object.defineProperty(e,i,{enumerable:!0,get:t[i]})}Object.defineProperty(exports,"__esModule",{value:!0}),_export(exports,{language:function(){return language},stemmer:function(){return stemmer}});let step2List={ational:"ate",tional:"tion",enci:"ence",anci:"ance",izer:"ize",bli:"ble",alli:"al",entli:"ent",eli:"e",ousli:"ous",ization:"ize",ation:"ate",ator:"ate",alism:"al",iveness:"ive",fulness:"ful",ousness:"ous",aliti:"al",iviti:"ive",biliti:"ble",logi:"log"},step3List={icate:"ic",ative:"",alize:"al",iciti:"ic",ical:"ic",ful:"",ness:""},c="[^aeiou]",v="[aeiouy]",C="[^aeiou][^aeiouy]*",V=v+"[aeiou]*",mgr0="^("+C+")?"+V+C,meq1="^("+C+")?"+V+C+"("+V+")?$",mgr1="^("+C+")?"+V+C+V+C,s_v="^("+C+")?"+v;function stemmer(e){let t,i,s,l,n,a;if(e.length<3)return e;let r=e.substring(0,1);if("y"==r&&(e=r.toUpperCase()+e.substring(1)),l=/^(.+?)([^s])s$/,(s=/^(.+?)(ss|i)es$/).test(e)?e=e.replace(s,"$1$2"):l.test(e)&&(e=e.replace(l,"$1$2")),l=/^(.+?)(ed|ing)$/,(s=/^(.+?)eed$/).test(e)){let t=s.exec(e);(s=new RegExp(mgr0)).test(t[1])&&(s=/.$/,e=e.replace(s,""))}else l.test(e)&&(t=l.exec(e)[1],(l=new RegExp(s_v)).test(t)&&(e=t,l=/(at|bl|iz)$/,n=RegExp("([^aeiouylsz])\\1$"),a=RegExp("^"+C+v+"[^aeiouwxy]$"),l.test(e)?e+="e":n.test(e)?(s=/.$/,e=e.replace(s,"")):a.test(e)&&(e+="e")));if((s=/^(.+?)y$/).test(e)){let i=s.exec(e);t=i?.[1],s=new RegExp(s_v),t&&s.test(t)&&(e=t+"i")}if((s=/^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/).test(e)){let l=s.exec(e);t=l?.[1],i=l?.[2],s=new RegExp(mgr0),t&&s.test(t)&&(e=t+step2List[i])}if((s=/^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/).test(e)){let l=s.exec(e);t=l?.[1],i=l?.[2],s=new RegExp(mgr0),t&&s.test(t)&&(e=t+step3List[i])}if(l=/^(.+?)(s|t)(ion)$/,(s=/^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/).test(e)){let i=s.exec(e);t=i?.[1],s=new RegExp(mgr1),t&&s.test(t)&&(e=t)}else if(l.test(e)){let i=l.exec(e);t=i?.[1]??""+i?.[2]??"",(l=new RegExp(mgr1)).test(t)&&(e=t)}if((s=/^(.+?)e$/).test(e)){let i=s.exec(e);t=i?.[1],s=new RegExp(mgr1),l=new RegExp(meq1),n=RegExp("^"+C+v+"[^aeiouwxy]$"),t&&(s.test(t)||l.test(t)&&!n.test(t))&&(e=t)}return s=/ll$/,l=new RegExp(mgr1),s.test(e)&&l.test(e)&&(s=/.$/,e=e.replace(s,"")),"y"==r&&(e=r.toLowerCase()+e.substring(1)),e}let language="english";