import{C as w}from"./index.991aca48.entry.js";function z(a,d){for(var u=0;u<d.length;u++){const l=d[u];if(typeof l!="string"&&!Array.isArray(l)){for(const o in l)if(o!=="default"&&!(o in a)){const f=Object.getOwnPropertyDescriptor(l,o);f&&Object.defineProperty(a,o,f.get?f:{enumerable:!0,get:()=>l[o]})}}}return Object.freeze(Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}))}var k={};(function(a,d){(function(u){u(w)})(function(u){u.defineMode("go",function(l){var o=l.indentUnit,f={break:!0,case:!0,chan:!0,const:!0,continue:!0,default:!0,defer:!0,else:!0,fallthrough:!0,for:!0,func:!0,go:!0,goto:!0,if:!0,import:!0,interface:!0,map:!0,package:!0,range:!0,return:!0,select:!0,struct:!0,switch:!0,type:!0,var:!0,bool:!0,byte:!0,complex64:!0,complex128:!0,float32:!0,float64:!0,int8:!0,int16:!0,int32:!0,int64:!0,string:!0,uint8:!0,uint16:!0,uint32:!0,uint64:!0,int:!0,uint:!0,uintptr:!0,error:!0,rune:!0,any:!0,comparable:!0},v={true:!0,false:!0,iota:!0,nil:!0,append:!0,cap:!0,close:!0,complex:!0,copy:!0,delete:!0,imag:!0,len:!0,make:!0,new:!0,panic:!0,print:!0,println:!0,real:!0,recover:!0},g=/[+\-*&^%:=<>!|\/]/,i;function p(e,n){var t=e.next();if(t=='"'||t=="'"||t=="`")return n.tokenize=b(t),n.tokenize(e,n);if(/[\d\.]/.test(t))return t=="."?e.match(/^[0-9]+([eE][\-+]?[0-9]+)?/):t=="0"?e.match(/^[xX][0-9a-fA-F]+/)||e.match(/^0[0-7]+/):e.match(/^[0-9]*\.?[0-9]*([eE][\-+]?[0-9]+)?/),"number";if(/[\[\]{}\(\),;\:\.]/.test(t))return i=t,null;if(t=="/"){if(e.eat("*"))return n.tokenize=x,x(e,n);if(e.eat("/"))return e.skipToEnd(),"comment"}if(g.test(t))return e.eatWhile(g),"operator";e.eatWhile(/[\w\$_\xa1-\uffff]/);var r=e.current();return f.propertyIsEnumerable(r)?((r=="case"||r=="default")&&(i="case"),"keyword"):v.propertyIsEnumerable(r)?"atom":"variable"}function b(e){return function(n,t){for(var r=!1,c,h=!1;(c=n.next())!=null;){if(c==e&&!r){h=!0;break}r=!r&&e!="`"&&c=="\\"}return(h||!(r||e=="`"))&&(t.tokenize=p),"string"}}function x(e,n){for(var t=!1,r;r=e.next();){if(r=="/"&&t){n.tokenize=p;break}t=r=="*"}return"comment"}function y(e,n,t,r,c){this.indented=e,this.column=n,this.type=t,this.align=r,this.prev=c}function s(e,n,t){return e.context=new y(e.indented,n,t,null,e.context)}function m(e){if(e.context.prev){var n=e.context.type;return(n==")"||n=="]"||n=="}")&&(e.indented=e.context.indented),e.context=e.context.prev}}return{startState:function(e){return{tokenize:null,context:new y((e||0)-o,0,"top",!1),indented:0,startOfLine:!0}},token:function(e,n){var t=n.context;if(e.sol()&&(t.align==null&&(t.align=!1),n.indented=e.indentation(),n.startOfLine=!0,t.type=="case"&&(t.type="}")),e.eatSpace())return null;i=null;var r=(n.tokenize||p)(e,n);return r=="comment"||(t.align==null&&(t.align=!0),i=="{"?s(n,e.column(),"}"):i=="["?s(n,e.column(),"]"):i=="("?s(n,e.column(),")"):i=="case"?t.type="case":(i=="}"&&t.type=="}"||i==t.type)&&m(n),n.startOfLine=!1),r},indent:function(e,n){if(e.tokenize!=p&&e.tokenize!=null)return u.Pass;var t=e.context,r=n&&n.charAt(0);if(t.type=="case"&&/^(?:case|default)\b/.test(n))return e.context.type="}",t.indented;var c=r==t.type;return t.align?t.column+(c?0:1):t.indented+(c?0:o)},electricChars:"{}):",closeBrackets:"()[]{}''\"\"``",fold:"brace",blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//"}}),u.defineMIME("text/x-go","go")})})();const C=z({__proto__:null,default:k},[k]);export{C as g};
