var atoms=["exten","same","include","ignorepat","switch"],dpcmd=["#include","#exec"],apps=["addqueuemember","adsiprog","aelsub","agentlogin","agentmonitoroutgoing","agi","alarmreceiver","amd","answer","authenticate","background","backgrounddetect","bridge","busy","callcompletioncancel","callcompletionrequest","celgenuserevent","changemonitor","chanisavail","channelredirect","chanspy","clearhash","confbridge","congestion","continuewhile","controlplayback","dahdiacceptr2call","dahdibarge","dahdiras","dahdiscan","dahdisendcallreroutingfacility","dahdisendkeypadfacility","datetime","dbdel","dbdeltree","deadagi","dial","dictate","directory","disa","dumpchan","eagi","echo","endwhile","exec","execif","execiftime","exitwhile","extenspy","externalivr","festival","flash","followme","forkcdr","getcpeid","gosub","gosubif","goto","gotoif","gotoiftime","hangup","iax2provision","ices","importvar","incomplete","ivrdemo","jabberjoin","jabberleave","jabbersend","jabbersendgroup","jabberstatus","jack","log","macro","macroexclusive","macroexit","macroif","mailboxexists","meetme","meetmeadmin","meetmechanneladmin","meetmecount","milliwatt","minivmaccmess","minivmdelete","minivmgreet","minivmmwi","minivmnotify","minivmrecord","mixmonitor","monitor","morsecode","mp3player","mset","musiconhold","nbscat","nocdr","noop","odbc","odbc","odbcfinish","originate","ospauth","ospfinish","osplookup","ospnext","page","park","parkandannounce","parkedcall","pausemonitor","pausequeuemember","pickup","pickupchan","playback","playtones","privacymanager","proceeding","progress","queue","queuelog","raiseexception","read","readexten","readfile","receivefax","receivefax","receivefax","record","removequeuemember","resetcdr","retrydial","return","ringing","sayalpha","saycountedadj","saycountednoun","saycountpl","saydigits","saynumber","sayphonetic","sayunixtime","senddtmf","sendfax","sendfax","sendfax","sendimage","sendtext","sendurl","set","setamaflags","setcallerpres","setmusiconhold","sipaddheader","sipdtmfmode","sipremoveheader","skel","slastation","slatrunk","sms","softhangup","speechactivategrammar","speechbackground","speechcreate","speechdeactivategrammar","speechdestroy","speechloadgrammar","speechprocessingsound","speechstart","speechunloadgrammar","stackpop","startmusiconhold","stopmixmonitor","stopmonitor","stopmusiconhold","stopplaytones","system","testclient","testserver","transfer","tryexec","trysystem","unpausemonitor","unpausequeuemember","userevent","verbose","vmauthenticate","vmsayname","voicemail","voicemailmain","wait","waitexten","waitfornoise","waitforring","waitforsilence","waitmusiconhold","waituntil","while","zapateller"];const asterisk={name:"asterisk",startState:function(){return{blockComment:!1,extenStart:!1,extenSame:!1,extenInclude:!1,extenExten:!1,extenPriority:!1,extenApplication:!1}},token:function(stream,state){var cur="";return stream.eatSpace()?null:state.extenStart?(stream.eatWhile(/[^\s]/),cur=stream.current(),/^=>?$/.test(cur)?(state.extenExten=!0,state.extenStart=!1,"strong"):(state.extenStart=!1,stream.skipToEnd(),"error")):state.extenExten?(state.extenExten=!1,state.extenPriority=!0,stream.eatWhile(/[^,]/),state.extenInclude&&(stream.skipToEnd(),state.extenPriority=!1,state.extenInclude=!1),state.extenSame&&(state.extenPriority=!1,state.extenSame=!1,state.extenApplication=!0),"tag"):state.extenPriority?(state.extenPriority=!1,state.extenApplication=!0,stream.next(),state.extenSame?null:(stream.eatWhile(/[^,]/),"number")):state.extenApplication?(stream.eatWhile(/,/),","===(cur=stream.current())?null:(stream.eatWhile(/\w/),cur=stream.current().toLowerCase(),state.extenApplication=!1,-1!==apps.indexOf(cur)?"def":null)):function(stream,state){var cur="",ch=stream.next();if(state.blockComment)return"-"==ch&&stream.match("-;",!0)?state.blockComment=!1:stream.skipTo("--;")?(stream.next(),stream.next(),stream.next(),state.blockComment=!1):stream.skipToEnd(),"comment";if(";"==ch)return stream.match("--",!0)&&!stream.match("-",!1)?(state.blockComment=!0,"comment"):(stream.skipToEnd(),"comment");if("["==ch)return stream.skipTo("]"),stream.eat("]"),"header";if('"'==ch)return stream.skipTo('"'),"string";if("'"==ch)return stream.skipTo("'"),"string.special";if("#"==ch&&(stream.eatWhile(/\w/),cur=stream.current(),-1!==dpcmd.indexOf(cur)))return stream.skipToEnd(),"strong";if("$"==ch&&"{"==stream.peek())return stream.skipTo("}"),stream.eat("}"),"variableName.special";if(stream.eatWhile(/\w/),cur=stream.current(),-1!==atoms.indexOf(cur)){switch(state.extenStart=!0,cur){case"same":state.extenSame=!0;break;case"include":case"switch":case"ignorepat":state.extenInclude=!0}return"atom"}}(stream,state)},languageData:{commentTokens:{line:";",block:{open:";--",close:"--;"}}}};export{asterisk};
