tocco-devcon 3.15.2 → 3.15.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/changelog.md +4 -0
- package/dist/chunk-1211.41f40a44c92c5cfd9c03.js +1 -0
- package/dist/chunk-2451.a070e3d69c1907b647a4.js +1 -0
- package/dist/{chunk-2103.5b07d25381576c779432.js → chunk-2969.3d4b69ee5d16a8f686c3.js} +7 -7
- package/dist/chunk-4678.4e106bdc48a3a8c0e272.js +1 -0
- package/dist/chunk-47.72447c4ee9c31384e890.js +1 -0
- package/dist/chunk-6528.a97f7710b97b4176d7b6.js +1 -0
- package/dist/{chunk-7910.f40aa83246c83ebd0bb4.js → chunk-7910.03b03bbc7dac2300a12a.js} +1 -1
- package/dist/chunk-8223.b464264786cf80440d0c.js +1 -0
- package/dist/chunk-vendor-fontawesome.97831997c48dfd62e57b.js +7 -0
- package/dist/chunk-vendor-icons.1cc2d3205dcaae34abb1.js +1 -0
- package/dist/chunk-vendor-libphonenumber-js.8ce194f08d65f216e870.js +1 -0
- package/dist/index.js +17 -28
- package/package.json +1 -1
- package/dist/chunk-1211.cb165e27b6d1003855cd.js +0 -1
- package/dist/chunk-2451.f2b42b1e1f14080190e0.js +0 -1
- package/dist/chunk-4678.d8cbea60caed54858efd.js +0 -1
- package/dist/chunk-47.e1523691ea07a65fcc7e.js +0 -1
- package/dist/chunk-6528.7f31f3a450bbd6b1125a.js +0 -1
- package/dist/chunk-8223.8c16cf4624251ea4a55f.js +0 -1
- package/dist/chunk-vendor-fontawesome.867d065e9ecf29d7b20c.js +0 -7
- package/dist/chunk-vendor-icons.e35a311c4873fcd5f81b.js +0 -1
- package/dist/chunk-vendor-libphonenumber-js.48ecb8dbce62ab1f4efb.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(this.webpackChunktocco_devcon=this.webpackChunktocco_devcon||[]).push([[4678],{34678:(e,t,n)=>{e=n.nmd(e),ace.define("ace/ext/diff/scroll_diff_decorator",["require","exports","module","ace/layer/decorators"],(function(e,t,n){var i,r=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},s=function(e){function t(t,n,i){var r=e.call(this,t,n)||this;return r.colors.dark.delete="rgba(255, 18, 18, 1)",r.colors.dark.insert="rgba(18, 136, 18, 1)",r.colors.light.delete="rgb(255,51,51)",r.colors.light.insert="rgb(32,133,72)",r.$zones=[],r.$forInlineDiff=i,r}return r(t,e),t.prototype.addZone=function(e,t,n){this.$zones.push({startRow:e,endRow:t,type:n})},t.prototype.setSessions=function(e,t){this.sessionA=e,this.sessionB=t},t.prototype.$updateDecorators=function(t){if("function"==typeof this.canvas.getContext&&(e.prototype.$updateDecorators.call(this,t),this.$zones.length>0)){var n=!0===this.renderer.theme.isDark?this.colors.dark:this.colors.light,i=this.canvas.getContext("2d");this.$setDiffDecorators(i,n)}},t.prototype.$transformPosition=function(e,t){return"delete"==t?this.sessionA.documentToScreenRow(e,0):this.sessionB.documentToScreenRow(e,0)},t.prototype.$setDiffDecorators=function(e,t){var n,i,r=this;var s=this.$zones;if(s){var a=[];[s.filter((function(e){return"delete"===e.type})),s.filter((function(e){return"insert"===e.type}))].forEach((function(e){e.forEach((function(e,n){var i=r.$transformPosition(e.startRow,e.type)*r.lineHeight,o=r.$transformPosition(e.endRow,e.type)*r.lineHeight+r.lineHeight,s=Math.round(r.heightRatio*i),u=Math.round(r.heightRatio*o),l=Math.round((s+u)/2),h=u-l;h<r.halfMinDecorationHeight&&(h=r.halfMinDecorationHeight);var d=a[a.length-1];n>0&&d&&d.type===e.type&&l-h<d.to+1&&(l=a[a.length-1].to+1+h),l-h<0&&(l=h),l+h>r.canvasHeight&&(l=r.canvasHeight-h),a.push({type:e.type,from:l-h,to:l+h,color:t[e.type]||null})}))})),a=a.sort((function(e,t){return e.from===t.from?e.to-t.to:e.from-t.from}));try{for(var u=o(a),l=u.next();!l.done;l=u.next()){var h=l.value;e.fillStyle=h.color||null;var d=h.from,c=h.to-d;this.$forInlineDiff?e.fillRect(this.oneZoneWidth,d,2*this.oneZoneWidth,c):"delete"==h.type?e.fillRect(this.oneZoneWidth,d,this.oneZoneWidth,c):e.fillRect(2*this.oneZoneWidth,d,this.oneZoneWidth,c)}}catch(e){n={error:e}}finally{try{l&&!l.done&&(i=u.return)&&i.call(u)}finally{if(n)throw n.error}}}},t.prototype.setZoneWidth=function(){this.oneZoneWidth=Math.round(this.canvasWidth/3)},t}(e("../../layer/decorators").Decorator);t.ScrollDiffDecorator=s})),ace.define("ace/ext/diff/styles-css.js",["require","exports","module"],(function(e,t,n){t.cssText='\n/*\n * Line Markers\n */\n.ace_diff {\n position: absolute;\n z-index: 0;\n}\n.ace_diff.inline {\n z-index: 20;\n}\n/*\n * Light Colors \n */\n.ace_diff.insert {\n background-color: #EFFFF1;\n}\n.ace_diff.delete {\n background-color: #FFF1F1;\n}\n.ace_diff.aligned_diff {\n background: rgba(206, 194, 191, 0.26);\n background: repeating-linear-gradient(\n 45deg,\n rgba(122, 111, 108, 0.26),\n rgba(122, 111, 108, 0.26) 5px,\n rgba(0, 0, 0, 0) 5px,\n rgba(0, 0, 0, 0) 10px \n );\n}\n\n.ace_diff.insert.inline {\n background-color: rgb(74 251 74 / 18%); \n}\n.ace_diff.delete.inline {\n background-color: rgb(251 74 74 / 15%);\n}\n\n.ace_diff.delete.inline.empty {\n background-color: rgba(255, 128, 79, 0.7);\n width: 2px !important;\n}\n\n.ace_diff.insert.inline.empty {\n background-color: rgba(49, 230, 96, 0.7);\n width: 2px !important;\n}\n\n.ace_diff-active-line {\n border-bottom: 1px solid;\n border-top: 1px solid;\n background: transparent;\n position: absolute;\n box-sizing: border-box;\n border-color: #9191ac;\n}\n\n.ace_dark .ace_diff-active-line {\n background: transparent;\n border-color: #75777a;\n}\n \n\n/* gutter changes */\n.ace_mini-diff_gutter-enabled > .ace_gutter-cell,\n.ace_mini-diff_gutter-enabled > .ace_gutter-cell_svg-icons {\n padding-right: 13px;\n}\n\n.ace_mini-diff_gutter_other > .ace_gutter-cell,\n.ace_mini-diff_gutter_other > .ace_gutter-cell_svg-icons {\n display: none;\n}\n\n.ace_mini-diff_gutter_other {\n pointer-events: none;\n}\n\n\n.ace_mini-diff_gutter-enabled > .mini-diff-added {\n background-color: #EFFFF1;\n border-left: 3px solid #2BB534;\n padding-left: 16px;\n display: block;\n}\n\n.ace_mini-diff_gutter-enabled > .mini-diff-deleted {\n background-color: #FFF1F1;\n border-left: 3px solid #EA7158;\n padding-left: 16px;\n display: block;\n}\n\n\n.ace_mini-diff_gutter-enabled > .mini-diff-added:after {\n position: absolute;\n right: 2px;\n content: "+";\n background-color: inherit;\n}\n\n.ace_mini-diff_gutter-enabled > .mini-diff-deleted:after {\n position: absolute;\n right: 2px;\n content: "-";\n background-color: inherit;\n}\n.ace_fade-fold-widgets:hover > .ace_folding-enabled > .mini-diff-added:after,\n.ace_fade-fold-widgets:hover > .ace_folding-enabled > .mini-diff-deleted:after {\n display: none;\n}\n\n.ace_diff_other .ace_selection {\n filter: drop-shadow(1px 2px 3px darkgray);\n}\n\n.ace_hidden_marker-layer .ace_bracket,\n.ace_hidden_marker-layer .ace_error_bracket {\n display: none;\n}\n\n\n\n/*\n * Dark Colors \n */\n\n.ace_dark .ace_diff.insert {\n background-color: #212E25;\n}\n.ace_dark .ace_diff.delete {\n background-color: #3F2222;\n}\n\n.ace_dark .ace_mini-diff_gutter-enabled > .mini-diff-added {\n background-color: #212E25;\n border-left-color:#00802F;\n}\n\n.ace_dark .ace_mini-diff_gutter-enabled > .mini-diff-deleted {\n background-color: #3F2222;\n border-left-color: #9C3838;\n}\n\n'})),ace.define("ace/ext/diff/gutter_decorator",["require","exports","module","ace/lib/dom"],(function(e,t,n){var i=e("../../lib/dom"),r=function(){function e(e,t){this.gutterClass="ace_mini-diff_gutter-enabled",this.gutterCellsClasses={add:"mini-diff-added",delete:"mini-diff-deleted"},this.editor=e,this.type=t,this.chunks=[],this.attachToEditor()}return e.prototype.attachToEditor=function(){this.renderGutters=this.renderGutters.bind(this),i.addCssClass(this.editor.renderer.$gutterLayer.element,this.gutterClass),this.editor.renderer.$gutterLayer.on("afterRender",this.renderGutters)},e.prototype.renderGutters=function(e,t){var n=this,i=this.editor.renderer.$gutterLayer.$lines.cells;i.forEach((function(e){e.element.classList.remove(Object.values(n.gutterCellsClasses))}));var r=-1===this.type?"old":"new",o=-1===this.type?this.gutterCellsClasses.delete:this.gutterCellsClasses.add;this.chunks.forEach((function(e){var t=e[r].start.row,n=e[r].end.row-1;i.forEach((function(e){e.row>=t&&e.row<=n&&e.element.classList.add(o)}))}))},e.prototype.setDecorations=function(e){this.chunks=e,this.renderGutters()},e.prototype.dispose=function(){i.removeCssClass(this.editor.renderer.$gutterLayer.element,this.gutterClass),this.editor.renderer.$gutterLayer.off("afterRender",this.renderGutters)},e}();t.MinimalGutterDiffDecorator=r})),ace.define("ace/ext/diff/base_diff_view",["require","exports","module","ace/lib/oop","ace/range","ace/lib/dom","ace/config","ace/line_widgets","ace/ext/diff/scroll_diff_decorator","ace/ext/diff/styles-css.js","ace/editor","ace/virtual_renderer","ace/undomanager","ace/layer/decorators","ace/theme/textmate","ace/multi_select","ace/edit_session","ace/ext/diff/gutter_decorator"],(function(e,t,n){"use strict";var i=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,r,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(i=o.next()).done;)s.push(i.value)}catch(e){r={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return s},r=(e("../../lib/oop"),e("../../range").Range),o=e("../../lib/dom"),s=e("../../config"),a=e("../../line_widgets").LineWidgets,u=e("./scroll_diff_decorator").ScrollDiffDecorator,l=e("./styles-css.js").cssText,h=e("../../editor").Editor,d=e("../../virtual_renderer").VirtualRenderer,c=e("../../undomanager").UndoManager,f=e("../../layer/decorators").Decorator;e("../../theme/textmate"),e("../../multi_select");var g=e("../../edit_session").EditSession,m=e("./gutter_decorator").MinimalGutterDiffDecorator,p={compute:function(e,t,n){return[]}};o.importCssString(l,"diffview.css");var v=function(){function e(e,t){this.onChangeTheme=this.onChangeTheme.bind(this),this.onInput=this.onInput.bind(this),this.onChangeFold=this.onChangeFold.bind(this),this.realign=this.realign.bind(this),this.onSelect=this.onSelect.bind(this),this.onChangeWrapLimit=this.onChangeWrapLimit.bind(this),this.realignPending=!1,this.diffSession,this.chunks,this.inlineDiffEditor=e||!1,this.currentDiffIndex=0,this.diffProvider=p,t&&(this.container=t),this.$ignoreTrimWhitespace=!1,this.$maxDiffs=5e3,this.$maxComputationTimeMs=150,this.$syncSelections=!1,this.$foldUnchangedOnInput=!1,this.markerB=new b(this,1),this.markerA=new b(this,-1)}return e.prototype.$setupModels=function(e){e.diffProvider&&this.setProvider(e.diffProvider),this.showSideA=null==e.inline||"a"===e.inline;var t={scrollPastEnd:.5,highlightActiveLine:!1,highlightGutterLine:!1,animatedScroll:!0,customScrollbar:!0,vScrollBarAlwaysVisible:!0,fadeFoldWidgets:!0,showFoldWidgets:!0,selectionStyle:"text"};if(this.savedOptionsA=e.editorA&&e.editorA.getOptions(t),this.savedOptionsB=e.editorB&&e.editorB.getOptions(t),this.inlineDiffEditor&&"a"!==e.inline||(this.editorA=e.editorA||this.$setupModel(e.sessionA,e.valueA),this.container&&this.container.appendChild(this.editorA.container),this.editorA.setOptions(t)),this.inlineDiffEditor&&"b"!==e.inline||(this.editorB=e.editorB||this.$setupModel(e.sessionB,e.valueB),this.container&&this.container.appendChild(this.editorB.container),this.editorB.setOptions(t)),this.inlineDiffEditor){this.activeEditor=this.showSideA?this.editorA:this.editorB,this.otherSession=this.showSideA?this.sessionB:this.sessionA;var n=this.activeEditor.getOptions();n.readOnly=!0,delete n.mode,this.otherEditor=new h(new d(null),void 0,n),this.showSideA?this.editorB=this.otherEditor:this.editorA=this.otherEditor}this.setDiffSession({sessionA:e.sessionA||(e.editorA?e.editorA.session:new g(e.valueA||"")),sessionB:e.sessionB||(e.editorB?e.editorB.session:new g(e.valueB||"")),chunks:[]}),this.setupScrollbars()},e.prototype.addGutterDecorators=function(){this.gutterDecoratorA||(this.gutterDecoratorA=new m(this.editorA,-1)),this.gutterDecoratorB||(this.gutterDecoratorB=new m(this.editorB,1))},e.prototype.$setupModel=function(e,t){var n=new h(new d,e);return n.session.setUndoManager(new c),null!=t&&n.setValue(t,-1),n},e.prototype.foldUnchanged=function(){for(var e=this.chunks,t="-".repeat(120),n={old:new r(0,0,0,0),new:new r(0,0,0,0)},i=!1,o=0;o<e.length+1;o++){var s=e[o]||{old:new r(this.sessionA.getLength(),0,this.sessionA.getLength(),0),new:new r(this.sessionB.getLength(),0,this.sessionB.getLength(),0)},a=s.new.start.row-n.new.end.row-5;if(a>2){var u=n.old.end.row+2,l=this.sessionA.addFold(t,new r(u,0,u+a,Number.MAX_VALUE));u=n.new.end.row+2;var h=this.sessionB.addFold(t,new r(u,0,u+a,Number.MAX_VALUE));(l||h)&&(i=!0),h&&l&&(l.other=h,h.other=l)}n=s}return i},e.prototype.unfoldUnchanged=function(){for(var e=this.sessionA.getAllFolds(),t=e.length-1;t>=0;t--){var n=e[t];120==n.placeholder.length&&this.sessionA.removeFold(n)}},e.prototype.toggleFoldUnchanged=function(){this.foldUnchanged()||this.unfoldUnchanged()},e.prototype.setDiffSession=function(e){this.diffSession&&(this.$detachSessionsEventHandlers(),this.clearSelectionMarkers()),this.diffSession=e,this.sessionA=this.sessionB=null,this.diffSession&&(this.chunks=this.diffSession.chunks||[],this.editorA&&this.editorA.setSession(e.sessionA),this.editorB&&this.editorB.setSession(e.sessionB),this.sessionA=this.diffSession.sessionA,this.sessionB=this.diffSession.sessionB,this.$attachSessionsEventHandlers(),this.initSelectionMarkers()),this.otherSession=this.showSideA?this.sessionB:this.sessionA},e.prototype.$attachSessionsEventHandlers=function(){},e.prototype.$detachSessionsEventHandlers=function(){},e.prototype.getDiffSession=function(){return this.diffSession},e.prototype.setTheme=function(e){this.editorA&&this.editorA.setTheme(e),this.editorB&&this.editorB.setTheme(e)},e.prototype.getTheme=function(){return(this.editorA||this.editorB).getTheme()},e.prototype.onChangeTheme=function(e){var t=e&&e.theme||this.getTheme();this.editorA&&this.editorA.getTheme()!==t&&this.editorA.setTheme(t),this.editorB&&this.editorB.getTheme()!==t&&this.editorB.setTheme(t)},e.prototype.resize=function(e){this.editorA&&this.editorA.resize(e),this.editorB&&this.editorB.resize(e)},e.prototype.scheduleOnInput=function(){var e=this;this.$onInputTimer||(this.$onInputTimer=setTimeout((function(){e.$onInputTimer=null,e.onInput()})))},e.prototype.onInput=function(){var e=this;this.$onInputTimer&&clearTimeout(this.$onInputTimer);var t=this.sessionA.doc.getAllLines(),n=this.sessionB.doc.getAllLines();this.selectionRangeA=null,this.selectionRangeB=null;var i=this.$diffLines(t,n);this.diffSession.chunks=this.chunks=i,this.gutterDecoratorA&&this.gutterDecoratorA.setDecorations(i),this.gutterDecoratorB&&this.gutterDecoratorB.setDecorations(i),this.chunks&&this.chunks.length>this.$maxDiffs||(this.align(),this.editorA&&this.editorA.renderer.updateBackMarkers(),this.editorB&&this.editorB.renderer.updateBackMarkers(),setTimeout((function(){e.updateScrollBarDecorators()}),0),this.$foldUnchangedOnInput&&this.foldUnchanged())},e.prototype.setupScrollbars=function(){var e=this,t=function(t){setTimeout((function(){e.$setScrollBarDecorators(t),e.updateScrollBarDecorators()}),0)};this.inlineDiffEditor?t(this.activeEditor.renderer):(t(this.editorA.renderer),t(this.editorB.renderer))},e.prototype.$setScrollBarDecorators=function(e){e.$scrollDecorator&&e.$scrollDecorator.destroy(),e.$scrollDecorator=new u(e.scrollBarV,e,this.inlineDiffEditor),e.$scrollDecorator.setSessions(this.sessionA,this.sessionB),e.scrollBarV.setVisible(!0),e.scrollBarV.element.style.bottom=e.scrollBarH.getHeight()+"px"},e.prototype.$resetDecorators=function(e){e.$scrollDecorator&&e.$scrollDecorator.destroy(),e.$scrollDecorator=new f(e.scrollBarV,e)},e.prototype.updateScrollBarDecorators=function(){var e=this;if(this.inlineDiffEditor){if(!this.activeEditor)return;this.activeEditor.renderer.$scrollDecorator.$zones=[]}else{if(!this.editorA||!this.editorB)return;this.editorA.renderer.$scrollDecorator.$zones=[],this.editorB.renderer.$scrollDecorator.$zones=[]}var t=function(e,t){e&&"function"==typeof e.renderer.$scrollDecorator.addZone&&(t.old.start.row!=t.old.end.row&&e.renderer.$scrollDecorator.addZone(t.old.start.row,t.old.end.row-1,"delete"),t.new.start.row!=t.new.end.row&&e.renderer.$scrollDecorator.addZone(t.new.start.row,t.new.end.row-1,"insert"))};this.inlineDiffEditor?(this.chunks&&this.chunks.forEach((function(n){t(e.activeEditor,n)})),this.activeEditor.renderer.$scrollDecorator.$updateDecorators(this.activeEditor.renderer.layerConfig)):(this.chunks&&this.chunks.forEach((function(n){t(e.editorA,n),t(e.editorB,n)})),this.editorA.renderer.$scrollDecorator.$updateDecorators(this.editorA.renderer.layerConfig),this.editorB.renderer.$scrollDecorator.$updateDecorators(this.editorB.renderer.layerConfig))},e.prototype.$diffLines=function(e,t){return this.diffProvider.compute(e,t,{ignoreTrimWhitespace:this.$ignoreTrimWhitespace,maxComputationTimeMs:this.$maxComputationTimeMs})},e.prototype.setProvider=function(e){this.diffProvider=e},e.prototype.$addWidget=function(e,t){var n=e.lineWidgets[t.row];n&&(t.rowsAbove+=n.rowsAbove>t.rowsAbove?n.rowsAbove:t.rowsAbove,t.rowCount+=n.rowCount),e.lineWidgets[t.row]=t,e.widgetManager.lineWidgets[t.row]=t,e.$resetRowCache(t.row);var i=e.getFoldAt(t.row,0);i&&e.widgetManager.updateOnFold({data:i,action:"add"},e)},e.prototype.$initWidgets=function(e){var t=e.session;t.widgetManager||(t.widgetManager=new a(t),t.widgetManager.attach(e)),e.session.lineWidgets=[],e.session.widgetManager.lineWidgets=[],e.session.$resetRowCache(0)},e.prototype.$screenRow=function(e,t){var n=t.documentToScreenPosition(e).row,i=e.row-t.getLength()+1;return i>0&&(n+=i),n},e.prototype.align=function(){},e.prototype.onChangeWrapLimit=function(e,t){},e.prototype.onSelect=function(e,t){this.searchHighlight(t),this.syncSelect(t)},e.prototype.syncSelect=function(e){if(!this.$updatingSelection){var t=e.session===this.sessionA,n=e.getRange(),i=t?this.selectionRangeA:this.selectionRangeB;if(!i||!n.isEqual(i)){t?this.selectionRangeA=n:this.selectionRangeB=n,this.$updatingSelection=!0;var r=this.transformRange(n,t);this.$syncSelections&&(t?this.editorB:this.editorA).session.selection.setSelectionRange(r),this.$updatingSelection=!1,t?(this.selectionRangeA=n,this.selectionRangeB=r):(this.selectionRangeA=r,this.selectionRangeB=n),this.updateSelectionMarker(this.syncSelectionMarkerA,this.sessionA,this.selectionRangeA),this.updateSelectionMarker(this.syncSelectionMarkerB,this.sessionB,this.selectionRangeB)}}},e.prototype.updateSelectionMarker=function(e,t,n){e.setRange(n),t._signal("changeFrontMarker")},e.prototype.onChangeFold=function(e,t){var n=e.data;if(!this.$syncingFold&&n&&e.action){this.scheduleRealign();var i=t===this.sessionA,r=i?this.sessionB:this.sessionA;if("remove"===e.action&&(n.other?(n.other.other=null,r.removeFold(n.other)):n.lineWidget&&(r.widgetManager.addLineWidget(n.lineWidget),n.lineWidget=null,r.$editor&&r.$editor.renderer.updateBackMarkers())),"add"===e.action){var o=this.transformRange(n.range,i);if(o.isEmpty()){var s=o.start.row+1;r.lineWidgets[s]&&(n.lineWidget=r.lineWidgets[s],r.widgetManager.removeLineWidget(n.lineWidget),r.$editor&&r.$editor.renderer.updateBackMarkers())}else this.$syncingFold=!0,n.other=r.addFold(n.placeholder,o),n.other&&(n.other.other=n),this.$syncingFold=!1}}},e.prototype.scheduleRealign=function(){this.realignPending||(this.realignPending=!0,this.editorA.renderer.on("beforeRender",this.realign),this.editorB.renderer.on("beforeRender",this.realign))},e.prototype.realign=function(){this.realignPending=!0,this.editorA.renderer.off("beforeRender",this.realign),this.editorB.renderer.off("beforeRender",this.realign),this.align(),this.realignPending=!1},e.prototype.detach=function(){this.editorA&&this.editorB&&(this.savedOptionsA&&this.editorA.setOptions(this.savedOptionsA),this.savedOptionsB&&this.editorB.setOptions(this.savedOptionsB),this.editorA.renderer.off("beforeRender",this.realign),this.editorB.renderer.off("beforeRender",this.realign),this.$detachEventHandlers(),this.$removeLineWidgets(this.sessionA),this.$removeLineWidgets(this.sessionB),this.gutterDecoratorA&&this.gutterDecoratorA.dispose(),this.gutterDecoratorB&&this.gutterDecoratorB.dispose(),this.sessionA.selection.clearSelection(),this.sessionB.selection.clearSelection(),this.savedOptionsA&&this.savedOptionsA.customScrollbar&&this.$resetDecorators(this.editorA.renderer),this.savedOptionsB&&this.savedOptionsB.customScrollbar&&this.$resetDecorators(this.editorB.renderer))},e.prototype.$removeLineWidgets=function(e){e.lineWidgets=[],e.widgetManager.lineWidgets=[],e._signal("changeFold",{data:{start:{row:0}}})},e.prototype.$detachEventHandlers=function(){},e.prototype.destroy=function(){this.detach(),this.editorA&&this.editorA.destroy(),this.editorB&&this.editorB.destroy(),this.editorA=this.editorB=null},e.prototype.gotoNext=function(e){var t=this.activeEditor||this.editorA;this.inlineDiffEditor&&(t=this.editorA);var n=t==this.editorA,i=t.selection.lead.row,o=this.findChunkIndex(this.chunks,i,n),s=this.chunks[o+e]||this.chunks[o],a=t.session.getScrollTop();if(s){var u=s[n?"old":"new"],l=Math.max(u.start.row,u.end.row-1);t.selection.setRange(new r(l,0,l,0))}t.renderer.scrollSelectionIntoView(t.selection.lead,t.selection.anchor,.5),t.renderer.animateScrolling(a)},e.prototype.firstDiffSelected=function(){return this.currentDiffIndex<=1},e.prototype.lastDiffSelected=function(){return this.currentDiffIndex>this.chunks.length-1},e.prototype.transformRange=function(e,t){return r.fromPoints(this.transformPosition(e.start,t),this.transformPosition(e.end,t))},e.prototype.transformPosition=function(e,t){var n=this.findChunkIndex(this.chunks,e.row,t),r=this.chunks[n],o=this.sessionB.doc.clonePos,s=o(e),a=i(t?["old","new"]:["new","old"],2),u=a[0],l=a[1],h=0,d=!1;if(r)if(r[u].end.row<=e.row)s.row-=r[u].end.row-r[l].end.row;else if(r.charChanges)for(var c=0;c<r.charChanges.length;c++){var f=r.charChanges[c],g=f[u],m=f[l];if(!(g.end.row<e.row)){if(g.start.row>e.row)break;if(g.isMultiLine()&&g.contains(e.row,e.column)){s.row=m.start.row+e.row-g.start.row;var p=m.end.row;0===m.end.column&&p--,s.row>p&&(s.row=p,s.column=(t?this.sessionB:this.sessionA).getLine(p).length,d=!0),s.row=Math.min(s.row,p)}else{if(s.row=m.start.row,g.start.column>e.column)break;d=!0,!g.isEmpty()&&g.contains(e.row,e.column)?(s.column=m.start.column,h=e.column-g.start.column,h=Math.min(h,m.end.column-m.start.column)):(s=o(m.end),h=e.column-g.end.column)}}}else r[u].start.row<=e.row&&(s.row+=r[l].start.row-r[u].start.row,s.row>=r[l].end.row&&(s.row=r[l].end.row-1,s.column=(t?this.sessionB:this.sessionA).getLine(s.row).length));if(!d){var v=i(t?[this.sessionA,this.sessionB]:[this.sessionB,this.sessionA],2),y=v[0],w=v[1];h-=this.$getDeltaIndent(y,w,e.row,s.row)}return s.column+=h,s},e.prototype.$getDeltaIndent=function(e,t,n,i){return this.$getIndent(e,n)-this.$getIndent(t,i)},e.prototype.$getIndent=function(e,t){return e.getLine(t).match(/^\s*/)[0].length},e.prototype.printDiffs=function(){this.chunks.forEach((function(e){console.log(e.toString())}))},e.prototype.findChunkIndex=function(e,t,n){for(var i=0;i<e.length;i++){var r=e[i],o=n?r.old:r.new;if(!(o.end.row<t)&&o.start.row>t)break}return this.currentDiffIndex=i,i-1},e.prototype.searchHighlight=function(e){if(!this.$syncSelections&&!this.inlineDiffEditor){var t=e.session,n=t===this.sessionA?this.sessionB:this.sessionA;n.highlight(t.$searchHighlight.regExp),n._signal("changeBackMarker")}},e.prototype.initSelectionMarkers=function(){this.syncSelectionMarkerA=new E,this.syncSelectionMarkerB=new E,this.sessionA.addDynamicMarker(this.syncSelectionMarkerA,!0),this.sessionB.addDynamicMarker(this.syncSelectionMarkerB,!0)},e.prototype.clearSelectionMarkers=function(){this.sessionA.removeMarker(this.syncSelectionMarkerA.id),this.sessionB.removeMarker(this.syncSelectionMarkerB.id)},e}();s.defineOptions(v.prototype,"DiffView",{showOtherLineNumbers:{set:function(e){this.gutterLayer&&(this.gutterLayer.$renderer=e?null:y,this.editorA.renderer.updateFull())},initialValue:!0},folding:{set:function(e){if(this.editorA.setOption("showFoldWidgets",e),this.editorB.setOption("showFoldWidgets",e),!e){var t=[],n=[];this.chunks&&this.chunks.forEach((function(e){t.push(e.old.start,e.old.end),n.push(e.new.start,e.new.end)})),this.sessionA.unfold(t),this.sessionB.unfold(n)}}},syncSelections:{set:function(e){}},ignoreTrimWhitespace:{set:function(e){this.scheduleOnInput()}},wrap:{set:function(e){this.sessionA.setOption("wrap",e),this.sessionB.setOption("wrap",e)}},maxDiffs:{value:5e3},theme:{set:function(e){this.setTheme(e)},get:function(){return this.editorA.getTheme()}}});var y={getText:function(e){return""},getWidth:function(){return 0}};t.BaseDiffView=v;var w=function e(t,n,i){this.old=t,this.new=n,this.charChanges=i&&i.map((function(t){return new e(new r(t.originalStartLineNumber,t.originalStartColumn,t.originalEndLineNumber,t.originalEndColumn),new r(t.modifiedStartLineNumber,t.modifiedStartColumn,t.modifiedEndLineNumber,t.modifiedEndColumn))}))},b=function(){function e(e,t){this.id,this.diffView=e,this.type=t}return e.prototype.update=function(e,t,n,i){var o,s,a,u=this.diffView;-1===this.type?(o="old",s="delete",a="insert"):(o="new",s="insert",a="delete");var l=u.$ignoreTrimWhitespace,h=u.chunks;if(n.lineWidgets&&!u.inlineDiffEditor)for(var d=i.firstRow;d<=i.lastRow;d++){var c=n.lineWidgets[d];if(c&&!c.hidden){var f=n.documentToScreenRow(d,0);if(c.rowsAbove>0){var g=new r(f-c.rowsAbove,0,f-1,Number.MAX_VALUE);t.drawFullLineMarker(e,g,"ace_diff aligned_diff",i)}var m=f+c.rowCount-(c.rowsAbove||0);g=new r(f+1,0,m,Number.MAX_VALUE);t.drawFullLineMarker(e,g,"ace_diff aligned_diff",i)}}h.forEach((function(u){var h=u[o].start.row,d=u[o].end.row;if(!(d<i.firstRow||h>i.lastRow)){var c=new r(h,0,d-1,1<<30);if(h!==d&&(c=c.toScreenRange(n),t.drawFullLineMarker(e,c,"ace_diff "+s,i)),u.charChanges)for(var f=0;f<u.charChanges.length;f++){var g=u.charChanges[f][o];if(0==g.end.column&&g.end.row>g.start.row&&g.end.row==u[o].end.row&&(g.end.row--,g.end.column=Number.MAX_VALUE),l)for(var m=g.start.row;m<=g.end.row;m++){var p=void 0,v=void 0,y=n.getLine(m).match(/^\s*/)[0].length,w=n.getLine(m).length;p=m===g.start.row?g.start.column:y,v=m===g.end.row?g.end.column:w;var b=new r(m,p,m,v),E=b.toScreenRange(n);if(y!==p||w!==v){var L="inline "+s;b.isEmpty()&&0!==p&&(L="inline "+a+" empty"),t.drawSingleLineMarker(e,E,"ace_diff "+L,i)}}else{var x=new r(g.start.row,g.start.column,g.end.row,g.end.column);E=x.toScreenRange(n),L="inline "+s;x.isEmpty()&&0!==g.start.column&&(L="inline empty "+a),E.isMultiLine()?t.drawTextMarker(e,E,"ace_diff "+L,i):t.drawSingleLineMarker(e,E,"ace_diff "+L,i)}}}}))},e}(),E=function(){function e(){this.id,this.type="fullLine",this.clazz="ace_diff-active-line"}return e.prototype.update=function(e,t,n,i){},e.prototype.setRange=function(e){var t=e.clone();t.end.column++,this.range=t},e}();t.DiffChunk=w,t.DiffHighlight=b})),ace.define("ace/ext/diff/inline_diff_view",["require","exports","module","ace/ext/diff/base_diff_view","ace/virtual_renderer","ace/config"],(function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=e("./base_diff_view").BaseDiffView,s=e("../../virtual_renderer").VirtualRenderer,a=e("../../config"),u=function(e){function t(t,n){var i=this;return(t=t||{}).inline=t.inline||"a",(i=e.call(this,!0,n)||this).init(t),i}return r(t,e),t.prototype.init=function(e){this.onSelect=this.onSelect.bind(this),this.onAfterRender=this.onAfterRender.bind(this),this.$setupModels(e),this.onChangeTheme(),a.resetOptions(this),a._signal("diffView",this);var t=this.activeEditor.renderer.$padding;this.addGutterDecorators(),this.otherEditor.renderer.setPadding(t),this.textLayer=this.otherEditor.renderer.$textLayer,this.markerLayer=this.otherEditor.renderer.$markerBack,this.gutterLayer=this.otherEditor.renderer.$gutterLayer,this.cursorLayer=this.otherEditor.renderer.$cursorLayer,this.otherEditor.renderer.$updateCachedSize=function(){};var n=this.activeEditor.renderer.$textLayer.element;n.parentNode.insertBefore(this.textLayer.element,n);var i=this.activeEditor.renderer.$markerBack.element;i.parentNode.insertBefore(this.markerLayer.element,i.nextSibling);var r=this.activeEditor.renderer.$gutterLayer.element;r.parentNode.insertBefore(this.gutterLayer.element,r.nextSibling),r.style.position="absolute",this.gutterLayer.element.style.position="absolute",this.gutterLayer.element.style.width="100%",this.gutterLayer.element.classList.add("ace_mini-diff_gutter_other"),this.gutterLayer.$updateGutterWidth=function(){},this.initMouse(),this.initTextInput(),this.initTextLayer(),this.initRenderer(),this.$attachEventHandlers(),this.selectEditor(this.activeEditor)},t.prototype.initRenderer=function(e){var t=this;e?delete this.activeEditor.renderer.$getLongestLine:this.editorA.renderer.$getLongestLine=this.editorB.renderer.$getLongestLine=function(){var e=s.prototype.$getLongestLine;return Math.max(e.call(t.editorA.renderer),e.call(t.editorB.renderer))}},t.prototype.initTextLayer=function(){var e=this.textLayer.$renderLine,t=this;this.otherEditor.renderer.$textLayer.$renderLine=function(i,r,o){(function(e,t){var i=0,r=e.length-1,o=-1;for(;i<r;){var s=Math.floor((i+r)/2),a=e[s][n].start.row;if(a<t)o=s,i=s+1;else{if(!(a>t)){o=s;break}r=s-1}}e[o+1]&&e[o+1][n].start.row<=t&&o++;var u=e[o]&&e[o][n];if(u&&u.end.row>t)return!0;return!1})(t.chunks,r)&&e.call(this,i,r,o)};var n=this.showSideA?"new":"old"},t.prototype.initTextInput=function(e){e?(this.otherEditor.textInput=this.othertextInput,this.otherEditor.container=this.otherEditorContainer):(this.othertextInput=this.otherEditor.textInput,this.otherEditor.textInput=this.activeEditor.textInput,this.otherEditorContainer=this.otherEditor.container,this.otherEditor.container=this.activeEditor.container)},t.prototype.selectEditor=function(e){e==this.activeEditor?(this.otherEditor.selection.clearSelection(),this.activeEditor.textInput.setHost(this.activeEditor),this.activeEditor.setStyle("ace_diff_other",!1),this.cursorLayer.element.remove(),this.activeEditor.renderer.$cursorLayer.element.style.display="block",this.showSideA&&(this.sessionA.removeMarker(this.syncSelectionMarkerA.id),this.sessionA.addDynamicMarker(this.syncSelectionMarkerA,!0)),this.markerLayer.element.classList.add("ace_hidden_marker-layer"),this.activeEditor.renderer.$markerBack.element.classList.remove("ace_hidden_marker-layer"),this.removeBracketHighlight(this.otherEditor)):(this.activeEditor.selection.clearSelection(),this.activeEditor.textInput.setHost(this.otherEditor),this.activeEditor.setStyle("ace_diff_other"),this.activeEditor.renderer.$cursorLayer.element.parentNode.appendChild(this.cursorLayer.element),this.activeEditor.renderer.$cursorLayer.element.style.display="none",this.activeEditor.$isFocused&&this.otherEditor.onFocus(),this.showSideA&&this.sessionA.removeMarker(this.syncSelectionMarkerA.id),this.markerLayer.element.classList.remove("ace_hidden_marker-layer"),this.activeEditor.renderer.$markerBack.element.classList.add("ace_hidden_marker-layer"),this.removeBracketHighlight(this.activeEditor))},t.prototype.removeBracketHighlight=function(e){var t=e.session;t.$bracketHighlight&&(t.$bracketHighlight.markerIds.forEach((function(e){t.removeMarker(e)})),t.$bracketHighlight=null)},t.prototype.initMouse=function(){var e=this;this.otherEditor.renderer.$loop=this.activeEditor.renderer.$loop,this.otherEditor.renderer.scroller={getBoundingClientRect:function(){return e.activeEditor.renderer.scroller.getBoundingClientRect()},style:this.activeEditor.renderer.scroller.style};var t=function(t){if(t.domEvent){var n=t.editor.renderer.pixelToScreenCoordinates(t.clientX,t.clientY),i=e.activeEditor.session,r=e.otherEditor.session,o=i.screenToDocumentPosition(n.row,n.column,n.offsetX),s=r.screenToDocumentPosition(n.row,n.column,n.offsetX),a=i.documentToScreenPosition(o),u=r.documentToScreenPosition(s);t.editor==e.activeEditor&&(u.row==n.row&&a.row!=n.row?("mousedown"==t.type&&e.selectEditor(e.otherEditor),t.propagationStopped=!0,t.defaultPrevented=!0,e.otherEditor.$mouseHandler.onMouseEvent(t.type,t.domEvent)):"mousedown"==t.type&&e.selectEditor(e.activeEditor))}},n=["mousedown","click","mouseup","dblclick","tripleclick","quadclick"];n.forEach((function(n){e.activeEditor.on(n,t,!0),e.activeEditor.on("gutter"+n,t,!0)}));var i=function(t){e.activeEditor.onFocus(t)},r=function(t){e.activeEditor.onBlur(t)};this.otherEditor.on("focus",i),this.otherEditor.on("blur",r),this.onMouseDetach=function(){n.forEach((function(n){e.activeEditor.off(n,t,!0),e.activeEditor.off("gutter"+n,t,!0)})),e.otherEditor.off("focus",i),e.otherEditor.off("blur",r)}},t.prototype.align=function(){var e=this;this.$initWidgets(e.editorA),this.$initWidgets(e.editorB),e.chunks.forEach((function(t){var n=e.$screenRow(t.old.end,e.sessionA)-e.$screenRow(t.old.start,e.sessionA),i=e.$screenRow(t.new.end,e.sessionB)-e.$screenRow(t.new.start,e.sessionB);e.$addWidget(e.sessionA,{rowCount:i,rowsAbove:0===t.old.end.row?i:0,row:0===t.old.end.row?0:t.old.end.row-1}),e.$addWidget(e.sessionB,{rowCount:n,rowsAbove:n,row:t.new.start.row})})),e.sessionA._emit("changeFold",{data:{start:{row:0}}}),e.sessionB._emit("changeFold",{data:{start:{row:0}}})},t.prototype.onChangeWrapLimit=function(){this.sessionB.adjustWrapLimit(this.sessionA.$wrapLimit),this.scheduleRealign()},t.prototype.$attachSessionsEventHandlers=function(){this.$attachSessionEventHandlers(this.editorA,this.markerA),this.$attachSessionEventHandlers(this.editorB,this.markerB),this.sessionA.on("changeWrapLimit",this.onChangeWrapLimit),this.sessionA.on("changeWrapMode",this.onChangeWrapLimit)},t.prototype.$attachSessionEventHandlers=function(e,t){e.session.on("changeFold",this.onChangeFold),e.session.addDynamicMarker(t),e.selection.on("changeCursor",this.onSelect),e.selection.on("changeSelection",this.onSelect)},t.prototype.$detachSessionsEventHandlers=function(){this.$detachSessionHandlers(this.editorA,this.markerA),this.$detachSessionHandlers(this.editorB,this.markerB),this.otherSession.bgTokenizer.lines.fill(void 0),this.sessionA.off("changeWrapLimit",this.onChangeWrapLimit),this.sessionA.off("changeWrapMode",this.onChangeWrapLimit)},t.prototype.$detachSessionHandlers=function(e,t){e.session.removeMarker(t.id),e.selection.off("changeCursor",this.onSelect),e.selection.off("changeSelection",this.onSelect),e.session.off("changeFold",this.onChangeFold)},t.prototype.$attachEventHandlers=function(){this.activeEditor.on("input",this.onInput),this.activeEditor.renderer.on("afterRender",this.onAfterRender),this.otherSession.on("change",this.onInput)},t.prototype.$detachEventHandlers=function(){this.$detachSessionsEventHandlers(),this.activeEditor.off("input",this.onInput),this.activeEditor.renderer.off("afterRender",this.onAfterRender),this.otherSession.off("change",this.onInput),this.textLayer.element.textContent="",this.textLayer.element.remove(),this.gutterLayer.element.textContent="",this.gutterLayer.element.remove(),this.markerLayer.element.textContent="",this.markerLayer.element.remove(),this.onMouseDetach(),this.selectEditor(this.activeEditor),this.clearSelectionMarkers(),this.otherEditor.setSession(null),this.otherEditor.renderer.$loop=null,this.initTextInput(!0),this.initRenderer(!0),this.otherEditor.destroy()},t.prototype.onAfterRender=function(e,t){var n=t.layerConfig,i=this.otherSession,r=this.otherEditor.renderer;i.$scrollTop=t.scrollTop,i.$scrollLeft=t.scrollLeft,["characterWidth","lineHeight","scrollTop","scrollLeft","scrollMargin","$padding","$size","layerConfig","$horizScroll","$vScroll"].forEach((function(e){r[e]=t[e]})),r.$computeLayerConfig();var o=r.layerConfig;this.gutterLayer.update(o),o.firstRowScreen=n.firstRowScreen,r.$cursorLayer.config=o,r.$cursorLayer.update(o),(e&r.CHANGE_LINES||e&r.CHANGE_FULL||e&r.CHANGE_SCROLL||e&r.CHANGE_TEXT)&&this.textLayer.update(o),this.markerLayer.setMarkers(this.otherSession.getMarkers()),this.markerLayer.update(o)},t.prototype.detach=function(){e.prototype.detach.call(this),this.otherEditor&&this.otherEditor.destroy()},t}(o);t.InlineDiffView=u})),ace.define("ace/ext/diff/split_diff_view",["require","exports","module","ace/ext/diff/base_diff_view","ace/config"],(function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=e("./base_diff_view").BaseDiffView,s=e("../../config"),a=function(e){function t(t){var n=this;return t=t||{},(n=e.call(this)||this).init(t),n}return r(t,e),t.prototype.init=function(e){this.onChangeTheme=this.onChangeTheme.bind(this),this.onMouseWheel=this.onMouseWheel.bind(this),this.onScroll=this.onScroll.bind(this),this.$setupModels(e),this.addGutterDecorators(),this.onChangeTheme(),s.resetOptions(this),s._signal("diffView",this),this.$attachEventHandlers()},t.prototype.onChangeWrapLimit=function(){this.scheduleRealign()},t.prototype.align=function(){var e=this;this.$initWidgets(e.editorA),this.$initWidgets(e.editorB),e.chunks.forEach((function(t){var n,i;(n=e.$screenRow(t.old.start,e.sessionA))<(i=e.$screenRow(t.new.start,e.sessionB))?e.$addWidget(e.sessionA,{rowCount:i-n,rowsAbove:0===t.old.start.row?i-n:0,row:0===t.old.start.row?0:t.old.start.row-1}):n>i&&e.$addWidget(e.sessionB,{rowCount:n-i,rowsAbove:0===t.new.start.row?n-i:0,row:0===t.new.start.row?0:t.new.start.row-1}),(n=e.$screenRow(t.old.end,e.sessionA))<(i=e.$screenRow(t.new.end,e.sessionB))?e.$addWidget(e.sessionA,{rowCount:i-n,rowsAbove:0===t.old.end.row?i-n:0,row:0===t.old.end.row?0:t.old.end.row-1}):n>i&&e.$addWidget(e.sessionB,{rowCount:n-i,rowsAbove:0===t.new.end.row?n-i:0,row:0===t.new.end.row?0:t.new.end.row-1})})),e.sessionA._emit("changeFold",{data:{start:{row:0}}}),e.sessionB._emit("changeFold",{data:{start:{row:0}}})},t.prototype.onScroll=function(e,t){this.syncScroll(this.sessionA===t?this.editorA.renderer:this.editorB.renderer)},t.prototype.syncScroll=function(e){if(0!=this.$syncScroll){var t=this.editorA.renderer,n=this.editorB.renderer,i=e==t;if(!t.$scrollAnimation||!n.$scrollAnimation){var r=Date.now();if(!(this.scrollSetBy!=e&&r-this.scrollSetAt<500)){var o=i?t:n;if(this.scrollSetBy!=e){if(i&&this.scrollA==o.session.getScrollTop())return;if(!i&&this.scrollB==o.session.getScrollTop())return}var s=i?n:t,a=o.session.getScrollTop();this.$syncScroll=!1,i?(this.scrollA=o.session.getScrollTop(),this.scrollB=a):(this.scrollA=a,this.scrollB=o.session.getScrollTop()),this.scrollSetBy=e,s.session.setScrollTop(a),this.$syncScroll=!0,this.scrollSetAt=r}}}},t.prototype.onMouseWheel=function(e){if(!e.getAccelKey()){e.getShiftKey()&&e.wheelY&&!e.wheelX&&(e.wheelX=e.wheelY,e.wheelY=0);var t=e.editor;if(!t.renderer.isScrollableBy(e.wheelX*e.speed,e.wheelY*e.speed)){var n=t==this.editorA?this.editorB:this.editorA;return n.renderer.isScrollableBy(e.wheelX*e.speed,e.wheelY*e.speed)&&n.renderer.scrollBy(e.wheelX*e.speed,e.wheelY*e.speed),e.stop()}}},t.prototype.$attachSessionsEventHandlers=function(){this.$attachSessionEventHandlers(this.editorA,this.markerA),this.$attachSessionEventHandlers(this.editorB,this.markerB)},t.prototype.$attachSessionEventHandlers=function(e,t){e.session.on("changeScrollTop",this.onScroll),e.session.on("changeFold",this.onChangeFold),e.session.addDynamicMarker(t),e.selection.on("changeCursor",this.onSelect),e.selection.on("changeSelection",this.onSelect),e.session.on("changeWrapLimit",this.onChangeWrapLimit),e.session.on("changeWrapMode",this.onChangeWrapLimit)},t.prototype.$detachSessionsEventHandlers=function(){this.$detachSessionHandlers(this.editorA,this.markerA),this.$detachSessionHandlers(this.editorB,this.markerB)},t.prototype.$detachSessionHandlers=function(e,t){e.session.off("changeScrollTop",this.onScroll),e.session.off("changeFold",this.onChangeFold),e.session.removeMarker(t.id),e.selection.off("changeCursor",this.onSelect),e.selection.off("changeSelection",this.onSelect),e.session.off("changeWrapLimit",this.onChangeWrapLimit),e.session.off("changeWrapMode",this.onChangeWrapLimit)},t.prototype.$attachEventHandlers=function(){this.editorA.renderer.on("themeChange",this.onChangeTheme),this.editorB.renderer.on("themeChange",this.onChangeTheme),this.editorA.on("mousewheel",this.onMouseWheel),this.editorB.on("mousewheel",this.onMouseWheel),this.editorA.on("input",this.onInput),this.editorB.on("input",this.onInput)},t.prototype.$detachEventHandlers=function(){this.$detachSessionsEventHandlers(),this.clearSelectionMarkers(),this.editorA.renderer.off("themeChange",this.onChangeTheme),this.editorB.renderer.off("themeChange",this.onChangeTheme),this.$detachEditorEventHandlers(this.editorA),this.$detachEditorEventHandlers(this.editorB)},t.prototype.$detachEditorEventHandlers=function(e){e.off("mousewheel",this.onMouseWheel),e.off("input",this.onInput)},t}(o);t.SplitDiffView=a})),ace.define("ace/ext/diff/providers/default",["require","exports","module","ace/range","ace/ext/diff/base_diff_view"],(function(e,t,n){"use strict";var i,r,o,s,a,u,l,h=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),d=this&&this.__generator||function(e,t){var n,i,r,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(u){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(o=0)),o;)try{if(n=1,i&&(r=2&a[0]?i.return:a[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,a[1])).done)return r;switch(i=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,i=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(r=o.trys,(r=r.length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){o.label=a[1];break}if(6===a[0]&&o.label<r[1]){o.label=r[1],r=a;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(a);break}r[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],i=0}finally{n=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}},c=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};function f(e,t){return function(n,i){return t(e(n),e(i))}}var g=function(e,t){return e-t};var m=function(e){function t(n){var i=e.call(this,n||"An unexpected bug occurred.")||this;return Object.setPrototypeOf(i,t.prototype),i}return h(t,e),t}(Error);function p(e){e()}var v=function(){function e(e,t){if(this.start=e,this.endExclusive=t,e>t)throw new m("Invalid range: ".concat(this.toString()))}return e.fromTo=function(t,n){return new e(t,n)},e.addRange=function(t,n){for(var i=0;i<n.length&&n[i].endExclusive<t.start;)i++;for(var r=i;r<n.length&&n[r].start<=t.endExclusive;)r++;if(i===r)n.splice(i,0,t);else{var o=Math.min(t.start,n[i].start),s=Math.max(t.endExclusive,n[r-1].endExclusive);n.splice(i,r-i,new e(o,s))}},e.tryCreate=function(t,n){if(!(t>n))return new e(t,n)},e.ofLength=function(t){return new e(0,t)},e.ofStartAndLength=function(t,n){return new e(t,t+n)},e.emptyAt=function(t){return new e(t,t)},Object.defineProperty(e.prototype,"isEmpty",{get:function(){return this.start===this.endExclusive},enumerable:!1,configurable:!0}),e.prototype.delta=function(t){return new e(this.start+t,this.endExclusive+t)},e.prototype.deltaStart=function(t){return new e(this.start+t,this.endExclusive)},e.prototype.deltaEnd=function(t){return new e(this.start,this.endExclusive+t)},Object.defineProperty(e.prototype,"length",{get:function(){return this.endExclusive-this.start},enumerable:!1,configurable:!0}),e.prototype.toString=function(){return"[".concat(this.start,", ").concat(this.endExclusive,")")},e.prototype.equals=function(e){return this.start===e.start&&this.endExclusive===e.endExclusive},e.prototype.containsRange=function(e){return this.start<=e.start&&e.endExclusive<=this.endExclusive},e.prototype.contains=function(e){return this.start<=e&&e<this.endExclusive},e.prototype.join=function(t){return new e(Math.min(this.start,t.start),Math.max(this.endExclusive,t.endExclusive))},e.prototype.intersect=function(t){var n=Math.max(this.start,t.start),i=Math.min(this.endExclusive,t.endExclusive);if(n<=i)return new e(n,i)},e.prototype.intersectionLength=function(e){var t=Math.max(this.start,e.start),n=Math.min(this.endExclusive,e.endExclusive);return Math.max(0,n-t)},e.prototype.intersects=function(e){return Math.max(this.start,e.start)<Math.min(this.endExclusive,e.endExclusive)},e.prototype.intersectsOrTouches=function(e){return Math.max(this.start,e.start)<=Math.min(this.endExclusive,e.endExclusive)},e.prototype.isBefore=function(e){return this.endExclusive<=e.start},e.prototype.isAfter=function(e){return this.start>=e.endExclusive},e.prototype.slice=function(e){return e.slice(this.start,this.endExclusive)},e.prototype.substring=function(e){return e.substring(this.start,this.endExclusive)},e.prototype.clip=function(e){if(this.isEmpty)throw new m("Invalid clipping range: ".concat(this.toString()));return Math.max(this.start,Math.min(this.endExclusive-1,e))},e.prototype.clipCyclic=function(e){if(this.isEmpty)throw new m("Invalid clipping range: ".concat(this.toString()));return e<this.start?this.endExclusive-(this.start-e)%this.length:e>=this.endExclusive?this.start+(e-this.start)%this.length:e},e.prototype.map=function(e){for(var t=[],n=this.start;n<this.endExclusive;n++)t.push(e(n));return t},e.prototype.forEach=function(e){for(var t=this.start;t<this.endExclusive;t++)e(t)},e}(),y=function(){function e(e,t){this.lineNumber=e,this.column=t}return e.prototype.equals=function(t){return e.equals(this,t)},e.equals=function(e,t){return!e&&!t||!!e&&!!t&&e.lineNumber===t.lineNumber&&e.column===t.column},e.prototype.isBefore=function(t){return e.isBefore(this,t)},e.isBefore=function(e,t){return e.lineNumber<t.lineNumber||!(t.lineNumber<e.lineNumber)&&e.column<t.column},e.prototype.isBeforeOrEqual=function(t){return e.isBeforeOrEqual(this,t)},e.isBeforeOrEqual=function(e,t){return e.lineNumber<t.lineNumber||!(t.lineNumber<e.lineNumber)&&e.column<=t.column},e}(),w=function(){function e(e,t,n,i){e>n||e===n&&t>i?(this.startLineNumber=n,this.startColumn=i,this.endLineNumber=e,this.endColumn=t):(this.startLineNumber=e,this.startColumn=t,this.endLineNumber=n,this.endColumn=i)}return e.prototype.isEmpty=function(){return e.isEmpty(this)},e.isEmpty=function(e){return e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn},e.prototype.containsPosition=function(t){return e.containsPosition(this,t)},e.containsPosition=function(e,t){return!(t.lineNumber<e.startLineNumber||t.lineNumber>e.endLineNumber)&&(!(t.lineNumber===e.startLineNumber&&t.column<e.startColumn)&&!(t.lineNumber===e.endLineNumber&&t.column>e.endColumn))},e.prototype.containsRange=function(t){return e.containsRange(this,t)},e.containsRange=function(e,t){return!(t.startLineNumber<e.startLineNumber||t.endLineNumber<e.startLineNumber)&&(!(t.startLineNumber>e.endLineNumber||t.endLineNumber>e.endLineNumber)&&(!(t.startLineNumber===e.startLineNumber&&t.startColumn<e.startColumn)&&!(t.endLineNumber===e.endLineNumber&&t.endColumn>e.endColumn)))},e.prototype.strictContainsRange=function(t){return e.strictContainsRange(this,t)},e.strictContainsRange=function(e,t){return!(t.startLineNumber<e.startLineNumber||t.endLineNumber<e.startLineNumber)&&(!(t.startLineNumber>e.endLineNumber||t.endLineNumber>e.endLineNumber)&&(!(t.startLineNumber===e.startLineNumber&&t.startColumn<=e.startColumn)&&!(t.endLineNumber===e.endLineNumber&&t.endColumn>=e.endColumn)))},e.prototype.plusRange=function(t){return e.plusRange(this,t)},e.plusRange=function(t,n){var i,r,o,s;return n.startLineNumber<t.startLineNumber?(i=n.startLineNumber,r=n.startColumn):n.startLineNumber===t.startLineNumber?(i=n.startLineNumber,r=Math.min(n.startColumn,t.startColumn)):(i=t.startLineNumber,r=t.startColumn),n.endLineNumber>t.endLineNumber?(o=n.endLineNumber,s=n.endColumn):n.endLineNumber===t.endLineNumber?(o=n.endLineNumber,s=Math.max(n.endColumn,t.endColumn)):(o=t.endLineNumber,s=t.endColumn),new e(i,r,o,s)},e.prototype.intersectRanges=function(t){return e.intersectRanges(this,t)},e.intersectRanges=function(t,n){var i=t.startLineNumber,r=t.startColumn,o=t.endLineNumber,s=t.endColumn,a=n.startLineNumber,u=n.startColumn,l=n.endLineNumber,h=n.endColumn;return i<a?(i=a,r=u):i===a&&(r=Math.max(r,u)),o>l?(o=l,s=h):o===l&&(s=Math.min(s,h)),i>o||i===o&&r>s?null:new e(i,r,o,s)},e.prototype.equalsRange=function(t){return e.equalsRange(this,t)},e.equalsRange=function(e,t){return!e&&!t||!!e&&!!t&&e.startLineNumber===t.startLineNumber&&e.startColumn===t.startColumn&&e.endLineNumber===t.endLineNumber&&e.endColumn===t.endColumn},e.prototype.getEndPosition=function(){return e.getEndPosition(this)},e.getEndPosition=function(e){return new y(e.endLineNumber,e.endColumn)},e.prototype.getStartPosition=function(){return e.getStartPosition(this)},e.getStartPosition=function(e){return new y(e.startLineNumber,e.startColumn)},e.prototype.collapseToStart=function(){return e.collapseToStart(this)},e.collapseToStart=function(t){return new e(t.startLineNumber,t.startColumn,t.startLineNumber,t.startColumn)},e.prototype.collapseToEnd=function(){return e.collapseToEnd(this)},e.collapseToEnd=function(t){return new e(t.endLineNumber,t.endColumn,t.endLineNumber,t.endColumn)},e.fromPositions=function(t,n){return void 0===n&&(n=t),new e(t.lineNumber,t.column,n.lineNumber,n.column)},e}();function b(e,t){var n=E(e,t);return-1===n?void 0:e[n]}function E(e,t,n,i){void 0===n&&(n=0),void 0===i&&(i=e.length);for(var r=n,o=i;r<o;){var s=Math.floor((r+o)/2);t(e[s])?r=s+1:o=s}return r-1}function L(e,t,n,i){void 0===n&&(n=0),void 0===i&&(i=e.length);for(var r=n,o=i;r<o;){var s=Math.floor((r+o)/2);t(e[s])?o=s:r=s+1}return r}var x=function(){function e(e){this._array=e,this._findLastMonotonousLastIdx=0}return e.prototype.findLastMonotonous=function(e){var t,n;if(o.assertInvariants){if(this._prevFindLastPredicate)try{for(var i=c(this._array),r=i.next();!r.done;r=i.next()){var s=r.value;if(this._prevFindLastPredicate(s)&&!e(s))throw new Error("MonotonousArray: current predicate must be weaker than (or equal to) the previous predicate.")}}catch(e){t={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}this._prevFindLastPredicate=e}var a=E(this._array,e,this._findLastMonotonousLastIdx);return this._findLastMonotonousLastIdx=a+1,-1===a?void 0:this._array[a]},e}();(o=x).assertInvariants=!1;var R=function(){function e(e,t){if(e>t)throw new m("startLineNumber ".concat(e," cannot be after endLineNumberExclusive ").concat(t));this.startLineNumber=e,this.endLineNumberExclusive=t}return e.fromRangeInclusive=function(t){return new e(t.startLineNumber,t.endLineNumber+1)},e.join=function(t){if(0===t.length)throw new m("lineRanges cannot be empty");for(var n=t[0].startLineNumber,i=t[0].endLineNumberExclusive,r=1;r<t.length;r++)n=Math.min(n,t[r].startLineNumber),i=Math.max(i,t[r].endLineNumberExclusive);return new e(n,i)},e.ofLength=function(t,n){return new e(t,t+n)},Object.defineProperty(e.prototype,"isEmpty",{get:function(){return this.startLineNumber===this.endLineNumberExclusive},enumerable:!1,configurable:!0}),e.prototype.delta=function(t){return new e(this.startLineNumber+t,this.endLineNumberExclusive+t)},Object.defineProperty(e.prototype,"length",{get:function(){return this.endLineNumberExclusive-this.startLineNumber},enumerable:!1,configurable:!0}),e.prototype.join=function(t){return new e(Math.min(this.startLineNumber,t.startLineNumber),Math.max(this.endLineNumberExclusive,t.endLineNumberExclusive))},e.prototype.intersect=function(t){var n=Math.max(this.startLineNumber,t.startLineNumber),i=Math.min(this.endLineNumberExclusive,t.endLineNumberExclusive);if(n<=i)return new e(n,i)},e.prototype.overlapOrTouch=function(e){return this.startLineNumber<=e.endLineNumberExclusive&&e.startLineNumber<=this.endLineNumberExclusive},e.prototype.toInclusiveRange=function(){return this.isEmpty?null:new w(this.startLineNumber,1,this.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER)},e.prototype.toOffsetRange=function(){return new v(this.startLineNumber-1,this.endLineNumberExclusive-1)},e}(),N=function(){function e(e){void 0===e&&(e=[]),this._normalizedRanges=e}return Object.defineProperty(e.prototype,"ranges",{get:function(){return this._normalizedRanges},enumerable:!1,configurable:!0}),e.prototype.addRange=function(e){if(0!==e.length){var t=L(this._normalizedRanges,(function(t){return t.endLineNumberExclusive>=e.startLineNumber})),n=E(this._normalizedRanges,(function(t){return t.startLineNumber<=e.endLineNumberExclusive}))+1;if(t===n)this._normalizedRanges.splice(t,0,e);else if(t===n-1){var i=this._normalizedRanges[t];this._normalizedRanges[t]=i.join(e)}else{i=this._normalizedRanges[t].join(this._normalizedRanges[n-1]).join(e);this._normalizedRanges.splice(t,n-t,i)}}},e.prototype.contains=function(e){var t=b(this._normalizedRanges,(function(t){return t.startLineNumber<=e}));return!!t&&t.endLineNumberExclusive>e},e.prototype.subtractFrom=function(t){var n=L(this._normalizedRanges,(function(e){return e.endLineNumberExclusive>=t.startLineNumber})),i=E(this._normalizedRanges,(function(e){return e.startLineNumber<=t.endLineNumberExclusive}))+1;if(n===i)return new e([t]);for(var r=[],o=t.startLineNumber,s=n;s<i;s++){var a=this._normalizedRanges[s];a.startLineNumber>o&&r.push(new R(o,a.startLineNumber)),o=a.endLineNumberExclusive}return o<t.endLineNumberExclusive&&r.push(new R(o,t.endLineNumberExclusive)),new e(r)},e.prototype.getIntersection=function(t){for(var n=[],i=0,r=0;i<this._normalizedRanges.length&&r<t._normalizedRanges.length;){var o=this._normalizedRanges[i],s=t._normalizedRanges[r],a=o.intersect(s);a&&!a.isEmpty&&n.push(a),o.endLineNumberExclusive<s.endLineNumberExclusive?i++:r++}return new e(n)},e.prototype.getWithDelta=function(t){return new e(this._normalizedRanges.map((function(e){return e.delta(t)})))},e}(),S=function(){function e(e,t){this.lineCount=e,this.columnCount=t}return e.prototype.toLineRange=function(){return R.ofLength(1,this.lineCount)},e.prototype.addToPosition=function(e){return 0===this.lineCount?new y(e.lineNumber,e.column+this.columnCount):new y(e.lineNumber+this.lineCount,this.columnCount+1)},e}();(s=S).zero=new s(0,0);var A=function(e){function t(t){return e.call(this,(function(e){return t[e-1]}),t.length)||this}return h(t,e),t}(function(){function e(e,t){!function(e,t){if(void 0===t&&(t="unexpected state"),!e)throw new m("Assertion Failed: ".concat(t))}(t>=1),this._getLineContent=e,this._lineCount=t}return e.prototype.getValueOfRange=function(e){if(e.startLineNumber===e.endLineNumber)return this._getLineContent(e.startLineNumber).substring(e.startColumn-1,e.endColumn-1);for(var t=this._getLineContent(e.startLineNumber).substring(e.startColumn-1),n=e.startLineNumber+1;n<e.endLineNumber;n++)t+="\n"+this._getLineContent(n);return t+="\n"+this._getLineContent(e.endLineNumber).substring(0,e.endColumn-1)},e.prototype.getLineLength=function(e){return this._getLineContent(e).length},Object.defineProperty(e.prototype,"length",{get:function(){var e=this._getLineContent(this._lineCount);return new S(this._lineCount-1,e.length)},enumerable:!1,configurable:!0}),e}()),_=function(e,t,n){this.changes=e,this.moves=t,this.hitTimeout=n},C=function(e,t){this.lineRangeMapping=e,this.changes=t},B=function(){function e(e,t){this.original=e,this.modified=t}return e.prototype.join=function(t){return new e(this.original.join(t.original),this.modified.join(t.modified))},Object.defineProperty(e.prototype,"changedLineCount",{get:function(){return Math.max(this.original.length,this.modified.length)},enumerable:!1,configurable:!0}),e.prototype.toRangeMapping=function(){var e=this.original.toInclusiveRange(),t=this.modified.toInclusiveRange();if(e&&t)return new q(e,t);if(1===this.original.startLineNumber||1===this.modified.startLineNumber){if(1!==this.modified.startLineNumber||1!==this.original.startLineNumber)throw new m("not a valid diff");return new q(new w(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new w(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1))}return new q(new w(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),new w(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER))},e.prototype.toRangeMapping2=function(e,t){if(M(this.original.endLineNumberExclusive,e)&&M(this.modified.endLineNumberExclusive,t))return new q(new w(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new w(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1));if(!this.original.isEmpty&&!this.modified.isEmpty)return new q(w.fromPositions(new y(this.original.startLineNumber,1),$(new y(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),e)),w.fromPositions(new y(this.modified.startLineNumber,1),$(new y(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),t)));if(this.original.startLineNumber>1&&this.modified.startLineNumber>1)return new q(w.fromPositions($(new y(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER),e),$(new y(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),e)),w.fromPositions($(new y(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER),t),$(new y(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),t)));throw new m},e}();function $(e,t){if(e.lineNumber<1)return new y(1,1);if(e.lineNumber>t.length)return new y(t.length,t[t.length-1].length+1);var n=t[e.lineNumber-1];return e.column>n.length+1?new y(e.lineNumber,n.length+1):e}function M(e,t){return e>=1&&e<=t.length}var k=function(e){function t(t,n,i){var r=e.call(this,t,n)||this;return r.innerChanges=i,r}return h(t,e),t.fromRangeMappings=function(e){return new t(R.join(e.map((function(e){return R.fromRangeInclusive(e.originalRange)}))),R.join(e.map((function(e){return R.fromRangeInclusive(e.modifiedRange)}))),e)},t.prototype.flip=function(){var e;return new t(this.modified,this.original,null===(e=this.innerChanges)||void 0===e?void 0:e.map((function(e){return e.flip()})))},t.prototype.withInnerChangesFromLineRanges=function(){return new t(this.original,this.modified,[this.toRangeMapping()])},t}(B),q=function(){function e(e,t){this.originalRange=e,this.modifiedRange=t}return e.join=function(e){if(0===e.length)throw new m("Cannot join an empty list of range mappings");for(var t=e[0],n=1;n<e.length;n++)t=t.join(e[n]);return t},e.assertSorted=function(e){for(var t=1;t<e.length;t++){var n=e[t-1],i=e[t];if(!n.originalRange.getEndPosition().isBeforeOrEqual(i.originalRange.getStartPosition())||!n.modifiedRange.getEndPosition().isBeforeOrEqual(i.modifiedRange.getStartPosition()))throw new m("Range mappings must be sorted")}},e.prototype.flip=function(){return new e(this.modifiedRange,this.originalRange)},e.prototype.join=function(t){return new e(this.originalRange.plusRange(t.originalRange),this.modifiedRange.plusRange(t.modifiedRange))},e}();function D(e,t,n,i){var r,o;void 0===i&&(i=!1);var s=[];try{for(var a=c(function(e,t){var n,i,r,o,s,a,u,l;return d(this,(function(h){switch(h.label){case 0:h.trys.push([0,8,9,10]),r=c(e),o=r.next(),h.label=1;case 1:return o.done?[3,7]:(s=o.value,void 0!==i&&t(i,s)?(n.push(s),[3,5]):[3,2]);case 2:return n?[4,n]:[3,4];case 3:h.sent(),h.label=4;case 4:n=[s],h.label=5;case 5:i=s,h.label=6;case 6:return o=r.next(),[3,1];case 7:return[3,10];case 8:return a=h.sent(),u={error:a},[3,10];case 9:try{o&&!o.done&&(l=r.return)&&l.call(r)}finally{if(u)throw u.error}return[7];case 10:return n?[4,n]:[3,12];case 11:h.sent(),h.label=12;case 12:return[2]}}))}(e.map((function(e){return function(e,t,n){var i=0,r=0;1===e.modifiedRange.endColumn&&1===e.originalRange.endColumn&&e.originalRange.startLineNumber+i<=e.originalRange.endLineNumber&&e.modifiedRange.startLineNumber+i<=e.modifiedRange.endLineNumber&&(r=-1);e.modifiedRange.startColumn-1>=n.getLineLength(e.modifiedRange.startLineNumber)&&e.originalRange.startColumn-1>=t.getLineLength(e.originalRange.startLineNumber)&&e.originalRange.startLineNumber<=e.originalRange.endLineNumber+r&&e.modifiedRange.startLineNumber<=e.modifiedRange.endLineNumber+r&&(i=1);var o=new R(e.originalRange.startLineNumber+i,e.originalRange.endLineNumber+1+r),s=new R(e.modifiedRange.startLineNumber+i,e.modifiedRange.endLineNumber+1+r);return new k(o,s,[e])}(e,t,n)})),(function(e,t){return e.original.overlapOrTouch(t.original)||e.modified.overlapOrTouch(t.modified)}))),u=a.next();!u.done;u=a.next()){var l=u.value,h=l[0],f=l[l.length-1];s.push(new k(h.original.join(f.original),h.modified.join(f.modified),l.map((function(e){return e.innerChanges[0]}))))}}catch(e){r={error:e}}finally{try{u&&!u.done&&(o=a.return)&&o.call(a)}finally{if(r)throw r.error}}return p((function(){if(!i&&s.length>0){if(s[0].modified.startLineNumber!==s[0].original.startLineNumber)return!1;if(n.length.lineCount-s[s.length-1].modified.endLineNumberExclusive!=t.length.lineCount-s[s.length-1].original.endLineNumberExclusive)return!1}return function(e,t){for(var n=0;n<e.length-1;){if(!t(e[n],e[n+1]))return!1;n++}return!0}(s,(function(e,t){return t.original.startLineNumber-e.original.endLineNumberExclusive==t.modified.startLineNumber-e.modified.endLineNumberExclusive&&e.original.endLineNumberExclusive<t.original.startLineNumber&&e.modified.endLineNumberExclusive<t.modified.startLineNumber}))})),s}var T=function(){function e(e,t){this.diffs=e,this.hitTimeout=t}return e.trivial=function(t,n){return new e([new O(v.ofLength(t.length),v.ofLength(n.length))],!1)},e.trivialTimedOut=function(t,n){return new e([new O(v.ofLength(t.length),v.ofLength(n.length))],!0)},e}(),O=function(){function e(e,t){this.seq1Range=e,this.seq2Range=t}return e.invert=function(t,n){var i=[];return function(e,t){for(var n=0;n<=e.length;n++)t(0===n?void 0:e[n-1],n===e.length?void 0:e[n])}(t,(function(t,r){i.push(e.fromOffsetPairs(t?t.getEndExclusives():I.zero,r?r.getStarts():new I(n,(t?t.seq2Range.endExclusive-t.seq1Range.endExclusive:0)+n)))})),i},e.fromOffsetPairs=function(t,n){return new e(new v(t.offset1,n.offset1),new v(t.offset2,n.offset2))},e.assertSorted=function(e){var t,n,i=void 0;try{for(var r=c(e),o=r.next();!o.done;o=r.next()){var s=o.value;if(i&&!(i.seq1Range.endExclusive<=s.seq1Range.start&&i.seq2Range.endExclusive<=s.seq2Range.start))throw new m("Sequence diffs must be sorted");i=s}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}},e.prototype.swap=function(){return new e(this.seq2Range,this.seq1Range)},e.prototype.join=function(t){return new e(this.seq1Range.join(t.seq1Range),this.seq2Range.join(t.seq2Range))},e.prototype.delta=function(t){return 0===t?this:new e(this.seq1Range.delta(t),this.seq2Range.delta(t))},e.prototype.deltaStart=function(t){return 0===t?this:new e(this.seq1Range.deltaStart(t),this.seq2Range.deltaStart(t))},e.prototype.deltaEnd=function(t){return 0===t?this:new e(this.seq1Range.deltaEnd(t),this.seq2Range.deltaEnd(t))},e.prototype.intersect=function(t){var n=this.seq1Range.intersect(t.seq1Range),i=this.seq2Range.intersect(t.seq2Range);if(n&&i)return new e(n,i)},e.prototype.getStarts=function(){return new I(this.seq1Range.start,this.seq2Range.start)},e.prototype.getEndExclusives=function(){return new I(this.seq1Range.endExclusive,this.seq2Range.endExclusive)},e}(),I=function(){function e(e,t){this.offset1=e,this.offset2=t}return e.prototype.delta=function(e){return 0===e?this:new a(this.offset1+e,this.offset2+e)},e.prototype.equals=function(e){return this.offset1===e.offset1&&this.offset2===e.offset2},e}();(a=I).zero=new a(0,0),a.max=new a(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER);var W=function(){function e(){}return e.prototype.isValid=function(){return!0},e}();(u=W).instance=new u;var P=function(){function e(e){if(this.timeout=e,this.startTime=Date.now(),this.valid=!0,e<=0)throw new m("timeout must be positive")}return e.prototype.isValid=function(){return!(Date.now()-this.startTime<this.timeout)&&this.valid&&(this.valid=!1),this.valid},e.prototype.disable=function(){this.timeout=Number.MAX_SAFE_INTEGER,this.isValid=function(){return!0},this.valid=!0},e}(),F=function(){function e(e,t){this.width=e,this.height=t,this.array=[],this.array=new Array(e*t)}return e.prototype.get=function(e,t){return this.array[e+t*this.width]},e.prototype.set=function(e,t,n){this.array[e+t*this.width]=n},e}();function j(e){return 32===e||9===e}var H=function(){function e(e,t,n){this.range=e,this.lines=t,this.source=n,this.histogram=[];for(var i=0,r=e.startLineNumber-1;r<e.endLineNumberExclusive-1;r++){for(var o=t[r],s=0;s<o.length;s++){i++;var a=o[s],u=l.getKey(a);this.histogram[u]=(this.histogram[u]||0)+1}i++;var h=l.getKey("\n");this.histogram[h]=(this.histogram[h]||0)+1}this.totalCount=i}return e.getKey=function(e){var t=this.chrKeys.get(e);return void 0===t&&(t=this.chrKeys.size,this.chrKeys.set(e,t)),t},e.prototype.computeSimilarity=function(e){for(var t,n,i=0,r=Math.max(this.histogram.length,e.histogram.length),o=0;o<r;o++)i+=Math.abs((null!==(t=this.histogram[o])&&void 0!==t?t:0)-(null!==(n=e.histogram[o])&&void 0!==n?n:0));return 1-i/(this.totalCount+e.totalCount)},e}();(l=H).chrKeys=new Map;var z=function(){function e(){}return e.prototype.compute=function(e,t,n,i){if(void 0===n&&(n=W.instance),0===e.length||0===t.length)return T.trivial(e,t);for(var r=new F(e.length,t.length),o=new F(e.length,t.length),s=new F(e.length,t.length),a=0;a<e.length;a++)for(var u=0;u<t.length;u++){if(!n.isValid())return T.trivialTimedOut(e,t);var l=0===a?0:r.get(a-1,u),h=0===u?0:r.get(a,u-1),d=void 0;e.getElement(a)===t.getElement(u)?(d=0===a||0===u?0:r.get(a-1,u-1),a>0&&u>0&&3===o.get(a-1,u-1)&&(d+=s.get(a-1,u-1)),d+=i?i(a,u):1):d=-1;var c=Math.max(l,h,d);if(c===d){var f=a>0&&u>0?s.get(a-1,u-1):0;s.set(a,u,f+1),o.set(a,u,3)}else c===l?(s.set(a,u,0),o.set(a,u,1)):c===h&&(s.set(a,u,0),o.set(a,u,2));r.set(a,u,c)}var g=[],m=e.length,p=t.length;function y(e,t){e+1===m&&t+1===p||g.push(new O(new v(e+1,m),new v(t+1,p))),m=e,p=t}for(var w=e.length-1,b=t.length-1;w>=0&&b>=0;)3===o.get(w,b)?(y(w,b),w--,b--):1===o.get(w,b)?w--:b--;return y(-1,-1),g.reverse(),new T(g,!1)},e}(),V=function(){function e(){}return e.prototype.compute=function(e,t,n){if(void 0===n&&(n=W.instance),0===e.length||0===t.length)return T.trivial(e,t);var i=e,r=t;function o(e,t){for(;e<i.length&&t<r.length&&i.getElement(e)===r.getElement(t);)e++,t++;return e}var s=0,a=new X;a.set(0,o(0,0));var u=new U;u.set(0,0===a.get(0)?null:new G(null,0,0,a.get(0)));var l=0;e:for(;;){if(s++,!n.isValid())return T.trivialTimedOut(i,r);var h=-Math.min(s,r.length+s%2),d=Math.min(s,i.length+s%2);for(l=h;l<=d;l+=2){var c=l===d?-1:a.get(l+1),f=l===h?-1:a.get(l-1)+1,g=Math.min(Math.max(c,f),i.length),m=g-l;if(!(g>i.length||m>r.length)){var p=o(g,m);a.set(l,p);var y=g===c?u.get(l+1):u.get(l-1);if(u.set(l,p!==g?new G(y,g,m,p-g):y),a.get(l)===i.length&&a.get(l)-l===r.length)break e}}}for(var w=u.get(l),b=[],E=i.length,L=r.length;;){var x=w?w.x+w.length:0,R=w?w.y+w.length:0;if(x===E&&R===L||b.push(new O(new v(x,E),new v(R,L))),!w)break;E=w.x,L=w.y,w=w.prev}return b.reverse(),new T(b,!1)},e}(),G=function(e,t,n,i){this.prev=e,this.x=t,this.y=n,this.length=i},X=function(){function e(){this.positiveArr=new Int32Array(10),this.negativeArr=new Int32Array(10)}return e.prototype.get=function(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]},e.prototype.set=function(e,t){if(e<0){if((e=-e-1)>=this.negativeArr.length){var n=this.negativeArr;this.negativeArr=new Int32Array(2*n.length),this.negativeArr.set(n)}this.negativeArr[e]=t}else{if(e>=this.positiveArr.length){n=this.positiveArr;this.positiveArr=new Int32Array(2*n.length),this.positiveArr.set(n)}this.positiveArr[e]=t}},e}(),U=function(){function e(){this.positiveArr=[],this.negativeArr=[]}return e.prototype.get=function(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]},e.prototype.set=function(e,t){e<0?(e=-e-1,this.negativeArr[e]=t):this.positiveArr[e]=t},e}(),Z=function(){function e(){this.map=new Map}return e.prototype.add=function(e,t){var n=this.map.get(e);n||(n=new Set,this.map.set(e,n)),n.add(t)},e.prototype.forEach=function(e,t){var n=this.map.get(e);n&&n.forEach(t)},e.prototype.get=function(e){var t=this.map.get(e);return t||new Set},e}(),K=function(){function e(e,t,n){this.lines=e,this.range=t,this.considerWhitespaceChanges=n,this.elements=[],this.firstElementOffsetByLineIdx=[],this.lineStartOffsets=[],this.trimmedWsLengthsByLineIdx=[],this.firstElementOffsetByLineIdx.push(0);for(var i=this.range.startLineNumber;i<=this.range.endLineNumber;i++){var r=e[i-1],o=0;i===this.range.startLineNumber&&this.range.startColumn>1&&(o=this.range.startColumn-1,r=r.substring(o)),this.lineStartOffsets.push(o);var s=0;if(!n){var a=r.trimStart();s=r.length-a.length,r=a.trimEnd()}this.trimmedWsLengthsByLineIdx.push(s);for(var u=i===this.range.endLineNumber?Math.min(this.range.endColumn-1-o-s,r.length):r.length,l=0;l<u;l++)this.elements.push(r.charCodeAt(l));i<this.range.endLineNumber&&(this.elements.push("\n".charCodeAt(0)),this.firstElementOffsetByLineIdx.push(this.elements.length))}}return e.prototype.toString=function(){return'Slice: "'.concat(this.text,'"')},Object.defineProperty(e.prototype,"text",{get:function(){return this.getText(new v(0,this.length))},enumerable:!1,configurable:!0}),e.prototype.getText=function(e){return this.elements.slice(e.start,e.endExclusive).map((function(e){return String.fromCharCode(e)})).join("")},e.prototype.getElement=function(e){return this.elements[e]},Object.defineProperty(e.prototype,"length",{get:function(){return this.elements.length},enumerable:!1,configurable:!0}),e.prototype.getBoundaryScore=function(e){var t=te(e>0?this.elements[e-1]:-1),n=te(e<this.elements.length?this.elements[e]:-1);if(7===t&&8===n)return 0;if(8===t)return 150;var i=0;return t!==n&&(i+=10,0===t&&1===n&&(i+=1)),i+=ee(t),i+=ee(n)},e.prototype.translateOffset=function(e,t){void 0===t&&(t="right");var n=E(this.firstElementOffsetByLineIdx,(function(t){return t<=e})),i=e-this.firstElementOffsetByLineIdx[n];return new y(this.range.startLineNumber+n,1+this.lineStartOffsets[n]+i+(0===i&&"left"===t?0:this.trimmedWsLengthsByLineIdx[n]))},e.prototype.translateRange=function(e){var t=this.translateOffset(e.start,"right"),n=this.translateOffset(e.endExclusive,"left");return n.isBefore(t)?w.fromPositions(n,n):w.fromPositions(t,n)},e.prototype.findWordContaining=function(e){if(!(e<0||e>=this.elements.length)&&Y(this.elements[e])){for(var t=e;t>0&&Y(this.elements[t-1]);)t--;for(var n=e;n<this.elements.length&&Y(this.elements[n]);)n++;return new v(t,n)}},e.prototype.findSubWordContaining=function(e){if(!(e<0||e>=this.elements.length)&&Y(this.elements[e])){for(var t=e;t>0&&Y(this.elements[t-1])&&!J(this.elements[t]);)t--;for(var n=e;n<this.elements.length&&Y(this.elements[n])&&!J(this.elements[n]);)n++;return new v(t,n)}},e.prototype.countLinesIn=function(e){return this.translateOffset(e.endExclusive).lineNumber-this.translateOffset(e.start).lineNumber},e.prototype.isStronglyEqual=function(e,t){return this.elements[e]===this.elements[t]},e.prototype.extendToFullLines=function(e){var t,n,i,r,o=null!==(t=b(this.firstElementOffsetByLineIdx,(function(t){return t<=e.start})))&&void 0!==t?t:0,s=null!==(i=this.firstElementOffsetByLineIdx,n=(r=L(i,(function(t){return e.endExclusive<=t})))===i.length?void 0:i[r])&&void 0!==n?n:this.elements.length;return new v(o,s)},e}();function Y(e){return e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57}function J(e){return e>=65&&e<=90}var Q=((r={})[0]=0,r[1]=0,r[2]=0,r[3]=10,r[4]=2,r[5]=30,r[6]=3,r[7]=10,r[8]=10,r);function ee(e){return Q[e]}function te(e){return 10===e?8:13===e?7:j(e)?6:e>=97&&e<=122?0:e>=65&&e<=90?1:e>=48&&e<=57?2:-1===e?3:44===e||59===e?5:4}function ne(e,t,n,i,r,o){var s=function(e,t,n,i){var r,o,s,a,u=[],l=e.filter((function(e){return e.modified.isEmpty&&e.original.length>=3})).map((function(e){return new H(e.original,t,e)})),h=new Set(e.filter((function(e){return e.original.isEmpty&&e.modified.length>=3})).map((function(e){return new H(e.modified,n,e)}))),d=new Set;try{for(var f=c(l),g=f.next();!g.done;g=f.next()){var m=g.value,p=-1,v=void 0;try{for(var y=(s=void 0,c(h)),w=y.next();!w.done;w=y.next()){var b=w.value,E=m.computeSimilarity(b);E>p&&(p=E,v=b)}}catch(e){s={error:e}}finally{try{w&&!w.done&&(a=y.return)&&a.call(y)}finally{if(s)throw s.error}}if(p>.9&&v&&(h.delete(v),u.push(new B(m.range,v.range)),d.add(m.source),d.add(v.source)),!i.isValid())return{moves:u,excludedChanges:d}}}catch(e){r={error:e}}finally{try{g&&!g.done&&(o=f.return)&&o.call(f)}finally{if(r)throw r.error}}return{moves:u,excludedChanges:d}}(e,t,n,o),a=s.moves,u=s.excludedChanges;if(!o.isValid())return[];var l=function(e,t,n,i,r,o){var s,a,u,l,h,d,m,p,v=[],y=new Z;try{for(var w=c(e),E=w.next();!E.done;E=w.next())for(var L=(M=E.value).original.startLineNumber;L<M.original.endLineNumberExclusive-2;L++){var S="".concat(t[L-1],":").concat(t[L+1-1],":").concat(t[L+2-1]);y.add(S,{range:new R(L,L+3)})}}catch(e){s={error:e}}finally{try{E&&!E.done&&(a=w.return)&&a.call(w)}finally{if(s)throw s.error}}var A=[];e.sort(f((function(e){return e.modified.startLineNumber}),g));var _=function(e){for(var t=[],i=function(e){var i="".concat(n[e-1],":").concat(n[e+1-1],":").concat(n[e+2-1]),r=new R(e,e+3),o=[];y.forEach(i,(function(e){var n,i,s=e.range;try{for(var a=(n=void 0,c(t)),u=a.next();!u.done;u=a.next()){var l=u.value;if(l.originalLineRange.endLineNumberExclusive+1===s.endLineNumberExclusive&&l.modifiedLineRange.endLineNumberExclusive+1===r.endLineNumberExclusive)return l.originalLineRange=new R(l.originalLineRange.startLineNumber,s.endLineNumberExclusive),l.modifiedLineRange=new R(l.modifiedLineRange.startLineNumber,r.endLineNumberExclusive),void o.push(l)}}catch(e){n={error:e}}finally{try{u&&!u.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}var h={modifiedLineRange:r,originalLineRange:s};A.push(h),o.push(h)})),t=o},r=e.modified.startLineNumber;r<e.modified.endLineNumberExclusive-2;r++)i(r);if(!o.isValid())return{value:[]}};try{for(var C=c(e),$=C.next();!$.done;$=C.next()){var M,k=_(M=$.value);if("object"==typeof k)return k.value}}catch(e){u={error:e}}finally{try{$&&!$.done&&(l=C.return)&&l.call(C)}finally{if(u)throw u.error}}A.sort((q=f((function(e){return e.modifiedLineRange.length}),g),function(e,t){return-q(e,t)}));var q;var D=new N,T=new N;try{for(var O=c(A),I=O.next();!I.done;I=O.next()){var W=I.value,P=W.modifiedLineRange.startLineNumber-W.originalLineRange.startLineNumber,F=D.subtractFrom(W.modifiedLineRange),j=T.subtractFrom(W.originalLineRange).getWithDelta(P),H=F.getIntersection(j);try{for(var z=(m=void 0,c(H.ranges)),V=z.next();!V.done;V=z.next()){var G=V.value;if(!(G.length<3)){var X=G,U=G.delta(-P);v.push(new B(U,X)),D.addRange(X),T.addRange(U)}}}catch(e){m={error:e}}finally{try{V&&!V.done&&(p=z.return)&&p.call(z)}finally{if(m)throw m.error}}}}catch(e){h={error:e}}finally{try{I&&!I.done&&(d=O.return)&&d.call(O)}finally{if(h)throw h.error}}v.sort(f((function(e){return e.original.startLineNumber}),g));var K=new x(e),Y=function(t){var n=v[t],s=K.findLastMonotonous((function(e){return e.original.startLineNumber<=n.original.startLineNumber})),a=b(e,(function(e){return e.modified.startLineNumber<=n.modified.startLineNumber})),u=Math.max(n.original.startLineNumber-s.original.startLineNumber,n.modified.startLineNumber-a.modified.startLineNumber),l=K.findLastMonotonous((function(e){return e.original.startLineNumber<n.original.endLineNumberExclusive})),h=b(e,(function(e){return e.modified.startLineNumber<n.modified.endLineNumberExclusive})),d=Math.max(l.original.endLineNumberExclusive-n.original.endLineNumberExclusive,h.modified.endLineNumberExclusive-n.modified.endLineNumberExclusive),c=void 0;for(c=0;c<u;c++){var f=n.original.startLineNumber-c-1,g=n.modified.startLineNumber-c-1;if(f>i.length||g>r.length)break;if(D.contains(g)||T.contains(f))break;if(!ie(i[f-1],r[g-1],o))break}c>0&&(T.addRange(new R(n.original.startLineNumber-c,n.original.startLineNumber)),D.addRange(new R(n.modified.startLineNumber-c,n.modified.startLineNumber)));var m=void 0;for(m=0;m<d;m++){f=n.original.endLineNumberExclusive+m,g=n.modified.endLineNumberExclusive+m;if(f>i.length||g>r.length)break;if(D.contains(g)||T.contains(f))break;if(!ie(i[f-1],r[g-1],o))break}m>0&&(T.addRange(new R(n.original.endLineNumberExclusive,n.original.endLineNumberExclusive+m)),D.addRange(new R(n.modified.endLineNumberExclusive,n.modified.endLineNumberExclusive+m))),(c>0||m>0)&&(v[t]=new B(new R(n.original.startLineNumber-c,n.original.endLineNumberExclusive+m),new R(n.modified.startLineNumber-c,n.modified.endLineNumberExclusive+m)))};for(L=0;L<v.length;L++)Y(L);return v}(e.filter((function(e){return!u.has(e)})),i,r,t,n,o);return function(e,t){var n,i;try{for(var r=c(t),o=r.next();!o.done;o=r.next()){var s=o.value;e.push(s)}}catch(e){n={error:e}}finally{try{o&&!o.done&&(i=r.return)&&i.call(r)}finally{if(n)throw n.error}}}(a,l),a=(a=function(e){if(0===e.length)return e;e.sort(f((function(e){return e.original.startLineNumber}),g));for(var t=[e[0]],n=1;n<e.length;n++){var i=t[t.length-1],r=e[n],o=r.original.startLineNumber-i.original.endLineNumberExclusive,s=r.modified.startLineNumber-i.modified.endLineNumberExclusive;o>=0&&s>=0&&o+s<=2?t[t.length-1]=i.join(r):t.push(r)}return t}(a)).filter((function(e){var n=e.original.toOffsetRange().slice(t).map((function(e){return e.trim()}));return n.join("\n").length>=15&&function(e,t){var n,i,r=0;try{for(var o=c(e),s=o.next();!s.done;s=o.next()){t(s.value)&&r++}}catch(e){n={error:e}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}return r}(n,(function(e){return e.length>=2}))>=2})),a=function(e,t){var n=new x(e);return t=t.filter((function(t){return(n.findLastMonotonous((function(e){return e.original.startLineNumber<t.original.endLineNumberExclusive}))||new B(new R(1,1),new R(1,1)))!==b(e,(function(e){return e.modified.startLineNumber<t.modified.endLineNumberExclusive}))})),t}(e,a),a}function ie(e,t,n){var i,r;if(e.trim()===t.trim())return!0;if(e.length>300&&t.length>300)return!1;var o=(new V).compute(new K([e],new w(1,1,1,e.length),!1),new K([t],new w(1,1,1,t.length),!1),n),s=0,a=O.invert(o.diffs,e.length);try{for(var u=c(a),l=u.next();!l.done;l=u.next()){l.value.seq1Range.forEach((function(t){j(e.charCodeAt(t))||s++}))}}catch(e){i={error:e}}finally{try{l&&!l.done&&(r=u.return)&&r.call(u)}finally{if(i)throw i.error}}var h=function(t){for(var n=0,i=0;i<e.length;i++)j(t.charCodeAt(i))||n++;return n}(e.length>t.length?e:t);return s/h>.6&&h>10}function re(e,t,n){var i=n;return i=oe(e,t,i),i=function(e,t,n){if(!e.getBoundaryScore||!t.getBoundaryScore)return n;for(var i=0;i<n.length;i++){var r=i>0?n[i-1]:void 0,o=n[i],s=i+1<n.length?n[i+1]:void 0,a=new v(r?r.seq1Range.endExclusive+1:0,s?s.seq1Range.start-1:e.length),u=new v(r?r.seq2Range.endExclusive+1:0,s?s.seq2Range.start-1:t.length);o.seq1Range.isEmpty?n[i]=se(o,e,t,a,u):o.seq2Range.isEmpty&&(n[i]=se(o.swap(),t,e,u,a).swap())}return n}(e,t,i=oe(e,t,i)),i}function oe(e,t,n){if(0===n.length)return n;var i=[];i.push(n[0]);for(var r=1;r<n.length;r++){var o=i[i.length-1];if((l=n[r]).seq1Range.isEmpty||l.seq2Range.isEmpty){var s=l.seq1Range.start-o.seq1Range.endExclusive,a=void 0;for(a=1;a<=s&&(e.getElement(l.seq1Range.start-a)===e.getElement(l.seq1Range.endExclusive-a)&&t.getElement(l.seq2Range.start-a)===t.getElement(l.seq2Range.endExclusive-a));a++);if(--a===s){i[i.length-1]=new O(new v(o.seq1Range.start,l.seq1Range.endExclusive-s),new v(o.seq2Range.start,l.seq2Range.endExclusive-s));continue}l=l.delta(-a)}i.push(l)}var u=[];for(r=0;r<i.length-1;r++){var l,h=i[r+1];if((l=i[r]).seq1Range.isEmpty||l.seq2Range.isEmpty){s=h.seq1Range.start-l.seq1Range.endExclusive,a=void 0;for(a=0;a<s&&(e.isStronglyEqual(l.seq1Range.start+a,l.seq1Range.endExclusive+a)&&t.isStronglyEqual(l.seq2Range.start+a,l.seq2Range.endExclusive+a));a++);if(a===s){i[r+1]=new O(new v(l.seq1Range.start+s,h.seq1Range.endExclusive),new v(l.seq2Range.start+s,h.seq2Range.endExclusive));continue}a>0&&(l=l.delta(a))}u.push(l)}return i.length>0&&u.push(i[i.length-1]),u}function se(e,t,n,i,r){for(var o=1;e.seq1Range.start-o>=i.start&&e.seq2Range.start-o>=r.start&&n.isStronglyEqual(e.seq2Range.start-o,e.seq2Range.endExclusive-o)&&o<100;)o++;o--;for(var s=0;e.seq1Range.start+s<i.endExclusive&&e.seq2Range.endExclusive+s<r.endExclusive&&n.isStronglyEqual(e.seq2Range.start+s,e.seq2Range.endExclusive+s)&&s<100;)s++;if(0===o&&0===s)return e;for(var a=0,u=-1,l=-o;l<=s;l++){var h=e.seq2Range.start+l,d=e.seq2Range.endExclusive+l,c=e.seq1Range.start+l,f=t.getBoundaryScore(c)+n.getBoundaryScore(h)+n.getBoundaryScore(d);f>u&&(u=f,a=l)}return e.delta(a)}function ae(e,t,n,i,r){void 0===r&&(r=!1);var o=O.invert(n,e.length),s=[],a=new I(0,0);function u(n,u){if(!(n.offset1<a.offset1||n.offset2<a.offset2)){var l=i(e,n.offset1),h=i(t,n.offset2);if(l&&h){for(var d=new O(l,h),c=d.intersect(u),f=c.seq1Range.length,g=c.seq2Range.length;o.length>0;){var m=o[0];if(!(m.seq1Range.intersects(d.seq1Range)||m.seq2Range.intersects(d.seq2Range)))break;var p=i(e,m.seq1Range.start),v=i(t,m.seq2Range.start),y=new O(p,v),w=y.intersect(m);if(f+=w.seq1Range.length,g+=w.seq2Range.length,!((d=d.join(y)).seq1Range.endExclusive>=m.seq1Range.endExclusive))break;o.shift()}(r&&f+g<d.seq1Range.length+d.seq2Range.length||f+g<2*(d.seq1Range.length+d.seq2Range.length)/3)&&s.push(d),a=d.getEndExclusives()}}}for(;o.length>0;){var l=o.shift();l.seq1Range.isEmpty||(u(l.getStarts(),l),u(l.getEndExclusives().delta(-1),l))}var h=function(e,t){var n=[];for(;e.length>0||t.length>0;){var i=e[0],r=t[0],o=void 0;o=i&&(!r||i.seq1Range.start<r.seq1Range.start)?e.shift():t.shift(),n.length>0&&n[n.length-1].seq1Range.endExclusive>=o.seq1Range.start?n[n.length-1]=n[n.length-1].join(o):n.push(o)}return n}(n,s);return h}var ue=function(){function e(e,t){this.trimmedHash=e,this.lines=t}return e.prototype.getElement=function(e){return this.trimmedHash[e]},Object.defineProperty(e.prototype,"length",{get:function(){return this.trimmedHash.length},enumerable:!1,configurable:!0}),e.prototype.getBoundaryScore=function(e){return 1e3-((0===e?0:le(this.lines[e-1]))+(e===this.lines.length?0:le(this.lines[e])))},e.prototype.getText=function(e){return this.lines.slice(e.start,e.endExclusive).join("\n")},e.prototype.isStronglyEqual=function(e,t){return this.lines[e]===this.lines[t]},e}();function le(e){for(var t=0;t<e.length&&(32===e.charCodeAt(t)||9===e.charCodeAt(t));)t++;return t}var he=function(){function e(){this.dynamicProgrammingDiffing=new z,this.myersDiffingAlgorithm=new V}return e.prototype.computeDiff=function(e,t,n){var i,r,o=this;if(e.length<=1&&function(e,t,n){if(void 0===n&&(n=function(e,t){return e===t}),e===t)return!0;if(!e||!t)return!1;if(e.length!==t.length)return!1;for(var i=0,r=e.length;i<r;i++)if(!n(e[i],t[i]))return!1;return!0}(e,t,(function(e,t){return e===t})))return new _([],[],!1);if(1===e.length&&0===e[0].length||1===t.length&&0===t[0].length)return new _([new k(new R(1,e.length+1),new R(1,t.length+1),[new q(new w(1,1,e.length,e[e.length-1].length+1),new w(1,1,t.length,t[t.length-1].length+1))])],[],!1);var s=0===n.maxComputationTimeMs?W.instance:new P(n.maxComputationTimeMs),a=!n.ignoreTrimWhitespace,u=new Map;function l(e){var t=u.get(e);return void 0===t&&(t=u.size,u.set(e,t)),t}var h=e.map((function(e){return l(e.trim())})),d=t.map((function(e){return l(e.trim())})),f=new ue(h,e),g=new ue(d,t),m=f.length+g.length<1700?o.dynamicProgrammingDiffing.compute(f,g,s,(function(n,i){return e[n]===t[i]?0===t[i].length?.1:1+Math.log(1+t[i].length):.99})):o.myersDiffingAlgorithm.compute(f,g,s),y=m.diffs,b=m.hitTimeout;y=re(f,g,y),y=function(e,t,n){var i=n;if(0===i.length)return i;var r,o=0;do{r=!1;for(var s=[i[0]],a=function(t){var n,o,a,u=i[t],l=s[s.length-1];n=l,o=u,a=new v(l.seq1Range.endExclusive,u.seq1Range.start),e.getText(a).replace(/\s/g,"").length<=4&&(n.seq1Range.length+n.seq2Range.length>5||o.seq1Range.length+o.seq2Range.length>5)?(r=!0,s[s.length-1]=s[s.length-1].join(u)):s.push(u)},u=1;u<i.length;u++)a(u);i=s}while(o++<10&&r);return i}(f,0,y);var E=[],L=function(i){var r,u;if(a)for(var l=0;l<i;l++){var h=x+l,d=N+l;if(e[h]!==t[d]){var f=o.refineDiff(e,t,new O(new v(h,h+1),new v(d,d+1)),s,a,n);try{for(var g=(r=void 0,c(f.mappings)),m=g.next();!m.done;m=g.next()){var p=m.value;E.push(p)}}catch(e){r={error:e}}finally{try{m&&!m.done&&(u=g.return)&&u.call(g)}finally{if(r)throw r.error}}f.hitTimeout&&(b=!0)}}},x=0,N=0,S=function(i){var r,o;p((function(){return i.seq1Range.start-x==i.seq2Range.start-N}));var u=i.seq1Range.start-x;L(u),x=i.seq1Range.endExclusive,N=i.seq2Range.endExclusive;var l=C.refineDiff(e,t,i,s,a,n);l.hitTimeout&&(b=!0);try{for(var h=(r=void 0,c(l.mappings)),d=h.next();!d.done;d=h.next()){var f=d.value;E.push(f)}}catch(e){r={error:e}}finally{try{d&&!d.done&&(o=h.return)&&o.call(h)}finally{if(r)throw r.error}}},C=this;try{for(var B=c(y),$=B.next();!$.done;$=B.next()){S($.value)}}catch(e){i={error:e}}finally{try{$&&!$.done&&(r=B.return)&&r.call(B)}finally{if(i)throw i.error}}L(e.length-x);var M=D(E,new A(e),new A(t)),T=[];return n.computeMoves&&(T=this.computeMoves(M,e,t,h,d,s,a,n)),p((function(){var n,i,r,o;function s(e,t){if(e.lineNumber<1||e.lineNumber>t.length)return!1;var n=t[e.lineNumber-1];return!(e.column<1||e.column>n.length+1)}function a(e,t){return!(e.startLineNumber<1||e.startLineNumber>t.length+1)&&!(e.endLineNumberExclusive<1||e.endLineNumberExclusive>t.length+1)}try{for(var u=c(M),l=u.next();!l.done;l=u.next()){var h=l.value;if(!h.innerChanges)return!1;try{for(var d=(r=void 0,c(h.innerChanges)),f=d.next();!f.done;f=d.next()){var g=f.value;if(!(s(g.modifiedRange.getStartPosition(),t)&&s(g.modifiedRange.getEndPosition(),t)&&s(g.originalRange.getStartPosition(),e)&&s(g.originalRange.getEndPosition(),e)))return!1}}catch(e){r={error:e}}finally{try{f&&!f.done&&(o=d.return)&&o.call(d)}finally{if(r)throw r.error}}if(!a(h.modified,t)||!a(h.original,e))return!1}}catch(e){n={error:e}}finally{try{l&&!l.done&&(i=u.return)&&i.call(u)}finally{if(n)throw n.error}}return!0})),new _(M,T,b)},e.prototype.computeMoves=function(e,t,n,i,r,o,s,a){var u=this;return ne(e,t,n,i,r,o).map((function(e){var i=D(u.refineDiff(t,n,new O(e.original.toOffsetRange(),e.modified.toOffsetRange()),o,s,a).mappings,new A(t),new A(n),!0);return new C(e,i)}))},e.prototype.refineDiff=function(e,t,n,i,r,o){var s,a=new B(new R((s=n).seq1Range.start+1,s.seq1Range.endExclusive+1),new R(s.seq2Range.start+1,s.seq2Range.endExclusive+1)).toRangeMapping2(e,t),u=new K(e,a.originalRange,r),l=new K(t,a.modifiedRange,r),h=u.length+l.length<500?this.dynamicProgrammingDiffing.compute(u,l,i):this.myersDiffingAlgorithm.compute(u,l,i),d=h.diffs;return d=re(u,l,d),d=ae(u,l,d,(function(e,t){return e.findWordContaining(t)})),o.extendToSubwords&&(d=ae(u,l,d,(function(e,t){return e.findSubWordContaining(t)}),!0)),d=function(e,t,n){var i,r,o=[];try{for(var s=c(n),a=s.next();!a.done;a=s.next()){var u=a.value,l=o[o.length-1];l&&(u.seq1Range.start-l.seq1Range.endExclusive<=2||u.seq2Range.start-l.seq2Range.endExclusive<=2)?o[o.length-1]=new O(l.seq1Range.join(u.seq1Range),l.seq2Range.join(u.seq2Range)):o.push(u)}}catch(e){i={error:e}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(i)throw i.error}}return o}(0,0,d),d=function(e,t,n){var i=n;if(0===i.length)return i;var r,o=0;do{r=!1;for(var s=[i[0]],a=function(n){var o=i[n],a=s[s.length-1];!function(n,i){var r=new v(a.seq1Range.endExclusive,o.seq1Range.start);if(e.countLinesIn(r)>5||r.length>500)return!1;var s=e.getText(r).trim();if(s.length>20||s.split(/\r\n|\r|\n/).length>1)return!1;var u=e.countLinesIn(n.seq1Range),l=n.seq1Range.length,h=t.countLinesIn(n.seq2Range),d=n.seq2Range.length,c=e.countLinesIn(i.seq1Range),f=i.seq1Range.length,g=t.countLinesIn(i.seq2Range),m=i.seq2Range.length;function p(e){return Math.min(e,130)}return Math.pow(Math.pow(p(40*u+l),1.5)+Math.pow(p(40*h+d),1.5),1.5)+Math.pow(Math.pow(p(40*c+f),1.5)+Math.pow(p(40*g+m),1.5),1.5)>1.3*Math.pow(Math.pow(130,1.5),1.5)}(a,o)?s.push(o):(r=!0,s[s.length-1]=s[s.length-1].join(o))},u=1;u<i.length;u++)a(u);i=s}while(o++<10&&r);var l=[];return function(e,t){for(var n=0;n<e.length;n++)t(0===n?void 0:e[n-1],e[n],n+1===e.length?void 0:e[n+1])}(i,(function(t,n,i){var r=n;function o(e){return e.length>0&&e.trim().length<=3&&n.seq1Range.length+n.seq2Range.length>100}var s=e.extendToFullLines(n.seq1Range),a=e.getText(new v(s.start,n.seq1Range.start));o(a)&&(r=r.deltaStart(-a.length));var u=e.getText(new v(n.seq1Range.endExclusive,s.endExclusive));o(u)&&(r=r.deltaEnd(u.length));var h=O.fromOffsetPairs(t?t.getEndExclusives():I.zero,i?i.getStarts():I.max),d=r.intersect(h);l.length>0&&d.getStarts().equals(l[l.length-1].getEndExclusives())?l[l.length-1]=l[l.length-1].join(d):l.push(d)})),l}(u,l,d),{mappings:d.map((function(e){return new q(u.translateRange(e.seq1Range),l.translateRange(e.seq2Range))})),hitTimeout:h.hitTimeout}},e}();function de(e,t,n){var i=(new he).computeDiff(e,t,n);return null==i?void 0:i.changes.map((function(e){var t=e.innerChanges;return{origStart:e.original.startLineNumber-1,origEnd:e.original.endLineNumberExclusive-1,editStart:e.modified.startLineNumber-1,editEnd:e.modified.endLineNumberExclusive-1,charChanges:null==t?void 0:t.map((function(e){return{originalStartLineNumber:e.originalRange.startLineNumber-1,originalStartColumn:e.originalRange.startColumn-1,originalEndLineNumber:e.originalRange.endLineNumber-1,originalEndColumn:e.originalRange.endColumn-1,modifiedStartLineNumber:e.modifiedRange.startLineNumber-1,modifiedStartColumn:e.modifiedRange.startColumn-1,modifiedEndLineNumber:e.modifiedRange.endLineNumber-1,modifiedEndColumn:e.modifiedRange.endColumn-1}}))}}))}t.computeDiff=de;var ce=e("../../../range").Range,fe=e("../base_diff_view").DiffChunk,ge=function(){function e(){}return e.prototype.compute=function(e,t,n){return n||(n={}),n.maxComputationTimeMs||(n.maxComputationTimeMs=500),(de(e,t,n)||[]).map((function(e){return new fe(new ce(e.origStart,0,e.origEnd,0),new ce(e.editStart,0,e.editEnd,0),e.charChanges)}))},e}();t.DiffProvider=ge})),ace.define("ace/ext/diff",["require","exports","module","ace/ext/diff/inline_diff_view","ace/ext/diff/split_diff_view","ace/ext/diff/providers/default"],(function(e,t,n){var i=e("./diff/inline_diff_view").InlineDiffView,r=e("./diff/split_diff_view").SplitDiffView,o=e("./diff/providers/default").DiffProvider;t.InlineDiffView=i,t.SplitDiffView=r,t.DiffProvider=o,t.createDiffView=function(e,t){var n;return(e=e||{}).diffProvider=e.diffProvider||new o,n=e.inline?new i(e):new r(e),t&&n.setOptions(t),n}})),ace.require(["ace/ext/diff"],(function(t){e&&(e.exports=t)}))}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(this.webpackChunktocco_devcon=this.webpackChunktocco_devcon||[]).push([[47],{20047:(e,t,i)=>{e=i.nmd(e),ace.define("ace/snippets",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/range_list","ace/keyboard/hash_handler","ace/tokenizer","ace/clipboard","ace/editor"],(function(e,t,i){"use strict";var n=e("./lib/dom"),o=e("./lib/oop"),r=e("./lib/event_emitter").EventEmitter,s=e("./lib/lang"),a=e("./range").Range,p=e("./range_list").RangeList,c=e("./keyboard/hash_handler").HashHandler,l=e("./tokenizer").Tokenizer,h=e("./clipboard"),u={CURRENT_WORD:function(e){return e.session.getTextRange(e.session.getWordRange())},SELECTION:function(e,t,i){var n=e.session.getTextRange();return i?n.replace(/\n\r?([ \t]*\S)/g,"\n"+i+"$1"):n},CURRENT_LINE:function(e){return e.session.getLine(e.getCursorPosition().row)},PREV_LINE:function(e){return e.session.getLine(e.getCursorPosition().row-1)},LINE_INDEX:function(e){return e.getCursorPosition().row},LINE_NUMBER:function(e){return e.getCursorPosition().row+1},SOFT_TABS:function(e){return e.session.getUseSoftTabs()?"YES":"NO"},TAB_SIZE:function(e){return e.session.getTabSize()},CLIPBOARD:function(e){return h.getText&&h.getText()},FILENAME:function(e){return/[^/\\]*$/.exec(this.FILEPATH(e))[0]},FILENAME_BASE:function(e){return/[^/\\]*$/.exec(this.FILEPATH(e))[0].replace(/\.[^.]*$/,"")},DIRECTORY:function(e){return this.FILEPATH(e).replace(/[^/\\]*$/,"")},FILEPATH:function(e){return"/not implemented.txt"},WORKSPACE_NAME:function(){return"Unknown"},FULLNAME:function(){return"Unknown"},BLOCK_COMMENT_START:function(e){var t=e.session.$mode||{};return t.blockComment&&t.blockComment.start||""},BLOCK_COMMENT_END:function(e){var t=e.session.$mode||{};return t.blockComment&&t.blockComment.end||""},LINE_COMMENT:function(e){return(e.session.$mode||{}).lineCommentStart||""},CURRENT_YEAR:d.bind(null,{year:"numeric"}),CURRENT_YEAR_SHORT:d.bind(null,{year:"2-digit"}),CURRENT_MONTH:d.bind(null,{month:"numeric"}),CURRENT_MONTH_NAME:d.bind(null,{month:"long"}),CURRENT_MONTH_NAME_SHORT:d.bind(null,{month:"short"}),CURRENT_DATE:d.bind(null,{day:"2-digit"}),CURRENT_DAY_NAME:d.bind(null,{weekday:"long"}),CURRENT_DAY_NAME_SHORT:d.bind(null,{weekday:"short"}),CURRENT_HOUR:d.bind(null,{hour:"2-digit",hour12:!1}),CURRENT_MINUTE:d.bind(null,{minute:"2-digit"}),CURRENT_SECOND:d.bind(null,{second:"2-digit"})};function d(e){var t=(new Date).toLocaleString("en-us",e);return 1==t.length?"0"+t:t}u.SELECTED_TEXT=u.SELECTION;var f=function(){function e(){this.snippetMap={},this.snippetNameMap={},this.variables=u}return e.prototype.getTokenizer=function(){return e.$tokenizer||this.createTokenizer()},e.prototype.createTokenizer=function(){function t(e){return e=e.substr(1),/^\d+$/.test(e)?[{tabstopId:parseInt(e,10)}]:[{text:e}]}function i(e){return"(?:[^\\\\"+e+"]|\\\\.)"}var n={regex:"/("+i("/")+"+)/",onMatch:function(e,t,i){var n=i[0];return n.fmtString=!0,n.guard=e.slice(1,-1),n.flag="",""},next:"formatString"};return e.$tokenizer=new l({start:[{regex:/\\./,onMatch:function(e,t,i){var n=e[1];return("}"==n&&i.length||-1!="`$\\".indexOf(n))&&(e=n),[e]}},{regex:/}/,onMatch:function(e,t,i){return[i.length?i.shift():e]}},{regex:/\$(?:\d+|\w+)/,onMatch:t},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(e,i,n){var o=t(e.substr(1));return n.unshift(o[0]),o},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+i("\\|")+"*\\|",onMatch:function(e,t,i){var n=e.slice(1,-1).replace(/\\[,|\\]|,/g,(function(e){return 2==e.length?e[1]:"\0"})).split("\0").map((function(e){return{value:e}}));return i[0].choices=n,[n[0]]},next:"start"},n,{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:/:/,onMatch:function(e,t,i){return i.length&&i[0].expectElse?(i[0].expectElse=!1,i[0].ifEnd={elseEnd:i[0]},[i[0].ifEnd]):":"}},{regex:/\\./,onMatch:function(e,t,i){var n=e[1];return"}"==n&&i.length||-1!="`$\\".indexOf(n)?e=n:"n"==n?e="\n":"t"==n?e="\t":-1!="ulULE".indexOf(n)&&(e={changeCase:n,local:n>"a"}),[e]}},{regex:"/\\w*}",onMatch:function(e,t,i){var n=i.shift();return n&&(n.flag=e.slice(1,-1)),this.next=n&&n.tabstopId?"start":"",[n||e]},next:"start"},{regex:/\$(?:\d+|\w+)/,onMatch:function(e,t,i){return[{text:e.slice(1)}]}},{regex:/\${\w+/,onMatch:function(e,t,i){var n={text:e.slice(2)};return i.unshift(n),[n]},next:"formatStringVar"},{regex:/\n/,token:"newline",merge:!1},{regex:/}/,onMatch:function(e,t,i){var n=i.shift();return this.next=n&&n.tabstopId?"start":"",[n||e]},next:"start"}],formatStringVar:[{regex:/:\/\w+}/,onMatch:function(e,t,i){return i[0].formatFunction=e.slice(2,-1),[i.shift()]},next:"formatString"},n,{regex:/:[\?\-+]?/,onMatch:function(e,t,i){"+"==e[1]&&(i[0].ifEnd=i[0]),"?"==e[1]&&(i[0].expectElse=!0)},next:"formatString"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"formatString"}]}),e.$tokenizer},e.prototype.tokenizeTmSnippet=function(e,t){return this.getTokenizer().getLineTokens(e,t).tokens.map((function(e){return e.value||e}))},e.prototype.getVariableValue=function(e,t,i){if(/^\d+$/.test(t))return(this.variables.__||{})[t]||"";if(/^[A-Z]\d+$/.test(t))return(this.variables[t[0]+"__"]||{})[t.substr(1)]||"";if(t=t.replace(/^TM_/,""),!this.variables.hasOwnProperty(t))return"";var n=this.variables[t];return"function"==typeof n&&(n=this.variables[t](e,t,i)),null==n?"":n},e.prototype.tmStrFormat=function(e,t,i){if(!t.fmt)return e;var n=t.flag||"",o=t.guard;o=new RegExp(o,n.replace(/[^gim]/g,""));var r="string"==typeof t.fmt?this.tokenizeTmSnippet(t.fmt,"formatString"):t.fmt,s=this,a=e.replace(o,(function(){var e=s.variables.__;s.variables.__=[].slice.call(arguments);for(var t=s.resolveVariables(r,i),n="E",o=0;o<t.length;o++){var a=t[o];if("object"==typeof a)if(t[o]="",a.changeCase&&a.local){var p=t[o+1];p&&"string"==typeof p&&("u"==a.changeCase?t[o]=p[0].toUpperCase():t[o]=p[0].toLowerCase(),t[o+1]=p.substr(1))}else a.changeCase&&(n=a.changeCase);else"U"==n?t[o]=a.toUpperCase():"L"==n&&(t[o]=a.toLowerCase())}return s.variables.__=e,t.join("")}));return a},e.prototype.tmFormatFunction=function(e,t,i){return"upcase"==t.formatFunction?e.toUpperCase():"downcase"==t.formatFunction?e.toLowerCase():e},e.prototype.resolveVariables=function(e,t){for(var i=[],n="",o=!0,r=0;r<e.length;r++){var s=e[r];if("string"!=typeof s){if(s){if(o=!1,s.fmtString){var a=e.indexOf(s,r+1);-1==a&&(a=e.length),s.fmt=e.slice(r+1,a),r=a}if(s.text){var p=this.getVariableValue(t,s.text,n)+"";s.fmtString&&(p=this.tmStrFormat(p,s,t)),s.formatFunction&&(p=this.tmFormatFunction(p,s,t)),p&&!s.ifEnd?(i.push(p),c(s)):!p&&s.ifEnd&&c(s.ifEnd)}else s.elseEnd?c(s.elseEnd):(null!=s.tabstopId||null!=s.changeCase)&&i.push(s)}}else i.push(s),"\n"==s?(o=!0,n=""):o&&(n=/^\t*/.exec(s)[0],o=/\S/.test(s))}function c(t){var i=e.indexOf(t,r+1);-1!=i&&(r=i)}return i},e.prototype.getDisplayTextForSnippet=function(e,t){return g.call(this,e,t).text},e.prototype.insertSnippetForSelection=function(e,t,i){void 0===i&&(i={});var n=g.call(this,e,t,i),o=e.getSelectionRange(),r=e.session.replace(o,n.text),s=new m(e),a=e.inVirtualSelectionMode&&e.selection.index;s.addTabstops(n.tabstops,o.start,r,a)},e.prototype.insertSnippet=function(e,t,i){void 0===i&&(i={});var n=this;if(e.inVirtualSelectionMode)return n.insertSnippetForSelection(e,t,i);e.forEachSelection((function(){n.insertSnippetForSelection(e,t,i)}),null,{keepOrder:!0}),e.tabstopManager&&e.tabstopManager.tabNext()},e.prototype.$getScope=function(e){var t=e.session.$mode.$id||"";if("html"===(t=t.split("/").pop())||"php"===t){"php"!==t||e.session.$mode.inlinePhp||(t="html");var i=e.getCursorPosition(),n=e.session.getState(i.row);"object"==typeof n&&(n=n[0]),n.substring&&("js-"==n.substring(0,3)?t="javascript":"css-"==n.substring(0,4)?t="css":"php-"==n.substring(0,4)&&(t="php"))}return t},e.prototype.getActiveScopes=function(e){var t=this.$getScope(e),i=[t],n=this.snippetMap;return n[t]&&n[t].includeScopes&&i.push.apply(i,n[t].includeScopes),i.push("_"),i},e.prototype.expandWithTab=function(e,t){var i=this,n=e.forEachSelection((function(){return i.expandSnippetForSelection(e,t)}),null,{keepOrder:!0});return n&&e.tabstopManager&&e.tabstopManager.tabNext(),n},e.prototype.expandSnippetForSelection=function(e,t){var i,n=e.getCursorPosition(),o=e.session.getLine(n.row),r=o.substring(0,n.column),s=o.substr(n.column),a=this.snippetMap;return this.getActiveScopes(e).some((function(e){var t=a[e];return t&&(i=this.findMatchingSnippet(t,r,s)),!!i}),this),!!i&&(t&&t.dryRun||(e.session.doc.removeInLine(n.row,n.column-i.replaceBefore.length,n.column+i.replaceAfter.length),this.variables.M__=i.matchBefore,this.variables.T__=i.matchAfter,this.insertSnippetForSelection(e,i.content),this.variables.M__=this.variables.T__=null),!0)},e.prototype.findMatchingSnippet=function(e,t,i){for(var n=e.length;n--;){var o=e[n];if((!o.startRe||o.startRe.test(t))&&((!o.endRe||o.endRe.test(i))&&(o.startRe||o.endRe)))return o.matchBefore=o.startRe?o.startRe.exec(t):[""],o.matchAfter=o.endRe?o.endRe.exec(i):[""],o.replaceBefore=o.triggerRe?o.triggerRe.exec(t)[0]:"",o.replaceAfter=o.endTriggerRe?o.endTriggerRe.exec(i)[0]:"",o}},e.prototype.register=function(e,t){var i=this.snippetMap,n=this.snippetNameMap,o=this;function r(e){return e&&!/^\^?\(.*\)\$?$|^\\b$/.test(e)&&(e="(?:"+e+")"),e||""}function a(e,t,i){return e=r(e),t=r(t),i?(e=t+e)&&"$"!=e[e.length-1]&&(e+="$"):(e+=t)&&"^"!=e[0]&&(e="^"+e),new RegExp(e)}function p(e){e.scope||(e.scope=t||"_"),t=e.scope,i[t]||(i[t]=[],n[t]={});var r=n[t];if(e.name){var p=r[e.name];p&&o.unregister(p),r[e.name]=e}i[t].push(e),e.prefix&&(e.tabTrigger=e.prefix),!e.content&&e.body&&(e.content=Array.isArray(e.body)?e.body.join("\n"):e.body),e.tabTrigger&&!e.trigger&&(!e.guard&&/^\w/.test(e.tabTrigger)&&(e.guard="\\b"),e.trigger=s.escapeRegExp(e.tabTrigger)),(e.trigger||e.guard||e.endTrigger||e.endGuard)&&(e.startRe=a(e.trigger,e.guard,!0),e.triggerRe=new RegExp(e.trigger),e.endRe=a(e.endTrigger,e.endGuard,!0),e.endTriggerRe=new RegExp(e.endTrigger))}e||(e=[]),Array.isArray(e)?e.forEach(p):Object.keys(e).forEach((function(t){p(e[t])})),this._signal("registerSnippets",{scope:t})},e.prototype.unregister=function(e,t){var i=this.snippetMap,n=this.snippetNameMap;function o(e){var o=n[e.scope||t];if(o&&o[e.name]){delete o[e.name];var r=i[e.scope||t],s=r&&r.indexOf(e);s>=0&&r.splice(s,1)}}e.content?o(e):Array.isArray(e)&&e.forEach(o)},e.prototype.parseSnippetFile=function(e){e=e.replace(/\r/g,"");for(var t,i=[],n={},o=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm;t=o.exec(e);){if(t[1])try{n=JSON.parse(t[1]),i.push(n)}catch(e){}if(t[4])n.content=t[4].replace(/^\t/gm,""),i.push(n),n={};else{var r=t[2],s=t[3];if("regex"==r){var a=/\/((?:[^\/\\]|\\.)*)|$/g;n.guard=a.exec(s)[1],n.trigger=a.exec(s)[1],n.endTrigger=a.exec(s)[1],n.endGuard=a.exec(s)[1]}else"snippet"==r?(n.tabTrigger=s.match(/^\S*/)[0],n.name||(n.name=s)):r&&(n[r]=s)}}return i},e.prototype.getSnippetByName=function(e,t){var i,n=this.snippetNameMap;return this.getActiveScopes(t).some((function(t){var o=n[t];return o&&(i=o[e]),!!i}),this),i},e}();o.implement(f.prototype,r);var g=function(e,t,i){void 0===i&&(i={});var n=e.getCursorPosition(),o=e.session.getLine(n.row),r=e.session.getTabString(),s=o.match(/^\s*/)[0];n.column<s.length&&(s=s.slice(0,n.column)),t=t.replace(/\r/g,"");var a=this.tokenizeTmSnippet(t);a=(a=this.resolveVariables(a,e)).map((function(e){return"\n"!=e||i.excludeExtraIndent?"string"==typeof e?e.replace(/\t/g,r):e:e+s}));var p=[];a.forEach((function(e,t){if("object"==typeof e){var i=e.tabstopId,n=p[i];if(n||((n=p[i]=[]).index=i,n.value="",n.parents={}),-1===n.indexOf(e)){e.choices&&!n.choices&&(n.choices=e.choices),n.push(e);var o=a.indexOf(e,t+1);if(-1!==o){var r=a.slice(t+1,o);r.some((function(e){return"object"==typeof e}))&&!n.value?n.value=r:!r.length||n.value&&"string"==typeof n.value||(n.value=r.join(""))}}}})),p.forEach((function(e){e.length=0}));var c={};function l(e){for(var t=[],i=0;i<e.length;i++){var n=e[i];if("object"==typeof n){if(c[n.tabstopId])continue;n=t[e.lastIndexOf(n,i-1)]||{tabstopId:n.tabstopId}}t[i]=n}return t}for(var h=0;h<a.length;h++){var u=a[h];if("object"==typeof u){var d=u.tabstopId,f=p[d],g=a.indexOf(u,h+1);if(c[d])c[d]===u&&(delete c[d],Object.keys(c).forEach((function(e){f.parents[e]=!0})));else{c[d]=u;var m=f.value;"string"!=typeof m?m=l(m):u.fmt&&(m=this.tmStrFormat(m,u,e)),a.splice.apply(a,[h+1,Math.max(0,g-h)].concat(m,u)),-1===f.indexOf(u)&&f.push(u)}}}var v=0,b=0,x="";return a.forEach((function(e){if("string"==typeof e){var t=e.split("\n");t.length>1?(b=t[t.length-1].length,v+=t.length-1):b+=e.length,x+=e}else e&&(e.start?e.end={row:v,column:b}:e.start={row:v,column:b})})),{text:x,tabstops:p,tokens:a}},m=function(){function e(e){if(this.index=0,this.ranges=[],this.tabstops=[],e.tabstopManager)return e.tabstopManager;e.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=s.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(e)}return e.prototype.attach=function(e){this.$openTabstops=null,this.selectedTabstop=null,this.editor=e,this.session=e.session,this.editor.on("change",this.$onChange),this.editor.on("changeSelection",this.$onChangeSelection),this.editor.on("changeSession",this.$onChangeSession),this.editor.commands.on("afterExec",this.$onAfterExec),this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)},e.prototype.detach=function(){this.tabstops.forEach(this.removeTabstopMarkers,this),this.ranges.length=0,this.tabstops.length=0,this.selectedTabstop=null,this.editor.off("change",this.$onChange),this.editor.off("changeSelection",this.$onChangeSelection),this.editor.off("changeSession",this.$onChangeSession),this.editor.commands.off("afterExec",this.$onAfterExec),this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.tabstopManager=null,this.session=null,this.editor=null},e.prototype.onChange=function(e){for(var t="r"==e.action[0],i=this.selectedTabstop||{},n=i.parents||{},o=this.tabstops.slice(),r=0;r<o.length;r++){var s=o[r],a=s==i||n[s.index];if(s.rangeList.$bias=a?0:1,"remove"==e.action&&s!==i){var p=s.parents&&s.parents[i.index],c=s.rangeList.pointIndex(e.start,p);c=c<0?-c-1:c+1;var l=s.rangeList.pointIndex(e.end,p);l=l<0?-l-1:l-1;for(var h=s.rangeList.ranges.slice(c,l),u=0;u<h.length;u++)this.removeRange(h[u])}s.rangeList.$onChange(e)}var d=this.session;this.$inChange||!t||1!=d.getLength()||d.getValue()||this.detach()},e.prototype.updateLinkedFields=function(){var e=this.selectedTabstop;if(e&&e.hasLinkedRanges&&e.firstNonLinked){this.$inChange=!0;for(var i=this.session,n=i.getTextRange(e.firstNonLinked),o=0;o<e.length;o++){var r=e[o];if(r.linked){var s=r.original,a=t.snippetManager.tmStrFormat(n,s,this.editor);i.replace(r,a)}}this.$inChange=!1}},e.prototype.onAfterExec=function(e){e.command&&!e.command.readOnly&&this.updateLinkedFields()},e.prototype.onChangeSelection=function(){if(this.editor){for(var e=this.editor.selection.lead,t=this.editor.selection.anchor,i=this.editor.selection.isEmpty(),n=0;n<this.ranges.length;n++)if(!this.ranges[n].linked){var o=this.ranges[n].contains(e.row,e.column),r=i||this.ranges[n].contains(t.row,t.column);if(o&&r)return}this.detach()}},e.prototype.onChangeSession=function(){this.detach()},e.prototype.tabNext=function(e){var t=this.tabstops.length,i=this.index+(e||1);(i=Math.min(Math.max(i,1),t))==t&&(i=0),this.selectTabstop(i),this.updateTabstopMarkers(),0===i&&this.detach()},e.prototype.selectTabstop=function(e){this.$openTabstops=null;var t=this.tabstops[this.index];if(t&&this.addTabstopMarkers(t),this.index=e,(t=this.tabstops[this.index])&&t.length){this.selectedTabstop=t;var i=t.firstNonLinked||t;if(t.choices&&(i.cursor=i.start),this.editor.inVirtualSelectionMode)this.editor.selection.fromOrientedRange(i);else{var n=this.editor.multiSelect;n.toSingleRange(i);for(var o=0;o<t.length;o++)t.hasLinkedRanges&&t[o].linked||n.addRange(t[o].clone(),!0)}this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler),this.selectedTabstop&&this.selectedTabstop.choices&&this.editor.execCommand("startAutocomplete",{matches:this.selectedTabstop.choices})}},e.prototype.addTabstops=function(e,t,i){var n=this.useLink||!this.editor.getOption("enableMultiselect");if(this.$openTabstops||(this.$openTabstops=[]),!e[0]){var o=a.fromPoints(i,i);b(o.start,t),b(o.end,t),e[0]=[o],e[0].index=0}var r=[this.index+1,0],s=this.ranges,c=this.snippetId=(this.snippetId||0)+1;e.forEach((function(e,i){var o=this.$openTabstops[i]||e;o.snippetId=c;for(var l=0;l<e.length;l++){var h=e[l],u=a.fromPoints(h.start,h.end||h.start);v(u.start,t),v(u.end,t),u.original=h,u.tabstop=o,s.push(u),o!=e?o.unshift(u):o[l]=u,h.fmtString||o.firstNonLinked&&n?(u.linked=!0,o.hasLinkedRanges=!0):o.firstNonLinked||(o.firstNonLinked=u)}o.firstNonLinked||(o.hasLinkedRanges=!1),o===e&&(r.push(o),this.$openTabstops[i]=o),this.addTabstopMarkers(o),o.rangeList=o.rangeList||new p,o.rangeList.$bias=0,o.rangeList.addList(o)}),this),r.length>2&&(this.tabstops.length&&r.push(r.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,r))},e.prototype.addTabstopMarkers=function(e){var t=this.session;e.forEach((function(e){e.markerId||(e.markerId=t.addMarker(e,"ace_snippet-marker","text"))}))},e.prototype.removeTabstopMarkers=function(e){var t=this.session;e.forEach((function(e){t.removeMarker(e.markerId),e.markerId=null}))},e.prototype.updateTabstopMarkers=function(){if(this.selectedTabstop){var e=this.selectedTabstop.snippetId;0===this.selectedTabstop.index&&e--,this.tabstops.forEach((function(t){t.snippetId===e?this.addTabstopMarkers(t):this.removeTabstopMarkers(t)}),this)}},e.prototype.removeRange=function(e){var t=e.tabstop.indexOf(e);-1!=t&&e.tabstop.splice(t,1),-1!=(t=this.ranges.indexOf(e))&&this.ranges.splice(t,1),-1!=(t=e.tabstop.rangeList.ranges.indexOf(e))&&e.tabstop.splice(t,1),this.session.removeMarker(e.markerId),e.tabstop.length||(-1!=(t=this.tabstops.indexOf(e.tabstop))&&this.tabstops.splice(t,1),this.tabstops.length||this.detach())},e}();m.prototype.keyboardHandler=new c,m.prototype.keyboardHandler.bindKeys({Tab:function(e){t.snippetManager&&t.snippetManager.expandWithTab(e)||(e.tabstopManager.tabNext(1),e.renderer.scrollCursorIntoView())},"Shift-Tab":function(e){e.tabstopManager.tabNext(-1),e.renderer.scrollCursorIntoView()},Esc:function(e){e.tabstopManager.detach()}});var v=function(e,t){0==e.row&&(e.column+=t.column),e.row+=t.row},b=function(e,t){e.row==t.row&&(e.column-=t.column),e.row-=t.row};n.importCssString("\n.ace_snippet-marker {\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n background: rgba(194, 193, 208, 0.09);\n border: 1px dotted rgba(211, 208, 235, 0.62);\n position: absolute;\n}","snippets.css",!1),t.snippetManager=new f;var x=e("./editor").Editor;(function(){this.insertSnippet=function(e,i){return t.snippetManager.insertSnippet(this,e,i)},this.expandSnippet=function(e){return t.snippetManager.expandWithTab(this,e)}}).call(x.prototype)})),ace.define("ace/autocomplete/popup",["require","exports","module","ace/virtual_renderer","ace/editor","ace/range","ace/lib/event","ace/lib/lang","ace/lib/dom","ace/config","ace/lib/useragent"],(function(e,t,i){"use strict";var n=e("../virtual_renderer").VirtualRenderer,o=e("../editor").Editor,r=e("../range").Range,s=e("../lib/event"),a=e("../lib/lang"),p=e("../lib/dom"),c=e("../config").nls,l=e("./../lib/useragent"),h=function(e){return"suggest-aria-id:".concat(e)},u=l.isSafari?"menu":"listbox",d=l.isSafari?"menuitem":"option",f=l.isSafari?"aria-current":"aria-selected",g=function(e){var t=new n(e);t.$maxLines=4;var i=new o(t);return i.setHighlightActiveLine(!1),i.setShowPrintMargin(!1),i.renderer.setShowGutter(!1),i.renderer.setHighlightGutterLine(!1),i.$mouseHandler.$focusTimeout=0,i.$highlightTagPending=!0,i},m=function(e){var t=p.createElement("div"),i=g(t);e&&e.appendChild(t),t.style.display="none",i.renderer.content.style.cursor="default",i.renderer.setStyle("ace_autocomplete"),i.renderer.$textLayer.element.setAttribute("role",u),i.renderer.$textLayer.element.setAttribute("aria-roledescription",c("autocomplete.popup.aria-roledescription","Autocomplete suggestions")),i.renderer.$textLayer.element.setAttribute("aria-label",c("autocomplete.popup.aria-label","Autocomplete suggestions")),i.renderer.textarea.setAttribute("aria-hidden","true"),i.setOption("displayIndentGuides",!1),i.setOption("dragDelay",150);var n,o=function(){};i.focus=o,i.$isFocused=!0,i.renderer.$cursorLayer.restartTimer=o,i.renderer.$cursorLayer.element.style.opacity="0",i.renderer.$maxLines=8,i.renderer.$keepTextAreaAtCursor=!1,i.setHighlightActiveLine(!1),i.session.highlight(""),i.session.$searchHighlight.clazz="ace_highlight-marker",i.on("mousedown",(function(e){var t=e.getDocumentPosition();i.selection.moveToPosition(t),m.start.row=m.end.row=t.row,e.stop()}));var l=new r(-1,0,-1,1/0),m=new r(-1,0,-1,1/0);m.id=i.session.addMarker(m,"ace_active-line","fullLine"),i.setSelectOnHover=function(e){e?l.id&&(i.session.removeMarker(l.id),l.id=null):l.id=i.session.addMarker(l,"ace_line-hover","fullLine")},i.setSelectOnHover(!1),i.on("mousemove",(function(e){if(n){if(n.x!=e.x||n.y!=e.y){(n=e).scrollTop=i.renderer.scrollTop,i.isMouseOver=!0;var t=n.getDocumentPosition().row;l.start.row!=t&&(l.id||i.setRow(t),b(t))}}else n=e})),i.renderer.on("beforeRender",(function(){if(n&&-1!=l.start.row){n.$pos=null;var e=n.getDocumentPosition().row;l.id||i.setRow(e),b(e,!0)}})),i.renderer.on("afterRender",(function(){for(var e=i.renderer.$textLayer,t=e.config.firstRow,n=e.config.lastRow;t<=n;t++){var o=e.element.childNodes[t-e.config.firstRow];o.setAttribute("role",d),o.setAttribute("aria-roledescription",c("autocomplete.popup.item.aria-roledescription","item")),o.setAttribute("aria-setsize",i.data.length),o.setAttribute("aria-describedby","doc-tooltip"),o.setAttribute("aria-posinset",t+1);var r=i.getData(t);if(r){var s="".concat(r.caption||r.value).concat(r.meta?", ".concat(r.meta):"");o.setAttribute("aria-label",s)}o.querySelectorAll(".ace_completion-highlight").forEach((function(e){e.setAttribute("role","mark")}))}})),i.renderer.on("afterRender",(function(){var e=i.getRow(),t=i.renderer.$textLayer,n=t.element.childNodes[e-t.config.firstRow],o=document.activeElement;if(n!==i.selectedNode&&i.selectedNode&&(p.removeCssClass(i.selectedNode,"ace_selected"),i.selectedNode.removeAttribute(f),i.selectedNode.removeAttribute("id")),o.removeAttribute("aria-activedescendant"),i.selectedNode=n,n){var r=h(e);p.addCssClass(n,"ace_selected"),n.id=r,t.element.setAttribute("aria-activedescendant",r),o.setAttribute("aria-activedescendant",r),n.setAttribute(f,"true")}}));var v=function(){b(-1)},b=function(e,t){e!==l.start.row&&(l.start.row=l.end.row=e,t||i.session._emit("changeBackMarker"),i._emit("changeHoverMarker"))};i.getHoveredRow=function(){return l.start.row},s.addListener(i.container,"mouseout",(function(){i.isMouseOver=!1,v()})),i.on("hide",v),i.on("changeSelection",v),i.session.doc.getLength=function(){return i.data.length},i.session.doc.getLine=function(e){var t=i.data[e];return"string"==typeof t?t:t&&t.value||""};var x=i.session.bgTokenizer;return x.$tokenizeRow=function(e){var t=i.data[e],n=[];if(!t)return n;"string"==typeof t&&(t={value:t});var o=t.caption||t.value||t.name;function r(e,i){e&&n.push({type:(t.className||"")+(i||""),value:e})}for(var s=o.toLowerCase(),a=(i.filterText||"").toLowerCase(),p=0,c=0,l=0;l<=a.length;l++)if(l!=c&&(t.matchMask&1<<l||l==a.length)){var h=a.slice(c,l);c=l;var u=s.indexOf(h,p);if(-1==u)continue;r(o.slice(p,u),""),p=u+h.length,r(o.slice(u,p),"completion-highlight")}return r(o.slice(p,o.length),""),n.push({type:"completion-spacer",value:" "}),t.meta&&n.push({type:"completion-meta",value:t.meta}),t.message&&n.push({type:"completion-message",value:t.message}),n},x.$updateOnChange=o,x.start=o,i.session.$computeWidth=function(){return this.screenWidth=0},i.isOpen=!1,i.isTopdown=!1,i.autoSelect=!0,i.filterText="",i.isMouseOver=!1,i.data=[],i.setData=function(e,t){i.filterText=t||"",i.setValue(a.stringRepeat("\n",e.length),-1),i.data=e||[],i.setRow(0)},i.getData=function(e){return i.data[e]},i.getRow=function(){return m.start.row},i.setRow=function(e){e=Math.max(this.autoSelect?0:-1,Math.min(this.data.length-1,e)),m.start.row!=e&&(i.selection.clearSelection(),m.start.row=m.end.row=e||0,i.session._emit("changeBackMarker"),i.moveCursorTo(e||0,0),i.isOpen&&i._signal("select"))},i.on("changeSelection",(function(){i.isOpen&&i.setRow(i.selection.lead.row),i.renderer.scrollCursorIntoView()})),i.hide=function(){this.container.style.display="none",i.anchorPos=null,i.anchor=null,i.isOpen&&(i.isOpen=!1,this._signal("hide"))},i.tryShow=function(e,t,o,r){if(!r&&i.isOpen&&i.anchorPos&&i.anchor&&i.anchorPos.top===e.top&&i.anchorPos.left===e.left&&i.anchor===o)return!0;var s=this.container,a=this.renderer.scrollBar.width||10,p=window.innerHeight-a,c=window.innerWidth-a,l=this.renderer,h=l.$maxLines*t*1.4,u={top:0,bottom:0,left:0},d=p-e.top-3*this.$borderSize-t,f=e.top-3*this.$borderSize;o||(o=f<=d||d>=h?"bottom":"top"),"top"===o?(u.bottom=e.top-this.$borderSize,u.top=u.bottom-h):"bottom"===o&&(u.top=e.top+t+this.$borderSize,u.bottom=u.top+h);var g=u.top>=0&&u.bottom<=p;if(!r&&!g)return!1;l.$maxPixelHeight=g?null:"top"===o?f:d,s.style.display="";var m=s.offsetParent&&s.offsetParent.getBoundingClientRect();"top"===o?(s.style.top="",s.style.bottom=p+a-u.bottom-(m?p+a-m.bottom:0)+"px",i.isTopdown=!1):(s.style.top=u.top-(m?m.top:0)+"px",s.style.bottom="",i.isTopdown=!0);var v=e.left;return v+s.offsetWidth>c&&(v=c-s.offsetWidth),s.style.left=v-(m?m.left:0)+"px",s.style.right="",i.isOpen||(i.isOpen=!0,this._signal("show"),n=null),i.anchorPos=e,i.anchor=o,!0},i.show=function(e,t,i){this.tryShow(e,t,i?"bottom":void 0,!0)},i.goTo=function(e){var t=this.getRow(),i=this.session.getLength()-1;switch(e){case"up":t=t<=0?i:t-1;break;case"down":t=t>=i?-1:t+1;break;case"start":t=0;break;case"end":t=i}this.setRow(t)},i.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},i.$imageSize=0,i.$borderSize=1,i};p.importCssString('\n.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {\n background-color: #CAD6FA;\n z-index: 1;\n}\n.ace_dark.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {\n background-color: #3a674e;\n}\n.ace_editor.ace_autocomplete .ace_line-hover {\n border: 1px solid #abbffe;\n margin-top: -1px;\n background: rgba(233,233,253,0.4);\n position: absolute;\n z-index: 2;\n}\n.ace_dark.ace_editor.ace_autocomplete .ace_line-hover {\n border: 1px solid rgba(109, 150, 13, 0.8);\n background: rgba(58, 103, 78, 0.62);\n}\n.ace_completion-meta {\n opacity: 0.5;\n margin-left: 0.9em;\n}\n.ace_completion-message {\n margin-left: 0.9em;\n color: blue;\n}\n.ace_editor.ace_autocomplete .ace_completion-highlight{\n color: #2d69c7;\n}\n.ace_dark.ace_editor.ace_autocomplete .ace_completion-highlight{\n color: #93ca12;\n}\n.ace_editor.ace_autocomplete {\n width: 300px;\n z-index: 200000;\n border: 1px lightgray solid;\n position: absolute;\n box-shadow: 2px 3px 5px rgba(0,0,0,.2);\n line-height: 1.4;\n background: #fefefe;\n color: #111;\n}\n.ace_dark.ace_editor.ace_autocomplete {\n border: 1px #484747 solid;\n box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.51);\n line-height: 1.4;\n background: #25282c;\n color: #c1c1c1;\n}\n.ace_autocomplete .ace_text-layer {\n width: calc(100% - 8px);\n}\n.ace_autocomplete .ace_line {\n display: flex;\n align-items: center;\n}\n.ace_autocomplete .ace_line > * {\n min-width: 0;\n flex: 0 0 auto;\n}\n.ace_autocomplete .ace_line .ace_ {\n flex: 0 1 auto;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.ace_autocomplete .ace_completion-spacer {\n flex: 1;\n}\n.ace_autocomplete.ace_loading:after {\n content: "";\n position: absolute;\n top: 0px;\n height: 2px;\n width: 8%;\n background: blue;\n z-index: 100;\n animation: ace_progress 3s infinite linear;\n animation-delay: 300ms;\n transform: translateX(-100%) scaleX(1);\n}\n@keyframes ace_progress {\n 0% { transform: translateX(-100%) scaleX(1) }\n 50% { transform: translateX(625%) scaleX(2) } \n 100% { transform: translateX(1500%) scaleX(3) } \n}\n@media (prefers-reduced-motion) {\n .ace_autocomplete.ace_loading:after {\n transform: translateX(625%) scaleX(2);\n animation: none;\n }\n}\n',"autocompletion.css",!1),t.AcePopup=m,t.$singleLineEditor=g,t.getAriaId=h})),ace.define("ace/autocomplete/inline_screenreader",["require","exports","module"],(function(e,t,i){"use strict";var n=function(){function e(e){this.editor=e,this.screenReaderDiv=document.createElement("div"),this.screenReaderDiv.classList.add("ace_screenreader-only"),this.editor.container.appendChild(this.screenReaderDiv)}return e.prototype.setScreenReaderContent=function(e){for(!this.popup&&this.editor.completer&&this.editor.completer.popup&&(this.popup=this.editor.completer.popup,this.popup.renderer.on("afterRender",function(){var e=this.popup.getRow(),t=this.popup.renderer.$textLayer,i=t.element.childNodes[e-t.config.firstRow];if(i){for(var n="doc-tooltip ",o=0;o<this._lines.length;o++)n+="ace-inline-screenreader-line-".concat(o," ");i.setAttribute("aria-describedby",n)}}.bind(this)));this.screenReaderDiv.firstChild;)this.screenReaderDiv.removeChild(this.screenReaderDiv.firstChild);this._lines=e.split(/\r\n|\r|\n/);var t=this.createCodeBlock();this.screenReaderDiv.appendChild(t)},e.prototype.destroy=function(){this.screenReaderDiv.remove()},e.prototype.createCodeBlock=function(){var e=document.createElement("pre");e.setAttribute("id","ace-inline-screenreader");for(var t=0;t<this._lines.length;t++){var i=document.createElement("code");i.setAttribute("id","ace-inline-screenreader-line-".concat(t));var n=document.createTextNode(this._lines[t]);i.appendChild(n),e.appendChild(i)}return e},e}();t.AceInlineScreenReader=n})),ace.define("ace/autocomplete/inline",["require","exports","module","ace/snippets","ace/autocomplete/inline_screenreader"],(function(e,t,i){"use strict";var n=e("../snippets").snippetManager,o=e("./inline_screenreader").AceInlineScreenReader,r=function(){function e(){this.editor=null}return e.prototype.show=function(e,t,i){if(i=i||"",e&&this.editor&&this.editor!==e&&(this.hide(),this.editor=null,this.inlineScreenReader=null),!e||!t)return!1;this.inlineScreenReader||(this.inlineScreenReader=new o(e));var r=t.snippet?n.getDisplayTextForSnippet(e,t.snippet):t.value;return!(t.hideInlinePreview||!r||!r.startsWith(i))&&(this.editor=e,this.inlineScreenReader.setScreenReaderContent(r),""===(r=r.slice(i.length))?e.removeGhostText():e.setGhostText(r),!0)},e.prototype.isOpen=function(){return!!this.editor&&!!this.editor.renderer.$ghostText},e.prototype.hide=function(){return!!this.editor&&(this.editor.removeGhostText(),!0)},e.prototype.destroy=function(){this.hide(),this.editor=null,this.inlineScreenReader&&(this.inlineScreenReader.destroy(),this.inlineScreenReader=null)},e}();t.AceInline=r})),ace.define("ace/autocomplete/util",["require","exports","module"],(function(e,t,i){"use strict";t.parForEach=function(e,t,i){var n=0,o=e.length;0===o&&i();for(var r=0;r<o;r++)t(e[r],(function(e,t){++n===o&&i(e,t)}))};var n=/[a-zA-Z_0-9\$\-\u00A2-\u2000\u2070-\uFFFF]/;t.retrievePrecedingIdentifier=function(e,t,i){i=i||n;for(var o=[],r=t-1;r>=0&&i.test(e[r]);r--)o.push(e[r]);return o.reverse().join("")},t.retrieveFollowingIdentifier=function(e,t,i){i=i||n;for(var o=[],r=t;r<e.length&&i.test(e[r]);r++)o.push(e[r]);return o},t.getCompletionPrefix=function(e){var t,i=e.getCursorPosition(),n=e.session.getLine(i.row);return e.completers.forEach(function(e){e.identifierRegexps&&e.identifierRegexps.forEach(function(e){!t&&e&&(t=this.retrievePrecedingIdentifier(n,i.column,e))}.bind(this))}.bind(this)),t||this.retrievePrecedingIdentifier(n,i.column)},t.triggerAutocomplete=function(e,t){t=null==t?e.session.getPrecedingCharacter():t;return e.completers.some((function(e){if(e.triggerCharacters&&Array.isArray(e.triggerCharacters))return e.triggerCharacters.includes(t)}))}})),ace.define("ace/autocomplete",["require","exports","module","ace/keyboard/hash_handler","ace/autocomplete/popup","ace/autocomplete/inline","ace/autocomplete/popup","ace/autocomplete/util","ace/lib/lang","ace/lib/dom","ace/snippets","ace/config","ace/lib/event","ace/lib/scroll"],(function(e,t,i){"use strict";var n=e("./keyboard/hash_handler").HashHandler,o=e("./autocomplete/popup").AcePopup,r=e("./autocomplete/inline").AceInline,s=e("./autocomplete/popup").getAriaId,a=e("./autocomplete/util"),p=e("./lib/lang"),c=e("./lib/dom"),l=e("./snippets").snippetManager,h=e("./config"),u=e("./lib/event"),d=e("./lib/scroll").preventParentScroll,f=function(e,t){t.completer&&t.completer.destroy()},g=function(){function e(){this.autoInsert=!1,this.autoSelect=!0,this.autoShown=!1,this.exactMatch=!1,this.inlineEnabled=!1,this.keyboardHandler=new n,this.keyboardHandler.bindKeys(this.commands),this.parentNode=null,this.setSelectOnHover=!1,this.hasSeen=new Set,this.showLoadingState=!1,this.stickySelectionDelay=500,this.blurListener=this.blurListener.bind(this),this.changeListener=this.changeListener.bind(this),this.mousedownListener=this.mousedownListener.bind(this),this.mousewheelListener=this.mousewheelListener.bind(this),this.onLayoutChange=this.onLayoutChange.bind(this),this.changeTimer=p.delayedCall(function(){this.updateCompletions(!0)}.bind(this)),this.tooltipTimer=p.delayedCall(this.updateDocTooltip.bind(this),50),this.popupTimer=p.delayedCall(this.$updatePopupPosition.bind(this),50),this.stickySelectionTimer=p.delayedCall(function(){this.stickySelection=!0}.bind(this),this.stickySelectionDelay),this.$firstOpenTimer=p.delayedCall(function(){var t=this.completionProvider&&this.completionProvider.initialPosition;this.autoShown||this.popup&&this.popup.isOpen||!t||0===this.editor.completers.length||(this.completions=new v(e.completionsForLoading),this.openPopup(this.editor,t.prefix,!1),this.popup.renderer.setStyle("ace_loading",!0))}.bind(this),this.stickySelectionDelay)}return Object.defineProperty(e,"completionsForLoading",{get:function(){return[{caption:h.nls("autocomplete.loading","Loading..."),value:""}]},enumerable:!1,configurable:!0}),e.prototype.$init=function(){return this.popup=new o(this.parentNode||document.body||document.documentElement),this.popup.on("click",function(e){this.insertMatch(),e.stop()}.bind(this)),this.popup.focus=this.editor.focus.bind(this.editor),this.popup.on("show",this.$onPopupShow.bind(this)),this.popup.on("hide",this.$onHidePopup.bind(this)),this.popup.on("select",this.$onPopupChange.bind(this)),u.addListener(this.popup.container,"mouseout",this.mouseOutListener.bind(this)),this.popup.on("changeHoverMarker",this.tooltipTimer.bind(null,null)),this.popup.renderer.on("afterRender",this.$onPopupRender.bind(this)),this.popup},e.prototype.$initInline=function(){if(this.inlineEnabled&&!this.inlineRenderer)return this.inlineRenderer=new r,this.inlineRenderer},e.prototype.getPopup=function(){return this.popup||this.$init()},e.prototype.$onHidePopup=function(){this.inlineRenderer&&this.inlineRenderer.hide(),this.hideDocTooltip(),this.stickySelectionTimer.cancel(),this.popupTimer.cancel(),this.stickySelection=!1},e.prototype.$seen=function(e){!this.hasSeen.has(e)&&e&&e.completer&&e.completer.onSeen&&"function"==typeof e.completer.onSeen&&(e.completer.onSeen(this.editor,e),this.hasSeen.add(e))},e.prototype.$onPopupChange=function(e){if(this.inlineRenderer&&this.inlineEnabled){var t=e?null:this.popup.getData(this.popup.getRow());if(this.$updateGhostText(t),this.popup.isMouseOver&&this.setSelectOnHover)return void this.tooltipTimer.call(null,null);this.popupTimer.schedule(),this.tooltipTimer.schedule()}else this.popupTimer.call(null,null),this.tooltipTimer.call(null,null)},e.prototype.$updateGhostText=function(e){var t=this.base.row,i=this.base.column,n=this.editor.getCursorPosition().column,o=this.editor.session.getLine(t).slice(i,n);this.inlineRenderer.show(this.editor,e,o)?this.$seen(e):this.inlineRenderer.hide()},e.prototype.$onPopupRender=function(){var e=this.inlineRenderer&&this.inlineEnabled;if(this.completions&&this.completions.filtered&&this.completions.filtered.length>0)for(var t=this.popup.getFirstVisibleRow();t<=this.popup.getLastVisibleRow();t++){var i=this.popup.getData(t);!i||e&&!i.hideInlinePreview||this.$seen(i)}},e.prototype.$onPopupShow=function(e){this.$onPopupChange(e),this.stickySelection=!1,this.stickySelectionDelay>=0&&this.stickySelectionTimer.schedule(this.stickySelectionDelay)},e.prototype.observeLayoutChanges=function(){if(!this.$elements&&this.editor){window.addEventListener("resize",this.onLayoutChange,{passive:!0}),window.addEventListener("wheel",this.mousewheelListener);for(var e=this.editor.container.parentNode,t=[];e;)t.push(e),e.addEventListener("scroll",this.onLayoutChange,{passive:!0}),e=e.parentNode;this.$elements=t}},e.prototype.unObserveLayoutChanges=function(){var e=this;window.removeEventListener("resize",this.onLayoutChange,{passive:!0}),window.removeEventListener("wheel",this.mousewheelListener),this.$elements&&this.$elements.forEach((function(t){t.removeEventListener("scroll",e.onLayoutChange,{passive:!0})})),this.$elements=null},e.prototype.onLayoutChange=function(){if(!this.popup.isOpen)return this.unObserveLayoutChanges();this.$updatePopupPosition(),this.updateDocTooltip()},e.prototype.$updatePopupPosition=function(){var e=this.editor,t=e.renderer,i=t.layerConfig.lineHeight,n=t.$cursorLayer.getPixelPosition(this.base,!0);n.left-=this.popup.getTextLeftOffset();var o=e.container.getBoundingClientRect();n.top+=o.top-t.layerConfig.offset,n.left+=o.left-e.renderer.scrollLeft,n.left+=t.gutterWidth;var r={top:n.top,left:n.left};t.$ghostText&&t.$ghostTextWidget&&this.base.row===t.$ghostText.position.row&&(r.top+=t.$ghostTextWidget.el.offsetHeight);var s=e.container.getBoundingClientRect().bottom-i,a=s<r.top?{top:s,left:r.left}:r;this.popup.tryShow(a,i,"bottom")||this.popup.tryShow(n,i,"top")||this.popup.show(n,i)},e.prototype.openPopup=function(e,t,i){this.$firstOpenTimer.cancel(),this.popup||this.$init(),this.inlineEnabled&&!this.inlineRenderer&&this.$initInline(),this.popup.autoSelect=this.autoSelect,this.popup.setSelectOnHover(this.setSelectOnHover);var n,o=this.popup.getRow(),r=this.popup.data[o];this.popup.setData(this.completions.filtered,this.completions.filterText),this.editor.textInput.setAriaOptions&&this.editor.textInput.setAriaOptions({activeDescendant:s(this.popup.getRow()),inline:this.inlineEnabled}),e.keyBinding.addKeyboardHandler(this.keyboardHandler),this.stickySelection&&(n=this.popup.data.indexOf(r)),n&&-1!==n||(n=0),this.popup.setRow(this.autoSelect?n:-1),n===o&&r!==this.completions.filtered[n]&&this.$onPopupChange();var a=this.inlineRenderer&&this.inlineEnabled;if(n===o&&a){var p=this.popup.getData(this.popup.getRow());this.$updateGhostText(p)}i||(this.popup.setTheme(e.getTheme()),this.popup.setFontSize(e.getFontSize()),this.$updatePopupPosition(),this.tooltipNode&&this.updateDocTooltip()),this.changeTimer.cancel(),this.observeLayoutChanges()},e.prototype.detach=function(){this.editor&&(this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.off("changeSelection",this.changeListener),this.editor.off("blur",this.blurListener),this.editor.off("mousedown",this.mousedownListener),this.editor.off("mousewheel",this.mousewheelListener)),this.$firstOpenTimer.cancel(),this.changeTimer.cancel(),this.hideDocTooltip(),this.completionProvider&&this.completionProvider.detach(),this.popup&&this.popup.isOpen&&this.popup.hide(),this.popup&&this.popup.renderer&&this.popup.renderer.off("afterRender",this.$onPopupRender),this.base&&this.base.detach(),this.activated=!1,this.completionProvider=this.completions=this.base=null,this.unObserveLayoutChanges()},e.prototype.changeListener=function(e){var t=this.editor.selection.lead;(t.row!=this.base.row||t.column<this.base.column)&&this.detach(),this.activated?this.changeTimer.schedule():this.detach()},e.prototype.blurListener=function(e){var t=document.activeElement,i=this.editor.textInput.getElement(),n=e.relatedTarget&&this.tooltipNode&&this.tooltipNode.contains(e.relatedTarget),o=this.popup&&this.popup.container;t==i||t.parentNode==o||n||t==this.tooltipNode||e.relatedTarget==i||this.detach()},e.prototype.mousedownListener=function(e){this.detach()},e.prototype.mousewheelListener=function(e){this.popup&&!this.popup.isMouseOver&&this.detach()},e.prototype.mouseOutListener=function(e){this.popup.isOpen&&this.$updatePopupPosition()},e.prototype.goTo=function(e){this.popup.goTo(e)},e.prototype.insertMatch=function(e,t){if(e||(e=this.popup.getData(this.popup.getRow())),!e)return!1;if(""===e.value)return this.detach();var i=this.completions,n=this.getCompletionProvider().insertMatch(this.editor,e,i.filterText,t);return this.completions==i&&this.detach(),n},e.prototype.showPopup=function(e,t){this.editor&&this.detach(),this.activated=!0,this.editor=e,e.completer!=this&&(e.completer&&e.completer.detach(),e.completer=this),e.on("changeSelection",this.changeListener),e.on("blur",this.blurListener),e.on("mousedown",this.mousedownListener),e.on("mousewheel",this.mousewheelListener),this.updateCompletions(!1,t)},e.prototype.getCompletionProvider=function(e){return this.completionProvider||(this.completionProvider=new m(e)),this.completionProvider},e.prototype.gatherCompletions=function(e,t){return this.getCompletionProvider().gatherCompletions(e,t)},e.prototype.updateCompletions=function(t,i){if(t&&this.base&&this.completions){var n=this.editor.getCursorPosition();if((r=this.editor.session.getTextRange({start:this.base,end:n}))==this.completions.filterText)return;return this.completions.setFilter(r),this.completions.filtered.length?1!=this.completions.filtered.length||this.completions.filtered[0].value!=r||this.completions.filtered[0].snippet?void this.openPopup(this.editor,r,t):this.detach():this.detach()}if(i&&i.matches){n=this.editor.getSelectionRange().start;return this.base=this.editor.session.doc.createAnchor(n.row,n.column),this.base.$insertRight=!0,this.completions=new v(i.matches),this.getCompletionProvider().completions=this.completions,this.openPopup(this.editor,"",t)}var o=this.editor.getSession(),r=(n=this.editor.getCursorPosition(),a.getCompletionPrefix(this.editor));this.base=o.doc.createAnchor(n.row,n.column-r.length),this.base.$insertRight=!0;var s={exactMatch:this.exactMatch,ignoreCaption:this.ignoreCaption};this.getCompletionProvider({prefix:r,pos:n}).provideCompletions(this.editor,s,function(i,n,o){var r=n.filtered,s=a.getCompletionPrefix(this.editor);if(this.$firstOpenTimer.cancel(),o){if(!r.length){var p=!this.autoShown&&this.emptyMessage;if("function"==typeof p&&(p=this.emptyMessage(s)),p){var c=[{caption:p,value:""}];return this.completions=new v(c),this.openPopup(this.editor,s,t),this.popup.renderer.setStyle("ace_loading",!1),void this.popup.renderer.setStyle("ace_empty-message",!0)}return this.detach()}if(1==r.length&&r[0].value==s&&!r[0].snippet)return this.detach();if(this.autoInsert&&!this.autoShown&&1==r.length)return this.insertMatch(r[0])}this.completions=!o&&this.showLoadingState?new v(e.completionsForLoading.concat(r),n.filterText):n,this.openPopup(this.editor,s,t),this.popup.renderer.setStyle("ace_empty-message",!1),this.popup.renderer.setStyle("ace_loading",!o)}.bind(this)),!this.showLoadingState||this.autoShown||this.popup&&this.popup.isOpen||this.$firstOpenTimer.delay(this.stickySelectionDelay/2)},e.prototype.cancelContextMenu=function(){this.editor.$mouseHandler.cancelContextMenu()},e.prototype.updateDocTooltip=function(){var e=this.popup,t=this.completions&&this.completions.filtered,i=t&&(t[e.getHoveredRow()]||t[e.getRow()]),n=null;if(!i||!this.editor||!this.popup.isOpen)return this.hideDocTooltip();for(var o=this.editor.completers.length,r=0;r<o;r++){var s=this.editor.completers[r];if(s.getDocTooltip&&i.completerId===s.id){n=s.getDocTooltip(i);break}}if(n||"string"==typeof i||(n=i),"string"==typeof n&&(n={docText:n}),!n||!n.docHTML&&!n.docText)return this.hideDocTooltip();this.showDocTooltip(n)},e.prototype.showDocTooltip=function(e){this.tooltipNode||(this.tooltipNode=c.createElement("div"),this.tooltipNode.style.margin="0",this.tooltipNode.style.pointerEvents="auto",this.tooltipNode.style.overscrollBehavior="contain",this.tooltipNode.tabIndex=-1,this.tooltipNode.onblur=this.blurListener.bind(this),this.tooltipNode.onclick=this.onTooltipClick.bind(this),this.tooltipNode.id="doc-tooltip",this.tooltipNode.setAttribute("role","tooltip"),this.tooltipNode.addEventListener("wheel",d));var t=this.editor.renderer.theme;this.tooltipNode.className="ace_tooltip ace_doc-tooltip "+(t.isDark?"ace_dark ":"")+(t.cssClass||"");var i=this.tooltipNode;e.docHTML?i.innerHTML=e.docHTML:e.docText&&(i.textContent=e.docText),i.parentNode||this.popup.container.appendChild(this.tooltipNode);var n=this.popup,o=n.container.getBoundingClientRect(),r=400,s=300,a=n.renderer.scrollBar.width||10,p=o.left,l=window.innerWidth-o.right-a,h=n.isTopdown?o.top:window.innerHeight-a-o.bottom,u=[Math.min(l/r,1),Math.min(p/r,1),Math.min(h/s*.9)],f=Math.max.apply(Math,u),g=i.style;g.display="block",f==u[0]?(g.left=o.right+1+"px",g.right="",g.maxWidth=r*f+"px",g.top=o.top+"px",g.bottom="",g.maxHeight=Math.min(window.innerHeight-a-o.top,s)+"px"):f==u[1]?(g.right=window.innerWidth-o.left+"px",g.left="",g.maxWidth=r*f+"px",g.top=o.top+"px",g.bottom="",g.maxHeight=Math.min(window.innerHeight-a-o.top,s)+"px"):f==u[2]&&(g.left=window.innerWidth-o.left+"px",g.maxWidth=Math.min(r,window.innerWidth)+"px",n.isTopdown?(g.top=o.bottom+"px",g.left=o.left+"px",g.right="",g.bottom="",g.maxHeight=Math.min(window.innerHeight-a-o.bottom,s)+"px"):(g.top=n.container.offsetTop-i.offsetHeight+"px",g.left=o.left+"px",g.right="",g.bottom="",g.maxHeight=Math.min(n.container.offsetTop,s)+"px"))},e.prototype.hideDocTooltip=function(){if(this.tooltipTimer.cancel(),this.tooltipNode){var e=this.tooltipNode;this.editor.isFocused()||document.activeElement!=e||this.editor.focus(),this.tooltipNode=null,e.parentNode&&e.parentNode.removeChild(e)}},e.prototype.onTooltipClick=function(e){for(var t=e.target;t&&t!=this.tooltipNode;){if("A"==t.nodeName&&t.href){t.rel="noreferrer",t.target="_blank";break}t=t.parentNode}},e.prototype.destroy=function(){if(this.detach(),this.popup){this.popup.destroy();var e=this.popup.container;e&&e.parentNode&&e.parentNode.removeChild(e)}this.editor&&this.editor.completer==this&&(this.editor.off("destroy",f),this.editor.completer=null),this.inlineRenderer=this.popup=this.editor=null},e.for=function(t){return t.completer instanceof e||(t.completer&&(t.completer.destroy(),t.completer=null),h.get("sharedPopups")?(e.$sharedInstance||(e.$sharedInstance=new e),t.completer=e.$sharedInstance):(t.completer=new e,t.once("destroy",f))),t.completer},e}();g.prototype.commands={Up:function(e){e.completer.goTo("up")},Down:function(e){e.completer.goTo("down")},"Ctrl-Up|Ctrl-Home":function(e){e.completer.goTo("start")},"Ctrl-Down|Ctrl-End":function(e){e.completer.goTo("end")},Esc:function(e){e.completer.detach()},Return:function(e){return e.completer.insertMatch()},"Shift-Return":function(e){e.completer.insertMatch(null,{deleteSuffix:!0})},Tab:function(e){var t=e.completer.insertMatch();if(t||e.tabstopManager)return t;e.completer.goTo("down")},Backspace:function(e){e.execCommand("backspace"),!a.getCompletionPrefix(e)&&e.completer&&e.completer.detach()},PageUp:function(e){e.completer.popup.gotoPageUp()},PageDown:function(e){e.completer.popup.gotoPageDown()}},g.startCommand={name:"startAutocomplete",exec:function(e,t){var i=g.for(e);i.autoInsert=!1,i.autoSelect=!0,i.autoShown=!1,i.showPopup(e,t),i.cancelContextMenu()},bindKey:"Ctrl-Space|Ctrl-Shift-Space|Alt-Space"};var m=function(){function e(e){this.initialPosition=e,this.active=!0}return e.prototype.insertByIndex=function(e,t,i){return!(!this.completions||!this.completions.filtered)&&this.insertMatch(e,this.completions.filtered[t],i)},e.prototype.insertMatch=function(e,t,i){if(!t)return!1;if(e.startOperation({command:{name:"insertMatch"}}),t.completer&&t.completer.insertMatch)t.completer.insertMatch(e,t);else{if(!this.completions)return!1;var n=this.completions.filterText.length,o=0;if(t.range&&t.range.start.row===t.range.end.row&&(n-=this.initialPosition.prefix.length,n+=this.initialPosition.pos.column-t.range.start.column,o+=t.range.end.column-this.initialPosition.pos.column),n||o){var r;r=e.selection.getAllRanges?e.selection.getAllRanges():[e.getSelectionRange()];for(var s,a=0;s=r[a];a++)s.start.column-=n,s.end.column+=o,e.session.remove(s)}t.snippet?l.insertSnippet(e,t.snippet):this.$insertString(e,t),t.completer&&t.completer.onInsert&&"function"==typeof t.completer.onInsert&&t.completer.onInsert(e,t),t.command&&"startAutocomplete"===t.command&&e.execCommand(t.command)}return e.endOperation(),!0},e.prototype.$insertString=function(e,t){var i=t.value||t;e.execCommand("insertstring",i)},e.prototype.gatherCompletions=function(e,t){var i=e.getSession(),n=e.getCursorPosition(),o=a.getCompletionPrefix(e),r=[];this.completers=e.completers;var s=e.completers.length;return e.completers.forEach((function(p,c){p.getCompletions(e,i,n,o,(function(i,n){p.hideInlinePreview&&(n=n.map((function(e){return Object.assign(e,{hideInlinePreview:p.hideInlinePreview})}))),!i&&n&&(r=r.concat(n)),t(null,{prefix:a.getCompletionPrefix(e),matches:r,finished:0==--s})}))})),!0},e.prototype.provideCompletions=function(e,t,i){var n=function(e){var n=e.prefix,o=e.matches;this.completions=new v(o),t.exactMatch&&(this.completions.exactMatch=!0),t.ignoreCaption&&(this.completions.ignoreCaption=!0),this.completions.setFilter(n),(e.finished||this.completions.filtered.length)&&i(null,this.completions,e.finished)}.bind(this),o=!0,r=null;if(this.gatherCompletions(e,function(e,t){this.active&&(e&&(i(e,[],!0),this.detach()),0===t.prefix.indexOf(t.prefix)&&(o?r=t:n(t)))}.bind(this)),o=!1,r){var s=r;r=null,n(s)}},e.prototype.detach=function(){this.active=!1,this.completers&&this.completers.forEach((function(e){"function"==typeof e.cancel&&e.cancel()}))},e}(),v=function(){function e(e,t){this.all=e,this.filtered=e,this.filterText=t||"",this.exactMatch=!1,this.ignoreCaption=!1}return e.prototype.setFilter=function(e){if(e.length>this.filterText&&0===e.lastIndexOf(this.filterText,0))var t=this.filtered;else t=this.all;this.filterText=e,t=(t=this.filterCompletions(t,this.filterText)).sort((function(e,t){return t.exactMatch-e.exactMatch||t.$score-e.$score||(e.caption||e.value).localeCompare(t.caption||t.value)}));var i=null;t=t.filter((function(e){var t=e.snippet||e.caption||e.value;return t!==i&&(i=t,!0)})),this.filtered=t},e.prototype.filterCompletions=function(e,t){var i=[],n=t.toUpperCase(),o=t.toLowerCase();e:for(var r,s=0;r=e[s];s++)if(r.skipFilter)r.$score=r.score,i.push(r);else{var a=!this.ignoreCaption&&r.caption||r.value||r.snippet;if(a){var p,c,l=-1,h=0,u=0;if(this.exactMatch){if(t!==a.substr(0,t.length))continue e}else{var d=a.toLowerCase().indexOf(o);if(d>-1)u=d;else for(var f=0;f<t.length;f++){var g=a.indexOf(o[f],l+1),m=a.indexOf(n[f],l+1);if((p=g>=0&&(m<0||g<m)?g:m)<0)continue e;(c=p-l-1)>0&&(-1===l&&(u+=10),u+=c,h|=1<<f),l=p}}r.matchMask=h,r.exactMatch=u?0:1,r.$score=(r.score||0)-u,i.push(r)}}return i},e}();t.Autocomplete=g,t.CompletionProvider=m,t.FilteredList=v})),ace.define("ace/marker_group",["require","exports","module"],(function(e,t,i){"use strict";var n=function(){function e(e,t){t&&(this.markerType=t.markerType),this.markers=[],this.session=e,e.addDynamicMarker(this)}return e.prototype.getMarkerAtPosition=function(e){return this.markers.find((function(t){return t.range.contains(e.row,e.column)}))},e.prototype.markersComparator=function(e,t){return e.range.start.row-t.range.start.row},e.prototype.setMarkers=function(e){this.markers=e.sort(this.markersComparator).slice(0,this.MAX_MARKERS),this.session._signal("changeBackMarker")},e.prototype.update=function(e,t,i,n){if(this.markers&&this.markers.length)for(var o,r=n.firstRow,s=n.lastRow,a=0,p=0,c=0;c<this.markers.length;c++){var l=this.markers[c];if(!(l.range.end.row<r)&&!(l.range.start.row>s||(l.range.start.row===p?a++:(p=l.range.start.row,a=0),a>200))){var h=l.range.clipRows(r,s);if(h.start.row!==h.end.row||h.start.column!==h.end.column){var u=h.toScreenRange(i);u.isEmpty()?(o=i.getNextFoldLine(h.end.row,o))&&o.end.row>h.end.row&&(r=o.end.row):"fullLine"===this.markerType?t.drawFullLineMarker(e,u,l.className,n):u.isMultiLine()?"line"===this.markerType?t.drawMultiLineMarker(e,u,l.className,n):t.drawTextMarker(e,u,l.className,n):t.drawSingleLineMarker(e,u,l.className+" ace_br15",n)}}}},e}();n.prototype.MAX_MARKERS=1e4,t.MarkerGroup=n})),ace.define("ace/autocomplete/text_completer",["require","exports","module","ace/range"],(function(e,t,i){var n=e("../range").Range,o=/[^a-zA-Z_0-9\$\-\u00C0-\u1FFF\u2C00-\uD7FF\w]+/;function r(e,t){var i=function(e,t){return e.getTextRange(n.fromPoints({row:0,column:0},t)).split(o).length-1}(e,t),r=e.getValue().split(o),s=Object.create(null),a=r[i];return r.forEach((function(e,t){if(e&&e!==a){var n=Math.abs(i-t),o=r.length-n;s[e]?s[e]=Math.max(o,s[e]):s[e]=o}})),s}t.getCompletions=function(e,t,i,n,o){var s=r(t,i);o(null,Object.keys(s).map((function(e){return{caption:e,value:e,score:s[e],meta:"local"}})))}})),ace.define("ace/ext/language_tools",["require","exports","module","ace/snippets","ace/autocomplete","ace/config","ace/lib/lang","ace/autocomplete/util","ace/marker_group","ace/autocomplete/text_completer","ace/editor","ace/config"],(function(e,t,i){"use strict";var n=e("../snippets").snippetManager,o=e("../autocomplete").Autocomplete,r=e("../config"),s=e("../lib/lang"),a=e("../autocomplete/util"),p=e("../marker_group").MarkerGroup,c=e("../autocomplete/text_completer"),l={getCompletions:function(e,t,i,n,o){if(t.$mode.completer)return t.$mode.completer.getCompletions(e,t,i,n,o);var r=e.session.getState(i.row),s=t.$mode.getCompletions(r,t,i,n);o(null,s=s.map((function(e){return e.completerId=l.id,e})))},id:"keywordCompleter"},h={getCompletions:function(e,t,i,o,r){var s=[],a=t.getTokenAt(i.row,i.column);a&&a.type.match(/(tag-name|tag-open|tag-whitespace|attribute-name|attribute-value)\.xml$/)?s.push("html-tag"):s=n.getActiveScopes(e);var p=n.snippetMap,c=[];s.forEach((function(e){for(var t=p[e]||[],i=t.length;i--;){var n=t[i],o=n.name||n.tabTrigger;o&&c.push({caption:o,snippet:n.content,meta:n.tabTrigger&&!n.name?n.tabTrigger+"⇥ ":"snippet",completerId:h.id})}}),this),r(null,c)},getDocTooltip:function(e){var t,i;e.snippet&&!e.docHTML&&(e.docHTML=["<b>",s.escapeHTML(e.caption),"</b>","<hr></hr>",s.escapeHTML((t=e.snippet,i={},t.replace(/\${(\d+)(:(.*?))?}/g,(function(e,t,n,o){return i[t]=o||""})).replace(/\$(\d+?)/g,(function(e,t){return i[t]}))))].join(""))},id:"snippetCompleter"},u=[h,c,l];t.setCompleters=function(e){u.length=0,e&&u.push.apply(u,e)},t.addCompleter=function(e){u.push(e)},t.textCompleter=c,t.keyWordCompleter=l,t.snippetCompleter=h;var d,f={name:"expandSnippet",exec:function(e){return n.expandWithTab(e)},bindKey:"Tab"},g=function(e,t){m(t.session.$mode)},m=function(e){"string"==typeof e&&(e=r.$modes[e]),e&&(n.files||(n.files={}),v(e.$id,e.snippetFileId),e.modes&&e.modes.forEach(m))},v=function(e,t){t&&e&&!n.files[e]&&(n.files[e]={},r.loadModule(t,(function(t){t&&(n.files[e]=t,!t.snippets&&t.snippetText&&(t.snippets=n.parseSnippetFile(t.snippetText)),n.register(t.snippets||[],t.scope),t.includeScopes&&(n.snippetMap[t.scope].includeScopes=t.includeScopes,t.includeScopes.forEach((function(e){m("ace/mode/"+e)}))))})))},b=function(e){var t=e.editor,i=t.completer&&t.completer.activated;if("backspace"===e.command.name)i&&!a.getCompletionPrefix(t)&&t.completer.detach();else if("insertstring"===e.command.name&&!i){d=e;var n=e.editor.$liveAutocompletionDelay;n?x.delay(n):y(e)}},x=s.delayedCall((function(){y(d)}),0),y=function(e){var t=e.editor,i=a.getCompletionPrefix(t),n=e.args,r=a.triggerAutocomplete(t,n);if(i&&i.length>=t.$liveAutocompletionThreshold||r){var s=o.for(t);s.autoShown=!0,s.showPopup(t)}},w=e("../editor").Editor;e("../config").defineOptions(w.prototype,"editor",{enableBasicAutocompletion:{set:function(e){e?(o.for(this),this.completers||(this.completers=Array.isArray(e)?e:u),this.commands.addCommand(o.startCommand)):this.commands.removeCommand(o.startCommand)},value:!1},enableLiveAutocompletion:{set:function(e){e?(this.completers||(this.completers=Array.isArray(e)?e:u),this.commands.on("afterExec",b)):this.commands.off("afterExec",b)},value:!1},liveAutocompletionDelay:{initialValue:0},liveAutocompletionThreshold:{initialValue:0},enableSnippets:{set:function(e){e?(this.commands.addCommand(f),this.on("changeMode",g),g(0,this)):(this.commands.removeCommand(f),this.off("changeMode",g))},value:!1}}),t.MarkerGroup=p})),ace.require(["ace/ext/language_tools"],(function(t){e&&(e.exports=t)}))}}]);
|