function a(e){var t=e.match(/^\s*\S/);return e.skipToEnd(),t?"error":null}const o={name:"asciiarmor",token:function(e,t){var r;if(t.state=="top")return e.sol()&&(r=e.match(/^-----BEGIN (.*)?-----\s*$/))?(t.state="headers",t.type=r[1],"tag"):a(e);if(t.state=="headers"){if(e.sol()&&e.match(/^\w+:/))return t.state="header","atom";var s=a(e);return s&&(t.state="body"),s}else{if(t.state=="header")return e.skipToEnd(),t.state="headers","string";if(t.state=="body")return e.sol()&&(r=e.match(/^-----END (.*)?-----\s*$/))?r[1]==t.type?(t.state="end","tag"):"error":e.eatWhile(/[A-Za-z0-9+\/=]/)?null:(e.next(),"error");if(t.state=="end")return a(e)}},blankLine:function(e){e.state=="headers"&&(e.state="body")},startState:function(){return{state:"top",type:null}}};export{o as t};
