import{S as a}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 l={};function c(t,n){for(var e=0;e<n.length;e++)l[n[e]]=t}var s=["true","false"],k=["if","then","do","else","elif","while","until","for","in","esac","fi","fin","fil","done","exit","set","unset","export","function"],m=["ab","awk","bash","beep","cat","cc","cd","chown","chmod","chroot","clear","cp","curl","cut","diff","echo","find","gawk","gcc","get","git","grep","hg","kill","killall","ln","ls","make","mkdir","openssl","mv","nc","nl","node","npm","ping","ps","restart","rm","rmdir","sed","service","sh","shopt","shred","source","sort","sleep","ssh","start","stop","su","sudo","svn","tee","telnet","top","touch","vi","vim","wall","wc","wget","who","write","yes","zsh"];c("atom",s);c("keyword",k);c("builtin",m);function d(t,n){if(t.eatSpace())return null;var e=t.sol(),r=t.next();if(r==="\\")return t.next(),null;if(r==="'"||r==='"'||r==="`")return n.tokens.unshift(u(r,r==="`"?"quote":"string")),f(t,n);if(r==="#")return e&&t.eat("!")?(t.skipToEnd(),"meta"):(t.skipToEnd(),"comment");if(r==="$")return n.tokens.unshift(h),f(t,n);if(r==="+"||r==="=")return"operator";if(r==="-")return t.eat("-"),t.eatWhile(/\w/),"attribute";if(r=="<"){if(t.match("<<"))return"operator";var o=t.match(/^<-?\s*['"]?([^'"]*)['"]?/);if(o)return n.tokens.unshift(w(o[1])),"string.special"}if(/\d/.test(r)&&(t.eatWhile(/\d/),t.eol()||!/\w/.test(t.peek())))return"number";t.eatWhile(/[\w-]/);var i=t.current();return t.peek()==="="&&/\w+/.test(i)?"def":l.hasOwnProperty(i)?l[i]:null}function u(t,n){var e=t=="("?")":t=="{"?"}":t;return function(r,o){for(var i,p=!1;(i=r.next())!=null;){if(i===e&&!p){o.tokens.shift();break}else if(i==="$"&&!p&&t!=="'"&&r.peek()!=e){p=!0,r.backUp(1),o.tokens.unshift(h);break}else{if(!p&&t!==e&&i===t)return o.tokens.unshift(u(t,n)),f(r,o);if(!p&&/['"]/.test(i)&&!/['"]/.test(t)){o.tokens.unshift(g(i,"string")),r.backUp(1);break}}p=!p&&i==="\\"}return n}}function g(t,n){return function(e,r){return r.tokens[0]=u(t,n),e.next(),f(e,r)}}var h=function(t,n){n.tokens.length>1&&t.eat("$");var e=t.next();return/['"({]/.test(e)?(n.tokens[0]=u(e,e=="("?"quote":e=="{"?"def":"string"),f(t,n)):(/\d/.test(e)||t.eatWhile(/\w/),n.tokens.shift(),"def")};function w(t){return function(n,e){return n.sol()&&n.string==t&&e.tokens.shift(),n.skipToEnd(),"string.special"}}function f(t,n){return(n.tokens[0]||d)(t,n)}const v={name:"shell",startState:function(){return{tokens:[]}},token:function(t,n){return f(t,n)},languageData:{autocomplete:s.concat(k,m),closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"#"}}};function et(){return a.define(v)}export{et as default};
