import{S as d}from"./TextViewer-a959e5a3.js";import"./useSetting-bf1f702c.js";import"./index-25eb6331.js";import"./file-5139c625.js";import"./request-14d7fed5.js";import"./index-3bef6acb.js";import"./path-8ad564a3.js";import"./base-00eb0fe9.js";/* empty css                */import"./dialog-66decf59.js";import"./index-db57f3ab.js";import"./vnode-761469ca.js";import"./scroll-044a6ede.js";import"./button-c2afb424.js";import"./overlay-25bb32bf.js";import"./refs-e3c707bd.js";/* empty css                     *//* empty css               *//* empty css                  */import"./dropdown-item-13559a59.js";import"./index-51e1cffc.js";import"./index-b7ba0c9a.js";import"./dropdown-8894c5a8.js";import"./index-0746525e.js";import"./_initCloneObject-55db8b76.js";import"./_plugin-vue_export-helper-c27b6911.js";import"./directive-77ef4fb1.js";import"./index-98eb1092.js";import"./validator-551b2058.js";import"./index-02f3ff91.js";import"./index-1c392315.js";import"./index-73ac7f16.js";import"./strings-59e484a0.js";import"./debounce-8de7dc13.js";import"./index-272fcf3f.js";import"./useFileUpload-914f2d00.js";import"./common-9cc21621.js";var s={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},x={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},c=/[+\-*&^%:=<>!|\/]/,i;function l(e,t){var r=e.next();if(r=='"'||r=="'"||r=="`")return t.tokenize=h(r),t.tokenize(e,t);if(/[\d\.]/.test(r))return r=="."?e.match(/^[0-9]+([eE][\-+]?[0-9]+)?/):r=="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(r))return i=r,null;if(r=="/"){if(e.eat("*"))return t.tokenize=f,f(e,t);if(e.eat("/"))return e.skipToEnd(),"comment"}if(c.test(r))return e.eatWhile(c),"operator";e.eatWhile(/[\w\$_\xa1-\uffff]/);var n=e.current();return s.propertyIsEnumerable(n)?((n=="case"||n=="default")&&(i="case"),"keyword"):x.propertyIsEnumerable(n)?"atom":"variable"}function h(e){return function(t,r){for(var n=!1,u,o=!1;(u=t.next())!=null;){if(u==e&&!n){o=!0;break}n=!n&&e!="`"&&u=="\\"}return(o||!(n||e=="`"))&&(r.tokenize=l),"string"}}function f(e,t){for(var r=!1,n;n=e.next();){if(n=="/"&&r){t.tokenize=l;break}r=n=="*"}return"comment"}function m(e,t,r,n,u){this.indented=e,this.column=t,this.type=r,this.align=n,this.prev=u}function p(e,t,r){return e.context=new m(e.indented,t,r,null,e.context)}function a(e){if(e.context.prev){var t=e.context.type;return(t==")"||t=="]"||t=="}")&&(e.indented=e.context.indented),e.context=e.context.prev}}const k={name:"go",startState:function(e){return{tokenize:null,context:new m(-e,0,"top",!1),indented:0,startOfLine:!0}},token:function(e,t){var r=t.context;if(e.sol()&&(r.align==null&&(r.align=!1),t.indented=e.indentation(),t.startOfLine=!0,r.type=="case"&&(r.type="}")),e.eatSpace())return null;i=null;var n=(t.tokenize||l)(e,t);return n=="comment"||(r.align==null&&(r.align=!0),i=="{"?p(t,e.column(),"}"):i=="["?p(t,e.column(),"]"):i=="("?p(t,e.column(),")"):i=="case"?r.type="case":(i=="}"&&r.type=="}"||i==r.type)&&a(t),t.startOfLine=!1),n},indent:function(e,t,r){if(e.tokenize!=l&&e.tokenize!=null)return null;var n=e.context,u=t&&t.charAt(0);if(n.type=="case"&&/^(?:case|default)\b/.test(t))return n.indented;var o=u==n.type;return n.align?n.column+(o?0:1):n.indented+(o?0:r.unit)},languageData:{indentOnInput:/^\s([{}]|case |default\s*:)$/,commentTokens:{line:"//",block:{open:"/*",close:"*/"}}}};function te(){return d.define(k)}export{te as default};
