| 109 | },W=Error();function Q(e,t,{key:a}){let n=0;const r=e[a],i={},s={} |
| 110 | ;for(let e=1;e<=t.length;e++)s[e+n]=r[e],i[e+n]=!0,n+=S(t[e-1]) |
| 111 | ;e[a]=s,e[a]._emit=i,e[a]._multi=!0}function K(e){(e=>{ |
| 112 | e.scope&&"object"==typeof e.scope&&null!==e.scope&&(e.beginScope=e.scope, |
| 113 | delete e.scope)})(e),"string"==typeof e.beginScope&&(e.beginScope={ |
| 114 | _wrap:e.beginScope}),"string"==typeof e.endScope&&(e.endScope={_wrap:e.endScope |
| 115 | }),(e=>{if(Array.isArray(e.begin)){ |
| 116 | if(e.skip||e.excludeBegin||e.returnBegin)throw q("skip, excludeBegin, returnBegin not compatible with beginScope: {}"), |
| 117 | W |
| 118 | ;if("object"!=typeof e.beginScope||null===e.beginScope)throw q("beginScope must be object"), |
| 119 | W;Q(e,e.begin,{key:"beginScope"}),e.begin=b(e.begin,{joinWith:""})}})(e),(e=>{ |
| 120 | if(Array.isArray(e.end)){ |
| 121 | if(e.skip||e.excludeEnd||e.returnEnd)throw q("skip, excludeEnd, returnEnd not compatible with endScope: {}"), |
| 122 | W |
| 123 | ;if("object"!=typeof e.endScope||null===e.endScope)throw q("endScope must be object"), |
| 124 | W;Q(e,e.end,{key:"endScope"}),e.end=b(e.end,{joinWith:""})}})(e)}function j(e){ |
| 125 | function t(t,a){ |
| 126 | return RegExp(d(t),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(a?"g":"")) |
| 127 | }class a{constructor(){ |