mode-yaml-68927591.js 5.5 KB

1
  1. import{g as S}from"./index-d7fba904.js";function M(m,v){for(var a=0;a<v.length;a++){const d=v[a];if(typeof d!="string"&&!Array.isArray(d)){for(const h in d)if(h!=="default"&&!(h in m)){const c=Object.getOwnPropertyDescriptor(d,h);c&&Object.defineProperty(m,h,c.get?c:{enumerable:!0,get:()=>d[h]})}}}return Object.freeze(Object.defineProperty(m,Symbol.toStringTag,{value:"Module"}))}var $={exports:{}};(function(m,v){ace.define("ace/mode/yaml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(a,d,h){var c=a("../lib/oop"),s=a("./text_highlight_rules").TextHighlightRules,g=function(){this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"list.markup",regex:/^(?:-{3}|\.{3})\s*(?=#|$)/},{token:"list.markup",regex:/^\s*[\-?](?:$|\s)/},{token:"constant",regex:"!![\\w//]+"},{token:"constant.language",regex:"[&\\*][a-zA-Z0-9-_]+"},{token:["meta.tag","keyword"],regex:/^(\s*\w[^\s:]*?)(:(?=\s|$))/},{token:["meta.tag","keyword"],regex:/(\w[^\s:]*?)(\s*:(?=\s|$))/},{token:"keyword.operator",regex:"<<\\w*:\\w*"},{token:"keyword.operator",regex:"-\\s*(?=[{])"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:/[|>][-+\d]*(?:$|\s+(?:$|#))/,onMatch:function(i,n,o,e){e=e.replace(/ #.*/,"");var r=/^ *((:\s*)?-(\s*[^|>])?)?/.exec(e)[0].replace(/\S\s*$/,"").length,t=parseInt(/\d+[\s+-]*$/.exec(e));return t?(r+=t-1,this.next="mlString"):this.next="mlStringPre",o.length?(o[0]=this.next,o[1]=r):(o.push(this.next),o.push(r)),this.token},next:"mlString"},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"constant.numeric",regex:/(\b|[+\-\.])[\d_]+(?:(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)(?=[^\d-\w]|$)$/},{token:"constant.numeric",regex:/[+\-]?\.inf\b|NaN\b|0x[\dA-Fa-f_]+|0b[10_]+/},{token:"constant.language.boolean",regex:"\\b(?:true|false|TRUE|FALSE|True|False|yes|no)\\b"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:/[^\s,:\[\]\{\}]+/}],mlStringPre:[{token:"indent",regex:/^ *$/},{token:"indent",regex:/^ */,onMatch:function(i,n,o){var e=o[1];return e>=i.length?(this.next="start",o.shift(),o.shift()):(o[1]=i.length-1,this.next=o[0]="mlString"),this.token},next:"mlString"},{defaultToken:"string"}],mlString:[{token:"indent",regex:/^ *$/},{token:"indent",regex:/^ */,onMatch:function(i,n,o){var e=o[1];return e>=i.length?(this.next="start",o.splice(0)):this.next="mlString",this.token},next:"mlString"},{token:"string",regex:".+"}]},this.normalizeRules()};c.inherits(g,s),d.YamlHighlightRules=g}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(a,d,h){var c=a("../range").Range,s=function(){};(function(){this.checkOutdent=function(g,i){return/^\s+$/.test(g)?/^\s*\}/.test(i):!1},this.autoOutdent=function(g,i){var n=g.getLine(i),o=n.match(/^(\s*\})/);if(!o)return 0;var e=o[1].length,r=g.findMatchingBracket({row:i,column:e});if(!r||r.row==i)return 0;var t=this.$getIndent(g.getLine(r.row));g.replace(new c(i,0,i,e-1),t)},this.$getIndent=function(g){return g.match(/^\s*/)[0]}}).call(s.prototype),d.MatchingBraceOutdent=s}),ace.define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(a,d,h){var c=a("../../lib/oop"),s=a("./fold_mode").FoldMode,g=a("../../range").Range,i=d.FoldMode=function(){};c.inherits(i,s),function(){this.getFoldWidgetRange=function(n,o,e){var r=this.indentationBlock(n,e);if(r)return r;var t=/\S/,l=n.getLine(e),f=l.search(t);if(!(f==-1||l[f]!="#")){for(var u=l.length,x=n.getLength(),k=e,p=e;++e<x;){l=n.getLine(e);var _=l.search(t);if(_!=-1){if(l[_]!="#")break;p=e}}if(p>k){var y=n.getLine(p).length;return new g(k,u,p,y)}}},this.getFoldWidget=function(n,o,e){var r=n.getLine(e),t=r.search(/\S/),l=n.getLine(e+1),f=n.getLine(e-1),u=f.search(/\S/),x=l.search(/\S/);if(t==-1)return n.foldWidgets[e-1]=u!=-1&&u<x?"start":"","";if(u==-1){if(t==x&&r[t]=="#"&&l[t]=="#")return n.foldWidgets[e-1]="",n.foldWidgets[e+1]="","start"}else if(u==t&&r[t]=="#"&&f[t]=="#"&&n.getLine(e-2).search(/\S/)==-1)return n.foldWidgets[e-1]="start",n.foldWidgets[e+1]="","";return u!=-1&&u<t?n.foldWidgets[e-1]="start":n.foldWidgets[e-1]="",t<x?"start":""}}.call(i.prototype)}),ace.define("ace/mode/yaml",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/yaml_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/coffee","ace/worker/worker_client"],function(a,d,h){var c=a("../lib/oop"),s=a("./text").Mode,g=a("./yaml_highlight_rules").YamlHighlightRules,i=a("./matching_brace_outdent").MatchingBraceOutdent,n=a("./folding/coffee").FoldMode,o=a("../worker/worker_client").WorkerClient,e=function(){this.HighlightRules=g,this.$outdent=new i,this.foldingRules=new n,this.$behaviour=this.$defaultBehaviour};c.inherits(e,s),function(){this.lineCommentStart=["#"],this.getNextLineIndent=function(r,t,l){var f=this.$getIndent(t);if(r=="start"){var u=t.match(/^.*[\{\(\[]\s*$/);u&&(f+=l)}return f},this.checkOutdent=function(r,t,l){return this.$outdent.checkOutdent(t,l)},this.autoOutdent=function(r,t,l){this.$outdent.autoOutdent(t,l)},this.createWorker=function(r){var t=new o(["ace"],"ace/mode/yaml_worker","YamlWorker");return t.attachToDocument(r.getDocument()),t.on("annotate",function(l){r.setAnnotations(l.data)}),t.on("terminate",function(){r.clearAnnotations()}),t},this.$id="ace/mode/yaml"}.call(e.prototype),d.Mode=e}),function(){ace.require(["ace/mode/yaml"],function(a){m&&(m.exports=a)})}()})($);var b=$.exports;const R=S(b),L=M({__proto__:null,default:R},[b]);export{L as m};