import{a as O,c as D}from"./chunk-VDJG7B3E.js";import"./chunk-SLIYHYWC.js";D();var w={angry:[">:(",">:-("],blush:[':")',':-")'],broken_heart:["</3","<\\3"],confused:[":/",":-/"],cry:[":'(",":'-(",":,(",":,-("],frowning:[":(",":-("],heart:["<3"],imp:["]:(","]:-("],innocent:["o:)","O:)","o:-)","O:-)","0:)","0:-)"],joy:[":')",":'-)",":,)",":,-)",":'D",":'-D",":,D",":,-D"],kissing:[":*",":-*"],laughing:["x-)","X-)"],neutral_face:[":|",":-|"],open_mouth:[":o",":-o",":O",":-O"],rage:[":@",":-@"],smile:[":D",":-D"],smiley:[":)",":-)"],smiling_imp:["]:)","]:-)"],sob:[":,'(",":,'-(",";(",";-("],stuck_out_tongue:[":P",":-P"],sunglasses:["8-)","B-)"],sweat:[",:(",",:-("],sweat_smile:[",:)",",:-)"],unamused:[":s",":-S",":z",":-Z",":$",":-$"],wink:[";)",";-)"]};function b(e,n){return e[n].content}function x(e,n,u,i,m){let _=e.utils.arrayReplaceAt,g=e.utils.lib.ucmicro,o=e.utils.has,r=new RegExp([g.Z.source,g.P.source,g.Cc.source].join("|"));function j(h,d,s){let l=0,p=[];if(h.replace(m,function(t,c,f){let a;if(o(u,t)){if(a=u[t],c>0&&!r.test(f[c-1])||c+t.length<f.length&&!r.test(f[c+t.length]))return}else a=t.slice(1,-1);if(c>l){let E=new s("text","",0);E.content=h.slice(l,c),p.push(E)}let k=new s("emoji","",0);k.markup=a,k.content=n[a],p.push(k),l=c+t.length}),l<h.length){let t=new s("text","",0);t.content=h.slice(l),p.push(t)}return p}return function(d){let s,l=d.tokens,p=0;for(let t=0,c=l.length;t<c;t++){if(l[t].type!=="inline")continue;let f=l[t].children;for(let a=f.length-1;a>=0;a--)s=f[a],(s.type==="link_open"||s.type==="link_close")&&s.info==="auto"&&(p-=s.nesting),s.type==="text"&&p===0&&i.test(s.content)&&(l[t].children=f=_(f,a,j(s.content,s.level,d.Token)))}}}function $(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function y(e){let n=e.defs;e.enabled.length&&(n=Object.keys(n).reduce((o,r)=>(e.enabled.indexOf(r)>=0&&(o[r]=n[r]),o),{}));let u=Object.keys(e.shortcuts).reduce((o,r)=>n[r]?Array.isArray(e.shortcuts[r])?(e.shortcuts[r].forEach(j=>{o[j]=r}),o):(o[e.shortcuts[r]]=r,o):o,{}),i=Object.keys(n),m;i.length===0?m="^$":m=i.map(o=>`:${o}:`).concat(Object.keys(u)).sort().reverse().map(o=>$(o)).join("|");let _=RegExp(m),g=RegExp(m,"g");return{defs:n,shortcuts:u,scanRE:_,replaceRE:g}}function R(e,n){let u={defs:{},shortcuts:{},enabled:[]},i=y(e.utils.assign({},u,n||{}));e.renderer.rules.emoji=b,e.core.ruler.after("linkify","emoji",x(e,i.defs,i.shortcuts,i.scanRE,i.replaceRE))}function v(e,n){let u={defs:O,shortcuts:w,enabled:[]},i=e.utils.assign({},u,n||{});R(e,i)}export{v as default};
/**i18n:aa38438cfc6bb6877c9985433629bf5f310ba8cfd6183982ad2c0c8f601d3935*/
//# sourceMappingURL=chunk-NPGILY65.js.map
