mode-apex-981c823f.js 8.6 KB

1
  1. import{g as R}from"./index-15e3682d.js";function b(f,k){for(var r=0;r<k.length;r++){const s=k[r];if(typeof s!="string"&&!Array.isArray(s)){for(const m in s)if(m!=="default"&&!(m in f)){const u=Object.getOwnPropertyDescriptor(s,m);u&&Object.defineProperty(f,m,u.get?u:{enumerable:!0,get:()=>s[m]})}}}return Object.freeze(Object.defineProperty(f,Symbol.toStringTag,{value:"Module"}))}var _={exports:{}};(function(f,k){ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(r,s,m){var u=r("../lib/oop"),h=r("./text_highlight_rules").TextHighlightRules,i=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},i.getTagRule(),{defaultToken:"comment.doc",caseInsensitive:!0}]}};u.inherits(i,h),i.getTagRule=function(c){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},i.getStartRule=function(c){return{token:"comment.doc",regex:"\\/\\*(?=\\*)",next:c}},i.getEndRule=function(c){return{token:"comment.doc",regex:"\\*\\/",next:c}},s.DocCommentHighlightRules=i}),ace.define("ace/mode/apex_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules","ace/mode/doc_comment_highlight_rules"],function(r,s,m){var u=r("../lib/oop"),h=r("../mode/text_highlight_rules").TextHighlightRules,i=r("../mode/doc_comment_highlight_rules").DocCommentHighlightRules,c=function(){var e=this.createKeywordMapper({"variable.language":"activate|any|autonomous|begin|bigdecimal|byte|cast|char|collect|const|end|exit|export|float|goto|group|having|hint|import|inner|into|join|loop|number|object|of|outer|parallel|pragma|retrieve|returning|search|short|stat|synchronized|then|this_month|transaction|type|when",keyword:"private|protected|public|native|synchronized|abstract|threadsafe|transient|static|final|and|array|as|asc|break|bulk|by|catch|class|commit|continue|convertcurrency|delete|desc|do|else|enum|extends|false|final|finally|for|from|future|global|if|implements|in|insert|instanceof|interface|last_90_days|last_month|last_n_days|last_week|like|limit|list|map|merge|new|next_90_days|next_month|next_n_days|next_week|not|null|nulls|on|or|override|package|return|rollback|savepoint|select|set|sort|super|testmethod|this|this_week|throw|today|tolabel|tomorrow|trigger|true|try|undelete|update|upsert|using|virtual|webservice|where|while|yesterday|switch|case|default","storage.type":"def|boolean|byte|char|short|int|float|pblob|date|datetime|decimal|double|id|integer|long|string|time|void|blob|Object","constant.language":"true|false|null|after|before|count|excludes|first|includes|last|order|sharing|with","support.function":"system|apex|label|apexpages|userinfo|schema"},"identifier",!0);function n(o){return o.slice(-3)=="__c"?"support.function":e(o)}function t(o,l){return{regex:o+(l.multiline?"":"(?=.)"),token:"string.start",next:[{regex:l.escape,token:"character.escape"},{regex:l.error,token:"error.invalid"},{regex:o+(l.multiline?"":"|$"),token:"string.end",next:l.next||"start"},{defaultToken:"string"}]}}function g(){return[{token:"comment",regex:"\\/\\/(?=.)",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:"start"},{defaultToken:"comment",caseInsensitive:!0}]},i.getStartRule("doc-start"),{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment",caseInsensitive:!0}]}]}this.$rules={start:[t("'",{escape:/\\[nb'"\\]/,error:/\\./,multiline:!1}),g(),{type:"decoration",token:["meta.package.apex","keyword.other.package.apex","meta.package.apex","storage.modifier.package.apex","meta.package.apex","punctuation.terminator.apex"],regex:/^(\s*)(package)\b(?:(\s*)([^ ;$]+)(\s*)((?:;)?))?/},{regex:/@[a-zA-Z_$][a-zA-Z_$\d\u0080-\ufffe]*/,token:"constant.language"},{regex:/[a-zA-Z_$][a-zA-Z_$\d\u0080-\ufffe]*/,token:n},{regex:"`#%",token:"error.invalid"},{token:"constant.numeric",regex:/[+-]?\d+(?:(?:\.\d*)?(?:[LlDdEe][+-]?\d+)?)\b|\.\d+[LlDdEe]/},{token:"keyword.operator",regex:/--|\+\+|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[]/,next:"maybe_soql",merge:!1},{token:"paren.lparen",regex:/[\[({]/,next:"start",merge:!1},{token:"paren.rparen",regex:/[\])}]/,merge:!1}],maybe_soql:[{regex:/\s+/,token:"text"},{regex:/(SELECT|FIND)\b/,token:"keyword",caseInsensitive:!0,next:"soql"},{regex:"",token:"none",next:"start"}],soql:[{regex:"(:?ASC|BY|CATEGORY|CUBE|DATA|DESC|END|FIND|FIRST|FOR|FROM|GROUP|HAVING|IN|LAST|LIMIT|NETWORK|NULLS|OFFSET|ORDER|REFERENCE|RETURNING|ROLLUP|SCOPE|SELECT|SNIPPET|TRACKING|TYPEOF|UPDATE|USING|VIEW|VIEWSTAT|WHERE|WITH|AND|OR)\\b",token:"keyword",caseInsensitive:!0},{regex:"(:?target_length|toLabel|convertCurrency|count|Contact|Account|User|FIELDS)\\b",token:"support.function",caseInsensitive:!0},{token:"paren.rparen",regex:/[\]]/,next:"start",merge:!1},t("'",{escape:/\\[nb'"\\]/,error:/\\./,multiline:!1,next:"soql"}),t('"',{escape:/\\[nb'"\\]/,error:/\\./,multiline:!1,next:"soql"}),{regex:/\\./,token:"character.escape"},{regex:/[\?\&\|\!\{\}\[\]\(\)\^\~\*\:\"\'\+\-\,\.=\\\/]/,token:"keyword.operator"}],"log-start":[{token:"timestamp.invisible",regex:/^[\d:.() ]+\|/,next:"log-header"},{token:"timestamp.invisible",regex:/^ (Number of|Maximum)[^:]*:/,next:"log-comment"},{token:"invisible",regex:/^Execute Anonymous:/,next:"log-comment"},{defaultToken:"text"}],"log-comment":[{token:"log-comment",regex:/.*$/,next:"log-start"}],"log-header":[{token:"timestamp.invisible",regex:/((USER_DEBUG|\[\d+\]|DEBUG)\|)+/},{token:"keyword",regex:"(?:EXECUTION_FINISHED|EXECUTION_STARTED|CODE_UNIT_STARTED|CUMULATIVE_LIMIT_USAGE|LIMIT_USAGE_FOR_NS|CUMULATIVE_LIMIT_USAGE_END|CODE_UNIT_FINISHED)"},{regex:"",next:"log-start"}]},this.embedRules(i,"doc-",[i.getEndRule("start")]),this.normalizeRules()};u.inherits(c,h),s.ApexHighlightRules=c}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(r,s,m){var u=r("../../lib/oop"),h=r("../../range").Range,i=r("./fold_mode").FoldMode,c=s.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};u.inherits(c,i),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,n,t){var g=e.getLine(t);if(this.singleLineBlockCommentRe.test(g)&&!this.startRegionRe.test(g)&&!this.tripleStarBlockCommentRe.test(g))return"";var o=this._getFoldWidgetBase(e,n,t);return!o&&this.startRegionRe.test(g)?"start":o},this.getFoldWidgetRange=function(e,n,t,g){var o=e.getLine(t);if(this.startRegionRe.test(o))return this.getCommentRegionBlock(e,o,t);var a=o.match(this.foldingStartMarker);if(a){var l=a.index;if(a[1])return this.openingBracketBlock(e,a[1],t,l);var d=e.getCommentFoldRange(t,l+a[0].length,1);return d&&!d.isMultiLine()&&(g?d=this.getSectionRange(e,t):n!="all"&&(d=null)),d}if(n!=="markbegin"){var a=o.match(this.foldingStopMarker);if(a){var l=a.index+a[0].length;return a[1]?this.closingBracketBlock(e,a[1],t,l):e.getCommentFoldRange(t,l,-1)}}},this.getSectionRange=function(e,n){var t=e.getLine(n),g=t.search(/\S/),o=n,l=t.length;n=n+1;for(var d=n,a=e.getLength();++n<a;){t=e.getLine(n);var x=t.search(/\S/);if(x!==-1){if(g>x)break;var p=this.getFoldWidgetRange(e,"all",n);if(p){if(p.start.row<=o)break;if(p.isMultiLine())n=p.end.row;else if(g==x)break}d=n}}return new h(o,l,d,e.getLine(d).length)},this.getCommentRegionBlock=function(e,n,t){for(var g=n.search(/\s*$/),o=e.getLength(),l=t,d=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;++t<o;){n=e.getLine(t);var x=d.exec(n);if(x&&(x[1]?a--:a++,!a))break}var p=t;if(p>l)return new h(l,g,p,n.length)}}.call(c.prototype)}),ace.define("ace/mode/apex",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/apex_highlight_rules","ace/mode/folding/cstyle"],function(r,s,m){var u=r("../lib/oop"),h=r("../mode/text").Mode,i=r("./apex_highlight_rules").ApexHighlightRules,c=r("../mode/folding/cstyle").FoldMode;function e(){h.call(this),this.HighlightRules=i,this.foldingRules=new c,this.$behaviour=this.$defaultBehaviour}u.inherits(e,h),e.prototype.lineCommentStart="//",e.prototype.blockComment={start:"/*",end:"*/"},s.Mode=e}),function(){ace.require(["ace/mode/apex"],function(r){f&&(f.exports=r)})}()})(_);var v=_.exports;const E=R(v),T=b({__proto__:null,default:E},[v]);export{T as m};