worker-json-58c17133.js 23 KB

123456789
  1. import{c as D}from"./index-15e3682d.js";function E(u,h){for(var v=0;v<h.length;v++){const l=h[v];if(typeof l!="string"&&!Array.isArray(l)){for(const a in l)if(a!=="default"&&!(a in u)){const i=Object.getOwnPropertyDescriptor(l,a);i&&Object.defineProperty(u,a,i.get?i:{enumerable:!0,get:()=>l[a]})}}}return Object.freeze(Object.defineProperty(u,Symbol.toStringTag,{value:"Module"}))}var M={};(function(u){if(typeof u.window<"u"&&u.document||u.require&&u.define)return;u.console||(u.console=function(){var a=Array.prototype.slice.call(arguments,0);postMessage({type:"log",data:a})},u.console.error=u.console.warn=u.console.log=u.console.trace=u.console),u.window=u,u.ace=u,u.onerror=function(a,i,t,n,r){postMessage({type:"error",data:{message:a,data:r&&r.data,file:i,line:t,col:n,stack:r&&r.stack}})},u.normalizeModule=function(a,i){if(i.indexOf("!")!==-1){var t=i.split("!");return u.normalizeModule(a,t[0])+"!"+u.normalizeModule(a,t[1])}if(i.charAt(0)=="."){var n=a.split("/").slice(0,-1).join("/");for(i=(n?n+"/":"")+i;i.indexOf(".")!==-1&&r!=i;){var r=i;i=i.replace(/^\.\//,"").replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return i},u.require=function(i,t){if(t||(t=i,i=null),!t.charAt)throw new Error("worker.js require() accepts only (parentId, id) as arguments");t=u.normalizeModule(i,t);var n=u.require.modules[t];if(n)return n.initialized||(n.initialized=!0,n.exports=n.factory().exports),n.exports;if(!u.require.tlns)return console.log("unable to load "+t);var r=h(t,u.require.tlns);return r.slice(-3)!=".js"&&(r+=".js"),u.require.id=t,u.require.modules[t]={},importScripts(r),u.require(i,t)};function h(a,i){for(var t=a,n="";t;){var r=i[t];if(typeof r=="string")return r+n;if(r)return r.location.replace(/\/*$/,"/")+(n||r.main||r.name);if(r===!1)return"";var o=t.lastIndexOf("/");if(o===-1)break;n=t.substr(o)+n,t=t.slice(0,o)}return a}u.require.modules={},u.require.tlns={},u.define=function(a,i,t){if(arguments.length==2?(t=i,typeof a!="string"&&(i=a,a=u.require.id)):arguments.length==1&&(t=a,i=[],a=u.require.id),typeof t!="function"){u.require.modules[a]={exports:t,initialized:!0};return}i.length||(i=["require","exports","module"]);var n=function(r){return u.require(a,r)};u.require.modules[a]={exports:{},factory:function(){var r=this,o=t.apply(this,i.slice(0,t.length).map(function(e){switch(e){case"require":return n;case"exports":return r.exports;case"module":return r;default:return n(e)}}));return o&&(r.exports=o),r}}},u.define.amd={},u.require.tlns={},u.initBaseUrls=function(i){for(var t in i)this.require.tlns[t]=i[t]},u.initSender=function(){var i=u.require("ace/lib/event_emitter").EventEmitter,t=u.require("ace/lib/oop"),n=function(){};return function(){t.implement(this,i),this.callback=function(r,o){postMessage({type:"call",id:o,data:r})},this.emit=function(r,o){postMessage({type:"event",name:r,data:o})}}.call(n.prototype),new n};var v=u.main=null,l=u.sender=null;u.onmessage=function(a){var i=a.data;if(i.event&&l)l._signal(i.event,i.data);else if(i.command)if(v[i.command])v[i.command].apply(v,i.args);else if(u[i.command])u[i.command].apply(u,i.args);else throw new Error("Unknown command:"+i.command);else if(i.init){u.initBaseUrls(i.tlns),l=u.sender=u.initSender();var t=this.require(i.module)[i.classname];v=u.main=new t(l)}}})(D);ace.define("ace/lib/oop",[],function(u,h,v){h.inherits=function(l,a){l.super_=a,l.prototype=Object.create(a.prototype,{constructor:{value:l,enumerable:!1,writable:!0,configurable:!0}})},h.mixin=function(l,a){for(var i in a)l[i]=a[i];return l},h.implement=function(l,a){h.mixin(l,a)}});ace.define("ace/apply_delta",[],function(u,h,v){h.applyDelta=function(l,a,i){var t=a.start.row,n=a.start.column,r=l[t]||"";switch(a.action){case"insert":var o=a.lines;if(o.length===1)l[t]=r.substring(0,n)+a.lines[0]+r.substring(n);else{var e=[t,1].concat(a.lines);l.splice.apply(l,e),l[t]=r.substring(0,n)+l[t],l[t+a.lines.length-1]+=r.substring(n)}break;case"remove":var s=a.end.column,c=a.end.row;t===c?l[t]=r.substring(0,n)+r.substring(s):l.splice(t,c-t+1,r.substring(0,n)+l[c].substring(s));break}}});ace.define("ace/lib/event_emitter",[],function(u,h,v){var l={},a=function(){this.propagationStopped=!0},i=function(){this.defaultPrevented=!0};l._emit=l._dispatchEvent=function(t,n){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var r=this._eventRegistry[t]||[],o=this._defaultHandlers[t];if(!(!r.length&&!o)){(typeof n!="object"||!n)&&(n={}),n.type||(n.type=t),n.stopPropagation||(n.stopPropagation=a),n.preventDefault||(n.preventDefault=i),r=r.slice();for(var e=0;e<r.length&&(r[e](n,this),!n.propagationStopped);e++);if(o&&!n.defaultPrevented)return o(n,this)}},l._signal=function(t,n){var r=(this._eventRegistry||{})[t];if(r){r=r.slice();for(var o=0;o<r.length;o++)r[o](n,this)}},l.once=function(t,n){var r=this;if(this.on(t,function o(){r.off(t,o),n.apply(null,arguments)}),!n)return new Promise(function(o){n=o})},l.setDefaultHandler=function(t,n){var r=this._defaultHandlers;if(r||(r=this._defaultHandlers={_disabled_:{}}),r[t]){var o=r[t],e=r._disabled_[t];e||(r._disabled_[t]=e=[]),e.push(o);var s=e.indexOf(n);s!=-1&&e.splice(s,1)}r[t]=n},l.removeDefaultHandler=function(t,n){var r=this._defaultHandlers;if(r){var o=r._disabled_[t];if(r[t]==n)o&&this.setDefaultHandler(t,o.pop());else if(o){var e=o.indexOf(n);e!=-1&&o.splice(e,1)}}},l.on=l.addEventListener=function(t,n,r){this._eventRegistry=this._eventRegistry||{};var o=this._eventRegistry[t];return o||(o=this._eventRegistry[t]=[]),o.indexOf(n)==-1&&o[r?"unshift":"push"](n),n},l.off=l.removeListener=l.removeEventListener=function(t,n){this._eventRegistry=this._eventRegistry||{};var r=this._eventRegistry[t];if(r){var o=r.indexOf(n);o!==-1&&r.splice(o,1)}},l.removeAllListeners=function(t){t||(this._eventRegistry=this._defaultHandlers=void 0),this._eventRegistry&&(this._eventRegistry[t]=void 0),this._defaultHandlers&&(this._defaultHandlers[t]=void 0)},h.EventEmitter=l});ace.define("ace/range",[],function(u,h,v){var l=function(i,t){return i.row-t.row||i.column-t.column},a=function(){function i(t,n,r,o){this.start={row:t,column:n},this.end={row:r,column:o}}return i.prototype.isEqual=function(t){return this.start.row===t.start.row&&this.end.row===t.end.row&&this.start.column===t.start.column&&this.end.column===t.end.column},i.prototype.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},i.prototype.contains=function(t,n){return this.compare(t,n)==0},i.prototype.compareRange=function(t){var n,r=t.end,o=t.start;return n=this.compare(r.row,r.column),n==1?(n=this.compare(o.row,o.column),n==1?2:n==0?1:0):n==-1?-2:(n=this.compare(o.row,o.column),n==-1?-1:n==1?42:0)},i.prototype.comparePoint=function(t){return this.compare(t.row,t.column)},i.prototype.containsRange=function(t){return this.comparePoint(t.start)==0&&this.comparePoint(t.end)==0},i.prototype.intersects=function(t){var n=this.compareRange(t);return n==-1||n==0||n==1},i.prototype.isEnd=function(t,n){return this.end.row==t&&this.end.column==n},i.prototype.isStart=function(t,n){return this.start.row==t&&this.start.column==n},i.prototype.setStart=function(t,n){typeof t=="object"?(this.start.column=t.column,this.start.row=t.row):(this.start.row=t,this.start.column=n)},i.prototype.setEnd=function(t,n){typeof t=="object"?(this.end.column=t.column,this.end.row=t.row):(this.end.row=t,this.end.column=n)},i.prototype.inside=function(t,n){return this.compare(t,n)==0?!(this.isEnd(t,n)||this.isStart(t,n)):!1},i.prototype.insideStart=function(t,n){return this.compare(t,n)==0?!this.isEnd(t,n):!1},i.prototype.insideEnd=function(t,n){return this.compare(t,n)==0?!this.isStart(t,n):!1},i.prototype.compare=function(t,n){return!this.isMultiLine()&&t===this.start.row?n<this.start.column?-1:n>this.end.column?1:0:t<this.start.row?-1:t>this.end.row?1:this.start.row===t?n>=this.start.column?0:-1:this.end.row===t?n<=this.end.column?0:1:0},i.prototype.compareStart=function(t,n){return this.start.row==t&&this.start.column==n?-1:this.compare(t,n)},i.prototype.compareEnd=function(t,n){return this.end.row==t&&this.end.column==n?1:this.compare(t,n)},i.prototype.compareInside=function(t,n){return this.end.row==t&&this.end.column==n?1:this.start.row==t&&this.start.column==n?-1:this.compare(t,n)},i.prototype.clipRows=function(t,n){if(this.end.row>n)var r={row:n+1,column:0};else if(this.end.row<t)var r={row:t,column:0};if(this.start.row>n)var o={row:n+1,column:0};else if(this.start.row<t)var o={row:t,column:0};return i.fromPoints(o||this.start,r||this.end)},i.prototype.extend=function(t,n){var r=this.compare(t,n);if(r==0)return this;if(r==-1)var o={row:t,column:n};else var e={row:t,column:n};return i.fromPoints(o||this.start,e||this.end)},i.prototype.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},i.prototype.isMultiLine=function(){return this.start.row!==this.end.row},i.prototype.clone=function(){return i.fromPoints(this.start,this.end)},i.prototype.collapseRows=function(){return this.end.column==0?new i(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new i(this.start.row,0,this.end.row,0)},i.prototype.toScreenRange=function(t){var n=t.documentToScreenPosition(this.start),r=t.documentToScreenPosition(this.end);return new i(n.row,n.column,r.row,r.column)},i.prototype.moveBy=function(t,n){this.start.row+=t,this.start.column+=n,this.end.row+=t,this.end.column+=n},i}();a.fromPoints=function(i,t){return new a(i.row,i.column,t.row,t.column)},a.comparePoints=l,a.comparePoints=function(i,t){return i.row-t.row||i.column-t.column},h.Range=a});ace.define("ace/anchor",[],function(u,h,v){var l=u("./lib/oop"),a=u("./lib/event_emitter").EventEmitter,i=function(){function r(o,e,s){this.$onChange=this.onChange.bind(this),this.attach(o),typeof s>"u"?this.setPosition(e.row,e.column):this.setPosition(e,s)}return r.prototype.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},r.prototype.getDocument=function(){return this.document},r.prototype.onChange=function(o){if(!(o.start.row==o.end.row&&o.start.row!=this.row)&&!(o.start.row>this.row)){var e=n(o,{row:this.row,column:this.column},this.$insertRight);this.setPosition(e.row,e.column,!0)}},r.prototype.setPosition=function(o,e,s){var c;if(s?c={row:o,column:e}:c=this.$clipPositionToDocument(o,e),!(this.row==c.row&&this.column==c.column)){var f={row:this.row,column:this.column};this.row=c.row,this.column=c.column,this._signal("change",{old:f,value:c})}},r.prototype.detach=function(){this.document.off("change",this.$onChange)},r.prototype.attach=function(o){this.document=o||this.document,this.document.on("change",this.$onChange)},r.prototype.$clipPositionToDocument=function(o,e){var s={};return o>=this.document.getLength()?(s.row=Math.max(0,this.document.getLength()-1),s.column=this.document.getLine(s.row).length):o<0?(s.row=0,s.column=0):(s.row=o,s.column=Math.min(this.document.getLine(s.row).length,Math.max(0,e))),e<0&&(s.column=0),s},r}();i.prototype.$insertRight=!1,l.implement(i.prototype,a);function t(r,o,e){var s=e?r.column<=o.column:r.column<o.column;return r.row<o.row||r.row==o.row&&s}function n(r,o,e){var s=r.action=="insert",c=(s?1:-1)*(r.end.row-r.start.row),f=(s?1:-1)*(r.end.column-r.start.column),m=r.start,d=s?m:r.end;return t(o,m,e)?{row:o.row,column:o.column}:t(d,o,!e)?{row:o.row+c,column:o.column+(o.row==d.row?f:0)}:{row:m.row,column:m.column}}h.Anchor=i});ace.define("ace/document",[],function(u,h,v){var l=u("./lib/oop"),a=u("./apply_delta").applyDelta,i=u("./lib/event_emitter").EventEmitter,t=u("./range").Range,n=u("./anchor").Anchor,r=function(){function o(e){this.$lines=[""],e.length===0?this.$lines=[""]:Array.isArray(e)?this.insertMergedLines({row:0,column:0},e):this.insert({row:0,column:0},e)}return o.prototype.setValue=function(e){var s=this.getLength()-1;this.remove(new t(0,0,s,this.getLine(s).length)),this.insert({row:0,column:0},e||"")},o.prototype.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},o.prototype.createAnchor=function(e,s){return new n(this,e,s)},o.prototype.$detectNewLine=function(e){var s=e.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=s?s[1]:`
  2. `,this._signal("changeNewLineMode")},o.prototype.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return`\r
  3. `;case"unix":return`
  4. `;default:return this.$autoNewLine||`
  5. `}},o.prototype.setNewLineMode=function(e){this.$newLineMode!==e&&(this.$newLineMode=e,this._signal("changeNewLineMode"))},o.prototype.getNewLineMode=function(){return this.$newLineMode},o.prototype.isNewLine=function(e){return e==`\r
  6. `||e=="\r"||e==`
  7. `},o.prototype.getLine=function(e){return this.$lines[e]||""},o.prototype.getLines=function(e,s){return this.$lines.slice(e,s+1)},o.prototype.getAllLines=function(){return this.getLines(0,this.getLength())},o.prototype.getLength=function(){return this.$lines.length},o.prototype.getTextRange=function(e){return this.getLinesForRange(e).join(this.getNewLineCharacter())},o.prototype.getLinesForRange=function(e){var s;if(e.start.row===e.end.row)s=[this.getLine(e.start.row).substring(e.start.column,e.end.column)];else{s=this.getLines(e.start.row,e.end.row),s[0]=(s[0]||"").substring(e.start.column);var c=s.length-1;e.end.row-e.start.row==c&&(s[c]=s[c].substring(0,e.end.column))}return s},o.prototype.insertLines=function(e,s){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(e,s)},o.prototype.removeLines=function(e,s){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(e,s)},o.prototype.insertNewLine=function(e){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(e,["",""])},o.prototype.insert=function(e,s){return this.getLength()<=1&&this.$detectNewLine(s),this.insertMergedLines(e,this.$split(s))},o.prototype.insertInLine=function(e,s){var c=this.clippedPos(e.row,e.column),f=this.pos(e.row,e.column+s.length);return this.applyDelta({start:c,end:f,action:"insert",lines:[s]},!0),this.clonePos(f)},o.prototype.clippedPos=function(e,s){var c=this.getLength();e===void 0?e=c:e<0?e=0:e>=c&&(e=c-1,s=void 0);var f=this.getLine(e);return s==null&&(s=f.length),s=Math.min(Math.max(s,0),f.length),{row:e,column:s}},o.prototype.clonePos=function(e){return{row:e.row,column:e.column}},o.prototype.pos=function(e,s){return{row:e,column:s}},o.prototype.$clipPosition=function(e){var s=this.getLength();return e.row>=s?(e.row=Math.max(0,s-1),e.column=this.getLine(s-1).length):(e.row=Math.max(0,e.row),e.column=Math.min(Math.max(e.column,0),this.getLine(e.row).length)),e},o.prototype.insertFullLines=function(e,s){e=Math.min(Math.max(e,0),this.getLength());var c=0;e<this.getLength()?(s=s.concat([""]),c=0):(s=[""].concat(s),e--,c=this.$lines[e].length),this.insertMergedLines({row:e,column:c},s)},o.prototype.insertMergedLines=function(e,s){var c=this.clippedPos(e.row,e.column),f={row:c.row+s.length-1,column:(s.length==1?c.column:0)+s[s.length-1].length};return this.applyDelta({start:c,end:f,action:"insert",lines:s}),this.clonePos(f)},o.prototype.remove=function(e){var s=this.clippedPos(e.start.row,e.start.column),c=this.clippedPos(e.end.row,e.end.column);return this.applyDelta({start:s,end:c,action:"remove",lines:this.getLinesForRange({start:s,end:c})}),this.clonePos(s)},o.prototype.removeInLine=function(e,s,c){var f=this.clippedPos(e,s),m=this.clippedPos(e,c);return this.applyDelta({start:f,end:m,action:"remove",lines:this.getLinesForRange({start:f,end:m})},!0),this.clonePos(f)},o.prototype.removeFullLines=function(e,s){e=Math.min(Math.max(0,e),this.getLength()-1),s=Math.min(Math.max(0,s),this.getLength()-1);var c=s==this.getLength()-1&&e>0,f=s<this.getLength()-1,m=c?e-1:e,d=c?this.getLine(m).length:0,p=f?s+1:s,g=f?0:this.getLine(p).length,y=new t(m,d,p,g),L=this.$lines.slice(e,s+1);return this.applyDelta({start:y.start,end:y.end,action:"remove",lines:this.getLinesForRange(y)}),L},o.prototype.removeNewLine=function(e){e<this.getLength()-1&&e>=0&&this.applyDelta({start:this.pos(e,this.getLine(e).length),end:this.pos(e+1,0),action:"remove",lines:["",""]})},o.prototype.replace=function(e,s){if(e instanceof t||(e=t.fromPoints(e.start,e.end)),s.length===0&&e.isEmpty())return e.start;if(s==this.getTextRange(e))return e.end;this.remove(e);var c;return s?c=this.insert(e.start,s):c=e.start,c},o.prototype.applyDeltas=function(e){for(var s=0;s<e.length;s++)this.applyDelta(e[s])},o.prototype.revertDeltas=function(e){for(var s=e.length-1;s>=0;s--)this.revertDelta(e[s])},o.prototype.applyDelta=function(e,s){var c=e.action=="insert";(c?e.lines.length<=1&&!e.lines[0]:!t.comparePoints(e.start,e.end))||(c&&e.lines.length>2e4?this.$splitAndapplyLargeDelta(e,2e4):(a(this.$lines,e,s),this._signal("change",e)))},o.prototype.$safeApplyDelta=function(e){var s=this.$lines.length;(e.action=="remove"&&e.start.row<s&&e.end.row<s||e.action=="insert"&&e.start.row<=s)&&this.applyDelta(e)},o.prototype.$splitAndapplyLargeDelta=function(e,s){for(var c=e.lines,f=c.length-s+1,m=e.start.row,d=e.start.column,p=0,g=0;p<f;p=g){g+=s-1;var y=c.slice(p,g);y.push(""),this.applyDelta({start:this.pos(m+p,d),end:this.pos(m+g,d=0),action:e.action,lines:y},!0)}e.lines=c.slice(p),e.start.row=m+p,e.start.column=d,this.applyDelta(e,!0)},o.prototype.revertDelta=function(e){this.$safeApplyDelta({start:this.clonePos(e.start),end:this.clonePos(e.end),action:e.action=="insert"?"remove":"insert",lines:e.lines.slice()})},o.prototype.indexToPosition=function(e,s){for(var c=this.$lines||this.getAllLines(),f=this.getNewLineCharacter().length,m=s||0,d=c.length;m<d;m++)if(e-=c[m].length+f,e<0)return{row:m,column:e+c[m].length+f};return{row:d-1,column:e+c[d-1].length+f}},o.prototype.positionToIndex=function(e,s){for(var c=this.$lines||this.getAllLines(),f=this.getNewLineCharacter().length,m=0,d=Math.min(e.row,c.length),p=s||0;p<d;++p)m+=c[p].length+f;return m+e.column},o.prototype.$split=function(e){return e.split(/\r\n|\r|\n/)},o}();r.prototype.$autoNewLine="",r.prototype.$newLineMode="auto",l.implement(r.prototype,i),h.Document=r});ace.define("ace/lib/lang",[],function(u,h,v){h.last=function(i){return i[i.length-1]},h.stringReverse=function(i){return i.split("").reverse().join("")},h.stringRepeat=function(i,t){for(var n="";t>0;)t&1&&(n+=i),(t>>=1)&&(i+=i);return n};var l=/^\s\s*/,a=/\s\s*$/;h.stringTrimLeft=function(i){return i.replace(l,"")},h.stringTrimRight=function(i){return i.replace(a,"")},h.copyObject=function(i){var t={};for(var n in i)t[n]=i[n];return t},h.copyArray=function(i){for(var t=[],n=0,r=i.length;n<r;n++)i[n]&&typeof i[n]=="object"?t[n]=this.copyObject(i[n]):t[n]=i[n];return t},h.deepCopy=function i(t){if(typeof t!="object"||!t)return t;var n;if(Array.isArray(t)){n=[];for(var r=0;r<t.length;r++)n[r]=i(t[r]);return n}if(Object.prototype.toString.call(t)!=="[object Object]")return t;n={};for(var r in t)n[r]=i(t[r]);return n},h.arrayToMap=function(i){for(var t={},n=0;n<i.length;n++)t[i[n]]=1;return t},h.createMap=function(i){var t=Object.create(null);for(var n in i)t[n]=i[n];return t},h.arrayRemove=function(i,t){for(var n=0;n<=i.length;n++)t===i[n]&&i.splice(n,1)},h.escapeRegExp=function(i){return i.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},h.escapeHTML=function(i){return(""+i).replace(/&/g,"&#38;").replace(/"/g,"&#34;").replace(/'/g,"&#39;").replace(/</g,"&#60;")},h.getMatchOffsets=function(i,t){var n=[];return i.replace(t,function(r){n.push({offset:arguments[arguments.length-2],length:r.length})}),n},h.deferredCall=function(i){var t=null,n=function(){t=null,i()},r=function(o){return r.cancel(),t=setTimeout(n,o||0),r};return r.schedule=r,r.call=function(){return this.cancel(),i(),r},r.cancel=function(){return clearTimeout(t),t=null,r},r.isPending=function(){return t},r},h.delayedCall=function(i,t){var n=null,r=function(){n=null,i()},o=function(e){n==null&&(n=setTimeout(r,e||t))};return o.delay=function(e){n&&clearTimeout(n),n=setTimeout(r,e||t)},o.schedule=o,o.call=function(){this.cancel(),i()},o.cancel=function(){n&&clearTimeout(n),n=null},o.isPending=function(){return n},o}});ace.define("ace/worker/mirror",[],function(u,h,v){var l=u("../document").Document,a=u("../lib/lang"),i=h.Mirror=function(t){this.sender=t;var n=this.doc=new l(""),r=this.deferredUpdate=a.delayedCall(this.onUpdate.bind(this)),o=this;t.on("change",function(e){var s=e.data;if(s[0].start)n.applyDeltas(s);else for(var c=0;c<s.length;c+=2){var f,m;if(Array.isArray(s[c+1])?f={action:"insert",start:s[c],lines:s[c+1]}:f={action:"remove",start:s[c],end:s[c+1]},(f.action=="insert"?f.start:f.end).row>=n.$lines.length)throw m=new Error("Invalid delta"),m.data={path:o.$path,linesLength:n.$lines.length,start:f.start,end:f.end},m;n.applyDelta(f,!0)}if(o.$timeout)return r.schedule(o.$timeout);o.onUpdate()})};(function(){this.$timeout=500,this.setTimeout=function(t){this.$timeout=t},this.setValue=function(t){this.doc.setValue(t),this.deferredUpdate.schedule(this.$timeout)},this.getValue=function(t){this.sender.callback(this.doc.getValue(),t)},this.onUpdate=function(){},this.isPending=function(){return this.deferredUpdate.isPending()}}).call(i.prototype)});ace.define("ace/mode/json/json_parse",[],function(u,h,v){var l,a,i={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
  8. `,r:"\r",t:" "},t,n=function(p){throw{name:"SyntaxError",message:p,at:l,text:t}},r=function(p){return p&&p!==a&&n("Expected '"+p+"' instead of '"+a+"'"),a=t.charAt(l),l+=1,a},o=function(){var p,g="";for(a==="-"&&(g="-",r("-"));a>="0"&&a<="9";)g+=a,r();if(a===".")for(g+=".";r()&&a>="0"&&a<="9";)g+=a;if(a==="e"||a==="E")for(g+=a,r(),(a==="-"||a==="+")&&(g+=a,r());a>="0"&&a<="9";)g+=a,r();if(p=+g,isNaN(p))n("Bad number");else return p},e=function(){var p,g,y="",L;if(a==='"')for(;r();){if(a==='"')return r(),y;if(a==="\\")if(r(),a==="u"){for(L=0,g=0;g<4&&(p=parseInt(r(),16),!!isFinite(p));g+=1)L=L*16+p;y+=String.fromCharCode(L)}else if(typeof i[a]=="string")y+=i[a];else break;else{if(a==`
  9. `||a=="\r")break;y+=a}}n("Bad string")},s=function(){for(;a&&a<=" ";)r()},c=function(){switch(a){case"t":return r("t"),r("r"),r("u"),r("e"),!0;case"f":return r("f"),r("a"),r("l"),r("s"),r("e"),!1;case"n":return r("n"),r("u"),r("l"),r("l"),null}n("Unexpected '"+a+"'")},f,m=function(){var p=[];if(a==="["){if(r("["),s(),a==="]")return r("]"),p;for(;a;){if(p.push(f()),s(),a==="]")return r("]"),p;r(","),s()}}n("Bad array")},d=function(){var p,g={};if(a==="{"){if(r("{"),s(),a==="}")return r("}"),g;for(;a;){if(p=e(),s(),r(":"),Object.hasOwnProperty.call(g,p)&&n('Duplicate key "'+p+'"'),g[p]=f(),s(),a==="}")return r("}"),g;r(","),s()}}n("Bad object")};return f=function(){switch(s(),a){case"{":return d();case"[":return m();case'"':return e();case"-":return o();default:return a>="0"&&a<="9"?o():c()}},function(p,g){var y;return t=p,l=0,a=" ",y=f(),s(),a&&n("Syntax error"),typeof g=="function"?function L(b,$){var P,_,w=b[$];if(w&&typeof w=="object")for(P in w)Object.hasOwnProperty.call(w,P)&&(_=L(w,P),_!==void 0?w[P]=_:delete w[P]);return g.call(b,$,w)}({"":y},""):y}});ace.define("ace/mode/json_worker",[],function(u,h,v){var l=u("../lib/oop"),a=u("../worker/mirror").Mirror,i=u("./json/json_parse"),t=h.JsonWorker=function(n){a.call(this,n),this.setTimeout(200)};l.inherits(t,a),function(){this.onUpdate=function(){var n=this.doc.getValue(),r=[];try{n&&i(n)}catch(e){var o=this.doc.indexToPosition(e.at-1);r.push({row:o.row,column:o.column,text:e.message,type:"error"})}this.sender.emit("annotate",r)}}.call(t.prototype)});const S=E({__proto__:null,default:M},[M]);export{S as w};