(globalThis.webpackChunksuperset=globalThis.webpackChunksuperset||[]).push([[7167],{93083:(t,e,i)=>{t=i.nmd(t),ace.define("ace/split",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/editor","ace/virtual_renderer","ace/edit_session"],(function(t,e,i){"use strict";var n=t("./lib/oop"),s=(t("./lib/lang"),t("./lib/event_emitter").EventEmitter),r=t("./editor").Editor,h=t("./virtual_renderer").VirtualRenderer,f=t("./edit_session").EditSession,a=function(t,e,i){this.BELOW=1,this.BESIDE=0,this.$container=t,this.$theme=e,this.$splits=0,this.$editorCSS="",this.$editors=[],this.$orientation=this.BESIDE,this.setSplits(i||1),this.$cEditor=this.$editors[0],this.on("focus",function(t){this.$cEditor=t}.bind(this))};(function(){n.implement(this,s),this.$createEditor=function(){var t=document.createElement("div");t.className=this.$editorCSS,t.style.cssText="position: absolute; top:0px; bottom:0px",this.$container.appendChild(t);var e=new r(new h(t,this.$theme));return e.on("focus",function(){this._emit("focus",e)}.bind(this)),this.$editors.push(e),e.setFontSize(this.$fontSize),e},this.setSplits=function(t){var e;if(t<1)throw"The number of splits have to be > 0!";if(t!=this.$splits){if(t>this.$splits){for(;this.$splitst;)e=this.$editors[this.$splits-1],this.$container.removeChild(e.container),this.$splits--;this.resize()}},this.getSplits=function(){return this.$splits},this.getEditor=function(t){return this.$editors[t]},this.getCurrentEditor=function(){return this.$cEditor},this.focus=function(){this.$cEditor.focus()},this.blur=function(){this.$cEditor.blur()},this.setTheme=function(t){this.$editors.forEach((function(e){e.setTheme(t)}))},this.setKeyboardHandler=function(t){this.$editors.forEach((function(e){e.setKeyboardHandler(t)}))},this.forEach=function(t,e){this.$editors.forEach(t,e)},this.$fontSize="",this.setFontSize=function(t){this.$fontSize=t,this.forEach((function(e){e.setFontSize(t)}))},this.$cloneSession=function(t){var e=new f(t.getDocument(),t.getMode()),i=t.getUndoManager();return e.setUndoManager(i),e.setTabSize(t.getTabSize()),e.setUseSoftTabs(t.getUseSoftTabs()),e.setOverwrite(t.getOverwrite()),e.setBreakpoints(t.getBreakpoints()),e.setUseWrapMode(t.getUseWrapMode()),e.setUseWorker(t.getUseWorker()),e.setWrapLimitRange(t.$wrapLimitRange.min,t.$wrapLimitRange.max),e.$foldData=t.$cloneFoldData(),e},this.setSession=function(t,e){var i;i=null==e?this.$cEditor:this.$editors[e];var n=this.$editors.some((function(e){return e.session===t}));return n&&(t=this.$cloneSession(t)),i.setSession(t),t},this.getOrientation=function(){return this.$orientation},this.setOrientation=function(t){this.$orientation!=t&&(this.$orientation=t,this.resize())},this.resize=function(){var t,e=this.$container.clientWidth,i=this.$container.clientHeight;if(this.$orientation==this.BESIDE)for(var n=e/this.$splits,s=0;s{var e=function(){this.Diff_Timeout=1,this.Diff_EditCost=4,this.Match_Threshold=.5,this.Match_Distance=1e3,this.Patch_DeleteThreshold=.5,this.Patch_Margin=4,this.Match_MaxBits=32},i=-1;e.Diff=function(t,e){return[t,e]},e.prototype.diff_main=function(t,i,n,s){void 0===s&&(s=this.Diff_Timeout<=0?Number.MAX_VALUE:(new Date).getTime()+1e3*this.Diff_Timeout);var r=s;if(null==t||null==i)throw new Error("Null input. (diff_main)");if(t==i)return t?[new e.Diff(0,t)]:[];void 0===n&&(n=!0);var h=n,f=this.diff_commonPrefix(t,i),a=t.substring(0,f);t=t.substring(f),i=i.substring(f),f=this.diff_commonSuffix(t,i);var l=t.substring(t.length-f);t=t.substring(0,t.length-f),i=i.substring(0,i.length-f);var o=this.diff_compute_(t,i,h,r);return a&&o.unshift(new e.Diff(0,a)),l&&o.push(new e.Diff(0,l)),this.diff_cleanupMerge(o),o},e.prototype.diff_compute_=function(t,n,s,r){var h;if(!t)return[new e.Diff(1,n)];if(!n)return[new e.Diff(i,t)];var f=t.length>n.length?t:n,a=t.length>n.length?n:t,l=f.indexOf(a);if(-1!=l)return h=[new e.Diff(1,f.substring(0,l)),new e.Diff(0,a),new e.Diff(1,f.substring(l+a.length))],t.length>n.length&&(h[0][0]=h[2][0]=i),h;if(1==a.length)return[new e.Diff(i,t),new e.Diff(1,n)];var o=this.diff_halfMatch_(t,n);if(o){var g=o[0],c=o[1],u=o[2],p=o[3],d=o[4],_=this.diff_main(g,u,s,r),b=this.diff_main(c,p,s,r);return _.concat([new e.Diff(0,d)],b)}return s&&t.length>100&&n.length>100?this.diff_lineMode_(t,n,r):this.diff_bisect_(t,n,r)},e.prototype.diff_lineMode_=function(t,n,s){var r=this.diff_linesToChars_(t,n);t=r.chars1,n=r.chars2;var h=r.lineArray,f=this.diff_main(t,n,!1,s);this.diff_charsToLines_(f,h),this.diff_cleanupSemantic(f),f.push(new e.Diff(0,""));for(var a=0,l=0,o=0,g="",c="";a=1&&o>=1){f.splice(a-l-o,l+o),a=a-l-o;for(var u=this.diff_main(g,c,!1,s),p=u.length-1;p>=0;p--)f.splice(a,0,u[p]);a+=u.length}o=0,l=0,g="",c=""}a++}return f.pop(),f},e.prototype.diff_bisect_=function(t,n,s){for(var r=t.length,h=n.length,f=Math.ceil((r+h)/2),a=f,l=2*f,o=new Array(l),g=new Array(l),c=0;cs);m++){for(var w=-m+d;w<=m-_;w+=2){for(var x=a+w,M=(S=w==-m||w!=m&&o[x-1]r)_+=2;else if(M>h)d+=2;else if(p&&($=a+u-w)>=0&&$=(D=r-g[$]))return this.diff_bisectSplit_(t,n,S,M,s)}for(var y=-m+b;y<=m-v;y+=2){for(var D,$=a+y,E=(D=y==-m||y!=m&&g[$-1]r)v+=2;else if(E>h)b+=2;else if(!p){var S;if((x=a+u-y)>=0&&x=(D=r-D))return this.diff_bisectSplit_(t,n,S,M,s)}}}return[new e.Diff(i,t),new e.Diff(1,n)]},e.prototype.diff_bisectSplit_=function(t,e,i,n,s){var r=t.substring(0,i),h=e.substring(0,n),f=t.substring(i),a=e.substring(n),l=this.diff_main(r,h,!1,s),o=this.diff_main(f,a,!1,s);return l.concat(o)},e.prototype.diff_linesToChars_=function(t,e){var i=[],n={};function s(t){for(var e="",s=0,h=-1,f=i.length;hn?t=t.substring(i-n):ie.length?t:e,n=t.length>e.length?e:t;if(i.length<4||2*n.length=t.length?[n,r,h,f,o]:null}var h,f,a,l,o,g=r(i,n,Math.ceil(i.length/4)),c=r(i,n,Math.ceil(i.length/2));return g||c?(h=c?g&&g[4].length>c[4].length?g:c:g,t.length>e.length?(f=h[0],a=h[1],l=h[2],o=h[3]):(l=h[0],o=h[1],f=h[2],a=h[3]),[f,a,l,o,h[4]]):null},e.prototype.diff_cleanupSemantic=function(t){for(var n=!1,s=[],r=0,h=null,f=0,a=0,l=0,o=0,g=0;f0?s[r-1]:-1,a=0,l=0,o=0,g=0,h=null,n=!0)),f++;for(n&&this.diff_cleanupMerge(t),this.diff_cleanupSemanticLossless(t),f=1;f=d?(p>=c.length/2||p>=u.length/2)&&(t.splice(f,0,new e.Diff(0,u.substring(0,p))),t[f-1][1]=c.substring(0,c.length-p),t[f+1][1]=u.substring(p),f++):(d>=c.length/2||d>=u.length/2)&&(t.splice(f,0,new e.Diff(0,c.substring(0,d))),t[f-1][0]=1,t[f-1][1]=u.substring(0,u.length-d),t[f+1][0]=i,t[f+1][1]=c.substring(d),f++),f++}f++}},e.prototype.diff_cleanupSemanticLossless=function(t){function i(t,i){if(!t||!i)return 6;var n=t.charAt(t.length-1),s=i.charAt(0),r=n.match(e.nonAlphaNumericRegex_),h=s.match(e.nonAlphaNumericRegex_),f=r&&n.match(e.whitespaceRegex_),a=h&&s.match(e.whitespaceRegex_),l=f&&n.match(e.linebreakRegex_),o=a&&s.match(e.linebreakRegex_),g=l&&t.match(e.blanklineEndRegex_),c=o&&i.match(e.blanklineStartRegex_);return g||c?5:l||o?4:r&&!f&&a?3:f||a?2:r||h?1:0}for(var n=1;n=c&&(c=u,l=s,o=r,g=h)}t[n-1][1]!=l&&(l?t[n-1][1]=l:(t.splice(n-1,1),n--),t[n][1]=o,g?t[n+1][1]=g:(t.splice(n+1,1),n--))}n++}},e.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,e.whitespaceRegex_=/\s/,e.linebreakRegex_=/[\r\n]/,e.blanklineEndRegex_=/\n\r?\n$/,e.blanklineStartRegex_=/^\r?\n\r?\n/,e.prototype.diff_cleanupEfficiency=function(t){for(var n=!1,s=[],r=0,h=null,f=0,a=!1,l=!1,o=!1,g=!1;f0?s[r-1]:-1,o=g=!1),n=!0)),f++;n&&this.diff_cleanupMerge(t)},e.prototype.diff_cleanupMerge=function(t){t.push(new e.Diff(0,""));for(var n,s=0,r=0,h=0,f="",a="";s1?(0!==r&&0!==h&&(0!==(n=this.diff_commonPrefix(a,f))&&(s-r-h>0&&0==t[s-r-h-1][0]?t[s-r-h-1][1]+=a.substring(0,n):(t.splice(0,0,new e.Diff(0,a.substring(0,n))),s++),a=a.substring(n),f=f.substring(n)),0!==(n=this.diff_commonSuffix(a,f))&&(t[s][1]=a.substring(a.length-n)+t[s][1],a=a.substring(0,a.length-n),f=f.substring(0,f.length-n))),s-=r+h,t.splice(s,r+h),f.length&&(t.splice(s,0,new e.Diff(i,f)),s++),a.length&&(t.splice(s,0,new e.Diff(1,a)),s++),s++):0!==s&&0==t[s-1][0]?(t[s-1][1]+=t[s][1],t.splice(s,1)):s++,h=0,r=0,f="",a=""}""===t[t.length-1][1]&&t.pop();var l=!1;for(s=1;se));n++)h=s,f=r;return t.length!=n&&t[n][0]===i?f:f+(e-h)},e.prototype.diff_prettyHtml=function(t){for(var e=[],n=/&/g,s=//g,h=/\n/g,f=0;f");switch(a){case 1:e[f]=''+l+"";break;case i:e[f]=''+l+"";break;case 0:e[f]=""+l+""}}return e.join("")},e.prototype.diff_text1=function(t){for(var e=[],i=0;ithis.Match_MaxBits)throw new Error("Pattern too long for this browser.");var n=this.match_alphabet_(e),s=this;function r(t,n){var r=t/e.length,h=Math.abs(i-n);return s.Match_Distance?r+h/s.Match_Distance:h?1:r}var h=this.Match_Threshold,f=t.indexOf(e,i);-1!=f&&(h=Math.min(r(0,f),h),-1!=(f=t.lastIndexOf(e,i+e.length))&&(h=Math.min(r(0,f),h)));var a,l,o=1<=p;b--){var v=n[t.charAt(b-1)];if(_[b]=0===u?(_[b+1]<<1|1)&v:(_[b+1]<<1|1)&v|(g[b+1]|g[b])<<1|1|g[b+1],_[b]&o){var m=r(u,b-1);if(m<=h){if(h=m,!((f=b-1)>i))break;p=Math.max(1,2*i-f)}}}if(r(u+1,i)>h)break;g=_}return f},e.prototype.match_alphabet_=function(t){for(var e={},i=0;i2&&(this.diff_cleanupSemantic(h),this.diff_cleanupEfficiency(h));else if(t&&"object"==typeof t&&void 0===n&&void 0===s)h=t,r=this.diff_text1(h);else if("string"==typeof t&&n&&"object"==typeof n&&void 0===s)r=t,h=n;else{if("string"!=typeof t||"string"!=typeof n||!s||"object"!=typeof s)throw new Error("Unknown call format to patch_make.");r=t,h=s}if(0===h.length)return[];for(var f=[],a=new e.patch_obj,l=0,o=0,g=0,c=r,u=r,p=0;p=2*this.Patch_Margin&&l&&(this.patch_addContext_(a,c),f.push(a),a=new e.patch_obj,l=0,c=u,o=g)}1!==d&&(o+=_.length),d!==i&&(g+=_.length)}return l&&(this.patch_addContext_(a,c),f.push(a)),f},e.prototype.patch_deepCopy=function(t){for(var i=[],n=0;nthis.Match_MaxBits?-1!=(f=this.match_main(e,o.substring(0,this.Match_MaxBits),l))&&(-1==(g=this.match_main(e,o.substring(o.length-this.Match_MaxBits),l+o.length-this.Match_MaxBits))||f>=g)&&(f=-1):f=this.match_main(e,o,l),-1==f)r[h]=!1,s-=t[h].length2-t[h].length1;else if(r[h]=!0,s=f-l,o==(a=-1==g?e.substring(f,f+o.length):e.substring(f,g+this.Match_MaxBits)))e=e.substring(0,f)+this.diff_text2(t[h].diffs)+e.substring(f+o.length);else{var c=this.diff_main(o,a,!1);if(o.length>this.Match_MaxBits&&this.diff_levenshtein(c)/o.length>this.Patch_DeleteThreshold)r[h]=!1;else{this.diff_cleanupSemanticLossless(c);for(var u,p=0,d=0;dh[0][1].length){var f=i-h[0][1].length;h[0][1]=n.substring(h[0][1].length)+h[0][1],r.start1-=f,r.start2-=f,r.length1+=f,r.length2+=f}return 0==(h=(r=t[t.length-1]).diffs).length||0!=h[h.length-1][0]?(h.push(new e.Diff(0,n)),r.length1+=i,r.length2+=i):i>h[h.length-1][1].length&&(f=i-h[h.length-1][1].length,h[h.length-1][1]+=n.substring(0,f),r.length1+=f,r.length2+=f),n},e.prototype.patch_splitMax=function(t){for(var n=this.Match_MaxBits,s=0;s2*n?(l.length1+=c.length,h+=c.length,o=!1,l.diffs.push(new e.Diff(g,c)),r.diffs.shift()):(c=c.substring(0,n-l.length1-this.Patch_Margin),l.length1+=c.length,h+=c.length,0===g?(l.length2+=c.length,f+=c.length):o=!1,l.diffs.push(new e.Diff(g,c)),c==r.diffs[0][1]?r.diffs.shift():r.diffs[0][1]=r.diffs[0][1].substring(c.length))}a=(a=this.diff_text2(l.diffs)).substring(a.length-this.Patch_Margin);var u=this.diff_text1(r.diffs).substring(0,this.Patch_Margin);""!==u&&(l.length1+=u.length,l.length2+=u.length,0!==l.diffs.length&&0===l.diffs[l.diffs.length-1][0]?l.diffs[l.diffs.length-1][1]+=u:l.diffs.push(new e.Diff(0,u))),o||t.splice(++s,0,l)}}},e.prototype.patch_toText=function(t){for(var e=[],i=0;i