function e(e){return{name:`mscgen`,startState:o,copyState:s,token:c(e),languageData:{commentTokens:{line:`#`,block:{open:`/*`,close:`*/`}}}}}var t=e({keywords:[`msc`],options:[`hscale`,`width`,`arcgradient`,`wordwraparcs`],constants:[`true`,`false`,`on`,`off`],attributes:[`label`,`idurl`,`id`,`url`,`linecolor`,`linecolour`,`textcolor`,`textcolour`,`textbgcolor`,`textbgcolour`,`arclinecolor`,`arclinecolour`,`arctextcolor`,`arctextcolour`,`arctextbgcolor`,`arctextbgcolour`,`arcskip`],brackets:[`\\{`,`\\}`],arcsWords:[`note`,`abox`,`rbox`,`box`],arcsOthers:[`\\|\\|\\|`,`\\.\\.\\.`,`---`,`--`,`<->`,`==`,`<<=>>`,`<=>`,`\\.\\.`,`<<>>`,`::`,`<:>`,`->`,`=>>`,`=>`,`>>`,`:>`,`<-`,`<<=`,`<=`,`<<`,`<:`,`x-`,`-x`],singlecomment:[`//`,`#`],operators:[`=`]}),n=e({keywords:null,options:[`hscale`,`width`,`arcgradient`,`wordwraparcs`,`wordwrapentities`,`watermark`],constants:[`true`,`false`,`on`,`off`,`auto`],attributes:null,brackets:[`\\{`,`\\}`],arcsWords:[`note`,`abox`,`rbox`,`box`,`alt`,`else`,`opt`,`break`,`par`,`seq`,`strict`,`neg`,`critical`,`ignore`,`consider`,`assert`,`loop`,`ref`,`exc`],arcsOthers:[`\\|\\|\\|`,`\\.\\.\\.`,`---`,`--`,`<->`,`==`,`<<=>>`,`<=>`,`\\.\\.`,`<<>>`,`::`,`<:>`,`->`,`=>>`,`=>`,`>>`,`:>`,`<-`,`<<=`,`<=`,`<<`,`<:`,`x-`,`-x`],singlecomment:[`//`,`#`],operators:[`=`]}),r=e({keywords:[`msc`,`xu`],options:[`hscale`,`width`,`arcgradient`,`wordwraparcs`,`wordwrapentities`,`watermark`],constants:[`true`,`false`,`on`,`off`,`auto`],attributes:[`label`,`idurl`,`id`,`url`,`linecolor`,`linecolour`,`textcolor`,`textcolour`,`textbgcolor`,`textbgcolour`,`arclinecolor`,`arclinecolour`,`arctextcolor`,`arctextcolour`,`arctextbgcolor`,`arctextbgcolour`,`arcskip`,`title`,`deactivate`,`activate`,`activation`],brackets:[`\\{`,`\\}`],arcsWords:[`note`,`abox`,`rbox`,`box`,`alt`,`else`,`opt`,`break`,`par`,`seq`,`strict`,`neg`,`critical`,`ignore`,`consider`,`assert`,`loop`,`ref`,`exc`],arcsOthers:[`\\|\\|\\|`,`\\.\\.\\.`,`---`,`--`,`<->`,`==`,`<<=>>`,`<=>`,`\\.\\.`,`<<>>`,`::`,`<:>`,`->`,`=>>`,`=>`,`>>`,`:>`,`<-`,`<<=`,`<=`,`<<`,`<:`,`x-`,`-x`],singlecomment:[`//`,`#`],operators:[`=`]});function i(e){return RegExp(`^\\b(`+e.join(`|`)+`)\\b`,`i`)}function a(e){return RegExp(`^(?:`+e.join(`|`)+`)`,`i`)}function o(){return{inComment:!1,inString:!1,inAttributeList:!1,inScript:!1}}function s(e){return{inComment:e.inComment,inString:e.inString,inAttributeList:e.inAttributeList,inScript:e.inScript}}function c(e){return function(t,n){if(t.match(a(e.brackets),!0,!0))return`bracket`;if(!n.inComment){if(t.match(/\/\*[^\*\/]*/,!0,!0))return n.inComment=!0,`comment`;if(t.match(a(e.singlecomment),!0,!0))return t.skipToEnd(),`comment`}if(n.inComment)return t.match(/[^\*\/]*\*\//,!0,!0)?n.inComment=!1:t.skipToEnd(),`comment`;if(!n.inString&&t.match(/\"(\\\"|[^\"])*/,!0,!0))return n.inString=!0,`string`;if(n.inString)return t.match(/[^\"]*\"/,!0,!0)?n.inString=!1:t.skipToEnd(),`string`;if(e.keywords&&t.match(i(e.keywords),!0,!0)||t.match(i(e.options),!0,!0)||t.match(i(e.arcsWords),!0,!0)||t.match(a(e.arcsOthers),!0,!0))return`keyword`;if(e.operators&&t.match(a(e.operators),!0,!0))return`operator`;if(e.constants&&t.match(a(e.constants),!0,!0))return`variable`;if(!e.inAttributeList&&e.attributes&&t.match(`[`,!0,!0))return e.inAttributeList=!0,`bracket`;if(e.inAttributeList){if(e.attributes!==null&&t.match(i(e.attributes),!0,!0))return`attribute`;if(t.match(`]`,!0,!0))return e.inAttributeList=!1,`bracket`}return t.next(),null}}export{t as mscgen,n as msgenny,r as xu};