index.umd.min.js 1.7 MB

12345678910111213141516
  1. (function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t():"function"===typeof define&&define.amd?define([],t):"object"===typeof exports?exports["AvueFormDesign"]=t():e["AvueFormDesign"]=t()})("undefined"!==typeof self?self:this,(function(){return function(e){function t(t){for(var i,o,r=t[0],s=t[1],a=0,l=[];a<r.length;a++)o=r[a],Object.prototype.hasOwnProperty.call(n,o)&&n[o]&&l.push(n[o][0]),n[o]=0;for(i in s)Object.prototype.hasOwnProperty.call(s,i)&&(e[i]=s[i]);c&&c(t);while(l.length)l.shift()()}var i={},n={0:0};function o(e){return r.p+"index.umd.min."+({}[e]||e)+".js"}function r(t){if(i[t])return i[t].exports;var n=i[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,r),n.l=!0,n.exports}r.e=function(e){var t=[],i=n[e];if(0!==i)if(i)t.push(i[2]);else{var s=new Promise((function(t,o){i=n[e]=[t,o]}));t.push(i[2]=s);var a,l=document.createElement("script");l.charset="utf-8",l.timeout=120,r.nc&&l.setAttribute("nonce",r.nc),l.src=o(e);var c=new Error;a=function(t){l.onerror=l.onload=null,clearTimeout(h);var i=n[e];if(0!==i){if(i){var o=t&&("load"===t.type?"missing":t.type),r=t&&t.target&&t.target.src;c.message="Loading chunk "+e+" failed.\n("+o+": "+r+")",c.name="ChunkLoadError",c.type=o,c.request=r,i[1](c)}n[e]=void 0}};var h=setTimeout((function(){a({type:"timeout",target:l})}),12e4);l.onerror=l.onload=a,document.head.appendChild(l)}return Promise.all(t)},r.m=e,r.c=i,r.d=function(e,t,i){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},r.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(r.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(i,n,function(t){return e[t]}.bind(null,n));return i},r.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r.oe=function(e){throw console.error(e),e};var s=("undefined"!==typeof self?self:this)["webpackJsonpAvueFormDesign"]=("undefined"!==typeof self?self:this)["webpackJsonpAvueFormDesign"]||[],a=s.push.bind(s);s.push=t,s=s.slice();for(var l=0;l<s.length;l++)t(s[l]);var c=a;return r(r.s="5069")}({"006c":function(e,t,i){var n=i("53c2");t=n(!1),t.push([e.i,".monaco-progress-container{width:100%;height:5px;overflow:hidden}.monaco-progress-container .progress-bit{width:2%;height:5px;position:absolute;left:0;display:none}.monaco-progress-container.active .progress-bit{display:inherit}.monaco-progress-container.discrete .progress-bit{left:0;-webkit-transition:width .1s linear;transition:width .1s linear}.monaco-progress-container.discrete.done .progress-bit{width:100%}.monaco-progress-container.infinite .progress-bit{-webkit-animation-name:progress;animation-name:progress;-webkit-animation-duration:4s;animation-duration:4s;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;-webkit-animation-timing-function:linear;animation-timing-function:linear;-webkit-transform:translateZ(0);transform:translateZ(0)}@-webkit-keyframes progress{0%{-webkit-transform:translateX(0) scaleX(1);transform:translateX(0) scaleX(1)}50%{-webkit-transform:translateX(2500%) scaleX(3);transform:translateX(2500%) scaleX(3)}to{-webkit-transform:translateX(4950%) scaleX(1);transform:translateX(4950%) scaleX(1)}}@keyframes progress{0%{-webkit-transform:translateX(0) scaleX(1);transform:translateX(0) scaleX(1)}50%{-webkit-transform:translateX(2500%) scaleX(3);transform:translateX(2500%) scaleX(3)}to{-webkit-transform:translateX(4950%) scaleX(1);transform:translateX(4950%) scaleX(1)}}",""]),e.exports=t},"00ad":function(e,t,i){var n=i("61b6");"string"===typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);var o=i("4974").default;o("08cdbd56",n,!0,{sourceMap:!1,shadowMode:!1})},"02de":function(e,t,i){"use strict";var n=i("83ec"),o=i("55ab"),r=i("e244"),s=i("fe32"),a=i("eee7"),l=i("b896").f,c=i("8c42"),h=r.Symbol;if(o&&"function"==typeof h&&(!("description"in h.prototype)||void 0!==h().description)){var d={},u=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),t=this instanceof u?new h(e):void 0===e?h():h(e);return""===e&&(d[t]=!0),t};c(u,h);var g=u.prototype=h.prototype;g.constructor=u;var f=g.toString,m="Symbol(test)"==String(h("test")),p=/^Symbol\((.*)\)[^)]+$/;l(g,"description",{configurable:!0,get:function(){var e=a(this)?this.valueOf():this,t=f.call(e);if(s(d,e))return"";var i=m?t.slice(7,-1):t.replace(p,"$1");return""===i?void 0:i}}),n({global:!0,forced:!0},{Symbol:u})}},"030e":function(e,t,i){"use strict";var n=i("ac97");function o(e,t){return RegExp(e,t)}t.UNSUPPORTED_Y=n((function(){var e=o("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),t.BROKEN_CARET=n((function(){var e=o("^r","gy");return e.lastIndex=2,null!=e.exec("str")}))},"0556":function(e,t,i){var n=i("4e70");"string"===typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);var o=i("4974").default;o("c1082ae6",n,!0,{sourceMap:!1,shadowMode:!1})},"061d":function(e,t,i){var n=i("53c2");t=n(!1),t.push([e.i,".monaco-aria-container{position:absolute;left:-999em}",""]),e.exports=t},"0678":function(e,t,i){var n=i("061d");"string"===typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);var o=i("4974").default;o("0a503a2c",n,!0,{sourceMap:!1,shadowMode:!1})},"085b":function(e,t,i){"use strict";var n=i("55ab"),o=i("e244"),r=i("a056"),s=i("7d86"),a=i("fe32"),l=i("c401"),c=i("ca23"),h=i("7f82"),d=i("ac97"),u=i("ca2b"),g=i("f0f1").f,f=i("42b1").f,m=i("b896").f,p=i("3395").trim,_="Number",b=o[_],v=b.prototype,w=l(u(v))==_,C=function(e){var t,i,n,o,r,s,a,l,c=h(e,!1);if("string"==typeof c&&c.length>2)if(c=p(c),t=c.charCodeAt(0),43===t||45===t){if(i=c.charCodeAt(2),88===i||120===i)return NaN}else if(48===t){switch(c.charCodeAt(1)){case 66:case 98:n=2,o=49;break;case 79:case 111:n=8,o=55;break;default:return+c}for(r=c.slice(2),s=r.length,a=0;a<s;a++)if(l=r.charCodeAt(a),l<48||l>o)return NaN;return parseInt(r,n)}return+c};if(r(_,!b(" 0o1")||!b("0b1")||b("+0x1"))){for(var y,S=function(e){var t=arguments.length<1?0:e,i=this;return i instanceof S&&(w?d((function(){v.valueOf.call(i)})):l(i)!=_)?c(new b(C(t)),i,S):C(t)},x=n?g(b):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),L=0;x.length>L;L++)a(b,y=x[L])&&!a(S,y)&&m(S,y,f(b,y));S.prototype=v,v.constructor=S,s(o,_,S)}},"0874":function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},"0952":function(e,t,i){var n=i("53c2");t=n(!1),t.push([e.i,".custom-tree-node[data-v-bfa41dee]{-webkit-box-flex:1;-ms-flex:1;flex:1;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;font-size:14px;padding-right:8px}",""]),e.exports=t},"0adc":function(e,t,i){var n=i("53c2");t=n(!1),t.push([e.i,"@-webkit-keyframes codicon-spin{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes codicon-spin{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}.codicon-animation-spin{-webkit-animation:codicon-spin 1.5s steps(30) infinite;animation:codicon-spin 1.5s steps(30) infinite}",""]),e.exports=t},"0cf4":function(e,t,i){var n=i("a73f");"string"===typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);var o=i("4974").default;o("5ee2876b",n,!0,{sourceMap:!1,shadowMode:!1})},"0da4":function(e,t,i){"use strict";var n=i("6965"),o=i("d53b");e.exports=n?{}.toString:function(){return"[object "+o(this)+"]"}},"0df9":function(e,t,i){"use strict";var n=i("0cf4"),o=i.n(n);o.a},"0ef1":function(e,t){t.f=Object.getOwnPropertySymbols},"10b1":function(e,t,i){var n=i("53c2"),o=i("a0c9"),r=i("1eca");t=n(!1);var s=o(r);t.push([e.i,"@font-face{font-family:codicon;src:url("+s+') format("truetype")}.codicon[class*=codicon-]{font:normal normal normal 16px/1 codicon;display:inline-block;text-decoration:none;text-rendering:auto;text-align:center;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-moz-user-select:none;user-select:none;-webkit-user-select:none;-ms-user-select:none}',""]),e.exports=t},1115:function(e,t,i){"use strict";var n=i("00ad"),o=i.n(n);o.a},"11b0":function(e,t,i){"use strict";var n={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,r=o&&!n.call({1:2},1);t.f=r?function(e){var t=o(this,e);return!!t&&t.enumerable}:n},"11cb":function(e,t,i){var n=i("9d6f");"string"===typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);var o=i("4974").default;o("7d6c689e",n,!0,{sourceMap:!1,shadowMode:!1})},"11e2":function(e,t,i){var n=i("53c2");t=n(!1),t.push([e.i,".monaco-editor .lines-content .cdr{position:absolute}",""]),e.exports=t},"139d":function(e,t,i){var n=i("53c2");t=n(!1),t.push([e.i,".monaco-editor .glyph-margin{position:absolute;top:0}.monaco-editor .margin-view-overlays .cgmr{position:absolute;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}",""]),e.exports=t},"13a8":function(e,t,i){var n=i("fbcf"),o=i("2cdc");e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,i={};try{e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set,e.call(i,[]),t=i instanceof Array}catch(r){}return function(i,r){return n(i),o(r),t?e.call(i,r):i.__proto__=r,i}}():void 0)},"154c":function(e,t,i){var n=i("4cdd");"string"===typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);var o=i("4974").default;o("da9b1e04",n,!0,{sourceMap:!1,shadowMode:!1})},"15b2":function(e,t,i){"use strict";var n,o,r,s=i("a7f7"),a=i("69f1"),l=i("fe32"),c=i("1810"),h=i("f0db"),d=c("iterator"),u=!1,g=function(){return this};[].keys&&(r=[].keys(),"next"in r?(o=s(s(r)),o!==Object.prototype&&(n=o)):u=!0),void 0==n&&(n={}),h||l(n,d)||a(n,d,g),e.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:u}},1613:function(e,t,i){var n=i("0adc");"string"===typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);var o=i("4974").default;o("b04beba4",n,!0,{sourceMap:!1,shadowMode:!1})},"17b9":function(e,t,i){"use strict";var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"widget-form-container"},[i("el-form",{ref:"widgetForm",attrs:{"label-position":e.data.labelPosition||"left","label-width":e.data.labelWidth?e.data.labelWidth+"px":"100px","label-suffix":e.data.labelSuffix,model:e.form,size:"small"}},[i("el-row",{attrs:{gutter:e.data.gutter}},[i("draggable",{staticClass:"widget-form-list",attrs:{list:e.data.column,group:{name:"form"},"ghost-class":"ghost",animation:300},on:{add:e.handleWidgetAdd,end:function(t){return e.$emit("change")}}},[e._l(e.data.column,(function(t,n){return["dynamic"==t.type?i("div",{key:n,staticClass:"widget-form-table",class:{active:e.selectWidget.prop==t.prop},on:{click:function(t){return e.handleSelectWidget(n)}}},[i("widget-form-table",{attrs:{data:e.data,column:t,index:n,select:e.selectWidget},on:{"update:select":function(t){e.selectWidget=t},change:function(t){return e.$emit("change")}}})],1):"group"==t.type?i("div",{key:n,staticClass:"widget-form-group",class:{active:e.selectWidget.prop==t.prop},on:{click:function(t){return e.handleSelectWidget(n)}}},[i("widget-form-group",{attrs:{data:e.data,column:t,index:n,select:e.selectWidget},on:{"update:select":function(t){e.selectWidget=t},change:function(t){return e.$emit("change")}}})],1):i("el-col",{key:n,attrs:{md:t.span||12,xs:24,offset:t.offset||0}},[i("el-form-item",{staticClass:"widget-form-item",class:{active:e.selectWidget.prop==t.prop,required:t.required},attrs:{label:t.label,labelWidth:t.labelWidth,prop:t.prop},nativeOn:{click:function(t){return e.handleSelectWidget(n)}}},[i("widget-form-item",{attrs:{item:t,params:t.params}}),e.selectWidget.prop==t.prop?i("el-button",{staticClass:"widget-action-delete",attrs:{title:"删除",circle:"",plain:"",size:"small",type:"danger"},on:{click:function(t){return t.stopPropagation(),e.handleWidgetDelete(n)}}},[i("i",{staticClass:"iconfont icon-delete"})]):e._e(),e.selectWidget.prop==t.prop?i("el-button",{staticClass:"widget-action-clone",attrs:{title:"复制",circle:"",plain:"",size:"small",type:"primary"},on:{click:function(t){return t.stopPropagation(),e.handleWidgetClone(n)}}},[i("i",{staticClass:"iconfont icon-copy"})]):e._e()],1)],1)]}))],2)],1)],1)],1)},o=[],r=(i("d927"),function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",["title"==e.item.type?i("span",{staticStyle:{"margin-left":"5px"},style:e.item.styles},[e._v(" "+e._s(e.item.value)+" ")]):i(e.getComponent(e.item.type,e.item.component),e._b({tag:"component",attrs:{multiple:!1,placeholder:e.item.placeholder||e.getPlaceholder(e.item),dic:e.item.dicData}},"component",Object.assign(e.deepClone(e.item),e.params,{size:e.item.size||"small"}),!1),[e.params.html?i("span",{domProps:{innerHTML:e._s(e.params.html)}}):e._e()])],1)}),s=[],a=(i("2f62"),{name:"widget-form-item",props:{item:{type:Object,default:function(){return{}}},params:{type:Object,default:function(){return{}}}},data:function(){return{form:{}}},methods:{getComponent:function(e,t){var i="avue-",n="input";return t||(["array","img","url"].includes(e)?n="array":"select"===e?n="select":"radio"===e?n="radio":"checkbox"===e?n="checkbox":["time","timerange"].includes(e)?n="time":["dates","date","datetime","datetimerange","daterange","week","month","year"].includes(e)?n="date":"cascader"===e?n="cascader":"number"===e?n="input-number":"password"===e?n="input":"switch"===e?n="switch":"rate"===e?n="rate":"upload"===e?n="upload":"slider"===e?n="slider":"dynamic"===e?n="dynamic":"icon"===e?n="input-icon":"color"===e?n="input-color":"map"===e&&(n="input-map"),i+n)},getPlaceholder:function(e){var t=e.label;return["select","checkbox","radio","tree","color","dates","date","datetime","datetimerange","daterange","week","month","year","map","icon"].includes(e.type)?"请选择 ".concat(t):"请输入 ".concat(t)}}}),l=a,c=i("e3d4"),h=Object(c["a"])(l,r,s,!1,null,null,null),d=h.exports,u=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",[i("h3",{directives:[{name:"show",rawName:"v-show",value:e.column.label,expression:"column.label"}],staticStyle:{margin:"10px"}},[e._v(e._s(e.column.label))]),i("draggable",{staticClass:"widget-form-table__content",attrs:{list:e.column.children.column,group:{name:"form"},"ghost-class":"ghost",animation:200,handle:".widget-form-table__item"},on:{add:function(t){return e.handleWidgetTableAdd(t,e.column)},end:function(t){return e.$emit("change")}}},[e.column.children.column.length>0?e._l(e.column.children.column,(function(t,n){return i("div",{key:n,staticClass:"widget-form-table__item",class:{active:e.selectWidget.prop==t.prop,required:t.required},style:{minWidth:t.width?t.width+"px":"33.3%",width:t.width?t.width+"px":"33.3%"},on:{click:function(i){return i.stopPropagation(),e.handleWidgetTableSelect(t)}}},[i("el-table",{attrs:{data:[t],border:""}},[i("el-table-column",{attrs:{prop:t.prop,label:t.label,align:e.column.children.align,"header-align":e.column.children.headerAlign}},[i("widget-form-item",{attrs:{item:t,params:e.column.params}}),e.selectWidget.prop==t.prop?i("el-button",{staticClass:"widget-table-action-delete",attrs:{title:"删除",circle:"",plain:"",size:"small",type:"danger"},on:{click:function(t){return t.stopPropagation(),e.handleWidgetTableDelete(e.column,n)}}},[i("i",{staticClass:"iconfont icon-delete"})]):e._e(),e.selectWidget.prop==t.prop?i("el-button",{staticClass:"widget-table-action-clone",attrs:{title:"复制",circle:"",plain:"",size:"small",type:"primary"},on:{click:function(i){return i.stopPropagation(),e.handleWidgetTableClone(e.column,t)}}},[i("i",{staticClass:"iconfont icon-copy"})]):e._e()],1)],1)],1)})):[i("avue-empty",{staticStyle:{width:"100%"},attrs:{size:"50",desc:"拖拽字段至此"}})]],2),e.selectWidget.prop==e.column.prop?i("el-button",{staticClass:"widget-action-delete",attrs:{title:"删除",circle:"",plain:"",size:"small",type:"danger"},on:{click:function(t){return t.stopPropagation(),e.handleWidgetDelete(e.index)}}},[i("i",{staticClass:"iconfont icon-delete"})]):e._e(),e.selectWidget.prop==e.column.prop?i("el-button",{staticClass:"widget-action-clear",attrs:{title:"清空",circle:"",plain:"",size:"small",type:"warning"},on:{click:function(t){return t.stopPropagation(),e.handleWidgetClear(e.index)}}},[i("i",{staticClass:"iconfont icon-clear"})]):e._e(),e.selectWidget.prop==e.column.prop?i("el-button",{staticClass:"widget-action-clone",attrs:{title:"复制",circle:"",plain:"",size:"small",type:"primary"},on:{click:function(t){return t.stopPropagation(),e.handleWidgetCloneTable(e.index)}}},[i("i",{staticClass:"iconfont icon-copy"})]):e._e()],1)},g=[],f=(i("eb46"),i("f96e"),i("863c")),m=i("d958"),p=i.n(m),_={name:"widget-form-table",props:["data","column","select","index"],components:{WidgetFormItem:d,draggable:p.a},data:function(){return{selectWidget:this.select}},methods:{handleSelectWidget:function(e){this.selectWidget=this.data.column[e]},handleWidgetClear:function(e){this.data.column[e].children.column=[],this.selectWidget=this.data.column[e],this.$emit("change")},handleWidgetDelete:function(e){var t=this;this.data.column.length-1===e?0===e?this.selectWidget={}:this.handleSelectWidget(e-1):this.handleSelectWidget(e+1),this.$nextTick((function(){t.data.column.splice(e,1),t.$emit("change")}))},handleWidgetCloneTable:function(e){var t=this,i=this.deepClone(this.data.column[e]);i.prop=Date.now()+"_"+Math.ceil(99999*Math.random()),i.children.column.forEach((function(e){e.prop=Date.now()+"_"+Math.ceil(99999*Math.random())})),this.data.column.splice(e,0,i),this.$nextTick((function(){t.handleSelectWidget(e+1),t.$emit("change")}))},handleWidgetTableAdd:function(e,t){var i=e.newIndex,n=e.item;if(1==i&&i>t.children.column.length-1&&(i=0),["子表单","富文本","坐标拾取器","分组"].includes(n.textContent))t.children.column.splice(i,1);else{var o=this.deepClone(t.children.column[i]);o.prop||(o.prop=Date.now()+"_"+Math.ceil(99999*Math.random())),o.subfield=!0,delete o.icon,this.$set(t.children.column,i,Object(f["a"])({},o)),this.selectWidget=t.children.column[i],this.$emit("change")}},handleWidgetTableSelect:function(e){this.selectWidget=e},handleWidgetTableClone:function(e,t){var i=this,n=this.deepClone(t);n.prop=Date.now()+"_"+Math.ceil(99999*Math.random()),this.$set(e.children.column,e.children.column.length,Object(f["a"])({},n)),this.$nextTick((function(){i.selectWidget=e.children.column[e.children.column.length-1],i.$emit("change")}))},handleWidgetTableDelete:function(e,t){var i=this;e.children.column.length-1==t?this.selectWidget=0==t?e:e.children.column[t-1]:this.selectWidget=e.children.column[t+1],this.$nextTick((function(){e.children.column.splice(t,1),i.$emit("change")}))}},watch:{select:function(e){this.selectWidget=e},selectWidget:{handler:function(e){this.$emit("update:select",e)},deep:!0}}},b=_,v=Object(c["a"])(b,u,g,!1,null,null,null),w=v.exports,C=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",[i("h4",{directives:[{name:"show",rawName:"v-show",value:e.column.label,expression:"column.label"}],staticClass:"widget-form-group__head"},[i("i",{directives:[{name:"show",rawName:"v-show",value:e.column.icon,expression:"column.icon"}],class:e.column.icon,staticStyle:{"margin-right":"10px"}}),e._v(e._s(e.column.label))]),i("draggable",{staticClass:"widget-form-group__body",attrs:{list:e.column.children.column,group:{name:"form"},"ghost-class":"ghost",animation:200},on:{add:function(t){return e.handleWidgetGroupAdd(t,e.column)},end:function(t){return e.$emit("change")}}},[e._l(e.column.children.column,(function(t,n){return["dynamic"==t.type?i("div",{key:n,staticClass:"widget-form-table",class:{active:e.selectWidget.prop==t.prop},on:{click:function(i){return i.stopPropagation(),e.handleWidgetTableSelect(t)}}},[i("widget-form-table",{attrs:{data:e.column.children,column:t,index:n,select:e.selectWidget},on:{"update:select":function(t){e.selectWidget=t},change:function(t){return e.$emit("change")}}})],1):i("el-col",{key:n,attrs:{md:t.span||12,xs:24,offset:t.offset||0}},[i("el-form-item",{staticClass:"widget-form-group__item",class:{active:e.selectWidget.prop==t.prop,required:t.required},attrs:{label:t.label,prop:t.prop},nativeOn:{click:function(i){return i.stopPropagation(),e.handleWidgetTableSelect(t)}}},[i("widget-form-item",{attrs:{item:t,params:e.column.params}}),e.selectWidget.prop==t.prop?i("el-button",{staticClass:"widget-form-group__item--delete",attrs:{title:"删除",circle:"",plain:"",type:"danger"},on:{click:function(t){return t.stopPropagation(),e.handleWidgetTableDelete(e.column,n)}}},[i("i",{staticClass:"iconfont icon-delete"})]):e._e(),e.selectWidget.prop==t.prop?i("el-button",{staticClass:"widget-form-group__item--clone",attrs:{title:"复制",circle:"",plain:"",type:"primary"},on:{click:function(i){return i.stopPropagation(),e.handleWidgetTableClone(e.column,t)}}},[i("i",{staticClass:"iconfont icon-copy"})]):e._e()],1)],1)]}))],2),e.selectWidget.prop==e.column.prop?i("el-button",{staticClass:"widget-action-delete",attrs:{title:"删除",circle:"",plain:"",size:"small",type:"danger"},on:{click:function(t){return t.stopPropagation(),e.handleWidgetDelete(e.index)}}},[i("i",{staticClass:"iconfont icon-delete"})]):e._e(),e.selectWidget.prop==e.column.prop?i("el-button",{staticClass:"widget-action-clear",attrs:{title:"清空",circle:"",plain:"",size:"small",type:"warning"},on:{click:function(t){return t.stopPropagation(),e.handleWidgetClear(e.index)}}},[i("i",{staticClass:"iconfont icon-clear"})]):e._e(),e.selectWidget.prop==e.column.prop?i("el-button",{staticClass:"widget-action-clone",attrs:{title:"复制",circle:"",plain:"",size:"small",type:"primary"},on:{click:function(t){return t.stopPropagation(),e.handleWidgetCloneTable(e.index)}}},[i("i",{staticClass:"iconfont icon-copy"})]):e._e()],1)},y=[],S={name:"widget-form-group",props:["data","column","select","index"],components:{WidgetFormItem:d,WidgetFormTable:w,draggable:p.a},data:function(){return{selectWidget:this.select}},methods:{handleSelectWidget:function(e){this.selectWidget=this.data.column[e]},handleWidgetClear:function(e){this.data.column[e].children.column=[],this.selectWidget=this.data.column[e],this.$emit("change")},handleWidgetDelete:function(e){var t=this;this.data.column.length-1===e?0===e?this.selectWidget={}:this.handleSelectWidget(e-1):this.handleSelectWidget(e+1),this.$nextTick((function(){t.data.column.splice(e,1),t.$emit("change")}))},handleWidgetCloneTable:function(e){var t=this,i=this.deepClone(this.data.column[e]);i.prop=Date.now()+"_"+Math.ceil(99999*Math.random()),i.children.column.forEach((function(e){e.prop=Date.now()+"_"+Math.ceil(99999*Math.random())})),this.data.column.splice(e,0,i),this.$nextTick((function(){t.handleSelectWidget(e+1),t.$emit("change")}))},handleWidgetTableSelect:function(e){this.selectWidget=e},handleWidgetTableClone:function(e,t){var i=this,n=this.deepClone(t);n.prop=Date.now()+"_"+Math.ceil(99999*Math.random()),this.$set(e.children.column,e.children.column.length,Object(f["a"])({},n)),this.$nextTick((function(){i.selectWidget=e.children.column[e.children.column.length-1],i.$emit("change")}))},handleWidgetTableDelete:function(e,t){var i=this;e.children.column.length-1==t?this.selectWidget=0==t?e:e.children.column[t-1]:this.selectWidget=e.children.column[t+1],this.$nextTick((function(){e.children.column.splice(t,1),i.$emit("change")}))},handleWidgetGroupAdd:function(e,t){var i=e.newIndex,n=e.item;if(1==i&&i>t.children.column.length-1&&(i=0),["分组"].includes(n.textContent))t.children.column.splice(i,1);else{var o=this.deepClone(t.children.column[i]);o.prop||(o.prop=Date.now()+"_"+Math.ceil(99999*Math.random())),delete o.icon,"dynamic"==o.type?o.span=24:o.span=12,this.$set(t.children.column,i,Object(f["a"])({},o)),this.selectWidget=t.children.column[i],this.$emit("change")}}},watch:{select:function(e){this.selectWidget=e},selectWidget:{handler:function(e){this.$emit("update:select",e)},deep:!0}}},x=S,L=Object(c["a"])(x,C,y,!1,null,null,null),k=L.exports,E={name:"widget-form",components:{Draggable:p.a,WidgetFormItem:d,WidgetFormTable:w,WidgetFormGroup:k},props:["data","select"],data:function(){return{selectWidget:this.select,form:{}}},methods:{handleSelectWidget:function(e){this.selectWidget=this.data.column[e]},handleWidgetAdd:function(e){var t=e.newIndex,i=this.deepClone(this.data.column[t]);i.prop||(i.prop=Date.now()+"_"+Math.ceil(99999*Math.random())),delete i.icon,delete i.subfield,"title"==i.type&&(delete i.label,this.form[i.prop]=i.value),this.$set(this.data.column,t,i),this.handleSelectWidget(t),this.$emit("change")},handleWidgetDelete:function(e){var t=this;this.data.column.length-1===e?0===e?this.selectWidget={}:this.handleSelectWidget(e-1):this.handleSelectWidget(e+1),this.$nextTick((function(){t.data.column.splice(e,1),t.$emit("change")}))},handleWidgetClone:function(e){var t=this,i=this.deepClone(this.data.column[e]);i.prop=Date.now()+"_"+Math.ceil(99999*Math.random()),this.data.column.splice(e,0,i),this.$nextTick((function(){t.handleSelectWidget(e+1),t.$emit("change")}))}},watch:{select:function(e){this.selectWidget=e},selectWidget:{handler:function(e){this.$emit("update:select",e)},deep:!0}}},D=E,N=Object(c["a"])(D,n,o,!1,null,null,null);t["a"]=N.exports},"17be":function(e,t,i){var n=i("e244"),o=i("9550"),r=n.WeakMap;e.exports="function"===typeof r&&/native code/.test(o(r))},"17d4":function(e,t){t.read=function(e,t,i,n,o){var r,s,a=8*o-n-1,l=(1<<a)-1,c=l>>1,h=-7,d=i?o-1:0,u=i?-1:1,g=e[t+d];for(d+=u,r=g&(1<<-h)-1,g>>=-h,h+=a;h>0;r=256*r+e[t+d],d+=u,h-=8);for(s=r&(1<<-h)-1,r>>=-h,h+=n;h>0;s=256*s+e[t+d],d+=u,h-=8);if(0===r)r=1-c;else{if(r===l)return s?NaN:1/0*(g?-1:1);s+=Math.pow(2,n),r-=c}return(g?-1:1)*s*Math.pow(2,r-n)},t.write=function(e,t,i,n,o,r){var s,a,l,c=8*r-o-1,h=(1<<c)-1,d=h>>1,u=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,g=n?0:r-1,f=n?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=h):(s=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-s))<1&&(s--,l*=2),t+=s+d>=1?u/l:u*Math.pow(2,1-d),t*l>=2&&(s++,l/=2),s+d>=h?(a=0,s=h):s+d>=1?(a=(t*l-1)*Math.pow(2,o),s+=d):(a=t*Math.pow(2,d-1)*Math.pow(2,o),s=0));o>=8;e[i+g]=255&a,g+=f,a/=256,o-=8);for(s=s<<o|a,c+=o;c>0;e[i+g]=255&s,g+=f,s/=256,c-=8);e[i+g-f]|=128*m}},1810:function(e,t,i){var n=i("e244"),o=i("986e"),r=i("fe32"),s=i("76b2"),a=i("8fed"),l=i("bd77"),c=o("wks"),h=n.Symbol,d=l?h:h&&h.withoutSetter||s;e.exports=function(e){return r(c,e)||(a&&r(h,e)?c[e]=h[e]:c[e]=d("Symbol."+e)),c[e]}},"1a37":function(e,t,i){var n=i("6120");"string"===typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);var o=i("4974").default;o("11b4b069",n,!0,{sourceMap:!1,shadowMode:!1})},"1a7b":function(e,t,i){var n=i("e248");"string"===typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);var o=i("4974").default;o("4bc745f9",n,!0,{sourceMap:!1,shadowMode:!1})},"1cb4":function(e,t,i){"use strict";(function(e,n){i.d(t,"i",(function(){return _})),i.d(t,"f",(function(){return b})),i.d(t,"d",(function(){return v})),i.d(t,"g",(function(){return w})),i.d(t,"h",(function(){return C})),i.d(t,"c",(function(){return y})),i.d(t,"b",(function(){return x})),i.d(t,"j",(function(){return L})),i.d(t,"a",(function(){return k})),i.d(t,"e",(function(){return N}));const o="en";let r=!1,s=!1,a=!1,l=!1,c=!1,h=!1,d=void 0,u=o,g=void 0,f=void 0;const m="undefined"!==typeof e&&"undefined"!==typeof e.versions&&"undefined"!==typeof e.versions.electron&&"renderer"===e.type;if("object"!==typeof navigator||m){if("object"===typeof e){r="win32"===e.platform,s="darwin"===e.platform,a="linux"===e.platform,d=o,u=o;const t=Object({NODE_ENV:"production",BASE_URL:"/"})["VSCODE_NLS_CONFIG"];if(t)try{const e=JSON.parse(t),i=e.availableLanguages["*"];d=e.locale,u=i||o,g=e._translationsConfigFile}catch(T){}l=!0}}else f=navigator.userAgent,r=f.indexOf("Windows")>=0,s=f.indexOf("Macintosh")>=0,h=(f.indexOf("Macintosh")>=0||f.indexOf("iPad")>=0||f.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,a=f.indexOf("Linux")>=0,c=!0,d=navigator.language,u=d;let p=0;s?p=1:r?p=3:a&&(p=2);const _=r,b=s,v=a,w=l,C=c,y=h,S="object"===typeof self?self:"object"===typeof n?n:{},x=S,L=function(){if(x.setImmediate)return x.setImmediate.bind(x);if("function"===typeof x.postMessage&&!x.importScripts){let e=[];x.addEventListener("message",t=>{if(t.data&&t.data.vscodeSetImmediateId)for(let i=0,n=e.length;i<n;i++){const n=e[i];if(n.id===t.data.vscodeSetImmediateId)return e.splice(i,1),void n.callback()}});let t=0;return i=>{const n=++t;e.push({id:n,callback:i}),x.postMessage({vscodeSetImmediateId:n},"*")}}if("undefined"!==typeof e&&"function"===typeof e.nextTick)return e.nextTick.bind(e);const t=Promise.resolve();return e=>t.then(e)}(),k=s||h?2:r?1:3;let E=!0,D=!1;function N(){if(!D){D=!0;const e=new Uint8Array(2);e[0]=1,e[1]=2;const t=new Uint16Array(e.buffer);E=513===t[0]}return E}}).call(this,i("2552"),i("c8ed"))},"1e33":function(e,t,i){"use strict";t["a"]=[{title:"布局字段",list:[{type:"group",label:"分组",icon:"icon-group",display:!0,arrow:!1,collapse:!0,children:{column:[]}},{type:"dynamic",label:"子表单",icon:"icon-table",span:24,display:!0,children:{align:"center",headerAlign:"center",index:!1,addBtn:!0,delBtn:!0,column:[]}},{type:"title",icon:"icon-title",span:24,display:!0,styles:{fontSize:"18px",color:"#000"},label:"标题",labelWidth:"0px",value:"标题"}]},{title:"输入字段",list:[{type:"input",label:"单行文本",icon:"icon-input",span:24,display:!0},{type:"password",label:"密码",icon:"icon-password",span:24,display:!0},{type:"textarea",label:"多行文本",icon:"icon-textarea",span:24,display:!0},{type:"number",label:"计数器",icon:"icon-number",controls:!0,span:24,display:!0},{type:"url",label:"超链接",icon:"icon-url",span:24,display:!0},{type:"array",label:"数组",icon:"icon-array",span:24,display:!0},{type:"img",label:"图片",icon:"icon-img",span:24,display:!0},{type:"map",component:"avue-input-map",label:"地图选择器",icon:"icon-map",span:24,display:!0}]},{title:"选择字段",list:[{type:"radio",label:"单选框组",icon:"icon-radio",dicData:[{label:"选项一",value:"0"},{label:"选项二",value:"1"},{label:"选项三",value:"2"}],span:24,display:!0,dicOption:"static",props:{label:"label",value:"value"}},{type:"checkbox",label:"多选框组",icon:"icon-checkbox",dicData:[{label:"选项一",value:"0"},{label:"选项二",value:"1"},{label:"选项三",value:"2"}],span:24,display:!0,dicOption:"static",props:{label:"label",value:"value"}},{type:"select",label:"下拉选择器",icon:"icon-select",dicData:[{label:"选项一",value:0},{label:"选项二",value:1},{label:"选项三",value:2}],cascaderItem:[],span:24,display:!0,dicOption:"static",props:{label:"label",value:"value"}},{type:"cascader",label:"级联选择器",icon:"icon-link",span:24,display:!0,dicData:[{label:"选项一",value:0,children:[{label:"选项1-1",value:11},{label:"选项1-2",value:12}]},{label:"选项二",value:1},{label:"选项三",value:2}],cascaderIndex:1,showAllLevels:!0,dicOption:"static",separator:"/",props:{label:"label",value:"value"}},{type:"tree",label:"树形选择器",icon:"icon-tree",span:24,display:!0,dicOption:"static",dicData:[{label:"选项一",value:0,children:[{label:"选项1-1",value:11},{label:"选项1-2",value:12}]},{label:"选项二",value:1},{label:"选项三",value:2}],parent:!0,props:{label:"label",value:"value"}}]},{title:"上传字段",list:[{type:"upload",label:"上传",icon:"icon-upload",span:24,display:!0,showFileList:!0,multiple:!0,limit:10,propsHttp:{},canvasOption:{},headersConfig:[],dataConfig:[]}]},{title:"日期时间字段",list:[{type:"year",label:"年",icon:"icon-year",span:24,display:!0,format:"yyyy",valueFormat:"yyyy"},{type:"month",label:"月",icon:"icon-month",span:24,display:!0,format:"MM",valueFormat:"MM"},{type:"week",label:"周",icon:"icon-week",span:24,display:!0,format:"yyyy 第 WW 周"},{type:"date",label:"日期",icon:"icon-date",span:24,display:!0,format:"yyyy-MM-dd",valueFormat:"yyyy-MM-dd"},{type:"time",label:"时间",icon:"icon-time",span:24,display:!0,format:"HH:mm:ss",valueFormat:"HH:mm:ss"},{type:"datetime",label:"日期时间",icon:"icon-datetime",span:24,display:!0,format:"yyyy-MM-dd HH:mm:ss",valueFormat:"yyyy-MM-dd HH:mm:ss"},{type:"daterange",label:"日期范围",icon:"icon-date-range",span:24,display:!0,format:"yyyy-MM-dd",valueFormat:"yyyy-MM-dd"},{type:"timerange",label:"时间范围",icon:"icon-time-range",span:24,display:!0,format:"HH:mm:ss",valueFormat:"HH:mm:ss"},{type:"datetimerange",label:"日期时间范围",icon:"icon-datetime-range",span:24,display:!0,format:"yyyy-MM-dd HH:mm:ss",valueFormat:"yyyy-MM-dd HH:mm:ss"}]},{title:"插件字段(富文本需要单独引入)",list:[{title:"日历",component:"elCalendar",labelWidth:"40",icon:"icon-map",span:24,params:{}},{type:"ueditor",component:"avue-ueditor",label:"富文本",icon:"icon-richtext",span:24,display:!0,options:{action:"",oss:"",props:{},ali:{},qiniu:{}}}]},{title:"其他字段",list:[{type:"icon",label:"图标",component:"avue-input-icon",icon:"icon-icon",span:24,display:!0,params:{iconList:[{label:"基本图标",list:["el-icon-info","el-icon-error","el-icon-error","el-icon-success","el-icon-warning","el-icon-question"]},{label:"方向图标",list:["el-icon-info","el-icon-back","el-icon-arrow-left","el-icon-arrow-down","el-icon-arrow-right","el-icon-arrow-up"]},{label:"符号图标",list:["el-icon-plus","el-icon-minus","el-icon-close","el-icon-check"]}]}},{type:"switch",label:"开关",icon:"icon-switch",span:24,display:!0,value:0,dicData:[{label:"",value:"0"},{label:"",value:"1"}]},{type:"rate",label:"评价",icon:"icon-star",span:24,display:!0,max:5,value:0,texts:["极差","失望","一般","满意","惊喜"],colors:["#99A9BF","#F7BA2A","#FF9900"]},{type:"slider",label:"滑块",icon:"icon-slider",span:24,display:!0,min:0,max:10},{type:"color",label:"颜色选择器",icon:"icon-color",span:24,display:!0}]}]},"1eca":function(e,t,i){e.exports=i.p+"fonts/codicon.22349029.ttf"},"1f2d":function(e,t,i){var n=i("6cd1");"string"===typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);var o=i("4974").default;o("156943b0",n,!0,{sourceMap:!1,shadowMode:!1})},"1ffd":function(e,t,i){var n=i("53c2");t=n(!1),t.push([e.i,".quick-input-widget{font-size:13px}.quick-input-widget .monaco-highlighted-label .highlight{color:#0066bf}.vs-dark .quick-input-widget .monaco-highlighted-label .highlight{color:#0097fb}.hc-black .quick-input-widget .monaco-highlighted-label .highlight{color:#f38518}",""]),e.exports=t},2273:function(e,t,i){var n=i("6043");e.exports=n("navigator","userAgent")||""},2444:function(e,t,i){var n=i("db65");"string"===typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);var o=i("4974").default;o("98b53788",n,!0,{sourceMap:!1,shadowMode:!1})},2552:function(e,t,i){t.nextTick=function(e){var t=Array.prototype.slice.call(arguments);t.shift(),setTimeout((function(){e.apply(null,t)}),0)},t.platform=t.arch=t.execPath=t.title="browser",t.pid=1,t.browser=!0,t.env={},t.argv=[],t.binding=function(e){throw new Error("No such module. (Possibly not yet loaded)")},function(){var e,n="/";t.cwd=function(){return n},t.chdir=function(t){e||(e=i("e3f4")),n=e.resolve(t,n)}}(),t.exit=t.kill=t.umask=t.dlopen=t.uptime=t.memoryUsage=t.uvCounters=function(){},t.features={}},2717:function(e,t,i){var n,o,r;(function(i,s){o=[],n=s,r="function"===typeof n?n.apply(t,o):n,void 0===r||(e.exports=r)})("undefined"!==typeof self&&self,(function(){function e(){var t=Object.getOwnPropertyDescriptor(document,"currentScript");if(!t&&"currentScript"in document&&document.currentScript)return document.currentScript;if(t&&t.get!==e&&document.currentScript)return document.currentScript;try{throw new Error}catch(g){var i,n,o,r=/.*at [^(]*\((.*):(.+):(.+)\)$/gi,s=/@([^@]*):(\d+):(\d+)\s*$/gi,a=r.exec(g.stack)||s.exec(g.stack),l=a&&a[1]||!1,c=a&&a[2]||!1,h=document.location.href.replace(document.location.hash,""),d=document.getElementsByTagName("script");l===h&&(i=document.documentElement.outerHTML,n=new RegExp("(?:[^\\n]+?\\n){0,"+(c-2)+"}[^<]*<script>([\\d\\D]*?)<\\/script>[\\d\\D]*","i"),o=i.replace(n,"$1").trim());for(var u=0;u<d.length;u++){if("interactive"===d[u].readyState)return d[u];if(d[u].src===l)return d[u];if(l===h&&d[u].innerHTML&&d[u].innerHTML.trim()===o)return d[u]}return null}}return e}))},2790:function(module,__webpack_exports__,__webpack_require__){"use strict";var core_js_modules_es_array_slice__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("9bf1"),core_js_modules_es_array_slice__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(core_js_modules_es_array_slice__WEBPACK_IMPORTED_MODULE_0__),_Users_ssc_Documents_myProjects_avue_form_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("863c"),_utils_json_beautifier__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("826e");__webpack_exports__["a"]={data:function(){return{historySteps:{index:0,maxStep:20,steps:[],storage:!1}}},watch:{historySteps:{handler:function(e){e.storage?localStorage.setItem("avue-form-history",Object(_utils_json_beautifier__WEBPACK_IMPORTED_MODULE_2__["a"])(e)):localStorage.removeItem("avue-form-history")},deep:!0}},methods:{initHistory:function initHistory(data){if(data.storage){var history=localStorage.getItem("avue-form-history");if(history){this.historySteps=eval("("+history+")");var _this$historySteps=this.historySteps,_index=_this$historySteps.index,_steps=_this$historySteps.steps;return this.deepClone(_steps[_index])}}this.historySteps=Object(_Users_ssc_Documents_myProjects_avue_form_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__["a"])(Object(_Users_ssc_Documents_myProjects_avue_form_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__["a"])({},this.historySteps),data);var _this$historySteps2=this.historySteps,index=_this$historySteps2.index,steps=_this$historySteps2.steps;return this.deepClone(steps[index])},handleHistoryChange:function(e){this.historySteps.index==this.historySteps.maxStep-1?this.historySteps.steps.shift():this.historySteps.index++,this.historySteps.steps[this.historySteps.index]=this.deepClone(e),this.historySteps.index<this.historySteps.steps.length-1&&(this.historySteps.steps=this.historySteps.steps.slice(0,this.historySteps.index+1))},handleUndo:function(){return 0!=this.historySteps.index&&this.historySteps.index--,this.deepClone(this.historySteps.steps[this.historySteps.index])},handleRedo:function(){return this.historySteps.index!=this.historySteps.steps.length-1&&this.historySteps.index++,this.deepClone(this.historySteps.steps[this.historySteps.index])}}}},"294d":function(e,t,i){var n=i("53c2");t=n(!1),t.push([e.i,".monaco-editor .minimap.slider-mouseover .minimap-slider{opacity:0;-webkit-transition:opacity .1s linear;transition:opacity .1s linear}.monaco-editor .minimap.slider-mouseover .minimap-slider.active,.monaco-editor .minimap.slider-mouseover:hover .minimap-slider{opacity:1}.monaco-editor .minimap-shadow-hidden{position:absolute;width:0}.monaco-editor .minimap-shadow-visible{position:absolute;left:-6px;width:6px}",""]),e.exports=t},"2adc":function(e,t,i){var n=i("006c");"string"===typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);var o=i("4974").default;o("4be37e8e",n,!0,{sourceMap:!1,shadowMode:!1})},"2c21":function(e,t,i){var n,o,r=i("e244"),s=i("2273"),a=r.process,l=a&&a.versions,c=l&&l.v8;c?(n=c.split("."),o=n[0]+n[1]):s&&(n=s.match(/Edge\/(\d+)/),(!n||n[1]>=74)&&(n=s.match(/Chrome\/(\d+)/),n&&(o=n[1]))),e.exports=o&&+o},"2c50":function(e,t,i){"use strict";var n=i("83ec"),o=i("b4fd"),r=i("45ad"),s=i("3d1a"),a=[].join,l=o!=Object,c=s("join",",");n({target:"Array",proto:!0,forced:l||!c},{join:function(e){return a.call(r(this),void 0===e?",":e)}})},"2c69":function(e,t,i){var n=i("83ec"),o=i("55ab"),r=i("c1ca"),s=i("45ad"),a=i("42b1"),l=i("acd4");n({target:"Object",stat:!0,sham:!o},{getOwnPropertyDescriptors:function(e){var t,i,n=s(e),o=a.f,c=r(n),h={},d=0;while(c.length>d)i=o(n,t=c[d++]),void 0!==i&&l(h,t,i);return h}})},"2cdc":function(e,t,i){var n=i("eee7");e.exports=function(e){if(!n(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype");return e}},"2eb0":function(e,t,i){"use strict";var n=i("83ec"),o=i("6e1d");n({target:"RegExp",proto:!0,forced:/./.exec!==o},{exec:o})},"2f62":function(e,t,i){"use strict";var n=i("83ec"),o=i("f226").includes,r=i("6e10"),s=i("9f1e"),a=s("indexOf",{ACCESSORS:!0,1:0});n({target:"Array",proto:!0,forced:!a},{includes:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}}),r("includes")},"2f6c":function(e,t,i){var n=i("e244"),o=i("72c7"),r="__core-js_shared__",s=n[r]||o(r,{});e.exports=s},3073:function(e,t,i){var n=i("fbcf"),o=i("eee7"),r=i("fc01");e.exports=function(e,t){if(n(e),o(t)&&t.constructor===e)return t;var i=r.f(e),s=i.resolve;return s(t),i.promise}},"312a":function(e,t,i){var n=i("53c2");t=n(!1),t.push([e.i,".monaco-keybinding{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;line-height:10px}.monaco-keybinding>.monaco-keybinding-key{display:inline-block;border:1px solid hsla(0,0%,80%,.4);border-bottom-color:hsla(0,0%,73.3%,.4);border-radius:3px;-webkit-box-shadow:inset 0 -1px 0 hsla(0,0%,73.3%,.4);box-shadow:inset 0 -1px 0 hsla(0,0%,73.3%,.4);background-color:hsla(0,0%,86.7%,.4);vertical-align:middle;color:#555;font-size:11px;padding:3px 5px;margin:0 2px}.monaco-keybinding>.monaco-keybinding-key:first-child{margin-left:0}.monaco-keybinding>.monaco-keybinding-key:last-child{margin-right:0}.hc-black .monaco-keybinding>.monaco-keybinding-key,.vs-dark .monaco-keybinding>.monaco-keybinding-key{background-color:hsla(0,0%,50.2%,.17);color:#ccc;border:1px solid rgba(51,51,51,.6);border-bottom-color:rgba(68,68,68,.6);-webkit-box-shadow:inset 0 -1px 0 rgba(68,68,68,.6);box-shadow:inset 0 -1px 0 rgba(68,68,68,.6)}.monaco-keybinding>.monaco-keybinding-key-separator{display:inline-block}.monaco-keybinding>.monaco-keybinding-key-chord-separator{width:6px}",""]),e.exports=t},"325d":function(e,t,i){"use strict";var n=i("83ec"),o=i("e0e0"),r=i("a7f7"),s=i("13a8"),a=i("63ef"),l=i("69f1"),c=i("7d86"),h=i("1810"),d=i("f0db"),u=i("d85b"),g=i("15b2"),f=g.IteratorPrototype,m=g.BUGGY_SAFARI_ITERATORS,p=h("iterator"),_="keys",b="values",v="entries",w=function(){return this};e.exports=function(e,t,i,h,g,C,y){o(i,t,h);var S,x,L,k=function(e){if(e===g&&M)return M;if(!m&&e in N)return N[e];switch(e){case _:return function(){return new i(this,e)};case b:return function(){return new i(this,e)};case v:return function(){return new i(this,e)}}return function(){return new i(this)}},E=t+" Iterator",D=!1,N=e.prototype,T=N[p]||N["@@iterator"]||g&&N[g],M=!m&&T||k(g),I="Array"==t&&N.entries||T;if(I&&(S=r(I.call(new e)),f!==Object.prototype&&S.next&&(d||r(S)===f||(s?s(S,f):"function"!=typeof S[p]&&l(S,p,w)),a(S,E,!0,!0),d&&(u[E]=w))),g==b&&T&&T.name!==b&&(D=!0,M=function(){return T.call(this)}),d&&!y||N[p]===M||l(N,p,M),u[t]=M,g)if(x={values:k(b),keys:C?M:k(_),entries:k(v)},y)for(L in x)(m||D||!(L in N))&&c(N,L,x[L]);else n({target:t,proto:!0,forced:m||D},x);return x}},3352:function(e,t,i){var n=i("80db"),o=Math.max,r=Math.min;e.exports=function(e,t){var i=n(e);return i<0?o(i+t,0):r(i,t)}},3395:function(e,t,i){var n=i("0874"),o=i("d554"),r="["+o+"]",s=RegExp("^"+r+r+"*"),a=RegExp(r+r+"*$"),l=function(e){return function(t){var i=String(n(t));return 1&e&&(i=i.replace(s,"")),2&e&&(i=i.replace(a,"")),i}};e.exports={start:l(1),end:l(2),trim:l(3)}},"358f":function(e,t,i){var n=i("5124");"string"===typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);var o=i("4974").default;o("13719944",n,!0,{sourceMap:!1,shadowMode:!1})},"35d6":function(e,t,i){var n,o,r,s=i("17be"),a=i("e244"),l=i("eee7"),c=i("69f1"),h=i("fe32"),d=i("2f6c"),u=i("5350"),g=i("fd3f"),f=a.WeakMap,m=function(e){return r(e)?o(e):n(e,{})},p=function(e){return function(t){var i;if(!l(t)||(i=o(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return i}};if(s){var _=d.state||(d.state=new f),b=_.get,v=_.has,w=_.set;n=function(e,t){return t.facade=e,w.call(_,e,t),t},o=function(e){return b.call(_,e)||{}},r=function(e){return v.call(_,e)}}else{var C=u("state");g[C]=!0,n=function(e,t){return t.facade=e,c(e,C,t),t},o=function(e){return h(e,C)?e[C]:{}},r=function(e){return h(e,C)}}e.exports={set:n,get:o,has:r,enforce:m,getterFor:p}},"36df":function(e,t,i){var n=i("294d");"string"===typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);var o=i("4974").default;o("3e355ff7",n,!0,{sourceMap:!1,shadowMode:!1})},"370b":function(e,t,i){"use strict";var n=i("8aa3").forEach,o=i("3d1a"),r=i("9f1e"),s=o("forEach"),a=r("forEach");e.exports=s&&a?[].forEach:function(e){return n(this,e,arguments.length>1?arguments[1]:void 0)}},"37fd":function(e,t,i){"use strict";var n=i("83ec"),o=i("8aa3").filter,r=i("72d4"),s=i("9f1e"),a=r("filter"),l=s("filter");n({target:"Array",proto:!0,forced:!a||!l},{filter:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}})},"396d":function(e,t,i){var n=i("fe32"),o=i("45ad"),r=i("f226").indexOf,s=i("fd3f");e.exports=function(e,t){var i,a=o(e),l=0,c=[];for(i in a)!n(s,i)&&n(a,i)&&c.push(i);while(t.length>l)n(a,i=t[l++])&&(~r(c,i)||c.push(i));return c}},"3a5d":function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAUMAAADXCAYAAACAszPmAAAAAXNSR0IArs4c6QAADXRJREFUeAHt3cuLZGcZB+BvLk2PM0ZxFMdJXEQCYRIialrUmPgXuM0qkI3GnVl4ScBtUEFFXOhCEBQ3oiDi36BGkWQ0gpgIZgK59EhIxhBn0nMfz+nqwq6e6upT019933vqPAVxuuty3vc8b/fPU3UufWB9ff1GciNAgMDABQ6363/y5MmBM8y3+mfPnmU2H5lnEwgt0P5OHwzdoeYIECBQSEAYFoJWhgCB2ALCMPZ8dEeAQCEBYVgIWhkCBGILCMPY89EdAQKFBIRhIWhlCBCILbB5aE3sFnVHgEAtgfaQk0Xddh7St6haO+vstj4zw/DPr26knz/3dnrr4vXN199/cjV9/cHjm19/9w/n0nP/vjSx3I9/aDU9+VA/Hv/e0+fSX89O9v/J21fTVz876n9ixeb4ZlEDnaOFqU/t+gMx9cXuJDAAgZlvk3/6l/8HYWtx9frynKxy/vIo4LfP+Nn1S+nbv3tz+12+JkBgIAIH2tPxdttqeOTXo03kb306pZUmNg/NjM5+ibW5/s7VyZ6feiala839v3h49hk57dbfbma2DCdNfddvgUX+PO/8HVpUrZ11pk2krT3zbfL4RW0ILlMQtut18EBK714Zr6F/CRAYusDMMPxE8xnhlWZTaeXg5aE7WX8CBJZcYGYYPrG1s2RRm69Lbmv1CBDokcDMMOzRemRp9f7bj6RrS7STKAuKhRAYiMDMMGwPn2lvj941DI2vPPC+YayotSRA4CaBmfuH2+MIdx5LeNMS3EGAAIElEJi5ZbgE6zfXKoy3hMcHjs/14q0nd9mNfyvL9RoCBBYrIAy3+doK3obhSwIDE5j5NnlgFlaXAIEBC8zcMmzPNR7dJs/hjer13Bsp/fZMSv+9Murw3mZ/yBfvHX39k3+k9MJ/Jju/p3n8sW2Pjx8dn3kz+1zrs2n24ynr49POpX7gw0fS45+x02c8N//mFyj5sU/JWtOkZobh+LOzvhxn+JsXU7qw7RS79tS6Zbmdv3TzudR/evViOv/7N9M3Pvf+ZVlN60GgmsDMc5PHXfUlDL/29Kjjpz6V0pFDy3UK4bRzqb/5bEpXmozc61zq8Rz9S4DAdIE9z03+TnOc4eHmU8VHPjJ9AVHvPdScd+xc6qjT0ReBmAIzd6D8rT3OcMc1/2Kuxqir9jPCu97TbBXOfPMfeQ30RoBALYGlio3xzpJamOoSINBfgZlh+MFjh9LrF66lJ/84WsGPNXuX+3Cl6758xrnfH5v2XOrLy7SXaL8gXk9gHwIzw/Cx+9+bfvzsW+ncxmhPZvTfuxfPXUntWSRDOZf6oZXmOKLmmowvvPB6uuOOOzZ/DF577bV04cKFiR+JY8eOeZzPIH4+XnnllbSxsTHx87+2tjbx/W7fzAzD+06sph99/sTU144Pu5n6YHNnjcfb4wPbs0iGEoa72bufwFAFVlZW0tWro+PrrlzZOuC4I0anQ2s6Lqv608YHS3//weqtFGngZ/9sjh9qbo+vvatIPUUI9EngpZdeSm0gdtky3PPQmj6t+BB7/fsb14a42taZQCeBo0ePpsuXu1+lf+bb5HHFoeyQGK+vfwkQ6L/AiRPTP+Lbbc06heFuL452/ymn6UYbiX4I9EZgqcLwS1sXXeiNvkYJEFiYQHtkRXs7depUpxpLFYad1niJnnTfBw6l5sxDNwIEpgjsPMRsylMm7lqqMGwv09XehrKFaC/yaN7+l0AOgaUKw53XK8wBZBkECAxDYOaFGoZB0N+1/MEzG6n9z40Agf0LLNWW4fHmwtznmotyP7F1LnV7Jesv3DNC6nKl651blvu9kvVHm8/0vrx1QPQPT2+knccFzvP4r56/lJ5/c9uVa5vVOtucN378iE8N9/9rYAnLKNCehjrPbanC8OHm7zv/8l8pvb11nGXtc6kvXrzYzCLP2SHr56834Td56e4TRw+kR+87Ms+8PZfAYATG5+t3XeFOp+MN5aDrrn+DofXY67mnT5/enMHdd9/ddRaeR4DAAgRuu+22PZfa/k77zHBPJk8gQKCPAu1xhuNjDbv0v1Rvk7ussOcQIDAMgXmPM7RlOIyfC2tJgMAeArYM9wC61Yfn3ZN1q3W8jgCBPALCMI/jTUuZd0/WTQtwBwECRQWEYVFuxQgQKCUw77szYbigyYz3YtlCXBCwxRLYQ2De3z1huAforT48756sW63jdQQI5BHoFIZ7HWCcpxVLIUCAQD6B8bsz1zPMZ2pJBAj0UGDed2eOM+zhkLVMgEB+gU5vk/OXXf4lzrsna/lFrCGB2ALCcEHzmXdP1oLasFgCBDoKCMOOUJ5GgEC/BOZ9d9YpDF3Ca/4fgjNnzqTV1dXNS30dPOij2fkFvYLA/gTmfXfWKQz319IwX339+vXU7s16+eWX05133rmJ0O7q37mHq/1/r/HQPM7Hz8eFicCY5/djfX39pt+vGzdupLW1tYll7vaNMNxNJtP9KysrmZZkMQQIzBJog6/9b/vt8OHuEedK19vkuh5c3uVK19sW60sCBIILuNJ18AFpjwCBcgI+2S9nrRIBAoEFhGHg4WiNAIFyAsKwnLVKBAgEFhCGgYejNQIEygkIw3LWKhEgEFhAGAYejtYIECgnIAzLWatEgEBgAWEYeDhaI0CgnIAwLGetEgECgQWEYeDhaI0AgXICnc5i7nrObrm2VSJAgEBeAVuGeT0tjQCBngoIw54OTtsECOQVEIZ5PS2NAIGeCgjDng5O2wQI5BXotAPF30DJi25pBAjEE7BlGG8mOiJAoIKAMKyAriQBAvEEhGG8meiIAIEKAsKwArqSBAjEExCG8WaiIwIEKggIwwroShIgEE9AGMabiY4IEKggIAwroCtJgEA8AWEYbyY6IkCggoAwrICuJAEC8QSEYbyZ6IgAgQoCwrACupIECMQTEIbxZqIjAgQqCAjDCuhKEiAQT0AYxpuJjggQqCAgDCugK0mAQDyBThd39dfx4g1ORwQI5BWwZZjX09IIEOipgDDs6eC0TYBAXgFhmNfT0ggQ6KmAMOzp4LRNgEBegU47UPx1vLzolkaAQDwBW4bxZqIjAgQqCAjDCuhKEiAQT0AYxpuJjggQqCAgDCugK0mAQDwBYRhvJjoiQKCCgDCsgK4kAQLxBIRhvJnoiACBCgLCsAK6kgQIxBMQhvFmoiMCBCoICMMK6EoSIBBPQBjGm4mOCBCoICAMK6ArSYBAPAFhGG8mOiJAoIKAMKyAriQBAvEEhGG8meiIAIEKAsKwArqSBAjEE+h0cVd/HS/e4HREgEBeAVuGeT0tjQCBngoIw54OTtsECOQVEIZ5PS2NAIGeCgjDng5O2wQI5BXotAPFX8fLi25pBAjEE7BlGG8mOiJAoIKAMKyAriQBAvEEhGG8meiIAIEKAsKwArqSBAjEExCG8WaiIwIEKggIwwroShIgEE9AGMabiY4IEKggIAwroCtJgEA8AWEYbyY6IkCggoAwrICuJAEC8QSEYbyZ6IgAgQoCwrACupIECMQTEIbxZqIjAgQqCAjDCuhKEiAQT0AYxpuJjggQqCDQ6XqG/iBUhckoSYBAUQFbhkW5FSNAIKqAMIw6GX0RIFBUQBgW5VaMAIGoAsIw6mT0RYBAUQFhWJRbMQIEogp02pvsr+NFHZ++CBDIJWDLMJek5RAg0GsBYdjr8WmeAIFcAsIwl6TlECDQawFh2OvxaZ4AgVwCwjCXpOUQINBrAWHY6/FpngCBXALCMJek5RAg0GsBYdjr8WmeAIFcAsIwl6TlECDQawFh2OvxaZ4AgVwCwjCXpOUQINBrAWHY6/FpngCBXALCMJek5RAg0GsBYdjr8WmeAIFcAp0u4eUPQuXithwCBKIK2DKMOhl9ESBQVEAYFuVWjACBqALCMOpk9EWAQFEBYViUWzECBKIKCMOok9EXAQJFBYRhUW7FCBCIKiAMo05GXwQIFBUQhkW5FSNAIKqAMIw6GX0RIFBUQBgW5VaMAIGoAsIw6mT0RYBAUQFhWJRbMQIEogoIw6iT0RcBAkUFhGFRbsUIEIgqIAyjTkZfBAgUFRCGRbkVI0AgqoAwjDoZfREgUFRAGBblVowAgagCwjDqZPRFgEBRAWFYlFsxAgSiCgjDqJPRFwECRQWEYVFuxQgQiCogDKNORl8ECBQVEIZFuRUjQCCqgDCMOhl9ESBQVEAYFuVWjACBqALCMOpk9EWAQFEBYViUWzECBKIKCMOok9EXAQJFBYRhUW7FCBCIKiAMo05GXwQIFBUQhkW5FSNAIKqAMIw6GX0RIFBUQBgW5VaMAIGoAsIw6mT0RYBAUQFhWJRbMQIEogoIw6iT0RcBAkUFhGFRbsUIEIgqIAyjTkZfBAgUFRCGRbkVI0AgqoAwjDoZfREgUFRAGBblVowAgagCwjDqZPRFgEBRAWFYlFsxAgSiCgjDqJPRFwECRQWEYVFuxQgQiCogDKNORl8ECBQVEIZFuRUjQCCqgDCMOhl9ESBQVEAYFuVWjACBqALCMOpk9EWAQFEBYViUWzECBKIKCMOok9EXAQJFBYRhUW7FCBCIKiAMo05GXwQIFBUQhkW5FSNAIKqAMIw6GX0RIFBU4H8RUTV123y9kQAAAABJRU5ErkJggg=="},"3c82":function(e,t,i){var n=i("53c2");t=n(!1),t.push([e.i,".monaco-editor .scroll-decoration{position:absolute;top:0;left:0;height:6px}",""]),e.exports=t},"3d1a":function(e,t,i){"use strict";var n=i("ac97");e.exports=function(e,t){var i=[][e];return!!i&&n((function(){i.call(null,t||function(){throw 1},1)}))}},"3e1a":function(e,t,i){var n=i("396d"),o=i("e629");e.exports=Object.keys||function(e){return n(e,o)}},"3ef6":function(e,t,i){"use strict";t.byteLength=h,t.toByteArray=u,t.fromByteArray=m;for(var n=[],o=[],r="undefined"!==typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,l=s.length;a<l;++a)n[a]=s[a],o[s.charCodeAt(a)]=a;function c(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var i=e.indexOf("=");-1===i&&(i=t);var n=i===t?0:4-i%4;return[i,n]}function h(e){var t=c(e),i=t[0],n=t[1];return 3*(i+n)/4-n}function d(e,t,i){return 3*(t+i)/4-i}function u(e){var t,i,n=c(e),s=n[0],a=n[1],l=new r(d(e,s,a)),h=0,u=a>0?s-4:s;for(i=0;i<u;i+=4)t=o[e.charCodeAt(i)]<<18|o[e.charCodeAt(i+1)]<<12|o[e.charCodeAt(i+2)]<<6|o[e.charCodeAt(i+3)],l[h++]=t>>16&255,l[h++]=t>>8&255,l[h++]=255&t;return 2===a&&(t=o[e.charCodeAt(i)]<<2|o[e.charCodeAt(i+1)]>>4,l[h++]=255&t),1===a&&(t=o[e.charCodeAt(i)]<<10|o[e.charCodeAt(i+1)]<<4|o[e.charCodeAt(i+2)]>>2,l[h++]=t>>8&255,l[h++]=255&t),l}function g(e){return n[e>>18&63]+n[e>>12&63]+n[e>>6&63]+n[63&e]}function f(e,t,i){for(var n,o=[],r=t;r<i;r+=3)n=(e[r]<<16&16711680)+(e[r+1]<<8&65280)+(255&e[r+2]),o.push(g(n));return o.join("")}function m(e){for(var t,i=e.length,o=i%3,r=[],s=16383,a=0,l=i-o;a<l;a+=s)r.push(f(e,a,a+s>l?l:a+s));return 1===o?(t=e[i-1],r.push(n[t>>2]+n[t<<4&63]+"==")):2===o&&(t=(e[i-2]<<8)+e[i-1],r.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"=")),r.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},"3f13":function(e,t,i){var n=i("53c2");t=n(!1),t.push([e.i,".monaco-editor .margin-view-overlays .current-line,.monaco-editor .view-overlays .current-line{display:block;position:absolute;left:0;top:0;-webkit-box-sizing:border-box;box-sizing:border-box}.monaco-editor .margin-view-overlays .current-line.current-line-margin.current-line-margin-both{border-right:0}",""]),e.exports=t},"3fa4":function(e,t,i){"use strict";function n(e){return!e||"string"!==typeof e||0===e.trim().length}i.d(t,"B",(function(){return n})),i.d(t,"v",(function(){return r})),i.d(t,"s",(function(){return s})),i.d(t,"t",(function(){return a})),i.d(t,"I",(function(){return l})),i.d(t,"N",(function(){return c})),i.d(t,"n",(function(){return h})),i.d(t,"P",(function(){return d})),i.d(t,"q",(function(){return u})),i.d(t,"o",(function(){return g})),i.d(t,"M",(function(){return f})),i.d(t,"L",(function(){return m})),i.d(t,"u",(function(){return p})),i.d(t,"x",(function(){return _})),i.d(t,"H",(function(){return b})),i.d(t,"f",(function(){return v})),i.d(t,"g",(function(){return w})),i.d(t,"h",(function(){return C})),i.d(t,"F",(function(){return y})),i.d(t,"G",(function(){return S})),i.d(t,"r",(function(){return L})),i.d(t,"Q",(function(){return E})),i.d(t,"d",(function(){return D})),i.d(t,"e",(function(){return N})),i.d(t,"D",(function(){return T})),i.d(t,"E",(function(){return M})),i.d(t,"i",(function(){return I})),i.d(t,"y",(function(){return O})),i.d(t,"J",(function(){return R})),i.d(t,"K",(function(){return P})),i.d(t,"p",(function(){return F})),i.d(t,"l",(function(){return B})),i.d(t,"j",(function(){return H})),i.d(t,"z",(function(){return U})),i.d(t,"a",(function(){return j})),i.d(t,"m",(function(){return K})),i.d(t,"k",(function(){return q})),i.d(t,"C",(function(){return $})),i.d(t,"A",(function(){return G})),i.d(t,"b",(function(){return Y})),i.d(t,"R",(function(){return X})),i.d(t,"O",(function(){return Z})),i.d(t,"w",(function(){return Q})),i.d(t,"c",(function(){return J}));const o=/{(\d+)}/g;function r(e,...t){return 0===t.length?e:e.replace(o,(function(e,i){const n=parseInt(i,10);return isNaN(n)||n<0||n>=t.length?e:t[n]}))}function s(e){return e.replace(/[<>&]/g,(function(e){switch(e){case"<":return"&lt;";case">":return"&gt;";case"&":return"&amp;";default:return e}}))}function a(e){return e.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function l(e,t){if(!e||!t)return e;const i=t.length;if(0===i||0===e.length)return e;let n=0;while(e.indexOf(t,n)===n)n+=i;return e.substring(n)}function c(e,t){if(!e||!t)return e;const i=t.length,n=e.length;if(0===i||0===n)return e;let o=n,r=-1;while(1){if(r=e.lastIndexOf(t,o-1),-1===r||r+i!==o)break;if(0===r)return"";o=r}return e.substring(0,o)}function h(e){return e.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function d(e,t){if(e.length<t.length)return!1;if(e===t)return!0;for(let i=0;i<t.length;i++)if(e[i]!==t[i])return!1;return!0}function u(e,t){const i=e.length-t.length;return i>0?e.indexOf(t,i)===i:0===i&&e===t}function g(e,t,i={}){if(!e)throw new Error("Cannot create regex from empty string");t||(e=a(e)),i.wholeWord&&(/\B/.test(e.charAt(0))||(e="\\b"+e),/\B/.test(e.charAt(e.length-1))||(e+="\\b"));let n="";return i.global&&(n+="g"),i.matchCase||(n+="i"),i.multiline&&(n+="m"),i.unicode&&(n+="u"),new RegExp(e,n)}function f(e){if("^"===e.source||"^$"===e.source||"$"===e.source||"^\\s*$"===e.source)return!1;const t=e.exec("");return!(!t||0!==e.lastIndex)}function m(e){return(e.global?"g":"")+(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")}function p(e){for(let t=0,i=e.length;t<i;t++){const i=e.charCodeAt(t);if(32!==i&&9!==i)return t}return-1}function _(e,t=0,i=e.length){for(let n=t;n<i;n++){const i=e.charCodeAt(n);if(32!==i&&9!==i)return e.substring(t,n)}return e.substring(t,i)}function b(e,t=e.length-1){for(let i=t;i>=0;i--){const t=e.charCodeAt(i);if(32!==t&&9!==t)return i}return-1}function v(e,t){return e<t?-1:e>t?1:0}function w(e,t,i=0,n=e.length,o=0,r=t.length){for(;i<n&&o<r;i++,o++){let n=e.charCodeAt(i),r=t.charCodeAt(o);if(n<r)return-1;if(n>r)return 1}const s=n-i,a=r-o;return s<a?-1:s>a?1:0}function C(e,t,i=0,n=e.length,o=0,r=t.length){for(;i<n&&o<r;i++,o++){let s=e.charCodeAt(i),a=t.charCodeAt(o);if(s===a)continue;const l=s-a;if((32!==l||!S(a))&&(-32!==l||!S(s)))return y(s)&&y(a)?l:w(e.toLowerCase(),t.toLowerCase(),i,n,o,r)}const s=n-i,a=r-o;return s<a?-1:s>a?1:0}function y(e){return e>=97&&e<=122}function S(e){return e>=65&&e<=90}function x(e){return y(e)||S(e)}function L(e,t){return e.length===t.length&&k(e,t)}function k(e,t,i=e.length){for(let n=0;n<i;n++){const i=e.charCodeAt(n),o=t.charCodeAt(n);if(i!==o)if(x(i)&&x(o)){const e=Math.abs(i-o);if(0!==e&&32!==e)return!1}else if(String.fromCharCode(i).toLowerCase()!==String.fromCharCode(o).toLowerCase())return!1}return!0}function E(e,t){const i=t.length;return!(t.length>e.length)&&k(e,t,i)}function D(e,t){let i,n=Math.min(e.length,t.length);for(i=0;i<n;i++)if(e.charCodeAt(i)!==t.charCodeAt(i))return i;return n}function N(e,t){let i,n=Math.min(e.length,t.length);const o=e.length-1,r=t.length-1;for(i=0;i<n;i++)if(e.charCodeAt(o-i)!==t.charCodeAt(r-i))return i;return n}function T(e){return 55296<=e&&e<=56319}function M(e){return 56320<=e&&e<=57343}function I(e,t){return t-56320+(e-55296<<10)+65536}function O(e,t,i){const n=e.charCodeAt(i);if(T(n)&&i+1<t){const t=e.charCodeAt(i+1);if(M(t))return I(n,t)}return n}function A(e,t){const i=e.charCodeAt(t-1);if(M(i)&&t>1){const n=e.charCodeAt(t-2);if(T(n))return I(n,i)}return i}function R(e,t){const i=ee.getInstance(),n=t,o=e.length,r=O(e,o,t);t+=r>=65536?2:1;let s=i.getGraphemeBreakType(r);while(t<o){const n=O(e,o,t),r=i.getGraphemeBreakType(n);if(J(s,r))break;t+=n>=65536?2:1,s=r}return t-n}function P(e,t){const i=ee.getInstance(),n=t,o=A(e,t);t-=o>=65536?2:1;let r=i.getGraphemeBreakType(o);while(t>0){const n=A(e,t),o=i.getGraphemeBreakType(n);if(J(o,r))break;t-=n>=65536?2:1,r=o}return n-t}function F(e){const t=e.byteLength,i=[];let n=0;while(n<t){const o=e[n];let r;if(r=o>=240&&n+3<t?(7&e[n++])<<18>>>0|(63&e[n++])<<12>>>0|(63&e[n++])<<6>>>0|(63&e[n++])<<0>>>0:o>=224&&n+2<t?(15&e[n++])<<12>>>0|(63&e[n++])<<6>>>0|(63&e[n++])<<0>>>0:o>=192&&n+1<t?(31&e[n++])<<6>>>0|(63&e[n++])<<0>>>0:e[n++],r>=0&&r<=55295||r>=57344&&r<=65535)i.push(String.fromCharCode(r));else if(r>=65536&&r<=1114111){const e=r-65536,t=55296+((1047552&e)>>>10),n=56320+((1023&e)>>>0);i.push(String.fromCharCode(t)),i.push(String.fromCharCode(n))}else i.push(String.fromCharCode(65533))}return i.join("")}const W=/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u08BD\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE33\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDCFF]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD50-\uDFFF]|\uD83B[\uDC00-\uDEBB])/;function B(e){return W.test(e)}const V=/(?:[\u231A\u231B\u23F0\u23F3\u2600-\u27BF\u2B50\u2B55]|\uD83C[\uDDE6-\uDDFF\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F\uDE80-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD00-\uDDFF\uDE70-\uDE73\uDE78-\uDE82\uDE90-\uDE95])/;function H(e){return V.test(e)}const z=/^[\t\n\r\x20-\x7E]*$/;function U(e){return z.test(e)}const j=/[\u2028\u2029]/;function K(e){return j.test(e)}function q(e){for(let t=0,i=e.length;t<i;t++)if($(e.charCodeAt(t)))return!0;return!1}function $(e){return e=+e,e>=11904&&e<=55215||e>=63744&&e<=64255||e>=65281&&e<=65374}function G(e){return e>=127462&&e<=127487||e>=9728&&e<=10175||e>=127744&&e<=128591||e>=128640&&e<=128764||e>=128992&&e<=129003||e>=129280&&e<=129535||e>=129648&&e<=129651||e>=129656&&e<=129666||e>=129680&&e<=129685}const Y=String.fromCharCode(65279);function X(e){return!!(e&&e.length>0&&65279===e.charCodeAt(0))}function Z(e){const t=26;return e%=2*t,e<t?String.fromCharCode(97+e):String.fromCharCode(65+e-t)}function Q(e){const t=ee.getInstance();return t.getGraphemeBreakType(e)}function J(e,t){return 0===e?5!==t&&7!==t:(2!==e||3!==t)&&(4===e||2===e||3===e||(4===t||2===t||3===t||(8!==e||8!==t&&9!==t&&11!==t&&12!==t)&&((11!==e&&9!==e||9!==t&&10!==t)&&((12!==e&&10!==e||10!==t)&&(5!==t&&13!==t&&(7!==t&&(1!==e&&((13!==e||14!==t)&&(6!==e||6!==t)))))))))}class ee{constructor(){this._data=te()}static getInstance(){return ee._INSTANCE||(ee._INSTANCE=new ee),ee._INSTANCE}getGraphemeBreakType(e){if(e<32)return 10===e?3:13===e?2:4;if(e<127)return 0;const t=this._data,i=t.length/3;let n=1;while(n<=i)if(e<t[3*n])n*=2;else{if(!(e>t[3*n+1]))return t[3*n+2];n=2*n+1}return 0}}function te(){return JSON.parse("[0,0,0,51592,51592,11,44424,44424,11,72251,72254,5,7150,7150,7,48008,48008,11,55176,55176,11,128420,128420,14,3276,3277,5,9979,9980,14,46216,46216,11,49800,49800,11,53384,53384,11,70726,70726,5,122915,122916,5,129320,129327,14,2558,2558,5,5906,5908,5,9762,9763,14,43360,43388,8,45320,45320,11,47112,47112,11,48904,48904,11,50696,50696,11,52488,52488,11,54280,54280,11,70082,70083,1,71350,71350,7,73111,73111,5,127892,127893,14,128726,128727,14,129473,129474,14,2027,2035,5,2901,2902,5,3784,3789,5,6754,6754,5,8418,8420,5,9877,9877,14,11088,11088,14,44008,44008,5,44872,44872,11,45768,45768,11,46664,46664,11,47560,47560,11,48456,48456,11,49352,49352,11,50248,50248,11,51144,51144,11,52040,52040,11,52936,52936,11,53832,53832,11,54728,54728,11,69811,69814,5,70459,70460,5,71096,71099,7,71998,71998,5,72874,72880,5,119149,119149,7,127374,127374,14,128335,128335,14,128482,128482,14,128765,128767,14,129399,129400,14,129680,129685,14,1476,1477,5,2377,2380,7,2759,2760,5,3137,3140,7,3458,3459,7,4153,4154,5,6432,6434,5,6978,6978,5,7675,7679,5,9723,9726,14,9823,9823,14,9919,9923,14,10035,10036,14,42736,42737,5,43596,43596,5,44200,44200,11,44648,44648,11,45096,45096,11,45544,45544,11,45992,45992,11,46440,46440,11,46888,46888,11,47336,47336,11,47784,47784,11,48232,48232,11,48680,48680,11,49128,49128,11,49576,49576,11,50024,50024,11,50472,50472,11,50920,50920,11,51368,51368,11,51816,51816,11,52264,52264,11,52712,52712,11,53160,53160,11,53608,53608,11,54056,54056,11,54504,54504,11,54952,54952,11,68108,68111,5,69933,69940,5,70197,70197,7,70498,70499,7,70845,70845,5,71229,71229,5,71727,71735,5,72154,72155,5,72344,72345,5,73023,73029,5,94095,94098,5,121403,121452,5,126981,127182,14,127538,127546,14,127990,127990,14,128391,128391,14,128445,128449,14,128500,128505,14,128752,128752,14,129160,129167,14,129356,129356,14,129432,129442,14,129648,129651,14,129751,131069,14,173,173,4,1757,1757,1,2274,2274,1,2494,2494,5,2641,2641,5,2876,2876,5,3014,3016,7,3262,3262,7,3393,3396,5,3570,3571,7,3968,3972,5,4228,4228,7,6086,6086,5,6679,6680,5,6912,6915,5,7080,7081,5,7380,7392,5,8252,8252,14,9096,9096,14,9748,9749,14,9784,9786,14,9833,9850,14,9890,9894,14,9938,9938,14,9999,9999,14,10085,10087,14,12349,12349,14,43136,43137,7,43454,43456,7,43755,43755,7,44088,44088,11,44312,44312,11,44536,44536,11,44760,44760,11,44984,44984,11,45208,45208,11,45432,45432,11,45656,45656,11,45880,45880,11,46104,46104,11,46328,46328,11,46552,46552,11,46776,46776,11,47000,47000,11,47224,47224,11,47448,47448,11,47672,47672,11,47896,47896,11,48120,48120,11,48344,48344,11,48568,48568,11,48792,48792,11,49016,49016,11,49240,49240,11,49464,49464,11,49688,49688,11,49912,49912,11,50136,50136,11,50360,50360,11,50584,50584,11,50808,50808,11,51032,51032,11,51256,51256,11,51480,51480,11,51704,51704,11,51928,51928,11,52152,52152,11,52376,52376,11,52600,52600,11,52824,52824,11,53048,53048,11,53272,53272,11,53496,53496,11,53720,53720,11,53944,53944,11,54168,54168,11,54392,54392,11,54616,54616,11,54840,54840,11,55064,55064,11,65438,65439,5,69633,69633,5,69837,69837,1,70018,70018,7,70188,70190,7,70368,70370,7,70465,70468,7,70712,70719,5,70835,70840,5,70850,70851,5,71132,71133,5,71340,71340,7,71458,71461,5,71985,71989,7,72002,72002,7,72193,72202,5,72281,72283,5,72766,72766,7,72885,72886,5,73104,73105,5,92912,92916,5,113824,113827,4,119173,119179,5,121505,121519,5,125136,125142,5,127279,127279,14,127489,127490,14,127570,127743,14,127900,127901,14,128254,128254,14,128369,128370,14,128400,128400,14,128425,128432,14,128468,128475,14,128489,128494,14,128715,128720,14,128745,128745,14,128759,128760,14,129004,129023,14,129296,129304,14,129340,129342,14,129388,129392,14,129404,129407,14,129454,129455,14,129485,129487,14,129659,129663,14,129719,129727,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2363,2363,7,2402,2403,5,2507,2508,7,2622,2624,7,2691,2691,7,2786,2787,5,2881,2884,5,3006,3006,5,3072,3072,5,3170,3171,5,3267,3268,7,3330,3331,7,3406,3406,1,3538,3540,5,3655,3662,5,3897,3897,5,4038,4038,5,4184,4185,5,4352,4447,8,6068,6069,5,6155,6157,5,6448,6449,7,6742,6742,5,6783,6783,5,6966,6970,5,7042,7042,7,7143,7143,7,7212,7219,5,7412,7412,5,8206,8207,4,8294,8303,4,8596,8601,14,9410,9410,14,9742,9742,14,9757,9757,14,9770,9770,14,9794,9794,14,9828,9828,14,9855,9855,14,9882,9882,14,9900,9903,14,9929,9933,14,9963,9967,14,9987,9988,14,10006,10006,14,10062,10062,14,10175,10175,14,11744,11775,5,42607,42607,5,43043,43044,7,43263,43263,5,43444,43445,7,43569,43570,5,43698,43700,5,43766,43766,5,44032,44032,11,44144,44144,11,44256,44256,11,44368,44368,11,44480,44480,11,44592,44592,11,44704,44704,11,44816,44816,11,44928,44928,11,45040,45040,11,45152,45152,11,45264,45264,11,45376,45376,11,45488,45488,11,45600,45600,11,45712,45712,11,45824,45824,11,45936,45936,11,46048,46048,11,46160,46160,11,46272,46272,11,46384,46384,11,46496,46496,11,46608,46608,11,46720,46720,11,46832,46832,11,46944,46944,11,47056,47056,11,47168,47168,11,47280,47280,11,47392,47392,11,47504,47504,11,47616,47616,11,47728,47728,11,47840,47840,11,47952,47952,11,48064,48064,11,48176,48176,11,48288,48288,11,48400,48400,11,48512,48512,11,48624,48624,11,48736,48736,11,48848,48848,11,48960,48960,11,49072,49072,11,49184,49184,11,49296,49296,11,49408,49408,11,49520,49520,11,49632,49632,11,49744,49744,11,49856,49856,11,49968,49968,11,50080,50080,11,50192,50192,11,50304,50304,11,50416,50416,11,50528,50528,11,50640,50640,11,50752,50752,11,50864,50864,11,50976,50976,11,51088,51088,11,51200,51200,11,51312,51312,11,51424,51424,11,51536,51536,11,51648,51648,11,51760,51760,11,51872,51872,11,51984,51984,11,52096,52096,11,52208,52208,11,52320,52320,11,52432,52432,11,52544,52544,11,52656,52656,11,52768,52768,11,52880,52880,11,52992,52992,11,53104,53104,11,53216,53216,11,53328,53328,11,53440,53440,11,53552,53552,11,53664,53664,11,53776,53776,11,53888,53888,11,54000,54000,11,54112,54112,11,54224,54224,11,54336,54336,11,54448,54448,11,54560,54560,11,54672,54672,11,54784,54784,11,54896,54896,11,55008,55008,11,55120,55120,11,64286,64286,5,66272,66272,5,68900,68903,5,69762,69762,7,69817,69818,5,69927,69931,5,70003,70003,5,70070,70078,5,70094,70094,7,70194,70195,7,70206,70206,5,70400,70401,5,70463,70463,7,70475,70477,7,70512,70516,5,70722,70724,5,70832,70832,5,70842,70842,5,70847,70848,5,71088,71089,7,71102,71102,7,71219,71226,5,71231,71232,5,71342,71343,7,71453,71455,5,71463,71467,5,71737,71738,5,71995,71996,5,72000,72000,7,72145,72147,7,72160,72160,5,72249,72249,7,72273,72278,5,72330,72342,5,72752,72758,5,72850,72871,5,72882,72883,5,73018,73018,5,73031,73031,5,73109,73109,5,73461,73462,7,94031,94031,5,94192,94193,7,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,126976,126979,14,127184,127231,14,127344,127345,14,127405,127461,14,127514,127514,14,127561,127567,14,127778,127779,14,127896,127896,14,127985,127986,14,127995,127999,5,128326,128328,14,128360,128366,14,128378,128378,14,128394,128397,14,128405,128406,14,128422,128423,14,128435,128443,14,128453,128464,14,128479,128480,14,128484,128487,14,128496,128498,14,128640,128709,14,128723,128724,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129096,129103,14,129292,129292,14,129311,129311,14,129329,129330,14,129344,129349,14,129360,129374,14,129394,129394,14,129402,129402,14,129413,129425,14,129445,129450,14,129466,129471,14,129483,129483,14,129511,129535,14,129653,129655,14,129667,129670,14,129705,129711,14,129731,129743,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2307,2307,7,2366,2368,7,2382,2383,7,2434,2435,7,2497,2500,5,2519,2519,5,2563,2563,7,2631,2632,5,2677,2677,5,2750,2752,7,2763,2764,7,2817,2817,5,2879,2879,5,2891,2892,7,2914,2915,5,3008,3008,5,3021,3021,5,3076,3076,5,3146,3149,5,3202,3203,7,3264,3265,7,3271,3272,7,3298,3299,5,3390,3390,5,3402,3404,7,3426,3427,5,3535,3535,5,3544,3550,7,3635,3635,7,3763,3763,7,3893,3893,5,3953,3966,5,3981,3991,5,4145,4145,7,4157,4158,5,4209,4212,5,4237,4237,5,4520,4607,10,5970,5971,5,6071,6077,5,6089,6099,5,6277,6278,5,6439,6440,5,6451,6456,7,6683,6683,5,6744,6750,5,6765,6770,7,6846,6846,5,6964,6964,5,6972,6972,5,7019,7027,5,7074,7077,5,7083,7085,5,7146,7148,7,7154,7155,7,7222,7223,5,7394,7400,5,7416,7417,5,8204,8204,5,8233,8233,4,8288,8292,4,8413,8416,5,8482,8482,14,8986,8987,14,9193,9203,14,9654,9654,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9775,14,9792,9792,14,9800,9811,14,9825,9826,14,9831,9831,14,9852,9853,14,9872,9873,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9936,9936,14,9941,9960,14,9974,9974,14,9982,9985,14,9992,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10145,10145,14,11013,11015,14,11503,11505,5,12334,12335,5,12951,12951,14,42612,42621,5,43014,43014,5,43047,43047,7,43204,43205,5,43335,43345,5,43395,43395,7,43450,43451,7,43561,43566,5,43573,43574,5,43644,43644,5,43710,43711,5,43758,43759,7,44005,44005,5,44012,44012,7,44060,44060,11,44116,44116,11,44172,44172,11,44228,44228,11,44284,44284,11,44340,44340,11,44396,44396,11,44452,44452,11,44508,44508,11,44564,44564,11,44620,44620,11,44676,44676,11,44732,44732,11,44788,44788,11,44844,44844,11,44900,44900,11,44956,44956,11,45012,45012,11,45068,45068,11,45124,45124,11,45180,45180,11,45236,45236,11,45292,45292,11,45348,45348,11,45404,45404,11,45460,45460,11,45516,45516,11,45572,45572,11,45628,45628,11,45684,45684,11,45740,45740,11,45796,45796,11,45852,45852,11,45908,45908,11,45964,45964,11,46020,46020,11,46076,46076,11,46132,46132,11,46188,46188,11,46244,46244,11,46300,46300,11,46356,46356,11,46412,46412,11,46468,46468,11,46524,46524,11,46580,46580,11,46636,46636,11,46692,46692,11,46748,46748,11,46804,46804,11,46860,46860,11,46916,46916,11,46972,46972,11,47028,47028,11,47084,47084,11,47140,47140,11,47196,47196,11,47252,47252,11,47308,47308,11,47364,47364,11,47420,47420,11,47476,47476,11,47532,47532,11,47588,47588,11,47644,47644,11,47700,47700,11,47756,47756,11,47812,47812,11,47868,47868,11,47924,47924,11,47980,47980,11,48036,48036,11,48092,48092,11,48148,48148,11,48204,48204,11,48260,48260,11,48316,48316,11,48372,48372,11,48428,48428,11,48484,48484,11,48540,48540,11,48596,48596,11,48652,48652,11,48708,48708,11,48764,48764,11,48820,48820,11,48876,48876,11,48932,48932,11,48988,48988,11,49044,49044,11,49100,49100,11,49156,49156,11,49212,49212,11,49268,49268,11,49324,49324,11,49380,49380,11,49436,49436,11,49492,49492,11,49548,49548,11,49604,49604,11,49660,49660,11,49716,49716,11,49772,49772,11,49828,49828,11,49884,49884,11,49940,49940,11,49996,49996,11,50052,50052,11,50108,50108,11,50164,50164,11,50220,50220,11,50276,50276,11,50332,50332,11,50388,50388,11,50444,50444,11,50500,50500,11,50556,50556,11,50612,50612,11,50668,50668,11,50724,50724,11,50780,50780,11,50836,50836,11,50892,50892,11,50948,50948,11,51004,51004,11,51060,51060,11,51116,51116,11,51172,51172,11,51228,51228,11,51284,51284,11,51340,51340,11,51396,51396,11,51452,51452,11,51508,51508,11,51564,51564,11,51620,51620,11,51676,51676,11,51732,51732,11,51788,51788,11,51844,51844,11,51900,51900,11,51956,51956,11,52012,52012,11,52068,52068,11,52124,52124,11,52180,52180,11,52236,52236,11,52292,52292,11,52348,52348,11,52404,52404,11,52460,52460,11,52516,52516,11,52572,52572,11,52628,52628,11,52684,52684,11,52740,52740,11,52796,52796,11,52852,52852,11,52908,52908,11,52964,52964,11,53020,53020,11,53076,53076,11,53132,53132,11,53188,53188,11,53244,53244,11,53300,53300,11,53356,53356,11,53412,53412,11,53468,53468,11,53524,53524,11,53580,53580,11,53636,53636,11,53692,53692,11,53748,53748,11,53804,53804,11,53860,53860,11,53916,53916,11,53972,53972,11,54028,54028,11,54084,54084,11,54140,54140,11,54196,54196,11,54252,54252,11,54308,54308,11,54364,54364,11,54420,54420,11,54476,54476,11,54532,54532,11,54588,54588,11,54644,54644,11,54700,54700,11,54756,54756,11,54812,54812,11,54868,54868,11,54924,54924,11,54980,54980,11,55036,55036,11,55092,55092,11,55148,55148,11,55216,55238,9,65056,65071,5,65529,65531,4,68097,68099,5,68159,68159,5,69446,69456,5,69688,69702,5,69808,69810,7,69815,69816,7,69821,69821,1,69888,69890,5,69932,69932,7,69957,69958,7,70016,70017,5,70067,70069,7,70079,70080,7,70089,70092,5,70095,70095,5,70191,70193,5,70196,70196,5,70198,70199,5,70367,70367,5,70371,70378,5,70402,70403,7,70462,70462,5,70464,70464,5,70471,70472,7,70487,70487,5,70502,70508,5,70709,70711,7,70720,70721,7,70725,70725,7,70750,70750,5,70833,70834,7,70841,70841,7,70843,70844,7,70846,70846,7,70849,70849,7,71087,71087,5,71090,71093,5,71100,71101,5,71103,71104,5,71216,71218,7,71227,71228,7,71230,71230,7,71339,71339,5,71341,71341,5,71344,71349,5,71351,71351,5,71456,71457,7,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123628,123631,5,125252,125258,5,126980,126980,14,127183,127183,14,127245,127247,14,127340,127343,14,127358,127359,14,127377,127386,14,127462,127487,6,127491,127503,14,127535,127535,14,127548,127551,14,127568,127569,14,127744,127777,14,127780,127891,14,127894,127895,14,127897,127899,14,127902,127984,14,127987,127989,14,127991,127994,14,128000,128253,14,128255,128317,14,128329,128334,14,128336,128359,14,128367,128368,14,128371,128377,14,128379,128390,14,128392,128393,14,128398,128399,14,128401,128404,14,128407,128419,14,128421,128421,14,128424,128424,14,128433,128434,14,128444,128444,14,128450,128452,14,128465,128467,14,128476,128478,14,128481,128481,14,128483,128483,14,128488,128488,14,128495,128495,14,128499,128499,14,128506,128591,14,128710,128714,14,128721,128722,14,128725,128725,14,128728,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129664,129666,14,129671,129679,14,129686,129704,14,129712,129718,14,129728,129730,14,129744,129750,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2259,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3134,3136,5,3142,3144,5,3157,3158,5,3201,3201,5,3260,3260,5,3263,3263,5,3266,3266,5,3270,3270,5,3274,3275,7,3285,3286,5,3328,3329,5,3387,3388,5,3391,3392,7,3398,3400,7,3405,3405,5,3415,3415,5,3457,3457,5,3530,3530,5,3536,3537,7,3542,3542,5,3551,3551,5,3633,3633,5,3636,3642,5,3761,3761,5,3764,3772,5,3864,3865,5,3895,3895,5,3902,3903,7,3967,3967,7,3974,3975,5,3993,4028,5,4141,4144,5,4146,4151,5,4155,4156,7,4182,4183,7,4190,4192,5,4226,4226,5,4229,4230,5,4253,4253,5,4448,4519,9,4957,4959,5,5938,5940,5,6002,6003,5,6070,6070,7,6078,6085,7,6087,6088,7,6109,6109,5,6158,6158,4,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6848,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7673,5,8203,8203,4,8205,8205,13,8232,8232,4,8234,8238,4,8265,8265,14,8293,8293,4,8400,8412,5,8417,8417,5,8421,8432,5,8505,8505,14,8617,8618,14,9000,9000,14,9167,9167,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9776,9783,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9935,14,9937,9937,14,9939,9940,14,9961,9962,14,9968,9973,14,9975,9978,14,9981,9981,14,9986,9986,14,9989,9989,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10084,14,10133,10135,14,10160,10160,14,10548,10549,14,11035,11036,14,11093,11093,14,11647,11647,5,12330,12333,5,12336,12336,14,12441,12442,5,12953,12953,14,42608,42610,5,42654,42655,5,43010,43010,5,43019,43019,5,43045,43046,5,43052,43052,5,43188,43203,7,43232,43249,5,43302,43309,5,43346,43347,7,43392,43394,5,43443,43443,5,43446,43449,5,43452,43453,5,43493,43493,5,43567,43568,7,43571,43572,7,43587,43587,5,43597,43597,7,43696,43696,5,43703,43704,5,43713,43713,5,43756,43757,5,43765,43765,7,44003,44004,7,44006,44007,7,44009,44010,7,44013,44013,5,44033,44059,12,44061,44087,12,44089,44115,12,44117,44143,12,44145,44171,12,44173,44199,12,44201,44227,12,44229,44255,12,44257,44283,12,44285,44311,12,44313,44339,12,44341,44367,12,44369,44395,12,44397,44423,12,44425,44451,12,44453,44479,12,44481,44507,12,44509,44535,12,44537,44563,12,44565,44591,12,44593,44619,12,44621,44647,12,44649,44675,12,44677,44703,12,44705,44731,12,44733,44759,12,44761,44787,12,44789,44815,12,44817,44843,12,44845,44871,12,44873,44899,12,44901,44927,12,44929,44955,12,44957,44983,12,44985,45011,12,45013,45039,12,45041,45067,12,45069,45095,12,45097,45123,12,45125,45151,12,45153,45179,12,45181,45207,12,45209,45235,12,45237,45263,12,45265,45291,12,45293,45319,12,45321,45347,12,45349,45375,12,45377,45403,12,45405,45431,12,45433,45459,12,45461,45487,12,45489,45515,12,45517,45543,12,45545,45571,12,45573,45599,12,45601,45627,12,45629,45655,12,45657,45683,12,45685,45711,12,45713,45739,12,45741,45767,12,45769,45795,12,45797,45823,12,45825,45851,12,45853,45879,12,45881,45907,12,45909,45935,12,45937,45963,12,45965,45991,12,45993,46019,12,46021,46047,12,46049,46075,12,46077,46103,12,46105,46131,12,46133,46159,12,46161,46187,12,46189,46215,12,46217,46243,12,46245,46271,12,46273,46299,12,46301,46327,12,46329,46355,12,46357,46383,12,46385,46411,12,46413,46439,12,46441,46467,12,46469,46495,12,46497,46523,12,46525,46551,12,46553,46579,12,46581,46607,12,46609,46635,12,46637,46663,12,46665,46691,12,46693,46719,12,46721,46747,12,46749,46775,12,46777,46803,12,46805,46831,12,46833,46859,12,46861,46887,12,46889,46915,12,46917,46943,12,46945,46971,12,46973,46999,12,47001,47027,12,47029,47055,12,47057,47083,12,47085,47111,12,47113,47139,12,47141,47167,12,47169,47195,12,47197,47223,12,47225,47251,12,47253,47279,12,47281,47307,12,47309,47335,12,47337,47363,12,47365,47391,12,47393,47419,12,47421,47447,12,47449,47475,12,47477,47503,12,47505,47531,12,47533,47559,12,47561,47587,12,47589,47615,12,47617,47643,12,47645,47671,12,47673,47699,12,47701,47727,12,47729,47755,12,47757,47783,12,47785,47811,12,47813,47839,12,47841,47867,12,47869,47895,12,47897,47923,12,47925,47951,12,47953,47979,12,47981,48007,12,48009,48035,12,48037,48063,12,48065,48091,12,48093,48119,12,48121,48147,12,48149,48175,12,48177,48203,12,48205,48231,12,48233,48259,12,48261,48287,12,48289,48315,12,48317,48343,12,48345,48371,12,48373,48399,12,48401,48427,12,48429,48455,12,48457,48483,12,48485,48511,12,48513,48539,12,48541,48567,12,48569,48595,12,48597,48623,12,48625,48651,12,48653,48679,12,48681,48707,12,48709,48735,12,48737,48763,12,48765,48791,12,48793,48819,12,48821,48847,12,48849,48875,12,48877,48903,12,48905,48931,12,48933,48959,12,48961,48987,12,48989,49015,12,49017,49043,12,49045,49071,12,49073,49099,12,49101,49127,12,49129,49155,12,49157,49183,12,49185,49211,12,49213,49239,12,49241,49267,12,49269,49295,12,49297,49323,12,49325,49351,12,49353,49379,12,49381,49407,12,49409,49435,12,49437,49463,12,49465,49491,12,49493,49519,12,49521,49547,12,49549,49575,12,49577,49603,12,49605,49631,12,49633,49659,12,49661,49687,12,49689,49715,12,49717,49743,12,49745,49771,12,49773,49799,12,49801,49827,12,49829,49855,12,49857,49883,12,49885,49911,12,49913,49939,12,49941,49967,12,49969,49995,12,49997,50023,12,50025,50051,12,50053,50079,12,50081,50107,12,50109,50135,12,50137,50163,12,50165,50191,12,50193,50219,12,50221,50247,12,50249,50275,12,50277,50303,12,50305,50331,12,50333,50359,12,50361,50387,12,50389,50415,12,50417,50443,12,50445,50471,12,50473,50499,12,50501,50527,12,50529,50555,12,50557,50583,12,50585,50611,12,50613,50639,12,50641,50667,12,50669,50695,12,50697,50723,12,50725,50751,12,50753,50779,12,50781,50807,12,50809,50835,12,50837,50863,12,50865,50891,12,50893,50919,12,50921,50947,12,50949,50975,12,50977,51003,12,51005,51031,12,51033,51059,12,51061,51087,12,51089,51115,12,51117,51143,12,51145,51171,12,51173,51199,12,51201,51227,12,51229,51255,12,51257,51283,12,51285,51311,12,51313,51339,12,51341,51367,12,51369,51395,12,51397,51423,12,51425,51451,12,51453,51479,12,51481,51507,12,51509,51535,12,51537,51563,12,51565,51591,12,51593,51619,12,51621,51647,12,51649,51675,12,51677,51703,12,51705,51731,12,51733,51759,12,51761,51787,12,51789,51815,12,51817,51843,12,51845,51871,12,51873,51899,12,51901,51927,12,51929,51955,12,51957,51983,12,51985,52011,12,52013,52039,12,52041,52067,12,52069,52095,12,52097,52123,12,52125,52151,12,52153,52179,12,52181,52207,12,52209,52235,12,52237,52263,12,52265,52291,12,52293,52319,12,52321,52347,12,52349,52375,12,52377,52403,12,52405,52431,12,52433,52459,12,52461,52487,12,52489,52515,12,52517,52543,12,52545,52571,12,52573,52599,12,52601,52627,12,52629,52655,12,52657,52683,12,52685,52711,12,52713,52739,12,52741,52767,12,52769,52795,12,52797,52823,12,52825,52851,12,52853,52879,12,52881,52907,12,52909,52935,12,52937,52963,12,52965,52991,12,52993,53019,12,53021,53047,12,53049,53075,12,53077,53103,12,53105,53131,12,53133,53159,12,53161,53187,12,53189,53215,12,53217,53243,12,53245,53271,12,53273,53299,12,53301,53327,12,53329,53355,12,53357,53383,12,53385,53411,12,53413,53439,12,53441,53467,12,53469,53495,12,53497,53523,12,53525,53551,12,53553,53579,12,53581,53607,12,53609,53635,12,53637,53663,12,53665,53691,12,53693,53719,12,53721,53747,12,53749,53775,12,53777,53803,12,53805,53831,12,53833,53859,12,53861,53887,12,53889,53915,12,53917,53943,12,53945,53971,12,53973,53999,12,54001,54027,12,54029,54055,12,54057,54083,12,54085,54111,12,54113,54139,12,54141,54167,12,54169,54195,12,54197,54223,12,54225,54251,12,54253,54279,12,54281,54307,12,54309,54335,12,54337,54363,12,54365,54391,12,54393,54419,12,54421,54447,12,54449,54475,12,54477,54503,12,54505,54531,12,54533,54559,12,54561,54587,12,54589,54615,12,54617,54643,12,54645,54671,12,54673,54699,12,54701,54727,12,54729,54755,12,54757,54783,12,54785,54811,12,54813,54839,12,54841,54867,12,54869,54895,12,54897,54923,12,54925,54951,12,54953,54979,12,54981,55007,12,55009,55035,12,55037,55063,12,55065,55091,12,55093,55119,12,55121,55147,12,55149,55175,12,55177,55203,12,55243,55291,10,65024,65039,5,65279,65279,4,65520,65528,4,66045,66045,5,66422,66426,5,68101,68102,5,68152,68154,5,68325,68326,5,69291,69292,5,69632,69632,7,69634,69634,7,69759,69761,5]")}ee._INSTANCE=null},"407e":function(e,t,i){var n=i("53c2");t=n(!1),t.push([e.i,".monaco-tl-row{display:-webkit-box;display:-ms-flexbox;display:flex;height:100%;-webkit-box-align:center;-ms-flex-align:center;align-items:center;position:relative}.monaco-tl-indent{height:100%;position:absolute;top:0;left:16px;pointer-events:none}.hide-arrows .monaco-tl-indent{left:12px}.monaco-tl-indent>.indent-guide{display:inline-block;-webkit-box-sizing:border-box;box-sizing:border-box;height:100%;border-left:1px solid transparent;-webkit-transition:border-color .1s linear;transition:border-color .1s linear}.monaco-tl-contents,.monaco-tl-twistie{height:100%}.monaco-tl-twistie{font-size:10px;text-align:right;padding-right:6px;-ms-flex-negative:0;flex-shrink:0;width:16px;display:-webkit-box!important;display:-ms-flexbox!important;display:flex!important;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;color:inherit!important;-webkit-transform:translateX(3px);transform:translateX(3px)}.monaco-tl-contents{-webkit-box-flex:1;-ms-flex:1;flex:1;overflow:hidden}.monaco-tl-twistie.collapsed:before{-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.monaco-tl-twistie.codicon-tree-item-loading:before{-webkit-animation:codicon-spin 1.25s steps(30) infinite;animation:codicon-spin 1.25s steps(30) infinite}",""]),e.exports=t},"40cd":function(e,t,i){var n=i("6baf");n("iterator")},"42b1":function(e,t,i){var n=i("55ab"),o=i("11b0"),r=i("4d82"),s=i("45ad"),a=i("7f82"),l=i("fe32"),c=i("bf6f"),h=Object.getOwnPropertyDescriptor;t.f=n?h:function(e,t){if(e=s(e),t=a(t,!0),c)try{return h(e,t)}catch(i){}if(l(e,t))return r(!o.f.call(e,t),e[t])}},4467:function(e,t,i){var n=i("ac97");e.exports=!n((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},"45ad":function(e,t,i){var n=i("b4fd"),o=i("0874");e.exports=function(e){return n(o(e))}},4792:function(e,t,i){"use strict";var n=i("9b09"),o=i.n(n);o.a},4974:function(e,t,i){"use strict";function n(e,t){for(var i=[],n={},o=0;o<t.length;o++){var r=t[o],s=r[0],a=r[1],l=r[2],c=r[3],h={id:e+":"+o,css:a,media:l,sourceMap:c};n[s]?n[s].parts.push(h):i.push(n[s]={id:s,parts:[h]})}return i}i.r(t),i.d(t,"default",(function(){return f}));var o="undefined"!==typeof document;if("undefined"!==typeof DEBUG&&DEBUG&&!o)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var r={},s=o&&(document.head||document.getElementsByTagName("head")[0]),a=null,l=0,c=!1,h=function(){},d=null,u="data-vue-ssr-id",g="undefined"!==typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());function f(e,t,i,o){c=i,d=o||{};var s=n(e,t);return m(s),function(t){for(var i=[],o=0;o<s.length;o++){var a=s[o],l=r[a.id];l.refs--,i.push(l)}t?(s=n(e,t),m(s)):s=[];for(o=0;o<i.length;o++){l=i[o];if(0===l.refs){for(var c=0;c<l.parts.length;c++)l.parts[c]();delete r[l.id]}}}}function m(e){for(var t=0;t<e.length;t++){var i=e[t],n=r[i.id];if(n){n.refs++;for(var o=0;o<n.parts.length;o++)n.parts[o](i.parts[o]);for(;o<i.parts.length;o++)n.parts.push(_(i.parts[o]));n.parts.length>i.parts.length&&(n.parts.length=i.parts.length)}else{var s=[];for(o=0;o<i.parts.length;o++)s.push(_(i.parts[o]));r[i.id]={id:i.id,refs:1,parts:s}}}}function p(){var e=document.createElement("style");return e.type="text/css",s.appendChild(e),e}function _(e){var t,i,n=document.querySelector("style["+u+'~="'+e.id+'"]');if(n){if(c)return h;n.parentNode.removeChild(n)}if(g){var o=l++;n=a||(a=p()),t=v.bind(null,n,o,!1),i=v.bind(null,n,o,!0)}else n=p(),t=w.bind(null,n),i=function(){n.parentNode.removeChild(n)};return t(e),function(n){if(n){if(n.css===e.css&&n.media===e.media&&n.sourceMap===e.sourceMap)return;t(e=n)}else i()}}var b=function(){var e=[];return function(t,i){return e[t]=i,e.filter(Boolean).join("\n")}}();function v(e,t,i,n){var o=i?"":n.css;if(e.styleSheet)e.styleSheet.cssText=b(t,o);else{var r=document.createTextNode(o),s=e.childNodes;s[t]&&e.removeChild(s[t]),s.length?e.insertBefore(r,s[t]):e.appendChild(r)}}function w(e,t){var i=t.css,n=t.media,o=t.sourceMap;if(n&&e.setAttribute("media",n),d.ssrId&&e.setAttribute(u,t.id),o&&(i+="\n/*# sourceURL="+o.sources[0]+" */",i+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */"),e.styleSheet)e.styleSheet.cssText=i;else{while(e.firstChild)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(i))}}},"4ad5":function(e,t,i){var n=i("2273");e.exports=/(iphone|ipod|ipad).*applewebkit/i.test(n)},"4cdd":function(e,t,i){var n=i("53c2");t=n(!1),t.push([e.i,".monaco-action-bar{text-align:right;white-space:nowrap}.monaco-action-bar .actions-container{display:-webkit-box;display:-ms-flexbox;display:flex;margin:0 auto;padding:0;width:100%;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}.monaco-action-bar.vertical .actions-container{display:inline-block}.monaco-action-bar.reverse .actions-container{-webkit-box-orient:horizontal;-webkit-box-direction:reverse;-ms-flex-direction:row-reverse;flex-direction:row-reverse}.monaco-action-bar .action-item{cursor:pointer;display:inline-block;-webkit-transition:-webkit-transform 50ms ease;transition:-webkit-transform 50ms ease;transition:transform 50ms ease;transition:transform 50ms ease,-webkit-transform 50ms ease;position:relative}.monaco-action-bar .action-item.disabled{cursor:default}.monaco-action-bar.animated .action-item.active{-webkit-transform:scale(1.272019649);transform:scale(1.272019649)}.monaco-action-bar .action-item .codicon,.monaco-action-bar .action-item .icon{display:inline-block}.monaco-action-bar .action-item .codicon{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.monaco-action-bar .action-label{font-size:11px;margin-right:4px}.monaco-action-bar .action-item.disabled .action-label,.monaco-action-bar .action-item.disabled .action-label:hover{opacity:.4}.monaco-action-bar.vertical{text-align:left}.monaco-action-bar.vertical .action-item{display:block}.monaco-action-bar.vertical .action-label.separator{display:block;border-bottom:1px solid #bbb;padding-top:1px;margin-left:.8em;margin-right:.8em}.monaco-action-bar.animated.vertical .action-item.active{-webkit-transform:translate(5px);transform:translate(5px)}.secondary-actions .monaco-action-bar .action-label{margin-left:6px}.monaco-action-bar .action-item.select-container{overflow:hidden;-webkit-box-flex:1;-ms-flex:1;flex:1;max-width:170px;min-width:60px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;margin-right:10px}",""]),e.exports=t},"4d82":function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},"4e70":function(e,t,i){var n=i("53c2");t=n(!1),t.push([e.i,"::-ms-clear{display:none}.monaco-editor .editor-widget input{color:inherit}.monaco-editor{position:relative;overflow:visible;-webkit-text-size-adjust:100%}.monaco-editor .overflow-guard{position:relative;overflow:hidden}.monaco-editor .view-overlays{position:absolute;top:0}",""]),e.exports=t},"4eaf":function(e,t,i){var n=i("80db"),o=i("0874"),r=function(e){return function(t,i){var r,s,a=String(o(t)),l=n(i),c=a.length;return l<0||l>=c?e?"":void 0:(r=a.charCodeAt(l),r<55296||r>56319||l+1===c||(s=a.charCodeAt(l+1))<56320||s>57343?e?a.charAt(l):r:e?a.slice(l,l+2):s-56320+(r-55296<<10)+65536)}};e.exports={codeAt:r(!1),charAt:r(!0)}},"4fe1":function(e,t,i){var n=i("e244");e.exports=function(e,t){var i=n.console;i&&i.error&&(1===arguments.length?i.error(e):i.error(e,t))}},5069:function(e,t,i){"use strict";if(i.r(t),"undefined"!==typeof window){var n=window.document.currentScript,o=i("2717");n=o(),"currentScript"in document||Object.defineProperty(document,"currentScript",{get:o});var r=n&&n.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);r&&(i.p=r[1])}i("84f7"),i("8d60");var s=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",[i("el-form-item",{attrs:{label:"标题宽度"}},[i("el-input",{attrs:{placeholder:"标题宽度"},model:{value:e.data.labelWidth,callback:function(t){e.$set(e.data,"labelWidth",t)},expression:"data.labelWidth"}})],1),e._v(" 自定义属性 "),i("monaco-editor",{attrs:{height:"300",keyIndex:e.data.prop,options:e.options},model:{value:e.params,callback:function(t){e.params=t},expression:"params"}}),e._v(" 自定义事件 "),i("monaco-editor",{attrs:{height:"300",keyIndex:e.data.prop,options:e.options},model:{value:e.event,callback:function(t){e.event=t},expression:"event"}}),i("el-form-item",{attrs:{label:"是否禁用"}},[i("el-switch",{model:{value:e.data.disabled,callback:function(t){e.$set(e.data,"disabled",t)},expression:"data.disabled"}})],1),i("el-form-item",{attrs:{label:"是否可见"}},[i("el-switch",{model:{value:e.data.display,callback:function(t){e.$set(e.data,"display",t)},expression:"data.display"}})],1)],1)},a=[],l=i("c293"),c=l["a"],h=i("e3d4"),d=Object(h["a"])(c,s,a,!1,null,null,null),u=d.exports,g=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",[i("el-form-item",{attrs:{label:"占位内容"}},[i("el-input",{attrs:{placeholder:"占位内容"},model:{value:e.data.placeholder,callback:function(t){e.$set(e.data,"placeholder",t)},expression:"data.placeholder"}})],1),i("el-form-item",{attrs:{label:"默认值"}},[i("el-input",{attrs:{placeholder:"默认值"},model:{value:e.data.value,callback:function(t){e.$set(e.data,"value",t)},expression:"data.value"}})],1),i("el-form-item",{attrs:{label:"前缀"}},[i("el-input",{attrs:{placeholder:"前缀"},model:{value:e.data.prepend,callback:function(t){e.$set(e.data,"prepend",t)},expression:"data.prepend"}})],1),i("el-form-item",{attrs:{label:"后缀"}},[i("el-input",{attrs:{placeholder:"后缀"},model:{value:e.data.append,callback:function(t){e.$set(e.data,"append",t)},expression:"data.append"}})],1),i("el-form-item",{attrs:{label:"最大长度"}},[i("el-input-number",{attrs:{"controls-position":"right",placeholder:"最大长度"},model:{value:e.data.maxlength,callback:function(t){e.$set(e.data,"maxlength",t)},expression:"data.maxlength"}})],1),"password"!=e.data.type?i("el-form-item",{attrs:{label:"显示计数"}},[i("el-switch",{model:{value:e.data.showWordLimit,callback:function(t){e.$set(e.data,"showWordLimit",t)},expression:"data.showWordLimit"}})],1):e._e(),"password"==e.data.type?i("el-form-item",{attrs:{label:"显示密码"}},[i("el-switch",{model:{value:e.data.showPassword,callback:function(t){e.$set(e.data,"showPassword",t)},expression:"data.showPassword"}})],1):e._e(),i("el-form-item",{attrs:{label:"是否只读"}},[i("el-switch",{model:{value:e.data.readonly,callback:function(t){e.$set(e.data,"readonly",t)},expression:"data.readonly"}})],1),i("el-form-item",{attrs:{label:"是否可见"}},[i("el-switch",{model:{value:e.data.display,callback:function(t){e.$set(e.data,"display",t)},expression:"data.display"}})],1),i("el-form-item",{attrs:{label:"校验"}},[i("br"),e._v(" 是否必填: "),i("el-switch",{model:{value:e.data.required,callback:function(t){e.$set(e.data,"required",t)},expression:"data.required"}}),i("el-input",{attrs:{placeholder:"正则表达式"},model:{value:e.data.pattern,callback:function(t){e.$set(e.data,"pattern",t)},expression:"data.pattern"}})],1)],1)},f=[],m=(i("eb46"),i("ef61"),i("f54f"),i("2eb0"),i("f05e"),i("f96e"),{name:"config-input",props:["data"],data:function(){return{validator:{type:null,required:null,pattern:null,length:null}}},methods:{generateRule:function(){var e=this,t=[];Object.keys(this.validator).forEach((function(i){e.validator[i]&&t.push(e.validator[i])})),this.data.rules=t}},watch:{"data.required":function(e){this.validator.required=e?{required:!0,message:"".concat(this.data.label,"必须填写")}:null,this.generateRule()},"data.pattern":function(e){this.validator.pattern=e?{pattern:new RegExp(e),message:"".concat(this.data.label,"格式不匹配")}:null,this.generateRule()}}}),p=m,_=Object(h["a"])(p,g,f,!1,null,null,null),b=_.exports,v=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",[i("el-form-item",{attrs:{label:"占位内容"}},[i("el-input",{attrs:{placeholder:"占位内容"},model:{value:e.data.placeholder,callback:function(t){e.$set(e.data,"placeholder",t)},expression:"data.placeholder"}})],1),i("el-form-item",{attrs:{label:"默认值"}},[i("el-input",{attrs:{placeholder:"默认值"},model:{value:e.data.value,callback:function(t){e.$set(e.data,"value",t)},expression:"data.value"}})],1),i("el-form-item",{attrs:{label:"最大长度"}},[i("el-input-number",{attrs:{"controls-position":"right",placeholder:"最大长度"},model:{value:e.data.maxlength,callback:function(t){e.$set(e.data,"maxlength",t)},expression:"data.maxlength"}})],1),i("el-form-item",{attrs:{label:"显示计数"}},[i("el-switch",{model:{value:e.data.showWordLimit,callback:function(t){e.$set(e.data,"showWordLimit",t)},expression:"data.showWordLimit"}})],1),i("el-form-item",{attrs:{label:"最小行"}},[i("el-input-number",{attrs:{"controls-position":"right",placeholder:"最小行",min:1},model:{value:e.data.minRows,callback:function(t){e.$set(e.data,"minRows",t)},expression:"data.minRows"}})],1),i("el-form-item",{attrs:{label:"最大行"}},[i("el-input-number",{attrs:{"controls-position":"right",placeholder:"最大行",min:2},model:{value:e.data.maxRows,callback:function(t){e.$set(e.data,"maxRows",t)},expression:"data.maxRows"}})],1),i("el-form-item",{attrs:{label:"是否只读"}},[i("el-switch",{model:{value:e.data.readonly,callback:function(t){e.$set(e.data,"readonly",t)},expression:"data.readonly"}})],1),i("el-form-item",{attrs:{label:"是否可见"}},[i("el-switch",{model:{value:e.data.display,callback:function(t){e.$set(e.data,"display",t)},expression:"data.display"}})],1),i("el-form-item",{attrs:{label:"校验"}},[i("br"),e._v(" 是否必填: "),i("el-switch",{model:{value:e.data.required,callback:function(t){e.$set(e.data,"required",t)},expression:"data.required"}}),i("el-input",{attrs:{placeholder:"正则表达式"},model:{value:e.data.pattern,callback:function(t){e.$set(e.data,"pattern",t)},expression:"data.pattern"}})],1)],1)},w=[],C={name:"config-textarea",props:["data"],data:function(){return{validator:{type:null,required:null,pattern:null,length:null}}},methods:{generateRule:function(){var e=this,t=[];Object.keys(this.validator).forEach((function(i){e.validator[i]&&t.push(e.validator[i])})),this.data.rules=t}},watch:{"data.required":function(e){this.validator.required=e?{required:!0,message:"".concat(this.data.label,"必须填写")}:null,this.generateRule()},"data.pattern":function(e){this.validator.pattern=e?{pattern:new RegExp(e),message:"".concat(this.data.label,"格式不匹配")}:null,this.generateRule()}}},y=C,S=Object(h["a"])(y,v,w,!1,null,null,null),x=S.exports,L=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",[i("el-form-item",{attrs:{label:"占位内容"}},[i("el-input",{attrs:{placeholder:"占位内容"},model:{value:e.data.placeholder,callback:function(t){e.$set(e.data,"placeholder",t)},expression:"data.placeholder"}})],1),i("el-form-item",{attrs:{label:"默认值"}},[i("el-input",{attrs:{placeholder:"默认值"},model:{value:e.data.value,callback:function(t){e.$set(e.data,"value",t)},expression:"data.value"}})],1),i("el-form-item",{attrs:{label:"最小值"}},[i("el-input-number",{attrs:{"controls-position":"right",placeholder:"最小值"},model:{value:e.data.minRows,callback:function(t){e.$set(e.data,"minRows",t)},expression:"data.minRows"}})],1),i("el-form-item",{attrs:{label:"最大值"}},[i("el-input-number",{attrs:{"controls-position":"right",placeholder:"最大值"},model:{value:e.data.maxRows,callback:function(t){e.$set(e.data,"maxRows",t)},expression:"data.maxRows"}})],1),i("el-form-item",{attrs:{label:"步长"}},[i("el-input-number",{attrs:{"controls-position":"right",placeholder:"步长"},model:{value:e.data.step,callback:function(t){e.$set(e.data,"step",t)},expression:"data.step"}})],1),i("el-form-item",{attrs:{label:"数值精度"}},[i("el-input-number",{attrs:{"controls-position":"right",placeholder:"数值精度",min:0,max:10},model:{value:e.data.precision,callback:function(t){e.$set(e.data,"precision",t)},expression:"data.precision"}})],1),i("el-form-item",{attrs:{label:"开启控制器"}},[i("el-switch",{model:{value:e.data.controls,callback:function(t){e.$set(e.data,"controls",t)},expression:"data.controls"}})],1),e.data.controls?i("el-form-item",{attrs:{label:"控制器位置"}},[i("el-radio",{attrs:{label:""},model:{value:e.data.controlsPosition,callback:function(t){e.$set(e.data,"controlsPosition",t)},expression:"data.controlsPosition"}},[e._v("默认 ")]),i("el-radio",{attrs:{label:"right"},model:{value:e.data.controlsPosition,callback:function(t){e.$set(e.data,"controlsPosition",t)},expression:"data.controlsPosition"}},[e._v("右 ")])],1):e._e(),i("el-form-item",{attrs:{label:"是否只读"}},[i("el-switch",{model:{value:e.data.readonly,callback:function(t){e.$set(e.data,"readonly",t)},expression:"data.readonly"}})],1),i("el-form-item",{attrs:{label:"是否可见"}},[i("el-switch",{model:{value:e.data.display,callback:function(t){e.$set(e.data,"display",t)},expression:"data.display"}})],1),i("el-form-item",{attrs:{label:"校验"}},[i("br"),e._v(" 是否必填: "),i("el-switch",{model:{value:e.data.required,callback:function(t){e.$set(e.data,"required",t)},expression:"data.required"}}),i("el-input",{attrs:{placeholder:"正则表达式"},model:{value:e.data.pattern,callback:function(t){e.$set(e.data,"pattern",t)},expression:"data.pattern"}})],1)],1)},k=[],E={name:"config-number",props:["data"],data:function(){return{validator:{type:null,required:null,pattern:null,length:null}}},methods:{generateRule:function(){var e=this,t=[];Object.keys(this.validator).forEach((function(i){e.validator[i]&&t.push(e.validator[i])})),this.data.rules=t}},watch:{"data.required":function(e){this.validator.required=e?{required:!0,message:"".concat(this.data.label,"必须填写")}:null,this.generateRule()},"data.pattern":function(e){this.validator.pattern=e?{pattern:new RegExp(e),message:"".concat(this.data.label,"格式不匹配")}:null,this.generateRule()}}},D=E,N=Object(h["a"])(D,L,k,!1,null,null,null),T=N.exports,M=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",[i("el-form-item",{attrs:{label:"对齐方式"}},[i("el-select",{attrs:{placeholder:"对齐方式"},model:{value:e.data.children.align,callback:function(t){e.$set(e.data.children,"align",t)},expression:"data.children.align"}},[i("el-option",{attrs:{label:"居左",value:"left"}}),i("el-option",{attrs:{label:"居中",value:"center"}}),i("el-option",{attrs:{label:"居右",value:"right"}})],1)],1),i("el-form-item",{attrs:{label:"头部对齐方式"}},[i("el-select",{attrs:{placeholder:"对齐方式"},model:{value:e.data.children.headerAlign,callback:function(t){e.$set(e.data.children,"headerAlign",t)},expression:"data.children.headerAlign"}},[i("el-option",{attrs:{label:"居左",value:"left"}}),i("el-option",{attrs:{label:"居中",value:"center"}}),i("el-option",{attrs:{label:"居右",value:"right"}})],1)],1),i("el-form-item",{attrs:{label:"表单格式"}},[i("el-select",{attrs:{placeholder:"表单格式"},model:{value:e.data.children.type,callback:function(t){e.$set(e.data.children,"type",t)},expression:"data.children.type"}},[i("el-option",{attrs:{label:"表格",value:""}}),i("el-option",{attrs:{label:"表单",value:"form"}})],1)],1),"form"==e.data.children.type?i("el-form-item",{attrs:{label:"序号"}},[i("el-switch",{model:{value:e.data.children.index,callback:function(t){e.$set(e.data.children,"index",t)},expression:"data.children.index"}})],1):e._e(),i("el-form-item",{attrs:{label:"添加按钮"}},[i("el-switch",{model:{value:e.data.children.addBtn,callback:function(t){e.$set(e.data.children,"addBtn",t)},expression:"data.children.addBtn"}})],1),i("el-form-item",{attrs:{label:"删除按钮"}},[i("el-switch",{model:{value:e.data.children.delBtn,callback:function(t){e.$set(e.data.children,"delBtn",t)},expression:"data.children.delBtn"}})],1),i("el-form-item",{attrs:{label:"是否只读"}},[i("el-switch",{model:{value:e.data.readonly,callback:function(t){e.$set(e.data,"readonly",t)},expression:"data.readonly"}})],1),i("el-form-item",{attrs:{label:"是否禁用"}},[i("el-switch",{model:{value:e.data.disabled,callback:function(t){e.$set(e.data,"disabled",t)},expression:"data.disabled"}})],1),i("el-form-item",{attrs:{label:"是否可见"}},[i("el-switch",{model:{value:e.data.display,callback:function(t){e.$set(e.data,"display",t)},expression:"data.display"}})],1)],1)},I=[],O={name:"config-dynamic",props:["data"]},A=O,R=Object(h["a"])(A,M,I,!1,null,null,null),P=R.exports,F=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",[i("el-form-item",{attrs:{label:"默认值"}},[i("el-input",{attrs:{placeholder:"默认值"},model:{value:e.data.value,callback:function(t){e.$set(e.data,"value",t)},expression:"data.value"}})],1),i("el-form-item",{attrs:{label:"自定义"}},[i("el-button",{staticClass:"danger",attrs:{type:"text"},on:{click:e.handleDicClear}},[e._v("清空 ")]),e._l(e.data.dicData,(function(t,n){return i("div",{key:n,staticClass:"dic"},[i("el-input",{staticStyle:{"margin-right":"5px"},attrs:{size:"mini",placeholder:"自定义文字"},model:{value:t.label,callback:function(i){e.$set(t,"label",i)},expression:"item.label"}}),i("el-input",{attrs:{size:"mini",placeholder:"自定义值"},model:{value:t.value,callback:function(i){e.$set(t,"value",i)},expression:"item.value"}})],1)}))],2),i("el-form-item",{attrs:{label:"是否禁用"}},[i("el-switch",{model:{value:e.data.disabled,callback:function(t){e.$set(e.data,"disabled",t)},expression:"data.disabled"}})],1),i("el-form-item",{attrs:{label:"是否可见"}},[i("el-switch",{model:{value:e.data.display,callback:function(t){e.$set(e.data,"display",t)},expression:"data.display"}})],1)],1)},W=[],B={name:"config-switch",props:["data"],methods:{handleDicClear:function(){this.data.dicData=[{label:"",value:"0"},{label:"",value:"1"}]}}},V=B,H=(i("fab5"),Object(h["a"])(V,F,W,!1,null,"727980f3",null)),z=H.exports,U=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",[i("el-form-item",{attrs:{label:"默认值"}},[i("el-input",{attrs:{placeholder:"默认值"},model:{value:e.data.value,callback:function(t){e.$set(e.data,"value",t)},expression:"data.value"}})],1),i("el-form-item",{attrs:{label:"最大星数"}},[i("el-input-number",{attrs:{"controls-position":"right",placeholder:"最大星数"},model:{value:e.data.max,callback:function(t){e.$set(e.data,"max",t)},expression:"data.max"}})],1),i("el-form-item",{attrs:{label:"是否显示文本"}},[i("el-switch",{model:{value:e.data.showText,callback:function(t){e.$set(e.data,"showText",t)},expression:"data.showText"}})],1),e.data.showText?i("el-form-item",{attrs:{label:"自定义文本"}},[e._l(e.data.texts,(function(t,n){return i("el-tag",{key:n,attrs:{closable:""},on:{close:function(i){return e.handleTextClose(t)}}},[e._v(e._s(t)+" ")])})),e.textVisible?i("el-input",{ref:"textTag",staticClass:"input-new-tag",attrs:{size:"mini"},on:{blur:e.handleTextConfirm},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleTextConfirm(t)}},model:{value:e.textValue,callback:function(t){e.textValue=t},expression:"textValue"}}):i("el-button",{staticStyle:{"margin-left":"5px"},attrs:{size:"mini",icon:"el-icon-plus",circle:""},on:{click:e.showTextInput}})],2):e._e(),i("el-form-item",{attrs:{label:"自定义颜色"}},[e._l(e.data.colors,(function(t,n){return i("el-tag",{key:n,style:{color:t},attrs:{closable:""},on:{close:function(i){return e.handleColorClose(t)}}},[e._v(e._s(t)+" ")])})),i("el-color-picker",{staticClass:"color-picker",attrs:{size:"mini"},on:{change:e.handleColorConfirm},model:{value:e.colorValue,callback:function(t){e.colorValue=t},expression:"colorValue"}})],2),i("el-form-item",{attrs:{label:"是否禁用"}},[i("el-switch",{model:{value:e.data.disabled,callback:function(t){e.$set(e.data,"disabled",t)},expression:"data.disabled"}})],1),i("el-form-item",{attrs:{label:"是否可见"}},[i("el-switch",{model:{value:e.data.display,callback:function(t){e.$set(e.data,"display",t)},expression:"data.display"}})],1),i("el-form-item",{attrs:{label:"是否必填"}},[i("el-switch",{model:{value:e.data.required,callback:function(t){e.$set(e.data,"required",t)},expression:"data.required"}})],1)],1)},j=[],K=(i("6edd"),i("d927"),{name:"config-rate",props:["data"],data:function(){return{validator:{type:null,required:null,pattern:null,length:null},textVisible:!1,textValue:"",colorVisible:!1,colorValue:"",iconVisible:!1,iconValue:""}},methods:{generateRule:function(){var e=this,t=[];Object.keys(this.validator).forEach((function(i){e.validator[i]&&t.push(e.validator[i])})),this.data.rules=t},handleTextClose:function(e){this.data.texts.splice(this.data.texts.indexOf(e),1)},showTextInput:function(){var e=this;this.textVisible=!0,this.$nextTick((function(){e.$refs.textTag.$refs.input.focus()}))},handleTextConfirm:function(){this.textValue&&this.data.texts.push(this.textValue),this.textVisible=!1,this.textValue=""},handleColorClose:function(e){this.data.colors.splice(this.data.colors.indexOf(e),1)},handleColorConfirm:function(){this.colorValue&&this.data.colors.push(this.colorValue),this.colorValue=""}},watch:{"data.required":function(e){this.validator.required=e?{required:!0,message:"".concat(this.data.label,"必须填写")}:null,this.generateRule()}}}),q=K,$=(i("b1b6"),Object(h["a"])(q,U,j,!1,null,"ccc30782",null)),G=$.exports,Y=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",[i("el-form-item",{attrs:{label:"默认值"}},[i("el-input",{attrs:{placeholder:"默认值"},model:{value:e.data.value,callback:function(t){e.$set(e.data,"value",t)},expression:"data.value"}})],1),i("el-form-item",{attrs:{label:"最小值"}},[i("el-input-number",{attrs:{"controls-position":"right",placeholder:"最小值",max:e.data.max-1,min:0},model:{value:e.data.min,callback:function(t){e.$set(e.data,"min",t)},expression:"data.min"}})],1),i("el-form-item",{attrs:{label:"最大值"}},[i("el-input-number",{attrs:{"controls-position":"right",placeholder:"最大值",min:e.data.min+1},model:{value:e.data.max,callback:function(t){e.$set(e.data,"max",t)},expression:"data.max"}})],1),i("el-form-item",{attrs:{label:"步长"}},[i("el-input-number",{attrs:{"controls-position":"right",placeholder:"步长",min:1,max:e.data.max-e.data.min},model:{value:e.data.step,callback:function(t){e.$set(e.data,"step",t)},expression:"data.step"}})],1),i("el-form-item",{attrs:{label:"显示间隔点"}},[i("el-switch",{model:{value:e.data.showStops,callback:function(t){e.$set(e.data,"showStops",t)},expression:"data.showStops"}})],1),i("el-form-item",{attrs:{label:"显示输入框"}},[i("el-switch",{model:{value:e.data.showInput,callback:function(t){e.$set(e.data,"showInput",t)},expression:"data.showInput"}})],1),i("el-form-item",{attrs:{label:"是否禁用"}},[i("el-switch",{model:{value:e.data.disabled,callback:function(t){e.$set(e.data,"disabled",t)},expression:"data.disabled"}})],1),i("el-form-item",{attrs:{label:"是否可见"}},[i("el-switch",{model:{value:e.data.display,callback:function(t){e.$set(e.data,"display",t)},expression:"data.display"}})],1)],1)},X=[],Z={name:"config-slider",props:["data"]},Q=Z,J=Object(h["a"])(Q,Y,X,!1,null,null,null),ee=J.exports,te=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",[i("el-form-item",{attrs:{label:"占位内容"}},[i("el-input",{attrs:{placeholder:"占位内容"},model:{value:e.data.placeholder,callback:function(t){e.$set(e.data,"placeholder",t)},expression:"data.placeholder"}})],1),i("el-form-item",{attrs:{label:"是否禁用"}},[i("el-switch",{model:{value:e.data.disabled,callback:function(t){e.$set(e.data,"disabled",t)},expression:"data.disabled"}})],1),i("el-form-item",{attrs:{label:"是否可见"}},[i("el-switch",{model:{value:e.data.display,callback:function(t){e.$set(e.data,"display",t)},expression:"data.display"}})],1),i("el-form-item",{attrs:{label:"是否必填"}},[i("el-switch",{model:{value:e.data.required,callback:function(t){e.$set(e.data,"required",t)},expression:"data.required"}})],1)],1)},ie=[],ne={name:"config-color",props:["data"],data:function(){return{validator:{type:null,required:null,pattern:null,length:null}}},methods:{generateRule:function(){var e=this,t=[];Object.keys(this.validator).forEach((function(i){e.validator[i]&&t.push(e.validator[i])})),this.data.rules=t}},watch:{"data.required":function(e){this.validator.required=e?{required:!0,message:"".concat(this.data.label,"必须填写")}:null,this.generateRule()}}},oe=ne,re=Object(h["a"])(oe,te,ie,!1,null,null,null),se=re.exports,ae=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",[i("el-form-item",{attrs:{label:"默认值"}},[i("el-input",{attrs:{placeholder:"默认值"},model:{value:e.data.value,callback:function(t){e.$set(e.data,"value",t)},expression:"data.value"}})],1),i("el-form-item",{attrs:{label:"字典配置"}},[i("br"),i("el-tabs",{attrs:{stretch:""},on:{"tab-click":e.handleTabClick},model:{value:e.data.dicOption,callback:function(t){e.$set(e.data,"dicOption",t)},expression:"data.dicOption"}},[i("el-tab-pane",{attrs:{label:"静态数据",name:"static"}},[i("draggable",{attrs:{tag:"ul",list:e.data.dicData,group:{name:"dic"},"ghost-class":"ghost",handle:".drag-item"}},e._l(e.data.dicData,(function(t,n){return i("li",{key:n},[i("i",{staticClass:"drag-item el-icon-s-operation",staticStyle:{"font-size":"16px",margin:"0 5px",cursor:"move"}}),i("el-input",{staticStyle:{"margin-right":"5px"},attrs:{size:"mini",placeholder:"label"},model:{value:t.label,callback:function(i){e.$set(t,"label",i)},expression:"item.label"}}),i("el-input",{attrs:{size:"mini",placeholder:"value"},model:{value:t.value,callback:function(i){e.$set(t,"value",i)},expression:"item.value"}}),i("el-button",{staticStyle:{padding:"4px","margin-left":"5px"},attrs:{circle:"",plain:"",type:"danger",size:"mini",icon:"el-icon-minus"},on:{click:function(t){return e.handleRemoveFields(n)}}})],1)})),0),i("div",{staticStyle:{"margin-left":"22px"}},[i("el-button",{attrs:{type:"text"},on:{click:e.handleAddFields}},[e._v("添加列 ")])],1)],1),i("el-tab-pane",{attrs:{label:"远端数据",name:"remote"}},[e._v(" 网址 "),i("el-input",{attrs:{placeholder:"远端数据字典网址"},model:{value:e.data.dicUrl,callback:function(t){e.$set(e.data,"dicUrl",t)},expression:"data.dicUrl"}}),e._v(" 请求方法 "),i("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请求方法"},model:{value:e.data.dicMethod,callback:function(t){e.$set(e.data,"dicMethod",t)},expression:"data.dicMethod"}},[i("el-option",{attrs:{label:"POST",value:"post"}}),i("el-option",{attrs:{label:"GET",value:"get"}})],1),"post"==e.data.dicMethod?i("p",[e._v(" 请求参数 "),i("avue-dynamic",{attrs:{children:e.option},model:{value:e.data.dicQueryConfig,callback:function(t){e.$set(e.data,"dicQueryConfig",t)},expression:"data.dicQueryConfig"}})],1):e._e()],1)],1)],1),i("el-form-item",{attrs:{label:"字典key配置"}},[i("ul",e._l(e.data.props,(function(t,n){return i("li",{key:n},[i("span",{staticStyle:{width:"50px"}},[e._v(e._s(n))]),i("el-input",{attrs:{size:"mini",placeholder:"key配置"},model:{value:e.data.props[n],callback:function(t){e.$set(e.data.props,n,t)},expression:"data.props[key]"}})],1)})),0)]),"remote"==e.data.dicOption?i("el-form-item",{attrs:{label:"重新请求字典(crud)"}},[i("el-switch",{model:{value:e.data.dicFlag,callback:function(t){e.$set(e.data,"dicFlag",t)},expression:"data.dicFlag"}})],1):e._e(),i("el-form-item",{attrs:{label:"边框"}},[i("el-switch",{model:{value:e.data.border,callback:function(t){e.$set(e.data,"border",t)},expression:"data.border"}})],1),e.data.border?i("el-form-item",{attrs:{label:"尺寸"}},[i("el-radio-group",{attrs:{size:"mini"},model:{value:e.data.size,callback:function(t){e.$set(e.data,"size",t)},expression:"data.size"}},[i("el-radio-button",{attrs:{label:"medium"}},[e._v("正常")]),i("el-radio-button",{attrs:{label:"small"}},[e._v("小")]),i("el-radio-button",{attrs:{label:"mini"}},[e._v("超小")])],1)],1):e._e(),i("el-form-item",{attrs:{label:"是否禁用"}},[i("el-switch",{model:{value:e.data.disabled,callback:function(t){e.$set(e.data,"disabled",t)},expression:"data.disabled"}})],1),i("el-form-item",{attrs:{label:"是否可见"}},[i("el-switch",{model:{value:e.data.display,callback:function(t){e.$set(e.data,"display",t)},expression:"data.display"}})],1),i("el-form-item",{attrs:{label:"是否必填"}},[i("el-switch",{model:{value:e.data.required,callback:function(t){e.$set(e.data,"required",t)},expression:"data.required"}})],1)],1)},le=[],ce=i("d958"),he=i.n(ce),de={name:"config-radio",props:["data"],components:{Draggable:he.a},data:function(){return{validator:{type:null,required:null,pattern:null,length:null},option:{column:[{type:"input",prop:"key",label:"key"},{type:"input",prop:"value",label:"value"}]}}},methods:{generateRule:function(){var e=this,t=[];Object.keys(this.validator).forEach((function(i){e.validator[i]&&t.push(e.validator[i])})),this.data.rules=t},handleRemoveFields:function(e){this.data.dicData.splice(e,1)},handleAddFields:function(){var e=Math.ceil(99999*Math.random());this.data.dicData.push({label:"字段".concat(e),value:"col_".concat(e)})},handleTabClick:function(e){var t=e.name;"remote"!=t||this.data.dicQueryConfig||(this.data.dicQueryConfig=[])}},watch:{"data.required":function(e){this.validator.required=e?{required:!0,message:"请选择".concat(this.data.label)}:null,this.generateRule()}}},ue=de,ge=Object(h["a"])(ue,ae,le,!1,null,null,null),fe=ge.exports,me=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",[i("el-form-item",{attrs:{label:"默认值"}},[i("el-input",{attrs:{placeholder:"默认值"},model:{value:e.data.value,callback:function(t){e.$set(e.data,"value",t)},expression:"data.value"}})],1),i("el-form-item",{attrs:{label:"字典配置"}},[i("br"),i("el-tabs",{attrs:{stretch:""},on:{"tab-click":e.handleTabClick},model:{value:e.data.dicOption,callback:function(t){e.$set(e.data,"dicOption",t)},expression:"data.dicOption"}},[i("el-tab-pane",{attrs:{label:"静态数据",name:"static"}},[i("draggable",{attrs:{tag:"ul",list:e.data.dicData,group:{name:"dic"},"ghost-class":"ghost",handle:".drag-item"}},e._l(e.data.dicData,(function(t,n){return i("li",{key:n},[i("i",{staticClass:"drag-item el-icon-s-operation",staticStyle:{"font-size":"16px",margin:"0 5px",cursor:"move"}}),i("el-input",{staticStyle:{"margin-right":"5px"},attrs:{size:"mini",placeholder:"label"},model:{value:t.label,callback:function(i){e.$set(t,"label",i)},expression:"item.label"}}),i("el-input",{attrs:{size:"mini",placeholder:"value"},model:{value:t.value,callback:function(i){e.$set(t,"value",i)},expression:"item.value"}}),i("el-button",{staticStyle:{padding:"4px","margin-left":"5px"},attrs:{circle:"",plain:"",type:"danger",size:"mini",icon:"el-icon-minus"},on:{click:function(t){return e.handleRemoveFields(n)}}})],1)})),0),i("div",{staticStyle:{"margin-left":"22px"}},[i("el-button",{attrs:{type:"text"},on:{click:e.handleAddFields}},[e._v("添加列 ")])],1)],1),i("el-tab-pane",{attrs:{label:"远端数据",name:"remote"}},[e._v(" 网址 "),i("el-input",{attrs:{placeholder:"远端数据字典网址"},model:{value:e.data.dicUrl,callback:function(t){e.$set(e.data,"dicUrl",t)},expression:"data.dicUrl"}}),e._v(" 请求方法 "),i("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请求方法"},model:{value:e.data.dicMethod,callback:function(t){e.$set(e.data,"dicMethod",t)},expression:"data.dicMethod"}},[i("el-option",{attrs:{label:"POST",value:"post"}}),i("el-option",{attrs:{label:"GET",value:"get"}})],1),"post"==e.data.dicMethod?i("p",[e._v(" 请求参数 "),i("avue-dynamic",{attrs:{children:e.option},model:{value:e.data.dicQueryConfig,callback:function(t){e.$set(e.data,"dicQueryConfig",t)},expression:"data.dicQueryConfig"}})],1):e._e()],1)],1)],1),i("el-form-item",{attrs:{label:"字典key配置"}},[i("ul",e._l(e.data.props,(function(t,n){return i("li",{key:n},[i("span",{staticStyle:{width:"50px"}},[e._v(e._s(n))]),i("el-input",{attrs:{size:"mini",placeholder:"key配置"},model:{value:e.data.props[n],callback:function(t){e.$set(e.data.props,n,t)},expression:"data.props[key]"}})],1)})),0)]),"remote"==e.data.dicOption?i("el-form-item",{attrs:{label:"重新请求字典(crud)"}},[i("el-switch",{model:{value:e.data.dicFlag,callback:function(t){e.$set(e.data,"dicFlag",t)},expression:"data.dicFlag"}})],1):e._e(),e.data.button?e._e():i("el-form-item",{attrs:{label:"边框"}},[i("el-switch",{model:{value:e.data.border,callback:function(t){e.$set(e.data,"border",t)},expression:"data.border"}})],1),e.data.border?e._e():i("el-form-item",{attrs:{label:"按钮"}},[i("el-switch",{model:{value:e.data.button,callback:function(t){e.$set(e.data,"button",t)},expression:"data.button"}})],1),e.data.border||e.data.button?i("el-form-item",{attrs:{label:"尺寸"}},[i("el-radio-group",{attrs:{size:"mini"},model:{value:e.data.size,callback:function(t){e.$set(e.data,"size",t)},expression:"data.size"}},[i("el-radio-button",{attrs:{label:"medium"}},[e._v("正常")]),i("el-radio-button",{attrs:{label:"small"}},[e._v("小")]),i("el-radio-button",{attrs:{label:"mini"}},[e._v("超小")])],1)],1):e._e(),i("el-form-item",{attrs:{label:"是否禁用"}},[i("el-switch",{model:{value:e.data.disabled,callback:function(t){e.$set(e.data,"disabled",t)},expression:"data.disabled"}})],1),i("el-form-item",{attrs:{label:"是否可见"}},[i("el-switch",{model:{value:e.data.display,callback:function(t){e.$set(e.data,"display",t)},expression:"data.display"}})],1),i("el-form-item",{attrs:{label:"是否必填"}},[i("el-switch",{model:{value:e.data.required,callback:function(t){e.$set(e.data,"required",t)},expression:"data.required"}})],1)],1)},pe=[],_e={name:"config-checkbox",props:["data"],components:{Draggable:he.a},data:function(){return{validator:{type:null,required:null,pattern:null,length:null},option:{column:[{type:"input",prop:"key",label:"key"},{type:"input",prop:"value",label:"value"}]}}},methods:{generateRule:function(){var e=this,t=[];Object.keys(this.validator).forEach((function(i){e.validator[i]&&t.push(e.validator[i])})),this.data.rules=t},handleRemoveFields:function(e){this.data.dicData.splice(e,1)},handleAddFields:function(){var e=Math.ceil(99999*Math.random());this.data.dicData.push({label:"字段".concat(e),value:"col_".concat(e)})},handleTabClick:function(e){var t=e.name;"remote"!=t||this.data.dicQueryConfig||(this.data.dicQueryConfig=[])}},watch:{"data.required":function(e){this.validator.required=e?{required:!0,message:"请选择".concat(this.data.label)}:null,this.generateRule()}}},be=_e,ve=Object(h["a"])(be,me,pe,!1,null,null,null),we=ve.exports,Ce=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",[i("el-form-item",{attrs:{label:"占位内容"}},[i("el-input",{attrs:{placeholder:"占位内容"},model:{value:e.data.placeholder,callback:function(t){e.$set(e.data,"placeholder",t)},expression:"data.placeholder"}})],1),i("el-form-item",{attrs:{label:"默认值"}},[i("el-input",{attrs:{placeholder:"默认值"},model:{value:e.data.value,callback:function(t){e.$set(e.data,"value",t)},expression:"data.value"}})],1),i("el-form-item",{attrs:{label:"是否多选"}},[i("el-switch",{model:{value:e.data.multiple,callback:function(t){e.$set(e.data,"multiple",t)},expression:"data.multiple"}})],1),e.data.multiple?i("el-form-item",{attrs:{label:"是否可拖拽(需引入sortable.js)"}},[i("el-switch",{model:{value:e.data.drag,callback:function(t){e.$set(e.data,"drag",t)},expression:"data.drag"}})],1):e._e(),e.data.multiple?i("el-form-item",{attrs:{label:"多选数量限制"}},[i("el-input-number",{attrs:{"controls-position":"right",placeholder:"多选限制",min:0,max:e.data.dicData.length},model:{value:e.data.limit,callback:function(t){e.$set(e.data,"limit",t)},expression:"data.limit"}})],1):e._e(),i("el-form-item",{attrs:{label:"字典配置"}},[i("br"),i("el-tabs",{attrs:{stretch:""},on:{"tab-click":e.handleTabClick},model:{value:e.data.dicOption,callback:function(t){e.$set(e.data,"dicOption",t)},expression:"data.dicOption"}},[i("el-tab-pane",{attrs:{label:"静态数据",name:"static"}},[i("draggable",{attrs:{tag:"ul",list:e.data.dicData,group:{name:"dic"},"ghost-class":"ghost",handle:".drag-item"}},e._l(e.data.dicData,(function(t,n){return i("li",{key:n},[i("i",{staticClass:"drag-item el-icon-s-operation",staticStyle:{"font-size":"16px",margin:"0 5px",cursor:"move"}}),i("el-input",{staticStyle:{"margin-right":"5px"},attrs:{size:"mini",placeholder:"label"},model:{value:t.label,callback:function(i){e.$set(t,"label",i)},expression:"item.label"}}),i("el-input",{attrs:{size:"mini",placeholder:"value"},model:{value:t.value,callback:function(i){e.$set(t,"value",i)},expression:"item.value"}}),i("el-button",{staticStyle:{padding:"4px","margin-left":"5px"},attrs:{circle:"",plain:"",type:"danger",size:"mini",icon:"el-icon-minus"},on:{click:function(t){return e.handleRemoveFields(n)}}})],1)})),0),i("div",{staticStyle:{"margin-left":"22px"}},[i("el-button",{attrs:{type:"text"},on:{click:e.handleAddFields}},[e._v("添加列 ")])],1)],1),i("el-tab-pane",{attrs:{label:"远端数据",name:"remote"}},[e._v(" 网址 "),i("el-input",{attrs:{placeholder:"远端数据字典网址"},model:{value:e.data.dicUrl,callback:function(t){e.$set(e.data,"dicUrl",t)},expression:"data.dicUrl"}}),e._v(" 请求方法 "),i("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请求方法"},model:{value:e.data.dicMethod,callback:function(t){e.$set(e.data,"dicMethod",t)},expression:"data.dicMethod"}},[i("el-option",{attrs:{label:"POST",value:"post"}}),i("el-option",{attrs:{label:"GET",value:"get"}})],1),"post"==e.data.dicMethod?i("p",[e._v(" 请求参数 "),i("avue-dynamic",{attrs:{children:e.option},model:{value:e.data.dicQueryConfig,callback:function(t){e.$set(e.data,"dicQueryConfig",t)},expression:"data.dicQueryConfig"}})],1):e._e()],1)],1)],1),i("el-form-item",{attrs:{label:"级联配置"}},[i("draggable",{attrs:{tag:"ul",list:e.data.cascaderItem,group:{name:"cascaderItem"},"ghost-class":"ghost",handle:".drag-item"}},e._l(e.data.cascaderItem,(function(t,n){return i("li",{key:n},[i("i",{staticClass:"drag-item el-icon-s-operation",staticStyle:{"font-size":"16px",margin:"0 5px",cursor:"move"}}),i("el-input",{attrs:{size:"mini",placeholder:"级联属性值"},model:{value:e.data.cascaderItem[n],callback:function(t){e.$set(e.data.cascaderItem,n,t)},expression:"data.cascaderItem[index]"}}),i("el-button",{staticStyle:{padding:"4px","margin-left":"5px"},attrs:{circle:"",plain:"",type:"danger",size:"mini",icon:"el-icon-minus"},on:{click:function(t){return e.handleRemoveCascaderItemFields(n)}}})],1)})),0),i("div",{staticStyle:{"margin-left":"22px"}},[i("el-button",{attrs:{type:"text"},on:{click:e.handleAddCascaderItemFields}},[e._v("添加列")])],1)],1),i("el-form-item",{attrs:{label:"级联默认选中"}},[i("el-input-number",{staticStyle:{width:"calc(100% - 120px)"},attrs:{"controls-position":"right",placeholder:"级联默认选中",min:0},model:{value:e.data.cascaderIndex,callback:function(t){e.$set(e.data,"cascaderIndex",t)},expression:"data.cascaderIndex"}})],1),i("el-form-item",{attrs:{label:"字典key配置"}},[i("ul",e._l(e.data.props,(function(t,n){return i("li",{key:n},[i("span",{staticStyle:{width:"50px"}},[e._v(e._s(n))]),i("el-input",{attrs:{size:"mini",placeholder:"key配置"},model:{value:e.data.props[n],callback:function(t){e.$set(e.data.props,n,t)},expression:"data.props[key]"}})],1)})),0)]),"remote"==e.data.dicOption?i("el-form-item",{attrs:{label:"重新请求字典(crud)"}},[i("el-switch",{model:{value:e.data.dicFlag,callback:function(t){e.$set(e.data,"dicFlag",t)},expression:"data.dicFlag"}})],1):e._e(),i("el-form-item",{attrs:{label:"尺寸"}},[i("el-radio-group",{attrs:{size:"mini"},model:{value:e.data.size,callback:function(t){e.$set(e.data,"size",t)},expression:"data.size"}},[i("el-radio-button",{attrs:{label:"medium"}},[e._v("正常")]),i("el-radio-button",{attrs:{label:"small"}},[e._v("小")]),i("el-radio-button",{attrs:{label:"mini"}},[e._v("超小")])],1)],1),i("el-form-item",{attrs:{label:"是否可清空"}},[i("el-switch",{model:{value:e.data.clearable,callback:function(t){e.$set(e.data,"clearable",t)},expression:"data.clearable"}})],1),i("el-form-item",{attrs:{label:"是否可搜索"}},[i("el-switch",{model:{value:e.data.filterable,callback:function(t){e.$set(e.data,"filterable",t)},expression:"data.filterable"}})],1),i("el-form-item",{attrs:{label:"是否禁用"}},[i("el-switch",{model:{value:e.data.disabled,callback:function(t){e.$set(e.data,"disabled",t)},expression:"data.disabled"}})],1),i("el-form-item",{attrs:{label:"是否可见"}},[i("el-switch",{model:{value:e.data.display,callback:function(t){e.$set(e.data,"display",t)},expression:"data.display"}})],1),i("el-form-item",{attrs:{label:"是否必填"}},[i("el-switch",{model:{value:e.data.required,callback:function(t){e.$set(e.data,"required",t)},expression:"data.required"}})],1)],1)},ye=[],Se={name:"config-select",props:["data"],components:{Draggable:he.a},data:function(){return{validator:{type:null,required:null,pattern:null,length:null},option:{column:[{type:"input",prop:"key",label:"key"},{type:"input",prop:"value",label:"value"}]}}},methods:{generateRule:function(){var e=this,t=[];Object.keys(this.validator).forEach((function(i){e.validator[i]&&t.push(e.validator[i])})),this.data.rules=t},handleRemoveFields:function(e){this.data.dicData.splice(e,1)},handleAddFields:function(){var e=Math.ceil(99999*Math.random());this.data.dicData.push({label:"字段".concat(e),value:"col_".concat(e)})},handleRemoveCascaderItemFields:function(e){this.data.cascaderItem.splice(e,1)},handleAddCascaderItemFields:function(){this.data.cascaderItem.push("")},handleTabClick:function(e){var t=e.name;"remote"!=t||this.data.dicQueryConfig||(this.data.dicQueryConfig=[])}},watch:{"data.required":function(e){this.validator.required=e?{required:!0,message:"请选择".concat(this.data.label)}:null,this.generateRule()}}},xe=Se,Le=Object(h["a"])(xe,Ce,ye,!1,null,null,null),ke=Le.exports,Ee=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",[i("el-form-item",{attrs:{label:"占位内容"}},[i("el-input",{attrs:{placeholder:"占位内容"},model:{value:e.data.placeholder,callback:function(t){e.$set(e.data,"placeholder",t)},expression:"data.placeholder"}})],1),i("el-form-item",{attrs:{label:"默认值"}},[i("el-input",{attrs:{placeholder:"默认值"},model:{value:e.data.value,callback:function(t){e.$set(e.data,"value",t)},expression:"data.value"}})],1),i("el-form-item",{attrs:{label:"字典配置"}},[i("br"),i("el-tabs",{attrs:{stretch:""},on:{"tab-click":e.handleTabClick},model:{value:e.data.dicOption,callback:function(t){e.$set(e.data,"dicOption",t)},expression:"data.dicOption"}},[i("el-tab-pane",{attrs:{label:"静态数据",name:"static"}},[i("el-tree",{ref:"tree",attrs:{data:e.data.dicData,"default-expand-all":"",draggable:"","node-key":"value","expand-on-click-node":!1},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.node,o=t.data;return i("span",{staticClass:"custom-tree-node"},[i("span",[e._v(e._s(n.label))]),i("span",[i("el-button",{attrs:{type:"text",size:"mini",icon:"el-icon-plus"},on:{click:function(t){return e.handleNodeAdd(o)}}}),i("el-button",{staticClass:"danger",attrs:{type:"text",size:"mini",icon:"el-icon-delete"},on:{click:function(t){return e.handleNodeRemove(n,o)}}})],1)])}}])}),i("div",{staticStyle:{"margin-left":"22px"}},[i("el-button",{attrs:{type:"text"},on:{click:e.handleParentNodeAdd}},[e._v("添加父级 ")])],1)],1),i("el-tab-pane",{attrs:{label:"远端数据",name:"remote"}},[e._v(" 网址 "),i("el-input",{attrs:{placeholder:"远端数据字典网址"},model:{value:e.data.dicUrl,callback:function(t){e.$set(e.data,"dicUrl",t)},expression:"data.dicUrl"}}),e._v(" 请求方法 "),i("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请求方法"},model:{value:e.data.dicMethod,callback:function(t){e.$set(e.data,"dicMethod",t)},expression:"data.dicMethod"}},[i("el-option",{attrs:{label:"POST",value:"post"}}),i("el-option",{attrs:{label:"GET",value:"get"}})],1),"post"==e.data.dicMethod?i("p",[e._v(" 请求参数 "),i("avue-dynamic",{attrs:{children:e.option},model:{value:e.data.dicQueryConfig,callback:function(t){e.$set(e.data,"dicQueryConfig",t)},expression:"data.dicQueryConfig"}})],1):e._e()],1)],1)],1),i("el-form-item",{attrs:{label:"字典key配置"}},[i("ul",e._l(e.data.props,(function(t,n){return i("li",{key:n},[i("span",{staticStyle:{width:"50px"}},[e._v(e._s(n))]),i("el-input",{attrs:{size:"mini",placeholder:"key配置"},model:{value:e.data.props[n],callback:function(t){e.$set(e.data.props,n,t)},expression:"data.props[key]"}})],1)})),0)]),"remote"==e.data.dicOption?i("el-form-item",{attrs:{label:"重新请求字典(crud)"}},[i("el-switch",{model:{value:e.data.dicFlag,callback:function(t){e.$set(e.data,"dicFlag",t)},expression:"data.dicFlag"}})],1):e._e(),i("el-form-item",{attrs:{label:"选项分隔符"}},[i("el-input",{attrs:{placeholder:"选项分隔符"},model:{value:e.data.separator,callback:function(t){e.$set(e.data,"separator",t)},expression:"data.separator"}})],1),i("el-form-item",{attrs:{label:"是否显示选中值的完整路径"}},[i("el-switch",{model:{value:e.data.showAllLevels,callback:function(t){e.$set(e.data,"showAllLevels",t)},expression:"data.showAllLevels"}})],1),i("el-form-item",{attrs:{label:"是否可清空"}},[i("el-switch",{model:{value:e.data.clearable,callback:function(t){e.$set(e.data,"clearable",t)},expression:"data.clearable"}})],1),i("el-form-item",{attrs:{label:"是否可搜索"}},[i("el-switch",{model:{value:e.data.filterable,callback:function(t){e.$set(e.data,"filterable",t)},expression:"data.filterable"}})],1),i("el-form-item",{attrs:{label:"是否禁用"}},[i("el-switch",{model:{value:e.data.disabled,callback:function(t){e.$set(e.data,"disabled",t)},expression:"data.disabled"}})],1),i("el-form-item",{attrs:{label:"是否可见"}},[i("el-switch",{model:{value:e.data.display,callback:function(t){e.$set(e.data,"display",t)},expression:"data.display"}})],1),i("el-form-item",{attrs:{label:"是否必填"}},[i("el-switch",{model:{value:e.data.required,callback:function(t){e.$set(e.data,"required",t)},expression:"data.required"}})],1),i("el-dialog",{attrs:{visible:e.dialogVisible,rules:e.dialogRules,"before-close":e.beforeClose},on:{"update:visible":function(t){e.dialogVisible=t}}},[i("el-form",{ref:"dialogForm",attrs:{model:e.dialogForm,"label-width":"80px"}},[i("el-form-item",{attrs:{label:"label"}},[i("el-input",{attrs:{placeholder:"label"},model:{value:e.dialogForm.label,callback:function(t){e.$set(e.dialogForm,"label",t)},expression:"dialogForm.label"}})],1),i("el-form-item",{attrs:{label:"value"}},[i("el-input",{attrs:{placeholder:"value",type:this.dialogInputType},model:{value:e.dialogForm.value,callback:function(t){e.$set(e.dialogForm,"value",t)},expression:"dialogForm.value"}},[i("el-select",{staticStyle:{width:"100px"},attrs:{slot:"append",placeholder:"数据类型"},slot:"append",model:{value:e.dialogInputType,callback:function(t){e.dialogInputType=t},expression:"dialogInputType"}},[i("el-option",{attrs:{label:"String",value:"text"}}),i("el-option",{attrs:{label:"Number",value:"number"}})],1)],1)],1)],1),i("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{on:{click:function(t){e.dialogVisible=!1}}},[e._v("取 消")]),"add"==e.dialogStatus?i("el-button",{attrs:{type:"primary"},on:{click:e.handleDialogAdd}},[e._v("确 定")]):e._e()],1)],1)],1)},De=[],Ne=(i("b105"),i("085b"),{name:"config-cascader",props:["data"],data:function(){return{validator:{type:null,required:null,pattern:null,length:null},dialogForm:{},dialogVisible:!1,dialogRules:{label:{required:!0,message:"请输入label"},value:{required:!0,message:"请输入value"}},dialogStatus:"add",selectData:void 0,dialogInputType:"text",option:{column:[{type:"input",prop:"key",label:"key"},{type:"input",prop:"value",label:"value"}]}}},methods:{generateRule:function(){var e=this,t=[];Object.keys(this.validator).forEach((function(i){e.validator[i]&&t.push(e.validator[i])})),this.data.rules=t},handleTabClick:function(e){var t=e.name;"remote"!=t||this.data.dicQueryConfig||(this.data.dicQueryConfig=[])},handleParentNodeAdd:function(){this.selectData=void 0,this.dialogStatus="add",this.dialogVisible=!0},handleNodeAdd:function(e){this.selectData=e,this.dialogStatus="add",this.dialogVisible=!0},handleNodeRemove:function(e,t){var i=e.parent,n=i.data.children||i.data,o=n.findIndex((function(e){return e.id===t.id}));n.splice(o,1)},handleDialogAdd:function(){var e=this;this.$refs.dialogForm.validate((function(t){if(t){var i=e.dialogForm,n=i.label,o=i.value,r=e.$refs.tree.getNode(o);if(r)e.$message.error("value重复");else{var s=e.selectData,a={label:n,value:"number"==e.dialogInputType?Number(o):o};s?(s.children||e.$set(s,"children",[]),s.children.push(a)):e.$set(e.data.dicData,e.data.dicData.length,a),e.beforeClose()}}}))},beforeClose:function(){this.$refs.dialogForm.clearValidate(),this.dialogForm={},this.dialogVisible=!1}},watch:{"data.required":function(e){this.validator.required=e?{required:!0,message:"请选择".concat(this.data.label),trigger:"change"}:null,this.generateRule()}}}),Te=Ne,Me=(i("4792"),Object(h["a"])(Te,Ee,De,!1,null,"bfa41dee",null)),Ie=Me.exports,Oe=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",[i("el-form-item",{attrs:{label:"占位内容"}},[i("el-input",{attrs:{placeholder:"占位内容"},model:{value:e.data.placeholder,callback:function(t){e.$set(e.data,"placeholder",t)},expression:"data.placeholder"}})],1),i("el-form-item",{attrs:{label:"默认值"}},[i("el-input",{attrs:{placeholder:"默认值"},model:{value:e.data.value,callback:function(t){e.$set(e.data,"value",t)},expression:"data.value"}})],1),i("el-form-item",{attrs:{label:"字典配置"}},[i("br"),i("el-tabs",{attrs:{stretch:""},on:{"tab-click":e.handleTabClick},model:{value:e.data.dicOption,callback:function(t){e.$set(e.data,"dicOption",t)},expression:"data.dicOption"}},[i("el-tab-pane",{attrs:{label:"静态数据",name:"static"}},[i("el-tree",{ref:"tree",attrs:{data:e.data.dicData,"default-expand-all":"",draggable:"","node-key":"value","expand-on-click-node":!1},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.node,o=t.data;return i("span",{staticClass:"custom-tree-node"},[i("span",[e._v(e._s(n.label))]),i("span",[i("el-button",{attrs:{type:"text",size:"mini",icon:"el-icon-plus"},on:{click:function(t){return e.handleNodeAdd(o)}}}),i("el-button",{staticClass:"danger",attrs:{type:"text",size:"mini",icon:"el-icon-delete"},on:{click:function(t){return e.handleNodeRemove(n,o)}}})],1)])}}])}),i("div",{staticStyle:{"margin-left":"22px"}},[i("el-button",{attrs:{type:"text"},on:{click:e.handleParentNodeAdd}},[e._v("添加父级 ")])],1)],1),i("el-tab-pane",{attrs:{label:"远端数据",name:"remote"}},[e._v(" 网址 "),i("el-input",{attrs:{placeholder:"远端数据字典网址"},model:{value:e.data.dicUrl,callback:function(t){e.$set(e.data,"dicUrl",t)},expression:"data.dicUrl"}}),e._v(" 请求方法 "),i("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请求方法"},model:{value:e.data.dicMethod,callback:function(t){e.$set(e.data,"dicMethod",t)},expression:"data.dicMethod"}},[i("el-option",{attrs:{label:"POST",value:"post"}}),i("el-option",{attrs:{label:"GET",value:"get"}})],1),"post"==e.data.dicMethod?i("p",[e._v(" 请求参数 "),i("avue-dynamic",{attrs:{children:e.option},model:{value:e.data.dicQueryConfig,callback:function(t){e.$set(e.data,"dicQueryConfig",t)},expression:"data.dicQueryConfig"}})],1):e._e()],1)],1)],1),i("el-form-item",{attrs:{label:"字典key配置"}},[i("ul",e._l(e.data.props,(function(t,n){return i("li",{key:n},[i("span",{staticStyle:{width:"50px"}},[e._v(e._s(n))]),i("el-input",{attrs:{size:"mini",placeholder:"key配置"},model:{value:e.data.props[n],callback:function(t){e.$set(e.data.props,n,t)},expression:"data.props[key]"}})],1)})),0)]),"remote"==e.data.dicOption?i("el-form-item",{attrs:{label:"重新请求字典(crud)"}},[i("el-switch",{model:{value:e.data.dicFlag,callback:function(t){e.$set(e.data,"dicFlag",t)},expression:"data.dicFlag"}})],1):e._e(),i("el-form-item",{attrs:{label:"当有子级时,是否可选择父级"}},[i("el-switch",{model:{value:e.data.parent,callback:function(t){e.$set(e.data,"parent",t)},expression:"data.parent"}})],1),i("el-form-item",{attrs:{label:"是否多选"}},[i("el-switch",{model:{value:e.data.multiple,callback:function(t){e.$set(e.data,"multiple",t)},expression:"data.multiple"}})],1),i("el-form-item",{attrs:{label:"是否禁用"}},[i("el-switch",{model:{value:e.data.disabled,callback:function(t){e.$set(e.data,"disabled",t)},expression:"data.disabled"}})],1),i("el-form-item",{attrs:{label:"是否可见"}},[i("el-switch",{model:{value:e.data.display,callback:function(t){e.$set(e.data,"display",t)},expression:"data.display"}})],1),i("el-form-item",{attrs:{label:"是否必填"}},[i("el-switch",{model:{value:e.data.required,callback:function(t){e.$set(e.data,"required",t)},expression:"data.required"}})],1),i("el-dialog",{attrs:{visible:e.dialogVisible,rules:e.dialogRules,"before-close":e.beforeClose},on:{"update:visible":function(t){e.dialogVisible=t}}},[i("el-form",{ref:"dialogForm",attrs:{model:e.dialogForm,"label-width":"80px"}},[i("el-form-item",{attrs:{label:"label"}},[i("el-input",{attrs:{placeholder:"label"},model:{value:e.dialogForm.label,callback:function(t){e.$set(e.dialogForm,"label",t)},expression:"dialogForm.label"}})],1),i("el-form-item",{attrs:{label:"value"}},[i("el-input",{attrs:{placeholder:"value",type:this.dialogInputType},model:{value:e.dialogForm.value,callback:function(t){e.$set(e.dialogForm,"value",t)},expression:"dialogForm.value"}},[i("el-select",{staticStyle:{width:"100px"},attrs:{slot:"append",placeholder:"数据类型"},slot:"append",model:{value:e.dialogInputType,callback:function(t){e.dialogInputType=t},expression:"dialogInputType"}},[i("el-option",{attrs:{label:"String",value:"text"}}),i("el-option",{attrs:{label:"Number",value:"number"}})],1)],1)],1)],1),i("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{on:{click:function(t){e.dialogVisible=!1}}},[e._v("取 消")]),"add"==e.dialogStatus?i("el-button",{attrs:{type:"primary"},on:{click:e.handleDialogAdd}},[e._v("确 定")]):e._e()],1)],1)],1)},Ae=[],Re={name:"config-tree",props:["data"],data:function(){return{validator:{type:null,required:null,pattern:null,length:null},dialogForm:{},dialogVisible:!1,dialogRules:{label:{required:!0,message:"请输入label"},value:{required:!0,message:"请输入value"}},dialogStatus:"add",selectData:void 0,dialogInputType:"text",option:{column:[{type:"input",prop:"key",label:"key"},{type:"input",prop:"value",label:"value"}]}}},methods:{generateRule:function(){var e=this,t=[];Object.keys(this.validator).forEach((function(i){e.validator[i]&&t.push(e.validator[i])})),this.data.rules=t},handleTabClick:function(e){var t=e.name;"remote"!=t||this.data.dicQueryConfig||(this.data.dicQueryConfig=[])},handleParentNodeAdd:function(){this.selectData=void 0,this.dialogStatus="add",this.dialogVisible=!0},handleNodeAdd:function(e){this.selectData=e,this.dialogStatus="add",this.dialogVisible=!0},handleNodeRemove:function(e,t){var i=e.parent,n=i.data.children||i.data,o=n.findIndex((function(e){return e.id===t.id}));n.splice(o,1)},handleDialogAdd:function(){var e=this;this.$refs.dialogForm.validate((function(t){if(t){var i=e.dialogForm,n=i.label,o=i.value,r=e.$refs.tree.getNode(o);if(r)e.$message.error("value重复");else{var s=e.selectData,a={label:n,value:"number"==e.dialogInputType?new Number(o):o};s?(s.children||e.$set(s,"children",[]),s.children.push(a)):e.$set(e.data.dicData,e.data.dicData.length,a),e.beforeClose()}}}))},beforeClose:function(){this.$refs.dialogForm.clearValidate(),this.dialogForm={},this.dialogVisible=!1}},watch:{"data.required":function(e){this.validator.required=e?{required:!0,message:"请选择".concat(this.data.label)}:null,this.generateRule()},"data.multiple":function(e){e?this.data.defaultValue=[]:delete this.data.defaultValue}}},Pe=Re,Fe=(i("0df9"),Object(h["a"])(Pe,Oe,Ae,!1,null,"77c43025",null)),We=Fe.exports,Be=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",[-1!=e.data.type.indexOf("range")?[i("el-form-item",{attrs:{label:"开始占位内容"}},[i("el-input",{attrs:{placeholder:"开始占位内容"},model:{value:e.data.startPlaceholder,callback:function(t){e.$set(e.data,"startPlaceholder",t)},expression:"data.startPlaceholder"}})],1),i("el-form-item",{attrs:{label:"结束占位内容"}},[i("el-input",{attrs:{placeholder:"结束占位内容"},model:{value:e.data.endPlaceholder,callback:function(t){e.$set(e.data,"endPlaceholder",t)},expression:"data.endPlaceholder"}})],1)]:i("el-form-item",{attrs:{label:"占位内容"}},[i("el-input",{attrs:{placeholder:"占位内容"},model:{value:e.data.placeholder,callback:function(t){e.$set(e.data,"placeholder",t)},expression:"data.placeholder"}})],1),i("el-form-item",{attrs:{label:"默认值"}},[i("el-input",{attrs:{placeholder:"默认值"},model:{value:e.data.value,callback:function(t){e.$set(e.data,"value",t)},expression:"data.value"}})],1),i("el-form-item",{attrs:{label:"显示格式化"}},[i("el-input",{attrs:{placeholder:"显示格式化"},model:{value:e.data.format,callback:function(t){e.$set(e.data,"format",t)},expression:"data.format"}})],1),i("el-form-item",{attrs:{label:"值格式化"}},[i("el-input",{attrs:{placeholder:"值格式化"},model:{value:e.data.valueFormat,callback:function(t){e.$set(e.data,"valueFormat",t)},expression:"data.valueFormat"}})],1),["timerange","daterange","datetimerange"].includes(e.data.type)?i("el-form-item",{attrs:{label:"取消范围联动"}},[i("el-switch",{model:{value:e.data.unlinkPanels,callback:function(t){e.$set(e.data,"unlinkPanels",t)},expression:"data.unlinkPanels"}})],1):e._e(),i("el-form-item",{attrs:{label:"是否禁用"}},[i("el-switch",{model:{value:e.data.disabled,callback:function(t){e.$set(e.data,"disabled",t)},expression:"data.disabled"}})],1),i("el-form-item",{attrs:{label:"是否可见"}},[i("el-switch",{model:{value:e.data.display,callback:function(t){e.$set(e.data,"display",t)},expression:"data.display"}})],1),i("el-form-item",{attrs:{label:"是否必填"}},[i("el-switch",{model:{value:e.data.required,callback:function(t){e.$set(e.data,"required",t)},expression:"data.required"}})],1)],2)},Ve=[],He={name:"config-date",props:["data"],data:function(){return{validator:{type:null,required:null,pattern:null,length:null}}},methods:{generateRule:function(){var e=this,t=[];Object.keys(this.validator).forEach((function(i){e.validator[i]&&t.push(e.validator[i])})),this.data.rules=t}},watch:{"data.required":function(e){this.validator.required=e?{required:!0,message:"".concat(this.data.label,"必须填写")}:null,this.generateRule()}}},ze=He,Ue=Object(h["a"])(ze,Be,Ve,!1,null,null,null),je=Ue.exports,Ke=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",[e.data.oss?e._e():i("el-form-item",{attrs:{label:"上传地址"}},[i("el-input",{attrs:{placeholder:"上传地址"},model:{value:e.data.action,callback:function(t){e.$set(e.data,"action",t)},expression:"data.action"}})],1),e.data.oss?e._e():i("el-form-item",{attrs:{label:"接受文件类型"}},[i("el-input",{attrs:{placeholder:"接受文件类型,如:image/png,image/jpg"},model:{value:e.data.accept,callback:function(t){e.$set(e.data,"accept",t)},expression:"data.accept"}})],1),i("el-form-item",{attrs:{label:"oss"}},[i("a",{staticStyle:{color:"#409EFF"},attrs:{href:"https://avuejs.com/doc/form/form-upload-qiniu",target:"_blank"}},[e._v("请先按照相关文档配置avue七牛/阿里配置")]),i("br"),i("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"oss不写则为普通上传",clearable:""},model:{value:e.data.oss,callback:function(t){e.$set(e.data,"oss",t)},expression:"data.oss"}},[i("el-option",{attrs:{label:"阿里",value:"ali"}}),i("el-option",{attrs:{label:"七牛",value:"qiniu"}})],1)],1),i("el-form-item",{attrs:{label:"是否拖拽上传"}},[i("el-switch",{model:{value:e.data.drag,callback:function(t){e.$set(e.data,"drag",t)},expression:"data.drag"}})],1),e.data.drag?e._e():i("el-form-item",{attrs:{label:"文件列表类型"}},[i("el-select",{attrs:{placeholder:"文件列表类型",clearable:""},model:{value:e.data.listType,callback:function(t){e.$set(e.data,"listType",t)},expression:"data.listType"}},[i("el-option",{attrs:{label:"附件",value:"text"}}),i("el-option",{attrs:{label:"照片墙",value:"picture-card"}}),i("el-option",{attrs:{label:"头像",value:"picture-img"}}),i("el-option",{attrs:{label:"缩略图",value:"picture"}})],1)],1),i("el-form-item",{attrs:{label:"参数设置"}},[e._v(" 请求头 "),i("avue-dynamic",{attrs:{children:e.option},model:{value:e.data.headersConfig,callback:function(t){e.$set(e.data,"headersConfig",t)},expression:"data.headersConfig"}}),e._v(" 请求体 "),i("avue-dynamic",{attrs:{children:e.option},model:{value:e.data.dataConfig,callback:function(t){e.$set(e.data,"dataConfig",t)},expression:"data.dataConfig"}})],1),i("el-form-item",{attrs:{label:"服务器返回参数设置"}},[i("br"),e._v(" 上传成功返回结构体的图片地址 "),i("el-input",{attrs:{placeholder:"上传成功返回结构体的图片地址"},model:{value:e.data.propsHttp.url,callback:function(t){e.$set(e.data.propsHttp,"url",t)},expression:"data.propsHttp.url"}}),e._v(" 上传成功返回结构体的图片的姓名 "),i("el-input",{attrs:{placeholder:"上传成功返回结构体的图片的姓名"},model:{value:e.data.propsHttp.name,callback:function(t){e.$set(e.data.propsHttp,"name",t)},expression:"data.propsHttp.name"}}),e._v(" 返回结构体的层次 "),i("el-input",{attrs:{placeholder:"返回结构体的层次"},model:{value:e.data.propsHttp.res,callback:function(t){e.$set(e.data.propsHttp,"res",t)},expression:"data.propsHttp.res"}}),e._v(" 上传文件流时的名称 "),i("el-input",{attrs:{placeholder:"fileName"},model:{value:e.data.propsHttp.fileName,callback:function(t){e.$set(e.data.propsHttp,"fileName",t)},expression:"data.propsHttp.fileName"}})],1),i("el-form-item",{attrs:{label:"是否显示已上传文件列表"}},[i("el-switch",{model:{value:e.data.showFileList,callback:function(t){e.$set(e.data,"showFileList",t)},expression:"data.showFileList"}})],1),i("el-form-item",{attrs:{label:"文件大小限制(字节)"}},[i("el-input-number",{staticStyle:{width:"100%"},attrs:{"controls-position":"right",placeholder:"文件大小限制(字节)",min:0},model:{value:e.data.fileSize,callback:function(t){e.$set(e.data,"fileSize",t)},expression:"data.fileSize"}})],1),i("el-form-item",{attrs:{label:"上传限制提示"}},[i("el-input",{attrs:{placeholder:"上传限制提示"},model:{value:e.data.tip,callback:function(t){e.$set(e.data,"tip",t)},expression:"data.tip"}})],1),i("el-form-item",{attrs:{label:"上传中提示"}},[i("el-input",{attrs:{placeholder:"上传中提示"},model:{value:e.data.loadText,callback:function(t){e.$set(e.data,"loadText",t)},expression:"data.loadText"}})],1),i("el-form-item",{attrs:{label:"是否多文件上传"}},[i("el-switch",{model:{value:e.data.multiple,callback:function(t){e.$set(e.data,"multiple",t)},expression:"data.multiple"}})],1),i("el-form-item",{attrs:{label:"多文件上传数量限制"}},[i("el-input-number",{staticStyle:{width:"100%"},attrs:{"controls-position":"right",placeholder:"多文件上传数量限制",min:1},model:{value:e.data.limit,callback:function(t){e.$set(e.data,"limit",t)},expression:"data.limit"}})],1),i("el-form-item",{attrs:{label:"图片水印设置"}},[i("br"),e._v(" 水印文字 "),i("el-input",{attrs:{placeholder:"水印文字"},model:{value:e.data.canvasOption.text,callback:function(t){e.$set(e.data.canvasOption,"text",t)},expression:"data.canvasOption.text"}}),e._v(" 字体类型 "),i("el-input",{attrs:{placeholder:"字体类型"},model:{value:e.data.canvasOption.fontFamily,callback:function(t){e.$set(e.data.canvasOption,"fontFamily",t)},expression:"data.canvasOption.fontFamily"}}),e._v(" 字体颜色 "),i("avue-input-color",{attrs:{placeholder:"字体颜色"},model:{value:e.data.canvasOption.color,callback:function(t){e.$set(e.data.canvasOption,"color",t)},expression:"data.canvasOption.color"}}),e._v(" 字体大小 "),i("el-input-number",{staticStyle:{width:"100%"},attrs:{"controls-position":"right",placeholder:"字体大小"},model:{value:e.data.canvasOption.fontSize,callback:function(t){e.$set(e.data.canvasOption,"fontSize",t)},expression:"data.canvasOption.fontSize"}}),e._v(" 文字的透明度 "),i("el-input-number",{staticStyle:{width:"100%"},attrs:{"controls-position":"right",placeholder:"文字的透明度",step:10,min:10,max:100},model:{value:e.data.canvasOption.opacity,callback:function(t){e.$set(e.data.canvasOption,"opacity",t)},expression:"data.canvasOption.opacity"}}),e._v(" 文字距离图片底部的距离"),i("br"),i("el-input-number",{staticStyle:{width:"100%"},attrs:{"controls-position":"right",placeholder:"文字距离图片底部的距离"},model:{value:e.data.canvasOption.bottom,callback:function(t){e.$set(e.data.canvasOption,"bottom",t)},expression:"data.canvasOption.bottom"}}),e._v(" 文字距离图片右边的距离"),i("br"),i("el-input-number",{staticStyle:{width:"100%"},attrs:{"controls-position":"right",placeholder:"文字距离图片右边的距离"},model:{value:e.data.canvasOption.right,callback:function(t){e.$set(e.data.canvasOption,"right",t)},expression:"data.canvasOption.right"}}),e._v(" 压缩图片比率"),i("br"),i("el-input-number",{staticStyle:{width:"100%"},attrs:{"controls-position":"right",placeholder:"压缩图片比率",step:.1,min:0,max:1},model:{value:e.data.canvasOption.ratio,callback:function(t){e.$set(e.data.canvasOption,"ratio",t)},expression:"data.canvasOption.ratio"}})],1),i("el-form-item",{attrs:{label:"是否禁用"}},[i("el-switch",{model:{value:e.data.disabled,callback:function(t){e.$set(e.data,"disabled",t)},expression:"data.disabled"}})],1),i("el-form-item",{attrs:{label:"是否可见"}},[i("el-switch",{model:{value:e.data.display,callback:function(t){e.$set(e.data,"display",t)},expression:"data.display"}})],1),i("el-form-item",{attrs:{label:"是否必填"}},[i("el-switch",{model:{value:e.data.required,callback:function(t){e.$set(e.data,"required",t)},expression:"data.required"}})],1)],1)},qe=[],$e={name:"config-upload",props:["data"],data:function(){return{validator:{type:null,required:null,pattern:null,length:null},option:{column:[{type:"input",prop:"key",label:"key"},{type:"input",prop:"value",label:"value"}]}}},methods:{generateRule:function(){var e=this,t=[];Object.keys(this.validator).forEach((function(i){e.validator[i]&&t.push(e.validator[i])})),this.data.rules=t}},watch:{"data.required":function(e){this.validator.required=e?{required:!0,message:"".concat(this.data.label,"必须填写")}:null,this.generateRule()},"data.drag":function(e){e&&delete this.data.listType}}},Ge=$e,Ye=Object(h["a"])(Ge,Ke,qe,!1,null,null,null),Xe=Ye.exports,Ze=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",[i("el-form-item",{attrs:{label:"图片上传地址"}},[i("el-input",{attrs:{placeholder:"图片上传地址"},model:{value:e.data.options.action,callback:function(t){e.$set(e.data.options,"action",t)},expression:"data.options.action"}})],1),i("el-form-item",{attrs:{label:"配置参数"}},[i("a",{staticStyle:{color:"#409EFF"},attrs:{href:"https://avuejs.com/doc/plugins/ueditor-plugins",target:"_blank"}},[e._v("详细文档")]),i("br"),e._v(" 返回的数据结构层次 "),i("el-input",{attrs:{placeholder:"返回的数据结构层次"},model:{value:e.data.options.props.res,callback:function(t){e.$set(e.data.options.props,"res",t)},expression:"data.options.props.res"}}),e._v(" 返回结构体图片地址字段 "),i("el-input",{attrs:{placeholder:"返回结构体图片地址字段"},model:{value:e.data.options.props.url,callback:function(t){e.$set(e.data.options.props,"url",t)},expression:"data.options.props.url"}})],1),i("el-form-item",{attrs:{label:"oss"}},[i("el-select",{attrs:{placeholder:"oss不写则为普通上传",clearable:""},model:{value:e.data.options.oss,callback:function(t){e.$set(e.data.options,"oss",t)},expression:"data.options.oss"}},[i("el-option",{attrs:{label:"阿里",value:"ali"}}),i("el-option",{attrs:{label:"七牛",value:"qiniu"}})],1)],1),"qiniu"==e.data.options.oss?[i("el-form-item",{attrs:{label:"七牛oss配置"}},[i("br"),e._v(" AK "),i("el-input",{attrs:{placeholder:"七牛云的密钥(AK)"},model:{value:e.data.options.qiniu.AK,callback:function(t){e.$set(e.data.options.qiniu,"AK",t)},expression:"data.options.qiniu.AK"}}),e._v(" SK "),i("el-input",{attrs:{placeholder:"七牛云的密钥(SK)"},model:{value:e.data.options.qiniu.SK,callback:function(t){e.$set(e.data.options.qiniu,"SK",t)},expression:"data.options.qiniu.SK"}}),e._v(" scope "),i("el-input",{attrs:{placeholder:"七牛云存储的空间名"},model:{value:e.data.options.qiniu.scope,callback:function(t){e.$set(e.data.options.qiniu,"scope",t)},expression:"data.options.qiniu.scope"}}),e._v(" url "),i("el-input",{attrs:{placeholder:"空间的自定义域名"},model:{value:e.data.options.qiniu.url,callback:function(t){e.$set(e.data.options.qiniu,"url",t)},expression:"data.options.qiniu.url"}}),e._v(" deadline "),i("el-input",{attrs:{placeholder:"token的过期时间"},model:{value:e.data.options.qiniu.deadline,callback:function(t){e.$set(e.data.options.qiniu,"deadline",t)},expression:"data.options.qiniu.deadline"}})],1)]:e._e(),"ali"==e.data.options.oss?[i("el-form-item",{attrs:{label:"阿里oss配置"}},[i("br"),e._v(" region "),i("el-input",{attrs:{placeholder:"region"},model:{value:e.data.options.ali.region,callback:function(t){e.$set(e.data.options.ali,"region",t)},expression:"data.options.ali.region"}}),e._v(" endpoint "),i("el-input",{attrs:{placeholder:"endpoint"},model:{value:e.data.options.ali.endpoint,callback:function(t){e.$set(e.data.options.ali,"endpoint",t)},expression:"data.options.ali.endpoint"}}),e._v(" accessKeyId "),i("el-input",{attrs:{placeholder:"accessKeyId"},model:{value:e.data.options.ali.accessKeyId,callback:function(t){e.$set(e.data.options.ali,"accessKeyId",t)},expression:"data.options.ali.accessKeyId"}}),e._v(" accessKeySecret "),i("el-input",{attrs:{placeholder:"accessKeySecret"},model:{value:e.data.options.ali.accessKeySecret,callback:function(t){e.$set(e.data.options.ali,"accessKeySecret",t)},expression:"data.options.ali.accessKeySecret"}}),e._v(" bucket "),i("el-input",{attrs:{placeholder:"bucket\t"},model:{value:e.data.options.ali.bucket,callback:function(t){e.$set(e.data.options.ali,"bucket",t)},expression:"data.options.ali.bucket"}})],1)]:e._e(),i("el-form-item",{attrs:{label:"是否可见"}},[i("el-switch",{model:{value:e.data.display,callback:function(t){e.$set(e.data,"display",t)},expression:"data.display"}})],1),i("el-form-item",{attrs:{label:"是否必填"}},[i("el-switch",{model:{value:e.data.required,callback:function(t){e.$set(e.data,"required",t)},expression:"data.required"}})],1)],2)},Qe=[],Je={name:"config-ueditor",props:["data"],data:function(){return{validator:{type:null,required:null,pattern:null,length:null}}},methods:{generateRule:function(){var e=this,t=[];Object.keys(this.validator).forEach((function(i){e.validator[i]&&t.push(e.validator[i])})),this.data.rules=t}},watch:{"data.required":function(e){this.validator.required=e?{required:!0,message:"".concat(this.data.label,"必须填写")}:null,this.generateRule()},"data.options.oss":function(e){"ali"==e?this.data.options.qiniu={}:"qiniu"==e&&(this.data.options.ali={})}}},et=Je,tt=Object(h["a"])(et,Ze,Qe,!1,null,null,null),it=tt.exports,nt=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",[i("el-form-item",{attrs:{label:"默认值"}},[i("a",{staticStyle:{color:"#409EFF"},attrs:{href:"https://avuejs.com/doc/plugins/map-plugins",target:"_blank"}},[e._v("详细文档")]),i("br"),i("el-input",{attrs:{placeholder:"默认值"},model:{value:e.data.value,callback:function(t){e.$set(e.data,"value",t)},expression:"data.value"}})],1),i("el-form-item",{attrs:{label:"是否禁用"}},[i("el-switch",{model:{value:e.data.disabled,callback:function(t){e.$set(e.data,"disabled",t)},expression:"data.disabled"}})],1),i("el-form-item",{attrs:{label:"是否可见"}},[i("el-switch",{model:{value:e.data.display,callback:function(t){e.$set(e.data,"display",t)},expression:"data.display"}})],1),i("el-form-item",{attrs:{label:"是否必填"}},[i("el-switch",{model:{value:e.data.required,callback:function(t){e.$set(e.data,"required",t)},expression:"data.required"}})],1)],1)},ot=[],rt={name:"config-map",props:["data"],data:function(){return{validator:{type:null,required:null,pattern:null,length:null}}},methods:{generateRule:function(){var e=this,t=[];Object.keys(this.validator).forEach((function(i){e.validator[i]&&t.push(e.validator[i])})),this.data.rules=t}},watch:{"data.required":function(e){this.validator.required=e?{required:!0,message:"".concat(this.data.label,"必须填写")}:null,this.generateRule()}}},st=rt,at=Object(h["a"])(st,nt,ot,!1,null,null,null),lt=at.exports,ct=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",[i("el-form-item",{attrs:{label:"图标"}},[i("avue-input-icon",{attrs:{"icon-list":e.iconList,placeholder:"图标"},model:{value:e.data.icon,callback:function(t){e.$set(e.data,"icon",t)},expression:"data.icon"}}),i("el-form-item",{attrs:{label:"开启折叠"}},[i("el-switch",{model:{value:e.data.arrow,callback:function(t){e.$set(e.data,"arrow",t)},expression:"data.arrow"}})],1),e.data.arrow?i("el-form-item",{attrs:{label:"默认展开"}},[i("el-switch",{model:{value:e.data.collapse,callback:function(t){e.$set(e.data,"collapse",t)},expression:"data.collapse"}})],1):e._e(),i("el-form-item",{attrs:{label:"是否可见"}},[i("el-switch",{model:{value:e.data.display,callback:function(t){e.$set(e.data,"display",t)},expression:"data.display"}})],1)],1)],1)},ht=[],dt={name:"config-group",props:["data"],data:function(){return{iconList:[{label:"element-ui",list:["el-icon-info","el-icon-error","el-icon-success","el-icon-warning","el-icon-question"]}]}}},ut=dt,gt=Object(h["a"])(ut,ct,ht,!1,null,"f53992fa",null),ft=gt.exports,mt=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",[i("el-form-item",{attrs:{label:"占位内容"}},[i("el-input",{attrs:{placeholder:"占位内容"},model:{value:e.data.placeholder,callback:function(t){e.$set(e.data,"placeholder",t)},expression:"data.placeholder"}})],1),i("el-form-item",{attrs:{label:"默认值"}},[i("el-input",{attrs:{placeholder:"默认值"},model:{value:e.data.value,callback:function(t){e.$set(e.data,"value",t)},expression:"data.value"}})],1),i("el-form-item",{attrs:{label:"尺寸"}},[i("el-radio-group",{attrs:{size:"mini"},model:{value:e.data.size,callback:function(t){e.$set(e.data,"size",t)},expression:"data.size"}},[i("el-radio-button",{attrs:{label:"medium"}},[e._v("正常")]),i("el-radio-button",{attrs:{label:"small"}},[e._v("小")]),i("el-radio-button",{attrs:{label:"mini"}},[e._v("超小")])],1)],1),i("el-form-item",{attrs:{label:"是否禁用"}},[i("el-switch",{model:{value:e.data.disabled,callback:function(t){e.$set(e.data,"disabled",t)},expression:"data.disabled"}})],1),i("el-form-item",{attrs:{label:"是否可见"}},[i("el-switch",{model:{value:e.data.display,callback:function(t){e.$set(e.data,"display",t)},expression:"data.display"}})],1),i("el-form-item",{attrs:{label:"是否必填"}},[i("el-switch",{model:{value:e.data.required,callback:function(t){e.$set(e.data,"required",t)},expression:"data.required"}})],1)],1)},pt=[],_t={name:"config-array",props:["data"],data:function(){return{validator:{type:null,required:null,pattern:null,length:null}}},methods:{generateRule:function(){var e=this,t=[];Object.keys(this.validator).forEach((function(i){e.validator[i]&&t.push(e.validator[i])})),this.data.rules=t}},watch:{"data.required":function(e){this.validator.required=e?{required:!0,message:"请输入".concat(this.data.label)}:null,this.generateRule()}}},bt=_t,vt=Object(h["a"])(bt,mt,pt,!1,null,null,null),wt=vt.exports,Ct=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",[i("el-form-item",{attrs:{label:"默认值"}},[i("el-input",{attrs:{placeholder:"默认值"},model:{value:e.data.value,callback:function(t){e.$set(e.data,"value",t)},expression:"data.value"}})],1),i("el-form-item",{attrs:{label:"距左边边距"}},[i("el-input",{attrs:{placeholder:"距左边边距"},model:{value:e.data.labelWidth,callback:function(t){e.$set(e.data,"labelWidth",t)},expression:"data.labelWidth"}})],1),i("el-form-item",{attrs:{label:"颜色"}},[i("el-color-picker",{attrs:{size:"mini"},model:{value:e.data.styles.color,callback:function(t){e.$set(e.data.styles,"color",t)},expression:"data.styles.color"}})],1),i("el-form-item",{attrs:{label:"字体大小"}},[i("el-input",{attrs:{placeholder:"字体大小"},model:{value:e.data.styles.fontSize,callback:function(t){e.$set(e.data.styles,"fontSize",t)},expression:"data.styles.fontSize"}})],1),i("el-form-item",{attrs:{label:"粗体"}},[i("el-select",{attrs:{placeholder:"粗体"},model:{value:e.data.styles.fontWeight,callback:function(t){e.$set(e.data.styles,"fontWeight",t)},expression:"data.styles.fontWeight"}},e._l(e.options,(function(e){return i("el-option",{key:e,attrs:{label:e,value:e}})})),1)],1)],1)},yt=[],St={name:"config-title",props:["data"],data:function(){return{options:["100","200","300","400","500","600","700","800","900","blod","bloder","inherit","initial","lighter","normal","revert","unset"]}}},xt=St,Lt=Object(h["a"])(xt,Ct,yt,!1,null,null,null),kt=Lt.exports,Et=[u,b,x,T,P,z,G,ee,se,fe,we,ke,Ie,We,je,it,Xe,lt,ft,wt,kt],Dt={install:function(e){this.installed||(this.installed=!0,Et.map((function(t){e.component(t.name,t)})))}},Nt=Dt,Tt=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"form-designer"},[i("el-container",[i("el-aside",{attrs:{width:e.leftWidth}},[i("div",{staticClass:"fields-list"},[e.customFields&&e.customFields.length>0?[i("el-link",{staticClass:"field-title",attrs:{underline:!1,href:"https://github.com/sscfaith/avue-form-design/blob/master/CHANGELOG.md#2020-09-22",target:"_blank"}},[e._v("自定义字段 "),i("i",{staticClass:"el-icon-question"})]),i("draggable",{attrs:{tag:"ul",list:e.customFields,group:{name:"form",pull:"clone",put:!1},"ghost-class":"ghost",sort:!1}},[e._l(e.customFields,(function(t,n){return[t.tips?i("el-tooltip",{key:n,attrs:{effect:"dark",content:t.tips}},[i("li",{key:n,staticClass:"field-label"},[i("a",{staticStyle:{padding:"0 5px"},on:{click:function(i){return e.handleFieldClick(t)}}},[i("i",{class:t.icon}),i("span",{staticStyle:{"margin-left":"5px"}},[e._v(e._s(t.title||t.label))])])])]):i("li",{key:n,staticClass:"field-label"},[i("a",{staticStyle:{padding:"0 5px"},on:{click:function(i){return e.handleFieldClick(t)}}},[i("i",{class:t.icon}),i("span",{staticStyle:{"margin-left":"5px"}},[e._v(e._s(t.title||t.label))])])])]}))],2)]:e._e(),e._l(e.fields,(function(t,n){return i("div",{key:n},[t.list.find((function(t){return e.includeFields.includes(t.type)}))?[i("div",{staticClass:"field-title"},[e._v(e._s(t.title))]),i("draggable",{attrs:{tag:"ul",list:t.list,group:{name:"form",pull:"clone",put:!1},"ghost-class":"ghost",sort:!1}},[e._l(t.list,(function(t,n){return[e.includeFields.includes(t.type)?i("li",{key:n,staticClass:"field-label"},[i("a",{on:{click:function(i){return e.handleFieldClick(t)}}},[i("i",{staticClass:"icon iconfont",class:t.icon}),i("span",[e._v(e._s(t.title||t.label))])])]):e._e()]}))],2)]:e._e()],2)}))],2)]),i("el-container",{staticClass:"widget-container",attrs:{direction:"vertical"}},[i("el-header",{staticClass:"widget-container-header"},[i("div",[e.undoRedo?[i("el-button",{attrs:{type:"text",size:"medium",icon:"el-icon-refresh-left",disabled:0==e.historySteps.index},on:{click:function(t){e.widgetForm=e.handleUndo()}}},[e._v("撤销")]),i("el-button",{attrs:{type:"text",size:"medium",icon:"el-icon-refresh-right",disabled:e.historySteps.index==e.historySteps.steps.length-1},on:{click:function(t){e.widgetForm=e.handleRedo()}}},[e._v("重做")])]:e._e()],2),i("div",{staticStyle:{display:"flex","align-items":"center"}},[e.showGithubStar?i("iframe",{staticStyle:{"margin-left":"10px"},attrs:{src:"https://ghbtns.com/github-btn.html?user=sscfaith&repo=avue-form-design&type=star&count=true",frameborder:"0",scrolling:"0",width:"100",height:"20",title:"GitHub"}}):e._e(),e._t("toolbar-left"),e.toolbar.includes("avue-doc")?i("el-button",{attrs:{type:"text",size:"medium",icon:"el-icon-document"},on:{click:e.handleAvueDoc}},[e._v("Avue文档")]):e._e(),e.toolbar.includes("import")?i("el-button",{attrs:{type:"text",size:"medium",icon:"el-icon-upload2"},on:{click:function(t){e.importJsonVisible=!0}}},[e._v("导入JSON")]):e._e(),e.toolbar.includes("generate")?i("el-button",{attrs:{type:"text",size:"medium",icon:"el-icon-download"},on:{click:e.handleGenerateJson}},[e._v("生成JSON")]):e._e(),e.toolbar.includes("preview")?i("el-button",{attrs:{type:"text",size:"medium",icon:"el-icon-view"},on:{click:e.handlePreview}},[e._v("预览")]):e._e(),e.toolbar.includes("clear")?i("el-button",{staticClass:"danger",attrs:{type:"text",size:"medium",icon:"el-icon-delete"},on:{click:e.handleClear}},[e._v("清空")]):e._e(),e._t("toolbar")],2)]),i("el-main",{style:{background:0==e.widgetForm.column.length?"url("+e.widgetEmpty+") no-repeat 50%":""}},[i("widget-form",{ref:"widgetForm",attrs:{data:e.widgetForm,select:e.widgetFormSelect},on:{"update:select":function(t){e.widgetFormSelect=t},change:function(t){return e.handleHistoryChange(e.widgetForm)}}})],1)],1),i("el-aside",{staticClass:"widget-config-container",attrs:{width:e.rightWidth}},[i("el-tabs",{attrs:{stretch:""},model:{value:e.configTab,callback:function(t){e.configTab=t},expression:"configTab"}},[i("el-tab-pane",{staticStyle:{padding:"0 10px"},attrs:{label:"字段属性",name:"widget"}},[i("widget-config",{attrs:{data:e.widgetFormSelect}})],1),i("el-tab-pane",{staticStyle:{padding:"0 10px"},attrs:{label:"表单属性",name:"form",lazy:""}},[i("form-config",{attrs:{data:e.widgetForm}})],1)],1)],1),i("el-drawer",{attrs:{title:"导入JSON",visible:e.importJsonVisible,size:"50%","append-to-body":"","destroy-on-close":""},on:{"update:visible":function(t){e.importJsonVisible=t}}},[i("monaco-editor",{attrs:{keyIndex:"import",height:"82%"},model:{value:e.importJson,callback:function(t){e.importJson=t},expression:"importJson"}}),i("div",{staticClass:"drawer-foot"},[i("el-button",{attrs:{size:"medium",type:"primary"},on:{click:e.handleImportJsonSubmit}},[e._v("确定")]),i("el-button",{attrs:{size:"medium",type:"danger"},on:{click:function(t){e.importJsonVisible=!1}}},[e._v("取消")])],1)],1),i("el-drawer",{attrs:{title:"生成JSON",visible:e.generateJsonVisible,size:"50%","append-to-body":"","destroy-on-close":""},on:{"update:visible":function(t){e.generateJsonVisible=t}}},[i("monaco-editor",{attrs:{keyIndex:"generate",height:"82%","read-only":!0},model:{value:e.widgetFormPreview,callback:function(t){e.widgetFormPreview=t},expression:"widgetFormPreview"}}),i("div",{staticClass:"drawer-foot"},[i("el-button",{attrs:{size:"medium",type:"primary"},on:{click:e.handleGenerate}},[e._v("生成")]),i("el-popover",{attrs:{placement:"top",trigger:"hover",width:"350px"}},[i("el-form",{staticStyle:{padding:"0 20px"},attrs:{"label-suffix":":","label-width":"180px","label-position":"left"},model:{value:e.configOption,callback:function(t){e.configOption=t},expression:"configOption"}},[i("el-form-item",{attrs:{label:"类型"}},[i("el-popover",{staticStyle:{"margin-right":"15px"},attrs:{placement:"top-start",trigger:"hover",content:"复制json对象"}},[i("el-radio",{attrs:{slot:"reference",label:"json"},slot:"reference",model:{value:e.configOption.generateType,callback:function(t){e.$set(e.configOption,"generateType",t)},expression:"configOption.generateType"}},[e._v("json")])],1),i("el-popover",{attrs:{placement:"top-start",trigger:"hover",content:"复制string字符串,可直接用于后端保存无需再次处理。"}},[i("el-radio",{attrs:{slot:"reference",label:"string"},slot:"reference",model:{value:e.configOption.generateType,callback:function(t){e.$set(e.configOption,"generateType",t)},expression:"configOption.generateType"}},[e._v("string")])],1)],1),i("el-form-item",{attrs:{label:"缩进长度-空格数量"}},[i("el-slider",{attrs:{"show-stops":"",marks:{1:"1",2:"2",3:"3",4:"4"},min:1,max:4,step:1},model:{value:e.configOption.space,callback:function(t){e.$set(e.configOption,"space",t)},expression:"configOption.space"}})],1),i("el-form-item",{attrs:{label:"引号类型"}},[i("el-switch",{attrs:{"active-value":"single","inactive-value":"double","active-text":"单引号","inactive-text":"双引号"},model:{value:e.configOption.quoteType,callback:function(t){e.$set(e.configOption,"quoteType",t)},expression:"configOption.quoteType"}})],1),i("el-form-item",{attrs:{label:"移除key的引号"}},[i("el-switch",{model:{value:e.configOption.dropQuotesOnKeys,callback:function(t){e.$set(e.configOption,"dropQuotesOnKeys",t)},expression:"configOption.dropQuotesOnKeys"}})],1),i("el-form-item",{attrs:{label:"移除数字字符串的引号"}},[i("el-switch",{model:{value:e.configOption.dropQuotesOnNumbers,callback:function(t){e.$set(e.configOption,"dropQuotesOnNumbers",t)},expression:"configOption.dropQuotesOnNumbers"}})],1)],1),i("el-button",{staticStyle:{"margin-left":"10px"},attrs:{slot:"reference",size:"medium",type:"primary"},on:{click:e.handleCopy},slot:"reference"},[e._v("复制")])],1)],1)],1),i("el-drawer",{attrs:{title:"预览",visible:e.previewVisible,size:"60%","append-to-body":"","before-close":e.handleBeforeClose},on:{"update:visible":function(t){e.previewVisible=t}}},[e.previewVisible?i("avue-form",{ref:"form",staticClass:"preview-form",attrs:{option:e.widgetFormPreview},on:{submit:e.handlePreviewSubmit},model:{value:e.widgetModels,callback:function(t){e.widgetModels=t},expression:"widgetModels"}}):e._e(),i("div",{staticClass:"drawer-foot"},[i("el-button",{attrs:{size:"medium",type:"primary"},on:{click:e.handlePreviewSubmit}},[e._v("确定")]),i("el-button",{attrs:{size:"medium",type:"danger"},on:{click:e.handleBeforeClose}},[e._v("取消")])],1)],1)],1)],1)},Mt=[],It=i("e669"),Ot=It["a"],At=(i("1115"),Object(h["a"])(Ot,Tt,Mt,!1,null,null,null)),Rt=At.exports,Pt={install:function(e){e.use(Nt),e.component("Avue"+Rt.name,Rt)}};t["default"]=Pt},5124:function(e,t,i){var n=i("53c2");t=n(!1),t.push([e.i,".quick-input-widget{position:absolute;width:600px;z-index:2000;padding-bottom:6px;left:50%;margin-left:-300px}.quick-input-left-action-bar,.quick-input-titlebar{display:-webkit-box;display:-ms-flexbox;display:flex}.quick-input-left-action-bar{margin-left:4px;-webkit-box-flex:1;-ms-flex:1;flex:1}.quick-input-left-action-bar.monaco-action-bar .actions-container{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.quick-input-title{padding:3px 0;text-align:center}.quick-input-right-action-bar{display:-webkit-box;display:-ms-flexbox;display:flex;margin-right:4px;-webkit-box-flex:1;-ms-flex:1;flex:1}.quick-input-titlebar .monaco-action-bar .action-label.codicon{margin:0;width:19px;height:100%;background-position:50%;background-repeat:no-repeat}.quick-input-description{margin:6px}.quick-input-header{display:-webkit-box;display:-ms-flexbox;display:flex;padding:6px 6px 0 6px;margin-bottom:-2px}.quick-input-widget.hidden-input .quick-input-header{padding:0;margin-bottom:0}.quick-input-and-message{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;position:relative}.quick-input-check-all{-ms-flex-item-align:center;align-self:center;margin:0}.quick-input-filter{display:-webkit-box;display:-ms-flexbox;display:flex;position:relative}.quick-input-box,.quick-input-filter{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1}.quick-input-widget.show-checkboxes .quick-input-box,.quick-input-widget.show-checkboxes .quick-input-message{margin-left:5px}.quick-input-visible-count{position:absolute;left:-10000px}.quick-input-count{-ms-flex-item-align:center;align-self:center;position:absolute;right:4px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.quick-input-count .monaco-count-badge{vertical-align:middle;padding:2px 4px;border-radius:2px;min-height:auto;line-height:normal}.quick-input-action{margin-left:6px}.quick-input-action .monaco-text-button{font-size:11px;padding:0 6px;display:-webkit-box;display:-ms-flexbox;display:flex;height:100%;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.quick-input-message{margin-top:-1px;padding:5px 5px 2px 5px}.quick-input-progress.monaco-progress-container{position:relative}.quick-input-progress.monaco-progress-container,.quick-input-progress.monaco-progress-container .progress-bit{height:2px}.quick-input-list{line-height:22px;margin-top:6px}.quick-input-widget.hidden-input .quick-input-list{margin-top:0}.quick-input-list .monaco-list{overflow:hidden;max-height:440px}.quick-input-list .quick-input-list-entry{-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden;display:-webkit-box;display:-ms-flexbox;display:flex;height:100%;padding:0 6px}.quick-input-list .quick-input-list-entry.quick-input-list-separator-border{border-top-width:1px;border-top-style:solid}.quick-input-list .monaco-list-row:first-child .quick-input-list-entry.quick-input-list-separator-border{border-top-style:none}.quick-input-list .quick-input-list-label{overflow:hidden;display:-webkit-box;display:-ms-flexbox;display:flex;height:100%;-webkit-box-flex:1;-ms-flex:1;flex:1}.quick-input-list .quick-input-list-checkbox{-ms-flex-item-align:center;align-self:center;margin:0}.quick-input-list .quick-input-list-rows{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;height:100%;-webkit-box-flex:1;-ms-flex:1;flex:1;margin-left:5px}.quick-input-widget.show-checkboxes .quick-input-list .quick-input-list-rows{margin-left:10px}.quick-input-widget .quick-input-list .quick-input-list-checkbox{display:none}.quick-input-widget.show-checkboxes .quick-input-list .quick-input-list-checkbox{display:inline}.quick-input-list .quick-input-list-rows>.quick-input-list-row{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.quick-input-list .quick-input-list-rows>.quick-input-list-row .monaco-icon-label,.quick-input-list .quick-input-list-rows>.quick-input-list-row .monaco-icon-label .monaco-icon-label-container>.monaco-icon-name-container{-webkit-box-flex:1;-ms-flex:1;flex:1}.quick-input-list .quick-input-list-rows>.quick-input-list-row .codicon[class*=codicon-]{vertical-align:sub}.quick-input-list .quick-input-list-rows .monaco-highlighted-label span{opacity:1}.quick-input-list .quick-input-list-entry .quick-input-list-entry-keybinding{margin-right:8px}.quick-input-list .quick-input-list-label-meta{opacity:.7;line-height:normal;text-overflow:ellipsis;overflow:hidden}.quick-input-list .monaco-highlighted-label .highlight{font-weight:700}.quick-input-list .quick-input-list-entry .quick-input-list-separator{margin-right:8px}.quick-input-list .quick-input-list-entry-action-bar{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:0;-ms-flex:0;flex:0;overflow:visible}.quick-input-list .quick-input-list-entry-action-bar .action-label{display:none}.quick-input-list .quick-input-list-entry-action-bar .action-label.codicon{margin:0;height:100%;padding:0 2px;vertical-align:middle}.quick-input-list .quick-input-list-entry-action-bar{margin-top:1px;margin-right:4px}.quick-input-list .quick-input-list-entry-action-bar .action-label.codicon{margin-right:4px}.quick-input-list .monaco-list-row.focused .quick-input-list-entry-action-bar .action-label,.quick-input-list .quick-input-list-entry .quick-input-list-entry-action-bar .action-label.always-visible,.quick-input-list .quick-input-list-entry:hover .quick-input-list-entry-action-bar .action-label{display:-webkit-box;display:-ms-flexbox;display:flex}",""]),e.exports=t},"52a2":function(e,t){var i={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==i.call(e)}},5350:function(e,t,i){var n=i("986e"),o=i("76b2"),r=n("keys");e.exports=function(e){return r[e]||(r[e]=o(e))}},"53c2":function(e,t,i){"use strict";function n(e,t){var i=e[1]||"",n=e[3];if(!n)return i;if(t&&"function"===typeof btoa){var r=o(n),s=n.sources.map((function(e){return"/*# sourceURL=".concat(n.sourceRoot||"").concat(e," */")}));return[i].concat(s).concat([r]).join("\n")}return[i].join("\n")}function o(e){var t=btoa(unescape(encodeURIComponent(JSON.stringify(e)))),i="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(t);return"/*# ".concat(i," */")}e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var i=n(t,e);return t[2]?"@media ".concat(t[2]," {").concat(i,"}"):i})).join("")},t.i=function(e,i,n){"string"===typeof e&&(e=[[null,e,""]]);var o={};if(n)for(var r=0;r<this.length;r++){var s=this[r][0];null!=s&&(o[s]=!0)}for(var a=0;a<e.length;a++){var l=[].concat(e[a]);n&&o[l[0]]||(i&&(l[2]?l[2]="".concat(i," and ").concat(l[2]):l[2]=i),t.push(l))}},t}},"53d7":function(e,t,i){var n=i("f68d");"string"===typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);var o=i("4974").default;o("8674e010",n,!0,{sourceMap:!1,shadowMode:!1})},"53ff":function(e,t){e.exports=function(e){try{return{error:!1,value:e()}}catch(t){return{error:!0,value:t}}}},5491:function(e,t,i){"use strict";i.d(t,"a",(function(){return n}));i("c225"),i("02de"),i("40cd"),i("e2da"),i("fa89"),i("a078"),i("95d1");function n(e){return n="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}},"55ab":function(e,t,i){var n=i("ac97");e.exports=!n((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},"58a5":function(e,t,i){var n=i("53c2");t=n(!1),t.push([e.i,".monaco-inputbox{position:relative;display:block;padding:0;-webkit-box-sizing:border-box;box-sizing:border-box;font-size:inherit}.monaco-inputbox.idle{border:1px solid transparent}.monaco-inputbox>.wrapper>.input,.monaco-inputbox>.wrapper>.mirror{padding:4px}.monaco-inputbox>.wrapper{position:relative;width:100%;height:100%}.monaco-inputbox>.wrapper>.input{display:inline-block;-webkit-box-sizing:border-box;box-sizing:border-box;width:100%;height:100%;line-height:inherit;border:none;font-family:inherit;font-size:inherit;resize:none;color:inherit}.monaco-inputbox>.wrapper>input{text-overflow:ellipsis}.monaco-inputbox>.wrapper>textarea.input{display:block;-ms-overflow-style:none;scrollbar-width:none;outline:none}.monaco-inputbox>.wrapper>textarea.input::-webkit-scrollbar{display:none}.monaco-inputbox>.wrapper>textarea.input.empty{white-space:nowrap}.monaco-inputbox>.wrapper>.mirror{position:absolute;display:inline-block;width:100%;top:0;left:0;-webkit-box-sizing:border-box;box-sizing:border-box;white-space:pre-wrap;visibility:hidden;word-wrap:break-word}.monaco-inputbox-container{text-align:right}.monaco-inputbox-container .monaco-inputbox-message{display:inline-block;overflow:hidden;text-align:left;width:100%;-webkit-box-sizing:border-box;box-sizing:border-box;padding:.4em;font-size:12px;line-height:17px;min-height:34px;margin-top:-1px;word-wrap:break-word}.monaco-inputbox .monaco-action-bar{position:absolute;right:2px;top:4px}.monaco-inputbox .monaco-action-bar .action-item{margin-left:2px}.monaco-inputbox .monaco-action-bar .action-item .codicon{background-repeat:no-repeat;width:16px;height:16px}",""]),e.exports=t},"59cf":function(e,t,i){var n=i("1810"),o=n("iterator"),r=!1;try{var s=0,a={next:function(){return{done:!!s++}},return:function(){r=!0}};a[o]=function(){return this},Array.from(a,(function(){throw 2}))}catch(l){}e.exports=function(e,t){if(!t&&!r)return!1;var i=!1;try{var n={};n[o]=function(){return{next:function(){return{done:i=!0}}}},e(n)}catch(l){}return i}},"59e5":function(e,t,i){var n,o,r,s=i("e244"),a=i("ac97"),l=i("d6ed"),c=i("a780"),h=i("f146"),d=i("4ad5"),u=i("f79e"),g=s.location,f=s.setImmediate,m=s.clearImmediate,p=s.process,_=s.MessageChannel,b=s.Dispatch,v=0,w={},C="onreadystatechange",y=function(e){if(w.hasOwnProperty(e)){var t=w[e];delete w[e],t()}},S=function(e){return function(){y(e)}},x=function(e){y(e.data)},L=function(e){s.postMessage(e+"",g.protocol+"//"+g.host)};f&&m||(f=function(e){var t=[],i=1;while(arguments.length>i)t.push(arguments[i++]);return w[++v]=function(){("function"==typeof e?e:Function(e)).apply(void 0,t)},n(v),v},m=function(e){delete w[e]},u?n=function(e){p.nextTick(S(e))}:b&&b.now?n=function(e){b.now(S(e))}:_&&!d?(o=new _,r=o.port2,o.port1.onmessage=x,n=l(r.postMessage,r,1)):s.addEventListener&&"function"==typeof postMessage&&!s.importScripts&&g&&"file:"!==g.protocol&&!a(L)?(n=L,s.addEventListener("message",x,!1)):n=C in h("script")?function(e){c.appendChild(h("script"))[C]=function(){c.removeChild(this),y(e)}}:function(e){setTimeout(S(e),0)}),e.exports={set:f,clear:m}},"5a37":function(e,t,i){var n=i("53c2");t=n(!1),t.push([e.i,".codicon-wrench-subaction{opacity:.5}",""]),e.exports=t},"5a43":function(e,t,i){var n=i("c401");e.exports=Array.isArray||function(e){return"Array"==n(e)}},6023:function(e,t,i){var n=i("d53b"),o=i("d85b"),r=i("1810"),s=r("iterator");e.exports=function(e){if(void 0!=e)return e[s]||e["@@iterator"]||o[n(e)]}},6043:function(e,t,i){var n=i("642d"),o=i("e244"),r=function(e){return"function"==typeof e?e:void 0};e.exports=function(e,t){return arguments.length<2?r(n[e])||r(o[e]):n[e]&&n[e][t]||o[e]&&o[e][t]}},6120:function(e,t,i){var n=i("53c2");t=n(!1),t.push([e.i,".monaco-editor .inputarea{min-width:0;min-height:0;margin:0;padding:0;position:absolute;outline:none!important;resize:none;border:none;overflow:hidden;color:transparent;background-color:transparent}.monaco-editor .inputarea.ime-input{z-index:10}",""]),e.exports=t},6161:function(e,t,i){var n=i("7d86");e.exports=function(e,t,i){for(var o in t)n(e,o,t[o],i);return e}},"61b6":function(e,t,i){var n=i("53c2");t=n(!1),t.push([e.i,'*,:after,:before{-webkit-box-sizing:border-box;box-sizing:border-box}body{margin:0!important}#app{font-family:Avenir,Helvetica,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;color:#2c3e50;min-height:100%;height:100%}.form-designer{height:100%;background:#fff;outline:1px solid #e4e7ed}.form-designer ::-webkit-scrollbar{width:0!important;height:0!important}.form-designer ::-webkit-scrollbar-track{background-color:transparent!important}.form-designer ::-webkit-scrollbar-thumb,.form-designer ::-webkit-scrollbar-track{-webkit-box-shadow:inset 0 0 6px transparent!important;border-radius:10px!important}.form-designer ::-webkit-scrollbar-thumb{background-color:#fff!important}.form-designer .fields-list{padding:10px 0;width:100%;height:100%}.form-designer .fields-list .field-title{padding:8px 12px;font-size:13px}.form-designer .fields-list ul{position:relative;overflow:hidden;padding:0 10px 10px;margin:0}.form-designer .fields-list .field-label{font-size:12px;display:block;width:48%;line-height:26px;position:relative;float:left;left:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin:1%;color:#333;border:1px solid #f4f6fc}.form-designer .fields-list .field-label:hover{color:#409eff;border:1px dashed #409eff}.form-designer .fields-list .field-label>a{display:block;cursor:move;background:#f4f6fc;border:1px solid #f4f6fc}.form-designer .fields-list .field-label>a .icon{margin-right:6px;margin-left:8px;font-size:14px;display:inline-block;vertical-align:middle}.form-designer .fields-list .field-label>a span{display:inline-block;vertical-align:middle}.form-designer .fields-list .field-label-disabled{font-size:12px;display:block;width:48%;line-height:26px;position:relative;float:left;left:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin:1%;color:#333;border:1px solid #f4f6fc}.form-designer .fields-list .field-label-disabled:hover{color:grey;border:1px dashed grey}.form-designer .fields-list .field-label-disabled>a{display:block;cursor:not-allowed;background:#f4f6fc;border:1px solid #f4f6fc}.form-designer .fields-list .field-label-disabled>a .icon{margin-right:6px;margin-left:8px;font-size:14px;display:inline-block;vertical-align:middle}.form-designer .fields-list .field-label-disabled>a span{display:inline-block;vertical-align:middle}.form-designer .widget-container{-webkit-box-flex:1;-ms-flex:1;flex:1;border-left:1px solid #e0e0e0;border-right:1px solid #e0e0e0}.form-designer .widget-container .widget-container-header{height:45px!important;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center;border-bottom:2px solid #e4e7ed}.form-designer .widget-container .el-main{padding:0;position:relative}.form-designer .widget-form-container{height:100%;position:relative;top:0;left:0;right:0;bottom:0}.form-designer .widget-form-container .el-form,.form-designer .widget-form-container .el-form .el-row{height:100%}.form-designer .widget-form-container .widget-form-list{height:100%;min-height:calc(100% - 45px);padding-bottom:50px;overflow:hidden;overflow-y:scroll}.form-designer .widget-form-container .widget-form-list .widget-form-item{min-height:55px;padding:5px 10px 18px;margin:0;position:relative;border-left:5px solid transparent}.form-designer .widget-form-container .widget-form-list .widget-form-item.required .el-form-item__label:before{content:"*";color:#f56c6c;margin-right:4px}.form-designer .widget-form-container .widget-form-list .widget-form-item:after{position:absolute;left:0;right:0;bottom:0;top:0;display:block;z-index:1001}.form-designer .widget-form-container .widget-form-list .widget-form-item:hover{background:#ecf8ff;cursor:move}.form-designer .widget-form-container .widget-form-list .widget-form-item.active{border-left:3px solid #409eff;background:#ecf5ff}.form-designer .widget-form-container .widget-form-list .widget-form-item .widget-action-delete{position:absolute;right:10px;bottom:-32px;z-index:1002}.form-designer .widget-form-container .widget-form-list .widget-form-item .widget-action-clone{position:absolute;right:50px;bottom:-32px;z-index:1002}.form-designer .widget-form-container .widget-form-list .widget-form-table{position:relative;padding:2px;float:left;width:100%}.form-designer .widget-form-container .widget-form-list .widget-form-table__content{display:-webkit-box;display:-ms-flexbox;display:flex;padding:10px 5px;width:100%;height:100%;overflow-y:hidden;outline:1px dashed #ccc;outline-offset:-1px;min-height:103px}.form-designer .widget-form-container .widget-form-list .widget-form-table__content .ghost{background:#fff;border-left:5px solid #409eff;-webkit-box-sizing:border-box;box-sizing:border-box;font-size:0;content:"";overflow:hidden;padding:0!important;position:relative;outline:0 none;height:100%;min-height:90px;width:0!important;min-width:0!important;margin:1px 2px 0 2px}.form-designer .widget-form-container .widget-form-list .widget-form-table__item{position:relative;min-width:33.3%;width:33.3%;padding:1px;height:100%}.form-designer .widget-form-container .widget-form-list .widget-form-table__item.required .el-table__header .cell:before{content:"*";color:#f56c6c;margin-right:4px}.form-designer .widget-form-container .widget-form-list .widget-form-table__item.active{outline:1px solid #409eff;outline-offset:-1px}.form-designer .widget-form-container .widget-form-list .widget-form-table__item:hover{outline:1px solid #409eff;outline-offset:-1px;cursor:move}.form-designer .widget-form-container .widget-form-list .widget-form-table__item:after{position:absolute;left:0;right:0;bottom:0;top:0;display:block;content:"";z-index:1001}.form-designer .widget-form-container .widget-form-list .widget-form-table__item .widget-table-action-delete{position:absolute;right:0;bottom:0;z-index:1002}.form-designer .widget-form-container .widget-form-list .widget-form-table__item .widget-table-action-clone{position:absolute;right:30px;bottom:0;z-index:1002}.form-designer .widget-form-container .widget-form-list .widget-form-table__item .widget-table-action-clone i{font-size:10px}.form-designer .widget-form-container .widget-form-list .widget-form-table__item .el-button--small.is-circle{padding:5px}.form-designer .widget-form-container .widget-form-list .widget-form-table.active{border-left:3px solid #409eff;background:#ecf5ff}.form-designer .widget-form-container .widget-form-list .widget-form-table:hover{background:#ecf8ff;cursor:move}.form-designer .widget-form-container .widget-form-list .widget-form-table .widget-action-delete{position:absolute;right:10px;bottom:-12px;z-index:1001}.form-designer .widget-form-container .widget-form-list .widget-form-table .widget-action-clear{position:absolute;right:50px;bottom:-12px;z-index:1001}.form-designer .widget-form-container .widget-form-list .widget-form-table .widget-action-clone{position:absolute;right:90px;bottom:-12px;z-index:1001}.form-designer .widget-form-container .widget-form-list .widget-form-group{position:relative;width:100%;float:left;padding:2px}.form-designer .widget-form-container .widget-form-list .widget-form-group__head{margin:10px}.form-designer .widget-form-container .widget-form-list .widget-form-group__body{min-height:150px;height:100%;outline:1px dashed #ccc;outline-offset:-1px;overflow:hidden;padding-bottom:15px}.form-designer .widget-form-container .widget-form-list .widget-form-group__body .ghost{background:#fff;border-left:5px solid #409eff;-webkit-box-sizing:border-box;box-sizing:border-box;font-size:0;content:"";overflow:hidden;padding:0!important;position:relative;outline:0 none;height:100%;min-height:57px;width:0!important;min-width:0!important;margin:1px 2px 0 2px}.form-designer .widget-form-container .widget-form-list .widget-form-group__item{padding:10px;margin:3px;position:relative;border-left:5px solid transparent;background:#fff}.form-designer .widget-form-container .widget-form-list .widget-form-group__item.required .el-form-item__label:before{content:"*";color:#f56c6c;margin-right:4px}.form-designer .widget-form-container .widget-form-list .widget-form-group__item.active{outline:1px solid #409eff;outline-offset:-1px}.form-designer .widget-form-container .widget-form-list .widget-form-group__item:hover{outline:1px solid #409eff;outline-offset:-1px;cursor:move}.form-designer .widget-form-container .widget-form-list .widget-form-group__item:after{position:absolute;left:0;right:0;bottom:0;top:0;display:block;content:"";z-index:1001}.form-designer .widget-form-container .widget-form-list .widget-form-group__item--delete{position:absolute;right:0;bottom:-24px;z-index:1002}.form-designer .widget-form-container .widget-form-list .widget-form-group__item--clone{position:absolute;right:34px;bottom:-24px;z-index:1002}.form-designer .widget-form-container .widget-form-list .widget-form-group.active{border-left:3px solid #409eff;background:#ecf5ff}.form-designer .widget-form-container .widget-form-list .widget-form-group:hover{background:#ecf8ff;cursor:move}.form-designer .widget-form-container .widget-form-list .widget-form-group .widget-action-delete{position:absolute;right:10px;bottom:-12px;z-index:1001}.form-designer .widget-form-container .widget-form-list .widget-form-group .widget-action-clear{position:absolute;right:50px;bottom:-12px;z-index:1001}.form-designer .widget-form-container .widget-form-list .widget-form-group .widget-action-clone{position:absolute;right:90px;bottom:-12px;z-index:1001}.form-designer .widget-form-container .widget-form-list .iconfont{font-size:13px}.form-designer .widget-form-container .widget-form-list .el-button--small.is-circle{padding:7px}.form-designer .widget-form-container .ghost{background:#fff;border-top:5px solid #409eff;-webkit-box-sizing:border-box;box-sizing:border-box;font-size:0;content:"";overflow:hidden;padding:0!important;position:relative;outline:0 none;height:0!important;width:100%;margin:2px 0}.form-designer .widget-config-container{height:100%;padding-top:5px}.form-designer .widget-config-container .el-tabs{height:100%}.form-designer .widget-config-container .el-tabs__header{margin:0;width:380px;height:45px;background:#fff;z-index:1000}.form-designer .widget-config-container .el-tabs__content{height:calc(100% - 45px);overflow-y:scroll}.form-designer .widget-config-container .widget-config .el-tabs__header{position:relative;display:block;top:0;margin:0}.form-designer .widget-config-container .widget-config .el-tabs__content{margin-top:0}.form-designer .widget-config-container .widget-config .ghost{background:#fff;border:1px dashed #409eff}.form-designer .widget-config-container .widget-config ul{margin:0;padding:0}.form-designer .widget-config-container .widget-config ul li{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;width:100%}.form-designer .widget-config-container .widget-config ul li .ghost{list-style:none;font-size:0;height:35px}.form-designer .widget-config-container .avue-group__item{padding:0}.form-designer .el-container{height:100%}.form-designer .el-container .el-main{height:calc(100% - 45px)}.form-designer .el-container .el-aside{background:#fff}.form-designer .danger{color:#f56c6c}.form-designer .warning{color:#e6a23c}.drawer-foot{position:absolute;bottom:0;left:0;right:0;padding:20px;display:-webkit-box;display:-ms-flexbox;display:flex}.drawer-foot button{width:50%}.drawer-foot>span{display:inline-block;width:50%}.drawer-foot>span button{width:100%}.preview-form{overflow-y:scroll;height:83vh}.popper-bo .el-alert{margin-bottom:10px}.el-drawer__wrapper :focus{outline:0}',""]),e.exports=t},"61c0":function(e,t,i){"use strict";var n=i("4eaf").charAt;e.exports=function(e,t,i){return t+(i?n(e,t).length:1)}},"63ef":function(e,t,i){var n=i("b896").f,o=i("fe32"),r=i("1810"),s=r("toStringTag");e.exports=function(e,t,i){e&&!o(e=i?e:e.prototype,s)&&n(e,s,{configurable:!0,value:t})}},"642d":function(e,t,i){var n=i("e244");e.exports=n},6965:function(e,t,i){var n=i("1810"),o=n("toStringTag"),r={};r[o]="z",e.exports="[object z]"===String(r)},"69f1":function(e,t,i){var n=i("55ab"),o=i("b896"),r=i("4d82");e.exports=n?function(e,t,i){return o.f(e,t,r(1,i))}:function(e,t,i){return e[t]=i,e}},"6a0b":function(e,t,i){var n=i("53c2");t=n(!1),t.push([e.i,".monaco-editor .overlayWidgets{position:absolute;top:0;left:0}",""]),e.exports=t},"6aad":function(e,t,i){var n=i("53c2");t=n(!1),t.push([e.i,".monaco-diff-editor .diff-review-line-number{text-align:right;display:inline-block}.monaco-diff-editor .diff-review{position:absolute;-moz-user-select:none;user-select:none;-webkit-user-select:none;-ms-user-select:none}.monaco-diff-editor .diff-review-summary{padding-left:10px}.monaco-diff-editor .diff-review-shadow{position:absolute}.monaco-diff-editor .diff-review-row{white-space:pre}.monaco-diff-editor .diff-review-table{display:table;min-width:100%}.monaco-diff-editor .diff-review-row{display:table-row;width:100%}.monaco-diff-editor .diff-review-spacer{display:inline-block;width:10px;vertical-align:middle}.monaco-diff-editor .diff-review-spacer>.codicon{font-size:9px!important}.monaco-diff-editor .diff-review-actions{display:inline-block;position:absolute;right:10px;top:2px}.monaco-diff-editor .diff-review-actions .action-label{width:16px;height:16px;margin:2px 0}",""]),e.exports=t},"6baf":function(e,t,i){var n=i("642d"),o=i("fe32"),r=i("aca4"),s=i("b896").f;e.exports=function(e){var t=n.Symbol||(n.Symbol={});o(t,e)||s(t,e,{value:r.f(e)})}},"6cd1":function(e,t,i){var n=i("53c2");t=n(!1),t.push([e.i,".monaco-editor .margin-view-overlays .line-numbers{font-variant-numeric:tabular-nums;position:absolute;text-align:right;display:inline-block;vertical-align:middle;-webkit-box-sizing:border-box;box-sizing:border-box;cursor:default;height:100%}.monaco-editor .relative-current-line-number{text-align:left;display:inline-block;width:100%}.monaco-editor .margin-view-overlays .line-numbers.lh-odd{margin-top:1px}",""]),e.exports=t},"6e10":function(e,t,i){var n=i("1810"),o=i("ca2b"),r=i("b896"),s=n("unscopables"),a=Array.prototype;void 0==a[s]&&r.f(a,s,{configurable:!0,value:o(null)}),e.exports=function(e){a[s][e]=!0}},"6e1d":function(e,t,i){"use strict";var n=i("ff5c"),o=i("030e"),r=RegExp.prototype.exec,s=String.prototype.replace,a=r,l=function(){var e=/a/,t=/b*/g;return r.call(e,"a"),r.call(t,"a"),0!==e.lastIndex||0!==t.lastIndex}(),c=o.UNSUPPORTED_Y||o.BROKEN_CARET,h=void 0!==/()??/.exec("")[1],d=l||h||c;d&&(a=function(e){var t,i,o,a,d=this,u=c&&d.sticky,g=n.call(d),f=d.source,m=0,p=e;return u&&(g=g.replace("y",""),-1===g.indexOf("g")&&(g+="g"),p=String(e).slice(d.lastIndex),d.lastIndex>0&&(!d.multiline||d.multiline&&"\n"!==e[d.lastIndex-1])&&(f="(?: "+f+")",p=" "+p,m++),i=new RegExp("^(?:"+f+")",g)),h&&(i=new RegExp("^"+f+"$(?!\\s)",g)),l&&(t=d.lastIndex),o=r.call(u?i:d,p),u?o?(o.input=o.input.slice(m),o[0]=o[0].slice(m),o.index=d.lastIndex,d.lastIndex+=o[0].length):d.lastIndex=0:l&&o&&(d.lastIndex=d.global?o.index+o[0].length:t),h&&o&&o.length>1&&s.call(o[0],i,(function(){for(a=1;a<arguments.length-2;a++)void 0===arguments[a]&&(o[a]=void 0)})),o}),e.exports=a},"6edd":function(e,t,i){"use strict";var n=i("83ec"),o=i("f226").indexOf,r=i("3d1a"),s=i("9f1e"),a=[].indexOf,l=!!a&&1/[1].indexOf(1,-0)<0,c=r("indexOf"),h=s("indexOf",{ACCESSORS:!0,1:0});n({target:"Array",proto:!0,forced:l||!c||!h},{indexOf:function(e){return l?a.apply(this,arguments)||0:o(this,e,arguments.length>1?arguments[1]:void 0)}})},7043:function(e,t,i){var n=i("e5d9");"string"===typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);var o=i("4974").default;o("e71c809e",n,!0,{sourceMap:!1,shadowMode:!1})},"70a8":function(e,t,i){var n=i("6a0b");"string"===typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);var o=i("4974").default;o("66c11253",n,!0,{sourceMap:!1,shadowMode:!1})},7115:function(e,t,i){var n=i("c09a");"string"===typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);var o=i("4974").default;o("bf659326",n,!0,{sourceMap:!1,shadowMode:!1})},"72b1":function(e,t,i){var n=i("407e");"string"===typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);var o=i("4974").default;o("30943f45",n,!0,{sourceMap:!1,shadowMode:!1})},"72c7":function(e,t,i){var n=i("e244"),o=i("69f1");e.exports=function(e,t){try{o(n,e,t)}catch(i){n[e]=t}return t}},"72d4":function(e,t,i){var n=i("ac97"),o=i("1810"),r=i("2c21"),s=o("species");e.exports=function(e){return r>=51||!n((function(){var t=[],i=t.constructor={};return i[s]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},7352:function(e,t,i){"use strict";var n=i("e820"),o=i("7439"),r=i("fbcf"),s=i("0874"),a=i("a55b"),l=i("61c0"),c=i("ce47"),h=i("ec23"),d=i("6e1d"),u=i("ac97"),g=[].push,f=Math.min,m=4294967295,p=!u((function(){return!RegExp(m,"y")}));n("split",2,(function(e,t,i){var n;return n="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,i){var n=String(s(this)),r=void 0===i?m:i>>>0;if(0===r)return[];if(void 0===e)return[n];if(!o(e))return t.call(n,e,r);var a,l,c,h=[],u=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),f=0,p=new RegExp(e.source,u+"g");while(a=d.call(p,n)){if(l=p.lastIndex,l>f&&(h.push(n.slice(f,a.index)),a.length>1&&a.index<n.length&&g.apply(h,a.slice(1)),c=a[0].length,f=l,h.length>=r))break;p.lastIndex===a.index&&p.lastIndex++}return f===n.length?!c&&p.test("")||h.push(""):h.push(n.slice(f)),h.length>r?h.slice(0,r):h}:"0".split(void 0,0).length?function(e,i){return void 0===e&&0===i?[]:t.call(this,e,i)}:t,[function(t,i){var o=s(this),r=void 0==t?void 0:t[e];return void 0!==r?r.call(t,o,i):n.call(String(o),t,i)},function(e,o){var s=i(n,e,this,o,n!==t);if(s.done)return s.value;var d=r(e),u=String(this),g=a(d,RegExp),_=d.unicode,b=(d.ignoreCase?"i":"")+(d.multiline?"m":"")+(d.unicode?"u":"")+(p?"y":"g"),v=new g(p?d:"^(?:"+d.source+")",b),w=void 0===o?m:o>>>0;if(0===w)return[];if(0===u.length)return null===h(v,u)?[u]:[];var C=0,y=0,S=[];while(y<u.length){v.lastIndex=p?y:0;var x,L=h(v,p?u:u.slice(y));if(null===L||(x=f(c(v.lastIndex+(p?0:y)),u.length))===C)y=l(u,y,_);else{if(S.push(u.slice(C,y)),S.length===w)return S;for(var k=1;k<=L.length-1;k++)if(S.push(L[k]),S.length===w)return S;y=C=x}}return S.push(u.slice(C)),S}]}),!p)},7439:function(e,t,i){var n=i("eee7"),o=i("c401"),r=i("1810"),s=r("match");e.exports=function(e){var t;return n(e)&&(void 0!==(t=e[s])?!!t:"RegExp"==o(e))}},"769f":function(e,t,i){var n=i("f3d6");"string"===typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);var o=i("4974").default;o("425648c8",n,!0,{sourceMap:!1,shadowMode:!1})},"76b2":function(e,t){var i=0,n=Math.random();e.exports=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++i+n).toString(36)}},"76d1":function(e,t,i){"use strict";
  2. /**!
  3. * Sortable 1.10.2
  4. * @author RubaXa <trash@rubaxa.org>
  5. * @author owenm <owen23355@gmail.com>
  6. * @license MIT
  7. */
  8. function n(e){return n="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function r(){return r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},r.apply(this,arguments)}function s(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{},n=Object.keys(i);"function"===typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(i).filter((function(e){return Object.getOwnPropertyDescriptor(i,e).enumerable})))),n.forEach((function(t){o(e,t,i[t])}))}return e}function a(e,t){if(null==e)return{};var i,n,o={},r=Object.keys(e);for(n=0;n<r.length;n++)i=r[n],t.indexOf(i)>=0||(o[i]=e[i]);return o}function l(e,t){if(null==e)return{};var i,n,o=a(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(n=0;n<r.length;n++)i=r[n],t.indexOf(i)>=0||Object.prototype.propertyIsEnumerable.call(e,i)&&(o[i]=e[i])}return o}function c(e){return h(e)||d(e)||u()}function h(e){if(Array.isArray(e)){for(var t=0,i=new Array(e.length);t<e.length;t++)i[t]=e[t];return i}}function d(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}function u(){throw new TypeError("Invalid attempt to spread non-iterable instance")}i.r(t),i.d(t,"MultiDrag",(function(){return Wt})),i.d(t,"Sortable",(function(){return Qe})),i.d(t,"Swap",(function(){return kt}));var g="1.10.2";function f(e){if("undefined"!==typeof window&&window.navigator)return!!navigator.userAgent.match(e)}var m=f(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),p=f(/Edge/i),_=f(/firefox/i),b=f(/safari/i)&&!f(/chrome/i)&&!f(/android/i),v=f(/iP(ad|od|hone)/i),w=f(/chrome/i)&&f(/android/i),C={capture:!1,passive:!1};function y(e,t,i){e.addEventListener(t,i,!m&&C)}function S(e,t,i){e.removeEventListener(t,i,!m&&C)}function x(e,t){if(t){if(">"===t[0]&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch(i){return!1}return!1}}function L(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function k(e,t,i,n){if(e){i=i||document;do{if(null!=t&&(">"===t[0]?e.parentNode===i&&x(e,t):x(e,t))||n&&e===i)return e;if(e===i)break}while(e=L(e))}return null}var E,D=/\s+/g;function N(e,t,i){if(e&&t)if(e.classList)e.classList[i?"add":"remove"](t);else{var n=(" "+e.className+" ").replace(D," ").replace(" "+t+" "," ");e.className=(n+(i?" "+t:"")).replace(D," ")}}function T(e,t,i){var n=e&&e.style;if(n){if(void 0===i)return document.defaultView&&document.defaultView.getComputedStyle?i=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(i=e.currentStyle),void 0===t?i:i[t];t in n||-1!==t.indexOf("webkit")||(t="-webkit-"+t),n[t]=i+("string"===typeof i?"":"px")}}function M(e,t){var i="";if("string"===typeof e)i=e;else do{var n=T(e,"transform");n&&"none"!==n&&(i=n+" "+i)}while(!t&&(e=e.parentNode));var o=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return o&&new o(i)}function I(e,t,i){if(e){var n=e.getElementsByTagName(t),o=0,r=n.length;if(i)for(;o<r;o++)i(n[o],o);return n}return[]}function O(){var e=document.scrollingElement;return e||document.documentElement}function A(e,t,i,n,o){if(e.getBoundingClientRect||e===window){var r,s,a,l,c,h,d;if(e!==window&&e!==O()?(r=e.getBoundingClientRect(),s=r.top,a=r.left,l=r.bottom,c=r.right,h=r.height,d=r.width):(s=0,a=0,l=window.innerHeight,c=window.innerWidth,h=window.innerHeight,d=window.innerWidth),(t||i)&&e!==window&&(o=o||e.parentNode,!m))do{if(o&&o.getBoundingClientRect&&("none"!==T(o,"transform")||i&&"static"!==T(o,"position"))){var u=o.getBoundingClientRect();s-=u.top+parseInt(T(o,"border-top-width")),a-=u.left+parseInt(T(o,"border-left-width")),l=s+r.height,c=a+r.width;break}}while(o=o.parentNode);if(n&&e!==window){var g=M(o||e),f=g&&g.a,p=g&&g.d;g&&(s/=p,a/=f,d/=f,h/=p,l=s+h,c=a+d)}return{top:s,left:a,bottom:l,right:c,width:d,height:h}}}function R(e,t,i){var n=H(e,!0),o=A(e)[t];while(n){var r=A(n)[i],s=void 0;if(s="top"===i||"left"===i?o>=r:o<=r,!s)return n;if(n===O())break;n=H(n,!1)}return!1}function P(e,t,i){var n=0,o=0,r=e.children;while(o<r.length){if("none"!==r[o].style.display&&r[o]!==Qe.ghost&&r[o]!==Qe.dragged&&k(r[o],i.draggable,e,!1)){if(n===t)return r[o];n++}o++}return null}function F(e,t){var i=e.lastElementChild;while(i&&(i===Qe.ghost||"none"===T(i,"display")||t&&!x(i,t)))i=i.previousElementSibling;return i||null}function W(e,t){var i=0;if(!e||!e.parentNode)return-1;while(e=e.previousElementSibling)"TEMPLATE"===e.nodeName.toUpperCase()||e===Qe.clone||t&&!x(e,t)||i++;return i}function B(e){var t=0,i=0,n=O();if(e)do{var o=M(e),r=o.a,s=o.d;t+=e.scrollLeft*r,i+=e.scrollTop*s}while(e!==n&&(e=e.parentNode));return[t,i]}function V(e,t){for(var i in e)if(e.hasOwnProperty(i))for(var n in t)if(t.hasOwnProperty(n)&&t[n]===e[i][n])return Number(i);return-1}function H(e,t){if(!e||!e.getBoundingClientRect)return O();var i=e,n=!1;do{if(i.clientWidth<i.scrollWidth||i.clientHeight<i.scrollHeight){var o=T(i);if(i.clientWidth<i.scrollWidth&&("auto"==o.overflowX||"scroll"==o.overflowX)||i.clientHeight<i.scrollHeight&&("auto"==o.overflowY||"scroll"==o.overflowY)){if(!i.getBoundingClientRect||i===document.body)return O();if(n||t)return i;n=!0}}}while(i=i.parentNode);return O()}function z(e,t){if(e&&t)for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);return e}function U(e,t){return Math.round(e.top)===Math.round(t.top)&&Math.round(e.left)===Math.round(t.left)&&Math.round(e.height)===Math.round(t.height)&&Math.round(e.width)===Math.round(t.width)}function j(e,t){return function(){if(!E){var i=arguments,n=this;1===i.length?e.call(n,i[0]):e.apply(n,i),E=setTimeout((function(){E=void 0}),t)}}}function K(){clearTimeout(E),E=void 0}function q(e,t,i){e.scrollLeft+=t,e.scrollTop+=i}function $(e){var t=window.Polymer,i=window.jQuery||window.Zepto;return t&&t.dom?t.dom(e).cloneNode(!0):i?i(e).clone(!0)[0]:e.cloneNode(!0)}function G(e,t){T(e,"position","absolute"),T(e,"top",t.top),T(e,"left",t.left),T(e,"width",t.width),T(e,"height",t.height)}function Y(e){T(e,"position",""),T(e,"top",""),T(e,"left",""),T(e,"width",""),T(e,"height","")}var X="Sortable"+(new Date).getTime();function Z(){var e,t=[];return{captureAnimationState:function(){if(t=[],this.options.animation){var e=[].slice.call(this.el.children);e.forEach((function(e){if("none"!==T(e,"display")&&e!==Qe.ghost){t.push({target:e,rect:A(e)});var i=s({},t[t.length-1].rect);if(e.thisAnimationDuration){var n=M(e,!0);n&&(i.top-=n.f,i.left-=n.e)}e.fromRect=i}}))}},addAnimationState:function(e){t.push(e)},removeAnimationState:function(e){t.splice(V(t,{target:e}),1)},animateAll:function(i){var n=this;if(!this.options.animation)return clearTimeout(e),void("function"===typeof i&&i());var o=!1,r=0;t.forEach((function(e){var t=0,i=e.target,s=i.fromRect,a=A(i),l=i.prevFromRect,c=i.prevToRect,h=e.rect,d=M(i,!0);d&&(a.top-=d.f,a.left-=d.e),i.toRect=a,i.thisAnimationDuration&&U(l,a)&&!U(s,a)&&(h.top-a.top)/(h.left-a.left)===(s.top-a.top)/(s.left-a.left)&&(t=J(h,l,c,n.options)),U(a,s)||(i.prevFromRect=s,i.prevToRect=a,t||(t=n.options.animation),n.animate(i,h,a,t)),t&&(o=!0,r=Math.max(r,t),clearTimeout(i.animationResetTimer),i.animationResetTimer=setTimeout((function(){i.animationTime=0,i.prevFromRect=null,i.fromRect=null,i.prevToRect=null,i.thisAnimationDuration=null}),t),i.thisAnimationDuration=t)})),clearTimeout(e),o?e=setTimeout((function(){"function"===typeof i&&i()}),r):"function"===typeof i&&i(),t=[]},animate:function(e,t,i,n){if(n){T(e,"transition",""),T(e,"transform","");var o=M(this.el),r=o&&o.a,s=o&&o.d,a=(t.left-i.left)/(r||1),l=(t.top-i.top)/(s||1);e.animatingX=!!a,e.animatingY=!!l,T(e,"transform","translate3d("+a+"px,"+l+"px,0)"),Q(e),T(e,"transition","transform "+n+"ms"+(this.options.easing?" "+this.options.easing:"")),T(e,"transform","translate3d(0,0,0)"),"number"===typeof e.animated&&clearTimeout(e.animated),e.animated=setTimeout((function(){T(e,"transition",""),T(e,"transform",""),e.animated=!1,e.animatingX=!1,e.animatingY=!1}),n)}}}}function Q(e){return e.offsetWidth}function J(e,t,i,n){return Math.sqrt(Math.pow(t.top-e.top,2)+Math.pow(t.left-e.left,2))/Math.sqrt(Math.pow(t.top-i.top,2)+Math.pow(t.left-i.left,2))*n.animation}var ee=[],te={initializeByDefault:!0},ie={mount:function(e){for(var t in te)te.hasOwnProperty(t)&&!(t in e)&&(e[t]=te[t]);ee.push(e)},pluginEvent:function(e,t,i){var n=this;this.eventCanceled=!1,i.cancel=function(){n.eventCanceled=!0};var o=e+"Global";ee.forEach((function(n){t[n.pluginName]&&(t[n.pluginName][o]&&t[n.pluginName][o](s({sortable:t},i)),t.options[n.pluginName]&&t[n.pluginName][e]&&t[n.pluginName][e](s({sortable:t},i)))}))},initializePlugins:function(e,t,i,n){for(var o in ee.forEach((function(n){var o=n.pluginName;if(e.options[o]||n.initializeByDefault){var s=new n(e,t,e.options);s.sortable=e,s.options=e.options,e[o]=s,r(i,s.defaults)}})),e.options)if(e.options.hasOwnProperty(o)){var s=this.modifyOption(e,o,e.options[o]);"undefined"!==typeof s&&(e.options[o]=s)}},getEventProperties:function(e,t){var i={};return ee.forEach((function(n){"function"===typeof n.eventProperties&&r(i,n.eventProperties.call(t[n.pluginName],e))})),i},modifyOption:function(e,t,i){var n;return ee.forEach((function(o){e[o.pluginName]&&o.optionListeners&&"function"===typeof o.optionListeners[t]&&(n=o.optionListeners[t].call(e[o.pluginName],i))})),n}};function ne(e){var t=e.sortable,i=e.rootEl,n=e.name,o=e.targetEl,r=e.cloneEl,a=e.toEl,l=e.fromEl,c=e.oldIndex,h=e.newIndex,d=e.oldDraggableIndex,u=e.newDraggableIndex,g=e.originalEvent,f=e.putSortable,_=e.extraEventProperties;if(t=t||i&&i[X],t){var b,v=t.options,w="on"+n.charAt(0).toUpperCase()+n.substr(1);!window.CustomEvent||m||p?(b=document.createEvent("Event"),b.initEvent(n,!0,!0)):b=new CustomEvent(n,{bubbles:!0,cancelable:!0}),b.to=a||i,b.from=l||i,b.item=o||i,b.clone=r,b.oldIndex=c,b.newIndex=h,b.oldDraggableIndex=d,b.newDraggableIndex=u,b.originalEvent=g,b.pullMode=f?f.lastPutMode:void 0;var C=s({},_,ie.getEventProperties(n,t));for(var y in C)b[y]=C[y];i&&i.dispatchEvent(b),v[w]&&v[w].call(t,b)}}var oe=function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=i.evt,o=l(i,["evt"]);ie.pluginEvent.bind(Qe)(e,t,s({dragEl:se,parentEl:ae,ghostEl:le,rootEl:ce,nextEl:he,lastDownEl:de,cloneEl:ue,cloneHidden:ge,dragStarted:ke,putSortable:ve,activeSortable:Qe.active,originalEvent:n,oldIndex:fe,oldDraggableIndex:pe,newIndex:me,newDraggableIndex:_e,hideGhostForTarget:Ge,unhideGhostForTarget:Ye,cloneNowHidden:function(){ge=!0},cloneNowShown:function(){ge=!1},dispatchSortableEvent:function(e){re({sortable:t,name:e,originalEvent:n})}},o))};function re(e){ne(s({putSortable:ve,cloneEl:ue,targetEl:se,rootEl:ce,oldIndex:fe,oldDraggableIndex:pe,newIndex:me,newDraggableIndex:_e},e))}var se,ae,le,ce,he,de,ue,ge,fe,me,pe,_e,be,ve,we,Ce,ye,Se,xe,Le,ke,Ee,De,Ne,Te,Me=!1,Ie=!1,Oe=[],Ae=!1,Re=!1,Pe=[],Fe=!1,We=[],Be="undefined"!==typeof document,Ve=v,He=p||m?"cssFloat":"float",ze=Be&&!w&&!v&&"draggable"in document.createElement("div"),Ue=function(){if(Be){if(m)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto","auto"===e.style.pointerEvents}}(),je=function(e,t){var i=T(e),n=parseInt(i.width)-parseInt(i.paddingLeft)-parseInt(i.paddingRight)-parseInt(i.borderLeftWidth)-parseInt(i.borderRightWidth),o=P(e,0,t),r=P(e,1,t),s=o&&T(o),a=r&&T(r),l=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+A(o).width,c=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+A(r).width;if("flex"===i.display)return"column"===i.flexDirection||"column-reverse"===i.flexDirection?"vertical":"horizontal";if("grid"===i.display)return i.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(o&&s["float"]&&"none"!==s["float"]){var h="left"===s["float"]?"left":"right";return!r||"both"!==a.clear&&a.clear!==h?"horizontal":"vertical"}return o&&("block"===s.display||"flex"===s.display||"table"===s.display||"grid"===s.display||l>=n&&"none"===i[He]||r&&"none"===i[He]&&l+c>n)?"vertical":"horizontal"},Ke=function(e,t,i){var n=i?e.left:e.top,o=i?e.right:e.bottom,r=i?e.width:e.height,s=i?t.left:t.top,a=i?t.right:t.bottom,l=i?t.width:t.height;return n===s||o===a||n+r/2===s+l/2},qe=function(e,t){var i;return Oe.some((function(n){if(!F(n)){var o=A(n),r=n[X].options.emptyInsertThreshold,s=e>=o.left-r&&e<=o.right+r,a=t>=o.top-r&&t<=o.bottom+r;return r&&s&&a?i=n:void 0}})),i},$e=function(e){function t(e,i){return function(n,o,r,s){var a=n.options.group.name&&o.options.group.name&&n.options.group.name===o.options.group.name;if(null==e&&(i||a))return!0;if(null==e||!1===e)return!1;if(i&&"clone"===e)return e;if("function"===typeof e)return t(e(n,o,r,s),i)(n,o,r,s);var l=(i?n:o).options.group.name;return!0===e||"string"===typeof e&&e===l||e.join&&e.indexOf(l)>-1}}var i={},o=e.group;o&&"object"==n(o)||(o={name:o}),i.name=o.name,i.checkPull=t(o.pull,!0),i.checkPut=t(o.put),i.revertClone=o.revertClone,e.group=i},Ge=function(){!Ue&&le&&T(le,"display","none")},Ye=function(){!Ue&&le&&T(le,"display","")};Be&&document.addEventListener("click",(function(e){if(Ie)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),Ie=!1,!1}),!0);var Xe=function(e){if(se){e=e.touches?e.touches[0]:e;var t=qe(e.clientX,e.clientY);if(t){var i={};for(var n in e)e.hasOwnProperty(n)&&(i[n]=e[n]);i.target=i.rootEl=t,i.preventDefault=void 0,i.stopPropagation=void 0,t[X]._onDragOver(i)}}},Ze=function(e){se&&se.parentNode[X]._isOutsideThisEl(e.target)};function Qe(e,t){if(!e||!e.nodeType||1!==e.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=r({},t),e[X]=this;var i={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return je(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(e,t){e.setData("Text",t.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==Qe.supportPointer&&"PointerEvent"in window,emptyInsertThreshold:5};for(var n in ie.initializePlugins(this,e,i),i)!(n in t)&&(t[n]=i[n]);for(var o in $e(t),this)"_"===o.charAt(0)&&"function"===typeof this[o]&&(this[o]=this[o].bind(this));this.nativeDraggable=!t.forceFallback&&ze,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?y(e,"pointerdown",this._onTapStart):(y(e,"mousedown",this._onTapStart),y(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(y(e,"dragover",this),y(e,"dragenter",this)),Oe.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),r(this,Z())}function Je(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move"),e.cancelable&&e.preventDefault()}function et(e,t,i,n,o,r,s,a){var l,c,h=e[X],d=h.options.onMove;return!window.CustomEvent||m||p?(l=document.createEvent("Event"),l.initEvent("move",!0,!0)):l=new CustomEvent("move",{bubbles:!0,cancelable:!0}),l.to=t,l.from=e,l.dragged=i,l.draggedRect=n,l.related=o||t,l.relatedRect=r||A(t),l.willInsertAfter=a,l.originalEvent=s,e.dispatchEvent(l),d&&(c=d.call(h,l,s)),c}function tt(e){e.draggable=!1}function it(){Fe=!1}function nt(e,t,i){var n=A(F(i.el,i.options.draggable)),o=10;return t?e.clientX>n.right+o||e.clientX<=n.right&&e.clientY>n.bottom&&e.clientX>=n.left:e.clientX>n.right&&e.clientY>n.top||e.clientX<=n.right&&e.clientY>n.bottom+o}function ot(e,t,i,n,o,r,s,a){var l=n?e.clientY:e.clientX,c=n?i.height:i.width,h=n?i.top:i.left,d=n?i.bottom:i.right,u=!1;if(!s)if(a&&Ne<c*o){if(!Ae&&(1===De?l>h+c*r/2:l<d-c*r/2)&&(Ae=!0),Ae)u=!0;else if(1===De?l<h+Ne:l>d-Ne)return-De}else if(l>h+c*(1-o)/2&&l<d-c*(1-o)/2)return rt(t);return u=u||s,u&&(l<h+c*r/2||l>d-c*r/2)?l>h+c/2?1:-1:0}function rt(e){return W(se)<W(e)?1:-1}function st(e){var t=e.tagName+e.className+e.src+e.href+e.textContent,i=t.length,n=0;while(i--)n+=t.charCodeAt(i);return n.toString(36)}function at(e){We.length=0;var t=e.getElementsByTagName("input"),i=t.length;while(i--){var n=t[i];n.checked&&We.push(n)}}function lt(e){return setTimeout(e,0)}function ct(e){return clearTimeout(e)}Qe.prototype={constructor:Qe,_isOutsideThisEl:function(e){this.el.contains(e)||e===this.el||(Ee=null)},_getDirection:function(e,t){return"function"===typeof this.options.direction?this.options.direction.call(this,e,t,se):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,i=this.el,n=this.options,o=n.preventOnFilter,r=e.type,s=e.touches&&e.touches[0]||e.pointerType&&"touch"===e.pointerType&&e,a=(s||e).target,l=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||a,c=n.filter;if(at(i),!se&&!(/mousedown|pointerdown/.test(r)&&0!==e.button||n.disabled)&&!l.isContentEditable&&(a=k(a,n.draggable,i,!1),(!a||!a.animated)&&de!==a)){if(fe=W(a),pe=W(a,n.draggable),"function"===typeof c){if(c.call(this,e,a,this))return re({sortable:t,rootEl:l,name:"filter",targetEl:a,toEl:i,fromEl:i}),oe("filter",t,{evt:e}),void(o&&e.cancelable&&e.preventDefault())}else if(c&&(c=c.split(",").some((function(n){if(n=k(l,n.trim(),i,!1),n)return re({sortable:t,rootEl:n,name:"filter",targetEl:a,fromEl:i,toEl:i}),oe("filter",t,{evt:e}),!0})),c))return void(o&&e.cancelable&&e.preventDefault());n.handle&&!k(l,n.handle,i,!1)||this._prepareDragStart(e,s,a)}}},_prepareDragStart:function(e,t,i){var n,o=this,r=o.el,s=o.options,a=r.ownerDocument;if(i&&!se&&i.parentNode===r){var l=A(i);if(ce=r,se=i,ae=se.parentNode,he=se.nextSibling,de=i,be=s.group,Qe.dragged=se,we={target:se,clientX:(t||e).clientX,clientY:(t||e).clientY},xe=we.clientX-l.left,Le=we.clientY-l.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,se.style["will-change"]="all",n=function(){oe("delayEnded",o,{evt:e}),Qe.eventCanceled?o._onDrop():(o._disableDelayedDragEvents(),!_&&o.nativeDraggable&&(se.draggable=!0),o._triggerDragStart(e,t),re({sortable:o,name:"choose",originalEvent:e}),N(se,s.chosenClass,!0))},s.ignore.split(",").forEach((function(e){I(se,e.trim(),tt)})),y(a,"dragover",Xe),y(a,"mousemove",Xe),y(a,"touchmove",Xe),y(a,"mouseup",o._onDrop),y(a,"touchend",o._onDrop),y(a,"touchcancel",o._onDrop),_&&this.nativeDraggable&&(this.options.touchStartThreshold=4,se.draggable=!0),oe("delayStart",this,{evt:e}),!s.delay||s.delayOnTouchOnly&&!t||this.nativeDraggable&&(p||m))n();else{if(Qe.eventCanceled)return void this._onDrop();y(a,"mouseup",o._disableDelayedDrag),y(a,"touchend",o._disableDelayedDrag),y(a,"touchcancel",o._disableDelayedDrag),y(a,"mousemove",o._delayedDragTouchMoveHandler),y(a,"touchmove",o._delayedDragTouchMoveHandler),s.supportPointer&&y(a,"pointermove",o._delayedDragTouchMoveHandler),o._dragStartTimer=setTimeout(n,s.delay)}}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){se&&tt(se),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;S(e,"mouseup",this._disableDelayedDrag),S(e,"touchend",this._disableDelayedDrag),S(e,"touchcancel",this._disableDelayedDrag),S(e,"mousemove",this._delayedDragTouchMoveHandler),S(e,"touchmove",this._delayedDragTouchMoveHandler),S(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||"touch"==e.pointerType&&e,!this.nativeDraggable||t?this.options.supportPointer?y(document,"pointermove",this._onTouchMove):y(document,t?"touchmove":"mousemove",this._onTouchMove):(y(se,"dragend",this),y(ce,"dragstart",this._onDragStart));try{document.selection?lt((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(i){}},_dragStarted:function(e,t){if(Me=!1,ce&&se){oe("dragStarted",this,{evt:t}),this.nativeDraggable&&y(document,"dragover",Ze);var i=this.options;!e&&N(se,i.dragClass,!1),N(se,i.ghostClass,!0),Qe.active=this,e&&this._appendGhost(),re({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(Ce){this._lastX=Ce.clientX,this._lastY=Ce.clientY,Ge();var e=document.elementFromPoint(Ce.clientX,Ce.clientY),t=e;while(e&&e.shadowRoot){if(e=e.shadowRoot.elementFromPoint(Ce.clientX,Ce.clientY),e===t)break;t=e}if(se.parentNode[X]._isOutsideThisEl(e),t)do{if(t[X]){var i=void 0;if(i=t[X]._onDragOver({clientX:Ce.clientX,clientY:Ce.clientY,target:e,rootEl:t}),i&&!this.options.dragoverBubble)break}e=t}while(t=t.parentNode);Ye()}},_onTouchMove:function(e){if(we){var t=this.options,i=t.fallbackTolerance,n=t.fallbackOffset,o=e.touches?e.touches[0]:e,r=le&&M(le,!0),s=le&&r&&r.a,a=le&&r&&r.d,l=Ve&&Te&&B(Te),c=(o.clientX-we.clientX+n.x)/(s||1)+(l?l[0]-Pe[0]:0)/(s||1),h=(o.clientY-we.clientY+n.y)/(a||1)+(l?l[1]-Pe[1]:0)/(a||1);if(!Qe.active&&!Me){if(i&&Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))<i)return;this._onDragStart(e,!0)}if(le){r?(r.e+=c-(ye||0),r.f+=h-(Se||0)):r={a:1,b:0,c:0,d:1,e:c,f:h};var d="matrix(".concat(r.a,",").concat(r.b,",").concat(r.c,",").concat(r.d,",").concat(r.e,",").concat(r.f,")");T(le,"webkitTransform",d),T(le,"mozTransform",d),T(le,"msTransform",d),T(le,"transform",d),ye=c,Se=h,Ce=o}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!le){var e=this.options.fallbackOnBody?document.body:ce,t=A(se,!0,Ve,!0,e),i=this.options;if(Ve){Te=e;while("static"===T(Te,"position")&&"none"===T(Te,"transform")&&Te!==document)Te=Te.parentNode;Te!==document.body&&Te!==document.documentElement?(Te===document&&(Te=O()),t.top+=Te.scrollTop,t.left+=Te.scrollLeft):Te=O(),Pe=B(Te)}le=se.cloneNode(!0),N(le,i.ghostClass,!1),N(le,i.fallbackClass,!0),N(le,i.dragClass,!0),T(le,"transition",""),T(le,"transform",""),T(le,"box-sizing","border-box"),T(le,"margin",0),T(le,"top",t.top),T(le,"left",t.left),T(le,"width",t.width),T(le,"height",t.height),T(le,"opacity","0.8"),T(le,"position",Ve?"absolute":"fixed"),T(le,"zIndex","100000"),T(le,"pointerEvents","none"),Qe.ghost=le,e.appendChild(le),T(le,"transform-origin",xe/parseInt(le.style.width)*100+"% "+Le/parseInt(le.style.height)*100+"%")}},_onDragStart:function(e,t){var i=this,n=e.dataTransfer,o=i.options;oe("dragStart",this,{evt:e}),Qe.eventCanceled?this._onDrop():(oe("setupClone",this),Qe.eventCanceled||(ue=$(se),ue.draggable=!1,ue.style["will-change"]="",this._hideClone(),N(ue,this.options.chosenClass,!1),Qe.clone=ue),i.cloneId=lt((function(){oe("clone",i),Qe.eventCanceled||(i.options.removeCloneOnHide||ce.insertBefore(ue,se),i._hideClone(),re({sortable:i,name:"clone"}))})),!t&&N(se,o.dragClass,!0),t?(Ie=!0,i._loopId=setInterval(i._emulateDragOver,50)):(S(document,"mouseup",i._onDrop),S(document,"touchend",i._onDrop),S(document,"touchcancel",i._onDrop),n&&(n.effectAllowed="move",o.setData&&o.setData.call(i,n,se)),y(document,"drop",i),T(se,"transform","translateZ(0)")),Me=!0,i._dragStartId=lt(i._dragStarted.bind(i,t,e)),y(document,"selectstart",i),ke=!0,b&&T(document.body,"user-select","none"))},_onDragOver:function(e){var t,i,n,o,r=this.el,a=e.target,l=this.options,c=l.group,h=Qe.active,d=be===c,u=l.sort,g=ve||h,f=this,m=!1;if(!Fe){if(void 0!==e.preventDefault&&e.cancelable&&e.preventDefault(),a=k(a,l.draggable,r,!0),I("dragOver"),Qe.eventCanceled)return m;if(se.contains(e.target)||a.animated&&a.animatingX&&a.animatingY||f._ignoreWhileAnimating===a)return P(!1);if(Ie=!1,h&&!l.disabled&&(d?u||(n=!ce.contains(se)):ve===this||(this.lastPutMode=be.checkPull(this,h,se,e))&&c.checkPut(this,h,se,e))){if(o="vertical"===this._getDirection(e,a),t=A(se),I("dragOverValid"),Qe.eventCanceled)return m;if(n)return ae=ce,O(),this._hideClone(),I("revert"),Qe.eventCanceled||(he?ce.insertBefore(se,he):ce.appendChild(se)),P(!0);var p=F(r,l.draggable);if(!p||nt(e,o,this)&&!p.animated){if(p===se)return P(!1);if(p&&r===e.target&&(a=p),a&&(i=A(a)),!1!==et(ce,r,se,t,a,i,e,!!a))return O(),r.appendChild(se),ae=r,B(),P(!0)}else if(a.parentNode===r){i=A(a);var _,b,v=0,w=se.parentNode!==r,C=!Ke(se.animated&&se.toRect||t,a.animated&&a.toRect||i,o),y=o?"top":"left",S=R(a,"top","top")||R(se,"top","top"),x=S?S.scrollTop:void 0;if(Ee!==a&&(_=i[y],Ae=!1,Re=!C&&l.invertSwap||w),v=ot(e,a,i,o,C?1:l.swapThreshold,null==l.invertedSwapThreshold?l.swapThreshold:l.invertedSwapThreshold,Re,Ee===a),0!==v){var L=W(se);do{L-=v,b=ae.children[L]}while(b&&("none"===T(b,"display")||b===le))}if(0===v||b===a)return P(!1);Ee=a,De=v;var E=a.nextElementSibling,D=!1;D=1===v;var M=et(ce,r,se,t,a,i,e,D);if(!1!==M)return 1!==M&&-1!==M||(D=1===M),Fe=!0,setTimeout(it,30),O(),D&&!E?r.appendChild(se):a.parentNode.insertBefore(se,D?E:a),S&&q(S,0,x-S.scrollTop),ae=se.parentNode,void 0===_||Re||(Ne=Math.abs(_-A(a)[y])),B(),P(!0)}if(r.contains(se))return P(!1)}return!1}function I(l,c){oe(l,f,s({evt:e,isOwner:d,axis:o?"vertical":"horizontal",revert:n,dragRect:t,targetRect:i,canSort:u,fromSortable:g,target:a,completed:P,onMove:function(i,n){return et(ce,r,se,t,i,A(i),e,n)},changed:B},c))}function O(){I("dragOverAnimationCapture"),f.captureAnimationState(),f!==g&&g.captureAnimationState()}function P(t){return I("dragOverCompleted",{insertion:t}),t&&(d?h._hideClone():h._showClone(f),f!==g&&(N(se,ve?ve.options.ghostClass:h.options.ghostClass,!1),N(se,l.ghostClass,!0)),ve!==f&&f!==Qe.active?ve=f:f===Qe.active&&ve&&(ve=null),g===f&&(f._ignoreWhileAnimating=a),f.animateAll((function(){I("dragOverAnimationComplete"),f._ignoreWhileAnimating=null})),f!==g&&(g.animateAll(),g._ignoreWhileAnimating=null)),(a===se&&!se.animated||a===r&&!a.animated)&&(Ee=null),l.dragoverBubble||e.rootEl||a===document||(se.parentNode[X]._isOutsideThisEl(e.target),!t&&Xe(e)),!l.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),m=!0}function B(){me=W(se),_e=W(se,l.draggable),re({sortable:f,name:"change",toEl:r,newIndex:me,newDraggableIndex:_e,originalEvent:e})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){S(document,"mousemove",this._onTouchMove),S(document,"touchmove",this._onTouchMove),S(document,"pointermove",this._onTouchMove),S(document,"dragover",Xe),S(document,"mousemove",Xe),S(document,"touchmove",Xe)},_offUpEvents:function(){var e=this.el.ownerDocument;S(e,"mouseup",this._onDrop),S(e,"touchend",this._onDrop),S(e,"pointerup",this._onDrop),S(e,"touchcancel",this._onDrop),S(document,"selectstart",this)},_onDrop:function(e){var t=this.el,i=this.options;me=W(se),_e=W(se,i.draggable),oe("drop",this,{evt:e}),ae=se&&se.parentNode,me=W(se),_e=W(se,i.draggable),Qe.eventCanceled||(Me=!1,Re=!1,Ae=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),ct(this.cloneId),ct(this._dragStartId),this.nativeDraggable&&(S(document,"drop",this),S(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),b&&T(document.body,"user-select",""),T(se,"transform",""),e&&(ke&&(e.cancelable&&e.preventDefault(),!i.dropBubble&&e.stopPropagation()),le&&le.parentNode&&le.parentNode.removeChild(le),(ce===ae||ve&&"clone"!==ve.lastPutMode)&&ue&&ue.parentNode&&ue.parentNode.removeChild(ue),se&&(this.nativeDraggable&&S(se,"dragend",this),tt(se),se.style["will-change"]="",ke&&!Me&&N(se,ve?ve.options.ghostClass:this.options.ghostClass,!1),N(se,this.options.chosenClass,!1),re({sortable:this,name:"unchoose",toEl:ae,newIndex:null,newDraggableIndex:null,originalEvent:e}),ce!==ae?(me>=0&&(re({rootEl:ae,name:"add",toEl:ae,fromEl:ce,originalEvent:e}),re({sortable:this,name:"remove",toEl:ae,originalEvent:e}),re({rootEl:ae,name:"sort",toEl:ae,fromEl:ce,originalEvent:e}),re({sortable:this,name:"sort",toEl:ae,originalEvent:e})),ve&&ve.save()):me!==fe&&me>=0&&(re({sortable:this,name:"update",toEl:ae,originalEvent:e}),re({sortable:this,name:"sort",toEl:ae,originalEvent:e})),Qe.active&&(null!=me&&-1!==me||(me=fe,_e=pe),re({sortable:this,name:"end",toEl:ae,originalEvent:e}),this.save())))),this._nulling()},_nulling:function(){oe("nulling",this),ce=se=ae=le=he=ue=de=ge=we=Ce=ke=me=_e=fe=pe=Ee=De=ve=be=Qe.dragged=Qe.ghost=Qe.clone=Qe.active=null,We.forEach((function(e){e.checked=!0})),We.length=ye=Se=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":se&&(this._onDragOver(e),Je(e));break;case"selectstart":e.preventDefault();break}},toArray:function(){for(var e,t=[],i=this.el.children,n=0,o=i.length,r=this.options;n<o;n++)e=i[n],k(e,r.draggable,this.el,!1)&&t.push(e.getAttribute(r.dataIdAttr)||st(e));return t},sort:function(e){var t={},i=this.el;this.toArray().forEach((function(e,n){var o=i.children[n];k(o,this.options.draggable,i,!1)&&(t[e]=o)}),this),e.forEach((function(e){t[e]&&(i.removeChild(t[e]),i.appendChild(t[e]))}))},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,t){return k(e,t||this.options.draggable,this.el,!1)},option:function(e,t){var i=this.options;if(void 0===t)return i[e];var n=ie.modifyOption(this,e,t);i[e]="undefined"!==typeof n?n:t,"group"===e&&$e(i)},destroy:function(){oe("destroy",this);var e=this.el;e[X]=null,S(e,"mousedown",this._onTapStart),S(e,"touchstart",this._onTapStart),S(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(S(e,"dragover",this),S(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),(function(e){e.removeAttribute("draggable")})),this._onDrop(),this._disableDelayedDragEvents(),Oe.splice(Oe.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!ge){if(oe("hideClone",this),Qe.eventCanceled)return;T(ue,"display","none"),this.options.removeCloneOnHide&&ue.parentNode&&ue.parentNode.removeChild(ue),ge=!0}},_showClone:function(e){if("clone"===e.lastPutMode){if(ge){if(oe("showClone",this),Qe.eventCanceled)return;ce.contains(se)&&!this.options.group.revertClone?ce.insertBefore(ue,se):he?ce.insertBefore(ue,he):ce.appendChild(ue),this.options.group.revertClone&&this.animate(se,ue),T(ue,"display",""),ge=!1}}else this._hideClone()}},Be&&y(document,"touchmove",(function(e){(Qe.active||Me)&&e.cancelable&&e.preventDefault()})),Qe.utils={on:y,off:S,css:T,find:I,is:function(e,t){return!!k(e,t,e,!1)},extend:z,throttle:j,closest:k,toggleClass:N,clone:$,index:W,nextTick:lt,cancelNextTick:ct,detectDirection:je,getChild:P},Qe.get=function(e){return e[X]},Qe.mount=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];t[0].constructor===Array&&(t=t[0]),t.forEach((function(e){if(!e.prototype||!e.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(e));e.utils&&(Qe.utils=s({},Qe.utils,e.utils)),ie.mount(e)}))},Qe.create=function(e,t){return new Qe(e,t)},Qe.version=g;var ht,dt,ut,gt,ft,mt,pt=[],_t=!1;function bt(){function e(){for(var e in this.defaults={scroll:!0,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===e.charAt(0)&&"function"===typeof this[e]&&(this[e]=this[e].bind(this))}return e.prototype={dragStarted:function(e){var t=e.originalEvent;this.sortable.nativeDraggable?y(document,"dragover",this._handleAutoScroll):this.options.supportPointer?y(document,"pointermove",this._handleFallbackAutoScroll):t.touches?y(document,"touchmove",this._handleFallbackAutoScroll):y(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(e){var t=e.originalEvent;this.options.dragOverBubble||t.rootEl||this._handleAutoScroll(t)},drop:function(){this.sortable.nativeDraggable?S(document,"dragover",this._handleAutoScroll):(S(document,"pointermove",this._handleFallbackAutoScroll),S(document,"touchmove",this._handleFallbackAutoScroll),S(document,"mousemove",this._handleFallbackAutoScroll)),wt(),vt(),K()},nulling:function(){ft=dt=ht=_t=mt=ut=gt=null,pt.length=0},_handleFallbackAutoScroll:function(e){this._handleAutoScroll(e,!0)},_handleAutoScroll:function(e,t){var i=this,n=(e.touches?e.touches[0]:e).clientX,o=(e.touches?e.touches[0]:e).clientY,r=document.elementFromPoint(n,o);if(ft=e,t||p||m||b){yt(e,this.options,r,t);var s=H(r,!0);!_t||mt&&n===ut&&o===gt||(mt&&wt(),mt=setInterval((function(){var r=H(document.elementFromPoint(n,o),!0);r!==s&&(s=r,vt()),yt(e,i.options,r,t)}),10),ut=n,gt=o)}else{if(!this.options.bubbleScroll||H(r,!0)===O())return void vt();yt(e,this.options,H(r,!1),!1)}}},r(e,{pluginName:"scroll",initializeByDefault:!0})}function vt(){pt.forEach((function(e){clearInterval(e.pid)})),pt=[]}function wt(){clearInterval(mt)}var Ct,yt=j((function(e,t,i,n){if(t.scroll){var o,r=(e.touches?e.touches[0]:e).clientX,s=(e.touches?e.touches[0]:e).clientY,a=t.scrollSensitivity,l=t.scrollSpeed,c=O(),h=!1;dt!==i&&(dt=i,vt(),ht=t.scroll,o=t.scrollFn,!0===ht&&(ht=H(i,!0)));var d=0,u=ht;do{var g=u,f=A(g),m=f.top,p=f.bottom,_=f.left,b=f.right,v=f.width,w=f.height,C=void 0,y=void 0,S=g.scrollWidth,x=g.scrollHeight,L=T(g),k=g.scrollLeft,E=g.scrollTop;g===c?(C=v<S&&("auto"===L.overflowX||"scroll"===L.overflowX||"visible"===L.overflowX),y=w<x&&("auto"===L.overflowY||"scroll"===L.overflowY||"visible"===L.overflowY)):(C=v<S&&("auto"===L.overflowX||"scroll"===L.overflowX),y=w<x&&("auto"===L.overflowY||"scroll"===L.overflowY));var D=C&&(Math.abs(b-r)<=a&&k+v<S)-(Math.abs(_-r)<=a&&!!k),N=y&&(Math.abs(p-s)<=a&&E+w<x)-(Math.abs(m-s)<=a&&!!E);if(!pt[d])for(var M=0;M<=d;M++)pt[M]||(pt[M]={});pt[d].vx==D&&pt[d].vy==N&&pt[d].el===g||(pt[d].el=g,pt[d].vx=D,pt[d].vy=N,clearInterval(pt[d].pid),0==D&&0==N||(h=!0,pt[d].pid=setInterval(function(){n&&0===this.layer&&Qe.active._onTouchMove(ft);var t=pt[this.layer].vy?pt[this.layer].vy*l:0,i=pt[this.layer].vx?pt[this.layer].vx*l:0;"function"===typeof o&&"continue"!==o.call(Qe.dragged.parentNode[X],i,t,e,ft,pt[this.layer].el)||q(pt[this.layer].el,i,t)}.bind({layer:d}),24))),d++}while(t.bubbleScroll&&u!==c&&(u=H(u,!1)));_t=h}}),30),St=function(e){var t=e.originalEvent,i=e.putSortable,n=e.dragEl,o=e.activeSortable,r=e.dispatchSortableEvent,s=e.hideGhostForTarget,a=e.unhideGhostForTarget;if(t){var l=i||o;s();var c=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,h=document.elementFromPoint(c.clientX,c.clientY);a(),l&&!l.el.contains(h)&&(r("spill"),this.onSpill({dragEl:n,putSortable:i}))}};function xt(){}function Lt(){}function kt(){function e(){this.defaults={swapClass:"sortable-swap-highlight"}}return e.prototype={dragStart:function(e){var t=e.dragEl;Ct=t},dragOverValid:function(e){var t=e.completed,i=e.target,n=e.onMove,o=e.activeSortable,r=e.changed,s=e.cancel;if(o.options.swap){var a=this.sortable.el,l=this.options;if(i&&i!==a){var c=Ct;!1!==n(i)?(N(i,l.swapClass,!0),Ct=i):Ct=null,c&&c!==Ct&&N(c,l.swapClass,!1)}r(),t(!0),s()}},drop:function(e){var t=e.activeSortable,i=e.putSortable,n=e.dragEl,o=i||this.sortable,r=this.options;Ct&&N(Ct,r.swapClass,!1),Ct&&(r.swap||i&&i.options.swap)&&n!==Ct&&(o.captureAnimationState(),o!==t&&t.captureAnimationState(),Et(n,Ct),o.animateAll(),o!==t&&t.animateAll())},nulling:function(){Ct=null}},r(e,{pluginName:"swap",eventProperties:function(){return{swapItem:Ct}}})}function Et(e,t){var i,n,o=e.parentNode,r=t.parentNode;o&&r&&!o.isEqualNode(t)&&!r.isEqualNode(e)&&(i=W(e),n=W(t),o.isEqualNode(r)&&i<n&&n++,o.insertBefore(t,o.children[i]),r.insertBefore(e,r.children[n]))}xt.prototype={startIndex:null,dragStart:function(e){var t=e.oldDraggableIndex;this.startIndex=t},onSpill:function(e){var t=e.dragEl,i=e.putSortable;this.sortable.captureAnimationState(),i&&i.captureAnimationState();var n=P(this.sortable.el,this.startIndex,this.options);n?this.sortable.el.insertBefore(t,n):this.sortable.el.appendChild(t),this.sortable.animateAll(),i&&i.animateAll()},drop:St},r(xt,{pluginName:"revertOnSpill"}),Lt.prototype={onSpill:function(e){var t=e.dragEl,i=e.putSortable,n=i||this.sortable;n.captureAnimationState(),t.parentNode&&t.parentNode.removeChild(t),n.animateAll()},drop:St},r(Lt,{pluginName:"removeOnSpill"});var Dt,Nt,Tt,Mt,It,Ot=[],At=[],Rt=!1,Pt=!1,Ft=!1;function Wt(){function e(e){for(var t in this)"_"===t.charAt(0)&&"function"===typeof this[t]&&(this[t]=this[t].bind(this));e.options.supportPointer?y(document,"pointerup",this._deselectMultiDrag):(y(document,"mouseup",this._deselectMultiDrag),y(document,"touchend",this._deselectMultiDrag)),y(document,"keydown",this._checkKeyDown),y(document,"keyup",this._checkKeyUp),this.defaults={selectedClass:"sortable-selected",multiDragKey:null,setData:function(t,i){var n="";Ot.length&&Nt===e?Ot.forEach((function(e,t){n+=(t?", ":"")+e.textContent})):n=i.textContent,t.setData("Text",n)}}}return e.prototype={multiDragKeyDown:!1,isMultiDrag:!1,delayStartGlobal:function(e){var t=e.dragEl;Tt=t},delayEnded:function(){this.isMultiDrag=~Ot.indexOf(Tt)},setupClone:function(e){var t=e.sortable,i=e.cancel;if(this.isMultiDrag){for(var n=0;n<Ot.length;n++)At.push($(Ot[n])),At[n].sortableIndex=Ot[n].sortableIndex,At[n].draggable=!1,At[n].style["will-change"]="",N(At[n],this.options.selectedClass,!1),Ot[n]===Tt&&N(At[n],this.options.chosenClass,!1);t._hideClone(),i()}},clone:function(e){var t=e.sortable,i=e.rootEl,n=e.dispatchSortableEvent,o=e.cancel;this.isMultiDrag&&(this.options.removeCloneOnHide||Ot.length&&Nt===t&&(Vt(!0,i),n("clone"),o()))},showClone:function(e){var t=e.cloneNowShown,i=e.rootEl,n=e.cancel;this.isMultiDrag&&(Vt(!1,i),At.forEach((function(e){T(e,"display","")})),t(),It=!1,n())},hideClone:function(e){var t=this,i=(e.sortable,e.cloneNowHidden),n=e.cancel;this.isMultiDrag&&(At.forEach((function(e){T(e,"display","none"),t.options.removeCloneOnHide&&e.parentNode&&e.parentNode.removeChild(e)})),i(),It=!0,n())},dragStartGlobal:function(e){e.sortable;!this.isMultiDrag&&Nt&&Nt.multiDrag._deselectMultiDrag(),Ot.forEach((function(e){e.sortableIndex=W(e)})),Ot=Ot.sort((function(e,t){return e.sortableIndex-t.sortableIndex})),Ft=!0},dragStarted:function(e){var t=this,i=e.sortable;if(this.isMultiDrag){if(this.options.sort&&(i.captureAnimationState(),this.options.animation)){Ot.forEach((function(e){e!==Tt&&T(e,"position","absolute")}));var n=A(Tt,!1,!0,!0);Ot.forEach((function(e){e!==Tt&&G(e,n)})),Pt=!0,Rt=!0}i.animateAll((function(){Pt=!1,Rt=!1,t.options.animation&&Ot.forEach((function(e){Y(e)})),t.options.sort&&Ht()}))}},dragOver:function(e){var t=e.target,i=e.completed,n=e.cancel;Pt&&~Ot.indexOf(t)&&(i(!1),n())},revert:function(e){var t=e.fromSortable,i=e.rootEl,n=e.sortable,o=e.dragRect;Ot.length>1&&(Ot.forEach((function(e){n.addAnimationState({target:e,rect:Pt?A(e):o}),Y(e),e.fromRect=o,t.removeAnimationState(e)})),Pt=!1,Bt(!this.options.removeCloneOnHide,i))},dragOverCompleted:function(e){var t=e.sortable,i=e.isOwner,n=e.insertion,o=e.activeSortable,r=e.parentEl,s=e.putSortable,a=this.options;if(n){if(i&&o._hideClone(),Rt=!1,a.animation&&Ot.length>1&&(Pt||!i&&!o.options.sort&&!s)){var l=A(Tt,!1,!0,!0);Ot.forEach((function(e){e!==Tt&&(G(e,l),r.appendChild(e))})),Pt=!0}if(!i)if(Pt||Ht(),Ot.length>1){var c=It;o._showClone(t),o.options.animation&&!It&&c&&At.forEach((function(e){o.addAnimationState({target:e,rect:Mt}),e.fromRect=Mt,e.thisAnimationDuration=null}))}else o._showClone(t)}},dragOverAnimationCapture:function(e){var t=e.dragRect,i=e.isOwner,n=e.activeSortable;if(Ot.forEach((function(e){e.thisAnimationDuration=null})),n.options.animation&&!i&&n.multiDrag.isMultiDrag){Mt=r({},t);var o=M(Tt,!0);Mt.top-=o.f,Mt.left-=o.e}},dragOverAnimationComplete:function(){Pt&&(Pt=!1,Ht())},drop:function(e){var t=e.originalEvent,i=e.rootEl,n=e.parentEl,o=e.sortable,r=e.dispatchSortableEvent,s=e.oldIndex,a=e.putSortable,l=a||this.sortable;if(t){var c=this.options,h=n.children;if(!Ft)if(c.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),N(Tt,c.selectedClass,!~Ot.indexOf(Tt)),~Ot.indexOf(Tt))Ot.splice(Ot.indexOf(Tt),1),Dt=null,ne({sortable:o,rootEl:i,name:"deselect",targetEl:Tt,originalEvt:t});else{if(Ot.push(Tt),ne({sortable:o,rootEl:i,name:"select",targetEl:Tt,originalEvt:t}),t.shiftKey&&Dt&&o.el.contains(Dt)){var d,u,g=W(Dt),f=W(Tt);if(~g&&~f&&g!==f)for(f>g?(u=g,d=f):(u=f,d=g+1);u<d;u++)~Ot.indexOf(h[u])||(N(h[u],c.selectedClass,!0),Ot.push(h[u]),ne({sortable:o,rootEl:i,name:"select",targetEl:h[u],originalEvt:t}))}else Dt=Tt;Nt=l}if(Ft&&this.isMultiDrag){if((n[X].options.sort||n!==i)&&Ot.length>1){var m=A(Tt),p=W(Tt,":not(."+this.options.selectedClass+")");if(!Rt&&c.animation&&(Tt.thisAnimationDuration=null),l.captureAnimationState(),!Rt&&(c.animation&&(Tt.fromRect=m,Ot.forEach((function(e){if(e.thisAnimationDuration=null,e!==Tt){var t=Pt?A(e):m;e.fromRect=t,l.addAnimationState({target:e,rect:t})}}))),Ht(),Ot.forEach((function(e){h[p]?n.insertBefore(e,h[p]):n.appendChild(e),p++})),s===W(Tt))){var _=!1;Ot.forEach((function(e){e.sortableIndex===W(e)||(_=!0)})),_&&r("update")}Ot.forEach((function(e){Y(e)})),l.animateAll()}Nt=l}(i===n||a&&"clone"!==a.lastPutMode)&&At.forEach((function(e){e.parentNode&&e.parentNode.removeChild(e)}))}},nullingGlobal:function(){this.isMultiDrag=Ft=!1,At.length=0},destroyGlobal:function(){this._deselectMultiDrag(),S(document,"pointerup",this._deselectMultiDrag),S(document,"mouseup",this._deselectMultiDrag),S(document,"touchend",this._deselectMultiDrag),S(document,"keydown",this._checkKeyDown),S(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(e){if(("undefined"===typeof Ft||!Ft)&&Nt===this.sortable&&(!e||!k(e.target,this.options.draggable,this.sortable.el,!1))&&(!e||0===e.button))while(Ot.length){var t=Ot[0];N(t,this.options.selectedClass,!1),Ot.shift(),ne({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:t,originalEvt:e})}},_checkKeyDown:function(e){e.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(e){e.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},r(e,{pluginName:"multiDrag",utils:{select:function(e){var t=e.parentNode[X];t&&t.options.multiDrag&&!~Ot.indexOf(e)&&(Nt&&Nt!==t&&(Nt.multiDrag._deselectMultiDrag(),Nt=t),N(e,t.options.selectedClass,!0),Ot.push(e))},deselect:function(e){var t=e.parentNode[X],i=Ot.indexOf(e);t&&t.options.multiDrag&&~i&&(N(e,t.options.selectedClass,!1),Ot.splice(i,1))}},eventProperties:function(){var e=this,t=[],i=[];return Ot.forEach((function(n){var o;t.push({multiDragElement:n,index:n.sortableIndex}),o=Pt&&n!==Tt?-1:Pt?W(n,":not(."+e.options.selectedClass+")"):W(n),i.push({multiDragElement:n,index:o})})),{items:c(Ot),clones:[].concat(At),oldIndicies:t,newIndicies:i}},optionListeners:{multiDragKey:function(e){return e=e.toLowerCase(),"ctrl"===e?e="Control":e.length>1&&(e=e.charAt(0).toUpperCase()+e.substr(1)),e}}})}function Bt(e,t){Ot.forEach((function(i,n){var o=t.children[i.sortableIndex+(e?Number(n):0)];o?t.insertBefore(i,o):t.appendChild(i)}))}function Vt(e,t){At.forEach((function(i,n){var o=t.children[i.sortableIndex+(e?Number(n):0)];o?t.insertBefore(i,o):t.appendChild(i)}))}function Ht(){Ot.forEach((function(e){e!==Tt&&e.parentNode&&e.parentNode.removeChild(e)}))}Qe.mount(new bt),Qe.mount(Lt,xt),t["default"]=Qe},"7d86":function(e,t,i){var n=i("e244"),o=i("69f1"),r=i("fe32"),s=i("72c7"),a=i("9550"),l=i("35d6"),c=l.get,h=l.enforce,d=String(String).split("String");(e.exports=function(e,t,i,a){var l,c=!!a&&!!a.unsafe,u=!!a&&!!a.enumerable,g=!!a&&!!a.noTargetGet;"function"==typeof i&&("string"!=typeof t||r(i,"name")||o(i,"name",t),l=h(i),l.source||(l.source=d.join("string"==typeof t?t:""))),e!==n?(c?!g&&e[t]&&(u=!0):delete e[t],u?e[t]=i:o(e,t,i)):u?e[t]=i:s(t,i)})(Function.prototype,"toString",(function(){return"function"==typeof this&&c(this).source||a(this)}))},"7e50":function(e,t,i){var n=i("83ec"),o=i("ac97"),r=i("45ad"),s=i("42b1").f,a=i("55ab"),l=o((function(){s(1)})),c=!a||l;n({target:"Object",stat:!0,forced:c,sham:!a},{getOwnPropertyDescriptor:function(e,t){return s(r(e),t)}})},"7eca":function(e,t,i){"use strict";function n(e,t){let i;return i=0===t.length?e:e.replace(/\{(\d+)\}/g,(function(e,i){const n=i[0];return"undefined"!==typeof t[n]?t[n]:e})),i}function o(e,t,...i){return n(t,i)}i.r(t),i.d(t,"CancellationTokenSource",(function(){return yP})),i.d(t,"Emitter",(function(){return SP})),i.d(t,"KeyCode",(function(){return xP})),i.d(t,"KeyMod",(function(){return LP})),i.d(t,"Position",(function(){return kP})),i.d(t,"Range",(function(){return EP})),i.d(t,"Selection",(function(){return DP})),i.d(t,"SelectionDirection",(function(){return NP})),i.d(t,"MarkerSeverity",(function(){return TP})),i.d(t,"MarkerTag",(function(){return MP})),i.d(t,"Uri",(function(){return IP})),i.d(t,"Token",(function(){return OP})),i.d(t,"editor",(function(){return AP})),i.d(t,"languages",(function(){return RP}));var r=i("1cb4");const s="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?";function a(e=""){let t="(-?\\d*\\.\\d\\w*)|([^";for(const i of s)e.indexOf(i)>=0||(t+="\\"+i);return t+="\\s]+)",new RegExp(t,"g")}const l=a();function c(e){let t=l;if(e&&e instanceof RegExp)if(e.global)t=e;else{let i="g";e.ignoreCase&&(i+="i"),e.multiline&&(i+="m"),e.unicode&&(i+="u"),t=new RegExp(e.source,i)}return t.lastIndex=0,t}const h={maxLen:1e3,windowSize:15,timeBudget:150};function d(e,t,i,n,o=h){if(i.length>o.maxLen){let r=e-o.maxLen/2;return r<0?(n+=e,r=0):n+=r,i=i.substring(r,e+o.maxLen/2),d(e,t,i,n,o)}Date.now();const r=e-1-n;let s=-1,a=null;for(let l=1;;l++){Date.now(),o.timeBudget;const e=r-o.windowSize*l;t.lastIndex=Math.max(0,e);const n=u(t,i,r,s);if(!n&&a)break;if(a=n,e<=0)break;s=e}if(a){let e={word:a[0],startColumn:n+1+a.index,endColumn:n+1+a.index+a[0].length};return t.lastIndex=0,e}return null}function u(e,t,i,n){let o;while(o=e.exec(t)){const t=o.index||0;if(t<=i&&e.lastIndex>=i)return o;if(n>0&&t>n)return null}return null}const g=8;class f{constructor(e){this._values=e}hasChanged(e){return this._values[e]}}class m{constructor(){this._values=[]}_read(e){return this._values[e]}get(e){return this._values[e]}_write(e,t){this._values[e]=t}}class p{constructor(){this.stableMinimapLayoutInput=null,this.stableFitMaxMinimapScale=0,this.stableFitRemainingWidth=0}}class _{constructor(e,t,i,n){this.id=e,this.name=t,this.defaultValue=i,this.schema=n}compute(e,t,i){return i}}class b{constructor(e,t=null){this.schema=void 0,this.id=e,this.name="_never_",this.defaultValue=void 0,this.deps=t}validate(e){return this.defaultValue}}class v{constructor(e,t,i,n){this.id=e,this.name=t,this.defaultValue=i,this.schema=n}validate(e){return"undefined"===typeof e?this.defaultValue:e}compute(e,t,i){return i}}class w extends v{static boolean(e,t){return"undefined"===typeof e?t:"false"!==e&&Boolean(e)}constructor(e,t,i,n){"undefined"!==typeof n&&(n.type="boolean",n.default=i),super(e,t,i,n)}validate(e){return w.boolean(e,this.defaultValue)}}class C extends v{constructor(e,t,i,n,o,r){"undefined"!==typeof r&&(r.type="integer",r.default=i,r.minimum=n,r.maximum=o),super(e,t,i,r),this.minimum=n,this.maximum=o}static clampedInt(e,t,i,n){if("undefined"===typeof e)return t;let o=parseInt(e,10);return isNaN(o)?t:(o=Math.max(i,o),o=Math.min(n,o),0|o)}validate(e){return C.clampedInt(e,this.defaultValue,this.minimum,this.maximum)}}class y extends v{constructor(e,t,i,n,o){"undefined"!==typeof o&&(o.type="number",o.default=i),super(e,t,i,o),this.validationFn=n}static clamp(e,t,i){return e<t?t:e>i?i:e}static float(e,t){if("number"===typeof e)return e;if("undefined"===typeof e)return t;const i=parseFloat(e);return isNaN(i)?t:i}validate(e){return this.validationFn(y.float(e,this.defaultValue))}}class S extends v{static string(e,t){return"string"!==typeof e?t:e}constructor(e,t,i,n){"undefined"!==typeof n&&(n.type="string",n.default=i),super(e,t,i,n)}validate(e){return S.string(e,this.defaultValue)}}class x extends v{constructor(e,t,i,n,o){"undefined"!==typeof o&&(o.type="string",o.enum=n,o.default=i),super(e,t,i,o),this._allowedValues=n}static stringSet(e,t,i){return"string"!==typeof e||-1===i.indexOf(e)?t:e}validate(e){return x.stringSet(e,this.defaultValue,this._allowedValues)}}class L extends _{constructor(e,t,i,n,o,r,s){"undefined"!==typeof s&&(s.type="string",s.enum=o,s.default=n),super(e,t,i,s),this._allowedValues=o,this._convert=r}validate(e){return"string"!==typeof e||-1===this._allowedValues.indexOf(e)?this.defaultValue:this._convert(e)}}function k(e){switch(e){case"none":return 0;case"keep":return 1;case"brackets":return 2;case"advanced":return 3;case"full":return 4}}class E extends _{constructor(){super(2,"accessibilitySupport",0,{type:"string",enum:["auto","on","off"],enumDescriptions:[o("accessibilitySupport.auto","The editor will use platform APIs to detect when a Screen Reader is attached."),o("accessibilitySupport.on","The editor will be permanently optimized for usage with a Screen Reader."),o("accessibilitySupport.off","The editor will never be optimized for usage with a Screen Reader.")],default:"auto",description:o("accessibilitySupport","Controls whether the editor should run in a mode where it is optimized for screen readers.")})}validate(e){switch(e){case"auto":return 0;case"off":return 1;case"on":return 2}return this.defaultValue}compute(e,t,i){return 0===i?e.accessibilitySupport:i}}class D extends _{constructor(){const e={insertSpace:!0,ignoreEmptyLines:!0};super(14,"comments",e,{"editor.comments.insertSpace":{type:"boolean",default:e.insertSpace,description:o("comments.insertSpace","Controls whether a space character is inserted when commenting.")},"editor.comments.ignoreEmptyLines":{type:"boolean",default:e.ignoreEmptyLines,description:o("comments.ignoreEmptyLines","Controls if empty lines should be ignored with toggle, add or remove actions for line comments.")}})}validate(e){if(!e||"object"!==typeof e)return this.defaultValue;const t=e;return{insertSpace:w.boolean(t.insertSpace,this.defaultValue.insertSpace),ignoreEmptyLines:w.boolean(t.ignoreEmptyLines,this.defaultValue.ignoreEmptyLines)}}}function N(e){switch(e){case"blink":return 1;case"smooth":return 2;case"phase":return 3;case"expand":return 4;case"solid":return 5}}var T;function M(e){switch(e){case"line":return T.Line;case"block":return T.Block;case"underline":return T.Underline;case"line-thin":return T.LineThin;case"block-outline":return T.BlockOutline;case"underline-thin":return T.UnderlineThin}}(function(e){e[e["Line"]=1]="Line",e[e["Block"]=2]="Block",e[e["Underline"]=3]="Underline",e[e["LineThin"]=4]="LineThin",e[e["BlockOutline"]=5]="BlockOutline",e[e["UnderlineThin"]=6]="UnderlineThin"})(T||(T={}));class I extends b{constructor(){super(114,[57,27])}compute(e,t,i){const n=["monaco-editor"];return t.get(27)&&n.push(t.get(27)),e.extraEditorClassName&&n.push(e.extraEditorClassName),"default"===t.get(57)?n.push("mouse-default"):"copy"===t.get(57)&&n.push("mouse-copy"),t.get(92)&&n.push("showUnused"),t.get(113)&&n.push("showDeprecated"),n.join(" ")}}class O extends w{constructor(){super(26,"emptySelectionClipboard",!0,{description:o("emptySelectionClipboard","Controls whether copying without a selection copies the current line.")})}compute(e,t,i){return i&&e.emptySelectionClipboard}}class A extends _{constructor(){const e={cursorMoveOnType:!0,seedSearchStringFromSelection:!0,autoFindInSelection:"never",globalFindClipboard:!1,addExtraSpaceOnTop:!0,loop:!0};super(29,"find",e,{"editor.find.cursorMoveOnType":{type:"boolean",default:e.cursorMoveOnType,description:o("find.cursorMoveOnType","Controls whether the cursor should jump to find matches while typing.")},"editor.find.seedSearchStringFromSelection":{type:"boolean",default:e.seedSearchStringFromSelection,description:o("find.seedSearchStringFromSelection","Controls whether the search string in the Find Widget is seeded from the editor selection.")},"editor.find.autoFindInSelection":{type:"string",enum:["never","always","multiline"],default:e.autoFindInSelection,enumDescriptions:[o("editor.find.autoFindInSelection.never","Never turn on Find in selection automatically (default)"),o("editor.find.autoFindInSelection.always","Always turn on Find in selection automatically"),o("editor.find.autoFindInSelection.multiline","Turn on Find in selection automatically when multiple lines of content are selected.")],description:o("find.autoFindInSelection","Controls the condition for turning on find in selection automatically.")},"editor.find.globalFindClipboard":{type:"boolean",default:e.globalFindClipboard,description:o("find.globalFindClipboard","Controls whether the Find Widget should read or modify the shared find clipboard on macOS."),included:r["f"]},"editor.find.addExtraSpaceOnTop":{type:"boolean",default:e.addExtraSpaceOnTop,description:o("find.addExtraSpaceOnTop","Controls whether the Find Widget should add extra lines on top of the editor. When true, you can scroll beyond the first line when the Find Widget is visible.")},"editor.find.loop":{type:"boolean",default:e.loop,description:o("find.loop","Controls whether the search automatically restarts from the beginning (or the end) when no further matches can be found.")}})}validate(e){if(!e||"object"!==typeof e)return this.defaultValue;const t=e;return{cursorMoveOnType:w.boolean(t.cursorMoveOnType,this.defaultValue.cursorMoveOnType),seedSearchStringFromSelection:w.boolean(t.seedSearchStringFromSelection,this.defaultValue.seedSearchStringFromSelection),autoFindInSelection:"boolean"===typeof e.autoFindInSelection?e.autoFindInSelection?"always":"never":x.stringSet(t.autoFindInSelection,this.defaultValue.autoFindInSelection,["never","always","multiline"]),globalFindClipboard:w.boolean(t.globalFindClipboard,this.defaultValue.globalFindClipboard),addExtraSpaceOnTop:w.boolean(t.addExtraSpaceOnTop,this.defaultValue.addExtraSpaceOnTop),loop:w.boolean(t.loop,this.defaultValue.loop)}}}class R extends _{constructor(){super(37,"fontLigatures",R.OFF,{anyOf:[{type:"boolean",description:o("fontLigatures","Enables/Disables font ligatures.")},{type:"string",description:o("fontFeatureSettings","Explicit font-feature-settings.")}],description:o("fontLigaturesGeneral","Configures font ligatures or font features."),default:!1})}validate(e){return"undefined"===typeof e?this.defaultValue:"string"===typeof e?"false"===e?R.OFF:"true"===e?R.ON:e:Boolean(e)?R.ON:R.OFF}}R.OFF='"liga" off, "calt" off',R.ON='"liga" on, "calt" on';class P extends b{constructor(){super(36)}compute(e,t,i){return e.fontInfo}}class F extends v{constructor(){super(38,"fontSize",le.fontSize,{type:"number",minimum:6,maximum:100,default:le.fontSize,description:o("fontSize","Controls the font size in pixels.")})}validate(e){let t=y.float(e,this.defaultValue);return 0===t?le.fontSize:y.clamp(t,6,100)}compute(e,t,i){return e.fontInfo.fontSize}}class W extends _{constructor(){super(39,"fontWeight",le.fontWeight,{anyOf:[{type:"number",minimum:W.MINIMUM_VALUE,maximum:W.MAXIMUM_VALUE,errorMessage:o("fontWeightErrorMessage",'Only "normal" and "bold" keywords or numbers between 1 and 1000 are allowed.')},{type:"string",pattern:"^(normal|bold|1000|[1-9][0-9]{0,2})$"},{enum:W.SUGGESTION_VALUES}],default:le.fontWeight,description:o("fontWeight",'Controls the font weight. Accepts "normal" and "bold" keywords or numbers between 1 and 1000.')})}validate(e){return"normal"===e||"bold"===e?e:String(C.clampedInt(e,le.fontWeight,W.MINIMUM_VALUE,W.MAXIMUM_VALUE))}}W.SUGGESTION_VALUES=["normal","bold","100","200","300","400","500","600","700","800","900"],W.MINIMUM_VALUE=1,W.MAXIMUM_VALUE=1e3;class B extends _{constructor(){const e={multiple:"peek",multipleDefinitions:"peek",multipleTypeDefinitions:"peek",multipleDeclarations:"peek",multipleImplementations:"peek",multipleReferences:"peek",alternativeDefinitionCommand:"editor.action.goToReferences",alternativeTypeDefinitionCommand:"editor.action.goToReferences",alternativeDeclarationCommand:"editor.action.goToReferences",alternativeImplementationCommand:"",alternativeReferenceCommand:""},t={type:"string",enum:["peek","gotoAndPeek","goto"],default:e.multiple,enumDescriptions:[o("editor.gotoLocation.multiple.peek","Show peek view of the results (default)"),o("editor.gotoLocation.multiple.gotoAndPeek","Go to the primary result and show a peek view"),o("editor.gotoLocation.multiple.goto","Go to the primary result and enable peek-less navigation to others")]};super(43,"gotoLocation",e,{"editor.gotoLocation.multiple":{deprecationMessage:o("editor.gotoLocation.multiple.deprecated","This setting is deprecated, please use separate settings like 'editor.editor.gotoLocation.multipleDefinitions' or 'editor.editor.gotoLocation.multipleImplementations' instead.")},"editor.gotoLocation.multipleDefinitions":Object.assign({description:o("editor.editor.gotoLocation.multipleDefinitions","Controls the behavior the 'Go to Definition'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleTypeDefinitions":Object.assign({description:o("editor.editor.gotoLocation.multipleTypeDefinitions","Controls the behavior the 'Go to Type Definition'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleDeclarations":Object.assign({description:o("editor.editor.gotoLocation.multipleDeclarations","Controls the behavior the 'Go to Declaration'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleImplementations":Object.assign({description:o("editor.editor.gotoLocation.multipleImplemenattions","Controls the behavior the 'Go to Implementations'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleReferences":Object.assign({description:o("editor.editor.gotoLocation.multipleReferences","Controls the behavior the 'Go to References'-command when multiple target locations exist.")},t),"editor.gotoLocation.alternativeDefinitionCommand":{type:"string",default:e.alternativeDefinitionCommand,description:o("alternativeDefinitionCommand","Alternative command id that is being executed when the result of 'Go to Definition' is the current location.")},"editor.gotoLocation.alternativeTypeDefinitionCommand":{type:"string",default:e.alternativeTypeDefinitionCommand,description:o("alternativeTypeDefinitionCommand","Alternative command id that is being executed when the result of 'Go to Type Definition' is the current location.")},"editor.gotoLocation.alternativeDeclarationCommand":{type:"string",default:e.alternativeDeclarationCommand,description:o("alternativeDeclarationCommand","Alternative command id that is being executed when the result of 'Go to Declaration' is the current location.")},"editor.gotoLocation.alternativeImplementationCommand":{type:"string",default:e.alternativeImplementationCommand,description:o("alternativeImplementationCommand","Alternative command id that is being executed when the result of 'Go to Implementation' is the current location.")},"editor.gotoLocation.alternativeReferenceCommand":{type:"string",default:e.alternativeReferenceCommand,description:o("alternativeReferenceCommand","Alternative command id that is being executed when the result of 'Go to Reference' is the current location.")}})}validate(e){var t,i,n,o,r;if(!e||"object"!==typeof e)return this.defaultValue;const s=e;return{multiple:x.stringSet(s.multiple,this.defaultValue.multiple,["peek","gotoAndPeek","goto"]),multipleDefinitions:null!==(t=s.multipleDefinitions)&&void 0!==t?t:x.stringSet(s.multipleDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleTypeDefinitions:null!==(i=s.multipleTypeDefinitions)&&void 0!==i?i:x.stringSet(s.multipleTypeDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleDeclarations:null!==(n=s.multipleDeclarations)&&void 0!==n?n:x.stringSet(s.multipleDeclarations,"peek",["peek","gotoAndPeek","goto"]),multipleImplementations:null!==(o=s.multipleImplementations)&&void 0!==o?o:x.stringSet(s.multipleImplementations,"peek",["peek","gotoAndPeek","goto"]),multipleReferences:null!==(r=s.multipleReferences)&&void 0!==r?r:x.stringSet(s.multipleReferences,"peek",["peek","gotoAndPeek","goto"]),alternativeDefinitionCommand:S.string(s.alternativeDefinitionCommand,this.defaultValue.alternativeDefinitionCommand),alternativeTypeDefinitionCommand:S.string(s.alternativeTypeDefinitionCommand,this.defaultValue.alternativeTypeDefinitionCommand),alternativeDeclarationCommand:S.string(s.alternativeDeclarationCommand,this.defaultValue.alternativeDeclarationCommand),alternativeImplementationCommand:S.string(s.alternativeImplementationCommand,this.defaultValue.alternativeImplementationCommand),alternativeReferenceCommand:S.string(s.alternativeReferenceCommand,this.defaultValue.alternativeReferenceCommand)}}}class V extends _{constructor(){const e={enabled:!0,delay:300,sticky:!0};super(46,"hover",e,{"editor.hover.enabled":{type:"boolean",default:e.enabled,description:o("hover.enabled","Controls whether the hover is shown.")},"editor.hover.delay":{type:"number",default:e.delay,description:o("hover.delay","Controls the delay in milliseconds after which the hover is shown.")},"editor.hover.sticky":{type:"boolean",default:e.sticky,description:o("hover.sticky","Controls whether the hover should remain visible when mouse is moved over it.")}})}validate(e){if(!e||"object"!==typeof e)return this.defaultValue;const t=e;return{enabled:w.boolean(t.enabled,this.defaultValue.enabled),delay:C.clampedInt(t.delay,this.defaultValue.delay,0,1e4),sticky:w.boolean(t.sticky,this.defaultValue.sticky)}}}class H extends b{constructor(){super(117,[42,50,31,56,84,52,53,86,106,109,110,2])}compute(e,t,i){return H.computeLayout(t,{memory:e.memory,outerWidth:e.outerWidth,outerHeight:e.outerHeight,isDominatedByLongLines:e.isDominatedByLongLines,lineHeight:e.fontInfo.lineHeight,viewLineCount:e.viewLineCount,lineNumbersDigitCount:e.lineNumbersDigitCount,typicalHalfwidthCharacterWidth:e.fontInfo.typicalHalfwidthCharacterWidth,maxDigitWidth:e.fontInfo.maxDigitWidth,pixelRatio:e.pixelRatio})}static computeContainedMinimapLineCount(e){const t=e.height/e.lineHeight,i=e.scrollBeyondLastLine?t-1:0,n=(e.viewLineCount+i)/(e.pixelRatio*e.height),o=Math.floor(e.viewLineCount/n);return{typicalViewportLineCount:t,extraLinesBeyondLastLine:i,desiredRatio:n,minimapLineCount:o}}static _computeMinimapLayout(e,t){const i=e.outerWidth,n=e.outerHeight,o=e.pixelRatio;if(!e.minimap.enabled)return{renderMinimap:0,minimapLeft:0,minimapWidth:0,minimapHeightIsEditorHeight:!1,minimapIsSampling:!1,minimapScale:1,minimapLineHeight:1,minimapCanvasInnerWidth:0,minimapCanvasInnerHeight:Math.floor(o*n),minimapCanvasOuterWidth:0,minimapCanvasOuterHeight:n};const r=t.stableMinimapLayoutInput,s=r&&e.outerHeight===r.outerHeight&&e.lineHeight===r.lineHeight&&e.typicalHalfwidthCharacterWidth===r.typicalHalfwidthCharacterWidth&&e.pixelRatio===r.pixelRatio&&e.scrollBeyondLastLine===r.scrollBeyondLastLine&&e.minimap.enabled===r.minimap.enabled&&e.minimap.side===r.minimap.side&&e.minimap.size===r.minimap.size&&e.minimap.showSlider===r.minimap.showSlider&&e.minimap.renderCharacters===r.minimap.renderCharacters&&e.minimap.maxColumn===r.minimap.maxColumn&&e.minimap.scale===r.minimap.scale&&e.verticalScrollbarWidth===r.verticalScrollbarWidth&&e.isViewportWrapping===r.isViewportWrapping,a=e.lineHeight,l=e.typicalHalfwidthCharacterWidth,c=e.scrollBeyondLastLine,h=e.minimap.renderCharacters;let d=o>=2?Math.round(2*e.minimap.scale):e.minimap.scale;const u=e.minimap.maxColumn,f=e.minimap.size,m=e.minimap.side,p=e.verticalScrollbarWidth,_=e.viewLineCount,b=e.remainingWidth,v=e.isViewportWrapping,w=h?2:3;let C=Math.floor(o*n);const y=C/o;let S=!1,x=!1,L=w*d,k=d/o,E=1;if("fill"===f||"fit"===f){const{typicalViewportLineCount:i,extraLinesBeyondLastLine:r,desiredRatio:l,minimapLineCount:h}=H.computeContainedMinimapLineCount({viewLineCount:_,scrollBeyondLastLine:c,height:n,lineHeight:a,pixelRatio:o}),u=_/h;if(u>1)S=!0,x=!0,d=1,L=1,k=d/o;else{let n=!1,c=d+1;if("fit"===f){const i=Math.ceil((_+r)*L);v&&s&&b<=t.stableFitRemainingWidth?(n=!0,c=t.stableFitMaxMinimapScale):(n=i>C,v&&n?(t.stableMinimapLayoutInput=e,t.stableFitRemainingWidth=b):(t.stableMinimapLayoutInput=null,t.stableFitRemainingWidth=0))}if("fill"===f||n){S=!0;const e=d;L=Math.min(a*o,Math.max(1,Math.floor(1/l))),d=Math.min(c,Math.max(1,Math.floor(L/w))),d>e&&(E=Math.min(2,d/e)),k=d/o/E,C=Math.ceil(Math.max(i,_+r)*L),v&&n&&(t.stableFitMaxMinimapScale=d)}}}const D=Math.floor(u*k),N=Math.min(D,Math.max(0,Math.floor((b-p-2)*k/(l+k)))+g);let T=Math.floor(o*N);const M=T/o;T=Math.floor(T*E);const I=h?1:2,O="left"===m?0:i-N-p;return{renderMinimap:I,minimapLeft:O,minimapWidth:N,minimapHeightIsEditorHeight:S,minimapIsSampling:x,minimapScale:d,minimapLineHeight:L,minimapCanvasInnerWidth:T,minimapCanvasInnerHeight:C,minimapCanvasOuterWidth:M,minimapCanvasOuterHeight:y}}static computeLayout(e,t){const i=0|t.outerWidth,n=0|t.outerHeight,o=0|t.lineHeight,r=0|t.lineNumbersDigitCount,s=t.typicalHalfwidthCharacterWidth,a=t.maxDigitWidth,l=t.pixelRatio,c=t.viewLineCount,h=e.get(106),d=e.get(109),u=e.get(110),g=e.get(2),f=t.isDominatedByLongLines,m=e.get(42),_=0!==e.get(52).renderType,b=e.get(53),v=e.get(86),w=e.get(56),y=e.get(84),S=y.verticalScrollbarSize,x=y.verticalHasArrows,L=y.arrowSize,k=y.horizontalScrollbarSize,E=e.get(50),D=e.get(31);let N;if("string"===typeof E&&/^\d+(\.\d+)?ch$/.test(E)){const e=parseFloat(E.substr(0,E.length-2));N=C.clampedInt(e*s,0,0,1e3)}else N=C.clampedInt(E,0,0,1e3);D&&(N+=16);let T=0;if(_){const e=Math.max(r,b);T=Math.round(e*a)}let M=0;m&&(M=o);let I=0,O=I+M,A=O+T,R=A+N;const P=i-M-T-N;let F=!1,W=!1,B=-1;2!==g&&(u&&f?(F=!0,W=!0):"on"===h||"bounded"===h?W=!0:"wordWrapColumn"===h&&(B=d));const V=H._computeMinimapLayout({outerWidth:i,outerHeight:n,lineHeight:o,typicalHalfwidthCharacterWidth:s,pixelRatio:l,scrollBeyondLastLine:v,minimap:w,verticalScrollbarWidth:S,viewLineCount:c,remainingWidth:P,isViewportWrapping:W},t.memory||new p);0!==V.renderMinimap&&0===V.minimapLeft&&(I+=V.minimapWidth,O+=V.minimapWidth,A+=V.minimapWidth,R+=V.minimapWidth);const z=P-V.minimapWidth,U=Math.max(1,Math.floor((z-S-2)/s)),j=x?L:0;return W&&(B=Math.max(1,U),"bounded"===h&&(B=Math.min(B,d))),{width:i,height:n,glyphMarginLeft:I,glyphMarginWidth:M,lineNumbersLeft:O,lineNumbersWidth:T,decorationsLeft:A,decorationsWidth:N,contentLeft:R,contentWidth:z,minimap:V,viewportColumn:U,isWordWrapMinified:F,isViewportWrapping:W,wrappingColumn:B,verticalScrollbarWidth:S,horizontalScrollbarHeight:k,overviewRuler:{top:j,width:S,height:n-2*j,right:0}}}}class z extends _{constructor(){const e={enabled:!0};super(49,"lightbulb",e,{"editor.lightbulb.enabled":{type:"boolean",default:e.enabled,description:o("codeActions","Enables the code action lightbulb in the editor.")}})}validate(e){if(!e||"object"!==typeof e)return this.defaultValue;const t=e;return{enabled:w.boolean(t.enabled,this.defaultValue.enabled)}}}class U extends C{constructor(){super(51,"lineHeight",le.lineHeight,0,150,{description:o("lineHeight","Controls the line height. Use 0 to compute the line height from the font size.")})}compute(e,t,i){return e.fontInfo.lineHeight}}class j extends _{constructor(){const e={enabled:!0,size:"proportional",side:"right",showSlider:"mouseover",renderCharacters:!0,maxColumn:120,scale:1};super(56,"minimap",e,{"editor.minimap.enabled":{type:"boolean",default:e.enabled,description:o("minimap.enabled","Controls whether the minimap is shown.")},"editor.minimap.size":{type:"string",enum:["proportional","fill","fit"],enumDescriptions:[o("minimap.size.proportional","The minimap has the same size as the editor contents (and might scroll)."),o("minimap.size.fill","The minimap will stretch or shrink as necessary to fill the height of the editor (no scrolling)."),o("minimap.size.fit","The minimap will shrink as necessary to never be larger than the editor (no scrolling).")],default:e.size,description:o("minimap.size","Controls the size of the minimap.")},"editor.minimap.side":{type:"string",enum:["left","right"],default:e.side,description:o("minimap.side","Controls the side where to render the minimap.")},"editor.minimap.showSlider":{type:"string",enum:["always","mouseover"],default:e.showSlider,description:o("minimap.showSlider","Controls when the minimap slider is shown.")},"editor.minimap.scale":{type:"number",default:e.scale,minimum:1,maximum:3,enum:[1,2,3],description:o("minimap.scale","Scale of content drawn in the minimap: 1, 2 or 3.")},"editor.minimap.renderCharacters":{type:"boolean",default:e.renderCharacters,description:o("minimap.renderCharacters","Render the actual characters on a line as opposed to color blocks.")},"editor.minimap.maxColumn":{type:"number",default:e.maxColumn,description:o("minimap.maxColumn","Limit the width of the minimap to render at most a certain number of columns.")}})}validate(e){if(!e||"object"!==typeof e)return this.defaultValue;const t=e;return{enabled:w.boolean(t.enabled,this.defaultValue.enabled),size:x.stringSet(t.size,this.defaultValue.size,["proportional","fill","fit"]),side:x.stringSet(t.side,this.defaultValue.side,["right","left"]),showSlider:x.stringSet(t.showSlider,this.defaultValue.showSlider,["always","mouseover"]),renderCharacters:w.boolean(t.renderCharacters,this.defaultValue.renderCharacters),scale:C.clampedInt(t.scale,1,1,3),maxColumn:C.clampedInt(t.maxColumn,this.defaultValue.maxColumn,1,1e4)}}}function K(e){return"ctrlCmd"===e?r["f"]?"metaKey":"ctrlKey":"altKey"}class q extends _{constructor(){super(66,"padding",{top:0,bottom:0},{"editor.padding.top":{type:"number",default:0,minimum:0,maximum:1e3,description:o("padding.top","Controls the amount of space between the top edge of the editor and the first line.")},"editor.padding.bottom":{type:"number",default:0,minimum:0,maximum:1e3,description:o("padding.bottom","Controls the amount of space between the bottom edge of the editor and the last line.")}})}validate(e){if(!e||"object"!==typeof e)return this.defaultValue;const t=e;return{top:C.clampedInt(t.top,0,0,1e3),bottom:C.clampedInt(t.bottom,0,0,1e3)}}}class $ extends _{constructor(){const e={enabled:!0,cycle:!1};super(67,"parameterHints",e,{"editor.parameterHints.enabled":{type:"boolean",default:e.enabled,description:o("parameterHints.enabled","Enables a pop-up that shows parameter documentation and type information as you type.")},"editor.parameterHints.cycle":{type:"boolean",default:e.cycle,description:o("parameterHints.cycle","Controls whether the parameter hints menu cycles or closes when reaching the end of the list.")}})}validate(e){if(!e||"object"!==typeof e)return this.defaultValue;const t=e;return{enabled:w.boolean(t.enabled,this.defaultValue.enabled),cycle:w.boolean(t.cycle,this.defaultValue.cycle)}}}class G extends b{constructor(){super(115)}compute(e,t,i){return e.pixelRatio}}class Y extends _{constructor(){const e={other:!0,comments:!1,strings:!1};super(70,"quickSuggestions",e,{anyOf:[{type:"boolean"},{type:"object",properties:{strings:{type:"boolean",default:e.strings,description:o("quickSuggestions.strings","Enable quick suggestions inside strings.")},comments:{type:"boolean",default:e.comments,description:o("quickSuggestions.comments","Enable quick suggestions inside comments.")},other:{type:"boolean",default:e.other,description:o("quickSuggestions.other","Enable quick suggestions outside of strings and comments.")}}}],default:e,description:o("quickSuggestions","Controls whether suggestions should automatically show up while typing.")}),this.defaultValue=e}validate(e){if("boolean"===typeof e)return e;if(e&&"object"===typeof e){const t=e,i={other:w.boolean(t.other,this.defaultValue.other),comments:w.boolean(t.comments,this.defaultValue.comments),strings:w.boolean(t.strings,this.defaultValue.strings)};return!!(i.other&&i.comments&&i.strings)||!!(i.other||i.comments||i.strings)&&i}return this.defaultValue}}class X extends _{constructor(){super(52,"lineNumbers",{renderType:1,renderFn:null},{type:"string",enum:["off","on","relative","interval"],enumDescriptions:[o("lineNumbers.off","Line numbers are not rendered."),o("lineNumbers.on","Line numbers are rendered as absolute number."),o("lineNumbers.relative","Line numbers are rendered as distance in lines to cursor position."),o("lineNumbers.interval","Line numbers are rendered every 10 lines.")],default:"on",description:o("lineNumbers","Controls the display of line numbers.")})}validate(e){let t=this.defaultValue.renderType,i=this.defaultValue.renderFn;return"undefined"!==typeof e&&("function"===typeof e?(t=4,i=e):t="interval"===e?3:"relative"===e?2:"on"===e?1:0),{renderType:t,renderFn:i}}}function Z(e){const t=e.get(79);return"editable"===t?e.get(72):"on"!==t}class Q extends _{constructor(){const e=[],t={type:"number",description:o("rulers.size","Number of monospace characters at which this editor ruler will render.")};super(83,"rulers",e,{type:"array",items:{anyOf:[t,{type:["object"],properties:{column:t,color:{type:"string",description:o("rulers.color","Color of this editor ruler."),format:"color-hex"}}}]},default:e,description:o("rulers","Render vertical rulers after a certain number of monospace characters. Use multiple values for multiple rulers. No rulers are drawn if array is empty.")})}validate(e){if(Array.isArray(e)){let t=[];for(let i of e)if("number"===typeof i)t.push({column:C.clampedInt(i,0,0,1e4),color:null});else if(i&&"object"===typeof i){const e=i;t.push({column:C.clampedInt(e.column,0,0,1e4),color:e.color})}return t.sort((e,t)=>e.column-t.column),t}return this.defaultValue}}function J(e,t){if("string"!==typeof e)return t;switch(e){case"hidden":return 2;case"visible":return 3;default:return 1}}class ee extends _{constructor(){super(84,"scrollbar",{vertical:1,horizontal:1,arrowSize:11,useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,horizontalScrollbarSize:12,horizontalSliderSize:12,verticalScrollbarSize:14,verticalSliderSize:14,handleMouseWheel:!0,alwaysConsumeMouseWheel:!0})}validate(e){if(!e||"object"!==typeof e)return this.defaultValue;const t=e,i=C.clampedInt(t.horizontalScrollbarSize,this.defaultValue.horizontalScrollbarSize,0,1e3),n=C.clampedInt(t.verticalScrollbarSize,this.defaultValue.verticalScrollbarSize,0,1e3);return{arrowSize:C.clampedInt(t.arrowSize,this.defaultValue.arrowSize,0,1e3),vertical:J(t.vertical,this.defaultValue.vertical),horizontal:J(t.horizontal,this.defaultValue.horizontal),useShadows:w.boolean(t.useShadows,this.defaultValue.useShadows),verticalHasArrows:w.boolean(t.verticalHasArrows,this.defaultValue.verticalHasArrows),horizontalHasArrows:w.boolean(t.horizontalHasArrows,this.defaultValue.horizontalHasArrows),handleMouseWheel:w.boolean(t.handleMouseWheel,this.defaultValue.handleMouseWheel),alwaysConsumeMouseWheel:w.boolean(t.alwaysConsumeMouseWheel,this.defaultValue.alwaysConsumeMouseWheel),horizontalScrollbarSize:i,horizontalSliderSize:C.clampedInt(t.horizontalSliderSize,i,0,1e3),verticalScrollbarSize:n,verticalSliderSize:C.clampedInt(t.verticalSliderSize,n,0,1e3)}}}class te extends _{constructor(){const e={insertMode:"insert",filterGraceful:!0,snippetsPreventQuickSuggestions:!0,localityBonus:!1,shareSuggestSelections:!1,showIcons:!0,maxVisibleSuggestions:12,showMethods:!0,showFunctions:!0,showConstructors:!0,showFields:!0,showVariables:!0,showClasses:!0,showStructs:!0,showInterfaces:!0,showModules:!0,showProperties:!0,showEvents:!0,showOperators:!0,showUnits:!0,showValues:!0,showConstants:!0,showEnums:!0,showEnumMembers:!0,showKeywords:!0,showWords:!0,showColors:!0,showFiles:!0,showReferences:!0,showFolders:!0,showTypeParameters:!0,showSnippets:!0,showUsers:!0,showIssues:!0,statusBar:{visible:!1}};super(96,"suggest",e,{"editor.suggest.insertMode":{type:"string",enum:["insert","replace"],enumDescriptions:[o("suggest.insertMode.insert","Insert suggestion without overwriting text right of the cursor."),o("suggest.insertMode.replace","Insert suggestion and overwrite text right of the cursor.")],default:e.insertMode,description:o("suggest.insertMode","Controls whether words are overwritten when accepting completions. Note that this depends on extensions opting into this feature.")},"editor.suggest.filterGraceful":{type:"boolean",default:e.filterGraceful,description:o("suggest.filterGraceful","Controls whether filtering and sorting suggestions accounts for small typos.")},"editor.suggest.localityBonus":{type:"boolean",default:e.localityBonus,description:o("suggest.localityBonus","Controls whether sorting favours words that appear close to the cursor.")},"editor.suggest.shareSuggestSelections":{type:"boolean",default:e.shareSuggestSelections,markdownDescription:o("suggest.shareSuggestSelections","Controls whether remembered suggestion selections are shared between multiple workspaces and windows (needs `#editor.suggestSelection#`).")},"editor.suggest.snippetsPreventQuickSuggestions":{type:"boolean",default:e.snippetsPreventQuickSuggestions,description:o("suggest.snippetsPreventQuickSuggestions","Controls whether an active snippet prevents quick suggestions.")},"editor.suggest.showIcons":{type:"boolean",default:e.showIcons,description:o("suggest.showIcons","Controls whether to show or hide icons in suggestions.")},"editor.suggest.maxVisibleSuggestions":{type:"number",default:e.maxVisibleSuggestions,minimum:1,maximum:15,description:o("suggest.maxVisibleSuggestions","Controls how many suggestions IntelliSense will show before showing a scrollbar (maximum 15).")},"editor.suggest.filteredTypes":{type:"object",deprecationMessage:o("deprecated","This setting is deprecated, please use separate settings like 'editor.suggest.showKeywords' or 'editor.suggest.showSnippets' instead.")},"editor.suggest.showMethods":{type:"boolean",default:!0,markdownDescription:o("editor.suggest.showMethods","When enabled IntelliSense shows `method`-suggestions.")},"editor.suggest.showFunctions":{type:"boolean",default:!0,markdownDescription:o("editor.suggest.showFunctions","When enabled IntelliSense shows `function`-suggestions.")},"editor.suggest.showConstructors":{type:"boolean",default:!0,markdownDescription:o("editor.suggest.showConstructors","When enabled IntelliSense shows `constructor`-suggestions.")},"editor.suggest.showFields":{type:"boolean",default:!0,markdownDescription:o("editor.suggest.showFields","When enabled IntelliSense shows `field`-suggestions.")},"editor.suggest.showVariables":{type:"boolean",default:!0,markdownDescription:o("editor.suggest.showVariables","When enabled IntelliSense shows `variable`-suggestions.")},"editor.suggest.showClasses":{type:"boolean",default:!0,markdownDescription:o("editor.suggest.showClasss","When enabled IntelliSense shows `class`-suggestions.")},"editor.suggest.showStructs":{type:"boolean",default:!0,markdownDescription:o("editor.suggest.showStructs","When enabled IntelliSense shows `struct`-suggestions.")},"editor.suggest.showInterfaces":{type:"boolean",default:!0,markdownDescription:o("editor.suggest.showInterfaces","When enabled IntelliSense shows `interface`-suggestions.")},"editor.suggest.showModules":{type:"boolean",default:!0,markdownDescription:o("editor.suggest.showModules","When enabled IntelliSense shows `module`-suggestions.")},"editor.suggest.showProperties":{type:"boolean",default:!0,markdownDescription:o("editor.suggest.showPropertys","When enabled IntelliSense shows `property`-suggestions.")},"editor.suggest.showEvents":{type:"boolean",default:!0,markdownDescription:o("editor.suggest.showEvents","When enabled IntelliSense shows `event`-suggestions.")},"editor.suggest.showOperators":{type:"boolean",default:!0,markdownDescription:o("editor.suggest.showOperators","When enabled IntelliSense shows `operator`-suggestions.")},"editor.suggest.showUnits":{type:"boolean",default:!0,markdownDescription:o("editor.suggest.showUnits","When enabled IntelliSense shows `unit`-suggestions.")},"editor.suggest.showValues":{type:"boolean",default:!0,markdownDescription:o("editor.suggest.showValues","When enabled IntelliSense shows `value`-suggestions.")},"editor.suggest.showConstants":{type:"boolean",default:!0,markdownDescription:o("editor.suggest.showConstants","When enabled IntelliSense shows `constant`-suggestions.")},"editor.suggest.showEnums":{type:"boolean",default:!0,markdownDescription:o("editor.suggest.showEnums","When enabled IntelliSense shows `enum`-suggestions.")},"editor.suggest.showEnumMembers":{type:"boolean",default:!0,markdownDescription:o("editor.suggest.showEnumMembers","When enabled IntelliSense shows `enumMember`-suggestions.")},"editor.suggest.showKeywords":{type:"boolean",default:!0,markdownDescription:o("editor.suggest.showKeywords","When enabled IntelliSense shows `keyword`-suggestions.")},"editor.suggest.showWords":{type:"boolean",default:!0,markdownDescription:o("editor.suggest.showTexts","When enabled IntelliSense shows `text`-suggestions.")},"editor.suggest.showColors":{type:"boolean",default:!0,markdownDescription:o("editor.suggest.showColors","When enabled IntelliSense shows `color`-suggestions.")},"editor.suggest.showFiles":{type:"boolean",default:!0,markdownDescription:o("editor.suggest.showFiles","When enabled IntelliSense shows `file`-suggestions.")},"editor.suggest.showReferences":{type:"boolean",default:!0,markdownDescription:o("editor.suggest.showReferences","When enabled IntelliSense shows `reference`-suggestions.")},"editor.suggest.showCustomcolors":{type:"boolean",default:!0,markdownDescription:o("editor.suggest.showCustomcolors","When enabled IntelliSense shows `customcolor`-suggestions.")},"editor.suggest.showFolders":{type:"boolean",default:!0,markdownDescription:o("editor.suggest.showFolders","When enabled IntelliSense shows `folder`-suggestions.")},"editor.suggest.showTypeParameters":{type:"boolean",default:!0,markdownDescription:o("editor.suggest.showTypeParameters","When enabled IntelliSense shows `typeParameter`-suggestions.")},"editor.suggest.showSnippets":{type:"boolean",default:!0,markdownDescription:o("editor.suggest.showSnippets","When enabled IntelliSense shows `snippet`-suggestions.")},"editor.suggest.showUsers":{type:"boolean",default:!0,markdownDescription:o("editor.suggest.showUsers","When enabled IntelliSense shows `user`-suggestions.")},"editor.suggest.showIssues":{type:"boolean",default:!0,markdownDescription:o("editor.suggest.showIssues","When enabled IntelliSense shows `issues`-suggestions.")},"editor.suggest.statusBar.visible":{type:"boolean",default:!1,markdownDescription:o("editor.suggest.statusBar.visible","Controls the visibility of the status bar at the bottom of the suggest widget.")}})}validate(e){var t;if(!e||"object"!==typeof e)return this.defaultValue;const i=e;return{insertMode:x.stringSet(i.insertMode,this.defaultValue.insertMode,["insert","replace"]),filterGraceful:w.boolean(i.filterGraceful,this.defaultValue.filterGraceful),snippetsPreventQuickSuggestions:w.boolean(i.snippetsPreventQuickSuggestions,this.defaultValue.filterGraceful),localityBonus:w.boolean(i.localityBonus,this.defaultValue.localityBonus),shareSuggestSelections:w.boolean(i.shareSuggestSelections,this.defaultValue.shareSuggestSelections),showIcons:w.boolean(i.showIcons,this.defaultValue.showIcons),maxVisibleSuggestions:C.clampedInt(i.maxVisibleSuggestions,this.defaultValue.maxVisibleSuggestions,1,15),showMethods:w.boolean(i.showMethods,this.defaultValue.showMethods),showFunctions:w.boolean(i.showFunctions,this.defaultValue.showFunctions),showConstructors:w.boolean(i.showConstructors,this.defaultValue.showConstructors),showFields:w.boolean(i.showFields,this.defaultValue.showFields),showVariables:w.boolean(i.showVariables,this.defaultValue.showVariables),showClasses:w.boolean(i.showClasses,this.defaultValue.showClasses),showStructs:w.boolean(i.showStructs,this.defaultValue.showStructs),showInterfaces:w.boolean(i.showInterfaces,this.defaultValue.showInterfaces),showModules:w.boolean(i.showModules,this.defaultValue.showModules),showProperties:w.boolean(i.showProperties,this.defaultValue.showProperties),showEvents:w.boolean(i.showEvents,this.defaultValue.showEvents),showOperators:w.boolean(i.showOperators,this.defaultValue.showOperators),showUnits:w.boolean(i.showUnits,this.defaultValue.showUnits),showValues:w.boolean(i.showValues,this.defaultValue.showValues),showConstants:w.boolean(i.showConstants,this.defaultValue.showConstants),showEnums:w.boolean(i.showEnums,this.defaultValue.showEnums),showEnumMembers:w.boolean(i.showEnumMembers,this.defaultValue.showEnumMembers),showKeywords:w.boolean(i.showKeywords,this.defaultValue.showKeywords),showWords:w.boolean(i.showWords,this.defaultValue.showWords),showColors:w.boolean(i.showColors,this.defaultValue.showColors),showFiles:w.boolean(i.showFiles,this.defaultValue.showFiles),showReferences:w.boolean(i.showReferences,this.defaultValue.showReferences),showFolders:w.boolean(i.showFolders,this.defaultValue.showFolders),showTypeParameters:w.boolean(i.showTypeParameters,this.defaultValue.showTypeParameters),showSnippets:w.boolean(i.showSnippets,this.defaultValue.showSnippets),showUsers:w.boolean(i.showUsers,this.defaultValue.showUsers),showIssues:w.boolean(i.showIssues,this.defaultValue.showIssues),statusBar:{visible:w.boolean(null===(t=i.statusBar)||void 0===t?void 0:t.visible,!!this.defaultValue.statusBar.visible)}}}}class ie extends b{constructor(){super(116,[72])}compute(e,t,i){const n=t.get(72);return!!n||e.tabFocusMode}}function ne(e){switch(e){case"none":return 0;case"same":return 1;case"indent":return 2;case"deepIndent":return 3}}class oe extends b{constructor(){super(118,[117])}compute(e,t,i){const n=t.get(117);return{isDominatedByLongLines:e.isDominatedByLongLines,isWordWrapMinified:n.isWordWrapMinified,isViewportWrapping:n.isViewportWrapping,wrappingColumn:n.wrappingColumn}}}const re="Consolas, 'Courier New', monospace",se="Menlo, Monaco, 'Courier New', monospace",ae="'Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback'",le={fontFamily:r["f"]?se:r["d"]?ae:re,fontWeight:"normal",fontSize:r["f"]?12:14,lineHeight:0,letterSpacing:0},ce={tabSize:4,indentSize:4,insertSpaces:!0,detectIndentation:!0,trimAutoWhitespace:!0,largeFileOptimizations:!0},he=[];function de(e){return he[e.id]=e,e}const ue={acceptSuggestionOnCommitCharacter:de(new w(0,"acceptSuggestionOnCommitCharacter",!0,{markdownDescription:o("acceptSuggestionOnCommitCharacter","Controls whether suggestions should be accepted on commit characters. For example, in JavaScript, the semi-colon (`;`) can be a commit character that accepts a suggestion and types that character.")})),acceptSuggestionOnEnter:de(new x(1,"acceptSuggestionOnEnter","on",["on","smart","off"],{markdownEnumDescriptions:["",o("acceptSuggestionOnEnterSmart","Only accept a suggestion with `Enter` when it makes a textual change."),""],markdownDescription:o("acceptSuggestionOnEnter","Controls whether suggestions should be accepted on `Enter`, in addition to `Tab`. Helps to avoid ambiguity between inserting new lines or accepting suggestions.")})),accessibilitySupport:de(new E),accessibilityPageSize:de(new C(3,"accessibilityPageSize",10,1,1073741824,{description:o("accessibilityPageSize","Controls the number of lines in the editor that can be read out by a screen reader. Warning: this has a performance implication for numbers larger than the default.")})),ariaLabel:de(new S(4,"ariaLabel",o("editorViewAccessibleLabel","Editor content"))),autoClosingBrackets:de(new x(5,"autoClosingBrackets","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",o("editor.autoClosingBrackets.languageDefined","Use language configurations to determine when to autoclose brackets."),o("editor.autoClosingBrackets.beforeWhitespace","Autoclose brackets only when the cursor is to the left of whitespace."),""],description:o("autoClosingBrackets","Controls whether the editor should automatically close brackets after the user adds an opening bracket.")})),autoClosingOvertype:de(new x(6,"autoClosingOvertype","auto",["always","auto","never"],{enumDescriptions:["",o("editor.autoClosingOvertype.auto","Type over closing quotes or brackets only if they were automatically inserted."),""],description:o("autoClosingOvertype","Controls whether the editor should type over closing quotes or brackets.")})),autoClosingQuotes:de(new x(7,"autoClosingQuotes","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",o("editor.autoClosingQuotes.languageDefined","Use language configurations to determine when to autoclose quotes."),o("editor.autoClosingQuotes.beforeWhitespace","Autoclose quotes only when the cursor is to the left of whitespace."),""],description:o("autoClosingQuotes","Controls whether the editor should automatically close quotes after the user adds an opening quote.")})),autoIndent:de(new L(8,"autoIndent",4,"full",["none","keep","brackets","advanced","full"],k,{enumDescriptions:[o("editor.autoIndent.none","The editor will not insert indentation automatically."),o("editor.autoIndent.keep","The editor will keep the current line's indentation."),o("editor.autoIndent.brackets","The editor will keep the current line's indentation and honor language defined brackets."),o("editor.autoIndent.advanced","The editor will keep the current line's indentation, honor language defined brackets and invoke special onEnterRules defined by languages."),o("editor.autoIndent.full","The editor will keep the current line's indentation, honor language defined brackets, invoke special onEnterRules defined by languages, and honor indentationRules defined by languages.")],description:o("autoIndent","Controls whether the editor should automatically adjust the indentation when users type, paste, move or indent lines.")})),automaticLayout:de(new w(9,"automaticLayout",!1)),autoSurround:de(new x(10,"autoSurround","languageDefined",["languageDefined","quotes","brackets","never"],{enumDescriptions:[o("editor.autoSurround.languageDefined","Use language configurations to determine when to automatically surround selections."),o("editor.autoSurround.quotes","Surround with quotes but not brackets."),o("editor.autoSurround.brackets","Surround with brackets but not quotes."),""],description:o("autoSurround","Controls whether the editor should automatically surround selections.")})),codeLens:de(new w(11,"codeLens",!0,{description:o("codeLens","Controls whether the editor shows CodeLens.")})),colorDecorators:de(new w(12,"colorDecorators",!0,{description:o("colorDecorators","Controls whether the editor should render the inline color decorators and color picker.")})),columnSelection:de(new w(13,"columnSelection",!1,{description:o("columnSelection","Enable that the selection with the mouse and keys is doing column selection.")})),comments:de(new D),contextmenu:de(new w(15,"contextmenu",!0)),copyWithSyntaxHighlighting:de(new w(16,"copyWithSyntaxHighlighting",!0,{description:o("copyWithSyntaxHighlighting","Controls whether syntax highlighting should be copied into the clipboard.")})),cursorBlinking:de(new L(17,"cursorBlinking",1,"blink",["blink","smooth","phase","expand","solid"],N,{description:o("cursorBlinking","Control the cursor animation style.")})),cursorSmoothCaretAnimation:de(new w(18,"cursorSmoothCaretAnimation",!1,{description:o("cursorSmoothCaretAnimation","Controls whether the smooth caret animation should be enabled.")})),cursorStyle:de(new L(19,"cursorStyle",T.Line,"line",["line","block","underline","line-thin","block-outline","underline-thin"],M,{description:o("cursorStyle","Controls the cursor style.")})),cursorSurroundingLines:de(new C(20,"cursorSurroundingLines",0,0,1073741824,{description:o("cursorSurroundingLines","Controls the minimal number of visible leading and trailing lines surrounding the cursor. Known as 'scrollOff' or `scrollOffset` in some other editors.")})),cursorSurroundingLinesStyle:de(new x(21,"cursorSurroundingLinesStyle","default",["default","all"],{enumDescriptions:[o("cursorSurroundingLinesStyle.default","`cursorSurroundingLines` is enforced only when triggered via the keyboard or API."),o("cursorSurroundingLinesStyle.all","`cursorSurroundingLines` is enforced always.")],description:o("cursorSurroundingLinesStyle","Controls when `cursorSurroundingLines` should be enforced.")})),cursorWidth:de(new C(22,"cursorWidth",0,0,1073741824,{markdownDescription:o("cursorWidth","Controls the width of the cursor when `#editor.cursorStyle#` is set to `line`.")})),disableLayerHinting:de(new w(23,"disableLayerHinting",!1)),disableMonospaceOptimizations:de(new w(24,"disableMonospaceOptimizations",!1)),dragAndDrop:de(new w(25,"dragAndDrop",!0,{description:o("dragAndDrop","Controls whether the editor should allow moving selections via drag and drop.")})),emptySelectionClipboard:de(new O),extraEditorClassName:de(new S(27,"extraEditorClassName","")),fastScrollSensitivity:de(new y(28,"fastScrollSensitivity",5,e=>e<=0?5:e,{markdownDescription:o("fastScrollSensitivity","Scrolling speed multiplier when pressing `Alt`.")})),find:de(new A),fixedOverflowWidgets:de(new w(30,"fixedOverflowWidgets",!1)),folding:de(new w(31,"folding",!0,{description:o("folding","Controls whether the editor has code folding enabled.")})),foldingStrategy:de(new x(32,"foldingStrategy","auto",["auto","indentation"],{enumDescriptions:[o("foldingStrategy.auto","Use a language-specific folding strategy if available, else the indentation-based one."),o("foldingStrategy.indentation","Use the indentation-based folding strategy.")],description:o("foldingStrategy","Controls the strategy for computing folding ranges.")})),foldingHighlight:de(new w(33,"foldingHighlight",!0,{description:o("foldingHighlight","Controls whether the editor should highlight folded ranges.")})),unfoldOnClickAfterEndOfLine:de(new w(34,"unfoldOnClickAfterEndOfLine",!1,{description:o("unfoldOnClickAfterEndOfLine","Controls whether clicking on the empty content after a folded line will unfold the line.")})),fontFamily:de(new S(35,"fontFamily",le.fontFamily,{description:o("fontFamily","Controls the font family.")})),fontInfo:de(new P),fontLigatures2:de(new R),fontSize:de(new F),fontWeight:de(new W),formatOnPaste:de(new w(40,"formatOnPaste",!1,{description:o("formatOnPaste","Controls whether the editor should automatically format the pasted content. A formatter must be available and the formatter should be able to format a range in a document.")})),formatOnType:de(new w(41,"formatOnType",!1,{description:o("formatOnType","Controls whether the editor should automatically format the line after typing.")})),glyphMargin:de(new w(42,"glyphMargin",!0,{description:o("glyphMargin","Controls whether the editor should render the vertical glyph margin. Glyph margin is mostly used for debugging.")})),gotoLocation:de(new B),hideCursorInOverviewRuler:de(new w(44,"hideCursorInOverviewRuler",!1,{description:o("hideCursorInOverviewRuler","Controls whether the cursor should be hidden in the overview ruler.")})),highlightActiveIndentGuide:de(new w(45,"highlightActiveIndentGuide",!0,{description:o("highlightActiveIndentGuide","Controls whether the editor should highlight the active indent guide.")})),hover:de(new V),inDiffEditor:de(new w(47,"inDiffEditor",!1)),letterSpacing:de(new y(48,"letterSpacing",le.letterSpacing,e=>y.clamp(e,-5,20),{description:o("letterSpacing","Controls the letter spacing in pixels.")})),lightbulb:de(new z),lineDecorationsWidth:de(new v(50,"lineDecorationsWidth",10)),lineHeight:de(new U),lineNumbers:de(new X),lineNumbersMinChars:de(new C(53,"lineNumbersMinChars",5,1,300)),links:de(new w(54,"links",!0,{description:o("links","Controls whether the editor should detect links and make them clickable.")})),matchBrackets:de(new x(55,"matchBrackets","always",["always","near","never"],{description:o("matchBrackets","Highlight matching brackets.")})),minimap:de(new j),mouseStyle:de(new x(57,"mouseStyle","text",["text","default","copy"])),mouseWheelScrollSensitivity:de(new y(58,"mouseWheelScrollSensitivity",1,e=>0===e?1:e,{markdownDescription:o("mouseWheelScrollSensitivity","A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.")})),mouseWheelZoom:de(new w(59,"mouseWheelZoom",!1,{markdownDescription:o("mouseWheelZoom","Zoom the font of the editor when using mouse wheel and holding `Ctrl`.")})),multiCursorMergeOverlapping:de(new w(60,"multiCursorMergeOverlapping",!0,{description:o("multiCursorMergeOverlapping","Merge multiple cursors when they are overlapping.")})),multiCursorModifier:de(new L(61,"multiCursorModifier","altKey","alt",["ctrlCmd","alt"],K,{markdownEnumDescriptions:[o("multiCursorModifier.ctrlCmd","Maps to `Control` on Windows and Linux and to `Command` on macOS."),o("multiCursorModifier.alt","Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],markdownDescription:o({key:"multiCursorModifier",comment:["- `ctrlCmd` refers to a value the setting can take and should not be localized.","- `Control` and `Command` refer to the modifier keys Ctrl or Cmd on the keyboard and can be localized."]},"The modifier to be used to add multiple cursors with the mouse. The Go To Definition and Open Link mouse gestures will adapt such that they do not conflict with the multicursor modifier. [Read more](https://code.visualstudio.com/docs/editor/codebasics#_multicursor-modifier).")})),multiCursorPaste:de(new x(62,"multiCursorPaste","spread",["spread","full"],{markdownEnumDescriptions:[o("multiCursorPaste.spread","Each cursor pastes a single line of the text."),o("multiCursorPaste.full","Each cursor pastes the full text.")],markdownDescription:o("multiCursorPaste","Controls pasting when the line count of the pasted text matches the cursor count.")})),occurrencesHighlight:de(new w(63,"occurrencesHighlight",!0,{description:o("occurrencesHighlight","Controls whether the editor should highlight semantic symbol occurrences.")})),overviewRulerBorder:de(new w(64,"overviewRulerBorder",!0,{description:o("overviewRulerBorder","Controls whether a border should be drawn around the overview ruler.")})),overviewRulerLanes:de(new C(65,"overviewRulerLanes",3,0,3)),padding:de(new q),parameterHints:de(new $),peekWidgetDefaultFocus:de(new x(68,"peekWidgetDefaultFocus","tree",["tree","editor"],{enumDescriptions:[o("peekWidgetDefaultFocus.tree","Focus the tree when opening peek"),o("peekWidgetDefaultFocus.editor","Focus the editor when opening peek")],description:o("peekWidgetDefaultFocus","Controls whether to focus the inline editor or the tree in the peek widget.")})),definitionLinkOpensInPeek:de(new w(69,"definitionLinkOpensInPeek",!1,{description:o("definitionLinkOpensInPeek","Controls whether the Go to Definition mouse gesture always opens the peek widget.")})),quickSuggestions:de(new Y),quickSuggestionsDelay:de(new C(71,"quickSuggestionsDelay",10,0,1073741824,{description:o("quickSuggestionsDelay","Controls the delay in milliseconds after which quick suggestions will show up.")})),readOnly:de(new w(72,"readOnly",!1)),renameOnType:de(new w(73,"renameOnType",!1,{description:o("renameOnType","Controls whether the editor auto renames on type.")})),renderControlCharacters:de(new w(74,"renderControlCharacters",!1,{description:o("renderControlCharacters","Controls whether the editor should render control characters.")})),renderIndentGuides:de(new w(75,"renderIndentGuides",!0,{description:o("renderIndentGuides","Controls whether the editor should render indent guides.")})),renderFinalNewline:de(new w(76,"renderFinalNewline",!0,{description:o("renderFinalNewline","Render last line number when the file ends with a newline.")})),renderLineHighlight:de(new x(77,"renderLineHighlight","line",["none","gutter","line","all"],{enumDescriptions:["","","",o("renderLineHighlight.all","Highlights both the gutter and the current line.")],description:o("renderLineHighlight","Controls how the editor should render the current line highlight.")})),renderLineHighlightOnlyWhenFocus:de(new w(78,"renderLineHighlightOnlyWhenFocus",!1,{description:o("renderLineHighlightOnlyWhenFocus","Controls if the editor should render the current line highlight only when the editor is focused")})),renderValidationDecorations:de(new x(79,"renderValidationDecorations","editable",["editable","on","off"])),renderWhitespace:de(new x(80,"renderWhitespace","selection",["none","boundary","selection","trailing","all"],{enumDescriptions:["",o("renderWhitespace.boundary","Render whitespace characters except for single spaces between words."),o("renderWhitespace.selection","Render whitespace characters only on selected text."),o("renderWhitespace.trailing","Render only trailing whitespace characters"),""],description:o("renderWhitespace","Controls how the editor should render whitespace characters.")})),revealHorizontalRightPadding:de(new C(81,"revealHorizontalRightPadding",30,0,1e3)),roundedSelection:de(new w(82,"roundedSelection",!0,{description:o("roundedSelection","Controls whether selections should have rounded corners.")})),rulers:de(new Q),scrollbar:de(new ee),scrollBeyondLastColumn:de(new C(85,"scrollBeyondLastColumn",5,0,1073741824,{description:o("scrollBeyondLastColumn","Controls the number of extra characters beyond which the editor will scroll horizontally.")})),scrollBeyondLastLine:de(new w(86,"scrollBeyondLastLine",!0,{description:o("scrollBeyondLastLine","Controls whether the editor will scroll beyond the last line.")})),scrollPredominantAxis:de(new w(87,"scrollPredominantAxis",!0,{description:o("scrollPredominantAxis","Scroll only along the predominant axis when scrolling both vertically and horizontally at the same time. Prevents horizontal drift when scrolling vertically on a trackpad.")})),selectionClipboard:de(new w(88,"selectionClipboard",!0,{description:o("selectionClipboard","Controls whether the Linux primary clipboard should be supported."),included:r["d"]})),selectionHighlight:de(new w(89,"selectionHighlight",!0,{description:o("selectionHighlight","Controls whether the editor should highlight matches similar to the selection.")})),selectOnLineNumbers:de(new w(90,"selectOnLineNumbers",!0)),showFoldingControls:de(new x(91,"showFoldingControls","mouseover",["always","mouseover"],{enumDescriptions:[o("showFoldingControls.always","Always show the folding controls."),o("showFoldingControls.mouseover","Only show the folding controls when the mouse is over the gutter.")],description:o("showFoldingControls","Controls when the folding controls on the gutter are shown.")})),showUnused:de(new w(92,"showUnused",!0,{description:o("showUnused","Controls fading out of unused code.")})),showDeprecated:de(new w(113,"showDeprecated",!0,{description:o("showDeprecated","Controls strikethrough deprecated variables.")})),snippetSuggestions:de(new x(93,"snippetSuggestions","inline",["top","bottom","inline","none"],{enumDescriptions:[o("snippetSuggestions.top","Show snippet suggestions on top of other suggestions."),o("snippetSuggestions.bottom","Show snippet suggestions below other suggestions."),o("snippetSuggestions.inline","Show snippets suggestions with other suggestions."),o("snippetSuggestions.none","Do not show snippet suggestions.")],description:o("snippetSuggestions","Controls whether snippets are shown with other suggestions and how they are sorted.")})),smoothScrolling:de(new w(94,"smoothScrolling",!1,{description:o("smoothScrolling","Controls whether the editor will scroll using an animation.")})),stopRenderingLineAfter:de(new C(95,"stopRenderingLineAfter",1e4,-1,1073741824)),suggest:de(new te),suggestFontSize:de(new C(97,"suggestFontSize",0,0,1e3,{markdownDescription:o("suggestFontSize","Font size for the suggest widget. When set to `0`, the value of `#editor.fontSize#` is used.")})),suggestLineHeight:de(new C(98,"suggestLineHeight",0,0,1e3,{markdownDescription:o("suggestLineHeight","Line height for the suggest widget. When set to `0`, the value of `#editor.lineHeight#` is used.")})),suggestOnTriggerCharacters:de(new w(99,"suggestOnTriggerCharacters",!0,{description:o("suggestOnTriggerCharacters","Controls whether suggestions should automatically show up when typing trigger characters.")})),suggestSelection:de(new x(100,"suggestSelection","recentlyUsed",["first","recentlyUsed","recentlyUsedByPrefix"],{markdownEnumDescriptions:[o("suggestSelection.first","Always select the first suggestion."),o("suggestSelection.recentlyUsed","Select recent suggestions unless further typing selects one, e.g. `console.| -> console.log` because `log` has been completed recently."),o("suggestSelection.recentlyUsedByPrefix","Select suggestions based on previous prefixes that have completed those suggestions, e.g. `co -> console` and `con -> const`.")],description:o("suggestSelection","Controls how suggestions are pre-selected when showing the suggest list.")})),tabCompletion:de(new x(101,"tabCompletion","off",["on","off","onlySnippets"],{enumDescriptions:[o("tabCompletion.on","Tab complete will insert the best matching suggestion when pressing tab."),o("tabCompletion.off","Disable tab completions."),o("tabCompletion.onlySnippets","Tab complete snippets when their prefix match. Works best when 'quickSuggestions' aren't enabled.")],description:o("tabCompletion","Enables tab completions.")})),tabIndex:de(new C(102,"tabIndex",0,-1,1073741824)),unusualLineTerminators:de(new x(103,"unusualLineTerminators","prompt",["off","prompt","auto"],{enumDescriptions:[o("unusualLineTerminators.off","Unusual line terminators are ignored."),o("unusualLineTerminators.prompt","Unusual line terminators prompt to be removed."),o("unusualLineTerminators.auto","Unusual line terminators are automatically removed.")],description:o("unusualLineTerminators","Remove unusual line terminators that might cause problems.")})),useTabStops:de(new w(104,"useTabStops",!0,{description:o("useTabStops","Inserting and deleting whitespace follows tab stops.")})),wordSeparators:de(new S(105,"wordSeparators",s,{description:o("wordSeparators","Characters that will be used as word separators when doing word related navigations or operations.")})),wordWrap:de(new x(106,"wordWrap","off",["off","on","wordWrapColumn","bounded"],{markdownEnumDescriptions:[o("wordWrap.off","Lines will never wrap."),o("wordWrap.on","Lines will wrap at the viewport width."),o({key:"wordWrap.wordWrapColumn",comment:["- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Lines will wrap at `#editor.wordWrapColumn#`."),o({key:"wordWrap.bounded",comment:["- viewport means the edge of the visible window size.","- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Lines will wrap at the minimum of viewport and `#editor.wordWrapColumn#`.")],description:o({key:"wordWrap",comment:["- 'off', 'on', 'wordWrapColumn' and 'bounded' refer to values the setting can take and should not be localized.","- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Controls how lines should wrap.")})),wordWrapBreakAfterCharacters:de(new S(107,"wordWrapBreakAfterCharacters"," \t})]?|/&.,;¢°′″‰℃、。。、¢,.:;?!%・・ゝゞヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻ァィゥェォャュョッー”〉》」』】〕)]}」")),wordWrapBreakBeforeCharacters:de(new S(108,"wordWrapBreakBeforeCharacters","([{‘“〈《「『【〔([{「£¥$£¥++")),wordWrapColumn:de(new C(109,"wordWrapColumn",80,1,1073741824,{markdownDescription:o({key:"wordWrapColumn",comment:["- `editor.wordWrap` refers to a different setting and should not be localized.","- 'wordWrapColumn' and 'bounded' refer to values the different setting can take and should not be localized."]},"Controls the wrapping column of the editor when `#editor.wordWrap#` is `wordWrapColumn` or `bounded`.")})),wordWrapMinified:de(new w(110,"wordWrapMinified",!0)),wrappingIndent:de(new L(111,"wrappingIndent",1,"same",["none","same","indent","deepIndent"],ne,{enumDescriptions:[o("wrappingIndent.none","No indentation. Wrapped lines begin at column 1."),o("wrappingIndent.same","Wrapped lines get the same indentation as the parent."),o("wrappingIndent.indent","Wrapped lines get +1 indentation toward the parent."),o("wrappingIndent.deepIndent","Wrapped lines get +2 indentation toward the parent.")],description:o("wrappingIndent","Controls the indentation of wrapped lines.")})),wrappingStrategy:de(new x(112,"wrappingStrategy","simple",["simple","advanced"],{enumDescriptions:[o("wrappingStrategy.simple","Assumes that all characters are of the same width. This is a fast algorithm that works correctly for monospace fonts and certain scripts (like Latin characters) where glyphs are of equal width."),o("wrappingStrategy.advanced","Delegates wrapping points computation to the browser. This is a slow algorithm, that might cause freezes for large files, but it works correctly in all cases.")],description:o("wrappingStrategy","Controls the algorithm that computes wrapping points.")})),editorClassName:de(new I),pixelRatio:de(new G),tabFocusMode:de(new ie),layoutInfo:de(new H),wrappingInfo:de(new oe)};class ge{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{if(e.stack)throw new Error(e.message+"\n\n"+e.stack);throw e},0)}}emit(e){this.listeners.forEach(t=>{t(e)})}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}}const fe=new ge;function me(e){be(e)||fe.onUnexpectedError(e)}function pe(e){if(e instanceof Error){let{name:t,message:i}=e;const n=e.stacktrace||e.stack;return{$isError:!0,name:t,message:i,stack:n}}return e}const _e="Canceled";function be(e){return e instanceof Error&&e.name===_e&&e.message===_e}function ve(){const e=new Error(_e);return e.name=e.message,e}function we(e){return e?new Error("Illegal argument: "+e):new Error("Illegal argument")}function Ce(e){return e?new Error("Illegal state: "+e):new Error("Illegal state")}var ye;(function(e){function t(e){return e&&"object"===typeof e&&"function"===typeof e[Symbol.iterator]}e.is=t;const i=Object.freeze([]);function n(){return i}function*o(e){yield e}function r(e){return e||i}function s(e){return e[Symbol.iterator]().next().value}function a(e,t){for(const i of e)if(t(i))return!0;return!1}function*l(e,t){for(const i of e)t(i)&&(yield i)}function*c(e,t){for(const i of e)yield t(i)}function*h(...e){for(const t of e)for(const e of t)yield e}function d(t,i=Number.POSITIVE_INFINITY){const n=[];if(0===i)return[n,t];const o=t[Symbol.iterator]();for(let r=0;r<i;r++){const t=o.next();if(t.done)return[n,e.empty()];n.push(t.value)}return[n,{[Symbol.iterator](){return o}}]}e.empty=n,e.single=o,e.from=r,e.first=s,e.some=a,e.filter=l,e.map=c,e.concat=h,e.consume=d})(ye||(ye={}));const Se=!1,xe="__is_disposable_tracked__";function Le(e){if(Se&&e&&e!==Oe.None)try{e[xe]=!0}catch(t){}}function ke(e){if(!Se)return e;const t=new Error("Potentially leaked disposable").stack;return setTimeout(()=>{e[xe]||console.log(t)},3e3),e}class Ee extends Error{constructor(e){super(`Encounter errors while disposing of store. Errors: [${e.join(", ")}]`),this.errors=e}}function De(e){return"function"===typeof e.dispose&&0===e.dispose.length}function Ne(e){if(ye.is(e)){let i=[];for(const n of e)if(n){Le(n);try{n.dispose()}catch(t){i.push(t)}}if(1===i.length)throw i[0];if(i.length>1)throw new Ee(i);return Array.isArray(e)?[]:e}if(e)return Le(e),e.dispose(),e}function Te(...e){return e.forEach(Le),ke({dispose:()=>Ne(e)})}function Me(e){const t=ke({dispose:()=>{Le(t),e()}});return t}class Ie{constructor(){this._toDispose=new Set,this._isDisposed=!1}dispose(){this._isDisposed||(Le(this),this._isDisposed=!0,this.clear())}clear(){try{Ne(this._toDispose.values())}finally{this._toDispose.clear()}}add(e){if(!e)return e;if(e===this)throw new Error("Cannot register a disposable on itself!");return Le(e),this._isDisposed?Ie.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(e),e}}Ie.DISABLE_DISPOSED_WARNING=!1;class Oe{constructor(){this._store=new Ie,ke(this)}dispose(){Le(this),this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}}Oe.None=Object.freeze({dispose(){}});class Ae{constructor(e){this.object=e}dispose(){}}class Re{constructor(e){this.element=e,this.next=Re.Undefined,this.prev=Re.Undefined}}Re.Undefined=new Re(void 0);class Pe{constructor(){this._first=Re.Undefined,this._last=Re.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===Re.Undefined}clear(){this._first=Re.Undefined,this._last=Re.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,t){const i=new Re(e);if(this._first===Re.Undefined)this._first=i,this._last=i;else if(t){const e=this._last;this._last=i,i.prev=e,e.next=i}else{const e=this._first;this._first=i,i.next=e,e.prev=i}this._size+=1;let n=!1;return()=>{n||(n=!0,this._remove(i))}}shift(){if(this._first!==Re.Undefined){const e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==Re.Undefined){const e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==Re.Undefined&&e.next!==Re.Undefined){const t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===Re.Undefined&&e.next===Re.Undefined?(this._first=Re.Undefined,this._last=Re.Undefined):e.next===Re.Undefined?(this._last=this._last.prev,this._last.next=Re.Undefined):e.prev===Re.Undefined&&(this._first=this._first.next,this._first.prev=Re.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;while(e!==Re.Undefined)yield e.element,e=e.next}toArray(){const e=[];for(let t=this._first;t!==Re.Undefined;t=t.next)e.push(t.element);return e}}var Fe;(function(e){function t(e){return(t,i=null,n)=>{let o,r=!1;return o=e(e=>{if(!r)return o?o.dispose():r=!0,t.call(i,e)},null,n),r&&o.dispose(),o}}function i(e,t){return l((i,n=null,o)=>e(e=>i.call(n,t(e)),null,o))}function n(e,t){return l((i,n=null,o)=>e(e=>{t(e),i.call(n,e)},null,o))}function o(e,t){return l((i,n=null,o)=>e(e=>t(e)&&i.call(n,e),null,o))}function r(e){return e}function s(...e){return(t,i=null,n)=>Te(...e.map(e=>e(e=>t.call(i,e),null,n)))}function a(e,t,n){let o=n;return i(e,e=>(o=t(o,e),o))}function l(e){let t;const i=new Ve({onFirstListenerAdd(){t=e(i.fire,i)},onLastListenerRemove(){t.dispose()}});return i.event}function c(e,t,i=100,n=!1,o){let r,s=void 0,a=void 0,l=0;const c=new Ve({leakWarningThreshold:o,onFirstListenerAdd(){r=e(e=>{l++,s=t(s,e),n&&!a&&(c.fire(s),s=void 0),clearTimeout(a),a=setTimeout(()=>{const e=s;s=void 0,a=void 0,(!n||l>1)&&c.fire(e),l=0},i)})},onLastListenerRemove(){r.dispose()}});return c.event}function h(e){const n=(new Date).getTime();return i(t(e),e=>(new Date).getTime()-n)}function d(e){let t,i=!0;return o(e,e=>{const n=i||e!==t;return i=!1,t=e,n})}function u(e,t=!1,i=[]){let n=i.slice(),o=e(e=>{n?n.push(e):s.fire(e)});const r=()=>{n&&n.forEach(e=>s.fire(e)),n=null},s=new Ve({onFirstListenerAdd(){o||(o=e(e=>s.fire(e)))},onFirstListenerDidAdd(){n&&(t?setTimeout(r):r())},onLastListenerRemove(){o&&o.dispose(),o=null}});return s.event}e.None=()=>Oe.None,e.once=t,e.map=i,e.forEach=n,e.filter=o,e.signal=r,e.any=s,e.reduce=a,e.snapshot=l,e.debounce=c,e.stopwatch=h,e.latch=d,e.buffer=u;class g{constructor(e){this.event=e}map(e){return new g(i(this.event,e))}forEach(e){return new g(n(this.event,e))}filter(e){return new g(o(this.event,e))}reduce(e,t){return new g(a(this.event,e,t))}latch(){return new g(d(this.event))}debounce(e,t=100,i=!1,n){return new g(c(this.event,e,t,i,n))}on(e,t,i){return this.event(e,t,i)}once(e,i,n){return t(this.event)(e,i,n)}}function f(e){return new g(e)}function m(e,t,i=(e=>e)){const n=(...e)=>s.fire(i(...e)),o=()=>e.on(t,n),r=()=>e.removeListener(t,n),s=new Ve({onFirstListenerAdd:o,onLastListenerRemove:r});return s.event}function p(e,t,i=(e=>e)){const n=(...e)=>s.fire(i(...e)),o=()=>e.addEventListener(t,n),r=()=>e.removeEventListener(t,n),s=new Ve({onFirstListenerAdd:o,onLastListenerRemove:r});return s.event}function _(e){const t=new Ve;let i=!1;return e.then(void 0,()=>null).then(()=>{i?t.fire(void 0):setTimeout(()=>t.fire(void 0),0)}),i=!0,t.event}function b(e){return new Promise(i=>t(e)(i))}e.chain=f,e.fromNodeEventEmitter=m,e.fromDOMEventEmitter=p,e.fromPromise=_,e.toPromise=b})(Fe||(Fe={}));let We=-1;class Be{constructor(e,t=Math.random().toString(18).slice(2,5)){this.customThreshold=e,this.name=t,this._warnCountdown=0}dispose(){this._stacks&&this._stacks.clear()}check(e){let t=We;if("number"===typeof this.customThreshold&&(t=this.customThreshold),t<=0||e<t)return;this._stacks||(this._stacks=new Map);const i=(new Error).stack.split("\n").slice(3).join("\n"),n=this._stacks.get(i)||0;if(this._stacks.set(i,n+1),this._warnCountdown-=1,this._warnCountdown<=0){let i;this._warnCountdown=.5*t;let n=0;for(const[e,t]of this._stacks)(!i||n<t)&&(i=e,n=t);console.warn(`[${this.name}] potential listener LEAK detected, having ${e} listeners already. MOST frequent listener (${n}):`),console.warn(i)}return()=>{const e=this._stacks.get(i)||0;this._stacks.set(i,e-1)}}}class Ve{constructor(e){this._disposed=!1,this._options=e,this._leakageMon=We>0?new Be(this._options&&this._options.leakWarningThreshold):void 0}get event(){return this._event||(this._event=(e,t,i)=>{this._listeners||(this._listeners=new Pe);const n=this._listeners.isEmpty();n&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const o=this._listeners.push(t?[e,t]:e);let r,s;return n&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,e,t),this._leakageMon&&(r=this._leakageMon.check(this._listeners.size)),s={dispose:()=>{if(r&&r(),s.dispose=Ve._noop,!this._disposed&&(o(),this._options&&this._options.onLastListenerRemove)){const e=this._listeners&&!this._listeners.isEmpty();e||this._options.onLastListenerRemove(this)}}},i instanceof Ie?i.add(s):Array.isArray(i)&&i.push(s),s}),this._event}fire(e){if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new Pe);for(let t of this._listeners)this._deliveryQueue.push([t,e]);while(this._deliveryQueue.size>0){const[e,i]=this._deliveryQueue.shift();try{"function"===typeof e?e.call(void 0,i):e[0].call(e[1],i)}catch(t){me(t)}}}}dispose(){this._listeners&&this._listeners.clear(),this._deliveryQueue&&this._deliveryQueue.clear(),this._leakageMon&&this._leakageMon.dispose(),this._disposed=!0}}Ve._noop=function(){};class He extends Ve{constructor(e){super(e),this._isPaused=0,this._eventQueue=new Pe,this._mergeFn=e&&e.merge}pause(){this._isPaused++}resume(){if(0!==this._isPaused&&0===--this._isPaused)if(this._mergeFn){const e=this._eventQueue.toArray();this._eventQueue.clear(),super.fire(this._mergeFn(e))}else while(!this._isPaused&&0!==this._eventQueue.size)super.fire(this._eventQueue.shift())}fire(e){this._listeners&&(0!==this._isPaused?this._eventQueue.push(e):super.fire(e))}}class ze{constructor(){this.buffers=[]}wrapEvent(e){return(t,i,n)=>e(e=>{const n=this.buffers[this.buffers.length-1];n?n.push(()=>t.call(i,e)):t.call(i,e)},void 0,n)}bufferEvents(e){const t=[];this.buffers.push(t);const i=e();return this.buffers.pop(),t.forEach(e=>e()),i}}class Ue{constructor(){this.listening=!1,this.inputEvent=Fe.None,this.inputEventListener=Oe.None,this.emitter=new Ve({onFirstListenerDidAdd:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onLastListenerRemove:()=>{this.listening=!1,this.inputEventListener.dispose()}}),this.event=this.emitter.event}set input(e){this.inputEvent=e,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=e(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}const je=Object.freeze((function(e,t){const i=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(i)}}}));var Ke;(function(e){function t(t){return t===e.None||t===e.Cancelled||(t instanceof qe||!(!t||"object"!==typeof t)&&("boolean"===typeof t.isCancellationRequested&&"function"===typeof t.onCancellationRequested))}e.isCancellationToken=t,e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:Fe.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:je})})(Ke||(Ke={}));class qe{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?je:(this._emitter||(this._emitter=new Ve),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}}class $e{constructor(e){this._token=void 0,this._parentListener=void 0,this._parentListener=e&&e.onCancellationRequested(this.cancel,this)}get token(){return this._token||(this._token=new qe),this._token}cancel(){this._token?this._token instanceof qe&&this._token.cancel():this._token=Ke.Cancelled}dispose(e=!1){e&&this.cancel(),this._parentListener&&this._parentListener.dispose(),this._token?this._token instanceof qe&&this._token.dispose():this._token=Ke.None}}class Ge{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(e,t){this._keyCodeToStr[e]=t,this._strToKeyCode[t.toLowerCase()]=e}keyCodeToStr(e){return this._keyCodeToStr[e]}strToKeyCode(e){return this._strToKeyCode[e.toLowerCase()]||0}}const Ye=new Ge,Xe=new Ge,Ze=new Ge;var Qe;function Je(e,t){const i=(65535&t)<<16>>>0;return(e|i)>>>0}function et(e,t){if(0===e)return null;const i=(65535&e)>>>0,n=(4294901760&e)>>>16;return new nt(0!==n?[tt(i,t),tt(n,t)]:[tt(i,t)])}function tt(e,t){const i=!!(2048&e),n=!!(256&e),o=2===t?n:i,r=!!(1024&e),s=!!(512&e),a=2===t?i:n,l=255&e;return new it(o,r,s,a,l)}(function(){function e(e,t,i=t,n=i){Ye.define(e,t),Xe.define(e,i),Ze.define(e,n)}e(0,"unknown"),e(1,"Backspace"),e(2,"Tab"),e(3,"Enter"),e(4,"Shift"),e(5,"Ctrl"),e(6,"Alt"),e(7,"PauseBreak"),e(8,"CapsLock"),e(9,"Escape"),e(10,"Space"),e(11,"PageUp"),e(12,"PageDown"),e(13,"End"),e(14,"Home"),e(15,"LeftArrow","Left"),e(16,"UpArrow","Up"),e(17,"RightArrow","Right"),e(18,"DownArrow","Down"),e(19,"Insert"),e(20,"Delete"),e(21,"0"),e(22,"1"),e(23,"2"),e(24,"3"),e(25,"4"),e(26,"5"),e(27,"6"),e(28,"7"),e(29,"8"),e(30,"9"),e(31,"A"),e(32,"B"),e(33,"C"),e(34,"D"),e(35,"E"),e(36,"F"),e(37,"G"),e(38,"H"),e(39,"I"),e(40,"J"),e(41,"K"),e(42,"L"),e(43,"M"),e(44,"N"),e(45,"O"),e(46,"P"),e(47,"Q"),e(48,"R"),e(49,"S"),e(50,"T"),e(51,"U"),e(52,"V"),e(53,"W"),e(54,"X"),e(55,"Y"),e(56,"Z"),e(57,"Meta"),e(58,"ContextMenu"),e(59,"F1"),e(60,"F2"),e(61,"F3"),e(62,"F4"),e(63,"F5"),e(64,"F6"),e(65,"F7"),e(66,"F8"),e(67,"F9"),e(68,"F10"),e(69,"F11"),e(70,"F12"),e(71,"F13"),e(72,"F14"),e(73,"F15"),e(74,"F16"),e(75,"F17"),e(76,"F18"),e(77,"F19"),e(78,"NumLock"),e(79,"ScrollLock"),e(80,";",";","OEM_1"),e(81,"=","=","OEM_PLUS"),e(82,",",",","OEM_COMMA"),e(83,"-","-","OEM_MINUS"),e(84,".",".","OEM_PERIOD"),e(85,"/","/","OEM_2"),e(86,"`","`","OEM_3"),e(110,"ABNT_C1"),e(111,"ABNT_C2"),e(87,"[","[","OEM_4"),e(88,"\\","\\","OEM_5"),e(89,"]","]","OEM_6"),e(90,"'","'","OEM_7"),e(91,"OEM_8"),e(92,"OEM_102"),e(93,"NumPad0"),e(94,"NumPad1"),e(95,"NumPad2"),e(96,"NumPad3"),e(97,"NumPad4"),e(98,"NumPad5"),e(99,"NumPad6"),e(100,"NumPad7"),e(101,"NumPad8"),e(102,"NumPad9"),e(103,"NumPad_Multiply"),e(104,"NumPad_Add"),e(105,"NumPad_Separator"),e(106,"NumPad_Subtract"),e(107,"NumPad_Decimal"),e(108,"NumPad_Divide")})(),function(e){function t(e){return Ye.keyCodeToStr(e)}function i(e){return Ye.strToKeyCode(e)}function n(e){return Xe.keyCodeToStr(e)}function o(e){return Ze.keyCodeToStr(e)}function r(e){return Xe.strToKeyCode(e)||Ze.strToKeyCode(e)}e.toString=t,e.fromString=i,e.toUserSettingsUS=n,e.toUserSettingsGeneral=o,e.fromUserSettings=r}(Qe||(Qe={}));class it{constructor(e,t,i,n,o){this.ctrlKey=e,this.shiftKey=t,this.altKey=i,this.metaKey=n,this.keyCode=o}equals(e){return this.ctrlKey===e.ctrlKey&&this.shiftKey===e.shiftKey&&this.altKey===e.altKey&&this.metaKey===e.metaKey&&this.keyCode===e.keyCode}isModifierKey(){return 0===this.keyCode||5===this.keyCode||57===this.keyCode||6===this.keyCode||4===this.keyCode}toChord(){return new nt([this])}isDuplicateModifierCase(){return this.ctrlKey&&5===this.keyCode||this.shiftKey&&4===this.keyCode||this.altKey&&6===this.keyCode||this.metaKey&&57===this.keyCode}}class nt{constructor(e){if(0===e.length)throw we("parts");this.parts=e}}class ot{constructor(e,t,i,n,o,r){this.ctrlKey=e,this.shiftKey=t,this.altKey=i,this.metaKey=n,this.keyLabel=o,this.keyAriaLabel=r}}class rt{}var st=i("f940");const at=65,lt=97,ct=90,ht=122,dt=46,ut=47,gt=92,ft=58,mt=63;class pt extends Error{constructor(e,t,i){let n;"string"===typeof t&&0===t.indexOf("not ")?(n="must not be",t=t.replace(/^not /,"")):n="must be";const o=-1!==e.indexOf(".")?"property":"argument";let r=`The "${e}" ${o} ${n} of type ${t}`;r+=". Received type "+typeof i,super(r),this.code="ERR_INVALID_ARG_TYPE"}}function _t(e,t){if("string"!==typeof e)throw new pt(t,"string",e)}function bt(e){return e===ut||e===gt}function vt(e){return e===ut}function wt(e){return e>=at&&e<=ct||e>=lt&&e<=ht}function Ct(e,t,i,n){let o="",r=0,s=-1,a=0,l=0;for(let c=0;c<=e.length;++c){if(c<e.length)l=e.charCodeAt(c);else{if(n(l))break;l=ut}if(n(l)){if(s===c-1||1===a);else if(2===a){if(o.length<2||2!==r||o.charCodeAt(o.length-1)!==dt||o.charCodeAt(o.length-2)!==dt){if(o.length>2){const e=o.lastIndexOf(i);-1===e?(o="",r=0):(o=o.slice(0,e),r=o.length-1-o.lastIndexOf(i)),s=c,a=0;continue}if(0!==o.length){o="",r=0,s=c,a=0;continue}}t&&(o+=o.length>0?i+"..":"..",r=2)}else o.length>0?o+=`${i}${e.slice(s+1,c)}`:o=e.slice(s+1,c),r=c-s-1;s=c,a=0}else l===dt&&-1!==a?++a:a=-1}return o}function yt(e,t){if(null===t||"object"!==typeof t)throw new pt("pathObject","Object",t);const i=t.dir||t.root,n=t.base||`${t.name||""}${t.ext||""}`;return i?i===t.root?`${i}${n}`:`${i}${e}${n}`:n}const St={resolve(...e){let t="",i="",n=!1;for(let o=e.length-1;o>=-1;o--){let r;if(o>=0){if(r=e[o],_t(r,"path"),0===r.length)continue}else 0===t.length?r=st["a"]():(r=st["b"]["="+t]||st["a"](),(void 0===r||r.slice(0,2).toLowerCase()!==t.toLowerCase()&&r.charCodeAt(2)===gt)&&(r=t+"\\"));const s=r.length;let a=0,l="",c=!1;const h=r.charCodeAt(0);if(1===s)bt(h)&&(a=1,c=!0);else if(bt(h))if(c=!0,bt(r.charCodeAt(1))){let e=2,t=e;while(e<s&&!bt(r.charCodeAt(e)))e++;if(e<s&&e!==t){const i=r.slice(t,e);t=e;while(e<s&&bt(r.charCodeAt(e)))e++;if(e<s&&e!==t){t=e;while(e<s&&!bt(r.charCodeAt(e)))e++;e!==s&&e===t||(l=`\\\\${i}\\${r.slice(t,e)}`,a=e)}}}else a=1;else wt(h)&&r.charCodeAt(1)===ft&&(l=r.slice(0,2),a=2,s>2&&bt(r.charCodeAt(2))&&(c=!0,a=3));if(l.length>0)if(t.length>0){if(l.toLowerCase()!==t.toLowerCase())continue}else t=l;if(n){if(t.length>0)break}else if(i=`${r.slice(a)}\\${i}`,n=c,c&&t.length>0)break}return i=Ct(i,!n,"\\",bt),n?`${t}\\${i}`:`${t}${i}`||"."},normalize(e){_t(e,"path");const t=e.length;if(0===t)return".";let i,n=0,o=!1;const r=e.charCodeAt(0);if(1===t)return vt(r)?"\\":e;if(bt(r))if(o=!0,bt(e.charCodeAt(1))){let o=2,r=o;while(o<t&&!bt(e.charCodeAt(o)))o++;if(o<t&&o!==r){const s=e.slice(r,o);r=o;while(o<t&&bt(e.charCodeAt(o)))o++;if(o<t&&o!==r){r=o;while(o<t&&!bt(e.charCodeAt(o)))o++;if(o===t)return`\\\\${s}\\${e.slice(r)}\\`;o!==r&&(i=`\\\\${s}\\${e.slice(r,o)}`,n=o)}}}else n=1;else wt(r)&&e.charCodeAt(1)===ft&&(i=e.slice(0,2),n=2,t>2&&bt(e.charCodeAt(2))&&(o=!0,n=3));let s=n<t?Ct(e.slice(n),!o,"\\",bt):"";return 0!==s.length||o||(s="."),s.length>0&&bt(e.charCodeAt(t-1))&&(s+="\\"),void 0===i?o?"\\"+s:s:o?`${i}\\${s}`:`${i}${s}`},isAbsolute(e){_t(e,"path");const t=e.length;if(0===t)return!1;const i=e.charCodeAt(0);return bt(i)||t>2&&wt(i)&&e.charCodeAt(1)===ft&&bt(e.charCodeAt(2))},join(...e){if(0===e.length)return".";let t,i;for(let r=0;r<e.length;++r){const n=e[r];_t(n,"path"),n.length>0&&(void 0===t?t=i=n:t+="\\"+n)}if(void 0===t)return".";let n=!0,o=0;if("string"===typeof i&&bt(i.charCodeAt(0))){++o;const e=i.length;e>1&&bt(i.charCodeAt(1))&&(++o,e>2&&(bt(i.charCodeAt(2))?++o:n=!1))}if(n){while(o<t.length&&bt(t.charCodeAt(o)))o++;o>=2&&(t="\\"+t.slice(o))}return St.normalize(t)},relative(e,t){if(_t(e,"from"),_t(t,"to"),e===t)return"";const i=St.resolve(e),n=St.resolve(t);if(i===n)return"";if(e=i.toLowerCase(),t=n.toLowerCase(),e===t)return"";let o=0;while(o<e.length&&e.charCodeAt(o)===gt)o++;let r=e.length;while(r-1>o&&e.charCodeAt(r-1)===gt)r--;const s=r-o;let a=0;while(a<t.length&&t.charCodeAt(a)===gt)a++;let l=t.length;while(l-1>a&&t.charCodeAt(l-1)===gt)l--;const c=l-a,h=s<c?s:c;let d=-1,u=0;for(;u<h;u++){const i=e.charCodeAt(o+u);if(i!==t.charCodeAt(a+u))break;i===gt&&(d=u)}if(u!==h){if(-1===d)return n}else{if(c>h){if(t.charCodeAt(a+u)===gt)return n.slice(a+u+1);if(2===u)return n.slice(a+u)}s>h&&(e.charCodeAt(o+u)===gt?d=u:2===u&&(d=3)),-1===d&&(d=0)}let g="";for(u=o+d+1;u<=r;++u)u!==r&&e.charCodeAt(u)!==gt||(g+=0===g.length?"..":"\\..");return a+=d,g.length>0?`${g}${n.slice(a,l)}`:(n.charCodeAt(a)===gt&&++a,n.slice(a,l))},toNamespacedPath(e){if("string"!==typeof e)return e;if(0===e.length)return"";const t=St.resolve(e);if(t.length<=2)return e;if(t.charCodeAt(0)===gt){if(t.charCodeAt(1)===gt){const e=t.charCodeAt(2);if(e!==mt&&e!==dt)return"\\\\?\\UNC\\"+t.slice(2)}}else if(wt(t.charCodeAt(0))&&t.charCodeAt(1)===ft&&t.charCodeAt(2)===gt)return"\\\\?\\"+t;return e},dirname(e){_t(e,"path");const t=e.length;if(0===t)return".";let i=-1,n=0;const o=e.charCodeAt(0);if(1===t)return bt(o)?e:".";if(bt(o)){if(i=n=1,bt(e.charCodeAt(1))){let o=2,r=o;while(o<t&&!bt(e.charCodeAt(o)))o++;if(o<t&&o!==r){r=o;while(o<t&&bt(e.charCodeAt(o)))o++;if(o<t&&o!==r){r=o;while(o<t&&!bt(e.charCodeAt(o)))o++;if(o===t)return e;o!==r&&(i=n=o+1)}}}}else wt(o)&&e.charCodeAt(1)===ft&&(i=t>2&&bt(e.charCodeAt(2))?3:2,n=i);let r=-1,s=!0;for(let a=t-1;a>=n;--a)if(bt(e.charCodeAt(a))){if(!s){r=a;break}}else s=!1;if(-1===r){if(-1===i)return".";r=i}return e.slice(0,r)},basename(e,t){void 0!==t&&_t(t,"ext"),_t(e,"path");let i,n=0,o=-1,r=!0;if(e.length>=2&&wt(e.charCodeAt(0))&&e.charCodeAt(1)===ft&&(n=2),void 0!==t&&t.length>0&&t.length<=e.length){if(t===e)return"";let s=t.length-1,a=-1;for(i=e.length-1;i>=n;--i){const l=e.charCodeAt(i);if(bt(l)){if(!r){n=i+1;break}}else-1===a&&(r=!1,a=i+1),s>=0&&(l===t.charCodeAt(s)?-1===--s&&(o=i):(s=-1,o=a))}return n===o?o=a:-1===o&&(o=e.length),e.slice(n,o)}for(i=e.length-1;i>=n;--i)if(bt(e.charCodeAt(i))){if(!r){n=i+1;break}}else-1===o&&(r=!1,o=i+1);return-1===o?"":e.slice(n,o)},extname(e){_t(e,"path");let t=0,i=-1,n=0,o=-1,r=!0,s=0;e.length>=2&&e.charCodeAt(1)===ft&&wt(e.charCodeAt(0))&&(t=n=2);for(let a=e.length-1;a>=t;--a){const t=e.charCodeAt(a);if(bt(t)){if(!r){n=a+1;break}}else-1===o&&(r=!1,o=a+1),t===dt?-1===i?i=a:1!==s&&(s=1):-1!==i&&(s=-1)}return-1===i||-1===o||0===s||1===s&&i===o-1&&i===n+1?"":e.slice(i,o)},format:yt.bind(null,"\\"),parse(e){_t(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;const i=e.length;let n=0,o=e.charCodeAt(0);if(1===i)return bt(o)?(t.root=t.dir=e,t):(t.base=t.name=e,t);if(bt(o)){if(n=1,bt(e.charCodeAt(1))){let t=2,o=t;while(t<i&&!bt(e.charCodeAt(t)))t++;if(t<i&&t!==o){o=t;while(t<i&&bt(e.charCodeAt(t)))t++;if(t<i&&t!==o){o=t;while(t<i&&!bt(e.charCodeAt(t)))t++;t===i?n=t:t!==o&&(n=t+1)}}}}else if(wt(o)&&e.charCodeAt(1)===ft){if(i<=2)return t.root=t.dir=e,t;if(n=2,bt(e.charCodeAt(2))){if(3===i)return t.root=t.dir=e,t;n=3}}n>0&&(t.root=e.slice(0,n));let r=-1,s=n,a=-1,l=!0,c=e.length-1,h=0;for(;c>=n;--c)if(o=e.charCodeAt(c),bt(o)){if(!l){s=c+1;break}}else-1===a&&(l=!1,a=c+1),o===dt?-1===r?r=c:1!==h&&(h=1):-1!==r&&(h=-1);return-1!==a&&(-1===r||0===h||1===h&&r===a-1&&r===s+1?t.base=t.name=e.slice(s,a):(t.name=e.slice(s,r),t.base=e.slice(s,a),t.ext=e.slice(r,a))),t.dir=s>0&&s!==n?e.slice(0,s-1):t.root,t},sep:"\\",delimiter:";",win32:null,posix:null},xt={resolve(...e){let t="",i=!1;for(let n=e.length-1;n>=-1&&!i;n--){const o=n>=0?e[n]:st["a"]();_t(o,"path"),0!==o.length&&(t=`${o}/${t}`,i=o.charCodeAt(0)===ut)}return t=Ct(t,!i,"/",vt),i?"/"+t:t.length>0?t:"."},normalize(e){if(_t(e,"path"),0===e.length)return".";const t=e.charCodeAt(0)===ut,i=e.charCodeAt(e.length-1)===ut;return e=Ct(e,!t,"/",vt),0===e.length?t?"/":i?"./":".":(i&&(e+="/"),t?"/"+e:e)},isAbsolute(e){return _t(e,"path"),e.length>0&&e.charCodeAt(0)===ut},join(...e){if(0===e.length)return".";let t;for(let i=0;i<e.length;++i){const n=e[i];_t(n,"path"),n.length>0&&(void 0===t?t=n:t+="/"+n)}return void 0===t?".":xt.normalize(t)},relative(e,t){if(_t(e,"from"),_t(t,"to"),e===t)return"";if(e=xt.resolve(e),t=xt.resolve(t),e===t)return"";const i=1,n=e.length,o=n-i,r=1,s=t.length-r,a=o<s?o:s;let l=-1,c=0;for(;c<a;c++){const n=e.charCodeAt(i+c);if(n!==t.charCodeAt(r+c))break;n===ut&&(l=c)}if(c===a)if(s>a){if(t.charCodeAt(r+c)===ut)return t.slice(r+c+1);if(0===c)return t.slice(r+c)}else o>a&&(e.charCodeAt(i+c)===ut?l=c:0===c&&(l=0));let h="";for(c=i+l+1;c<=n;++c)c!==n&&e.charCodeAt(c)!==ut||(h+=0===h.length?"..":"/..");return`${h}${t.slice(r+l)}`},toNamespacedPath(e){return e},dirname(e){if(_t(e,"path"),0===e.length)return".";const t=e.charCodeAt(0)===ut;let i=-1,n=!0;for(let o=e.length-1;o>=1;--o)if(e.charCodeAt(o)===ut){if(!n){i=o;break}}else n=!1;return-1===i?t?"/":".":t&&1===i?"//":e.slice(0,i)},basename(e,t){void 0!==t&&_t(t,"ext"),_t(e,"path");let i,n=0,o=-1,r=!0;if(void 0!==t&&t.length>0&&t.length<=e.length){if(t===e)return"";let s=t.length-1,a=-1;for(i=e.length-1;i>=0;--i){const l=e.charCodeAt(i);if(l===ut){if(!r){n=i+1;break}}else-1===a&&(r=!1,a=i+1),s>=0&&(l===t.charCodeAt(s)?-1===--s&&(o=i):(s=-1,o=a))}return n===o?o=a:-1===o&&(o=e.length),e.slice(n,o)}for(i=e.length-1;i>=0;--i)if(e.charCodeAt(i)===ut){if(!r){n=i+1;break}}else-1===o&&(r=!1,o=i+1);return-1===o?"":e.slice(n,o)},extname(e){_t(e,"path");let t=-1,i=0,n=-1,o=!0,r=0;for(let s=e.length-1;s>=0;--s){const a=e.charCodeAt(s);if(a!==ut)-1===n&&(o=!1,n=s+1),a===dt?-1===t?t=s:1!==r&&(r=1):-1!==t&&(r=-1);else if(!o){i=s+1;break}}return-1===t||-1===n||0===r||1===r&&t===n-1&&t===i+1?"":e.slice(t,n)},format:yt.bind(null,"/"),parse(e){_t(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;const i=e.charCodeAt(0)===ut;let n;i?(t.root="/",n=1):n=0;let o=-1,r=0,s=-1,a=!0,l=e.length-1,c=0;for(;l>=n;--l){const t=e.charCodeAt(l);if(t!==ut)-1===s&&(a=!1,s=l+1),t===dt?-1===o?o=l:1!==c&&(c=1):-1!==o&&(c=-1);else if(!a){r=l+1;break}}if(-1!==s){const n=0===r&&i?1:r;-1===o||0===c||1===c&&o===s-1&&o===r+1?t.base=t.name=e.slice(n,s):(t.name=e.slice(n,o),t.base=e.slice(n,s),t.ext=e.slice(o,s))}return r>0?t.dir=e.slice(0,r-1):i&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};xt.win32=St.win32=St,xt.posix=St.posix=xt;const Lt="win32"===st["c"]?St.normalize:xt.normalize,kt="win32"===st["c"]?St.resolve:xt.resolve,Et="win32"===st["c"]?St.relative:xt.relative,Dt="win32"===st["c"]?St.dirname:xt.dirname,Nt="win32"===st["c"]?St.basename:xt.basename,Tt="win32"===st["c"]?St.extname:xt.extname,Mt="win32"===st["c"]?St.sep:xt.sep,It=/^\w[\w\d+.-]*$/,Ot=/^\//,At=/^\/\//;function Rt(e,t){if(!e.scheme&&t)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!It.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!Ot.test(e.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(At.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}function Pt(e,t){return e||t?e:"file"}function Ft(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==Bt&&(t=Bt+t):t=Bt;break}return t}const Wt="",Bt="/",Vt=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class Ht{constructor(e,t,i,n,o,r=!1){"object"===typeof e?(this.scheme=e.scheme||Wt,this.authority=e.authority||Wt,this.path=e.path||Wt,this.query=e.query||Wt,this.fragment=e.fragment||Wt):(this.scheme=Pt(e,r),this.authority=t||Wt,this.path=Ft(this.scheme,i||Wt),this.query=n||Wt,this.fragment=o||Wt,Rt(this,r))}static isUri(e){return e instanceof Ht||!!e&&("string"===typeof e.authority&&"string"===typeof e.fragment&&"string"===typeof e.path&&"string"===typeof e.query&&"string"===typeof e.scheme&&"function"===typeof e.fsPath&&"function"===typeof e.with&&"function"===typeof e.toString)}get fsPath(){return $t(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:i,path:n,query:o,fragment:r}=e;return void 0===t?t=this.scheme:null===t&&(t=Wt),void 0===i?i=this.authority:null===i&&(i=Wt),void 0===n?n=this.path:null===n&&(n=Wt),void 0===o?o=this.query:null===o&&(o=Wt),void 0===r?r=this.fragment:null===r&&(r=Wt),t===this.scheme&&i===this.authority&&n===this.path&&o===this.query&&r===this.fragment?this:new Ut(t,i,n,o,r)}static parse(e,t=!1){const i=Vt.exec(e);return i?new Ut(i[2]||Wt,Zt(i[4]||Wt),Zt(i[5]||Wt),Zt(i[7]||Wt),Zt(i[9]||Wt),t):new Ut(Wt,Wt,Wt,Wt,Wt)}static file(e){let t=Wt;if(r["i"]&&(e=e.replace(/\\/g,Bt)),e[0]===Bt&&e[1]===Bt){const i=e.indexOf(Bt,2);-1===i?(t=e.substring(2),e=Bt):(t=e.substring(2,i),e=e.substring(i)||Bt)}return new Ut("file",t,e,Wt,Wt)}static from(e){return new Ut(e.scheme,e.authority,e.path,e.query,e.fragment)}static joinPath(e,...t){if(!e.path)throw new Error("[UriError]: cannot call joinPaths on URI without path");let i;return i=r["i"]&&"file"===e.scheme?Ht.file(St.join($t(e,!0),...t)).path:xt.join(e.path,...t),e.with({path:i})}toString(e=!1){return Gt(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof Ht)return e;{const t=new Ut(e);return t._formatted=e.external,t._fsPath=e._sep===zt?e.fsPath:null,t}}return e}}const zt=r["i"]?1:void 0;class Ut extends Ht{constructor(){super(...arguments),this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=$t(this,!1)),this._fsPath}toString(e=!1){return e?Gt(this,!0):(this._formatted||(this._formatted=Gt(this,!1)),this._formatted)}toJSON(){const e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=zt),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}}const jt={[58]:"%3A",[47]:"%2F",[63]:"%3F",[35]:"%23",[91]:"%5B",[93]:"%5D",[64]:"%40",[33]:"%21",[36]:"%24",[38]:"%26",[39]:"%27",[40]:"%28",[41]:"%29",[42]:"%2A",[43]:"%2B",[44]:"%2C",[59]:"%3B",[61]:"%3D",[32]:"%20"};function Kt(e,t){let i=void 0,n=-1;for(let o=0;o<e.length;o++){const r=e.charCodeAt(o);if(r>=97&&r<=122||r>=65&&r<=90||r>=48&&r<=57||45===r||46===r||95===r||126===r||t&&47===r)-1!==n&&(i+=encodeURIComponent(e.substring(n,o)),n=-1),void 0!==i&&(i+=e.charAt(o));else{void 0===i&&(i=e.substr(0,o));const t=jt[r];void 0!==t?(-1!==n&&(i+=encodeURIComponent(e.substring(n,o)),n=-1),i+=t):-1===n&&(n=o)}}return-1!==n&&(i+=encodeURIComponent(e.substring(n))),void 0!==i?i:e}function qt(e){let t=void 0;for(let i=0;i<e.length;i++){const n=e.charCodeAt(i);35===n||63===n?(void 0===t&&(t=e.substr(0,i)),t+=jt[n]):void 0!==t&&(t+=e[i])}return void 0!==t?t:e}function $t(e,t){let i;return i=e.authority&&e.path.length>1&&"file"===e.scheme?`//${e.authority}${e.path}`:47===e.path.charCodeAt(0)&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&58===e.path.charCodeAt(2)?t?e.path.substr(1):e.path[1].toLowerCase()+e.path.substr(2):e.path,r["i"]&&(i=i.replace(/\//g,"\\")),i}function Gt(e,t){const i=t?qt:Kt;let n="",{scheme:o,authority:r,path:s,query:a,fragment:l}=e;if(o&&(n+=o,n+=":"),(r||"file"===o)&&(n+=Bt,n+=Bt),r){let e=r.indexOf("@");if(-1!==e){const t=r.substr(0,e);r=r.substr(e+1),e=t.indexOf(":"),-1===e?n+=i(t,!1):(n+=i(t.substr(0,e),!1),n+=":",n+=i(t.substr(e+1),!1)),n+="@"}r=r.toLowerCase(),e=r.indexOf(":"),-1===e?n+=i(r,!1):(n+=i(r.substr(0,e),!1),n+=r.substr(e))}if(s){if(s.length>=3&&47===s.charCodeAt(0)&&58===s.charCodeAt(2)){const e=s.charCodeAt(1);e>=65&&e<=90&&(s=`/${String.fromCharCode(e+32)}:${s.substr(3)}`)}else if(s.length>=2&&58===s.charCodeAt(1)){const e=s.charCodeAt(0);e>=65&&e<=90&&(s=`${String.fromCharCode(e+32)}:${s.substr(2)}`)}n+=i(s,!0)}return a&&(n+="?",n+=i(a,!1)),l&&(n+="#",n+=t?l:Kt(l,!1)),n}function Yt(e){try{return decodeURIComponent(e)}catch(t){return e.length>3?e.substr(0,3)+Yt(e.substr(3)):e}}const Xt=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function Zt(e){return e.match(Xt)?e.replace(Xt,e=>Yt(e)):e}class Qt{constructor(e,t){this.lineNumber=e,this.column=t}with(e=this.lineNumber,t=this.column){return e===this.lineNumber&&t===this.column?this:new Qt(e,t)}delta(e=0,t=0){return this.with(this.lineNumber+e,this.column+t)}equals(e){return Qt.equals(this,e)}static equals(e,t){return!e&&!t||!!e&&!!t&&e.lineNumber===t.lineNumber&&e.column===t.column}isBefore(e){return Qt.isBefore(this,e)}static isBefore(e,t){return e.lineNumber<t.lineNumber||!(t.lineNumber<e.lineNumber)&&e.column<t.column}isBeforeOrEqual(e){return Qt.isBeforeOrEqual(this,e)}static isBeforeOrEqual(e,t){return e.lineNumber<t.lineNumber||!(t.lineNumber<e.lineNumber)&&e.column<=t.column}static compare(e,t){let i=0|e.lineNumber,n=0|t.lineNumber;if(i===n){let i=0|e.column,n=0|t.column;return i-n}return i-n}clone(){return new Qt(this.lineNumber,this.column)}toString(){return"("+this.lineNumber+","+this.column+")"}static lift(e){return new Qt(e.lineNumber,e.column)}static isIPosition(e){return e&&"number"===typeof e.lineNumber&&"number"===typeof e.column}}class Jt{constructor(e,t,i,n){e>i||e===i&&t>n?(this.startLineNumber=i,this.startColumn=n,this.endLineNumber=e,this.endColumn=t):(this.startLineNumber=e,this.startColumn=t,this.endLineNumber=i,this.endColumn=n)}isEmpty(){return Jt.isEmpty(this)}static isEmpty(e){return e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn}containsPosition(e){return Jt.containsPosition(this,e)}static containsPosition(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))}containsRange(e){return Jt.containsRange(this,e)}static containsRange(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)))}strictContainsRange(e){return Jt.strictContainsRange(this,e)}static strictContainsRange(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)))}plusRange(e){return Jt.plusRange(this,e)}static plusRange(e,t){let i,n,o,r;return t.startLineNumber<e.startLineNumber?(i=t.startLineNumber,n=t.startColumn):t.startLineNumber===e.startLineNumber?(i=t.startLineNumber,n=Math.min(t.startColumn,e.startColumn)):(i=e.startLineNumber,n=e.startColumn),t.endLineNumber>e.endLineNumber?(o=t.endLineNumber,r=t.endColumn):t.endLineNumber===e.endLineNumber?(o=t.endLineNumber,r=Math.max(t.endColumn,e.endColumn)):(o=e.endLineNumber,r=e.endColumn),new Jt(i,n,o,r)}intersectRanges(e){return Jt.intersectRanges(this,e)}static intersectRanges(e,t){let i=e.startLineNumber,n=e.startColumn,o=e.endLineNumber,r=e.endColumn,s=t.startLineNumber,a=t.startColumn,l=t.endLineNumber,c=t.endColumn;return i<s?(i=s,n=a):i===s&&(n=Math.max(n,a)),o>l?(o=l,r=c):o===l&&(r=Math.min(r,c)),i>o||i===o&&n>r?null:new Jt(i,n,o,r)}equalsRange(e){return Jt.equalsRange(this,e)}static equalsRange(e,t){return!!e&&!!t&&e.startLineNumber===t.startLineNumber&&e.startColumn===t.startColumn&&e.endLineNumber===t.endLineNumber&&e.endColumn===t.endColumn}getEndPosition(){return Jt.getEndPosition(this)}static getEndPosition(e){return new Qt(e.endLineNumber,e.endColumn)}getStartPosition(){return Jt.getStartPosition(this)}static getStartPosition(e){return new Qt(e.startLineNumber,e.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(e,t){return new Jt(this.startLineNumber,this.startColumn,e,t)}setStartPosition(e,t){return new Jt(e,t,this.endLineNumber,this.endColumn)}collapseToStart(){return Jt.collapseToStart(this)}static collapseToStart(e){return new Jt(e.startLineNumber,e.startColumn,e.startLineNumber,e.startColumn)}static fromPositions(e,t=e){return new Jt(e.lineNumber,e.column,t.lineNumber,t.column)}static lift(e){return e?new Jt(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):null}static isIRange(e){return e&&"number"===typeof e.startLineNumber&&"number"===typeof e.startColumn&&"number"===typeof e.endLineNumber&&"number"===typeof e.endColumn}static areIntersectingOrTouching(e,t){return!(e.endLineNumber<t.startLineNumber||e.endLineNumber===t.startLineNumber&&e.endColumn<t.startColumn)&&!(t.endLineNumber<e.startLineNumber||t.endLineNumber===e.startLineNumber&&t.endColumn<e.startColumn)}static areIntersecting(e,t){return!(e.endLineNumber<t.startLineNumber||e.endLineNumber===t.startLineNumber&&e.endColumn<=t.startColumn)&&!(t.endLineNumber<e.startLineNumber||t.endLineNumber===e.startLineNumber&&t.endColumn<=e.startColumn)}static compareRangesUsingStarts(e,t){if(e&&t){const i=0|e.startLineNumber,n=0|t.startLineNumber;if(i===n){const i=0|e.startColumn,n=0|t.startColumn;if(i===n){const i=0|e.endLineNumber,n=0|t.endLineNumber;if(i===n){const i=0|e.endColumn,n=0|t.endColumn;return i-n}return i-n}return i-n}return i-n}const i=e?1:0,n=t?1:0;return i-n}static compareRangesUsingEnds(e,t){return e.endLineNumber===t.endLineNumber?e.endColumn===t.endColumn?e.startLineNumber===t.startLineNumber?e.startColumn-t.startColumn:e.startLineNumber-t.startLineNumber:e.endColumn-t.endColumn:e.endLineNumber-t.endLineNumber}static spansMultipleLines(e){return e.endLineNumber>e.startLineNumber}}class ei extends Jt{constructor(e,t,i,n){super(e,t,i,n),this.selectionStartLineNumber=e,this.selectionStartColumn=t,this.positionLineNumber=i,this.positionColumn=n}toString(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}equalsSelection(e){return ei.selectionsEqual(this,e)}static selectionsEqual(e,t){return e.selectionStartLineNumber===t.selectionStartLineNumber&&e.selectionStartColumn===t.selectionStartColumn&&e.positionLineNumber===t.positionLineNumber&&e.positionColumn===t.positionColumn}getDirection(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1}setEndPosition(e,t){return 0===this.getDirection()?new ei(this.startLineNumber,this.startColumn,e,t):new ei(e,t,this.startLineNumber,this.startColumn)}getPosition(){return new Qt(this.positionLineNumber,this.positionColumn)}setStartPosition(e,t){return 0===this.getDirection()?new ei(e,t,this.endLineNumber,this.endColumn):new ei(this.endLineNumber,this.endColumn,e,t)}static fromPositions(e,t=e){return new ei(e.lineNumber,e.column,t.lineNumber,t.column)}static liftSelection(e){return new ei(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn)}static selectionsArrEqual(e,t){if(e&&!t||!e&&t)return!1;if(!e&&!t)return!0;if(e.length!==t.length)return!1;for(let i=0,n=e.length;i<n;i++)if(!this.selectionsEqual(e[i],t[i]))return!1;return!0}static isISelection(e){return e&&"number"===typeof e.selectionStartLineNumber&&"number"===typeof e.selectionStartColumn&&"number"===typeof e.positionLineNumber&&"number"===typeof e.positionColumn}static createWithDirection(e,t,i,n,o){return 0===o?new ei(e,t,i,n):new ei(i,n,e,t)}}class ti{constructor(e,t,i){this.offset=0|e,this.type=t,this.language=i}toString(){return"("+this.offset+", "+this.type+")"}}class ii{constructor(e,t){this.tokens=e,this.endState=t}}class ni{constructor(e,t){this.tokens=e,this.endState=t}}var oi,ri,si,ai,li,ci,hi,di,ui,gi,fi,mi,pi,_i,bi,vi,wi,Ci,yi,Si,xi,Li,ki,Ei,Di,Ni,Ti,Mi,Ii,Oi,Ai,Ri,Pi;(function(e){e[e["Unknown"]=0]="Unknown",e[e["Disabled"]=1]="Disabled",e[e["Enabled"]=2]="Enabled"})(oi||(oi={})),function(e){e[e["KeepWhitespace"]=1]="KeepWhitespace",e[e["InsertAsSnippet"]=4]="InsertAsSnippet"}(ri||(ri={})),function(e){e[e["Method"]=0]="Method",e[e["Function"]=1]="Function",e[e["Constructor"]=2]="Constructor",e[e["Field"]=3]="Field",e[e["Variable"]=4]="Variable",e[e["Class"]=5]="Class",e[e["Struct"]=6]="Struct",e[e["Interface"]=7]="Interface",e[e["Module"]=8]="Module",e[e["Property"]=9]="Property",e[e["Event"]=10]="Event",e[e["Operator"]=11]="Operator",e[e["Unit"]=12]="Unit",e[e["Value"]=13]="Value",e[e["Constant"]=14]="Constant",e[e["Enum"]=15]="Enum",e[e["EnumMember"]=16]="EnumMember",e[e["Keyword"]=17]="Keyword",e[e["Text"]=18]="Text",e[e["Color"]=19]="Color",e[e["File"]=20]="File",e[e["Reference"]=21]="Reference",e[e["Customcolor"]=22]="Customcolor",e[e["Folder"]=23]="Folder",e[e["TypeParameter"]=24]="TypeParameter",e[e["User"]=25]="User",e[e["Issue"]=26]="Issue",e[e["Snippet"]=27]="Snippet"}(si||(si={})),function(e){e[e["Deprecated"]=1]="Deprecated"}(ai||(ai={})),function(e){e[e["Invoke"]=0]="Invoke",e[e["TriggerCharacter"]=1]="TriggerCharacter",e[e["TriggerForIncompleteCompletions"]=2]="TriggerForIncompleteCompletions"}(li||(li={})),function(e){e[e["EXACT"]=0]="EXACT",e[e["ABOVE"]=1]="ABOVE",e[e["BELOW"]=2]="BELOW"}(ci||(ci={})),function(e){e[e["NotSet"]=0]="NotSet",e[e["ContentFlush"]=1]="ContentFlush",e[e["RecoverFromMarkers"]=2]="RecoverFromMarkers",e[e["Explicit"]=3]="Explicit",e[e["Paste"]=4]="Paste",e[e["Undo"]=5]="Undo",e[e["Redo"]=6]="Redo"}(hi||(hi={})),function(e){e[e["LF"]=1]="LF",e[e["CRLF"]=2]="CRLF"}(di||(di={})),function(e){e[e["Text"]=0]="Text",e[e["Read"]=1]="Read",e[e["Write"]=2]="Write"}(ui||(ui={})),function(e){e[e["None"]=0]="None",e[e["Keep"]=1]="Keep",e[e["Brackets"]=2]="Brackets",e[e["Advanced"]=3]="Advanced",e[e["Full"]=4]="Full"}(gi||(gi={})),function(e){e[e["acceptSuggestionOnCommitCharacter"]=0]="acceptSuggestionOnCommitCharacter",e[e["acceptSuggestionOnEnter"]=1]="acceptSuggestionOnEnter",e[e["accessibilitySupport"]=2]="accessibilitySupport",e[e["accessibilityPageSize"]=3]="accessibilityPageSize",e[e["ariaLabel"]=4]="ariaLabel",e[e["autoClosingBrackets"]=5]="autoClosingBrackets",e[e["autoClosingOvertype"]=6]="autoClosingOvertype",e[e["autoClosingQuotes"]=7]="autoClosingQuotes",e[e["autoIndent"]=8]="autoIndent",e[e["automaticLayout"]=9]="automaticLayout",e[e["autoSurround"]=10]="autoSurround",e[e["codeLens"]=11]="codeLens",e[e["colorDecorators"]=12]="colorDecorators",e[e["columnSelection"]=13]="columnSelection",e[e["comments"]=14]="comments",e[e["contextmenu"]=15]="contextmenu",e[e["copyWithSyntaxHighlighting"]=16]="copyWithSyntaxHighlighting",e[e["cursorBlinking"]=17]="cursorBlinking",e[e["cursorSmoothCaretAnimation"]=18]="cursorSmoothCaretAnimation",e[e["cursorStyle"]=19]="cursorStyle",e[e["cursorSurroundingLines"]=20]="cursorSurroundingLines",e[e["cursorSurroundingLinesStyle"]=21]="cursorSurroundingLinesStyle",e[e["cursorWidth"]=22]="cursorWidth",e[e["disableLayerHinting"]=23]="disableLayerHinting",e[e["disableMonospaceOptimizations"]=24]="disableMonospaceOptimizations",e[e["dragAndDrop"]=25]="dragAndDrop",e[e["emptySelectionClipboard"]=26]="emptySelectionClipboard",e[e["extraEditorClassName"]=27]="extraEditorClassName",e[e["fastScrollSensitivity"]=28]="fastScrollSensitivity",e[e["find"]=29]="find",e[e["fixedOverflowWidgets"]=30]="fixedOverflowWidgets",e[e["folding"]=31]="folding",e[e["foldingStrategy"]=32]="foldingStrategy",e[e["foldingHighlight"]=33]="foldingHighlight",e[e["unfoldOnClickAfterEndOfLine"]=34]="unfoldOnClickAfterEndOfLine",e[e["fontFamily"]=35]="fontFamily",e[e["fontInfo"]=36]="fontInfo",e[e["fontLigatures"]=37]="fontLigatures",e[e["fontSize"]=38]="fontSize",e[e["fontWeight"]=39]="fontWeight",e[e["formatOnPaste"]=40]="formatOnPaste",e[e["formatOnType"]=41]="formatOnType",e[e["glyphMargin"]=42]="glyphMargin",e[e["gotoLocation"]=43]="gotoLocation",e[e["hideCursorInOverviewRuler"]=44]="hideCursorInOverviewRuler",e[e["highlightActiveIndentGuide"]=45]="highlightActiveIndentGuide",e[e["hover"]=46]="hover",e[e["inDiffEditor"]=47]="inDiffEditor",e[e["letterSpacing"]=48]="letterSpacing",e[e["lightbulb"]=49]="lightbulb",e[e["lineDecorationsWidth"]=50]="lineDecorationsWidth",e[e["lineHeight"]=51]="lineHeight",e[e["lineNumbers"]=52]="lineNumbers",e[e["lineNumbersMinChars"]=53]="lineNumbersMinChars",e[e["links"]=54]="links",e[e["matchBrackets"]=55]="matchBrackets",e[e["minimap"]=56]="minimap",e[e["mouseStyle"]=57]="mouseStyle",e[e["mouseWheelScrollSensitivity"]=58]="mouseWheelScrollSensitivity",e[e["mouseWheelZoom"]=59]="mouseWheelZoom",e[e["multiCursorMergeOverlapping"]=60]="multiCursorMergeOverlapping",e[e["multiCursorModifier"]=61]="multiCursorModifier",e[e["multiCursorPaste"]=62]="multiCursorPaste",e[e["occurrencesHighlight"]=63]="occurrencesHighlight",e[e["overviewRulerBorder"]=64]="overviewRulerBorder",e[e["overviewRulerLanes"]=65]="overviewRulerLanes",e[e["padding"]=66]="padding",e[e["parameterHints"]=67]="parameterHints",e[e["peekWidgetDefaultFocus"]=68]="peekWidgetDefaultFocus",e[e["definitionLinkOpensInPeek"]=69]="definitionLinkOpensInPeek",e[e["quickSuggestions"]=70]="quickSuggestions",e[e["quickSuggestionsDelay"]=71]="quickSuggestionsDelay",e[e["readOnly"]=72]="readOnly",e[e["renameOnType"]=73]="renameOnType",e[e["renderControlCharacters"]=74]="renderControlCharacters",e[e["renderIndentGuides"]=75]="renderIndentGuides",e[e["renderFinalNewline"]=76]="renderFinalNewline",e[e["renderLineHighlight"]=77]="renderLineHighlight",e[e["renderLineHighlightOnlyWhenFocus"]=78]="renderLineHighlightOnlyWhenFocus",e[e["renderValidationDecorations"]=79]="renderValidationDecorations",e[e["renderWhitespace"]=80]="renderWhitespace",e[e["revealHorizontalRightPadding"]=81]="revealHorizontalRightPadding",e[e["roundedSelection"]=82]="roundedSelection",e[e["rulers"]=83]="rulers",e[e["scrollbar"]=84]="scrollbar",e[e["scrollBeyondLastColumn"]=85]="scrollBeyondLastColumn",e[e["scrollBeyondLastLine"]=86]="scrollBeyondLastLine",e[e["scrollPredominantAxis"]=87]="scrollPredominantAxis",e[e["selectionClipboard"]=88]="selectionClipboard",e[e["selectionHighlight"]=89]="selectionHighlight",e[e["selectOnLineNumbers"]=90]="selectOnLineNumbers",e[e["showFoldingControls"]=91]="showFoldingControls",e[e["showUnused"]=92]="showUnused",e[e["snippetSuggestions"]=93]="snippetSuggestions",e[e["smoothScrolling"]=94]="smoothScrolling",e[e["stopRenderingLineAfter"]=95]="stopRenderingLineAfter",e[e["suggest"]=96]="suggest",e[e["suggestFontSize"]=97]="suggestFontSize",e[e["suggestLineHeight"]=98]="suggestLineHeight",e[e["suggestOnTriggerCharacters"]=99]="suggestOnTriggerCharacters",e[e["suggestSelection"]=100]="suggestSelection",e[e["tabCompletion"]=101]="tabCompletion",e[e["tabIndex"]=102]="tabIndex",e[e["unusualLineTerminators"]=103]="unusualLineTerminators",e[e["useTabStops"]=104]="useTabStops",e[e["wordSeparators"]=105]="wordSeparators",e[e["wordWrap"]=106]="wordWrap",e[e["wordWrapBreakAfterCharacters"]=107]="wordWrapBreakAfterCharacters",e[e["wordWrapBreakBeforeCharacters"]=108]="wordWrapBreakBeforeCharacters",e[e["wordWrapColumn"]=109]="wordWrapColumn",e[e["wordWrapMinified"]=110]="wordWrapMinified",e[e["wrappingIndent"]=111]="wrappingIndent",e[e["wrappingStrategy"]=112]="wrappingStrategy",e[e["showDeprecated"]=113]="showDeprecated",e[e["editorClassName"]=114]="editorClassName",e[e["pixelRatio"]=115]="pixelRatio",e[e["tabFocusMode"]=116]="tabFocusMode",e[e["layoutInfo"]=117]="layoutInfo",e[e["wrappingInfo"]=118]="wrappingInfo"}(fi||(fi={})),function(e){e[e["TextDefined"]=0]="TextDefined",e[e["LF"]=1]="LF",e[e["CRLF"]=2]="CRLF"}(mi||(mi={})),function(e){e[e["LF"]=0]="LF",e[e["CRLF"]=1]="CRLF"}(pi||(pi={})),function(e){e[e["None"]=0]="None",e[e["Indent"]=1]="Indent",e[e["IndentOutdent"]=2]="IndentOutdent",e[e["Outdent"]=3]="Outdent"}(_i||(_i={})),function(e){e[e["Unknown"]=0]="Unknown",e[e["Backspace"]=1]="Backspace",e[e["Tab"]=2]="Tab",e[e["Enter"]=3]="Enter",e[e["Shift"]=4]="Shift",e[e["Ctrl"]=5]="Ctrl",e[e["Alt"]=6]="Alt",e[e["PauseBreak"]=7]="PauseBreak",e[e["CapsLock"]=8]="CapsLock",e[e["Escape"]=9]="Escape",e[e["Space"]=10]="Space",e[e["PageUp"]=11]="PageUp",e[e["PageDown"]=12]="PageDown",e[e["End"]=13]="End",e[e["Home"]=14]="Home",e[e["LeftArrow"]=15]="LeftArrow",e[e["UpArrow"]=16]="UpArrow",e[e["RightArrow"]=17]="RightArrow",e[e["DownArrow"]=18]="DownArrow",e[e["Insert"]=19]="Insert",e[e["Delete"]=20]="Delete",e[e["KEY_0"]=21]="KEY_0",e[e["KEY_1"]=22]="KEY_1",e[e["KEY_2"]=23]="KEY_2",e[e["KEY_3"]=24]="KEY_3",e[e["KEY_4"]=25]="KEY_4",e[e["KEY_5"]=26]="KEY_5",e[e["KEY_6"]=27]="KEY_6",e[e["KEY_7"]=28]="KEY_7",e[e["KEY_8"]=29]="KEY_8",e[e["KEY_9"]=30]="KEY_9",e[e["KEY_A"]=31]="KEY_A",e[e["KEY_B"]=32]="KEY_B",e[e["KEY_C"]=33]="KEY_C",e[e["KEY_D"]=34]="KEY_D",e[e["KEY_E"]=35]="KEY_E",e[e["KEY_F"]=36]="KEY_F",e[e["KEY_G"]=37]="KEY_G",e[e["KEY_H"]=38]="KEY_H",e[e["KEY_I"]=39]="KEY_I",e[e["KEY_J"]=40]="KEY_J",e[e["KEY_K"]=41]="KEY_K",e[e["KEY_L"]=42]="KEY_L",e[e["KEY_M"]=43]="KEY_M",e[e["KEY_N"]=44]="KEY_N",e[e["KEY_O"]=45]="KEY_O",e[e["KEY_P"]=46]="KEY_P",e[e["KEY_Q"]=47]="KEY_Q",e[e["KEY_R"]=48]="KEY_R",e[e["KEY_S"]=49]="KEY_S",e[e["KEY_T"]=50]="KEY_T",e[e["KEY_U"]=51]="KEY_U",e[e["KEY_V"]=52]="KEY_V",e[e["KEY_W"]=53]="KEY_W",e[e["KEY_X"]=54]="KEY_X",e[e["KEY_Y"]=55]="KEY_Y",e[e["KEY_Z"]=56]="KEY_Z",e[e["Meta"]=57]="Meta",e[e["ContextMenu"]=58]="ContextMenu",e[e["F1"]=59]="F1",e[e["F2"]=60]="F2",e[e["F3"]=61]="F3",e[e["F4"]=62]="F4",e[e["F5"]=63]="F5",e[e["F6"]=64]="F6",e[e["F7"]=65]="F7",e[e["F8"]=66]="F8",e[e["F9"]=67]="F9",e[e["F10"]=68]="F10",e[e["F11"]=69]="F11",e[e["F12"]=70]="F12",e[e["F13"]=71]="F13",e[e["F14"]=72]="F14",e[e["F15"]=73]="F15",e[e["F16"]=74]="F16",e[e["F17"]=75]="F17",e[e["F18"]=76]="F18",e[e["F19"]=77]="F19",e[e["NumLock"]=78]="NumLock",e[e["ScrollLock"]=79]="ScrollLock",e[e["US_SEMICOLON"]=80]="US_SEMICOLON",e[e["US_EQUAL"]=81]="US_EQUAL",e[e["US_COMMA"]=82]="US_COMMA",e[e["US_MINUS"]=83]="US_MINUS",e[e["US_DOT"]=84]="US_DOT",e[e["US_SLASH"]=85]="US_SLASH",e[e["US_BACKTICK"]=86]="US_BACKTICK",e[e["US_OPEN_SQUARE_BRACKET"]=87]="US_OPEN_SQUARE_BRACKET",e[e["US_BACKSLASH"]=88]="US_BACKSLASH",e[e["US_CLOSE_SQUARE_BRACKET"]=89]="US_CLOSE_SQUARE_BRACKET",e[e["US_QUOTE"]=90]="US_QUOTE",e[e["OEM_8"]=91]="OEM_8",e[e["OEM_102"]=92]="OEM_102",e[e["NUMPAD_0"]=93]="NUMPAD_0",e[e["NUMPAD_1"]=94]="NUMPAD_1",e[e["NUMPAD_2"]=95]="NUMPAD_2",e[e["NUMPAD_3"]=96]="NUMPAD_3",e[e["NUMPAD_4"]=97]="NUMPAD_4",e[e["NUMPAD_5"]=98]="NUMPAD_5",e[e["NUMPAD_6"]=99]="NUMPAD_6",e[e["NUMPAD_7"]=100]="NUMPAD_7",e[e["NUMPAD_8"]=101]="NUMPAD_8",e[e["NUMPAD_9"]=102]="NUMPAD_9",e[e["NUMPAD_MULTIPLY"]=103]="NUMPAD_MULTIPLY",e[e["NUMPAD_ADD"]=104]="NUMPAD_ADD",e[e["NUMPAD_SEPARATOR"]=105]="NUMPAD_SEPARATOR",e[e["NUMPAD_SUBTRACT"]=106]="NUMPAD_SUBTRACT",e[e["NUMPAD_DECIMAL"]=107]="NUMPAD_DECIMAL",e[e["NUMPAD_DIVIDE"]=108]="NUMPAD_DIVIDE",e[e["KEY_IN_COMPOSITION"]=109]="KEY_IN_COMPOSITION",e[e["ABNT_C1"]=110]="ABNT_C1",e[e["ABNT_C2"]=111]="ABNT_C2",e[e["MAX_VALUE"]=112]="MAX_VALUE"}(bi||(bi={})),function(e){e[e["Hint"]=1]="Hint",e[e["Info"]=2]="Info",e[e["Warning"]=4]="Warning",e[e["Error"]=8]="Error"}(vi||(vi={})),function(e){e[e["Unnecessary"]=1]="Unnecessary",e[e["Deprecated"]=2]="Deprecated"}(wi||(wi={})),function(e){e[e["Inline"]=1]="Inline",e[e["Gutter"]=2]="Gutter"}(Ci||(Ci={})),function(e){e[e["UNKNOWN"]=0]="UNKNOWN",e[e["TEXTAREA"]=1]="TEXTAREA",e[e["GUTTER_GLYPH_MARGIN"]=2]="GUTTER_GLYPH_MARGIN",e[e["GUTTER_LINE_NUMBERS"]=3]="GUTTER_LINE_NUMBERS",e[e["GUTTER_LINE_DECORATIONS"]=4]="GUTTER_LINE_DECORATIONS",e[e["GUTTER_VIEW_ZONE"]=5]="GUTTER_VIEW_ZONE",e[e["CONTENT_TEXT"]=6]="CONTENT_TEXT",e[e["CONTENT_EMPTY"]=7]="CONTENT_EMPTY",e[e["CONTENT_VIEW_ZONE"]=8]="CONTENT_VIEW_ZONE",e[e["CONTENT_WIDGET"]=9]="CONTENT_WIDGET",e[e["OVERVIEW_RULER"]=10]="OVERVIEW_RULER",e[e["SCROLLBAR"]=11]="SCROLLBAR",e[e["OVERLAY_WIDGET"]=12]="OVERLAY_WIDGET",e[e["OUTSIDE_EDITOR"]=13]="OUTSIDE_EDITOR"}(yi||(yi={})),function(e){e[e["TOP_RIGHT_CORNER"]=0]="TOP_RIGHT_CORNER",e[e["BOTTOM_RIGHT_CORNER"]=1]="BOTTOM_RIGHT_CORNER",e[e["TOP_CENTER"]=2]="TOP_CENTER"}(Si||(Si={})),function(e){e[e["Left"]=1]="Left",e[e["Center"]=2]="Center",e[e["Right"]=4]="Right",e[e["Full"]=7]="Full"}(xi||(xi={})),function(e){e[e["Off"]=0]="Off",e[e["On"]=1]="On",e[e["Relative"]=2]="Relative",e[e["Interval"]=3]="Interval",e[e["Custom"]=4]="Custom"}(Li||(Li={})),function(e){e[e["None"]=0]="None",e[e["Text"]=1]="Text",e[e["Blocks"]=2]="Blocks"}(ki||(ki={})),function(e){e[e["Smooth"]=0]="Smooth",e[e["Immediate"]=1]="Immediate"}(Ei||(Ei={})),function(e){e[e["Auto"]=1]="Auto",e[e["Hidden"]=2]="Hidden",e[e["Visible"]=3]="Visible"}(Di||(Di={})),function(e){e[e["LTR"]=0]="LTR",e[e["RTL"]=1]="RTL"}(Ni||(Ni={})),function(e){e[e["Invoke"]=1]="Invoke",e[e["TriggerCharacter"]=2]="TriggerCharacter",e[e["ContentChange"]=3]="ContentChange"}(Ti||(Ti={})),function(e){e[e["File"]=0]="File",e[e["Module"]=1]="Module",e[e["Namespace"]=2]="Namespace",e[e["Package"]=3]="Package",e[e["Class"]=4]="Class",e[e["Method"]=5]="Method",e[e["Property"]=6]="Property",e[e["Field"]=7]="Field",e[e["Constructor"]=8]="Constructor",e[e["Enum"]=9]="Enum",e[e["Interface"]=10]="Interface",e[e["Function"]=11]="Function",e[e["Variable"]=12]="Variable",e[e["Constant"]=13]="Constant",e[e["String"]=14]="String",e[e["Number"]=15]="Number",e[e["Boolean"]=16]="Boolean",e[e["Array"]=17]="Array",e[e["Object"]=18]="Object",e[e["Key"]=19]="Key",e[e["Null"]=20]="Null",e[e["EnumMember"]=21]="EnumMember",e[e["Struct"]=22]="Struct",e[e["Event"]=23]="Event",e[e["Operator"]=24]="Operator",e[e["TypeParameter"]=25]="TypeParameter"}(Mi||(Mi={})),function(e){e[e["Deprecated"]=1]="Deprecated"}(Ii||(Ii={})),function(e){e[e["Hidden"]=0]="Hidden",e[e["Blink"]=1]="Blink",e[e["Smooth"]=2]="Smooth",e[e["Phase"]=3]="Phase",e[e["Expand"]=4]="Expand",e[e["Solid"]=5]="Solid"}(Oi||(Oi={})),function(e){e[e["Line"]=1]="Line",e[e["Block"]=2]="Block",e[e["Underline"]=3]="Underline",e[e["LineThin"]=4]="LineThin",e[e["BlockOutline"]=5]="BlockOutline",e[e["UnderlineThin"]=6]="UnderlineThin"}(Ai||(Ai={})),function(e){e[e["AlwaysGrowsWhenTypingAtEdges"]=0]="AlwaysGrowsWhenTypingAtEdges",e[e["NeverGrowsWhenTypingAtEdges"]=1]="NeverGrowsWhenTypingAtEdges",e[e["GrowsOnlyWhenTypingBefore"]=2]="GrowsOnlyWhenTypingBefore",e[e["GrowsOnlyWhenTypingAfter"]=3]="GrowsOnlyWhenTypingAfter"}(Ri||(Ri={})),function(e){e[e["None"]=0]="None",e[e["Same"]=1]="Same",e[e["Indent"]=2]="Indent",e[e["DeepIndent"]=3]="DeepIndent"}(Pi||(Pi={}));class Fi{static chord(e,t){return Je(e,t)}}function Wi(){return{editor:void 0,languages:void 0,CancellationTokenSource:$e,Emitter:Ve,KeyCode:bi,KeyMod:Fi,Position:Qt,Range:Jt,Selection:ei,SelectionDirection:Ni,MarkerSeverity:vi,MarkerTag:wi,Uri:Ht,Token:ti}}Fi.CtrlCmd=2048,Fi.Shift=1024,Fi.Alt=512,Fi.WinCtrl=256;var Bi;i("769f");(function(e){function t(t){return t[e.DI_DEPENDENCIES]||[]}e.serviceIds=new Map,e.DI_TARGET="$di$target",e.DI_DEPENDENCIES="$di$dependencies",e.getServiceDependencies=t})(Bi||(Bi={}));const Vi=zi("instantiationService");function Hi(e,t,i,n){t[Bi.DI_TARGET]===t?t[Bi.DI_DEPENDENCIES].push({id:e,index:i,optional:n}):(t[Bi.DI_DEPENDENCIES]=[{id:e,index:i,optional:n}],t[Bi.DI_TARGET]=t)}function zi(e){if(Bi.serviceIds.has(e))return Bi.serviceIds.get(e);const t=function(e,i,n){if(3!==arguments.length)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");Hi(t,e,n,!1)};return t.toString=()=>e,Bi.serviceIds.set(e,t),t}function Ui(e){return function(t,i,n){if(3!==arguments.length)throw new Error("@optional-decorator can only be used to decorate a parameter");Hi(e,t,n,!0)}}const ji=zi("codeEditorService");class Ki{constructor(){this._zoomLevel=0,this._lastZoomLevelChangeTime=0,this._onDidChangeZoomLevel=new Ve,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event,this._zoomFactor=1}getZoomLevel(){return this._zoomLevel}getTimeSinceLastZoomLevelChanged(){return Date.now()-this._lastZoomLevelChangeTime}getZoomFactor(){return this._zoomFactor}getPixelRatio(){let e=document.createElement("canvas").getContext("2d"),t=window.devicePixelRatio||1,i=e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1;return t/i}}function qi(){return Ki.INSTANCE.getZoomLevel()}function $i(){return Ki.INSTANCE.getTimeSinceLastZoomLevelChanged()}function Gi(e){return Ki.INSTANCE.onDidChangeZoomLevel(e)}function Yi(){return Ki.INSTANCE.getZoomFactor()}function Xi(){return Ki.INSTANCE.getPixelRatio()}Ki.INSTANCE=new Ki;const Zi=navigator.userAgent,Qi=Zi.indexOf("Edge/")>=0,Ji=Zi.indexOf("Firefox")>=0,en=Zi.indexOf("AppleWebKit")>=0,tn=Zi.indexOf("Chrome")>=0,nn=!tn&&Zi.indexOf("Safari")>=0,on=!tn&&!nn&&en,rn=(Zi.indexOf("iPad")>=0||nn&&navigator.maxTouchPoints,Qi&&Zi.indexOf("WebView/")>=0),sn=window.matchMedia&&window.matchMedia("(display-mode: standalone)").matches,an=(e,t,i)=>{const n=e=>o.fire(e),o=new Ve({onFirstListenerAdd:()=>{e.addEventListener(t,n,i)},onLastListenerRemove:()=>{e.removeEventListener(t,n,i)}});return o.event};let ln=new Array(230),cn=new Array(112);function hn(e){if(e.charCode){let t=String.fromCharCode(e.charCode).toUpperCase();return Qe.fromString(t)}return ln[e.keyCode]||0}(function(){for(let t=0;t<cn.length;t++)cn[t]=-1;function e(e,t){ln[e]=t,cn[t]=e}e(3,7),e(8,1),e(9,2),e(13,3),e(16,4),e(17,5),e(18,6),e(19,7),e(20,8),e(27,9),e(32,10),e(33,11),e(34,12),e(35,13),e(36,14),e(37,15),e(38,16),e(39,17),e(40,18),e(45,19),e(46,20),e(48,21),e(49,22),e(50,23),e(51,24),e(52,25),e(53,26),e(54,27),e(55,28),e(56,29),e(57,30),e(65,31),e(66,32),e(67,33),e(68,34),e(69,35),e(70,36),e(71,37),e(72,38),e(73,39),e(74,40),e(75,41),e(76,42),e(77,43),e(78,44),e(79,45),e(80,46),e(81,47),e(82,48),e(83,49),e(84,50),e(85,51),e(86,52),e(87,53),e(88,54),e(89,55),e(90,56),e(93,58),e(96,93),e(97,94),e(98,95),e(99,96),e(100,97),e(101,98),e(102,99),e(103,100),e(104,101),e(105,102),e(106,103),e(107,104),e(108,105),e(109,106),e(110,107),e(111,108),e(112,59),e(113,60),e(114,61),e(115,62),e(116,63),e(117,64),e(118,65),e(119,66),e(120,67),e(121,68),e(122,69),e(123,70),e(124,71),e(125,72),e(126,73),e(127,74),e(128,75),e(129,76),e(130,77),e(144,78),e(145,79),e(186,80),e(187,81),e(188,82),e(189,83),e(190,84),e(191,85),e(192,86),e(193,110),e(194,111),e(219,87),e(220,88),e(221,89),e(222,90),e(223,91),e(226,92),e(229,109),Ji?(e(59,80),e(107,81),e(109,83),r["f"]&&e(224,57)):en&&(e(91,57),r["f"]?e(93,57):e(92,57))})();const dn=r["f"]?256:2048,un=512,gn=1024,fn=r["f"]?2048:256;class mn{constructor(e){this._standardKeyboardEventBrand=!0;let t=e;this.browserEvent=t,this.target=t.target,this.ctrlKey=t.ctrlKey,this.shiftKey=t.shiftKey,this.altKey=t.altKey,this.metaKey=t.metaKey,this.keyCode=hn(t),this.code=t.code,this.ctrlKey=this.ctrlKey||5===this.keyCode,this.altKey=this.altKey||6===this.keyCode,this.shiftKey=this.shiftKey||4===this.keyCode,this.metaKey=this.metaKey||57===this.keyCode,this._asKeybinding=this._computeKeybinding(),this._asRuntimeKeybinding=this._computeRuntimeKeybinding()}preventDefault(){this.browserEvent&&this.browserEvent.preventDefault&&this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent&&this.browserEvent.stopPropagation&&this.browserEvent.stopPropagation()}toKeybinding(){return this._asRuntimeKeybinding}equals(e){return this._asKeybinding===e}_computeKeybinding(){let e=0;5!==this.keyCode&&4!==this.keyCode&&6!==this.keyCode&&57!==this.keyCode&&(e=this.keyCode);let t=0;return this.ctrlKey&&(t|=dn),this.altKey&&(t|=un),this.shiftKey&&(t|=gn),this.metaKey&&(t|=fn),t|=e,t}_computeRuntimeKeybinding(){let e=0;return 5!==this.keyCode&&4!==this.keyCode&&6!==this.keyCode&&57!==this.keyCode&&(e=this.keyCode),new it(this.ctrlKey,this.shiftKey,this.altKey,this.metaKey,e)}}let pn,_n=!1,bn=null;function vn(e){if(!e.parent||e.parent===e)return null;try{let t=e.location,i=e.parent.location;if("null"!==t.origin&&"null"!==i.origin&&(t.protocol!==i.protocol||t.hostname!==i.hostname||t.port!==i.port))return _n=!0,null}catch(t){return _n=!0,null}return e.parent}class wn{static getSameOriginWindowChain(){if(!bn){bn=[];let e,t=window;do{e=vn(t),e?bn.push({window:t,iframeElement:t.frameElement||null}):bn.push({window:t,iframeElement:null}),t=e}while(t)}return bn.slice(0)}static hasDifferentOriginAncestor(){return bn||this.getSameOriginWindowChain(),_n}static getPositionOfChildWindowRelativeToAncestorWindow(e,t){if(!t||e===t)return{top:0,left:0};let i=0,n=0,o=this.getSameOriginWindowChain();for(const r of o){if(i+=r.window.scrollY,n+=r.window.scrollX,r.window===t)break;if(!r.iframeElement)break;let e=r.iframeElement.getBoundingClientRect();i+=e.top,n+=e.left}return{top:i,left:n}}}class Cn{constructor(e){this.timestamp=Date.now(),this.browserEvent=e,this.leftButton=0===e.button,this.middleButton=1===e.button,this.rightButton=2===e.button,this.buttons=e.buttons,this.target=e.target,this.detail=e.detail||1,"dblclick"===e.type&&(this.detail=2),this.ctrlKey=e.ctrlKey,this.shiftKey=e.shiftKey,this.altKey=e.altKey,this.metaKey=e.metaKey,"number"===typeof e.pageX?(this.posx=e.pageX,this.posy=e.pageY):(this.posx=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,this.posy=e.clientY+document.body.scrollTop+document.documentElement.scrollTop);let t=wn.getPositionOfChildWindowRelativeToAncestorWindow(self,e.view);this.posx-=t.left,this.posy-=t.top}preventDefault(){this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent.stopPropagation()}}class yn{constructor(e,t=0,i=0){if(this.browserEvent=e||null,this.target=e?e.target||e.targetNode||e.srcElement:null,this.deltaY=i,this.deltaX=t,e){let t=e,i=e;if("undefined"!==typeof t.wheelDeltaY)this.deltaY=t.wheelDeltaY/120;else if("undefined"!==typeof i.VERTICAL_AXIS&&i.axis===i.VERTICAL_AXIS)this.deltaY=-i.detail/3;else if("wheel"===e.type){const t=e;t.deltaMode===t.DOM_DELTA_LINE?Ji&&!r["f"]?this.deltaY=-e.deltaY/3:this.deltaY=-e.deltaY:this.deltaY=-e.deltaY/40}if("undefined"!==typeof t.wheelDeltaX)nn&&r["i"]?this.deltaX=-t.wheelDeltaX/120:this.deltaX=t.wheelDeltaX/120;else if("undefined"!==typeof i.HORIZONTAL_AXIS&&i.axis===i.HORIZONTAL_AXIS)this.deltaX=-e.detail/3;else if("wheel"===e.type){const t=e;t.deltaMode===t.DOM_DELTA_LINE?Ji&&!r["f"]?this.deltaX=-e.deltaX/3:this.deltaX=-e.deltaX:this.deltaX=-e.deltaX/40}0===this.deltaY&&0===this.deltaX&&e.wheelDelta&&(this.deltaY=e.wheelDelta/120)}}preventDefault(){this.browserEvent&&this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent&&this.browserEvent.stopPropagation()}}function Sn(e){return e&&"function"===typeof e.then}function xn(e){const t=new $e,i=e(t.token),n=new Promise((e,n)=>{t.token.onCancellationRequested(()=>{n(ve())}),Promise.resolve(i).then(i=>{t.dispose(),e(i)},e=>{t.dispose(),n(e)})});return new class{cancel(){t.cancel()}then(e,t){return n.then(e,t)}catch(e){return this.then(void 0,e)}finally(e){return n.finally(e)}}}class Ln{constructor(e){this.defaultDelay=e,this.timeout=null,this.completionPromise=null,this.doResolve=null,this.doReject=null,this.task=null}trigger(e,t=this.defaultDelay){return this.task=e,this.cancelTimeout(),this.completionPromise||(this.completionPromise=new Promise((e,t)=>{this.doResolve=e,this.doReject=t}).then(()=>{if(this.completionPromise=null,this.doResolve=null,this.task){const e=this.task;return this.task=null,e()}})),this.timeout=setTimeout(()=>{this.timeout=null,this.doResolve&&this.doResolve(null)},t),this.completionPromise}isTriggered(){return null!==this.timeout}cancel(){this.cancelTimeout(),this.completionPromise&&(this.doReject&&this.doReject(ve()),this.completionPromise=null)}cancelTimeout(){null!==this.timeout&&(clearTimeout(this.timeout),this.timeout=null)}dispose(){this.cancelTimeout()}}function kn(e,t){return t?new Promise((i,n)=>{const o=setTimeout(i,e);t.onCancellationRequested(()=>{clearTimeout(o),n(ve())})}):xn(t=>kn(e,t))}function En(e,t=0){const i=setTimeout(e,t);return Me(()=>clearTimeout(i))}class Dn{constructor(e,t){this._token=-1,"function"===typeof e&&"number"===typeof t&&this.setIfNotSet(e,t)}dispose(){this.cancel()}cancel(){-1!==this._token&&(clearTimeout(this._token),this._token=-1)}cancelAndSet(e,t){this.cancel(),this._token=setTimeout(()=>{this._token=-1,e()},t)}setIfNotSet(e,t){-1===this._token&&(this._token=setTimeout(()=>{this._token=-1,e()},t))}}class Nn{constructor(){this._token=-1}dispose(){this.cancel()}cancel(){-1!==this._token&&(clearInterval(this._token),this._token=-1)}cancelAndSet(e,t){this.cancel(),this._token=setInterval(()=>{e()},t)}}class Tn{constructor(e,t){this.timeoutToken=-1,this.runner=e,this.timeout=t,this.timeoutHandler=this.onTimeout.bind(this)}dispose(){this.cancel(),this.runner=null}cancel(){this.isScheduled()&&(clearTimeout(this.timeoutToken),this.timeoutToken=-1)}schedule(e=this.timeout){this.cancel(),this.timeoutToken=setTimeout(this.timeoutHandler,e)}isScheduled(){return-1!==this.timeoutToken}onTimeout(){this.timeoutToken=-1,this.runner&&this.doRun()}doRun(){this.runner&&this.runner()}}(function(){if("function"!==typeof requestIdleCallback||"function"!==typeof cancelIdleCallback){const e=Object.freeze({didTimeout:!0,timeRemaining(){return 15}});pn=t=>{const i=setTimeout(()=>t(e));let n=!1;return{dispose(){n||(n=!0,clearTimeout(i))}}}}else pn=(e,t)=>{const i=requestIdleCallback(e,"number"===typeof t?{timeout:t}:void 0);let n=!1;return{dispose(){n||(n=!0,cancelIdleCallback(i))}}}})();class Mn{constructor(e){this._didRun=!1,this._executor=()=>{try{this._value=e()}catch(t){this._error=t}finally{this._didRun=!0}},this._handle=pn(()=>this._executor())}dispose(){this._handle.dispose()}get value(){if(this._didRun||(this._handle.dispose(),this._executor()),this._error)throw this._error;return this._value}}function In(e,t=0){return e[e.length-(1+t)]}function On(e){if(0===e.length)throw new Error("Invalid tail call");return[e.slice(0,e.length-1),e[e.length-1]]}function An(e,t,i=((e,t)=>e===t)){if(e===t)return!0;if(!e||!t)return!1;if(e.length!==t.length)return!1;for(let n=0,o=e.length;n<o;n++)if(!i(e[n],t[n]))return!1;return!0}function Rn(e,t,i){let n=0,o=e.length-1;while(n<=o){const r=(n+o)/2|0,s=i(e[r],t);if(s<0)n=r+1;else{if(!(s>0))return r;o=r-1}}return-(n+1)}function Pn(e,t){return Wn(e,t,0,e.length-1,[]),e}function Fn(e,t,i,n,o,r){let s=i,a=n+1;for(let l=i;l<=o;l++)r[l]=e[l];for(let l=i;l<=o;l++)s>n?e[l]=r[a++]:a>o?e[l]=r[s++]:t(r[a],r[s])<0?e[l]=r[a++]:e[l]=r[s++]}function Wn(e,t,i,n,o){if(n<=i)return;const r=i+(n-i)/2|0;Wn(e,t,i,r,o),Wn(e,t,r+1,n,o),t(e[r],e[r+1])<=0||Fn(e,t,i,r,n,o)}function Bn(e){return e.filter(e=>!!e)}function Vn(e){return!Array.isArray(e)||0===e.length}function Hn(e){return Array.isArray(e)&&e.length>0}function zn(e,t){if(!t)return e.filter((t,i)=>e.indexOf(t)===i);const i=Object.create(null);return e.filter(e=>{const n=t(e);return!i[n]&&(i[n]=!0,!0)})}function Un(e){const t=new Set;return e.filter(e=>!t.has(e)&&(t.add(e),!0))}function jn(e,t){for(let i=0;i<e.length;i++){const n=e[i];if(t(n))return i}return-1}function Kn(e,t,i){const n=jn(e,t);return n<0?i:e[n]}function qn(e,t){return e.length>0?e[0]:t}function $n(e,t){let i="number"===typeof t?e:0;"number"===typeof t?i=e:(i=0,t=e);const n=[];if(i<=t)for(let o=i;o<t;o++)n.push(o);else for(let o=i;o>t;o--)n.push(o);return n}function Gn(e,t,i){const n=e.slice(0,t),o=e.slice(t);return n.concat(i,o)}var Yn;(function(e){e.inMemory="inmemory",e.vscode="vscode",e.internal="private",e.walkThrough="walkThrough",e.walkThroughSnippet="walkThroughSnippet",e.http="http",e.https="https",e.file="file",e.mailto="mailto",e.untitled="untitled",e.data="data",e.command="command",e.vscodeRemote="vscode-remote",e.vscodeRemoteResource="vscode-remote-resource",e.userData="vscode-userdata",e.vscodeCustomEditor="vscode-custom-editor",e.vscodeNotebook="vscode-notebook",e.vscodeNotebookCell="vscode-notebook-cell",e.vscodeSettings="vscode-settings",e.webviewPanel="webview-panel",e.vscodeWebview="vscode-webview",e.vscodeWebviewResource="vscode-webview-resource",e.extension="extension"})(Yn||(Yn={}));class Xn{constructor(){this._hosts=Object.create(null),this._ports=Object.create(null),this._connectionTokens=Object.create(null),this._preferredWebSchema="http",this._delegate=null}setPreferredWebSchema(e){this._preferredWebSchema=e}rewrite(e){if(this._delegate)return this._delegate(e);const t=e.authority;let i=this._hosts[t];i&&-1!==i.indexOf(":")&&(i=`[${i}]`);const n=this._ports[t],o=this._connectionTokens[t];let s="path="+encodeURIComponent(e.path);return"string"===typeof o&&(s+="&tkn="+encodeURIComponent(o)),Ht.from({scheme:r["h"]?this._preferredWebSchema:Yn.vscodeRemoteResource,authority:`${i}:${n}`,path:"/vscode-remote-resource",query:s})}}const Zn=new Xn,Qn={clipboard:{writeText:r["g"]||document.queryCommandSupported&&document.queryCommandSupported("copy")||!!(navigator&&navigator.clipboard&&navigator.clipboard.writeText),readText:r["g"]||!!(navigator&&navigator.clipboard&&navigator.clipboard.readText),richText:(()=>{if(Qi){let e=navigator.userAgent.indexOf("Edge/"),t=parseInt(navigator.userAgent.substring(e+5,navigator.userAgent.indexOf(".",e)),10);if(!t||t>=12&&t<=16)return!1}return!0})()},keyboard:(()=>r["g"]||sn?0:navigator.keyboard||nn?1:2)(),touch:"ontouchstart"in window||navigator.maxTouchPoints>0||window.navigator.msMaxTouchPoints>0,pointerEvents:window.PointerEvent&&("ontouchstart"in window||window.navigator.maxTouchPoints>0||navigator.maxTouchPoints>0||window.navigator.msMaxTouchPoints>0)};function Jn(e){while(e.firstChild)e.removeChild(e.firstChild)}function eo(e){e.parentNode&&e.parentNode.removeChild(e)}function to(e){while(e){if(e===document.body)return!0;e=e.parentNode||e.host}return!1}const io=new class{hasClass(e,t){return Boolean(t)&&e.classList&&e.classList.contains(t)}addClasses(e,...t){t.forEach(t=>t.split(" ").forEach(t=>this.addClass(e,t)))}addClass(e,t){t&&e.classList&&e.classList.add(t)}removeClass(e,t){t&&e.classList&&e.classList.remove(t)}removeClasses(e,...t){t.forEach(t=>t.split(" ").forEach(t=>this.removeClass(e,t)))}toggleClass(e,t,i){e.classList&&e.classList.toggle(t,i)}},no=io.hasClass.bind(io),oo=io.addClass.bind(io),ro=io.addClasses.bind(io),so=io.removeClass.bind(io),ao=io.removeClasses.bind(io),lo=io.toggleClass.bind(io);class co{constructor(e,t,i,n){this._node=e,this._type=t,this._handler=i,this._options=n||!1,this._node.addEventListener(this._type,this._handler,this._options)}dispose(){this._handler&&(this._node.removeEventListener(this._type,this._handler,this._options),this._node=null,this._handler=null)}}function ho(e,t,i,n){return new co(e,t,i,n)}function uo(e){return function(t){return e(new Cn(t))}}function go(e){return function(t){return e(new mn(t))}}let fo=function(e,t,i,n){let o=i;return"click"===t||"mousedown"===t?o=uo(i):"keydown"!==t&&"keypress"!==t&&"keyup"!==t||(o=go(i)),ho(e,t,o,n)};function mo(e,t){return ho(e,"mouseout",i=>{let n=i.relatedTarget;while(n&&n!==e)n=n.parentNode;n!==e&&t(i)})}function po(e,t){return ho(e,"pointerout",i=>{let n=i.relatedTarget;while(n&&n!==e)n=n.parentNode;n!==e&&t(i)})}let _o,bo,vo=null;function wo(e){if(!vo){const e=e=>setTimeout(()=>e((new Date).getTime()),0);vo=self.requestAnimationFrame||self.msRequestAnimationFrame||self.webkitRequestAnimationFrame||self.mozRequestAnimationFrame||self.oRequestAnimationFrame||e}return vo.call(self,e)}class Co{constructor(e,t=0){this._runner=e,this.priority=t,this._canceled=!1}dispose(){this._canceled=!0}execute(){if(!this._canceled)try{this._runner()}catch(e){me(e)}}static sort(e,t){return t.priority-e.priority}}(function(){let e=[],t=null,i=!1,n=!1,o=()=>{i=!1,t=e,e=[],n=!0;while(t.length>0){t.sort(Co.sort);let e=t.shift();e.execute()}n=!1};bo=(t,n=0)=>{let r=new Co(t,n);return e.push(r),i||(i=!0,wo(o)),r},_o=(e,i)=>{if(n){let n=new Co(e,i);return t.push(n),n}return bo(e,i)}})();const yo=16,So=function(e,t){return t};class xo extends Oe{constructor(e,t,i,n=So,o=yo){super();let r=null,s=0,a=this._register(new Dn),l=()=>{s=(new Date).getTime(),i(r),r=null};this._register(ho(e,t,e=>{r=n(r,e);let t=(new Date).getTime()-s;t>=o?(a.cancel(),l()):a.setIfNotSet(l,o-t)}))}}function Lo(e,t,i,n,o){return new xo(e,t,i,n,o)}function ko(e){return document.defaultView.getComputedStyle(e,null)}function Eo(e){if(e!==document.body)return new No(e.clientWidth,e.clientHeight);if(r["c"]&&window.visualViewport){const e=window.visualViewport.width,t=window.visualViewport.height-(sn?24:0);return new No(e,t)}if(window.innerWidth&&window.innerHeight)return new No(window.innerWidth,window.innerHeight);if(document.body&&document.body.clientWidth&&document.body.clientHeight)return new No(document.body.clientWidth,document.body.clientHeight);if(document.documentElement&&document.documentElement.clientWidth&&document.documentElement.clientHeight)return new No(document.documentElement.clientWidth,document.documentElement.clientHeight);throw new Error("Unable to figure out browser width and height")}class Do{static convertToPixels(e,t){return parseFloat(t)||0}static getDimension(e,t,i){let n=ko(e),o="0";return n&&(o=n.getPropertyValue?n.getPropertyValue(t):n.getAttribute(i)),Do.convertToPixels(e,o)}static getBorderLeftWidth(e){return Do.getDimension(e,"border-left-width","borderLeftWidth")}static getBorderRightWidth(e){return Do.getDimension(e,"border-right-width","borderRightWidth")}static getBorderTopWidth(e){return Do.getDimension(e,"border-top-width","borderTopWidth")}static getBorderBottomWidth(e){return Do.getDimension(e,"border-bottom-width","borderBottomWidth")}static getPaddingLeft(e){return Do.getDimension(e,"padding-left","paddingLeft")}static getPaddingRight(e){return Do.getDimension(e,"padding-right","paddingRight")}static getPaddingTop(e){return Do.getDimension(e,"padding-top","paddingTop")}static getPaddingBottom(e){return Do.getDimension(e,"padding-bottom","paddingBottom")}static getMarginLeft(e){return Do.getDimension(e,"margin-left","marginLeft")}static getMarginTop(e){return Do.getDimension(e,"margin-top","marginTop")}static getMarginRight(e){return Do.getDimension(e,"margin-right","marginRight")}static getMarginBottom(e){return Do.getDimension(e,"margin-bottom","marginBottom")}}class No{constructor(e,t){this.width=e,this.height=t}}function To(e){let t=e.offsetParent,i=e.offsetTop,n=e.offsetLeft;while(null!==(e=e.parentNode)&&e!==document.body&&e!==document.documentElement){i-=e.scrollTop;const o=Vo(e)?null:ko(e);o&&(n-="rtl"!==o.direction?e.scrollLeft:-e.scrollLeft),e===t&&(n+=Do.getBorderLeftWidth(e),i+=Do.getBorderTopWidth(e),i+=e.offsetTop,n+=e.offsetLeft,t=e.offsetParent)}return{left:n,top:i}}function Mo(e){let t=e.getBoundingClientRect();return{left:t.left+Io.scrollX,top:t.top+Io.scrollY,width:t.width,height:t.height}}const Io=new class{get scrollX(){return"number"===typeof window.scrollX?window.scrollX:document.body.scrollLeft+document.documentElement.scrollLeft}get scrollY(){return"number"===typeof window.scrollY?window.scrollY:document.body.scrollTop+document.documentElement.scrollTop}};function Oo(e){let t=Do.getMarginLeft(e)+Do.getMarginRight(e);return e.offsetWidth+t}function Ao(e){let t=Do.getBorderLeftWidth(e)+Do.getBorderRightWidth(e),i=Do.getPaddingLeft(e)+Do.getPaddingRight(e);return e.offsetWidth-t-i}function Ro(e){let t=Do.getBorderTopWidth(e)+Do.getBorderBottomWidth(e),i=Do.getPaddingTop(e)+Do.getPaddingBottom(e);return e.offsetHeight-t-i}function Po(e){let t=Do.getMarginTop(e)+Do.getMarginBottom(e);return e.offsetHeight+t}function Fo(e,t){while(e){if(e===t)return!0;e=e.parentNode}return!1}function Wo(e,t,i){while(e&&e.nodeType===e.ELEMENT_NODE){if(no(e,t))return e;if(i)if("string"===typeof i){if(no(e,i))return null}else if(e===i)return null;e=e.parentNode}return null}function Bo(e,t,i){return!!Wo(e,t,i)}function Vo(e){return e&&!!e.host&&!!e.mode}function Ho(e){return!!zo(e)}function zo(e){while(e.parentNode){if(e===document.body)return null;e=e.parentNode}return Vo(e)?e:null}function Uo(){let e=document.activeElement;while(null===e||void 0===e?void 0:e.shadowRoot)e=e.shadowRoot.activeElement;return e}function jo(e=document.getElementsByTagName("head")[0]){let t=document.createElement("style");return t.type="text/css",t.media="screen",e.appendChild(t),t}let Ko=null;function qo(){return Ko||(Ko=jo()),Ko}function $o(e){return e&&e.sheet&&e.sheet.rules?e.sheet.rules:e&&e.sheet&&e.sheet.cssRules?e.sheet.cssRules:[]}function Go(e,t,i=qo()){i&&t&&i.sheet.insertRule(e+"{"+t+"}",0)}function Yo(e,t=qo()){if(!t)return;let i=$o(t),n=[];for(let o=0;o<i.length;o++){let t=i[o];-1!==t.selectorText.indexOf(e)&&n.push(o)}for(let o=n.length-1;o>=0;o--)t.sheet.deleteRule(n[o])}function Xo(e){return"object"===typeof HTMLElement?e instanceof HTMLElement:e&&"object"===typeof e&&1===e.nodeType&&"string"===typeof e.nodeName}const Zo={CLICK:"click",AUXCLICK:"auxclick",DBLCLICK:"dblclick",MOUSE_UP:"mouseup",MOUSE_DOWN:"mousedown",MOUSE_OVER:"mouseover",MOUSE_MOVE:"mousemove",MOUSE_OUT:"mouseout",MOUSE_ENTER:"mouseenter",MOUSE_LEAVE:"mouseleave",MOUSE_WHEEL:Qi?"mousewheel":"wheel",POINTER_UP:"pointerup",POINTER_DOWN:"pointerdown",POINTER_MOVE:"pointermove",CONTEXT_MENU:"contextmenu",WHEEL:"wheel",KEY_DOWN:"keydown",KEY_PRESS:"keypress",KEY_UP:"keyup",LOAD:"load",BEFORE_UNLOAD:"beforeunload",UNLOAD:"unload",ABORT:"abort",ERROR:"error",RESIZE:"resize",SCROLL:"scroll",FULLSCREEN_CHANGE:"fullscreenchange",WK_FULLSCREEN_CHANGE:"webkitfullscreenchange",SELECT:"select",CHANGE:"change",SUBMIT:"submit",RESET:"reset",FOCUS:"focus",FOCUS_IN:"focusin",FOCUS_OUT:"focusout",BLUR:"blur",INPUT:"input",STORAGE:"storage",DRAG_START:"dragstart",DRAG:"drag",DRAG_ENTER:"dragenter",DRAG_LEAVE:"dragleave",DRAG_OVER:"dragover",DROP:"drop",DRAG_END:"dragend",ANIMATION_START:en?"webkitAnimationStart":"animationstart",ANIMATION_END:en?"webkitAnimationEnd":"animationend",ANIMATION_ITERATION:en?"webkitAnimationIteration":"animationiteration"},Qo={stop:function(e,t){e.preventDefault?e.preventDefault():e.returnValue=!1,t&&(e.stopPropagation?e.stopPropagation():e.cancelBubble=!0)}};function Jo(e){let t=[];for(let i=0;e&&e.nodeType===e.ELEMENT_NODE;i++)t[i]=e.scrollTop,e=e.parentNode;return t}function er(e,t){for(let i=0;e&&e.nodeType===e.ELEMENT_NODE;i++)e.scrollTop!==t[i]&&(e.scrollTop=t[i]),e=e.parentNode}class tr extends Oe{constructor(e){super(),this._onDidFocus=this._register(new Ve),this.onDidFocus=this._onDidFocus.event,this._onDidBlur=this._register(new Ve),this.onDidBlur=this._onDidBlur.event;let t=Fo(document.activeElement,e),i=!1;const n=()=>{i=!1,t||(t=!0,this._onDidFocus.fire())},o=()=>{t&&(i=!0,window.setTimeout(()=>{i&&(i=!1,t=!1,this._onDidBlur.fire())},0))};this._refreshStateHandler=()=>{let i=Fo(document.activeElement,e);i!==t&&(t?o():n())},this._register(an(e,Zo.FOCUS,!0)(n)),this._register(an(e,Zo.BLUR,!0)(o))}}function ir(e){return new tr(e)}function nr(e,...t){return t.forEach(t=>e.appendChild(t)),t[t.length-1]}const or=/([\w\-]+)?(#([\w\-]+))?((\.([\w\-]+))*)/;function rr(e,...t){e.innerText="",Bn(t).forEach(t=>{t instanceof Node?e.appendChild(t):e.appendChild(document.createTextNode(t))})}var sr;function ar(e,t,i,...n){let o=or.exec(t);if(!o)throw new Error("Bad use of emmet");i=Object.assign({},i||{});let r,s=o[1]||"div";return r=e!==sr.HTML?document.createElementNS(e,s):document.createElement(s),o[3]&&(r.id=o[3]),o[4]&&(r.className=o[4].replace(/\./g," ").trim()),Object.keys(i).forEach(e=>{const t=i[e];"undefined"!==typeof t&&(/^on\w+$/.test(e)?r[e]=t:"selected"===e?t&&r.setAttribute(e,"true"):r.setAttribute(e,t))}),Bn(n).forEach(e=>{e instanceof Node?r.appendChild(e):r.appendChild(document.createTextNode(e))}),r}function lr(e,t,...i){return ar(sr.HTML,e,t,...i)}function cr(...e){for(let t of e)t.style.display="",t.removeAttribute("aria-hidden")}function hr(...e){for(let t of e)t.style.display="none",t.setAttribute("aria-hidden","true")}function dr(e,t){while(e&&e.nodeType===e.ELEMENT_NODE){if(e instanceof HTMLElement&&e.hasAttribute(t))return e;e=e.parentNode}return null}function ur(e){if(e&&e.hasAttribute("tabIndex")){if(document.activeElement===e){let t=dr(e.parentElement,"tabIndex");t&&t.focus()}e.removeAttribute("tabindex")}}function gr(e){return Array.prototype.slice.call(document.getElementsByTagName(e),0)}function fr(e){const t=window.devicePixelRatio*e;return Math.max(1,Math.floor(t))/window.devicePixelRatio}function mr(e){if(r["g"]||rn)window.open(e);else{let t=window.open();t&&(t.opener=null,t.location.href=e)}}function pr(e){const t=()=>{e(),i=bo(t)};let i=bo(t);return Me(()=>i.dispose())}function _r(e){return e&&Yn.vscodeRemote===e.scheme?Zn.rewrite(e):e}function br(e){return e?`url('${_r(e).toString(!0).replace(/'/g,"%27")}')`:"url('')"}(function(e){e["HTML"]="http://www.w3.org/1999/xhtml",e["SVG"]="http://www.w3.org/2000/svg"})(sr||(sr={})),lr.SVG=function(e,t,...i){return ar(sr.SVG,e,t,...i)},Zn.setPreferredWebSchema(/^https:/.test(window.location.href)?"https":"http");var vr=i("c223");function wr(e){let t=JSON.parse(e);return t=Cr(t),t}function Cr(e,t=0){if(!e||t>200)return e;if("object"===typeof e){switch(e.$mid){case 1:return Ht.revive(e);case 2:return new RegExp(e.source,e.flags)}if(e instanceof vr["a"]||e instanceof Uint8Array)return e;if(Array.isArray(e))for(let i=0;i<e.length;++i)e[i]=Cr(e[i],t+1);else for(const i in e)Object.hasOwnProperty.call(e,i)&&(e[i]=Cr(e[i],t+1))}return e}var yr=i("3fa4");function Sr(e){return e.replace(/[\\/]/g,xt.sep)}function xr(e,t,i,n=Mt){if(e===t)return!0;if(!e||!t)return!1;if(t.length>e.length)return!1;if(i){const i=Object(yr["Q"])(e,t);if(!i)return!1;if(t.length===e.length)return!0;let o=t.length;return t.charAt(t.length-1)===n&&o--,e.charAt(o)===n}return t.charAt(t.length-1)!==n&&(t+=n),0===e.indexOf(t)}function Lr(e){return $t(e,!0)}class kr{constructor(e){this._ignorePathCasing=e}compare(e,t,i=!1){return e===t?0:Object(yr["f"])(this.getComparisonKey(e,i),this.getComparisonKey(t,i))}isEqual(e,t,i=!1){return e===t||!(!e||!t)&&this.getComparisonKey(e,i)===this.getComparisonKey(t,i)}getComparisonKey(e,t=!1){return e.with({path:this._ignorePathCasing(e)?e.path.toLowerCase():void 0,fragment:t?null:void 0}).toString()}joinPath(e,...t){return Ht.joinPath(e,...t)}basenameOrAuthority(e){return Dr(e)||e.authority}basename(e){return xt.basename(e.path)}dirname(e){if(0===e.path.length)return e;let t;return e.scheme===Yn.file?t=Ht.file(Dt(Lr(e))).path:(t=xt.dirname(e.path),e.authority&&t.length&&47!==t.charCodeAt(0)&&(console.error(`dirname("${e.toString})) resulted in a relative path`),t="/")),e.with({path:t})}normalizePath(e){if(!e.path.length)return e;let t;return t=e.scheme===Yn.file?Ht.file(Lt(Lr(e))).path:xt.normalize(e.path),e.with({path:t})}relativePath(e,t){if(e.scheme!==t.scheme||!Mr(e.authority,t.authority))return;if(e.scheme===Yn.file){const i=Et(Lr(e),Lr(t));return r["i"]?Sr(i):i}let i=e.path||"/",n=t.path||"/";if(this._ignorePathCasing(e)){let e=0;for(const t=Math.min(i.length,n.length);e<t;e++)if(i.charCodeAt(e)!==n.charCodeAt(e)&&i.charAt(e).toLowerCase()!==n.charAt(e).toLowerCase())break;i=n.substr(0,e)+i.substr(e)}return xt.relative(i,n)}resolvePath(e,t){if(e.scheme===Yn.file){const i=Ht.file(kt(Lr(e),t));return e.with({authority:i.authority,path:i.path})}return-1===t.indexOf("/")&&(t=Sr(t),/^[a-zA-Z]:(\/|$)/.test(t)&&(t="/"+t)),e.with({path:xt.resolve(e.path,t)})}isEqualAuthority(e,t){return e===t||Object(yr["r"])(e,t)}}const Er=new kr(()=>!1),Dr=(Er.isEqual.bind(Er),Er.basenameOrAuthority.bind(Er),Er.basename.bind(Er)),Nr=(Er.dirname.bind(Er),Er.joinPath.bind(Er)),Tr=Er.normalizePath.bind(Er),Mr=(Er.relativePath.bind(Er),Er.resolvePath.bind(Er),Er.isEqualAuthority.bind(Er));var Ir;function Or(e){return"string"===typeof e}function Ar(e){return"object"===typeof e&&null!==e&&!Array.isArray(e)&&!(e instanceof RegExp)&&!(e instanceof Date)}function Rr(e){return"number"===typeof e&&!isNaN(e)}function Pr(e){return!0===e||!1===e}function Fr(e){return"undefined"===typeof e}function Wr(e){return Fr(e)||null===e}function Br(e){return"function"===typeof e}function Vr(e,t){const i=Math.min(e.length,t.length);for(let n=0;n<i;n++)Hr(e[n],t[n])}function Hr(e,t){if(Or(t)){if(typeof e!==t)throw new Error("argument does not match constraint: typeof "+t)}else if(Br(t)){try{if(e instanceof t)return}catch(i){}if(!Wr(e)&&e.constructor===t)return;if(1===t.length&&!0===t.call(void 0,e))return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}function zr(e){let t=[],i=Object.getPrototypeOf(e);while(Object.prototype!==i)t=t.concat(Object.getOwnPropertyNames(i)),i=Object.getPrototypeOf(i);return t}function Ur(e){const t=[];for(const i of zr(e))"function"===typeof e[i]&&t.push(i);return t}function jr(e,t){const i=e=>function(){const i=Array.prototype.slice.call(arguments,0);return t(e,i)};let n={};for(const o of e)n[o]=i(o);return n}function Kr(e){return null===e?void 0:e}(function(e){function t(t){const i=new Map,n=t.path.substring(t.path.indexOf(";")+1,t.path.lastIndexOf(";"));n.split(";").forEach(e=>{const[t,n]=e.split(":");t&&n&&i.set(t,n)});const o=t.path.substring(0,t.path.indexOf(";"));return o&&i.set(e.META_DATA_MIME,o),i}e.META_DATA_LABEL="label",e.META_DATA_DESCRIPTION="description",e.META_DATA_SIZE="size",e.META_DATA_MIME="mime",e.parseMetaData=t})(Ir||(Ir={}));const qr=zi("commandService"),$r=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new Ve,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(e,t){if(!e)throw new Error("invalid command");if("string"===typeof e){if(!t)throw new Error("invalid command");return this.registerCommand({id:e,handler:t})}if(e.description){const t=[];for(let n of e.description.args)t.push(n.constraint);const i=e.handler;e.handler=function(e,...n){return Vr(n,t),i(e,...n)}}const{id:i}=e;let n=this._commands.get(i);n||(n=new Pe,this._commands.set(i,n));let o=n.unshift(e),r=Me(()=>{o();const e=this._commands.get(i);(null===e||void 0===e?void 0:e.isEmpty())&&this._commands.delete(i)});return this._onDidRegisterCommand.fire(i),r}registerCommandAlias(e,t){return $r.registerCommand(e,(e,...i)=>e.get(qr).executeCommand(t,...i))}getCommand(e){const t=this._commands.get(e);if(t&&!t.isEmpty())return ye.first(t)}getCommands(){const e=new Map;for(const t of this._commands.keys()){const i=this.getCommand(t);i&&e.set(t,i)}return e}};var Gr=function(e,t,i,n){function o(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,r){function s(e){try{l(n.next(e))}catch(t){r(t)}}function a(e){try{l(n["throw"](e))}catch(t){r(t)}}function l(e){e.done?i(e.value):o(e.value).then(s,a)}l((n=n.apply(e,t||[])).next())}))};const Yr=zi("openerService");Object.freeze({_serviceBrand:void 0,registerOpener(){return Oe.None},registerValidator(){return Oe.None},registerExternalUriResolver(){return Oe.None},setExternalOpener(){},open(){return Gr(this,void 0,void 0,(function*(){return!1}))},resolveExternalUri(e){return Gr(this,void 0,void 0,(function*(){return{resolved:e,dispose(){}}}))}});function Xr(e,t){return Ht.isUri(e)?Object(yr["r"])(e.scheme,t):Object(yr["Q"])(e,t+":")}var Zr;(function(e){e[e["API"]=0]="API",e[e["USER"]=1]="USER"})(Zr||(Zr={}));var Qr=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Jr=function(e,t){return function(i,n){t(i,n,e)}},es=function(e,t,i,n){function o(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,r){function s(e){try{l(n.next(e))}catch(t){r(t)}}function a(e){try{l(n["throw"](e))}catch(t){r(t)}}function l(e){e.done?i(e.value):o(e.value).then(s,a)}l((n=n.apply(e,t||[])).next())}))};let ts=class{constructor(e){this._commandService=e}open(e){return es(this,void 0,void 0,(function*(){if(!Xr(e,Yn.command))return!1;"string"===typeof e&&(e=Ht.parse(e));let t=[];try{t=wr(decodeURIComponent(e.query))}catch(i){try{t=wr(e.query)}catch(n){}}return Array.isArray(t)||(t=[t]),yield this._commandService.executeCommand(e.path,...t),!0}))}};ts=Qr([Jr(0,qr)],ts);let is=class{constructor(e){this._editorService=e}open(e,t){return es(this,void 0,void 0,(function*(){"string"===typeof e&&(e=Ht.parse(e));let i=void 0;const n=/^L?(\d+)(?:,(\d+))?/.exec(e.fragment);return n&&(i={startLineNumber:parseInt(n[1]),startColumn:n[2]?parseInt(n[2]):1},e=e.with({fragment:""})),e.scheme===Yn.file&&(e=Tr(e)),yield this._editorService.openCodeEditor({resource:e,options:{selection:i,context:(null===t||void 0===t?void 0:t.fromUserGesture)?Zr.USER:Zr.API}},this._editorService.getFocusedCodeEditor(),null===t||void 0===t?void 0:t.openToSide),!0}))}};is=Qr([Jr(0,ji)],is);let ns=class{constructor(e,t){this._openers=new Pe,this._validators=new Pe,this._resolvers=new Pe,this._externalOpener={openExternal:e=>(Xr(e,Yn.http)||Xr(e,Yn.https)?mr(e):window.location.href=e,Promise.resolve(!0))},this._openers.push({open:(e,t)=>es(this,void 0,void 0,(function*(){return!!((null===t||void 0===t?void 0:t.openExternal)||Xr(e,Yn.mailto)||Xr(e,Yn.http)||Xr(e,Yn.https))&&(yield this._doOpenExternal(e,t),!0)}))}),this._openers.push(new ts(t)),this._openers.push(new is(e))}open(e,t){return es(this,void 0,void 0,(function*(){for(const t of this._validators.toArray())if(!(yield t.shouldOpen(e)))return!1;for(const i of this._openers.toArray()){const n=yield i.open(e,t);if(n)return!0}return!1}))}resolveExternalUri(e,t){return es(this,void 0,void 0,(function*(){for(const i of this._resolvers.toArray()){const n=yield i.resolveExternalUri(e,t);if(n)return n}return{resolved:e,dispose:()=>{}}}))}_doOpenExternal(e,t){return es(this,void 0,void 0,(function*(){const i="string"===typeof e?Ht.parse(e):e,{resolved:n}=yield this.resolveExternalUri(i,t);return"string"===typeof e&&i.toString()===n.toString()?this._externalOpener.openExternal(e):this._externalOpener.openExternal(encodeURI(n.toString(!0)))}))}dispose(){this._validators.clear()}};function os(e,t){if(!e)throw new Error(t?`Assertion failed (${t})`:"Assertion Failed")}function rs(e){if(!e||"object"!==typeof e)return e;if(e instanceof RegExp)return e;const t=Array.isArray(e)?[]:{};return Object.keys(e).forEach(i=>{e[i]&&"object"===typeof e[i]?t[i]=rs(e[i]):t[i]=e[i]}),t}function ss(e){if(!e||"object"!==typeof e)return e;const t=[e];while(t.length>0){const e=t.shift();Object.freeze(e);for(const i in e)if(as.call(e,i)){const n=e[i];"object"!==typeof n||Object.isFrozen(n)||t.push(n)}}return e}ns=Qr([Jr(0,ji),Jr(1,qr)],ns);const as=Object.prototype.hasOwnProperty;function ls(e,t,i=!0){return Ar(e)?(Ar(t)&&Object.keys(t).forEach(n=>{n in e?i&&(Ar(e[n])&&Ar(t[n])?ls(e[n],t[n],i):e[n]=t[n]):e[n]=t[n]}),e):t}function cs(e,...t){return t.forEach(t=>Object.keys(t).forEach(i=>e[i]=t[i])),e}function hs(e,t){if(e===t)return!0;if(null===e||void 0===e||null===t||void 0===t)return!1;if(typeof e!==typeof t)return!1;if("object"!==typeof e)return!1;if(Array.isArray(e)!==Array.isArray(t))return!1;let i,n;if(Array.isArray(e)){if(e.length!==t.length)return!1;for(i=0;i<e.length;i++)if(!hs(e[i],t[i]))return!1}else{const o=[];for(n in e)o.push(n);o.sort();const r=[];for(n in t)r.push(n);if(r.sort(),!hs(o,r))return!1;for(i=0;i<o.length;i++)if(!hs(e[o[i]],t[o[i]]))return!1}return!0}function ds(e,t,i){const n=t(e);return"undefined"===typeof n?i:n}const us={followsCaret:!0,ignoreCharChanges:!0,alwaysRevealFirst:!0};class gs extends Oe{constructor(e,t={}){super(),this._onDidUpdate=this._register(new Ve),this._editor=e,this._options=ls(t,us,!1),this.disposed=!1,this.nextIdx=-1,this.ranges=[],this.ignoreSelectionChange=!1,this.revealFirst=Boolean(this._options.alwaysRevealFirst),this._register(this._editor.onDidDispose(()=>this.dispose())),this._register(this._editor.onDidUpdateDiff(()=>this._onDiffUpdated())),this._options.followsCaret&&this._register(this._editor.getModifiedEditor().onDidChangeCursorPosition(e=>{this.ignoreSelectionChange||(this.nextIdx=-1)})),this._options.alwaysRevealFirst&&this._register(this._editor.getModifiedEditor().onDidChangeModel(e=>{this.revealFirst=!0})),this._init()}_init(){this._editor.getLineChanges()}_onDiffUpdated(){this._init(),this._compute(this._editor.getLineChanges()),this.revealFirst&&null!==this._editor.getLineChanges()&&(this.revealFirst=!1,this.nextIdx=-1,this.next(1))}_compute(e){this.ranges=[],e&&e.forEach(e=>{!this._options.ignoreCharChanges&&e.charChanges?e.charChanges.forEach(e=>{this.ranges.push({rhs:!0,range:new Jt(e.modifiedStartLineNumber,e.modifiedStartColumn,e.modifiedEndLineNumber,e.modifiedEndColumn)})}):this.ranges.push({rhs:!0,range:new Jt(e.modifiedStartLineNumber,1,e.modifiedStartLineNumber,1)})}),this.ranges.sort((e,t)=>e.range.getStartPosition().isBeforeOrEqual(t.range.getStartPosition())?-1:t.range.getStartPosition().isBeforeOrEqual(e.range.getStartPosition())?1:0),this._onDidUpdate.fire(this)}_initIdx(e){let t=!1,i=this._editor.getPosition();if(i){for(let n=0,o=this.ranges.length;n<o&&!t;n++){let o=this.ranges[n].range;i.isBeforeOrEqual(o.getStartPosition())&&(this.nextIdx=n+(e?0:-1),t=!0)}t||(this.nextIdx=e?0:this.ranges.length-1),this.nextIdx<0&&(this.nextIdx=this.ranges.length-1)}else this.nextIdx=0}_move(e,t){if(os(!this.disposed,"Illegal State - diff navigator has been disposed"),!this.canNavigate())return;-1===this.nextIdx?this._initIdx(e):e?(this.nextIdx+=1,this.nextIdx>=this.ranges.length&&(this.nextIdx=0)):(this.nextIdx-=1,this.nextIdx<0&&(this.nextIdx=this.ranges.length-1));let i=this.ranges[this.nextIdx];this.ignoreSelectionChange=!0;try{let e=i.range.getStartPosition();this._editor.setPosition(e),this._editor.revealPositionInCenter(e,t)}finally{this.ignoreSelectionChange=!1}}canNavigate(){return this.ranges&&this.ranges.length>0}next(e=0){this._move(!0,e)}previous(e=0){this._move(!1,e)}dispose(){super.dispose(),this.ranges=[],this.disposed=!0}}const fs=new class{constructor(){this._zoomLevel=0,this._onDidChangeZoomLevel=new Ve,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event}getZoomLevel(){return this._zoomLevel}setZoomLevel(e){e=Math.min(Math.max(-5,e),20),this._zoomLevel!==e&&(this._zoomLevel=e,this._onDidChangeZoomLevel.fire(this._zoomLevel))}},ms=r["f"]?1.5:1.35,ps=8;class _s{constructor(e){this.zoomLevel=e.zoomLevel,this.fontFamily=String(e.fontFamily),this.fontWeight=String(e.fontWeight),this.fontSize=e.fontSize,this.fontFeatureSettings=e.fontFeatureSettings,this.lineHeight=0|e.lineHeight,this.letterSpacing=e.letterSpacing}static createFromValidatedSettings(e,t,i){const n=e.get(35),o=e.get(39),r=e.get(38),s=e.get(37),a=e.get(51),l=e.get(48);return _s._create(n,o,r,s,a,l,t,i)}static _create(e,t,i,n,o,r,s,a){0===o?o=Math.round(ms*i):o<ps&&(o=ps);const l=1+(a?0:.1*fs.getZoomLevel());return i*=l,o*=l,new _s({zoomLevel:s,fontFamily:e,fontWeight:t,fontSize:i,fontFeatureSettings:n,lineHeight:o,letterSpacing:r})}getId(){return this.zoomLevel+"-"+this.fontFamily+"-"+this.fontWeight+"-"+this.fontSize+"-"+this.fontFeatureSettings+"-"+this.lineHeight+"-"+this.letterSpacing}getMassagedFontFamily(){return/[,"']/.test(this.fontFamily)?this.fontFamily:/[+ ]/.test(this.fontFamily)?`"${this.fontFamily}"`:this.fontFamily}}class bs extends _s{constructor(e,t){super(e),this.isTrusted=t,this.isMonospace=e.isMonospace,this.typicalHalfwidthCharacterWidth=e.typicalHalfwidthCharacterWidth,this.typicalFullwidthCharacterWidth=e.typicalFullwidthCharacterWidth,this.canUseHalfwidthRightwardsArrow=e.canUseHalfwidthRightwardsArrow,this.spaceWidth=e.spaceWidth,this.middotWidth=e.middotWidth,this.wsmiddotWidth=e.wsmiddotWidth,this.maxDigitWidth=e.maxDigitWidth}equals(e){return this.fontFamily===e.fontFamily&&this.fontWeight===e.fontWeight&&this.fontSize===e.fontSize&&this.fontFeatureSettings===e.fontFeatureSettings&&this.lineHeight===e.lineHeight&&this.letterSpacing===e.letterSpacing&&this.typicalHalfwidthCharacterWidth===e.typicalHalfwidthCharacterWidth&&this.typicalFullwidthCharacterWidth===e.typicalFullwidthCharacterWidth&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.spaceWidth===e.spaceWidth&&this.middotWidth===e.middotWidth&&this.wsmiddotWidth===e.wsmiddotWidth&&this.maxDigitWidth===e.maxDigitWidth}}function vs(e){return e&&"string"===typeof e.id}const ws={ICodeEditor:"vs.editor.ICodeEditor",IDiffEditor:"vs.editor.IDiffEditor"};var Cs,ys;(function(e){e[e["Left"]=1]="Left",e[e["Center"]=2]="Center",e[e["Right"]=4]="Right",e[e["Full"]=7]="Full"})(Cs||(Cs={})),function(e){e[e["Inline"]=1]="Inline",e[e["Gutter"]=2]="Gutter"}(ys||(ys={}));class Ss{constructor(e){this.tabSize=Math.max(1,0|e.tabSize),this.indentSize=0|e.tabSize,this.insertSpaces=Boolean(e.insertSpaces),this.defaultEOL=0|e.defaultEOL,this.trimAutoWhitespace=Boolean(e.trimAutoWhitespace)}equals(e){return this.tabSize===e.tabSize&&this.indentSize===e.indentSize&&this.insertSpaces===e.insertSpaces&&this.defaultEOL===e.defaultEOL&&this.trimAutoWhitespace===e.trimAutoWhitespace}createChangeEvent(e){return{tabSize:this.tabSize!==e.tabSize,indentSize:this.indentSize!==e.indentSize,insertSpaces:this.insertSpaces!==e.insertSpaces,trimAutoWhitespace:this.trimAutoWhitespace!==e.trimAutoWhitespace}}}class xs{constructor(e,t){this.range=e,this.matches=t}}class Ls{constructor(e,t,i,n,o,r){this.identifier=e,this.range=t,this.text=i,this.forceMoveMarkers=n,this.isAutoWhitespaceEdit=o,this._isTracked=r}}class ks{constructor(e,t,i){this.reverseEdits=e,this.changes=t,this.trimAutoWhitespaceLineNumbers=i}}class Es{constructor(e,t){this[Symbol.toStringTag]="ResourceMap",e instanceof Es?(this.map=new Map(e.map),this.toKey=null!==t&&void 0!==t?t:Es.defaultToKey):(this.map=new Map,this.toKey=null!==e&&void 0!==e?e:Es.defaultToKey)}set(e,t){return this.map.set(this.toKey(e),t),this}get(e){return this.map.get(this.toKey(e))}has(e){return this.map.has(this.toKey(e))}get size(){return this.map.size}clear(){this.map.clear()}delete(e){return this.map.delete(this.toKey(e))}forEach(e,t){"undefined"!==typeof t&&(e=e.bind(t));for(let[i,n]of this.map)e(n,Ht.parse(i),this)}values(){return this.map.values()}*keys(){for(let e of this.map.keys())yield Ht.parse(e)}*entries(){for(let e of this.map.entries())yield[Ht.parse(e[0]),e[1]]}*[Symbol.iterator](){for(let e of this.map)yield[Ht.parse(e[0]),e[1]]}}Es.defaultToKey=e=>e.toString();class Ds{constructor(){this[Symbol.toStringTag]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){var e;return null===(e=this._head)||void 0===e?void 0:e.value}get last(){var e;return null===(e=this._tail)||void 0===e?void 0:e.value}has(e){return this._map.has(e)}get(e,t=0){const i=this._map.get(e);if(i)return 0!==t&&this.touch(i,t),i.value}set(e,t,i=0){let n=this._map.get(e);if(n)n.value=t,0!==i&&this.touch(n,i);else{switch(n={key:e,value:t,next:void 0,previous:void 0},i){case 0:this.addItemLast(n);break;case 1:this.addItemFirst(n);break;case 2:this.addItemLast(n);break;default:this.addItemLast(n);break}this._map.set(e,n),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){const t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){const i=this._state;let n=this._head;while(n){if(t?e.bind(t)(n.value,n.key,this):e(n.value,n.key,this),this._state!==i)throw new Error("LinkedMap got modified during iteration.");n=n.next}}keys(){const e=this,t=this._state;let i=this._head;const n={[Symbol.iterator](){return n},next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(i){const e={value:i.key,done:!1};return i=i.next,e}return{value:void 0,done:!0}}};return n}values(){const e=this,t=this._state;let i=this._head;const n={[Symbol.iterator](){return n},next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(i){const e={value:i.value,done:!1};return i=i.next,e}return{value:void 0,done:!0}}};return n}entries(){const e=this,t=this._state;let i=this._head;const n={[Symbol.iterator](){return n},next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(i){const e={value:[i.key,i.value],done:!1};return i=i.next,e}return{value:void 0,done:!0}}};return n}[Symbol.iterator](){return this.entries()}trimOld(e){if(e>=this.size)return;if(0===e)return void this.clear();let t=this._head,i=this.size;while(t&&i>e)this._map.delete(t.key),t=t.next,i--;this._head=t,this._size=i,t&&(t.previous=void 0),this._state++}addItemFirst(e){if(this._head||this._tail){if(!this._head)throw new Error("Invalid list");e.next=this._head,this._head.previous=e}else this._tail=e;this._head=e,this._state++}addItemLast(e){if(this._head||this._tail){if(!this._tail)throw new Error("Invalid list");e.previous=this._tail,this._tail.next=e}else this._head=e;this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{const t=e.next,i=e.previous;if(!t||!i)throw new Error("Invalid list");t.previous=i,i.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(1===t||2===t)if(1===t){if(e===this._head)return;const t=e.next,i=e.previous;e===this._tail?(i.next=void 0,this._tail=i):(t.previous=i,i.next=t),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(2===t){if(e===this._tail)return;const t=e.next,i=e.previous;e===this._head?(t.previous=void 0,this._head=t):(t.previous=i,i.next=t),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}toJSON(){const e=[];return this.forEach((t,i)=>{e.push([i,t])}),e}fromJSON(e){this.clear();for(const[t,i]of e)this.set(t,i)}}class Ns extends Ds{constructor(e,t=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get(e,t=2){return super.get(e,t)}peek(e){return super.get(e,0)}set(e,t){return super.set(e,t,2),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}}const Ts="**",Ms="/",Is="[/\\\\]",Os="[^/\\\\]",As=/\//g;function Rs(e){switch(e){case 0:return"";case 1:return Os+"*?";default:return`(?:${Is}|${Os}+${Is}|${Is}${Os}+)*?`}}function Ps(e,t){if(!e)return[];const i=[];let n=!1,o=!1,r="";for(const s of e){switch(s){case t:if(!n&&!o){i.push(r),r="";continue}break;case"{":n=!0;break;case"}":n=!1;break;case"[":o=!0;break;case"]":o=!1;break}r+=s}return r&&i.push(r),i}function Fs(e){if(!e)return"";let t="";const i=Ps(e,Ms);if(i.every(e=>e===Ts))t=".*";else{let e=!1;i.forEach((n,o)=>{if(n===Ts)return void(e||(t+=Rs(2),e=!0));let r=!1,s="",a=!1,l="";for(const e of n)if("}"!==e&&r)s+=e;else if(!a||"]"===e&&l)switch(e){case"{":r=!0;continue;case"[":a=!0;continue;case"}":const i=Ps(s,","),n=`(?:${i.map(e=>Fs(e)).join("|")})`;t+=n,r=!1,s="";break;case"]":t+="["+l+"]",a=!1,l="";break;case"?":t+=Os;continue;case"*":t+=Rs(1);continue;default:t+=yr["t"](e)}else{let t;t="-"===e?e:"^"!==e&&"!"!==e||l?e===Ms?"":yr["t"](e):"^",l+=t}o<i.length-1&&(i[o+1]!==Ts||o+2<i.length)&&(t+=Is),e=!1})}return t}const Ws=/^\*\*\/\*\.[\w\.-]+$/,Bs=/^\*\*\/([\w\.-]+)\/?$/,Vs=/^{\*\*\/[\*\.]?[\w\.-]+\/?(,\*\*\/[\*\.]?[\w\.-]+\/?)*}$/,Hs=/^{\*\*\/[\*\.]?[\w\.-]+(\/(\*\*)?)?(,\*\*\/[\*\.]?[\w\.-]+(\/(\*\*)?)?)*}$/,zs=/^\*\*((\/[\w\.-]+)+)\/?$/,Us=/^([\w\.-]+(\/[\w\.-]+)*)\/?$/,js=new Ns(1e4),Ks=function(){return!1},qs=function(){return null};function $s(e,t){if(!e)return qs;let i;i="string"!==typeof e?e.pattern:e,i=i.trim();const n=`${i}_${!!t.trimForExclusions}`;let o,r=js.get(n);if(r)return Gs(r,e);if(Ws.test(i)){const e=i.substr(4);r=function(t,n){return"string"===typeof t&&t.endsWith(e)?i:null}}else r=(o=Bs.exec(Ys(i,t)))?Xs(o[1],i):(t.trimForExclusions?Hs:Vs).test(i)?Zs(i,t):(o=zs.exec(Ys(i,t)))?Qs(o[1].substr(1),i,!0):(o=Us.exec(Ys(i,t)))?Qs(o[1],i,!1):Js(i);return js.set(n,r),Gs(r,e)}function Gs(e,t){return"string"===typeof t?e:function(i,n){return xr(i,t.base)?e(Et(t.base,i),n):null}}function Ys(e,t){return t.trimForExclusions&&e.endsWith("/**")?e.substr(0,e.length-2):e}function Xs(e,t){const i="/"+e,n="\\"+e,o=function(o,r){return"string"!==typeof o?null:r?r===e?t:null:o===e||o.endsWith(i)||o.endsWith(n)?t:null},r=[e];return o.basenames=r,o.patterns=[t],o.allBasenames=r,o}function Zs(e,t){const i=ra(e.slice(1,-1).split(",").map(e=>$s(e,t)).filter(e=>e!==qs),e),n=i.length;if(!n)return qs;if(1===n)return i[0];const o=function(t,n){for(let o=0,r=i.length;o<r;o++)if(i[o](t,n))return e;return null},r=Kn(i,e=>!!e.allBasenames);r&&(o.allBasenames=r.allBasenames);const s=i.reduce((e,t)=>t.allPaths?e.concat(t.allPaths):e,[]);return s.length&&(o.allPaths=s),o}function Qs(e,t,i){const n=Mt!==xt.sep?e.replace(As,Mt):e,o=Mt+n,r=i?function(e,i){return"string"!==typeof e||e!==n&&!e.endsWith(o)?null:t}:function(e,i){return"string"===typeof e&&e===n?t:null};return r.allPaths=[(i?"*/":"./")+e],r}function Js(e){try{const t=new RegExp(`^${Fs(e)}$`);return function(i){return t.lastIndex=0,"string"===typeof i&&t.test(i)?e:null}}catch(t){return qs}}function ea(e,t,i){return!(!e||"string"!==typeof t)&&ta(e)(t,void 0,i)}function ta(e,t={}){if(!e)return Ks;if("string"===typeof e||ia(e)){const i=$s(e,t);if(i===qs)return Ks;const n=function(e,t){return!!i(e,t)};return i.allBasenames&&(n.allBasenames=i.allBasenames),i.allPaths&&(n.allPaths=i.allPaths),n}return na(e,t)}function ia(e){const t=e;return t&&"string"===typeof t.base&&"string"===typeof t.pattern}function na(e,t){const i=ra(Object.getOwnPropertyNames(e).map(i=>oa(i,e[i],t)).filter(e=>e!==qs)),n=i.length;if(!n)return qs;if(!i.some(e=>!!e.requiresSiblings)){if(1===n)return i[0];const e=function(e,t){for(let n=0,o=i.length;n<o;n++){const o=i[n](e,t);if(o)return o}return null},t=Kn(i,e=>!!e.allBasenames);t&&(e.allBasenames=t.allBasenames);const o=i.reduce((e,t)=>t.allPaths?e.concat(t.allPaths):e,[]);return o.length&&(e.allPaths=o),e}const o=function(e,t,n){let o=void 0;for(let r=0,s=i.length;r<s;r++){const s=i[r];s.requiresSiblings&&n&&(t||(t=Nt(e)),o||(o=t.substr(0,t.length-Tt(e).length)));const a=s(e,t,o,n);if(a)return a}return null},r=Kn(i,e=>!!e.allBasenames);r&&(o.allBasenames=r.allBasenames);const s=i.reduce((e,t)=>t.allPaths?e.concat(t.allPaths):e,[]);return s.length&&(o.allPaths=s),o}function oa(e,t,i){if(!1===t)return qs;const n=$s(e,i);if(n===qs)return qs;if("boolean"===typeof t)return n;if(t){const i=t.when;if("string"===typeof i){const t=(t,o,r,s)=>{if(!s||!n(t,o))return null;const a=i.replace("$(basename)",r),l=s(a);return Sn(l)?l.then(t=>t?e:null):l?e:null};return t.requiresSiblings=!0,t}}return n}function ra(e,t){const i=e.filter(e=>!!e.basenames);if(i.length<2)return e;const n=i.reduce((e,t)=>{const i=t.basenames;return i?e.concat(i):e},[]);let o;if(t){o=[];for(let e=0,i=n.length;e<i;e++)o.push(t)}else o=i.reduce((e,t)=>{const i=t.patterns;return i?e.concat(i):e},[]);const r=function(e,t){if("string"!==typeof e)return null;if(!t){let i;for(i=e.length;i>0;i--){const t=e.charCodeAt(i-1);if(47===t||92===t)break}t=e.substr(i)}const i=n.indexOf(t);return-1!==i?o[i]:null};r.basenames=n,r.patterns=o,r.allBasenames=n;const s=e.filter(e=>!e.basenames);return s.push(r),s}function sa(e,t,i,n){if(Array.isArray(e)){let o=0;for(const r of e){const e=sa(r,t,i,n);if(10===e)return e;e>o&&(o=e)}return o}if("string"===typeof e)return n?"*"===e?5:e===i?10:0:0;if(e){const{language:o,pattern:r,scheme:s,hasAccessToAllModels:a}=e;if(!n&&!a)return 0;let l=0;if(s)if(s===t.scheme)l=10;else{if("*"!==s)return 0;l=5}if(o)if(o===i)l=10;else{if("*"!==o)return 0;l=Math.max(l,5)}if(r){let e;if(e="string"===typeof r?r:Object.assign(Object.assign({},r),{base:Lt(r.base)}),e!==t.fsPath&&!ea(e,t.fsPath))return 0;l=10}return l}return 0}const aa=zi("modelService");function la(e){return!e.isTooLargeForSyncing()&&!e.isForSimpleWidget}function ca(e){return"string"!==typeof e&&(Array.isArray(e)?e.every(ca):!!e.exclusive)}class ha{constructor(){this._clock=0,this._entries=[],this._onDidChange=new Ve}get onDidChange(){return this._onDidChange.event}register(e,t){let i={selector:e,provider:t,_score:-1,_time:this._clock++};return this._entries.push(i),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),Me(()=>{if(i){let e=this._entries.indexOf(i);e>=0&&(this._entries.splice(e,1),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),i=void 0)}})}has(e){return this.all(e).length>0}all(e){if(!e)return[];this._updateScores(e);const t=[];for(let i of this._entries)i._score>0&&t.push(i.provider);return t}ordered(e){const t=[];return this._orderedForEach(e,e=>t.push(e.provider)),t}orderedGroups(e){const t=[];let i,n;return this._orderedForEach(e,e=>{i&&n===e._score?i.push(e.provider):(n=e._score,i=[e.provider],t.push(i))}),t}_orderedForEach(e,t){if(e){this._updateScores(e);for(const e of this._entries)e._score>0&&t(e)}}_updateScores(e){let t={uri:e.uri.toString(),language:e.getLanguageIdentifier().language};if(!this._lastCandidate||this._lastCandidate.language!==t.language||this._lastCandidate.uri!==t.uri){this._lastCandidate=t;for(let t of this._entries)if(t._score=sa(t.selector,e.uri,e.getLanguageIdentifier().language,la(e)),ca(t.selector)&&t._score>0){for(let e of this._entries)e._score=0;t._score=1e3;break}this._entries.sort(ha._compareByScoreAndTime)}}static _compareByScoreAndTime(e,t){return e._score<t._score?1:e._score>t._score?-1:e._time<t._time?1:e._time>t._time?-1:0}}class da{constructor(){this._map=new Map,this._promises=new Map,this._onDidChange=new Ve,this.onDidChange=this._onDidChange.event,this._colorMap=null}fire(e){this._onDidChange.fire({changedLanguages:e,changedColorMap:!1})}register(e,t){return this._map.set(e,t),this.fire([e]),Me(()=>{this._map.get(e)===t&&(this._map.delete(e),this.fire([e]))})}registerPromise(e,t){let i=null,n=!1;return this._promises.set(e,t.then(t=>{this._promises.delete(e),!n&&t&&(i=this.register(e,t))})),Me(()=>{n=!0,i&&i.dispose()})}getPromise(e){const t=this.get(e);if(t)return Promise.resolve(t);const i=this._promises.get(e);return i?i.then(t=>this.get(e)):null}get(e){return this._map.get(e)||null}setColorMap(e){this._colorMap=e,this._onDidChange.fire({changedLanguages:Array.from(this._map.keys()),changedColorMap:!0})}getColorMap(){return this._colorMap}getDefaultBackground(){return this._colorMap&&this._colorMap.length>2?this._colorMap[2]:null}}function ua(...e){return function(t,i){for(let n=0,o=e.length;n<o;n++){const o=e[n](t,i);if(o)return o}return null}}const ga=fa.bind(void 0,!0);function fa(e,t,i){if(!i||i.length<t.length)return null;let n;return n=e?yr["Q"](i,t):0===i.indexOf(t),n?t.length>0?[{start:0,end:t.length}]:[]:null}function ma(e,t){const i=t.toLowerCase().indexOf(e.toLowerCase());return-1===i?null:[{start:i,end:i+e.length}]}function pa(e,t){return _a(e.toLowerCase(),t.toLowerCase(),0,0)}function _a(e,t,i,n){if(i===e.length)return[];if(n===t.length)return null;if(e[i]===t[n]){let o=null;return(o=_a(e,t,i+1,n+1))?xa({start:n,end:n+1},o):null}return _a(e,t,i,n+1)}function ba(e){return 97<=e&&e<=122}function va(e){return 65<=e&&e<=90}function wa(e){return 48<=e&&e<=57}function Ca(e){return 32===e||9===e||10===e||13===e}const ya=new Set;function Sa(e){return ba(e)||va(e)||wa(e)}function xa(e,t){return 0===t.length?t=[e]:e.end===t[0].start?t[0].start=e.start:t.unshift(e),t}function La(e,t){for(let i=t;i<e.length;i++){const t=e.charCodeAt(i);if(va(t)||wa(t)||i>0&&!Sa(e.charCodeAt(i-1)))return i}return e.length}function ka(e,t,i,n){if(i===e.length)return[];if(n===t.length)return null;if(e[i]!==t[n].toLowerCase())return null;{let o=null,r=n+1;o=ka(e,t,i+1,n+1);while(!o&&(r=La(t,r))<t.length)o=ka(e,t,i+1,r),r++;return null===o?null:xa({start:n,end:n+1},o)}}function Ea(e){let t=0,i=0,n=0,o=0,r=0;for(let h=0;h<e.length;h++)r=e.charCodeAt(h),va(r)&&t++,ba(r)&&i++,Sa(r)&&n++,wa(r)&&o++;const s=t/e.length,a=i/e.length,l=n/e.length,c=o/e.length;return{upperPercent:s,lowerPercent:a,alphaPercent:l,numericPercent:c}}function Da(e){const{upperPercent:t,lowerPercent:i}=e;return 0===i&&t>.6}function Na(e){const{upperPercent:t,lowerPercent:i,alphaPercent:n,numericPercent:o}=e;return i>.2&&t<.8&&n>.6&&o<.2}function Ta(e){let t=0,i=0,n=0,o=0;for(let r=0;r<e.length;r++)n=e.charCodeAt(r),va(n)&&t++,ba(n)&&i++,Ca(n)&&o++;return 0!==t&&0!==i||0!==o?t<=5:e.length<=30}function Ma(e,t){if(!t)return null;if(t=t.trim(),0===t.length)return null;if(!Ta(e))return null;if(t.length>60)return null;const i=Ea(t);if(!Na(i)){if(!Da(i))return null;t=t.toLowerCase()}let n=null,o=0;e=e.toLowerCase();while(o<t.length&&null===(n=ka(e,t,0,o)))o=La(t,o+1);return n}"`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?".split("").forEach(e=>ya.add(e.charCodeAt(0)));const Ia=ua(ga,Ma,ma),Oa=ua(ga,Ma,pa),Aa=new Ns(1e4);function Ra(e,t,i=!1){if("string"!==typeof e||"string"!==typeof t)return null;let n=Aa.get(e);n||(n=new RegExp(yr["n"](e),"i"),Aa.set(e,n));const o=n.exec(t);return o?[{start:o.index,end:o.index+o[0].length}]:i?Oa(e,t):Ia(e,t)}const Pa=128;function Fa(){const e=[],t=[0];for(let i=1;i<=Pa;i++)t.push(-i);for(let i=0;i<=Pa;i++){const n=t.slice(0);n[0]=-i,e.push(n)}return e}const Wa=Fa(),Ba=Fa(),Va=Fa(),Ha=!1;function za(e,t,i,n,o){function r(e,t,i=" "){while(e.length<t)e=i+e;return e}let s=` | |${n.split("").map(e=>r(e,3)).join("|")}\n`;for(let a=0;a<=i;a++)s+=0===a?" |":t[a-1]+"|",s+=e[a].slice(0,o+1).map(e=>r(e.toString(),3)).join("|")+"\n";return s}function Ua(e,t,i,n){e=e.substr(t),i=i.substr(n),console.log(za(Wa,e,e.length,i,i.length)),console.log(za(Va,e,e.length,i,i.length)),console.log(za(Ba,e,e.length,i,i.length))}function ja(e,t){if(t<0||t>=e.length)return!1;const i=e.charCodeAt(t);switch(i){case 95:case 45:case 46:case 32:case 47:case 92:case 39:case 34:case 58:case 36:return!0;default:return!1}}function Ka(e,t){if(t<0||t>=e.length)return!1;const i=e.charCodeAt(t);switch(i){case 32:case 9:return!0;default:return!1}}function qa(e,t,i){return t[e]!==i[e]}function $a(e,t,i,n,o,r){while(t<i&&o<r)e[t]===n[o]&&(t+=1),o+=1;return t===i}var Ga;function Ya(e,t,i,n,o,r,s){const a=e.length>Pa?Pa:e.length,l=n.length>Pa?Pa:n.length;if(i>=a||r>=l||a-i>l-r)return;if(!$a(t,i,a,o,r,l))return;let c=1,h=1,d=i,u=r,g=!1;for(c=1,d=i;d<a;c++,d++)for(h=1,u=r;u<l;h++,u++){const r=Xa(e,t,d,i,n,o,u);d===i&&r>1&&(g=!0),Ba[c][h]=r;const s=Wa[c-1][h-1]+(r>1?1:r),a=Wa[c-1][h]+-1,l=Wa[c][h-1]+-1;l>=a?l>s?(Wa[c][h]=l,Va[c][h]=4):l===s?(Wa[c][h]=l,Va[c][h]=6):(Wa[c][h]=s,Va[c][h]=2):a>s?(Wa[c][h]=a,Va[c][h]=1):a===s?(Wa[c][h]=a,Va[c][h]=3):(Wa[c][h]=s,Va[c][h]=2)}return Ha&&Ua(e,i,n,r),(g||s)&&(Za=0,Ja=-100,el=r,tl=s,il(c-1,h-1,a===l?1:0,0,!1),0!==Za)?[Ja,Qa,r]:void 0}function Xa(e,t,i,n,o,r,s){return t[i]!==r[s]?-1:s===i-n?e[i]===o[s]?7:5:!qa(s,o,r)||0!==s&&qa(s-1,o,r)?!ja(r,s)||0!==s&&ja(r,s-1)?ja(r,s-1)||Ka(r,s-1)?5:1:5:e[i]===o[s]?7:5}(function(e){function t(e){return!e||-100===e[0]&&0===e[1]&&0===e[2]}e.Default=Object.freeze([-100,0,0]),e.isDefault=t})(Ga||(Ga={}));let Za=0,Qa=0,Ja=0,el=0,tl=!1;function il(e,t,i,n,o){if(Za>=10||i<-25)return;let r=0;while(e>0&&t>0){const s=Ba[e][t],a=Va[e][t];if(4===a)t-=1,o?i-=5:0!==n&&(i-=1),o=!1,r=0;else{if(!(2&a))return;if(4&a&&il(e,t-1,0!==n?i-1:i,n,o),i+=s,e-=1,t-=1,o=!0,n+=Math.pow(2,t+el),1===s){if(r+=1,0===e&&!tl)return}else i+=1+r*(s-1),r=0}}i-=t>=3?9:3*t,Za+=1,i>Ja&&(Ja=i,Qa=n)}const nl="$(";function ol(e){const t=e.indexOf(nl);return-1===t?{text:e}:rl(e,t)}function rl(e,t){const i=[];let n="";function o(e){if(e){n+=e;for(const t of e)i.push(c)}}let r,s,a=-1,l="",c=0,h=t;const d=e.length;o(e.substr(0,t));while(h<d){if(r=e[h],s=e[h+1],r===nl[0]&&s===nl[1])a=h,o(l),l=nl,h++;else if(")"===r&&-1!==a){const e=h-a+1;c+=e,a=-1,l=""}else-1!==a?/^[a-z0-9\-]$/i.test(r)?l+=r:(o(l),a=-1,l=""):o(r);h++}return o(l),{text:n,codiconOffsets:i}}function sl(e,t,i=!1){const{text:n,codiconOffsets:o}=t;if(!o||0===o.length)return Ra(e,n,i);const r=Object(yr["I"])(n," "),s=n.length-r.length,a=Ra(e,r,i);if(a)for(const l of a){const e=o[l.start+s]+s;l.start+=e,l.end+=e}return a}class al{constructor(){this._icons=new Map,this._onDidRegister=new Ve}add(e){this._icons.has(e.id)?console.error("Duplicate registration of codicon "+e.id):(this._icons.set(e.id,e),this._onDidRegister.fire(e))}get(e){return this._icons.get(e)}get all(){return this._icons.values()}get onDidRegister(){return this._onDidRegister.event}}const ll=new al,cl=ll;function hl(e,t,i){return new dl(e,t)}class dl{constructor(e,t,i){this.id=e,this.definition=t,this.description=i,ll.add(this)}get classNames(){return"codicon codicon-"+this.id}get cssSelector(){return".codicon.codicon-"+this.id}}(function(e){e.add=new e("add",{character:"\\ea60"}),e.plus=new e("plus",{character:"\\ea60"}),e.gistNew=new e("gist-new",{character:"\\ea60"}),e.repoCreate=new e("repo-create",{character:"\\ea60"}),e.lightbulb=new e("lightbulb",{character:"\\ea61"}),e.lightBulb=new e("light-bulb",{character:"\\ea61"}),e.repo=new e("repo",{character:"\\ea62"}),e.repoDelete=new e("repo-delete",{character:"\\ea62"}),e.gistFork=new e("gist-fork",{character:"\\ea63"}),e.repoForked=new e("repo-forked",{character:"\\ea63"}),e.gitPullRequest=new e("git-pull-request",{character:"\\ea64"}),e.gitPullRequestAbandoned=new e("git-pull-request-abandoned",{character:"\\ea64"}),e.recordKeys=new e("record-keys",{character:"\\ea65"}),e.keyboard=new e("keyboard",{character:"\\ea65"}),e.tag=new e("tag",{character:"\\ea66"}),e.tagAdd=new e("tag-add",{character:"\\ea66"}),e.tagRemove=new e("tag-remove",{character:"\\ea66"}),e.person=new e("person",{character:"\\ea67"}),e.personAdd=new e("person-add",{character:"\\ea67"}),e.personFollow=new e("person-follow",{character:"\\ea67"}),e.personOutline=new e("person-outline",{character:"\\ea67"}),e.personFilled=new e("person-filled",{character:"\\ea67"}),e.gitBranch=new e("git-branch",{character:"\\ea68"}),e.gitBranchCreate=new e("git-branch-create",{character:"\\ea68"}),e.gitBranchDelete=new e("git-branch-delete",{character:"\\ea68"}),e.sourceControl=new e("source-control",{character:"\\ea68"}),e.mirror=new e("mirror",{character:"\\ea69"}),e.mirrorPublic=new e("mirror-public",{character:"\\ea69"}),e.star=new e("star",{character:"\\ea6a"}),e.starAdd=new e("star-add",{character:"\\ea6a"}),e.starDelete=new e("star-delete",{character:"\\ea6a"}),e.starEmpty=new e("star-empty",{character:"\\ea6a"}),e.comment=new e("comment",{character:"\\ea6b"}),e.commentAdd=new e("comment-add",{character:"\\ea6b"}),e.alert=new e("alert",{character:"\\ea6c"}),e.warning=new e("warning",{character:"\\ea6c"}),e.search=new e("search",{character:"\\ea6d"}),e.searchSave=new e("search-save",{character:"\\ea6d"}),e.logOut=new e("log-out",{character:"\\ea6e"}),e.signOut=new e("sign-out",{character:"\\ea6e"}),e.logIn=new e("log-in",{character:"\\ea6f"}),e.signIn=new e("sign-in",{character:"\\ea6f"}),e.eye=new e("eye",{character:"\\ea70"}),e.eyeUnwatch=new e("eye-unwatch",{character:"\\ea70"}),e.eyeWatch=new e("eye-watch",{character:"\\ea70"}),e.circleFilled=new e("circle-filled",{character:"\\ea71"}),e.primitiveDot=new e("primitive-dot",{character:"\\ea71"}),e.closeDirty=new e("close-dirty",{character:"\\ea71"}),e.debugBreakpoint=new e("debug-breakpoint",{character:"\\ea71"}),e.debugBreakpointDisabled=new e("debug-breakpoint-disabled",{character:"\\ea71"}),e.debugHint=new e("debug-hint",{character:"\\ea71"}),e.primitiveSquare=new e("primitive-square",{character:"\\ea72"}),e.edit=new e("edit",{character:"\\ea73"}),e.pencil=new e("pencil",{character:"\\ea73"}),e.info=new e("info",{character:"\\ea74"}),e.issueOpened=new e("issue-opened",{character:"\\ea74"}),e.gistPrivate=new e("gist-private",{character:"\\ea75"}),e.gitForkPrivate=new e("git-fork-private",{character:"\\ea75"}),e.lock=new e("lock",{character:"\\ea75"}),e.mirrorPrivate=new e("mirror-private",{character:"\\ea75"}),e.close=new e("close",{character:"\\ea76"}),e.removeClose=new e("remove-close",{character:"\\ea76"}),e.x=new e("x",{character:"\\ea76"}),e.repoSync=new e("repo-sync",{character:"\\ea77"}),e.sync=new e("sync",{character:"\\ea77"}),e.clone=new e("clone",{character:"\\ea78"}),e.desktopDownload=new e("desktop-download",{character:"\\ea78"}),e.beaker=new e("beaker",{character:"\\ea79"}),e.microscope=new e("microscope",{character:"\\ea79"}),e.vm=new e("vm",{character:"\\ea7a"}),e.deviceDesktop=new e("device-desktop",{character:"\\ea7a"}),e.file=new e("file",{character:"\\ea7b"}),e.fileText=new e("file-text",{character:"\\ea7b"}),e.more=new e("more",{character:"\\ea7c"}),e.ellipsis=new e("ellipsis",{character:"\\ea7c"}),e.kebabHorizontal=new e("kebab-horizontal",{character:"\\ea7c"}),e.mailReply=new e("mail-reply",{character:"\\ea7d"}),e.reply=new e("reply",{character:"\\ea7d"}),e.organization=new e("organization",{character:"\\ea7e"}),e.organizationFilled=new e("organization-filled",{character:"\\ea7e"}),e.organizationOutline=new e("organization-outline",{character:"\\ea7e"}),e.newFile=new e("new-file",{character:"\\ea7f"}),e.fileAdd=new e("file-add",{character:"\\ea7f"}),e.newFolder=new e("new-folder",{character:"\\ea80"}),e.fileDirectoryCreate=new e("file-directory-create",{character:"\\ea80"}),e.trash=new e("trash",{character:"\\ea81"}),e.trashcan=new e("trashcan",{character:"\\ea81"}),e.history=new e("history",{character:"\\ea82"}),e.clock=new e("clock",{character:"\\ea82"}),e.folder=new e("folder",{character:"\\ea83"}),e.fileDirectory=new e("file-directory",{character:"\\ea83"}),e.symbolFolder=new e("symbol-folder",{character:"\\ea83"}),e.logoGithub=new e("logo-github",{character:"\\ea84"}),e.markGithub=new e("mark-github",{character:"\\ea84"}),e.github=new e("github",{character:"\\ea84"}),e.terminal=new e("terminal",{character:"\\ea85"}),e.console=new e("console",{character:"\\ea85"}),e.repl=new e("repl",{character:"\\ea85"}),e.zap=new e("zap",{character:"\\ea86"}),e.symbolEvent=new e("symbol-event",{character:"\\ea86"}),e.error=new e("error",{character:"\\ea87"}),e.stop=new e("stop",{character:"\\ea87"}),e.variable=new e("variable",{character:"\\ea88"}),e.symbolVariable=new e("symbol-variable",{character:"\\ea88"}),e.array=new e("array",{character:"\\ea8a"}),e.symbolArray=new e("symbol-array",{character:"\\ea8a"}),e.symbolModule=new e("symbol-module",{character:"\\ea8b"}),e.symbolPackage=new e("symbol-package",{character:"\\ea8b"}),e.symbolNamespace=new e("symbol-namespace",{character:"\\ea8b"}),e.symbolObject=new e("symbol-object",{character:"\\ea8b"}),e.symbolMethod=new e("symbol-method",{character:"\\ea8c"}),e.symbolFunction=new e("symbol-function",{character:"\\ea8c"}),e.symbolConstructor=new e("symbol-constructor",{character:"\\ea8c"}),e.symbolBoolean=new e("symbol-boolean",{character:"\\ea8f"}),e.symbolNull=new e("symbol-null",{character:"\\ea8f"}),e.symbolNumeric=new e("symbol-numeric",{character:"\\ea90"}),e.symbolNumber=new e("symbol-number",{character:"\\ea90"}),e.symbolStructure=new e("symbol-structure",{character:"\\ea91"}),e.symbolStruct=new e("symbol-struct",{character:"\\ea91"}),e.symbolParameter=new e("symbol-parameter",{character:"\\ea92"}),e.symbolTypeParameter=new e("symbol-type-parameter",{character:"\\ea92"}),e.symbolKey=new e("symbol-key",{character:"\\ea93"}),e.symbolText=new e("symbol-text",{character:"\\ea93"}),e.symbolReference=new e("symbol-reference",{character:"\\ea94"}),e.goToFile=new e("go-to-file",{character:"\\ea94"}),e.symbolEnum=new e("symbol-enum",{character:"\\ea95"}),e.symbolValue=new e("symbol-value",{character:"\\ea95"}),e.symbolRuler=new e("symbol-ruler",{character:"\\ea96"}),e.symbolUnit=new e("symbol-unit",{character:"\\ea96"}),e.activateBreakpoints=new e("activate-breakpoints",{character:"\\ea97"}),e.archive=new e("archive",{character:"\\ea98"}),e.arrowBoth=new e("arrow-both",{character:"\\ea99"}),e.arrowDown=new e("arrow-down",{character:"\\ea9a"}),e.arrowLeft=new e("arrow-left",{character:"\\ea9b"}),e.arrowRight=new e("arrow-right",{character:"\\ea9c"}),e.arrowSmallDown=new e("arrow-small-down",{character:"\\ea9d"}),e.arrowSmallLeft=new e("arrow-small-left",{character:"\\ea9e"}),e.arrowSmallRight=new e("arrow-small-right",{character:"\\ea9f"}),e.arrowSmallUp=new e("arrow-small-up",{character:"\\eaa0"}),e.arrowUp=new e("arrow-up",{character:"\\eaa1"}),e.bell=new e("bell",{character:"\\eaa2"}),e.bold=new e("bold",{character:"\\eaa3"}),e.book=new e("book",{character:"\\eaa4"}),e.bookmark=new e("bookmark",{character:"\\eaa5"}),e.debugBreakpointConditionalUnverified=new e("debug-breakpoint-conditional-unverified",{character:"\\eaa6"}),e.debugBreakpointConditional=new e("debug-breakpoint-conditional",{character:"\\eaa7"}),e.debugBreakpointConditionalDisabled=new e("debug-breakpoint-conditional-disabled",{character:"\\eaa7"}),e.debugBreakpointDataUnverified=new e("debug-breakpoint-data-unverified",{character:"\\eaa8"}),e.debugBreakpointData=new e("debug-breakpoint-data",{character:"\\eaa9"}),e.debugBreakpointDataDisabled=new e("debug-breakpoint-data-disabled",{character:"\\eaa9"}),e.debugBreakpointLogUnverified=new e("debug-breakpoint-log-unverified",{character:"\\eaaa"}),e.debugBreakpointLog=new e("debug-breakpoint-log",{character:"\\eaab"}),e.debugBreakpointLogDisabled=new e("debug-breakpoint-log-disabled",{character:"\\eaab"}),e.briefcase=new e("briefcase",{character:"\\eaac"}),e.broadcast=new e("broadcast",{character:"\\eaad"}),e.browser=new e("browser",{character:"\\eaae"}),e.bug=new e("bug",{character:"\\eaaf"}),e.calendar=new e("calendar",{character:"\\eab0"}),e.caseSensitive=new e("case-sensitive",{character:"\\eab1"}),e.check=new e("check",{character:"\\eab2"}),e.checklist=new e("checklist",{character:"\\eab3"}),e.chevronDown=new e("chevron-down",{character:"\\eab4"}),e.chevronLeft=new e("chevron-left",{character:"\\eab5"}),e.chevronRight=new e("chevron-right",{character:"\\eab6"}),e.chevronUp=new e("chevron-up",{character:"\\eab7"}),e.chromeClose=new e("chrome-close",{character:"\\eab8"}),e.chromeMaximize=new e("chrome-maximize",{character:"\\eab9"}),e.chromeMinimize=new e("chrome-minimize",{character:"\\eaba"}),e.chromeRestore=new e("chrome-restore",{character:"\\eabb"}),e.circleOutline=new e("circle-outline",{character:"\\eabc"}),e.debugBreakpointUnverified=new e("debug-breakpoint-unverified",{character:"\\eabc"}),e.circleSlash=new e("circle-slash",{character:"\\eabd"}),e.circuitBoard=new e("circuit-board",{character:"\\eabe"}),e.clearAll=new e("clear-all",{character:"\\eabf"}),e.clippy=new e("clippy",{character:"\\eac0"}),e.closeAll=new e("close-all",{character:"\\eac1"}),e.cloudDownload=new e("cloud-download",{character:"\\eac2"}),e.cloudUpload=new e("cloud-upload",{character:"\\eac3"}),e.code=new e("code",{character:"\\eac4"}),e.collapseAll=new e("collapse-all",{character:"\\eac5"}),e.colorMode=new e("color-mode",{character:"\\eac6"}),e.commentDiscussion=new e("comment-discussion",{character:"\\eac7"}),e.compareChanges=new e("compare-changes",{character:"\\eafd"}),e.creditCard=new e("credit-card",{character:"\\eac9"}),e.dash=new e("dash",{character:"\\eacc"}),e.dashboard=new e("dashboard",{character:"\\eacd"}),e.database=new e("database",{character:"\\eace"}),e.debugContinue=new e("debug-continue",{character:"\\eacf"}),e.debugDisconnect=new e("debug-disconnect",{character:"\\ead0"}),e.debugPause=new e("debug-pause",{character:"\\ead1"}),e.debugRestart=new e("debug-restart",{character:"\\ead2"}),e.debugStart=new e("debug-start",{character:"\\ead3"}),e.debugStepInto=new e("debug-step-into",{character:"\\ead4"}),e.debugStepOut=new e("debug-step-out",{character:"\\ead5"}),e.debugStepOver=new e("debug-step-over",{character:"\\ead6"}),e.debugStop=new e("debug-stop",{character:"\\ead7"}),e.debug=new e("debug",{character:"\\ead8"}),e.deviceCameraVideo=new e("device-camera-video",{character:"\\ead9"}),e.deviceCamera=new e("device-camera",{character:"\\eada"}),e.deviceMobile=new e("device-mobile",{character:"\\eadb"}),e.diffAdded=new e("diff-added",{character:"\\eadc"}),e.diffIgnored=new e("diff-ignored",{character:"\\eadd"}),e.diffModified=new e("diff-modified",{character:"\\eade"}),e.diffRemoved=new e("diff-removed",{character:"\\eadf"}),e.diffRenamed=new e("diff-renamed",{character:"\\eae0"}),e.diff=new e("diff",{character:"\\eae1"}),e.discard=new e("discard",{character:"\\eae2"}),e.editorLayout=new e("editor-layout",{character:"\\eae3"}),e.emptyWindow=new e("empty-window",{character:"\\eae4"}),e.exclude=new e("exclude",{character:"\\eae5"}),e.extensions=new e("extensions",{character:"\\eae6"}),e.eyeClosed=new e("eye-closed",{character:"\\eae7"}),e.fileBinary=new e("file-binary",{character:"\\eae8"}),e.fileCode=new e("file-code",{character:"\\eae9"}),e.fileMedia=new e("file-media",{character:"\\eaea"}),e.filePdf=new e("file-pdf",{character:"\\eaeb"}),e.fileSubmodule=new e("file-submodule",{character:"\\eaec"}),e.fileSymlinkDirectory=new e("file-symlink-directory",{character:"\\eaed"}),e.fileSymlinkFile=new e("file-symlink-file",{character:"\\eaee"}),e.fileZip=new e("file-zip",{character:"\\eaef"}),e.files=new e("files",{character:"\\eaf0"}),e.filter=new e("filter",{character:"\\eaf1"}),e.flame=new e("flame",{character:"\\eaf2"}),e.foldDown=new e("fold-down",{character:"\\eaf3"}),e.foldUp=new e("fold-up",{character:"\\eaf4"}),e.fold=new e("fold",{character:"\\eaf5"}),e.folderActive=new e("folder-active",{character:"\\eaf6"}),e.folderOpened=new e("folder-opened",{character:"\\eaf7"}),e.gear=new e("gear",{character:"\\eaf8"}),e.gift=new e("gift",{character:"\\eaf9"}),e.gistSecret=new e("gist-secret",{character:"\\eafa"}),e.gist=new e("gist",{character:"\\eafb"}),e.gitCommit=new e("git-commit",{character:"\\eafc"}),e.gitCompare=new e("git-compare",{character:"\\eafd"}),e.gitMerge=new e("git-merge",{character:"\\eafe"}),e.githubAction=new e("github-action",{character:"\\eaff"}),e.githubAlt=new e("github-alt",{character:"\\eb00"}),e.globe=new e("globe",{character:"\\eb01"}),e.grabber=new e("grabber",{character:"\\eb02"}),e.graph=new e("graph",{character:"\\eb03"}),e.gripper=new e("gripper",{character:"\\eb04"}),e.heart=new e("heart",{character:"\\eb05"}),e.home=new e("home",{character:"\\eb06"}),e.horizontalRule=new e("horizontal-rule",{character:"\\eb07"}),e.hubot=new e("hubot",{character:"\\eb08"}),e.inbox=new e("inbox",{character:"\\eb09"}),e.issueClosed=new e("issue-closed",{character:"\\eb0a"}),e.issueReopened=new e("issue-reopened",{character:"\\eb0b"}),e.issues=new e("issues",{character:"\\eb0c"}),e.italic=new e("italic",{character:"\\eb0d"}),e.jersey=new e("jersey",{character:"\\eb0e"}),e.json=new e("json",{character:"\\eb0f"}),e.kebabVertical=new e("kebab-vertical",{character:"\\eb10"}),e.key=new e("key",{character:"\\eb11"}),e.law=new e("law",{character:"\\eb12"}),e.lightbulbAutofix=new e("lightbulb-autofix",{character:"\\eb13"}),e.linkExternal=new e("link-external",{character:"\\eb14"}),e.link=new e("link",{character:"\\eb15"}),e.listOrdered=new e("list-ordered",{character:"\\eb16"}),e.listUnordered=new e("list-unordered",{character:"\\eb17"}),e.liveShare=new e("live-share",{character:"\\eb18"}),e.loading=new e("loading",{character:"\\eb19"}),e.location=new e("location",{character:"\\eb1a"}),e.mailRead=new e("mail-read",{character:"\\eb1b"}),e.mail=new e("mail",{character:"\\eb1c"}),e.markdown=new e("markdown",{character:"\\eb1d"}),e.megaphone=new e("megaphone",{character:"\\eb1e"}),e.mention=new e("mention",{character:"\\eb1f"}),e.milestone=new e("milestone",{character:"\\eb20"}),e.mortarBoard=new e("mortar-board",{character:"\\eb21"}),e.move=new e("move",{character:"\\eb22"}),e.multipleWindows=new e("multiple-windows",{character:"\\eb23"}),e.mute=new e("mute",{character:"\\eb24"}),e.noNewline=new e("no-newline",{character:"\\eb25"}),e.note=new e("note",{character:"\\eb26"}),e.octoface=new e("octoface",{character:"\\eb27"}),e.openPreview=new e("open-preview",{character:"\\eb28"}),e.package_=new e("package",{character:"\\eb29"}),e.paintcan=new e("paintcan",{character:"\\eb2a"}),e.pin=new e("pin",{character:"\\eb2b"}),e.play=new e("play",{character:"\\eb2c"}),e.run=new e("run",{character:"\\eb2c"}),e.plug=new e("plug",{character:"\\eb2d"}),e.preserveCase=new e("preserve-case",{character:"\\eb2e"}),e.preview=new e("preview",{character:"\\eb2f"}),e.project=new e("project",{character:"\\eb30"}),e.pulse=new e("pulse",{character:"\\eb31"}),e.question=new e("question",{character:"\\eb32"}),e.quote=new e("quote",{character:"\\eb33"}),e.radioTower=new e("radio-tower",{character:"\\eb34"}),e.reactions=new e("reactions",{character:"\\eb35"}),e.references=new e("references",{character:"\\eb36"}),e.refresh=new e("refresh",{character:"\\eb37"}),e.regex=new e("regex",{character:"\\eb38"}),e.remoteExplorer=new e("remote-explorer",{character:"\\eb39"}),e.remote=new e("remote",{character:"\\eb3a"}),e.remove=new e("remove",{character:"\\eb3b"}),e.replaceAll=new e("replace-all",{character:"\\eb3c"}),e.replace=new e("replace",{character:"\\eb3d"}),e.repoClone=new e("repo-clone",{character:"\\eb3e"}),e.repoForcePush=new e("repo-force-push",{character:"\\eb3f"}),e.repoPull=new e("repo-pull",{character:"\\eb40"}),e.repoPush=new e("repo-push",{character:"\\eb41"}),e.report=new e("report",{character:"\\eb42"}),e.requestChanges=new e("request-changes",{character:"\\eb43"}),e.rocket=new e("rocket",{character:"\\eb44"}),e.rootFolderOpened=new e("root-folder-opened",{character:"\\eb45"}),e.rootFolder=new e("root-folder",{character:"\\eb46"}),e.rss=new e("rss",{character:"\\eb47"}),e.ruby=new e("ruby",{character:"\\eb48"}),e.saveAll=new e("save-all",{character:"\\eb49"}),e.saveAs=new e("save-as",{character:"\\eb4a"}),e.save=new e("save",{character:"\\eb4b"}),e.screenFull=new e("screen-full",{character:"\\eb4c"}),e.screenNormal=new e("screen-normal",{character:"\\eb4d"}),e.searchStop=new e("search-stop",{character:"\\eb4e"}),e.server=new e("server",{character:"\\eb50"}),e.settingsGear=new e("settings-gear",{character:"\\eb51"}),e.settings=new e("settings",{character:"\\eb52"}),e.shield=new e("shield",{character:"\\eb53"}),e.smiley=new e("smiley",{character:"\\eb54"}),e.sortPrecedence=new e("sort-precedence",{character:"\\eb55"}),e.splitHorizontal=new e("split-horizontal",{character:"\\eb56"}),e.splitVertical=new e("split-vertical",{character:"\\eb57"}),e.squirrel=new e("squirrel",{character:"\\eb58"}),e.starFull=new e("star-full",{character:"\\eb59"}),e.starHalf=new e("star-half",{character:"\\eb5a"}),e.symbolClass=new e("symbol-class",{character:"\\eb5b"}),e.symbolColor=new e("symbol-color",{character:"\\eb5c"}),e.symbolConstant=new e("symbol-constant",{character:"\\eb5d"}),e.symbolEnumMember=new e("symbol-enum-member",{character:"\\eb5e"}),e.symbolField=new e("symbol-field",{character:"\\eb5f"}),e.symbolFile=new e("symbol-file",{character:"\\eb60"}),e.symbolInterface=new e("symbol-interface",{character:"\\eb61"}),e.symbolKeyword=new e("symbol-keyword",{character:"\\eb62"}),e.symbolMisc=new e("symbol-misc",{character:"\\eb63"}),e.symbolOperator=new e("symbol-operator",{character:"\\eb64"}),e.symbolProperty=new e("symbol-property",{character:"\\eb65"}),e.wrench=new e("wrench",{character:"\\eb65"}),e.wrenchSubaction=new e("wrench-subaction",{character:"\\eb65"}),e.symbolSnippet=new e("symbol-snippet",{character:"\\eb66"}),e.tasklist=new e("tasklist",{character:"\\eb67"}),e.telescope=new e("telescope",{character:"\\eb68"}),e.textSize=new e("text-size",{character:"\\eb69"}),e.threeBars=new e("three-bars",{character:"\\eb6a"}),e.thumbsdown=new e("thumbsdown",{character:"\\eb6b"}),e.thumbsup=new e("thumbsup",{character:"\\eb6c"}),e.tools=new e("tools",{character:"\\eb6d"}),e.triangleDown=new e("triangle-down",{character:"\\eb6e"}),e.triangleLeft=new e("triangle-left",{character:"\\eb6f"}),e.triangleRight=new e("triangle-right",{character:"\\eb70"}),e.triangleUp=new e("triangle-up",{character:"\\eb71"}),e.twitter=new e("twitter",{character:"\\eb72"}),e.unfold=new e("unfold",{character:"\\eb73"}),e.unlock=new e("unlock",{character:"\\eb74"}),e.unmute=new e("unmute",{character:"\\eb75"}),e.unverified=new e("unverified",{character:"\\eb76"}),e.verified=new e("verified",{character:"\\eb77"}),e.versions=new e("versions",{character:"\\eb78"}),e.vmActive=new e("vm-active",{character:"\\eb79"}),e.vmOutline=new e("vm-outline",{character:"\\eb7a"}),e.vmRunning=new e("vm-running",{character:"\\eb7b"}),e.watch=new e("watch",{character:"\\eb7c"}),e.whitespace=new e("whitespace",{character:"\\eb7d"}),e.wholeWord=new e("whole-word",{character:"\\eb7e"}),e.window=new e("window",{character:"\\eb7f"}),e.wordWrap=new e("word-wrap",{character:"\\eb80"}),e.zoomIn=new e("zoom-in",{character:"\\eb81"}),e.zoomOut=new e("zoom-out",{character:"\\eb82"}),e.listFilter=new e("list-filter",{character:"\\eb83"}),e.listFlat=new e("list-flat",{character:"\\eb84"}),e.listSelection=new e("list-selection",{character:"\\eb85"}),e.selection=new e("selection",{character:"\\eb85"}),e.listTree=new e("list-tree",{character:"\\eb86"}),e.debugBreakpointFunctionUnverified=new e("debug-breakpoint-function-unverified",{character:"\\eb87"}),e.debugBreakpointFunction=new e("debug-breakpoint-function",{character:"\\eb88"}),e.debugBreakpointFunctionDisabled=new e("debug-breakpoint-function-disabled",{character:"\\eb88"}),e.debugStackframeActive=new e("debug-stackframe-active",{character:"\\eb89"}),e.debugStackframeDot=new e("debug-stackframe-dot",{character:"\\eb8a"}),e.debugStackframe=new e("debug-stackframe",{character:"\\eb8b"}),e.debugStackframeFocused=new e("debug-stackframe-focused",{character:"\\eb8b"}),e.debugBreakpointUnsupported=new e("debug-breakpoint-unsupported",{character:"\\eb8c"}),e.symbolString=new e("symbol-string",{character:"\\eb8d"}),e.debugReverseContinue=new e("debug-reverse-continue",{character:"\\eb8e"}),e.debugStepBack=new e("debug-step-back",{character:"\\eb8f"}),e.debugRestartFrame=new e("debug-restart-frame",{character:"\\eb90"}),e.callIncoming=new e("call-incoming",{character:"\\eb92"}),e.callOutgoing=new e("call-outgoing",{character:"\\eb93"}),e.menu=new e("menu",{character:"\\eb94"}),e.expandAll=new e("expand-all",{character:"\\eb95"}),e.feedback=new e("feedback",{character:"\\eb96"}),e.groupByRefType=new e("group-by-ref-type",{character:"\\eb97"}),e.ungroupByRefType=new e("ungroup-by-ref-type",{character:"\\eb98"}),e.account=new e("account",{character:"\\eb99"}),e.bellDot=new e("bell-dot",{character:"\\eb9a"}),e.debugConsole=new e("debug-console",{character:"\\eb9b"}),e.library=new e("library",{character:"\\eb9c"}),e.output=new e("output",{character:"\\eb9d"}),e.runAll=new e("run-all",{character:"\\eb9e"}),e.syncIgnored=new e("sync-ignored",{character:"\\eb9f"}),e.pinned=new e("pinned",{character:"\\eba0"}),e.githubInverted=new e("github-inverted",{character:"\\eba1"}),e.debugAlt=new e("debug-alt",{character:"\\eb91"}),e.serverProcess=new e("server-process",{character:"\\eba2"}),e.serverEnvironment=new e("server-environment",{character:"\\eba3"}),e.pass=new e("pass",{character:"\\eba4"}),e.stopCircle=new e("stop-circle",{character:"\\eba5"}),e.playCircle=new e("play-circle",{character:"\\eba6"}),e.record=new e("record",{character:"\\eba7"}),e.debugAltSmall=new e("debug-alt-small",{character:"\\eba8"}),e.vmConnect=new e("vm-connect",{character:"\\eba9"}),e.cloud=new e("cloud",{character:"\\ebaa"}),e.merge=new e("merge",{character:"\\ebab"})})(dl||(dl={}));const ul=/(\\)?\$\((([a-z0-9\-]+?)(?:~([a-z0-9\-]*?))?)\)/gi;function gl(e){return e.replace(ul,(e,t,i,n,o)=>t?`$(${i})`:`<span class="codicon codicon-${n}${o?" codicon-animation-"+o:""}"></span>`)}const fl=/(\s)?(\\)?\$\([a-z0-9\-]+?(?:~[a-z0-9\-]*?)?\)(\s)?/gi;function ml(e){return-1===e.indexOf(nl)?e:e.replace(fl,(e,t,i,n)=>i?e:t||n||"")}class pl{constructor(e,t){this.language=e,this.id=t}}class _l{static getLanguageId(e){return(255&e)>>>0}static getTokenType(e){return(1792&e)>>>8}static getFontStyle(e){return(14336&e)>>>11}static getForeground(e){return(8372224&e)>>>14}static getBackground(e){return(4286578688&e)>>>23}static getClassNameFromMetadata(e){let t=this.getForeground(e),i="mtk"+t,n=this.getFontStyle(e);return 1&n&&(i+=" mtki"),2&n&&(i+=" mtkb"),4&n&&(i+=" mtku"),i}static getInlineStyleFromMetadata(e,t){const i=this.getForeground(e),n=this.getFontStyle(e);let o=`color: ${t[i]};`;return 1&n&&(o+="font-style: italic;"),2&n&&(o+="font-weight: bold;"),4&n&&(o+="text-decoration: underline;"),o}}(function(){let e=Object.create(null);e[0]="symbol-method",e[1]="symbol-function",e[2]="symbol-constructor",e[3]="symbol-field",e[4]="symbol-variable",e[5]="symbol-class",e[6]="symbol-struct",e[7]="symbol-interface",e[8]="symbol-module",e[9]="symbol-property",e[10]="symbol-event",e[11]="symbol-operator",e[12]="symbol-unit",e[13]="symbol-value",e[14]="symbol-constant",e[15]="symbol-enum",e[16]="symbol-enum-member",e[17]="symbol-keyword",e[27]="symbol-snippet",e[18]="symbol-text",e[19]="symbol-color",e[20]="symbol-file",e[21]="symbol-reference",e[22]="symbol-customcolor",e[23]="symbol-folder",e[24]="symbol-type-parameter",e[25]="account",e[26]="issues"})();(function(){let e=Object.create(null);e["method"]=0,e["function"]=1,e["constructor"]=2,e["field"]=3,e["variable"]=4,e["class"]=5,e["struct"]=6,e["interface"]=7,e["module"]=8,e["property"]=9,e["event"]=10,e["operator"]=11,e["unit"]=12,e["value"]=13,e["constant"]=14,e["enum"]=15,e["enum-member"]=16,e["enumMember"]=16,e["keyword"]=17,e["snippet"]=27,e["text"]=18,e["color"]=19,e["file"]=20,e["reference"]=21,e["customcolor"]=22,e["folder"]=23,e["type-parameter"]=24,e["typeParameter"]=24,e["account"]=25,e["issue"]=26})();var bl,vl,wl;(function(e){e[e["Invoke"]=1]="Invoke",e[e["TriggerCharacter"]=2]="TriggerCharacter",e[e["ContentChange"]=3]="ContentChange"})(bl||(bl={})),function(e){e[e["Text"]=0]="Text",e[e["Read"]=1]="Read",e[e["Write"]=2]="Write"}(vl||(vl={})),function(e){const t=new Map;t.set("file",0),t.set("module",1),t.set("namespace",2),t.set("package",3),t.set("class",4),t.set("method",5),t.set("property",6),t.set("field",7),t.set("constructor",8),t.set("enum",9),t.set("interface",10),t.set("function",11),t.set("variable",12),t.set("constant",13),t.set("string",14),t.set("number",15),t.set("boolean",16),t.set("array",17),t.set("object",18),t.set("key",19),t.set("null",20),t.set("enum-member",21),t.set("struct",22),t.set("event",23),t.set("operator",24),t.set("type-parameter",25);const i=new Map;function n(e){return t.get(e)}function o(e){return i.get(e)}function r(e,t){const n=i.get(e);let o=n&&cl.get("symbol-"+n);return o||(console.info("No codicon found for SymbolKind "+e),o=dl.symbolProperty),`${t?"inline":"block"} ${o.classNames}`}i.set(0,"file"),i.set(1,"module"),i.set(2,"namespace"),i.set(3,"package"),i.set(4,"class"),i.set(5,"method"),i.set(6,"property"),i.set(7,"field"),i.set(8,"constructor"),i.set(9,"enum"),i.set(10,"interface"),i.set(11,"function"),i.set(12,"variable"),i.set(13,"constant"),i.set(14,"string"),i.set(15,"number"),i.set(16,"boolean"),i.set(17,"array"),i.set(18,"object"),i.set(19,"key"),i.set(20,"null"),i.set(21,"enum-member"),i.set(22,"struct"),i.set(23,"event"),i.set(24,"operator"),i.set(25,"type-parameter"),e.fromString=n,e.toString=o,e.toCssClassName=r}(wl||(wl={}));class Cl{constructor(e){this.value=e}}Cl.Comment=new Cl("comment"),Cl.Imports=new Cl("imports"),Cl.Region=new Cl("region");const yl=new ha,Sl=new ha,xl=new ha,Ll=new ha,kl=new ha,El=new ha,Dl=new ha,Nl=new ha,Tl=new ha,Ml=new ha,Il=new ha,Ol=new ha,Al=new ha,Rl=new ha,Pl=new ha,Fl=new ha,Wl=new ha,Bl=new ha,Vl=new ha,Hl=new ha,zl=new ha,Ul=new ha,jl=new ha,Kl=new da;class ql{clone(){return this}equals(e){return this===e}}const $l=new ql,Gl="vs.editor.nullMode",Yl=new pl(Gl,0);function Xl(e,t,i,n){return new ii([new ti(n,"",e)],i)}function Zl(e,t,i,n){let o=new Uint32Array(2);return o[0]=n,o[1]=(16384|e<<0|2<<23)>>>0,new ni(o,null===i?$l:i)}const Ql="editorWorkerService",Jl=zi(Ql),ec=zi("textModelService"),tc="$initialize";let ic=!1;function nc(e){r["h"]&&(ic||(ic=!0,console.warn("Could not create web worker(s). Falling back to loading web worker code in main thread, which might cause UI freezes. Please see https://github.com/Microsoft/monaco-editor#faq")),console.warn(e.message))}class oc{constructor(e){this._workerId=-1,this._handler=e,this._lastSentReq=0,this._pendingReplies=Object.create(null)}setWorkerId(e){this._workerId=e}sendMessage(e,t){let i=String(++this._lastSentReq);return new Promise((n,o)=>{this._pendingReplies[i]={resolve:n,reject:o},this._send({vsWorker:this._workerId,req:i,method:e,args:t})})}handleMessage(e){e&&e.vsWorker&&(-1!==this._workerId&&e.vsWorker!==this._workerId||this._handleMessage(e))}_handleMessage(e){if(e.seq){let t=e;if(!this._pendingReplies[t.seq])return void console.warn("Got reply to unknown seq");let i=this._pendingReplies[t.seq];if(delete this._pendingReplies[t.seq],t.err){let e=t.err;return t.err.$isError&&(e=new Error,e.name=t.err.name,e.message=t.err.message,e.stack=t.err.stack),void i.reject(e)}return void i.resolve(t.res)}let t=e,i=t.req,n=this._handler.handleMessage(t.method,t.args);n.then(e=>{this._send({vsWorker:this._workerId,seq:i,res:e,err:void 0})},e=>{e.detail instanceof Error&&(e.detail=pe(e.detail)),this._send({vsWorker:this._workerId,seq:i,res:void 0,err:pe(e)})})}_send(e){let t=[];if(e.req){const i=e;for(let e=0;e<i.args.length;e++)i.args[e]instanceof ArrayBuffer&&t.push(i.args[e])}else{const i=e;i.res instanceof ArrayBuffer&&t.push(i.res)}this._handler.sendMessage(e,t)}}class rc extends Oe{constructor(e,t,i){super();let n=null;this._worker=this._register(e.create("vs/base/common/worker/simpleWorker",e=>{this._protocol.handleMessage(e)},e=>{n&&n(e)})),this._protocol=new oc({sendMessage:(e,t)=>{this._worker.postMessage(e,t)},handleMessage:(e,t)=>{if("function"!==typeof i[e])return Promise.reject(new Error("Missing method "+e+" on main thread host."));try{return Promise.resolve(i[e].apply(i,t))}catch(n){return Promise.reject(n)}}}),this._protocol.setWorkerId(this._worker.getId());let o=null;"undefined"!==typeof self.require&&"function"===typeof self.require.getConfig?o=self.require.getConfig():"undefined"!==typeof self.requirejs&&(o=self.requirejs.s.contexts._.config);const r=Ur(i);this._onModuleLoaded=this._protocol.sendMessage(tc,[this._worker.getId(),JSON.parse(JSON.stringify(o)),t,r]);const s=(e,t)=>this._request(e,t);this._lazyProxy=new Promise((e,i)=>{n=i,this._onModuleLoaded.then(t=>{e(jr(t,s))},e=>{i(e),this._onError("Worker failed to load "+t,e)})})}getProxyObject(){return this._lazyProxy}_request(e,t){return new Promise((i,n)=>{this._onModuleLoaded.then(()=>{this._protocol.sendMessage(e,t).then(i,n)},n)})}_onError(e,t){console.error(e),console.info(t)}}function sc(e,t){if(r["b"].MonacoEnvironment){if("function"===typeof r["b"].MonacoEnvironment.getWorker)return r["b"].MonacoEnvironment.getWorker(e,t);if("function"===typeof r["b"].MonacoEnvironment.getWorkerUrl)return new Worker(r["b"].MonacoEnvironment.getWorkerUrl(e,t))}throw new Error("You must define a function MonacoEnvironment.getWorkerUrl or MonacoEnvironment.getWorker")}function ac(e){return"function"===typeof e.then}class lc{constructor(e,t,i,n,o){this.id=t;const r=sc("workerMain.js",i);ac(r)?this.worker=r:this.worker=Promise.resolve(r),this.postMessage(e,[]),this.worker.then(e=>{e.onmessage=function(e){n(e.data)},e.onmessageerror=o,"function"===typeof e.addEventListener&&e.addEventListener("error",o)})}getId(){return this.id}postMessage(e,t){this.worker&&this.worker.then(i=>i.postMessage(e,t))}dispose(){this.worker&&this.worker.then(e=>e.terminate()),this.worker=null}}class cc{constructor(e){this._label=e,this._webWorkerFailedBeforeError=!1}create(e,t,i){let n=++cc.LAST_WORKER_ID;if(this._webWorkerFailedBeforeError)throw this._webWorkerFailedBeforeError;return new lc(e,n,this._label||"anonymous"+n,t,e=>{nc(e),this._webWorkerFailedBeforeError=e,i(e)})}}var hc;cc.LAST_WORKER_ID=0,function(e){e[e["None"]=0]="None",e[e["Indent"]=1]="Indent",e[e["IndentOutdent"]=2]="IndentOutdent",e[e["Outdent"]=3]="Outdent"}(hc||(hc={}));class dc{constructor(e){if(this.open=e.open,this.close=e.close,this._standardTokenMask=0,Array.isArray(e.notIn))for(let t=0,i=e.notIn.length;t<i;t++){const i=e.notIn[t];switch(i){case"string":this._standardTokenMask|=2;break;case"comment":this._standardTokenMask|=1;break;case"regex":this._standardTokenMask|=4;break}}}isOK(e){return 0===(this._standardTokenMask&e)}}function uc(e,t){let i=e.getCount(),n=e.findTokenIndexAtOffset(t),o=e.getLanguageId(n),r=n;while(r+1<i&&e.getLanguageId(r+1)===o)r++;let s=n;while(s>0&&e.getLanguageId(s-1)===o)s--;return new gc(e,o,s,r+1,e.getStartOffset(s),e.getEndOffset(r))}class gc{constructor(e,t,i,n,o,r){this._actual=e,this.languageId=t,this._firstTokenIndex=i,this._lastTokenIndex=n,this.firstCharOffset=o,this._lastCharOffset=r}getLineContent(){const e=this._actual.getLineContent();return e.substring(this.firstCharOffset,this._lastCharOffset)}getActualLineContentBefore(e){const t=this._actual.getLineContent();return t.substring(0,this.firstCharOffset+e)}getTokenCount(){return this._lastTokenIndex-this._firstTokenIndex}findTokenIndexAtOffset(e){return this._actual.findTokenIndexAtOffset(e+this.firstCharOffset)-this._firstTokenIndex}getStandardTokenType(e){return this._actual.getStandardTokenType(e+this._firstTokenIndex)}}function fc(e){return 0!==(7&e)}class mc{constructor(e){if(e.autoClosingPairs?this._autoClosingPairs=e.autoClosingPairs.map(e=>new dc(e)):e.brackets?this._autoClosingPairs=e.brackets.map(e=>new dc({open:e[0],close:e[1]})):this._autoClosingPairs=[],e.__electricCharacterSupport&&e.__electricCharacterSupport.docComment){const t=e.__electricCharacterSupport.docComment;this._autoClosingPairs.push(new dc({open:t.open,close:t.close||""}))}this._autoCloseBefore="string"===typeof e.autoCloseBefore?e.autoCloseBefore:mc.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED,this._surroundingPairs=e.surroundingPairs||this._autoClosingPairs}getAutoClosingPairs(){return this._autoClosingPairs}getAutoCloseBeforeSet(){return this._autoCloseBefore}static shouldAutoClosePair(e,t,i){if(0===t.getTokenCount())return!0;const n=t.findTokenIndexAtOffset(i-2),o=t.getStandardTokenType(n);return e.isOK(o)}getSurroundingPairs(){return this._surroundingPairs}}let pc;function _c(){return pc||(pc=new TextDecoder(r["e"]()?"UTF-16LE":"UTF-16BE")),pc}mc.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED=";:.,=}])> \n\t";const bc="undefined"!==typeof TextDecoder;let vc,wc;function Cc(e,t,i){const n=new Uint16Array(e.buffer,t,i);return _c().decode(n)}function yc(e,t,i){let n=[],o=0;for(let r=0;r<i;r++){const i=vr["b"](e,t);t+=2,n[o++]=String.fromCharCode(i)}return n.join("")}bc?(vc=e=>new Sc(e),wc=Cc):(vc=e=>new xc,wc=yc);class Sc{constructor(e){this._capacity=0|e,this._buffer=new Uint16Array(this._capacity),this._completedStrings=null,this._bufferLength=0}reset(){this._completedStrings=null,this._bufferLength=0}build(){return null!==this._completedStrings?(this._flushBuffer(),this._completedStrings.join("")):this._buildBuffer()}_buildBuffer(){if(0===this._bufferLength)return"";const e=new Uint16Array(this._buffer.buffer,0,this._bufferLength);return _c().decode(e)}_flushBuffer(){const e=this._buildBuffer();this._bufferLength=0,null===this._completedStrings?this._completedStrings=[e]:this._completedStrings[this._completedStrings.length]=e}write1(e){const t=this._capacity-this._bufferLength;t<=1&&(0===t||yr["D"](e))&&this._flushBuffer(),this._buffer[this._bufferLength++]=e}appendASCII(e){this._bufferLength===this._capacity&&this._flushBuffer(),this._buffer[this._bufferLength++]=e}appendASCIIString(e){const t=e.length;if(this._bufferLength+t>=this._capacity)return this._flushBuffer(),void(this._completedStrings[this._completedStrings.length]=e);for(let i=0;i<t;i++)this._buffer[this._bufferLength++]=e.charCodeAt(i)}}class xc{constructor(){this._pieces=[],this._piecesLen=0}reset(){this._pieces=[],this._piecesLen=0}build(){return this._pieces.join("")}write1(e){this._pieces[this._piecesLen++]=String.fromCharCode(e)}appendASCII(e){this._pieces[this._piecesLen++]=String.fromCharCode(e)}appendASCIIString(e){this._pieces[this._piecesLen++]=e}}class Lc{constructor(e,t,i,n,o,r){this.languageIdentifier=e,this.index=t,this.open=i,this.close=n,this.forwardRegex=o,this.reversedRegex=r,this._openSet=Lc._toSet(this.open),this._closeSet=Lc._toSet(this.close)}isOpen(e){return this._openSet.has(e)}isClose(e){return this._closeSet.has(e)}static _toSet(e){const t=new Set;for(const i of e)t.add(i);return t}}function kc(e){const t=e.length;e=e.map(e=>[e[0].toLowerCase(),e[1].toLowerCase()]);const i=[];for(let s=0;s<t;s++)i[s]=s;const n=(e,t)=>{const[i,n]=e,[o,r]=t;return i===o||i===r||n===o||n===r},o=(e,n)=>{const o=Math.min(e,n),r=Math.max(e,n);for(let s=0;s<t;s++)i[s]===r&&(i[s]=o)};for(let s=0;s<t;s++){const r=e[s];for(let a=s+1;a<t;a++){const t=e[a];n(r,t)&&o(i[s],i[a])}}const r=[];for(let s=0;s<t;s++){let n=[],o=[];for(let r=0;r<t;r++)if(i[r]===s){const[t,i]=e[r];n.push(t),o.push(i)}n.length>0&&r.push({open:n,close:o})}return r}class Ec{constructor(e,t){const i=kc(t);this.brackets=i.map((t,n)=>new Lc(e,n,t.open,t.close,Mc(t.open,t.close,i,n),Ic(t.open,t.close,i,n))),this.forwardRegex=Oc(this.brackets),this.reversedRegex=Ac(this.brackets),this.textIsBracket={},this.textIsOpenBracket={},this.maxBracketLength=0;for(const n of this.brackets){for(const e of n.open)this.textIsBracket[e]=n,this.textIsOpenBracket[e]=!0,this.maxBracketLength=Math.max(this.maxBracketLength,e.length);for(const e of n.close)this.textIsBracket[e]=n,this.textIsOpenBracket[e]=!1,this.maxBracketLength=Math.max(this.maxBracketLength,e.length)}}}function Dc(e,t,i,n){for(let o=0,r=t.length;o<r;o++){if(o===i)continue;const r=t[o];for(const t of r.open)t.indexOf(e)>=0&&n.push(t);for(const t of r.close)t.indexOf(e)>=0&&n.push(t)}}function Nc(e,t){return e.length-t.length}function Tc(e){if(e.length<=1)return e;const t=[],i=new Set;for(const n of e)i.has(n)||(t.push(n),i.add(n));return t}function Mc(e,t,i,n){let o=[];o=o.concat(e),o=o.concat(t);for(let r=0,s=o.length;r<s;r++)Dc(o[r],i,n,o);return o=Tc(o),o.sort(Nc),o.reverse(),Pc(o)}function Ic(e,t,i,n){let o=[];o=o.concat(e),o=o.concat(t);for(let r=0,s=o.length;r<s;r++)Dc(o[r],i,n,o);return o=Tc(o),o.sort(Nc),o.reverse(),Pc(o.map(Fc))}function Oc(e){let t=[];for(const i of e){for(const e of i.open)t.push(e);for(const e of i.close)t.push(e)}return t=Tc(t),Pc(t)}function Ac(e){let t=[];for(const i of e){for(const e of i.open)t.push(e);for(const e of i.close)t.push(e)}return t=Tc(t),Pc(t.map(Fc))}function Rc(e){const t=/^[\w ]+$/.test(e);return e=yr["t"](e),t?`\\b${e}\\b`:e}function Pc(e){let t=`(${e.map(Rc).join(")|(")})`;return yr["o"](t,!0)}const Fc=function(){function e(e){if(bc){const t=new Uint16Array(e.length);let i=0;for(let n=e.length-1;n>=0;n--)t[i++]=e.charCodeAt(n);return _c().decode(t)}{let t=[],i=0;for(let n=e.length-1;n>=0;n--)t[i++]=e.charAt(n);return t.join("")}}let t=null,i=null;return function(n){return t!==n&&(t=n,i=e(t)),i}}();class Wc{static _findPrevBracketInText(e,t,i,n){let o=i.match(e);if(!o)return null;let r=i.length-(o.index||0),s=o[0].length,a=n+r;return new Jt(t,a-s+1,t,a+1)}static findPrevBracketInRange(e,t,i,n,o){const r=Fc(i),s=r.substring(i.length-o,i.length-n);return this._findPrevBracketInText(e,t,s,n)}static findNextBracketInText(e,t,i,n){let o=i.match(e);if(!o)return null;let r=o.index||0,s=o[0].length;if(0===s)return null;let a=n+r;return new Jt(t,a+1,t,a+1+s)}static findNextBracketInRange(e,t,i,n,o){const r=i.substring(n,o);return this.findNextBracketInText(e,t,r,n)}}class Bc{constructor(e){this._richEditBrackets=e}getElectricCharacters(){let e=[];if(this._richEditBrackets)for(const t of this._richEditBrackets.brackets)for(const i of t.close){const t=i.charAt(i.length-1);e.push(t)}return e=e.filter((e,t,i)=>i.indexOf(e)===t),e}onElectricCharacter(e,t,i){if(!this._richEditBrackets||0===this._richEditBrackets.brackets.length)return null;const n=t.findTokenIndexAtOffset(i-1);if(fc(t.getStandardTokenType(n)))return null;const o=this._richEditBrackets.reversedRegex,r=t.getLineContent().substring(0,i-1)+e,s=Wc.findPrevBracketInRange(o,1,r,0,r.length);if(!s)return null;const a=r.substring(s.startColumn-1,s.endColumn-1).toLowerCase(),l=this._richEditBrackets.textIsOpenBracket[a];if(l)return null;const c=t.getActualLineContentBefore(s.startColumn-1);return/^\s*$/.test(c)?{matchOpenBracket:a}:null}}class Vc{constructor(e){this._indentationRules=e}shouldIncrease(e){return!!(this._indentationRules&&this._indentationRules.increaseIndentPattern&&this._indentationRules.increaseIndentPattern.test(e))}shouldDecrease(e){return!!(this._indentationRules&&this._indentationRules.decreaseIndentPattern&&this._indentationRules.decreaseIndentPattern.test(e))}shouldIndentNextLine(e){return!!(this._indentationRules&&this._indentationRules.indentNextLinePattern&&this._indentationRules.indentNextLinePattern.test(e))}shouldIgnore(e){return!!(this._indentationRules&&this._indentationRules.unIndentedLinePattern&&this._indentationRules.unIndentedLinePattern.test(e))}getIndentMetadata(e){let t=0;return this.shouldIncrease(e)&&(t+=1),this.shouldDecrease(e)&&(t+=2),this.shouldIndentNextLine(e)&&(t+=4),this.shouldIgnore(e)&&(t+=8),t}}class Hc{constructor(e){e=e||{},e.brackets=e.brackets||[["(",")"],["{","}"],["[","]"]],this._brackets=[],e.brackets.forEach(e=>{const t=Hc._createOpenBracketRegExp(e[0]),i=Hc._createCloseBracketRegExp(e[1]);t&&i&&this._brackets.push({open:e[0],openRegExp:t,close:e[1],closeRegExp:i})}),this._regExpRules=e.onEnterRules||[]}onEnter(e,t,i,n){if(e>=3)for(let o=0,r=this._regExpRules.length;o<r;o++){let e=this._regExpRules[o];const r=[{reg:e.beforeText,text:i},{reg:e.afterText,text:n},{reg:e.oneLineAboveText,text:t}].every(e=>!e.reg||e.reg.test(e.text));if(r)return e.action}if(e>=2&&i.length>0&&n.length>0)for(let o=0,r=this._brackets.length;o<r;o++){let e=this._brackets[o];if(e.openRegExp.test(i)&&e.closeRegExp.test(n))return{indentAction:hc.IndentOutdent}}if(e>=2&&i.length>0)for(let o=0,r=this._brackets.length;o<r;o++){let e=this._brackets[o];if(e.openRegExp.test(i))return{indentAction:hc.Indent}}return null}static _createOpenBracketRegExp(e){let t=yr["t"](e);return/\B/.test(t.charAt(0))||(t="\\b"+t),t+="\\s*$",Hc._safeRegExp(t)}static _createCloseBracketRegExp(e){let t=yr["t"](e);return/\B/.test(t.charAt(t.length-1))||(t+="\\b"),t="^\\s*"+t,Hc._safeRegExp(t)}static _safeRegExp(e){try{return new RegExp(e)}catch(t){return me(t),null}}}class zc{constructor(e,t,i){this._languageIdentifier=e,this._brackets=null,this._electricCharacter=null;let n=null;t&&(n=t._conf),this._conf=zc._mergeConf(n,i),this._onEnterSupport=this._conf.brackets||this._conf.indentationRules||this._conf.onEnterRules?new Hc(this._conf):null,this.comments=zc._handleComments(this._conf),this.characterPair=new mc(this._conf),this.wordDefinition=this._conf.wordPattern||l,this.indentationRules=this._conf.indentationRules,this._conf.indentationRules?this.indentRulesSupport=new Vc(this._conf.indentationRules):this.indentRulesSupport=null,this.foldingRules=this._conf.folding||{}}get brackets(){return!this._brackets&&this._conf.brackets&&(this._brackets=new Ec(this._languageIdentifier,this._conf.brackets)),this._brackets}get electricCharacter(){return this._electricCharacter||(this._electricCharacter=new Bc(this.brackets)),this._electricCharacter}onEnter(e,t,i,n){return this._onEnterSupport?this._onEnterSupport.onEnter(e,t,i,n):null}static _mergeConf(e,t){return{comments:e?t.comments||e.comments:t.comments,brackets:e?t.brackets||e.brackets:t.brackets,wordPattern:e?t.wordPattern||e.wordPattern:t.wordPattern,indentationRules:e?t.indentationRules||e.indentationRules:t.indentationRules,onEnterRules:e?t.onEnterRules||e.onEnterRules:t.onEnterRules,autoClosingPairs:e?t.autoClosingPairs||e.autoClosingPairs:t.autoClosingPairs,surroundingPairs:e?t.surroundingPairs||e.surroundingPairs:t.surroundingPairs,autoCloseBefore:e?t.autoCloseBefore||e.autoCloseBefore:t.autoCloseBefore,folding:e?t.folding||e.folding:t.folding,__electricCharacterSupport:e?t.__electricCharacterSupport||e.__electricCharacterSupport:t.__electricCharacterSupport}}static _handleComments(e){let t=e.comments;if(!t)return null;let i={};if(t.lineComment&&(i.lineCommentToken=t.lineComment),t.blockComment){let[e,n]=t.blockComment;i.blockCommentStartToken=e,i.blockCommentEndToken=n}return i}}class Uc{constructor(e){this.languageIdentifier=e}}class jc{constructor(){this._entries=new Map,this._onDidChange=new Ve,this.onDidChange=this._onDidChange.event}register(e,t){let i=this._getRichEditSupport(e.id),n=new zc(e,i,t);return this._entries.set(e.id,n),this._onDidChange.fire(new Uc(e)),Me(()=>{this._entries.get(e.id)===n&&(this._entries.set(e.id,i),this._onDidChange.fire(new Uc(e)))})}_getRichEditSupport(e){return this._entries.get(e)}getIndentationRules(e){const t=this._entries.get(e);return t&&t.indentationRules||null}_getElectricCharacterSupport(e){let t=this._getRichEditSupport(e);return t&&t.electricCharacter||null}getElectricCharacters(e){let t=this._getElectricCharacterSupport(e);return t?t.getElectricCharacters():[]}onElectricCharacter(e,t,i){let n=uc(t,i-1),o=this._getElectricCharacterSupport(n.languageId);return o?o.onElectricCharacter(e,n,i-n.firstCharOffset):null}getComments(e){let t=this._getRichEditSupport(e);return t&&t.comments||null}_getCharacterPairSupport(e){let t=this._getRichEditSupport(e);return t&&t.characterPair||null}getAutoClosingPairs(e){let t=this._getCharacterPairSupport(e);return t?t.getAutoClosingPairs():[]}getAutoCloseBeforeSet(e){let t=this._getCharacterPairSupport(e);return t?t.getAutoCloseBeforeSet():mc.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED}getSurroundingPairs(e){let t=this._getCharacterPairSupport(e);return t?t.getSurroundingPairs():[]}shouldAutoClosePair(e,t,i){const n=uc(t,i-1);return mc.shouldAutoClosePair(e,n,i-n.firstCharOffset)}getWordDefinition(e){let t=this._getRichEditSupport(e);return c(t&&t.wordDefinition||null)}getFoldingRules(e){let t=this._getRichEditSupport(e);return t?t.foldingRules:{}}getIndentRulesSupport(e){let t=this._getRichEditSupport(e);return t&&t.indentRulesSupport||null}getPrecedingValidLine(e,t,i){let n=e.getLanguageIdAtPosition(t,0);if(t>1){let o,r=-1;for(o=t-1;o>=1;o--){if(e.getLanguageIdAtPosition(o,0)!==n)return r;let t=e.getLineContent(o);if(!i.shouldIgnore(t)&&!/^\s+$/.test(t)&&""!==t)return o;r=o}}return-1}getInheritIndentForLine(e,t,i,n=!0){if(e<4)return null;const o=this.getIndentRulesSupport(t.getLanguageIdentifier().id);if(!o)return null;if(i<=1)return{indentation:"",action:null};const r=this.getPrecedingValidLine(t,i,o);if(r<0)return null;if(r<1)return{indentation:"",action:null};const s=t.getLineContent(r);if(o.shouldIncrease(s)||o.shouldIndentNextLine(s))return{indentation:yr["x"](s),action:hc.Indent,line:r};if(o.shouldDecrease(s))return{indentation:yr["x"](s),action:null,line:r};{if(1===r)return{indentation:yr["x"](t.getLineContent(r)),action:null,line:r};const e=r-1,i=o.getIndentMetadata(t.getLineContent(e));if(!(3&i)&&4&i){let i=0;for(let n=e-1;n>0;n--)if(!o.shouldIndentNextLine(t.getLineContent(n))){i=n;break}return{indentation:yr["x"](t.getLineContent(i+1)),action:null,line:i+1}}if(n)return{indentation:yr["x"](t.getLineContent(r)),action:null,line:r};for(let n=r;n>0;n--){const e=t.getLineContent(n);if(o.shouldIncrease(e))return{indentation:yr["x"](e),action:hc.Indent,line:n};if(o.shouldIndentNextLine(e)){let e=0;for(let i=n-1;i>0;i--)if(!o.shouldIndentNextLine(t.getLineContent(n))){e=i;break}return{indentation:yr["x"](t.getLineContent(e+1)),action:null,line:e+1}}if(o.shouldDecrease(e))return{indentation:yr["x"](e),action:null,line:n}}return{indentation:yr["x"](t.getLineContent(1)),action:null,line:1}}}getGoodIndentForLine(e,t,i,n,o){if(e<4)return null;const r=this._getRichEditSupport(i);if(!r)return null;const s=this.getIndentRulesSupport(i);if(!s)return null;const a=this.getInheritIndentForLine(e,t,n),l=t.getLineContent(n);if(a){const i=a.line;if(void 0!==i){const n=r.onEnter(e,"",t.getLineContent(i),"");if(n){let e=yr["x"](t.getLineContent(i));return n.removeText&&(e=e.substring(0,e.length-n.removeText)),n.indentAction===hc.Indent||n.indentAction===hc.IndentOutdent?e=o.shiftIndent(e):n.indentAction===hc.Outdent&&(e=o.unshiftIndent(e)),s.shouldDecrease(l)&&(e=o.unshiftIndent(e)),n.appendText&&(e+=n.appendText),yr["x"](e)}}return s.shouldDecrease(l)?a.action===hc.Indent?a.indentation:o.unshiftIndent(a.indentation):a.action===hc.Indent?o.shiftIndent(a.indentation):a.indentation}return null}getIndentForEnter(e,t,i,n){if(e<4)return null;t.forceTokenization(i.startLineNumber);const o=t.getLineTokens(i.startLineNumber),r=uc(o,i.startColumn-1),s=r.getLineContent();let a,l,c=!1;if(r.firstCharOffset>0&&o.getLanguageId(0)!==r.languageId?(c=!0,a=s.substr(0,i.startColumn-1-r.firstCharOffset)):a=o.getLineContent().substring(0,i.startColumn-1),i.isEmpty())l=s.substr(i.startColumn-1-r.firstCharOffset);else{const e=this.getScopedLineTokens(t,i.endLineNumber,i.endColumn);l=e.getLineContent().substr(i.endColumn-1-r.firstCharOffset)}const h=this.getIndentRulesSupport(r.languageId);if(!h)return null;const d=a,u=yr["x"](a),g={getLineTokens:e=>t.getLineTokens(e),getLanguageIdentifier:()=>t.getLanguageIdentifier(),getLanguageIdAtPosition:(e,i)=>t.getLanguageIdAtPosition(e,i),getLineContent:e=>e===i.startLineNumber?d:t.getLineContent(e)},f=yr["x"](o.getLineContent()),m=this.getInheritIndentForLine(e,g,i.startLineNumber+1);if(!m){const e=c?f:u;return{beforeEnter:e,afterEnter:e}}let p=c?f:m.indentation;return m.action===hc.Indent&&(p=n.shiftIndent(p)),h.shouldDecrease(l)&&(p=n.unshiftIndent(p)),{beforeEnter:c?f:u,afterEnter:p}}getIndentActionForType(e,t,i,n,o){if(e<4)return null;const r=this.getScopedLineTokens(t,i.startLineNumber,i.startColumn),s=this.getIndentRulesSupport(r.languageId);if(!s)return null;const a=r.getLineContent(),l=a.substr(0,i.startColumn-1-r.firstCharOffset);let c;if(i.isEmpty())c=a.substr(i.startColumn-1-r.firstCharOffset);else{const e=this.getScopedLineTokens(t,i.endLineNumber,i.endColumn);c=e.getLineContent().substr(i.endColumn-1-r.firstCharOffset)}if(!s.shouldDecrease(l+c)&&s.shouldDecrease(l+n+c)){const n=this.getInheritIndentForLine(e,t,i.startLineNumber,!1);if(!n)return null;let r=n.indentation;return n.action!==hc.Indent&&(r=o.unshiftIndent(r)),r}return null}getIndentMetadata(e,t){const i=this.getIndentRulesSupport(e.getLanguageIdentifier().id);return i?t<1||t>e.getLineCount()?null:i.getIndentMetadata(e.getLineContent(t)):null}getEnterAction(e,t,i){const n=this.getScopedLineTokens(t,i.startLineNumber,i.startColumn),o=this._getRichEditSupport(n.languageId);if(!o)return null;const r=n.getLineContent(),s=r.substr(0,i.startColumn-1-n.firstCharOffset);let a;if(i.isEmpty())a=r.substr(i.startColumn-1-n.firstCharOffset);else{const e=this.getScopedLineTokens(t,i.endLineNumber,i.endColumn);a=e.getLineContent().substr(i.endColumn-1-n.firstCharOffset)}let l="";if(i.startLineNumber>1&&0===n.firstCharOffset){const e=this.getScopedLineTokens(t,i.startLineNumber-1);e.languageId===n.languageId&&(l=e.getLineContent())}const c=o.onEnter(e,l,s,a);if(!c)return null;const h=c.indentAction;let d=c.appendText;const u=c.removeText||0;d||(d=h===hc.Indent||h===hc.IndentOutdent?"\t":"");let g=this.getIndentationAtPosition(t,i.startLineNumber,i.startColumn);return u&&(g=g.substring(0,g.length-u)),{indentAction:h,appendText:d,removeText:u,indentation:g}}getIndentationAtPosition(e,t,i){const n=e.getLineContent(t);let o=yr["x"](n);return o.length>i-1&&(o=o.substring(0,i-1)),o}getScopedLineTokens(e,t,i){e.forceTokenization(t);const n=e.getLineTokens(t),o="undefined"===typeof i?e.getLineMaxColumn(t)-1:i-1;return uc(n,o)}getBracketsSupport(e){const t=this._getRichEditSupport(e);return t&&t.brackets||null}}const Kc=new jc;class qc{constructor(e,t,i,n){this.originalStart=e,this.originalLength=t,this.modifiedStart=i,this.modifiedLength=n}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}}function $c(e,t){return(t<<5)-t+e|0}function Gc(e,t){t=$c(149417,t);for(let i=0,n=e.length;i<n;i++)t=$c(e.charCodeAt(i),t);return t}function Yc(e,t,i=32){const n=i-t,o=~((1<<n)-1);return(e<<t|(o&e)>>>n)>>>0}function Xc(e,t=0,i=e.byteLength,n=0){for(let o=0;o<i;o++)e[t+o]=n}function Zc(e,t,i="0"){while(e.length<t)e=i+e;return e}function Qc(e,t=32){return Zc((e>>>0).toString(16),t/4)}class Jc{constructor(){this._h0=1732584193,this._h1=4023233417,this._h2=2562383102,this._h3=271733878,this._h4=3285377520,this._buff=new Uint8Array(67),this._buffDV=new DataView(this._buff.buffer),this._buffLen=0,this._totalLen=0,this._leftoverHighSurrogate=0,this._finished=!1}update(e){const t=e.length;if(0===t)return;const i=this._buff;let n,o,r=this._buffLen,s=this._leftoverHighSurrogate;0!==s?(n=s,o=-1,s=0):(n=e.charCodeAt(0),o=0);while(1){let a=n;if(yr["D"](n)){if(!(o+1<t)){s=n;break}{const t=e.charCodeAt(o+1);yr["E"](t)?(o++,a=yr["i"](n,t)):a=65533}}else yr["E"](n)&&(a=65533);if(r=this._push(i,r,a),o++,!(o<t))break;n=e.charCodeAt(o)}this._buffLen=r,this._leftoverHighSurrogate=s}_push(e,t,i){return i<128?e[t++]=i:i<2048?(e[t++]=192|(1984&i)>>>6,e[t++]=128|(63&i)>>>0):i<65536?(e[t++]=224|(61440&i)>>>12,e[t++]=128|(4032&i)>>>6,e[t++]=128|(63&i)>>>0):(e[t++]=240|(1835008&i)>>>18,e[t++]=128|(258048&i)>>>12,e[t++]=128|(4032&i)>>>6,e[t++]=128|(63&i)>>>0),t>=64&&(this._step(),t-=64,this._totalLen+=64,e[0]=e[64],e[1]=e[65],e[2]=e[66]),t}digest(){return this._finished||(this._finished=!0,this._leftoverHighSurrogate&&(this._leftoverHighSurrogate=0,this._buffLen=this._push(this._buff,this._buffLen,65533)),this._totalLen+=this._buffLen,this._wrapUp()),Qc(this._h0)+Qc(this._h1)+Qc(this._h2)+Qc(this._h3)+Qc(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128,Xc(this._buff,this._buffLen),this._buffLen>56&&(this._step(),Xc(this._buff));const e=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(e/4294967296),!1),this._buffDV.setUint32(60,e%4294967296,!1),this._step()}_step(){const e=Jc._bigBlock32,t=this._buffDV;for(let h=0;h<64;h+=4)e.setUint32(h,t.getUint32(h,!1),!1);for(let h=64;h<320;h+=4)e.setUint32(h,Yc(e.getUint32(h-12,!1)^e.getUint32(h-32,!1)^e.getUint32(h-56,!1)^e.getUint32(h-64,!1),1),!1);let i,n,o,r=this._h0,s=this._h1,a=this._h2,l=this._h3,c=this._h4;for(let h=0;h<80;h++)h<20?(i=s&a|~s&l,n=1518500249):h<40?(i=s^a^l,n=1859775393):h<60?(i=s&a|s&l|a&l,n=2400959708):(i=s^a^l,n=3395469782),o=Yc(r,5)+i+c+n+e.getUint32(4*h,!1)&4294967295,c=l,l=a,a=Yc(s,30),s=r,r=o;this._h0=this._h0+r&4294967295,this._h1=this._h1+s&4294967295,this._h2=this._h2+a&4294967295,this._h3=this._h3+l&4294967295,this._h4=this._h4+c&4294967295}}Jc._bigBlock32=new DataView(new ArrayBuffer(320));class eh{constructor(e){this.source=e}getElements(){const e=this.source,t=new Int32Array(e.length);for(let i=0,n=e.length;i<n;i++)t[i]=e.charCodeAt(i);return t}}function th(e,t,i){return new rh(new eh(e),new eh(t)).ComputeDiff(i).changes}class ih{static Assert(e,t){if(!e)throw new Error(t)}}class nh{static Copy(e,t,i,n,o){for(let r=0;r<o;r++)i[n+r]=e[t+r]}static Copy2(e,t,i,n,o){for(let r=0;r<o;r++)i[n+r]=e[t+r]}}class oh{constructor(){this.m_changes=[],this.m_originalStart=1073741824,this.m_modifiedStart=1073741824,this.m_originalCount=0,this.m_modifiedCount=0}MarkNextChange(){(this.m_originalCount>0||this.m_modifiedCount>0)&&this.m_changes.push(new qc(this.m_originalStart,this.m_originalCount,this.m_modifiedStart,this.m_modifiedCount)),this.m_originalCount=0,this.m_modifiedCount=0,this.m_originalStart=1073741824,this.m_modifiedStart=1073741824}AddOriginalElement(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_originalCount++}AddModifiedElement(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_modifiedCount++}getChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes}getReverseChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes.reverse(),this.m_changes}}class rh{constructor(e,t,i=null){this.ContinueProcessingPredicate=i;const[n,o,r]=rh._getElements(e),[s,a,l]=rh._getElements(t);this._hasStrings=r&&l,this._originalStringElements=n,this._originalElementsOrHash=o,this._modifiedStringElements=s,this._modifiedElementsOrHash=a,this.m_forwardHistory=[],this.m_reverseHistory=[]}static _isStringArray(e){return e.length>0&&"string"===typeof e[0]}static _getElements(e){const t=e.getElements();if(rh._isStringArray(t)){const e=new Int32Array(t.length);for(let i=0,n=t.length;i<n;i++)e[i]=Gc(t[i],0);return[t,e,!0]}return t instanceof Int32Array?[[],t,!1]:[[],new Int32Array(t),!1]}ElementsAreEqual(e,t){return this._originalElementsOrHash[e]===this._modifiedElementsOrHash[t]&&(!this._hasStrings||this._originalStringElements[e]===this._modifiedStringElements[t])}OriginalElementsAreEqual(e,t){return this._originalElementsOrHash[e]===this._originalElementsOrHash[t]&&(!this._hasStrings||this._originalStringElements[e]===this._originalStringElements[t])}ModifiedElementsAreEqual(e,t){return this._modifiedElementsOrHash[e]===this._modifiedElementsOrHash[t]&&(!this._hasStrings||this._modifiedStringElements[e]===this._modifiedStringElements[t])}ComputeDiff(e){return this._ComputeDiff(0,this._originalElementsOrHash.length-1,0,this._modifiedElementsOrHash.length-1,e)}_ComputeDiff(e,t,i,n,o){const r=[!1];let s=this.ComputeDiffRecursive(e,t,i,n,r);return o&&(s=this.PrettifyChanges(s)),{quitEarly:r[0],changes:s}}ComputeDiffRecursive(e,t,i,n,o){o[0]=!1;while(e<=t&&i<=n&&this.ElementsAreEqual(e,i))e++,i++;while(t>=e&&n>=i&&this.ElementsAreEqual(t,n))t--,n--;if(e>t||i>n){let o;return i<=n?(ih.Assert(e===t+1,"originalStart should only be one more than originalEnd"),o=[new qc(e,0,i,n-i+1)]):e<=t?(ih.Assert(i===n+1,"modifiedStart should only be one more than modifiedEnd"),o=[new qc(e,t-e+1,i,0)]):(ih.Assert(e===t+1,"originalStart should only be one more than originalEnd"),ih.Assert(i===n+1,"modifiedStart should only be one more than modifiedEnd"),o=[]),o}const r=[0],s=[0],a=this.ComputeRecursionPoint(e,t,i,n,r,s,o),l=r[0],c=s[0];if(null!==a)return a;if(!o[0]){const r=this.ComputeDiffRecursive(e,l,i,c,o);let s=[];return s=o[0]?[new qc(l+1,t-(l+1)+1,c+1,n-(c+1)+1)]:this.ComputeDiffRecursive(l+1,t,c+1,n,o),this.ConcatenateChanges(r,s)}return[new qc(e,t-e+1,i,n-i+1)]}WALKTRACE(e,t,i,n,o,r,s,a,l,c,h,d,u,g,f,m,p,_){let b=null,v=null,w=new oh,C=t,y=i,S=u[0]-m[0]-n,x=-1073741824,L=this.m_forwardHistory.length-1;do{const t=S+e;t===C||t<y&&l[t-1]<l[t+1]?(h=l[t+1],g=h-S-n,h<x&&w.MarkNextChange(),x=h,w.AddModifiedElement(h+1,g),S=t+1-e):(h=l[t-1]+1,g=h-S-n,h<x&&w.MarkNextChange(),x=h-1,w.AddOriginalElement(h,g+1),S=t-1-e),L>=0&&(l=this.m_forwardHistory[L],e=l[0],C=1,y=l.length-1)}while(--L>=-1);if(b=w.getReverseChanges(),_[0]){let e=u[0]+1,t=m[0]+1;if(null!==b&&b.length>0){const i=b[b.length-1];e=Math.max(e,i.getOriginalEnd()),t=Math.max(t,i.getModifiedEnd())}v=[new qc(e,d-e+1,t,f-t+1)]}else{w=new oh,C=r,y=s,S=u[0]-m[0]-a,x=1073741824,L=p?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{const e=S+o;e===C||e<y&&c[e-1]>=c[e+1]?(h=c[e+1]-1,g=h-S-a,h>x&&w.MarkNextChange(),x=h+1,w.AddOriginalElement(h+1,g+1),S=e+1-o):(h=c[e-1],g=h-S-a,h>x&&w.MarkNextChange(),x=h,w.AddModifiedElement(h+1,g+1),S=e-1-o),L>=0&&(c=this.m_reverseHistory[L],o=c[0],C=1,y=c.length-1)}while(--L>=-1);v=w.getChanges()}return this.ConcatenateChanges(b,v)}ComputeRecursionPoint(e,t,i,n,o,r,s){let a=0,l=0,c=0,h=0,d=0,u=0;e--,i--,o[0]=0,r[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];const g=t-e+(n-i),f=g+1,m=new Int32Array(f),p=new Int32Array(f),_=n-i,b=t-e,v=e-i,w=t-n,C=b-_,y=C%2===0;m[_]=e,p[b]=t,s[0]=!1;for(let S=1;S<=g/2+1;S++){let g=0,C=0;c=this.ClipDiagonalBound(_-S,S,_,f),h=this.ClipDiagonalBound(_+S,S,_,f);for(let e=c;e<=h;e+=2){a=e===c||e<h&&m[e-1]<m[e+1]?m[e+1]:m[e-1]+1,l=a-(e-_)-v;const i=a;while(a<t&&l<n&&this.ElementsAreEqual(a+1,l+1))a++,l++;if(m[e]=a,a+l>g+C&&(g=a,C=l),!y&&Math.abs(e-b)<=S-1&&a>=p[e])return o[0]=a,r[0]=l,i<=p[e]&&S<=1448?this.WALKTRACE(_,c,h,v,b,d,u,w,m,p,a,t,o,l,n,r,y,s):null}const x=(g-e+(C-i)-S)/2;if(null!==this.ContinueProcessingPredicate&&!this.ContinueProcessingPredicate(g,x))return s[0]=!0,o[0]=g,r[0]=C,x>0&&S<=1448?this.WALKTRACE(_,c,h,v,b,d,u,w,m,p,a,t,o,l,n,r,y,s):(e++,i++,[new qc(e,t-e+1,i,n-i+1)]);d=this.ClipDiagonalBound(b-S,S,b,f),u=this.ClipDiagonalBound(b+S,S,b,f);for(let f=d;f<=u;f+=2){a=f===d||f<u&&p[f-1]>=p[f+1]?p[f+1]-1:p[f-1],l=a-(f-b)-w;const g=a;while(a>e&&l>i&&this.ElementsAreEqual(a,l))a--,l--;if(p[f]=a,y&&Math.abs(f-_)<=S&&a<=m[f])return o[0]=a,r[0]=l,g>=m[f]&&S<=1448?this.WALKTRACE(_,c,h,v,b,d,u,w,m,p,a,t,o,l,n,r,y,s):null}if(S<=1447){let e=new Int32Array(h-c+2);e[0]=_-c+1,nh.Copy2(m,c,e,1,h-c+1),this.m_forwardHistory.push(e),e=new Int32Array(u-d+2),e[0]=b-d+1,nh.Copy2(p,d,e,1,u-d+1),this.m_reverseHistory.push(e)}}return this.WALKTRACE(_,c,h,v,b,d,u,w,m,p,a,t,o,l,n,r,y,s)}PrettifyChanges(e){for(let t=0;t<e.length;t++){const i=e[t],n=t<e.length-1?e[t+1].originalStart:this._originalElementsOrHash.length,o=t<e.length-1?e[t+1].modifiedStart:this._modifiedElementsOrHash.length,r=i.originalLength>0,s=i.modifiedLength>0;while(i.originalStart+i.originalLength<n&&i.modifiedStart+i.modifiedLength<o&&(!r||this.OriginalElementsAreEqual(i.originalStart,i.originalStart+i.originalLength))&&(!s||this.ModifiedElementsAreEqual(i.modifiedStart,i.modifiedStart+i.modifiedLength)))i.originalStart++,i.modifiedStart++;let a=[null];t<e.length-1&&this.ChangesOverlap(e[t],e[t+1],a)&&(e[t]=a[0],e.splice(t+1,1),t--)}for(let t=e.length-1;t>=0;t--){const i=e[t];let n=0,o=0;if(t>0){const i=e[t-1];i.originalLength>0&&(n=i.originalStart+i.originalLength),i.modifiedLength>0&&(o=i.modifiedStart+i.modifiedLength)}const r=i.originalLength>0,s=i.modifiedLength>0;let a=0,l=this._boundaryScore(i.originalStart,i.originalLength,i.modifiedStart,i.modifiedLength);for(let e=1;;e++){const t=i.originalStart-e,c=i.modifiedStart-e;if(t<n||c<o)break;if(r&&!this.OriginalElementsAreEqual(t,t+i.originalLength))break;if(s&&!this.ModifiedElementsAreEqual(c,c+i.modifiedLength))break;const h=this._boundaryScore(t,i.originalLength,c,i.modifiedLength);h>l&&(l=h,a=e)}i.originalStart-=a,i.modifiedStart-=a}return e}_OriginalIsBoundary(e){return e<=0||e>=this._originalElementsOrHash.length-1||this._hasStrings&&/^\s*$/.test(this._originalStringElements[e])}_OriginalRegionIsBoundary(e,t){if(this._OriginalIsBoundary(e)||this._OriginalIsBoundary(e-1))return!0;if(t>0){const i=e+t;if(this._OriginalIsBoundary(i-1)||this._OriginalIsBoundary(i))return!0}return!1}_ModifiedIsBoundary(e){return e<=0||e>=this._modifiedElementsOrHash.length-1||this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[e])}_ModifiedRegionIsBoundary(e,t){if(this._ModifiedIsBoundary(e)||this._ModifiedIsBoundary(e-1))return!0;if(t>0){const i=e+t;if(this._ModifiedIsBoundary(i-1)||this._ModifiedIsBoundary(i))return!0}return!1}_boundaryScore(e,t,i,n){const o=this._OriginalRegionIsBoundary(e,t)?1:0,r=this._ModifiedRegionIsBoundary(i,n)?1:0;return o+r}ConcatenateChanges(e,t){let i=[];if(0===e.length||0===t.length)return t.length>0?t:e;if(this.ChangesOverlap(e[e.length-1],t[0],i)){const n=new Array(e.length+t.length-1);return nh.Copy(e,0,n,0,e.length-1),n[e.length-1]=i[0],nh.Copy(t,1,n,e.length,t.length-1),n}{const i=new Array(e.length+t.length);return nh.Copy(e,0,i,0,e.length),nh.Copy(t,0,i,e.length,t.length),i}}ChangesOverlap(e,t,i){if(ih.Assert(e.originalStart<=t.originalStart,"Left change is not less than or equal to right change"),ih.Assert(e.modifiedStart<=t.modifiedStart,"Left change is not less than or equal to right change"),e.originalStart+e.originalLength>=t.originalStart||e.modifiedStart+e.modifiedLength>=t.modifiedStart){const n=e.originalStart;let o=e.originalLength;const r=e.modifiedStart;let s=e.modifiedLength;return e.originalStart+e.originalLength>=t.originalStart&&(o=t.originalStart+t.originalLength-e.originalStart),e.modifiedStart+e.modifiedLength>=t.modifiedStart&&(s=t.modifiedStart+t.modifiedLength-e.modifiedStart),i[0]=new qc(n,o,r,s),!0}return i[0]=null,!1}ClipDiagonalBound(e,t,i,n){if(e>=0&&e<n)return e;const o=i,r=n-i-1,s=t%2===0;if(e<0){const e=o%2===0;return s===e?0:1}{const e=r%2===0;return s===e?n-1:n-2}}}const sh=3;function ah(e,t,i,n){const o=new rh(e,t,i);return o.ComputeDiff(n)}class lh{constructor(e){const t=[],i=[];for(let n=0,o=e.length;n<o;n++)t[n]=fh(e[n],1),i[n]=mh(e[n],1);this.lines=e,this._startColumns=t,this._endColumns=i}getElements(){const e=[];for(let t=0,i=this.lines.length;t<i;t++)e[t]=this.lines[t].substring(this._startColumns[t]-1,this._endColumns[t]-1);return e}getStartLineNumber(e){return e+1}getEndLineNumber(e){return e+1}createCharSequence(e,t,i){const n=[],o=[],r=[];let s=0;for(let a=t;a<=i;a++){const t=this.lines[a],i=e?this._startColumns[a]:1,l=e?this._endColumns[a]:t.length+1;for(let e=i;e<l;e++)n[s]=t.charCodeAt(e-1),o[s]=a+1,r[s]=e,s++}return new ch(n,o,r)}}class ch{constructor(e,t,i){this._charCodes=e,this._lineNumbers=t,this._columns=i}getElements(){return this._charCodes}getStartLineNumber(e){return this._lineNumbers[e]}getStartColumn(e){return this._columns[e]}getEndLineNumber(e){return this._lineNumbers[e]}getEndColumn(e){return this._columns[e]+1}}class hh{constructor(e,t,i,n,o,r,s,a){this.originalStartLineNumber=e,this.originalStartColumn=t,this.originalEndLineNumber=i,this.originalEndColumn=n,this.modifiedStartLineNumber=o,this.modifiedStartColumn=r,this.modifiedEndLineNumber=s,this.modifiedEndColumn=a}static createFromDiffChange(e,t,i){let n,o,r,s,a,l,c,h;return 0===e.originalLength?(n=0,o=0,r=0,s=0):(n=t.getStartLineNumber(e.originalStart),o=t.getStartColumn(e.originalStart),r=t.getEndLineNumber(e.originalStart+e.originalLength-1),s=t.getEndColumn(e.originalStart+e.originalLength-1)),0===e.modifiedLength?(a=0,l=0,c=0,h=0):(a=i.getStartLineNumber(e.modifiedStart),l=i.getStartColumn(e.modifiedStart),c=i.getEndLineNumber(e.modifiedStart+e.modifiedLength-1),h=i.getEndColumn(e.modifiedStart+e.modifiedLength-1)),new hh(n,o,r,s,a,l,c,h)}}function dh(e){if(e.length<=1)return e;const t=[e[0]];let i=t[0];for(let n=1,o=e.length;n<o;n++){const o=e[n],r=o.originalStart-(i.originalStart+i.originalLength),s=o.modifiedStart-(i.modifiedStart+i.modifiedLength),a=Math.min(r,s);a<sh?(i.originalLength=o.originalStart+o.originalLength-i.originalStart,i.modifiedLength=o.modifiedStart+o.modifiedLength-i.modifiedStart):(t.push(o),i=o)}return t}class uh{constructor(e,t,i,n,o){this.originalStartLineNumber=e,this.originalEndLineNumber=t,this.modifiedStartLineNumber=i,this.modifiedEndLineNumber=n,this.charChanges=o}static createFromDiffResult(e,t,i,n,o,r,s){let a,l,c,h,d=void 0;if(0===t.originalLength?(a=i.getStartLineNumber(t.originalStart)-1,l=0):(a=i.getStartLineNumber(t.originalStart),l=i.getEndLineNumber(t.originalStart+t.originalLength-1)),0===t.modifiedLength?(c=n.getStartLineNumber(t.modifiedStart)-1,h=0):(c=n.getStartLineNumber(t.modifiedStart),h=n.getEndLineNumber(t.modifiedStart+t.modifiedLength-1)),r&&t.originalLength>0&&t.originalLength<20&&t.modifiedLength>0&&t.modifiedLength<20&&o()){const r=i.createCharSequence(e,t.originalStart,t.originalStart+t.originalLength-1),a=n.createCharSequence(e,t.modifiedStart,t.modifiedStart+t.modifiedLength-1);let l=ah(r,a,o,!0).changes;s&&(l=dh(l)),d=[];for(let e=0,t=l.length;e<t;e++)d.push(hh.createFromDiffChange(l[e],r,a))}return new uh(a,l,c,h,d)}}class gh{constructor(e,t,i){this.shouldComputeCharChanges=i.shouldComputeCharChanges,this.shouldPostProcessCharChanges=i.shouldPostProcessCharChanges,this.shouldIgnoreTrimWhitespace=i.shouldIgnoreTrimWhitespace,this.shouldMakePrettyDiff=i.shouldMakePrettyDiff,this.originalLines=e,this.modifiedLines=t,this.original=new lh(e),this.modified=new lh(t),this.continueLineDiff=ph(i.maxComputationTime),this.continueCharDiff=ph(0===i.maxComputationTime?0:Math.min(i.maxComputationTime,5e3))}computeDiff(){if(1===this.original.lines.length&&0===this.original.lines[0].length)return{quitEarly:!1,changes:[{originalStartLineNumber:1,originalEndLineNumber:1,modifiedStartLineNumber:1,modifiedEndLineNumber:this.modified.lines.length,charChanges:[{modifiedEndColumn:0,modifiedEndLineNumber:0,modifiedStartColumn:0,modifiedStartLineNumber:0,originalEndColumn:0,originalEndLineNumber:0,originalStartColumn:0,originalStartLineNumber:0}]}]};if(1===this.modified.lines.length&&0===this.modified.lines[0].length)return{quitEarly:!1,changes:[{originalStartLineNumber:1,originalEndLineNumber:this.original.lines.length,modifiedStartLineNumber:1,modifiedEndLineNumber:1,charChanges:[{modifiedEndColumn:0,modifiedEndLineNumber:0,modifiedStartColumn:0,modifiedStartLineNumber:0,originalEndColumn:0,originalEndLineNumber:0,originalStartColumn:0,originalStartLineNumber:0}]}]};const e=ah(this.original,this.modified,this.continueLineDiff,this.shouldMakePrettyDiff),t=e.changes,i=e.quitEarly;if(this.shouldIgnoreTrimWhitespace){const e=[];for(let i=0,n=t.length;i<n;i++)e.push(uh.createFromDiffResult(this.shouldIgnoreTrimWhitespace,t[i],this.original,this.modified,this.continueCharDiff,this.shouldComputeCharChanges,this.shouldPostProcessCharChanges));return{quitEarly:i,changes:e}}const n=[];let o=0,r=0;for(let s=-1,a=t.length;s<a;s++){const e=s+1<a?t[s+1]:null,i=e?e.originalStart:this.originalLines.length,l=e?e.modifiedStart:this.modifiedLines.length;while(o<i&&r<l){const e=this.originalLines[o],t=this.modifiedLines[r];if(e!==t){{let i=fh(e,1),s=fh(t,1);while(i>1&&s>1){const n=e.charCodeAt(i-2),o=t.charCodeAt(s-2);if(n!==o)break;i--,s--}(i>1||s>1)&&this._pushTrimWhitespaceCharChange(n,o+1,1,i,r+1,1,s)}{let i=mh(e,1),s=mh(t,1);const a=e.length+1,l=t.length+1;while(i<a&&s<l){const t=e.charCodeAt(i-1),n=e.charCodeAt(s-1);if(t!==n)break;i++,s++}(i<a||s<l)&&this._pushTrimWhitespaceCharChange(n,o+1,i,a,r+1,s,l)}}o++,r++}e&&(n.push(uh.createFromDiffResult(this.shouldIgnoreTrimWhitespace,e,this.original,this.modified,this.continueCharDiff,this.shouldComputeCharChanges,this.shouldPostProcessCharChanges)),o+=e.originalLength,r+=e.modifiedLength)}return{quitEarly:i,changes:n}}_pushTrimWhitespaceCharChange(e,t,i,n,o,r,s){if(this._mergeTrimWhitespaceCharChange(e,t,i,n,o,r,s))return;let a=void 0;this.shouldComputeCharChanges&&(a=[new hh(t,i,t,n,o,r,o,s)]),e.push(new uh(t,t,o,o,a))}_mergeTrimWhitespaceCharChange(e,t,i,n,o,r,s){const a=e.length;if(0===a)return!1;const l=e[a-1];return 0!==l.originalEndLineNumber&&0!==l.modifiedEndLineNumber&&(l.originalEndLineNumber+1===t&&l.modifiedEndLineNumber+1===o&&(l.originalEndLineNumber=t,l.modifiedEndLineNumber=o,this.shouldComputeCharChanges&&l.charChanges&&l.charChanges.push(new hh(t,i,t,n,o,r,o,s)),!0))}}function fh(e,t){const i=yr["u"](e);return-1===i?t:i+1}function mh(e,t){const i=yr["H"](e);return-1===i?t:i+2}function ph(e){if(0===e)return()=>!0;const t=Date.now();return()=>Date.now()-t<e}function _h(e){return e<0?0:e>255?255:0|e}function bh(e){return e<0?0:e>4294967295?4294967295:0|e}class vh{constructor(e,t){this.index=e,this.remainder=t}}class wh{constructor(e){this.values=e,this.prefixSum=new Uint32Array(e.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(e,t){e=bh(e);const i=this.values,n=this.prefixSum,o=t.length;return 0!==o&&(this.values=new Uint32Array(i.length+o),this.values.set(i.subarray(0,e),0),this.values.set(i.subarray(e),e+o),this.values.set(t,e),e-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=e-1),this.prefixSum=new Uint32Array(this.values.length),this.prefixSumValidIndex[0]>=0&&this.prefixSum.set(n.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}changeValue(e,t){return e=bh(e),t=bh(t),this.values[e]!==t&&(this.values[e]=t,e-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=e-1),!0)}removeValues(e,t){e=bh(e),t=bh(t);const i=this.values,n=this.prefixSum;if(e>=i.length)return!1;let o=i.length-e;return t>=o&&(t=o),0!==t&&(this.values=new Uint32Array(i.length-t),this.values.set(i.subarray(0,e),0),this.values.set(i.subarray(e+t),e),this.prefixSum=new Uint32Array(this.values.length),e-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=e-1),this.prefixSumValidIndex[0]>=0&&this.prefixSum.set(n.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}getTotalValue(){return 0===this.values.length?0:this._getAccumulatedValue(this.values.length-1)}getAccumulatedValue(e){return e<0?0:(e=bh(e),this._getAccumulatedValue(e))}_getAccumulatedValue(e){if(e<=this.prefixSumValidIndex[0])return this.prefixSum[e];let t=this.prefixSumValidIndex[0]+1;0===t&&(this.prefixSum[0]=this.values[0],t++),e>=this.values.length&&(e=this.values.length-1);for(let i=t;i<=e;i++)this.prefixSum[i]=this.prefixSum[i-1]+this.values[i];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],e),this.prefixSum[e]}getIndexOf(e){e=Math.floor(e),this.getTotalValue();let t=0,i=this.values.length-1,n=0,o=0,r=0;while(t<=i)if(n=t+(i-t)/2|0,o=this.prefixSum[n],r=o-this.values[n],e<r)i=n-1;else{if(!(e>=o))break;t=n+1}return new vh(n,e-r)}}class Ch{constructor(e,t,i,n){this._uri=e,this._lines=t,this._eol=i,this._versionId=n,this._lineStarts=null,this._cachedTextValue=null}dispose(){this._lines.length=0}getText(){return null===this._cachedTextValue&&(this._cachedTextValue=this._lines.join(this._eol)),this._cachedTextValue}onEvents(e){e.eol&&e.eol!==this._eol&&(this._eol=e.eol,this._lineStarts=null);const t=e.changes;for(const i of t)this._acceptDeleteRange(i.range),this._acceptInsertText(new Qt(i.range.startLineNumber,i.range.startColumn),i.text);this._versionId=e.versionId,this._cachedTextValue=null}_ensureLineStarts(){if(!this._lineStarts){const e=this._eol.length,t=this._lines.length,i=new Uint32Array(t);for(let n=0;n<t;n++)i[n]=this._lines[n].length+e;this._lineStarts=new wh(i)}}_setLineText(e,t){this._lines[e]=t,this._lineStarts&&this._lineStarts.changeValue(e,this._lines[e].length+this._eol.length)}_acceptDeleteRange(e){if(e.startLineNumber!==e.endLineNumber)this._setLineText(e.startLineNumber-1,this._lines[e.startLineNumber-1].substring(0,e.startColumn-1)+this._lines[e.endLineNumber-1].substring(e.endColumn-1)),this._lines.splice(e.startLineNumber,e.endLineNumber-e.startLineNumber),this._lineStarts&&this._lineStarts.removeValues(e.startLineNumber,e.endLineNumber-e.startLineNumber);else{if(e.startColumn===e.endColumn)return;this._setLineText(e.startLineNumber-1,this._lines[e.startLineNumber-1].substring(0,e.startColumn-1)+this._lines[e.startLineNumber-1].substring(e.endColumn-1))}}_acceptInsertText(e,t){if(0===t.length)return;let i=t.split(/\r\n|\r|\n/);if(1===i.length)return void this._setLineText(e.lineNumber-1,this._lines[e.lineNumber-1].substring(0,e.column-1)+i[0]+this._lines[e.lineNumber-1].substring(e.column-1));i[i.length-1]+=this._lines[e.lineNumber-1].substring(e.column-1),this._setLineText(e.lineNumber-1,this._lines[e.lineNumber-1].substring(0,e.column-1)+i[0]);let n=new Uint32Array(i.length-1);for(let o=1;o<i.length;o++)this._lines.splice(e.lineNumber+o-1,0,i[o]),n[o-1]=i[o].length+this._eol.length;this._lineStarts&&this._lineStarts.insertValues(e.lineNumber,n)}}class yh{constructor(e){let t=_h(e);this._defaultValue=t,this._asciiMap=yh._createAsciiMap(t),this._map=new Map}static _createAsciiMap(e){let t=new Uint8Array(256);for(let i=0;i<256;i++)t[i]=e;return t}set(e,t){let i=_h(t);e>=0&&e<256?this._asciiMap[e]=i:this._map.set(e,i)}get(e){return e>=0&&e<256?this._asciiMap[e]:this._map.get(e)||this._defaultValue}}class Sh{constructor(e,t,i){const n=new Uint8Array(e*t);for(let o=0,r=e*t;o<r;o++)n[o]=i;this._data=n,this.rows=e,this.cols=t}get(e,t){return this._data[e*this.cols+t]}set(e,t,i){this._data[e*this.cols+t]=i}}class xh{constructor(e){let t=0,i=0;for(let o=0,r=e.length;o<r;o++){let[n,r,s]=e[o];r>t&&(t=r),n>i&&(i=n),s>i&&(i=s)}t++,i++;let n=new Sh(i,t,0);for(let o=0,r=e.length;o<r;o++){let[t,i,r]=e[o];n.set(t,i,r)}this._states=n,this._maxCharCode=t}nextState(e,t){return t<0||t>=this._maxCharCode?0:this._states.get(e,t)}}let Lh=null;function kh(){return null===Lh&&(Lh=new xh([[1,104,2],[1,72,2],[1,102,6],[1,70,6],[2,116,3],[2,84,3],[3,116,4],[3,84,4],[4,112,5],[4,80,5],[5,115,9],[5,83,9],[5,58,10],[6,105,7],[6,73,7],[7,108,8],[7,76,8],[8,101,9],[8,69,9],[9,58,10],[10,47,11],[11,47,12]])),Lh}let Eh=null;function Dh(){if(null===Eh){Eh=new yh(0);const e=" \t<>'\"、。。、,.:;‘“〈《「『【〔([{「」}])〕】』」》〉”’`~…";for(let i=0;i<e.length;i++)Eh.set(e.charCodeAt(i),1);const t=".,;";for(let i=0;i<t.length;i++)Eh.set(t.charCodeAt(i),2)}return Eh}class Nh{static _createLink(e,t,i,n,o){let r=o-1;do{const i=t.charCodeAt(r),n=e.get(i);if(2!==n)break;r--}while(r>n);if(n>0){const e=t.charCodeAt(n-1),i=t.charCodeAt(r);(40===e&&41===i||91===e&&93===i||123===e&&125===i)&&r--}return{range:{startLineNumber:i,startColumn:n+1,endLineNumber:i,endColumn:r+2},url:t.substring(n,r+1)}}static computeLinks(e,t=kh()){const i=Dh();let n=[];for(let o=1,r=e.getLineCount();o<=r;o++){const r=e.getLineContent(o),s=r.length;let a=0,l=0,c=0,h=1,d=!1,u=!1,g=!1,f=!1;while(a<s){let e=!1;const s=r.charCodeAt(a);if(13===h){let t;switch(s){case 40:d=!0,t=0;break;case 41:t=d?0:1;break;case 91:g=!0,u=!0,t=0;break;case 93:g=!1,t=u?0:1;break;case 123:f=!0,t=0;break;case 125:t=f?0:1;break;case 39:t=34===c||96===c?0:1;break;case 34:t=39===c||96===c?0:1;break;case 96:t=39===c||34===c?0:1;break;case 42:t=42===c?1:0;break;case 124:t=124===c?1:0;break;case 32:t=g?0:1;break;default:t=i.get(s)}1===t&&(n.push(Nh._createLink(i,r,o,l,a)),e=!0)}else if(12===h){let t;91===s?(u=!0,t=0):t=i.get(s),1===t?e=!0:h=13}else h=t.nextState(h,s),0===h&&(e=!0);e&&(h=1,d=!1,u=!1,f=!1,l=a+1,c=s),a++}13===h&&n.push(Nh._createLink(i,r,o,l,s))}return n}}function Th(e){return e&&"function"===typeof e.getLineCount&&"function"===typeof e.getLineContent?Nh.computeLinks(e):[]}class Mh{constructor(){this._defaultValueSet=[["true","false"],["True","False"],["Private","Public","Friend","ReadOnly","Partial","Protected","WriteOnly"],["public","protected","private"]]}navigateValueSet(e,t,i,n,o){if(e&&t){let i=this.doNavigateValueSet(t,o);if(i)return{range:e,value:i}}if(i&&n){let e=this.doNavigateValueSet(n,o);if(e)return{range:i,value:e}}return null}doNavigateValueSet(e,t){let i=this.numberReplace(e,t);return null!==i?i:this.textReplace(e,t)}numberReplace(e,t){let i=Math.pow(10,e.length-(e.lastIndexOf(".")+1)),n=Number(e),o=parseFloat(e);return isNaN(n)||isNaN(o)||n!==o?null:0!==n||t?(n=Math.floor(n*i),n+=t?i:-i,String(n/i)):null}textReplace(e,t){return this.valueSetsReplace(this._defaultValueSet,e,t)}valueSetsReplace(e,t,i){let n=null;for(let o=0,r=e.length;null===n&&o<r;o++)n=this.valueSetReplace(e[o],t,i);return n}valueSetReplace(e,t,i){let n=e.indexOf(t);return n>=0?(n+=i?1:-1,n<0?n=e.length-1:n%=e.length,e[n]):null}}Mh.INSTANCE=new Mh;var Ih=function(e,t,i,n){function o(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,r){function s(e){try{l(n.next(e))}catch(t){r(t)}}function a(e){try{l(n["throw"](e))}catch(t){r(t)}}function l(e){e.done?i(e.value):o(e.value).then(s,a)}l((n=n.apply(e,t||[])).next())}))};class Oh extends Ch{get uri(){return this._uri}get version(){return this._versionId}get eol(){return this._eol}getValue(){return this.getText()}getLinesContent(){return this._lines.slice(0)}getLineCount(){return this._lines.length}getLineContent(e){return this._lines[e-1]}getWordAtPosition(e,t){let i=d(e.column,c(t),this._lines[e.lineNumber-1],0);return i?new Jt(e.lineNumber,i.startColumn,e.lineNumber,i.endColumn):null}words(e){const t=this._lines,i=this._wordenize.bind(this);let n=0,o="",r=0,s=[];return{*[Symbol.iterator](){while(1)if(r<s.length){const e=o.substring(s[r].start,s[r].end);r+=1,yield e}else{if(!(n<t.length))break;o=t[n],s=i(o,e),r=0,n+=1}}}}getLineWords(e,t){let i=this._lines[e-1],n=this._wordenize(i,t),o=[];for(const r of n)o.push({word:i.substring(r.start,r.end),startColumn:r.start+1,endColumn:r.end+1});return o}_wordenize(e,t){const i=[];let n;t.lastIndex=0;while(n=t.exec(e)){if(0===n[0].length)break;i.push({start:n.index,end:n.index+n[0].length})}return i}getValueInRange(e){if(e=this._validateRange(e),e.startLineNumber===e.endLineNumber)return this._lines[e.startLineNumber-1].substring(e.startColumn-1,e.endColumn-1);let t=this._eol,i=e.startLineNumber-1,n=e.endLineNumber-1,o=[];o.push(this._lines[i].substring(e.startColumn-1));for(let r=i+1;r<n;r++)o.push(this._lines[r]);return o.push(this._lines[n].substring(0,e.endColumn-1)),o.join(t)}offsetAt(e){return e=this._validatePosition(e),this._ensureLineStarts(),this._lineStarts.getAccumulatedValue(e.lineNumber-2)+(e.column-1)}positionAt(e){e=Math.floor(e),e=Math.max(0,e),this._ensureLineStarts();let t=this._lineStarts.getIndexOf(e),i=this._lines[t.index].length;return{lineNumber:1+t.index,column:1+Math.min(t.remainder,i)}}_validateRange(e){const t=this._validatePosition({lineNumber:e.startLineNumber,column:e.startColumn}),i=this._validatePosition({lineNumber:e.endLineNumber,column:e.endColumn});return t.lineNumber!==e.startLineNumber||t.column!==e.startColumn||i.lineNumber!==e.endLineNumber||i.column!==e.endColumn?{startLineNumber:t.lineNumber,startColumn:t.column,endLineNumber:i.lineNumber,endColumn:i.column}:e}_validatePosition(e){if(!Qt.isIPosition(e))throw new Error("bad position");let{lineNumber:t,column:i}=e,n=!1;if(t<1)t=1,i=1,n=!0;else if(t>this._lines.length)t=this._lines.length,i=this._lines[t-1].length+1,n=!0;else{let e=this._lines[t-1].length+1;i<1?(i=1,n=!0):i>e&&(i=e,n=!0)}return n?{lineNumber:t,column:i}:e}}class Ah{constructor(e,t){this._host=e,this._models=Object.create(null),this._foreignModuleFactory=t,this._foreignModule=null}dispose(){this._models=Object.create(null)}_getModel(e){return this._models[e]}_getModels(){let e=[];return Object.keys(this._models).forEach(t=>e.push(this._models[t])),e}acceptNewModel(e){this._models[e.url]=new Oh(Ht.parse(e.url),e.lines,e.EOL,e.versionId)}acceptModelChanged(e,t){if(!this._models[e])return;let i=this._models[e];i.onEvents(t)}acceptRemovedModel(e){this._models[e]&&delete this._models[e]}computeDiff(e,t,i,n){return Ih(this,void 0,void 0,(function*(){const o=this._getModel(e),r=this._getModel(t);if(!o||!r)return null;const s=o.getLinesContent(),a=r.getLinesContent(),l=new gh(s,a,{shouldComputeCharChanges:!0,shouldPostProcessCharChanges:!0,shouldIgnoreTrimWhitespace:i,shouldMakePrettyDiff:!0,maxComputationTime:n}),c=l.computeDiff(),h=!(c.changes.length>0)&&this._modelsAreIdentical(o,r);return{quitEarly:c.quitEarly,identical:h,changes:c.changes}}))}_modelsAreIdentical(e,t){const i=e.getLineCount(),n=t.getLineCount();if(i!==n)return!1;for(let o=1;o<=i;o++){const i=e.getLineContent(o),n=t.getLineContent(o);if(i!==n)return!1}return!0}computeMoreMinimalEdits(e,t){return Ih(this,void 0,void 0,(function*(){const i=this._getModel(e);if(!i)return t;const n=[];let o=void 0;t=Pn(t,(e,t)=>{if(e.range&&t.range)return Jt.compareRangesUsingStarts(e.range,t.range);let i=e.range?0:1,n=t.range?0:1;return i-n});for(let{range:e,text:r,eol:s}of t){if("number"===typeof s&&(o=s),Jt.isEmpty(e)&&!r)continue;const t=i.getValueInRange(e);if(r=r.replace(/\r\n|\n|\r/g,i.eol),t===r)continue;if(Math.max(r.length,t.length)>Ah._diffLimit){n.push({range:e,text:r});continue}const a=th(t,r,!1),l=i.offsetAt(Jt.lift(e).getStartPosition());for(const e of a){const t=i.positionAt(l+e.originalStart),o=i.positionAt(l+e.originalStart+e.originalLength),s={text:r.substr(e.modifiedStart,e.modifiedLength),range:{startLineNumber:t.lineNumber,startColumn:t.column,endLineNumber:o.lineNumber,endColumn:o.column}};i.getValueInRange(s.range)!==s.text&&n.push(s)}}return"number"===typeof o&&n.push({eol:o,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),n}))}computeLinks(e){return Ih(this,void 0,void 0,(function*(){let t=this._getModel(e);return t?Th(t):null}))}textualSuggest(e,t,i,n){return Ih(this,void 0,void 0,(function*(){const o=this._getModel(e);if(!o)return null;const r=[],s=new Set,a=new RegExp(i,n),l=o.getWordAtPosition(t,a);l&&s.add(o.getValueInRange(l));for(let e of o.words(a))if(!s.has(e)&&(s.add(e),isNaN(Number(e))&&(r.push(e),s.size>Ah._suggestionsLimit)))break;return r}))}computeWordRanges(e,t,i,n){return Ih(this,void 0,void 0,(function*(){let o=this._getModel(e);if(!o)return Object.create(null);const r=new RegExp(i,n),s=Object.create(null);for(let e=t.startLineNumber;e<t.endLineNumber;e++){let t=o.getLineWords(e,r);for(const i of t){if(!isNaN(Number(i.word)))continue;let t=s[i.word];t||(t=[],s[i.word]=t),t.push({startLineNumber:e,startColumn:i.startColumn,endLineNumber:e,endColumn:i.endColumn})}}return s}))}navigateValueSet(e,t,i,n,o){return Ih(this,void 0,void 0,(function*(){let r=this._getModel(e);if(!r)return null;let s=new RegExp(n,o);t.startColumn===t.endColumn&&(t={startLineNumber:t.startLineNumber,startColumn:t.startColumn,endLineNumber:t.endLineNumber,endColumn:t.endColumn+1});let a=r.getValueInRange(t),l=r.getWordAtPosition({lineNumber:t.startLineNumber,column:t.startColumn},s);if(!l)return null;let c=r.getValueInRange(l),h=Mh.INSTANCE.navigateValueSet(t,a,l,c,i);return h}))}loadForeignModule(e,t,i){const n=(e,t)=>this._host.fhr(e,t),o=jr(i,n);let r={host:o,getMirrorModels:()=>this._getModels()};return this._foreignModuleFactory?(this._foreignModule=this._foreignModuleFactory(r,t),Promise.resolve(Ur(this._foreignModule))):Promise.reject(new Error("Unexpected usage"))}fmr(e,t){if(!this._foreignModule||"function"!==typeof this._foreignModule[e])return Promise.reject(new Error("Missing requestHandler or method: "+e));try{return Promise.resolve(this._foreignModule[e].apply(this._foreignModule,t))}catch(i){return Promise.reject(i)}}}Ah._diffLimit=1e5,Ah._suggestionsLimit=1e4,"function"===typeof importScripts&&(r["b"].monaco=Wi());const Rh=zi("textResourceConfigurationService"),Ph=zi("textResourcePropertiesService"),Fh=zi("logService");var Wh;(function(e){e[e["Trace"]=0]="Trace",e[e["Debug"]=1]="Debug",e[e["Info"]=2]="Info",e[e["Warning"]=3]="Warning",e[e["Error"]=4]="Error",e[e["Critical"]=5]="Critical",e[e["Off"]=6]="Off"})(Wh||(Wh={}));const Bh=Wh.Info;class Vh extends Oe{constructor(){super(...arguments),this.level=Bh,this._onDidChangeLogLevel=this._register(new Ve)}setLevel(e){this.level!==e&&(this.level=e,this._onDidChangeLogLevel.fire(this.level))}getLevel(){return this.level}}class Hh extends Vh{constructor(e=Bh){super(),this.setLevel(e)}trace(e,...t){this.getLevel()<=Wh.Trace&&console.log("%cTRACE","color: #888",e,...t)}info(e,...t){this.getLevel()<=Wh.Info&&console.log("%c INFO","color: #33f",e,...t)}error(e,...t){this.getLevel()<=Wh.Error&&console.log("%c ERR","color: #f33",e,...t)}dispose(){}}const zh=r["b"].performance&&"function"===typeof r["b"].performance.now;class Uh{constructor(e){this._highResolution=zh&&e,this._startTime=this._now(),this._stopTime=-1}static create(e=!0){return new Uh(e)}stop(){this._stopTime=this._now()}elapsed(){return-1!==this._stopTime?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?r["b"].performance.now():(new Date).getTime()}}var jh=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Kh=function(e,t){return function(i,n){t(i,n,e)}},qh=function(e,t,i,n){function o(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,r){function s(e){try{l(n.next(e))}catch(t){r(t)}}function a(e){try{l(n["throw"](e))}catch(t){r(t)}}function l(e){e.done?i(e.value):o(e.value).then(s,a)}l((n=n.apply(e,t||[])).next())}))};const $h=6e4,Gh=3e5;function Yh(e,t){let i=e.getModel(t);return!!i&&!i.isTooLargeForSyncing()}let Xh=class extends Oe{constructor(e,t,i){super(),this._modelService=e,this._workerManager=this._register(new Qh(this._modelService)),this._logService=i,this._register(Bl.register("*",{provideLinks:(e,t)=>Yh(this._modelService,e.uri)?this._workerManager.withWorker().then(t=>t.computeLinks(e.uri)).then(e=>e&&{links:e}):Promise.resolve({links:[]})})),this._register(xl.register("*",new Zh(this._workerManager,t,this._modelService)))}dispose(){super.dispose()}canComputeDiff(e,t){return Yh(this._modelService,e)&&Yh(this._modelService,t)}computeDiff(e,t,i,n){return this._workerManager.withWorker().then(o=>o.computeDiff(e,t,i,n))}computeMoreMinimalEdits(e,t){if(Hn(t)){if(!Yh(this._modelService,e))return Promise.resolve(t);const i=Uh.create(!0),n=this._workerManager.withWorker().then(i=>i.computeMoreMinimalEdits(e,t));return n.finally(()=>this._logService.trace("FORMAT#computeMoreMinimalEdits",e.toString(!0),i.elapsed())),n}return Promise.resolve(void 0)}canNavigateValueSet(e){return Yh(this._modelService,e)}navigateValueSet(e,t,i){return this._workerManager.withWorker().then(n=>n.navigateValueSet(e,t,i))}canComputeWordRanges(e){return Yh(this._modelService,e)}computeWordRanges(e,t){return this._workerManager.withWorker().then(i=>i.computeWordRanges(e,t))}};Xh=jh([Kh(0,aa),Kh(1,Rh),Kh(2,Fh)],Xh);class Zh{constructor(e,t,i){this._debugDisplayName="wordbasedCompletions",this._workerManager=e,this._configurationService=t,this._modelService=i}provideCompletionItems(e,t){return qh(this,void 0,void 0,(function*(){const{wordBasedSuggestions:i}=this._configurationService.getValue(e.uri,t,"editor");if(!i)return;if(!Yh(this._modelService,e.uri))return;const n=e.getWordAtPosition(t),o=n?new Jt(t.lineNumber,n.startColumn,t.lineNumber,n.endColumn):Jt.fromPositions(t),r=o.setEndPosition(t.lineNumber,t.column),s=yield this._workerManager.withWorker(),a=yield s.textualSuggest(e.uri,t);return a?{suggestions:a.map(e=>({kind:18,label:e,insertText:e,range:{insert:r,replace:o}}))}:void 0}))}}class Qh extends Oe{constructor(e){super(),this._modelService=e,this._editorWorkerClient=null,this._lastWorkerUsedTime=(new Date).getTime();let t=this._register(new Nn);t.cancelAndSet(()=>this._checkStopIdleWorker(),Math.round(Gh/2)),this._register(this._modelService.onModelRemoved(e=>this._checkStopEmptyWorker()))}dispose(){this._editorWorkerClient&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null),super.dispose()}_checkStopEmptyWorker(){if(!this._editorWorkerClient)return;let e=this._modelService.getModels();0===e.length&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}_checkStopIdleWorker(){if(!this._editorWorkerClient)return;let e=(new Date).getTime()-this._lastWorkerUsedTime;e>Gh&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}withWorker(){return this._lastWorkerUsedTime=(new Date).getTime(),this._editorWorkerClient||(this._editorWorkerClient=new id(this._modelService,!1,"editorWorkerService")),Promise.resolve(this._editorWorkerClient)}}class Jh extends Oe{constructor(e,t,i){if(super(),this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),this._proxy=e,this._modelService=t,!i){let e=new Nn;e.cancelAndSet(()=>this._checkStopModelSync(),Math.round($h/2)),this._register(e)}}dispose(){for(let e in this._syncedModels)Ne(this._syncedModels[e]);this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),super.dispose()}ensureSyncedResources(e){for(const t of e){let e=t.toString();this._syncedModels[e]||this._beginModelSync(t),this._syncedModels[e]&&(this._syncedModelsLastUsedTime[e]=(new Date).getTime())}}_checkStopModelSync(){let e=(new Date).getTime(),t=[];for(let i in this._syncedModelsLastUsedTime){let n=e-this._syncedModelsLastUsedTime[i];n>$h&&t.push(i)}for(const i of t)this._stopModelSync(i)}_beginModelSync(e){let t=this._modelService.getModel(e);if(!t)return;if(t.isTooLargeForSyncing())return;let i=e.toString();this._proxy.acceptNewModel({url:t.uri.toString(),lines:t.getLinesContent(),EOL:t.getEOL(),versionId:t.getVersionId()});const n=new Ie;n.add(t.onDidChangeContent(e=>{this._proxy.acceptModelChanged(i.toString(),e)})),n.add(t.onWillDispose(()=>{this._stopModelSync(i)})),n.add(Me(()=>{this._proxy.acceptRemovedModel(i)})),this._syncedModels[i]=n}_stopModelSync(e){let t=this._syncedModels[e];delete this._syncedModels[e],delete this._syncedModelsLastUsedTime[e],Ne(t)}}class ed{constructor(e){this._instance=e,this._proxyObj=Promise.resolve(this._instance)}dispose(){this._instance.dispose()}getProxyObject(){return this._proxyObj}}class td{constructor(e){this._workerClient=e}fhr(e,t){return this._workerClient.fhr(e,t)}}class id extends Oe{constructor(e,t,i){super(),this._disposed=!1,this._modelService=e,this._keepIdleModels=t,this._workerFactory=new cc(i),this._worker=null,this._modelManager=null}fhr(e,t){throw new Error("Not implemented!")}_getOrCreateWorker(){if(!this._worker)try{this._worker=this._register(new rc(this._workerFactory,"vs/editor/common/services/editorSimpleWorker",new td(this)))}catch(e){nc(e),this._worker=new ed(new Ah(new td(this),null))}return this._worker}_getProxy(){return this._getOrCreateWorker().getProxyObject().then(void 0,e=>(nc(e),this._worker=new ed(new Ah(new td(this),null)),this._getOrCreateWorker().getProxyObject()))}_getOrCreateModelManager(e){return this._modelManager||(this._modelManager=this._register(new Jh(e,this._modelService,this._keepIdleModels))),this._modelManager}_withSyncedResources(e){return this._disposed?Promise.reject(ve()):this._getProxy().then(t=>(this._getOrCreateModelManager(t).ensureSyncedResources(e),t))}computeDiff(e,t,i,n){return this._withSyncedResources([e,t]).then(o=>o.computeDiff(e.toString(),t.toString(),i,n))}computeMoreMinimalEdits(e,t){return this._withSyncedResources([e]).then(i=>i.computeMoreMinimalEdits(e.toString(),t))}computeLinks(e){return this._withSyncedResources([e]).then(t=>t.computeLinks(e.toString()))}textualSuggest(e,t){return this._withSyncedResources([e]).then(i=>{let n=this._modelService.getModel(e);if(!n)return null;let o=Kc.getWordDefinition(n.getLanguageIdentifier().id),r=o.source,s=Object(yr["L"])(o);return i.textualSuggest(e.toString(),t,r,s)})}computeWordRanges(e,t){return this._withSyncedResources([e]).then(i=>{let n=this._modelService.getModel(e);if(!n)return Promise.resolve(null);let o=Kc.getWordDefinition(n.getLanguageIdentifier().id),r=o.source,s=Object(yr["L"])(o);return i.computeWordRanges(e.toString(),t,r,s)})}navigateValueSet(e,t,i){return this._withSyncedResources([e]).then(n=>{let o=this._modelService.getModel(e);if(!o)return null;let r=Kc.getWordDefinition(o.getLanguageIdentifier().id),s=r.source,a=Object(yr["L"])(r);return n.navigateValueSet(e.toString(),t,i,s,a)})}dispose(){super.dispose(),this._disposed=!0}}function nd(e,t){return new od(e,t)}class od extends id{constructor(e,t){super(e,t.keepIdleModels||!1,t.label),this._foreignModuleId=t.moduleId,this._foreignModuleCreateData=t.createData||null,this._foreignModuleHost=t.host||null,this._foreignProxy=null}fhr(e,t){if(!this._foreignModuleHost||"function"!==typeof this._foreignModuleHost[e])return Promise.reject(new Error("Missing method "+e+" or missing main thread foreign host."));try{return Promise.resolve(this._foreignModuleHost[e].apply(this._foreignModuleHost,t))}catch(i){return Promise.reject(i)}}_getForeignProxy(){return this._foreignProxy||(this._foreignProxy=this._getProxy().then(e=>{const t=this._foreignModuleHost?Ur(this._foreignModuleHost):[];return e.loadForeignModule(this._foreignModuleId,this._foreignModuleCreateData,t).then(t=>{this._foreignModuleCreateData=null;const i=(t,i)=>e.fmr(t,i),n=(e,t)=>function(){const i=Array.prototype.slice.call(arguments,0);return t(e,i)};let o={};for(const e of t)o[e]=n(e,i);return o})})),this._foreignProxy}getProxy(){return this._getForeignProxy()}withSyncedResources(e){return this._withSyncedResources(e).then(e=>this.getProxy())}}class rd{constructor(e,t){this._tokens=e,this._tokensCount=this._tokens.length>>>1,this._text=t}equals(e){return e instanceof rd&&this.slicedEquals(e,0,this._tokensCount)}slicedEquals(e,t,i){if(this._text!==e._text)return!1;if(this._tokensCount!==e._tokensCount)return!1;const n=t<<1,o=n+(i<<1);for(let r=n;r<o;r++)if(this._tokens[r]!==e._tokens[r])return!1;return!0}getLineContent(){return this._text}getCount(){return this._tokensCount}getStartOffset(e){return e>0?this._tokens[e-1<<1]:0}getMetadata(e){const t=this._tokens[1+(e<<1)];return t}getLanguageId(e){const t=this._tokens[1+(e<<1)];return _l.getLanguageId(t)}getStandardTokenType(e){const t=this._tokens[1+(e<<1)];return _l.getTokenType(t)}getForeground(e){const t=this._tokens[1+(e<<1)];return _l.getForeground(t)}getClassName(e){const t=this._tokens[1+(e<<1)];return _l.getClassNameFromMetadata(t)}getInlineStyle(e,t){const i=this._tokens[1+(e<<1)];return _l.getInlineStyleFromMetadata(i,t)}getEndOffset(e){return this._tokens[e<<1]}findTokenIndexAtOffset(e){return rd.findIndexInTokensArray(this._tokens,e)}inflate(){return this}sliceAndInflate(e,t,i){return new sd(this,e,t,i)}static convertToEndOffset(e,t){const i=e.length>>>1,n=i-1;for(let o=0;o<n;o++)e[o<<1]=e[o+1<<1];e[n<<1]=t}static findIndexInTokensArray(e,t){if(e.length<=2)return 0;let i=0,n=(e.length>>>1)-1;while(i<n){const o=i+Math.floor((n-i)/2),r=e[o<<1];if(r===t)return o+1;r<t?i=o+1:r>t&&(n=o)}return i}}class sd{constructor(e,t,i,n){this._source=e,this._startOffset=t,this._endOffset=i,this._deltaOffset=n,this._firstTokenIndex=e.findTokenIndexAtOffset(t),this._tokensCount=0;for(let o=this._firstTokenIndex,r=e.getCount();o<r;o++){const t=e.getStartOffset(o);if(t>=i)break;this._tokensCount++}}equals(e){return e instanceof sd&&(this._startOffset===e._startOffset&&this._endOffset===e._endOffset&&this._deltaOffset===e._deltaOffset&&this._source.slicedEquals(e._source,this._firstTokenIndex,this._tokensCount))}getCount(){return this._tokensCount}getForeground(e){return this._source.getForeground(this._firstTokenIndex+e)}getEndOffset(e){const t=this._source.getEndOffset(this._firstTokenIndex+e);return Math.min(this._endOffset,t)-this._startOffset+this._deltaOffset}getClassName(e){return this._source.getClassName(this._firstTokenIndex+e)}getInlineStyle(e,t){return this._source.getInlineStyle(this._firstTokenIndex+e,t)}findTokenIndexAtOffset(e){return this._source.findTokenIndexAtOffset(e+this._startOffset-this._deltaOffset)-this._firstTokenIndex}}class ad{constructor(e,t,i,n){this.startColumn=e,this.endColumn=t,this.className=i,this.type=n}static _equals(e,t){return e.startColumn===t.startColumn&&e.endColumn===t.endColumn&&e.className===t.className&&e.type===t.type}static equalsArr(e,t){const i=e.length,n=t.length;if(i!==n)return!1;for(let o=0;o<i;o++)if(!ad._equals(e[o],t[o]))return!1;return!0}static filter(e,t,i,n){if(0===e.length)return[];let o=[],r=0;for(let s=0,a=e.length;s<a;s++){const a=e[s],l=a.range;if(l.endLineNumber<t||l.startLineNumber>t)continue;if(l.isEmpty()&&(0===a.type||3===a.type))continue;const c=l.startLineNumber===t?l.startColumn:i,h=l.endLineNumber===t?l.endColumn:n;o[r++]=new ad(c,h,a.inlineClassName,a.type)}return o}static _typeCompare(e,t){const i=[2,0,1,3];return i[e]-i[t]}static compare(e,t){if(e.startColumn===t.startColumn){if(e.endColumn===t.endColumn){const i=ad._typeCompare(e.type,t.type);return 0===i?e.className<t.className?-1:e.className>t.className?1:0:i}return e.endColumn-t.endColumn}return e.startColumn-t.startColumn}}class ld{constructor(e,t,i,n){this.startOffset=e,this.endOffset=t,this.className=i,this.metadata=n}}class cd{constructor(){this.stopOffsets=[],this.classNames=[],this.metadata=[],this.count=0}static _metadata(e){let t=0;for(let i=0,n=e.length;i<n;i++)t|=e[i];return t}consumeLowerThan(e,t,i){while(this.count>0&&this.stopOffsets[0]<e){let e=0;while(e+1<this.count&&this.stopOffsets[e]===this.stopOffsets[e+1])e++;i.push(new ld(t,this.stopOffsets[e],this.classNames.join(" "),cd._metadata(this.metadata))),t=this.stopOffsets[e]+1,this.stopOffsets.splice(0,e+1),this.classNames.splice(0,e+1),this.metadata.splice(0,e+1),this.count-=e+1}return this.count>0&&t<e&&(i.push(new ld(t,e-1,this.classNames.join(" "),cd._metadata(this.metadata))),t=e),t}insert(e,t,i){if(0===this.count||this.stopOffsets[this.count-1]<=e)this.stopOffsets.push(e),this.classNames.push(t),this.metadata.push(i);else for(let n=0;n<this.count;n++)if(this.stopOffsets[n]>=e){this.stopOffsets.splice(n,0,e),this.classNames.splice(n,0,t),this.metadata.splice(n,0,i);break}this.count++}}class hd{static normalize(e,t){if(0===t.length)return[];let i=[];const n=new cd;let o=0;for(let r=0,s=t.length;r<s;r++){const s=t[r];let a=s.startColumn,l=s.endColumn;const c=s.className,h=1===s.type?2:2===s.type?4:0;if(a>1){const t=e.charCodeAt(a-2);yr["D"](t)&&a--}if(l>1){const t=e.charCodeAt(l-2);yr["D"](t)&&l--}const d=a-1,u=l-2;o=n.consumeLowerThan(d,o,i),0===n.count&&(o=d),n.insert(u,c,h)}return n.consumeLowerThan(1073741824,o,i),i}}class dd{constructor(e,t,i){this.endIndex=e,this.type=t,this.metadata=i}isWhitespace(){return!!(1&this.metadata)}}class ud{constructor(e,t){this.startOffset=e,this.endOffset=t}equals(e){return this.startOffset===e.startOffset&&this.endOffset===e.endOffset}}class gd{constructor(e,t,i,n,o,r,s,a,l,c,h,d,u,g,f,m,p,_,b){this.useMonospaceOptimizations=e,this.canUseHalfwidthRightwardsArrow=t,this.lineContent=i,this.continuesWithWrappedLine=n,this.isBasicASCII=o,this.containsRTL=r,this.fauxIndentLength=s,this.lineTokens=a,this.lineDecorations=l,this.tabSize=c,this.startVisibleColumn=h,this.spaceWidth=d,this.stopRenderingLineAfter=f,this.renderWhitespace="all"===m?4:"boundary"===m?1:"selection"===m?2:"trailing"===m?3:0,this.renderControlCharacters=p,this.fontLigatures=_,this.selectionsOnLine=b&&b.sort((e,t)=>e.startOffset<t.startOffset?-1:1);const v=Math.abs(g-d),w=Math.abs(u-d);v<w?(this.renderSpaceWidth=g,this.renderSpaceCharCode=11825):(this.renderSpaceWidth=u,this.renderSpaceCharCode=183)}sameSelection(e){if(null===this.selectionsOnLine)return null===e;if(null===e)return!1;if(e.length!==this.selectionsOnLine.length)return!1;for(let t=0;t<this.selectionsOnLine.length;t++)if(!this.selectionsOnLine[t].equals(e[t]))return!1;return!0}equals(e){return this.useMonospaceOptimizations===e.useMonospaceOptimizations&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.lineContent===e.lineContent&&this.continuesWithWrappedLine===e.continuesWithWrappedLine&&this.isBasicASCII===e.isBasicASCII&&this.containsRTL===e.containsRTL&&this.fauxIndentLength===e.fauxIndentLength&&this.tabSize===e.tabSize&&this.startVisibleColumn===e.startVisibleColumn&&this.spaceWidth===e.spaceWidth&&this.renderSpaceWidth===e.renderSpaceWidth&&this.renderSpaceCharCode===e.renderSpaceCharCode&&this.stopRenderingLineAfter===e.stopRenderingLineAfter&&this.renderWhitespace===e.renderWhitespace&&this.renderControlCharacters===e.renderControlCharacters&&this.fontLigatures===e.fontLigatures&&ad.equalsArr(this.lineDecorations,e.lineDecorations)&&this.lineTokens.equals(e.lineTokens)&&this.sameSelection(e.selectionsOnLine)}}class fd{constructor(e,t){this.length=e,this._data=new Uint32Array(this.length),this._absoluteOffsets=new Uint32Array(this.length)}static getPartIndex(e){return(4294901760&e)>>>16}static getCharIndex(e){return(65535&e)>>>0}setPartData(e,t,i,n){let o=(t<<16|i<<0)>>>0;this._data[e]=o,this._absoluteOffsets[e]=n+i}getAbsoluteOffsets(){return this._absoluteOffsets}charOffsetToPartData(e){return 0===this.length?0:e<0?this._data[0]:e>=this.length?this._data[this.length-1]:this._data[e]}partDataToCharOffset(e,t,i){if(0===this.length)return 0;let n=(e<<16|i<<0)>>>0,o=0,r=this.length-1;while(o+1<r){let e=o+r>>>1,t=this._data[e];if(t===n)return e;t>n?r=e:o=e}if(o===r)return o;let s=this._data[o],a=this._data[r];if(s===n)return o;if(a===n)return r;let l,c=fd.getPartIndex(s),h=fd.getCharIndex(s),d=fd.getPartIndex(a);l=c!==d?t:fd.getCharIndex(a);let u=i-h,g=l-i;return u<=g?o:r}}class md{constructor(e,t,i){this.characterMapping=e,this.containsRTL=t,this.containsForeignElements=i}}function pd(e,t){if(0===e.lineContent.length){let i=0,n="<span><span></span></span>";if(e.lineDecorations.length>0){const t=[],o=[];for(let n=0,r=e.lineDecorations.length;n<r;n++){const r=e.lineDecorations[n];1===r.type&&(t.push(e.lineDecorations[n].className),i|=1),2===r.type&&(o.push(e.lineDecorations[n].className),i|=2)}if(0!==i){const e=t.length>0?`<span class="${t.join(" ")}"></span>`:"",i=o.length>0?`<span class="${o.join(" ")}"></span>`:"";n=`<span>${e}${i}</span>`}}return t.appendASCIIString(n),new md(new fd(0,0),!1,i)}return Ld(wd(e),t)}class _d{constructor(e,t,i,n){this.characterMapping=e,this.html=t,this.containsRTL=i,this.containsForeignElements=n}}function bd(e){let t=vc(1e4),i=pd(e,t);return new _d(i.characterMapping,t.build(),i.containsRTL,i.containsForeignElements)}class vd{constructor(e,t,i,n,o,r,s,a,l,c,h,d,u,g,f){this.fontIsMonospace=e,this.canUseHalfwidthRightwardsArrow=t,this.lineContent=i,this.len=n,this.isOverflowing=o,this.parts=r,this.containsForeignElements=s,this.fauxIndentLength=a,this.tabSize=l,this.startVisibleColumn=c,this.containsRTL=h,this.spaceWidth=d,this.renderSpaceCharCode=u,this.renderWhitespace=g,this.renderControlCharacters=f}}function wd(e){const t=e.lineContent;let i,n;-1!==e.stopRenderingLineAfter&&e.stopRenderingLineAfter<t.length?(i=!0,n=e.stopRenderingLineAfter):(i=!1,n=t.length);let o=Cd(e.lineTokens,e.fauxIndentLength,n);(4===e.renderWhitespace||1===e.renderWhitespace||2===e.renderWhitespace&&e.selectionsOnLine||3===e.renderWhitespace)&&(o=Sd(e,t,n,o));let r=0;if(e.lineDecorations.length>0){for(let t=0,i=e.lineDecorations.length;t<i;t++){const i=e.lineDecorations[t];3===i.type||1===i.type?r|=1:2===i.type&&(r|=2)}o=xd(t,n,o,e.lineDecorations)}return e.containsRTL||(o=yd(t,o,!e.isBasicASCII||e.fontLigatures)),new vd(e.useMonospaceOptimizations,e.canUseHalfwidthRightwardsArrow,t,n,i,o,r,e.fauxIndentLength,e.tabSize,e.startVisibleColumn,e.containsRTL,e.spaceWidth,e.renderSpaceCharCode,e.renderWhitespace,e.renderControlCharacters)}function Cd(e,t,i){let n=[],o=0;t>0&&(n[o++]=new dd(t,"",0));for(let r=0,s=e.getCount();r<s;r++){const s=e.getEndOffset(r);if(s<=t)continue;const a=e.getClassName(r);if(s>=i){n[o++]=new dd(i,a,0);break}n[o++]=new dd(s,a,0)}return n}function yd(e,t,i){let n=0,o=[],r=0;if(i)for(let s=0,a=t.length;s<a;s++){const i=t[s],a=i.endIndex;if(n+50<a){const t=i.type,s=i.metadata;let l=-1,c=n;for(let i=n;i<a;i++)32===e.charCodeAt(i)&&(l=i),-1!==l&&i-c>=50&&(o[r++]=new dd(l+1,t,s),c=l+1,l=-1);c!==a&&(o[r++]=new dd(a,t,s))}else o[r++]=i;n=a}else for(let s=0,a=t.length;s<a;s++){const e=t[s],i=e.endIndex;let a=i-n;if(a>50){const t=e.type,s=e.metadata,l=Math.ceil(a/50);for(let e=1;e<l;e++){let i=n+50*e;o[r++]=new dd(i,t,s)}o[r++]=new dd(i,t,s)}else o[r++]=e;n=i}return o}function Sd(e,t,i,n){const o=e.continuesWithWrappedLine,r=e.fauxIndentLength,s=e.tabSize,a=e.startVisibleColumn,l=e.useMonospaceOptimizations,c=e.selectionsOnLine,h=1===e.renderWhitespace,d=3===e.renderWhitespace,u=e.renderSpaceWidth!==e.spaceWidth;let g=[],f=0,m=0,p=n[m].type,_=n[m].endIndex;const b=n.length;let v,w=!1,C=yr["u"](t);-1===C?(w=!0,C=i,v=i):v=yr["H"](t);let y=!1,S=0,x=c&&c[S],L=a%s;for(let E=r;E<i;E++){const e=t.charCodeAt(E);let o;if(x&&E>=x.endOffset&&(S++,x=c&&c[S]),E<C||E>v)o=!0;else if(9===e)o=!0;else if(32===e)if(h)if(y)o=!0;else{const e=E+1<i?t.charCodeAt(E+1):0;o=32===e||9===e}else o=!0;else o=!1;if(o&&c&&(o=!!x&&x.startOffset<=E&&x.endOffset>E),o&&d&&(o=w||E>v),y){if(!o||!l&&L>=s){if(u){const e=f>0?g[f-1].endIndex:r;for(let t=e+1;t<=E;t++)g[f++]=new dd(t,"mtkw",1)}else g[f++]=new dd(E,"mtkw",1);L%=s}}else(E===_||o&&E>r)&&(g[f++]=new dd(E,p,0),L%=s);9===e?L=s:yr["C"](e)?L+=2:L++,y=o;while(E===_)m++,m<b&&(p=n[m].type,_=n[m].endIndex)}let k=!1;if(y)if(o&&h){let e=i>0?t.charCodeAt(i-1):0,n=i>1?t.charCodeAt(i-2):0,o=32===e&&32!==n&&9!==n;o||(k=!0)}else k=!0;if(k)if(u){const e=f>0?g[f-1].endIndex:r;for(let t=e+1;t<=i;t++)g[f++]=new dd(t,"mtkw",1)}else g[f++]=new dd(i,"mtkw",1);else g[f++]=new dd(i,p,0);return g}function xd(e,t,i,n){n.sort(ad.compare);const o=hd.normalize(e,n),r=o.length;let s=0,a=[],l=0,c=0;for(let d=0,u=i.length;d<u;d++){const e=i[d],t=e.endIndex,n=e.type,h=e.metadata;while(s<r&&o[s].startOffset<t){const e=o[s];if(e.startOffset>c&&(c=e.startOffset,a[l++]=new dd(c,n,h)),!(e.endOffset+1<=t)){c=t,a[l++]=new dd(c,n+" "+e.className,h|e.metadata);break}c=e.endOffset+1,a[l++]=new dd(c,n+" "+e.className,h|e.metadata),s++}t>c&&(c=t,a[l++]=new dd(c,n,h))}const h=i[i.length-1].endIndex;if(s<r&&o[s].startOffset===h){let e=[],t=0;while(s<r&&o[s].startOffset===h)e.push(o[s].className),t|=o[s].metadata,s++;a[l++]=new dd(c,e.join(" "),t)}return a}function Ld(e,t){const i=e.fontIsMonospace,n=e.canUseHalfwidthRightwardsArrow,o=e.containsForeignElements,r=e.lineContent,s=e.len,a=e.isOverflowing,l=e.parts,c=e.fauxIndentLength,h=e.tabSize,d=e.startVisibleColumn,u=e.containsRTL,g=e.spaceWidth,f=e.renderSpaceCharCode,m=e.renderWhitespace,p=e.renderControlCharacters,_=new fd(s+1,l.length);let b=0,v=d,w=0,C=0,y=0,S=0;u?t.appendASCIIString('<span dir="ltr">'):t.appendASCIIString("<span>");for(let x=0,L=l.length;x<L;x++){S+=y;const e=l[x],s=e.endIndex,a=e.type,d=0!==m&&e.isWhitespace(),u=d&&!i&&("mtkw"===a||!o),L=b===s&&4===e.metadata;if(w=0,t.appendASCIIString('<span class="'),t.appendASCIIString(u?"mtkz":a),t.appendASCII(34),d){let e=0;{let t=b,i=v;for(;t<s;t++){const n=r.charCodeAt(t),o=0|(9===n?h-i%h:1);e+=o,t>=c&&(i+=o)}}for(u&&(t.appendASCIIString(' style="width:'),t.appendASCIIString(String(g*e)),t.appendASCIIString('px"')),t.appendASCII(62);b<s;b++){_.setPartData(b,x-C,w,S),C=0;const e=r.charCodeAt(b);let i;if(9===e){i=h-v%h|0,!n||i>1?t.write1(8594):t.write1(65515);for(let e=2;e<=i;e++)t.write1(160)}else i=1,t.write1(f);w+=i,b>=c&&(v+=i)}y=e}else{let e=0;for(t.appendASCII(62);b<s;b++){_.setPartData(b,x-C,w,S),C=0;const i=r.charCodeAt(b);let n=1,o=1;switch(i){case 9:n=h-v%h,o=n;for(let e=1;e<=n;e++)t.write1(160);break;case 32:t.write1(160);break;case 60:t.appendASCIIString("&lt;");break;case 62:t.appendASCIIString("&gt;");break;case 38:t.appendASCIIString("&amp;");break;case 0:t.appendASCIIString("&#00;");break;case 65279:case 8232:case 8233:case 133:t.write1(65533);break;default:yr["C"](i)&&o++,p&&i<32?t.write1(9216+i):t.write1(i)}w+=n,e+=n,b>=c&&(v+=o)}y=e}L?C++:C=0,t.appendASCIIString("</span>")}return _.setPartData(s,l.length-1,w,S),a&&t.appendASCIIString("<span>&hellip;</span>"),t.appendASCIIString("</span>"),new md(_,u,o)}class kd{constructor(e,t,i,n){this.top=0|e,this.left=0|t,this.width=0|i,this.height=0|n}}class Ed{constructor(e,t){this.tabSize=e,this.data=t}}class Dd{constructor(e,t,i,n,o,r){this.content=e,this.continuesWithWrappedLine=t,this.minColumn=i,this.maxColumn=n,this.startVisibleColumn=o,this.tokens=r}}class Nd{constructor(e,t,i,n,o,r,s,a,l,c){this.minColumn=e,this.maxColumn=t,this.content=i,this.continuesWithWrappedLine=n,this.isBasicASCII=Nd.isBasicASCII(i,r),this.containsRTL=Nd.containsRTL(i,this.isBasicASCII,o),this.tokens=s,this.inlineDecorations=a,this.tabSize=l,this.startVisibleColumn=c}static isBasicASCII(e,t){return!t||yr["z"](e)}static containsRTL(e,t,i){return!(t||!i)&&yr["l"](e)}}class Td{constructor(e,t,i){this.range=e,this.inlineClassName=t,this.type=i}}class Md{constructor(e,t){this.range=e,this.options=t}}function Id(e){return Array.isArray(e)}function Od(e){return!Id(e)}function Ad(e){return"string"===typeof e}function Rd(e){return!Ad(e)}function Pd(e){return!e}function Fd(e,t){return e.ignoreCase&&t?t.toLowerCase():t}function Wd(e){return e.replace(/[&<>'"_]/g,"-")}function Bd(e,t){console.log(`${e.languageId}: ${t}`)}function Vd(e,t){return new Error(`${e.languageId}: ${t}`)}function Hd(e,t,i,n,o){const r=/\$((\$)|(#)|(\d\d?)|[sS](\d\d?)|@(\w+))/g;let s=null;return t.replace(r,(function(t,r,a,l,c,h,d,u,g){return Pd(a)?Pd(l)?!Pd(c)&&c<n.length?Fd(e,n[c]):!Pd(d)&&e&&"string"===typeof e[d]?e[d]:(null===s&&(s=o.split("."),s.unshift(o)),!Pd(h)&&h<s.length?Fd(e,s[h]):""):Fd(e,i):"$"}))}function zd(e,t){let i=t;while(i&&i.length>0){const t=e.tokenizer[i];if(t)return t;const n=i.lastIndexOf(".");i=n<0?null:i.substr(0,n)}return null}function Ud(e,t){let i=t;while(i&&i.length>0){const t=e.stateNames[i];if(t)return!0;const n=i.lastIndexOf(".");i=n<0?null:i.substr(0,n)}return!1}const jd=5;class Kd{constructor(e){this._maxCacheDepth=e,this._entries=Object.create(null)}static create(e,t){return this._INSTANCE.create(e,t)}create(e,t){if(null!==e&&e.depth>=this._maxCacheDepth)return new qd(e,t);let i=qd.getStackElementId(e);i.length>0&&(i+="|"),i+=t;let n=this._entries[i];return n||(n=new qd(e,t),this._entries[i]=n,n)}}Kd._INSTANCE=new Kd(jd);class qd{constructor(e,t){this.parent=e,this.state=t,this.depth=(this.parent?this.parent.depth:0)+1}static getStackElementId(e){let t="";while(null!==e)t.length>0&&(t+="|"),t+=e.state,e=e.parent;return t}static _equals(e,t){while(null!==e&&null!==t){if(e===t)return!0;if(e.state!==t.state)return!1;e=e.parent,t=t.parent}return null===e&&null===t}equals(e){return qd._equals(this,e)}push(e){return Kd.create(this,e)}pop(){return this.parent}popall(){let e=this;while(e.parent)e=e.parent;return e}switchTo(e){return Kd.create(this.parent,e)}}class $d{constructor(e,t){this.modeId=e,this.state=t}equals(e){return this.modeId===e.modeId&&this.state.equals(e.state)}clone(){let e=this.state.clone();return e===this.state?this:new $d(this.modeId,this.state)}}class Gd{constructor(e){this._maxCacheDepth=e,this._entries=Object.create(null)}static create(e,t){return this._INSTANCE.create(e,t)}create(e,t){if(null!==t)return new Yd(e,t);if(null!==e&&e.depth>=this._maxCacheDepth)return new Yd(e,t);let i=qd.getStackElementId(e),n=this._entries[i];return n||(n=new Yd(e,null),this._entries[i]=n,n)}}Gd._INSTANCE=new Gd(jd);class Yd{constructor(e,t){this.stack=e,this.embeddedModeData=t}clone(){let e=this.embeddedModeData?this.embeddedModeData.clone():null;return e===this.embeddedModeData?this:Gd.create(this.stack,this.embeddedModeData)}equals(e){return e instanceof Yd&&(!!this.stack.equals(e.stack)&&(null===this.embeddedModeData&&null===e.embeddedModeData||null!==this.embeddedModeData&&null!==e.embeddedModeData&&this.embeddedModeData.equals(e.embeddedModeData)))}}class Xd{constructor(){this._tokens=[],this._language=null,this._lastTokenType=null,this._lastTokenLanguage=null}enterMode(e,t){this._language=t}emit(e,t){this._lastTokenType===t&&this._lastTokenLanguage===this._language||(this._lastTokenType=t,this._lastTokenLanguage=this._language,this._tokens.push(new ti(e,t,this._language)))}nestedModeTokenize(e,t,i){const n=t.modeId,o=t.state,r=Kl.get(n);if(!r)return this.enterMode(i,n),this.emit(i,""),o;let s=r.tokenize(e,o,i);return this._tokens=this._tokens.concat(s.tokens),this._lastTokenType=null,this._lastTokenLanguage=null,this._language=null,s.endState}finalize(e){return new ii(this._tokens,e)}}class Zd{constructor(e,t){this._modeService=e,this._theme=t,this._prependTokens=null,this._tokens=[],this._currentLanguageId=0,this._lastTokenMetadata=0}enterMode(e,t){this._currentLanguageId=this._modeService.getLanguageIdentifier(t).id}emit(e,t){let i=this._theme.match(this._currentLanguageId,t);this._lastTokenMetadata!==i&&(this._lastTokenMetadata=i,this._tokens.push(e),this._tokens.push(i))}static _merge(e,t,i){let n=null!==e?e.length:0,o=t.length,r=null!==i?i.length:0;if(0===n&&0===o&&0===r)return new Uint32Array(0);if(0===n&&0===o)return i;if(0===o&&0===r)return e;let s=new Uint32Array(n+o+r);null!==e&&s.set(e);for(let a=0;a<o;a++)s[n+a]=t[a];return null!==i&&s.set(i,n+o),s}nestedModeTokenize(e,t,i){const n=t.modeId,o=t.state,r=Kl.get(n);if(!r)return this.enterMode(i,n),this.emit(i,""),o;let s=r.tokenize2(e,o,i);return this._prependTokens=Zd._merge(this._prependTokens,this._tokens,s.tokens),this._tokens=[],this._currentLanguageId=0,this._lastTokenMetadata=0,s.endState}finalize(e){return new ni(Zd._merge(this._prependTokens,this._tokens,null),e)}}class Qd{constructor(e,t,i,n){this._modeService=e,this._standaloneThemeService=t,this._modeId=i,this._lexer=n,this._embeddedModes=Object.create(null),this.embeddedLoaded=Promise.resolve(void 0);let o=!1;this._tokenizationRegistryListener=Kl.onDidChange(e=>{if(o)return;let t=!1;for(let i=0,n=e.changedLanguages.length;i<n;i++){let n=e.changedLanguages[i];if(this._embeddedModes[n]){t=!0;break}}t&&(o=!0,Kl.fire([this._modeId]),o=!1)})}dispose(){this._tokenizationRegistryListener.dispose()}getLoadStatus(){let e=[];for(let t in this._embeddedModes){const i=Kl.get(t);if(i){if(i instanceof Qd){const t=i.getLoadStatus();!1===t.loaded&&e.push(t.promise)}continue}const n=Kl.getPromise(t);n&&e.push(n)}return 0===e.length?{loaded:!0}:{loaded:!1,promise:Promise.all(e).then(e=>{})}}getInitialState(){let e=Kd.create(null,this._lexer.start);return Gd.create(e,null)}tokenize(e,t,i){let n=new Xd,o=this._tokenize(e,t,i,n);return n.finalize(o)}tokenize2(e,t,i){let n=new Zd(this._modeService,this._standaloneThemeService.getColorTheme().tokenTheme),o=this._tokenize(e,t,i,n);return n.finalize(o)}_tokenize(e,t,i,n){return t.embeddedModeData?this._nestedTokenize(e,t,i,n):this._myTokenize(e,t,i,n)}_findLeavingNestedModeOffset(e,t){let i=this._lexer.tokenizer[t.stack.state];if(!i&&(i=zd(this._lexer,t.stack.state),!i))throw Vd(this._lexer,"tokenizer state is not defined: "+t.stack.state);let n=-1,o=!1;for(const r of i){if(!Rd(r.action)||"@pop"!==r.action.nextEmbedded)continue;o=!0;let t=r.regex,i=r.regex.source;if("^(?:"===i.substr(0,4)&&")"===i.substr(i.length-1,1)){let e=(t.ignoreCase?"i":"")+(t.unicode?"u":"");t=new RegExp(i.substr(4,i.length-5),e)}let s=e.search(t);-1===s||0!==s&&r.matchOnlyAtLineStart||(-1===n||s<n)&&(n=s)}if(!o)throw Vd(this._lexer,'no rule containing nextEmbedded: "@pop" in tokenizer embedded state: '+t.stack.state);return n}_nestedTokenize(e,t,i,n){let o=this._findLeavingNestedModeOffset(e,t);if(-1===o){let o=n.nestedModeTokenize(e,t.embeddedModeData,i);return Gd.create(t.stack,new $d(t.embeddedModeData.modeId,o))}let r=e.substring(0,o);r.length>0&&n.nestedModeTokenize(r,t.embeddedModeData,i);let s=e.substring(o);return this._myTokenize(s,t,i+o,n)}_safeRuleName(e){return e?e.name:"(unknown)"}_myTokenize(e,t,i,n){n.enterMode(i,this._modeId);const o=e.length;let r=t.embeddedModeData,s=t.stack,a=0,l=null,c=!0;while(c||a<o){const t=a,h=s.depth,d=l?l.groups.length:0,u=s.state;let g=null,f=null,m=null,p=null,_=null;if(l){g=l.matches;const e=l.groups.shift();f=e.matched,m=e.action,p=l.rule,0===l.groups.length&&(l=null)}else{if(!c&&a>=o)break;c=!1;let t=this._lexer.tokenizer[u];if(!t&&(t=zd(this._lexer,u),!t))throw Vd(this._lexer,"tokenizer state is not defined: "+u);let i=e.substr(a);for(const e of t)if((0===a||!e.matchOnlyAtLineStart)&&(g=i.match(e.regex),g)){f=g[0],m=e.action;break}}if(g||(g=[""],f=""),m||(a<o&&(g=[e.charAt(a)],f=g[0]),m=this._lexer.defaultToken),null===f)break;a+=f.length;while(Od(m)&&Rd(m)&&m.test)m=m.test(f,g,u,a===o);let b=null;if("string"===typeof m||Array.isArray(m))b=m;else if(m.group)b=m.group;else if(null!==m.token&&void 0!==m.token){if(b=m.tokenSubst?Hd(this._lexer,m.token,f,g,u):m.token,m.nextEmbedded)if("@pop"===m.nextEmbedded){if(!r)throw Vd(this._lexer,"cannot pop embedded mode if not inside one");r=null}else{if(r)throw Vd(this._lexer,"cannot enter embedded mode from within an embedded mode");_=Hd(this._lexer,m.nextEmbedded,f,g,u)}if(m.goBack&&(a=Math.max(0,a-m.goBack)),m.switchTo&&"string"===typeof m.switchTo){let e=Hd(this._lexer,m.switchTo,f,g,u);if("@"===e[0]&&(e=e.substr(1)),!zd(this._lexer,e))throw Vd(this._lexer,"trying to switch to a state '"+e+"' that is undefined in rule: "+this._safeRuleName(p));s=s.switchTo(e)}else{if(m.transform&&"function"===typeof m.transform)throw Vd(this._lexer,"action.transform not supported");if(m.next)if("@push"===m.next){if(s.depth>=this._lexer.maxStack)throw Vd(this._lexer,"maximum tokenizer stack size reached: ["+s.state+","+s.parent.state+",...]");s=s.push(u)}else if("@pop"===m.next){if(s.depth<=1)throw Vd(this._lexer,"trying to pop an empty stack in rule: "+this._safeRuleName(p));s=s.pop()}else if("@popall"===m.next)s=s.popall();else{let e=Hd(this._lexer,m.next,f,g,u);if("@"===e[0]&&(e=e.substr(1)),!zd(this._lexer,e))throw Vd(this._lexer,"trying to set a next state '"+e+"' that is undefined in rule: "+this._safeRuleName(p));s=s.push(e)}}m.log&&"string"===typeof m.log&&Bd(this._lexer,this._lexer.languageId+": "+Hd(this._lexer,m.log,f,g,u))}if(null===b)throw Vd(this._lexer,"lexer rule has no well-defined action in rule: "+this._safeRuleName(p));const v=t=>{let r=this._modeService.getModeIdForLanguageName(t);r&&(t=r);const l=this._getNestedEmbeddedModeData(t);if(a<o){const t=e.substr(a);return this._nestedTokenize(t,Gd.create(s,l),i+a,n)}return Gd.create(s,l)};if(Array.isArray(b)){if(l&&l.groups.length>0)throw Vd(this._lexer,"groups cannot be nested: "+this._safeRuleName(p));if(g.length!==b.length+1)throw Vd(this._lexer,"matched number of groups does not match the number of actions in rule: "+this._safeRuleName(p));let e=0;for(let t=1;t<g.length;t++)e+=g[t].length;if(e!==f.length)throw Vd(this._lexer,"with groups, all characters should be matched in consecutive groups in rule: "+this._safeRuleName(p));l={rule:p,matches:g,groups:[]};for(let t=0;t<b.length;t++)l.groups[t]={action:b[t],matched:g[t+1]};a-=f.length}else{{if("@rematch"===b&&(a-=f.length,f="",g=null,b="",null!==_))return v(_);if(0===f.length){if(0===o||h!==s.depth||u!==s.state||(l?l.groups.length:0)!==d)continue;throw Vd(this._lexer,"no progress in tokenizer in rule: "+this._safeRuleName(p))}let e=null;if(Ad(b)&&0===b.indexOf("@brackets")){let t=b.substr("@brackets".length),i=Jd(this._lexer,f);if(!i)throw Vd(this._lexer,"@brackets token returned but no bracket defined as: "+f);e=Wd(i.token+t)}else{let t=""===b?"":b+this._lexer.tokenPostfix;e=Wd(t)}n.emit(t+i,e)}if(null!==_)return v(_)}}return Gd.create(s,r)}_getNestedEmbeddedModeData(e){let t=this._locateMode(e);if(t){let e=Kl.get(t);if(e)return new $d(t,e.getInitialState())}return new $d(t||Gl,$l)}_locateMode(e){if(!e||!this._modeService.isRegisteredMode(e))return null;if(e===this._modeId)return e;let t=this._modeService.getModeId(e);return t&&(this._modeService.triggerMode(t),this._embeddedModes[t]=!0),t}}function Jd(e,t){if(!t)return null;t=Fd(e,t);let i=e.brackets;for(const n of i){if(n.open===t)return{token:n.token,bracketType:1};if(n.close===t)return{token:n.token,bracketType:-1}}return null}function eu(e,t,i,n){return new Qd(e,t,i,n)}class tu{static colorizeElement(e,t,i,n){n=n||{};let o=n.theme||"vs",r=n.mimeType||i.getAttribute("lang")||i.getAttribute("data-lang");if(!r)return console.error("Mode not detected"),Promise.resolve();e.setTheme(o);let s=i.firstChild?i.firstChild.nodeValue:"";i.className+=" "+o;let a=e=>{i.innerHTML=e};return this.colorize(t,s||"",r,n).then(a,e=>console.error(e))}static colorize(e,t,i,n){let o=4;n&&"number"===typeof n.tabSize&&(o=n.tabSize),yr["R"](t)&&(t=t.substr(1));let r=t.split(/\r\n|\r|\n/),s=e.getModeId(i);if(!s)return Promise.resolve(nu(r,o));e.triggerMode(s);const a=Kl.get(s);if(a)return iu(r,o,a);const l=Kl.getPromise(s);return new Promise(l?(e,t)=>{l.then(i=>{iu(r,o,i).then(e,t)},t)}:(e,t)=>{let i=null,n=null;const a=()=>{i&&(i.dispose(),i=null),n&&(n.dispose(),n=null);const a=Kl.get(s);a?iu(r,o,a).then(e,t):e(nu(r,o))};n=new Dn,n.cancelAndSet(a,500),i=Kl.onDidChange(e=>{e.changedLanguages.indexOf(s)>=0&&a()})})}static colorizeLine(e,t,i,n,o=4){const r=Nd.isBasicASCII(e,t),s=Nd.containsRTL(e,r,i);let a=bd(new gd(!1,!0,e,!1,r,s,0,n,[],o,0,0,0,0,-1,"none",!1,!1,null));return a.html}static colorizeModelLine(e,t,i=4){let n=e.getLineContent(t);e.forceTokenization(t);let o=e.getLineTokens(t),r=o.inflate();return this.colorizeLine(n,e.mightContainNonBasicASCII(),e.mightContainRTL(),r,i)}}function iu(e,t,i){return new Promise((n,o)=>{const r=()=>{const s=ou(e,t,i);if(i instanceof Qd){const e=i.getLoadStatus();if(!1===e.loaded)return void e.promise.then(r,o)}n(s)};r()})}function nu(e,t){let i=[];const n=16793600,o=new Uint32Array(2);o[0]=0,o[1]=n;for(let r=0,s=e.length;r<s;r++){let n=e[r];o[0]=n.length;const s=new rd(o,n),a=Nd.isBasicASCII(n,!0),l=Nd.containsRTL(n,a,!0);let c=bd(new gd(!1,!0,n,!1,a,l,0,s,[],t,0,0,0,0,-1,"none",!1,!1,null));i=i.concat(c.html),i.push("<br/>")}return i.join("")}function ou(e,t,i){let n=[],o=i.getInitialState();for(let r=0,s=e.length;r<s;r++){let s=e[r],a=i.tokenize2(s,o,0);rd.convertToEndOffset(a.tokens,s.length);let l=new rd(a.tokens,s);const c=Nd.isBasicASCII(s,!0),h=Nd.containsRTL(s,c,!0);let d=bd(new gd(!1,!0,s,!1,c,h,0,l.inflate(),[],t,0,0,0,0,-1,"none",!1,!1,null));n=n.concat(d.html),n.push("<br/>"),o=a.endState}return n.join("")}var ru;(function(e){e[e["Ignore"]=0]="Ignore",e[e["Info"]=1]="Info",e[e["Warning"]=2]="Warning",e[e["Error"]=3]="Error"})(ru||(ru={})),function(e){const t="error",i="warning",n="warn",o="info";function r(r){return r?yr["r"](t,r)?e.Error:yr["r"](i,r)||yr["r"](n,r)?e.Warning:yr["r"](o,r)?e.Info:e.Ignore:e.Ignore}e.fromValue=r}(ru||(ru={}));var su=ru;function au(e){return!(!e||"function"!==typeof e.getEditorType)&&e.getEditorType()===ws.ICodeEditor}const lu=zi("IWorkspaceEditService");function cu(e){return Ar(e)&&(Boolean(e.newUri)||Boolean(e.oldUri))}function hu(e){return Ar(e)&&Ht.isUri(e.resource)&&Ar(e.edit)}class du{constructor(e){this.metadata=e}static convert(e){return e.edits.map(e=>{if(hu(e))return new uu(e.resource,e.edit,e.modelVersionId,e.metadata);if(cu(e))return new gu(e.oldUri,e.newUri,e.options,e.metadata);throw new Error("Unsupported edit")})}}class uu extends du{constructor(e,t,i,n){super(n),this.resource=e,this.textEdit=t,this.versionId=i,this.metadata=n}}class gu extends du{constructor(e,t,i,n){super(n),this.oldResource=e,this.newResource=t,this.options=i,this.metadata=n}}class fu{constructor(){this.data=new Map}add(e,t){os(Or(e)),os(Ar(t)),os(!this.data.has(e),"There is already an extension with this id"),this.data.set(e,t)}as(e){return this.data.get(e)||null}}const mu=new fu,pu={JSONContribution:"base.contributions.json"};function _u(e){return e.length>0&&"#"===e.charAt(e.length-1)?e.substring(0,e.length-1):e}class bu{constructor(){this._onDidChangeSchema=new Ve,this.schemasById={}}registerSchema(e,t){this.schemasById[_u(e)]=t,this._onDidChangeSchema.fire(e)}notifySchemaChanged(e){this._onDidChangeSchema.fire(e)}}const vu=new bu;mu.add(pu.JSONContribution,vu);const wu={Configuration:"base.contributions.configuration"},Cu={properties:{},patternProperties:{}},yu={properties:{},patternProperties:{}},Su={properties:{},patternProperties:{}},xu={properties:{},patternProperties:{}},Lu={properties:{},patternProperties:{}},ku={properties:{},patternProperties:{}},Eu="vscode://schemas/settings/resourceLanguage",Du=mu.as(pu.JSONContribution);class Nu{constructor(){this.overrideIdentifiers=new Set,this._onDidSchemaChange=new Ve,this._onDidUpdateConfiguration=new Ve,this.defaultValues={},this.defaultLanguageConfigurationOverridesNode={id:"defaultOverrides",title:o("defaultLanguageConfigurationOverrides.title","Default Language Configuration Overrides"),properties:{}},this.configurationContributors=[this.defaultLanguageConfigurationOverridesNode],this.resourceLanguageSettingsSchema={properties:{},patternProperties:{},additionalProperties:!1,errorMessage:"Unknown editor configuration setting",allowTrailingCommas:!0,allowComments:!0},this.configurationProperties={},this.excludedConfigurationProperties={},Du.registerSchema(Eu,this.resourceLanguageSettingsSchema)}registerConfiguration(e,t=!0){this.registerConfigurations([e],t)}registerConfigurations(e,t=!0){const i=[];e.forEach(e=>{i.push(...this.validateAndRegisterProperties(e,t)),this.configurationContributors.push(e),this.registerJSONConfiguration(e)}),Du.registerSchema(Eu,this.resourceLanguageSettingsSchema),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire(i)}registerOverrideIdentifiers(e){for(const t of e)this.overrideIdentifiers.add(t);this.updateOverridePropertyPatternKey()}validateAndRegisterProperties(e,t=!0,i=3){i=Wr(e.scope)?i:e.scope;let n=[],o=e.properties;if(o)for(let s in o){if(t&&Ru(s)){delete o[s];continue}const e=o[s];this.updatePropertyDefaultValue(s,e),Mu.test(s)?e.scope=void 0:e.scope=Wr(e.scope)?i:e.scope,!o[s].hasOwnProperty("included")||o[s].included?(this.configurationProperties[s]=o[s],!o[s].deprecationMessage&&o[s].markdownDeprecationMessage&&(o[s].deprecationMessage=o[s].markdownDeprecationMessage),n.push(s)):(this.excludedConfigurationProperties[s]=o[s],delete o[s])}let r=e.allOf;if(r)for(let s of r)n.push(...this.validateAndRegisterProperties(s,t,i));return n}getConfigurationProperties(){return this.configurationProperties}registerJSONConfiguration(e){const t=e=>{let i=e.properties;if(i)for(const t in i)this.updateSchema(t,i[t]);let n=e.allOf;n&&n.forEach(t)};t(e)}updateSchema(e,t){switch(Cu.properties[e]=t,t.scope){case 1:yu.properties[e]=t;break;case 2:Su.properties[e]=t;break;case 6:xu.properties[e]=t;break;case 3:Lu.properties[e]=t;break;case 4:ku.properties[e]=t;break;case 5:ku.properties[e]=t,this.resourceLanguageSettingsSchema.properties[e]=t;break}}updateOverridePropertyPatternKey(){for(const e of this.overrideIdentifiers.values()){const t=`[${e}]`,i={type:"object",description:o("overrideSettings.defaultDescription","Configure editor settings to be overridden for a language."),errorMessage:o("overrideSettings.errorMessage","This setting does not support per-language configuration."),$ref:Eu};this.updatePropertyDefaultValue(t,i),Cu.properties[t]=i,yu.properties[t]=i,Su.properties[t]=i,xu.properties[t]=i,Lu.properties[t]=i,ku.properties[t]=i}this._onDidSchemaChange.fire()}updatePropertyDefaultValue(e,t){let i=this.defaultValues[e];Fr(i)&&(i=t.default),Fr(i)&&(i=Ou(t.type)),t.default=i}}const Tu="\\[.*\\]$",Mu=new RegExp(Tu);function Iu(e){return e.substring(1,e.length-1)}function Ou(e){const t=Array.isArray(e)?e[0]:e;switch(t){case"boolean":return!1;case"integer":case"number":return 0;case"string":return"";case"array":return[];case"object":return{};default:return null}}const Au=new Nu;function Ru(e){return Mu.test(e)?o("config.property.languageDefault","Cannot register '{0}'. This matches property pattern '\\\\[.*\\\\]$' for describing language specific editor settings. Use 'configurationDefaults' contribution.",e):void 0!==Au.getConfigurationProperties()[e]?o("config.property.duplicate","Cannot register '{0}'. This property is already registered.",e):null}mu.add(wu.Configuration,Au);const Pu=Object.prototype.hasOwnProperty;function Fu(e,t){for(let i in e)if(Pu.call(e,i)){const n=t({key:i,value:e[i]},(function(){delete e[i]}));if(!1===n)return}}class Wu{constructor(){this.map=new Map}add(e,t){let i=this.map.get(e);i||(i=new Set,this.map.set(e,i)),i.add(t)}delete(e,t){const i=this.map.get(e);i&&(i.delete(t),0===i.size&&this.map.delete(e))}forEach(e,t){const i=this.map.get(e);i&&i.forEach(t)}}const Bu=new class{constructor(){this._tabFocus=!1,this._onDidChangeTabFocus=new Ve,this.onDidChangeTabFocus=this._onDidChangeTabFocus.event}getTabFocusMode(){return this._tabFocus}setTabFocusMode(e){this._tabFocus!==e&&(this._tabFocus=e,this._onDidChangeTabFocus.fire(this._tabFocus))}},Vu=Object.hasOwnProperty;class Hu{constructor(){this._values=[]}_read(e){return this._values[e]}get(e){return this._values[e]}_write(e,t){this._values[e]=t}}class zu{constructor(){this._values=[]}_read(e){return this._values[e]}_write(e,t){this._values[e]=t}}class Uu{static readOptions(e){const t=e,i=new zu;for(const n of he){const e="_never_"===n.name?void 0:t[n.name];i._write(n.id,e)}return i}static validateOptions(e){const t=new m;for(const i of he)t._write(i.id,i.validate(e._read(i.id)));return t}static computeOptions(e,t){const i=new Hu;for(const n of he)i._write(n.id,n.compute(t,i,e._read(n.id)));return i}static _deepEquals(e,t){if("object"!==typeof e||"object"!==typeof t)return e===t;if(Array.isArray(e)||Array.isArray(t))return!(!Array.isArray(e)||!Array.isArray(t))&&An(e,t);for(let i in e)if(!Uu._deepEquals(e[i],t[i]))return!1;return!0}static checkEquals(e,t){const i=[];let n=!1;for(const o of he){const r=!Uu._deepEquals(e._read(o.id),t._read(o.id));i[o.id]=r,r&&(n=!0)}return n?new f(i):null}}function ju(e){const t=e.wordWrap;!0===t?e.wordWrap="on":!1===t&&(e.wordWrap="off");const i=e.lineNumbers;!0===i?e.lineNumbers="on":!1===i&&(e.lineNumbers="off");const n=e.autoClosingBrackets;!1===n&&(e.autoClosingBrackets="never",e.autoClosingQuotes="never",e.autoSurround="never");const o=e.cursorBlinking;"visible"===o&&(e.cursorBlinking="solid");const r=e.renderWhitespace;!0===r?e.renderWhitespace="boundary":!1===r&&(e.renderWhitespace="none");const s=e.renderLineHighlight;!0===s?e.renderLineHighlight="line":!1===s&&(e.renderLineHighlight="none");const a=e.acceptSuggestionOnEnter;!0===a?e.acceptSuggestionOnEnter="on":!1===a&&(e.acceptSuggestionOnEnter="off");const l=e.tabCompletion;!1===l?e.tabCompletion="off":!0===l&&(e.tabCompletion="onlySnippets");const c=e.suggest;if(c&&"object"===typeof c.filteredTypes&&c.filteredTypes){const e={method:"showMethods",function:"showFunctions",constructor:"showConstructors",field:"showFields",variable:"showVariables",class:"showClasses",struct:"showStructs",interface:"showInterfaces",module:"showModules",property:"showProperties",event:"showEvents",operator:"showOperators",unit:"showUnits",value:"showValues",constant:"showConstants",enum:"showEnums",enumMember:"showEnumMembers",keyword:"showKeywords",text:"showWords",color:"showColors",file:"showFiles",reference:"showReferences",folder:"showFolders",typeParameter:"showTypeParameters",snippet:"showSnippets"};Fu(e,e=>{const t=c.filteredTypes[e.key];!1===t&&(c[e.value]=t)})}const h=e.hover;!0===h?e.hover={enabled:!0}:!1===h&&(e.hover={enabled:!1});const d=e.parameterHints;!0===d?e.parameterHints={enabled:!0}:!1===d&&(e.parameterHints={enabled:!1});const u=e.autoIndent;!0===u?e.autoIndent="full":!1===u&&(e.autoIndent="advanced");const g=e.matchBrackets;!0===g?e.matchBrackets="always":!1===g&&(e.matchBrackets="never")}function Ku(e){const t=rs(e);return ju(t),t}class qu extends Oe{constructor(e,t){super(),this._onDidChange=this._register(new Ve),this.onDidChange=this._onDidChange.event,this._onDidChangeFast=this._register(new Ve),this.onDidChangeFast=this._onDidChangeFast.event,this.isSimpleWidget=e,this._isDominatedByLongLines=!1,this._computeOptionsMemory=new p,this._viewLineCount=1,this._lineNumbersDigitCount=1,this._rawOptions=Ku(t),this._readOptions=Uu.readOptions(this._rawOptions),this._validatedOptions=Uu.validateOptions(this._readOptions),this._register(fs.onDidChangeZoomLevel(e=>this._recomputeOptions())),this._register(Bu.onDidChangeTabFocus(e=>this._recomputeOptions()))}observeReferenceElement(e){}dispose(){super.dispose()}_recomputeOptions(){const e=this.options,t=this._computeInternalOptions();if(e){const i=Uu.checkEquals(e,t);if(null===i)return;this.options=t,this._onDidChangeFast.fire(i),this._onDidChange.fire(i)}else this.options=t}getRawOptions(){return this._rawOptions}_computeInternalOptions(){const e=this._getEnvConfiguration(),t=_s.createFromValidatedSettings(this._validatedOptions,e.zoomLevel,this.isSimpleWidget),i={memory:this._computeOptionsMemory,outerWidth:e.outerWidth,outerHeight:e.outerHeight,fontInfo:this.readConfiguration(t),extraEditorClassName:e.extraEditorClassName,isDominatedByLongLines:this._isDominatedByLongLines,viewLineCount:this._viewLineCount,lineNumbersDigitCount:this._lineNumbersDigitCount,emptySelectionClipboard:e.emptySelectionClipboard,pixelRatio:e.pixelRatio,tabFocusMode:Bu.getTabFocusMode(),accessibilitySupport:e.accessibilitySupport};return Uu.computeOptions(this._validatedOptions,i)}static _subsetEquals(e,t){for(const i in t)if(Vu.call(t,i)){const n=t[i],o=e[i];if(o===n)continue;if(Array.isArray(o)&&Array.isArray(n)){if(!An(o,n))return!1;continue}if(o&&"object"===typeof o&&n&&"object"===typeof n){if(!this._subsetEquals(o,n))return!1;continue}return!1}return!0}updateOptions(e){if("undefined"===typeof e)return;const t=Ku(e);qu._subsetEquals(this._rawOptions,t)||(this._rawOptions=ls(this._rawOptions,t||{}),this._readOptions=Uu.readOptions(this._rawOptions),this._validatedOptions=Uu.validateOptions(this._readOptions),this._recomputeOptions())}setIsDominatedByLongLines(e){this._isDominatedByLongLines=e,this._recomputeOptions()}setMaxLineNumber(e){const t=qu._digitCount(e);this._lineNumbersDigitCount!==t&&(this._lineNumbersDigitCount=t,this._recomputeOptions())}setViewLineCount(e){this._viewLineCount!==e&&(this._viewLineCount=e,this._recomputeOptions())}static _digitCount(e){let t=0;while(e)e=Math.floor(e/10),t++;return t||1}}const $u=Object.freeze({id:"editor",order:5,type:"object",title:o("editorConfigurationTitle","Editor"),scope:5}),Gu=mu.as(wu.Configuration),Yu=Object.assign(Object.assign({},$u),{properties:{"editor.tabSize":{type:"number",default:ce.tabSize,minimum:1,markdownDescription:o("tabSize","The number of spaces a tab is equal to. This setting is overridden based on the file contents when `#editor.detectIndentation#` is on.")},"editor.insertSpaces":{type:"boolean",default:ce.insertSpaces,markdownDescription:o("insertSpaces","Insert spaces when pressing `Tab`. This setting is overridden based on the file contents when `#editor.detectIndentation#` is on.")},"editor.detectIndentation":{type:"boolean",default:ce.detectIndentation,markdownDescription:o("detectIndentation","Controls whether `#editor.tabSize#` and `#editor.insertSpaces#` will be automatically detected when a file is opened based on the file contents.")},"editor.trimAutoWhitespace":{type:"boolean",default:ce.trimAutoWhitespace,description:o("trimAutoWhitespace","Remove trailing auto inserted whitespace.")},"editor.largeFileOptimizations":{type:"boolean",default:ce.largeFileOptimizations,description:o("largeFileOptimizations","Special handling for large files to disable certain memory intensive features.")},"editor.wordBasedSuggestions":{type:"boolean",default:!0,description:o("wordBasedSuggestions","Controls whether completions should be computed based on words in the document.")},"editor.semanticHighlighting.enabled":{enum:[!0,!1,"configuredByTheme"],enumDescriptions:[o("semanticHighlighting.true","Semantic highlighting enabled for all color themes."),o("semanticHighlighting.false","Semantic highlighting disabled for all color themes."),o("semanticHighlighting.configuredByTheme","Semantic highlighting is configured by the current color theme's `semanticHighlighting` setting.")],default:"configuredByTheme",description:o("semanticHighlighting.enabled","Controls whether the semanticHighlighting is shown for the languages that support it.")},"editor.stablePeek":{type:"boolean",default:!1,markdownDescription:o("stablePeek","Keep peek editors open even when double clicking their content or when hitting `Escape`.")},"editor.maxTokenizationLineLength":{type:"integer",default:2e4,description:o("maxTokenizationLineLength","Lines above this length will not be tokenized for performance reasons")},"diffEditor.maxComputationTime":{type:"number",default:5e3,description:o("maxComputationTime","Timeout in milliseconds after which diff computation is cancelled. Use 0 for no timeout.")},"diffEditor.renderSideBySide":{type:"boolean",default:!0,description:o("sideBySide","Controls whether the diff editor shows the diff side by side or inline.")},"diffEditor.ignoreTrimWhitespace":{type:"boolean",default:!0,description:o("ignoreTrimWhitespace","When enabled, the diff editor ignores changes in leading or trailing whitespace.")},"diffEditor.renderIndicators":{type:"boolean",default:!0,description:o("renderIndicators","Controls whether the diff editor shows +/- indicators for added/removed changes.")},"diffEditor.codeLens":{type:"boolean",default:!1,description:o("codeLens","Controls whether the editor shows CodeLens.")}}});function Xu(e){return"undefined"!==typeof e.type||"undefined"!==typeof e.anyOf}for(const PP of he){const e=PP.schema;if("undefined"!==typeof e)if(Xu(e))Yu.properties["editor."+PP.name]=e;else for(let t in e)Vu.call(e,t)&&(Yu.properties[t]=e[t])}let Zu=null;function Qu(){return null===Zu&&(Zu=Object.create(null),Object.keys(Yu.properties).forEach(e=>{Zu[e]=!0})),Zu}function Ju(e){const t=Qu();return t["editor."+e]||!1}function eg(e){const t=Qu();return t["diffEditor."+e]||!1}Gu.registerConfiguration(Yu);class tg{static insert(e,t){return{range:new Jt(e.lineNumber,e.column,e.lineNumber,e.column),text:t,forceMoveMarkers:!0}}static delete(e){return{range:e,text:null}}static replace(e,t){return{range:e,text:t}}static replaceMove(e,t){return{range:e,text:t,forceMoveMarkers:!0}}}const ig=zi("configurationService");function ng(e,t){const i=Object.create(null);for(let n in e)og(i,n,e[n],t);return i}function og(e,t,i,n){const o=t.split("."),r=o.pop();let s=e;for(let l=0;l<o.length;l++){let e=o[l],i=s[e];switch(typeof i){case"undefined":i=s[e]=Object.create(null);break;case"object":break;default:return void n(`Ignoring ${t} as ${o.slice(0,l+1).join(".")} is ${JSON.stringify(i)}`)}s=i}if("object"===typeof s&&null!==s)try{s[r]=i}catch(a){n(`Ignoring ${t} as ${o.join(".")} is ${JSON.stringify(s)}`)}else n(`Ignoring ${t} as ${o.join(".")} is ${JSON.stringify(s)}`)}function rg(e,t){const i=t.split(".");sg(e,i)}function sg(e,t){const i=t.shift();if(0!==t.length){if(-1!==Object.keys(e).indexOf(i)){const n=e[i];"object"!==typeof n||Array.isArray(n)||(sg(n,t),0===Object.keys(n).length&&delete e[i])}}else delete e[i]}function ag(e,t,i){function n(e,t){let i=e;for(const n of t){if("object"!==typeof i||null===i)return;i=i[n]}return i}const o=t.split("."),r=n(e,o);return"undefined"===typeof r?i:r}function lg(){const e=mu.as(wu.Configuration).getConfigurationProperties();return Object.keys(e)}function cg(){const e=Object.create(null),t=mu.as(wu.Configuration).getConfigurationProperties();for(let i in t){let n=t[i].default;og(e,i,n,e=>console.error("Conflict in default settings: "+e))}return e}class hg{constructor(e={},t=[],i=[]){this._contents=e,this._keys=t,this._overrides=i,this.isFrozen=!1}get contents(){return this.checkAndFreeze(this._contents)}get overrides(){return this.checkAndFreeze(this._overrides)}get keys(){return this.checkAndFreeze(this._keys)}isEmpty(){return 0===this._keys.length&&0===Object.keys(this._contents).length&&0===this._overrides.length}getValue(e){return e?ag(this.contents,e):this.contents}override(e){const t=this.getContentsForOverrideIdentifer(e);if(!t||"object"!==typeof t||!Object.keys(t).length)return this;let i={};for(const n of zn([...Object.keys(this.contents),...Object.keys(t)])){let e=this.contents[n],o=t[n];o&&("object"===typeof e&&"object"===typeof o?(e=rs(e),this.mergeContents(e,o)):e=o),i[n]=e}return new hg(i,this.keys,this.overrides)}merge(...e){const t=rs(this.contents),i=rs(this.overrides),n=[...this.keys];for(const o of e){this.mergeContents(t,o.contents);for(const e of o.overrides){const[t]=i.filter(t=>An(t.identifiers,e.identifiers));t?this.mergeContents(t.contents,e.contents):i.push(rs(e))}for(const e of o.keys)-1===n.indexOf(e)&&n.push(e)}return new hg(t,n,i)}freeze(){return this.isFrozen=!0,this}mergeContents(e,t){for(const i of Object.keys(t))i in e&&Ar(e[i])&&Ar(t[i])?this.mergeContents(e[i],t[i]):e[i]=rs(t[i])}checkAndFreeze(e){return this.isFrozen&&!Object.isFrozen(e)?ss(e):e}getContentsForOverrideIdentifer(e){for(const t of this.overrides)if(-1!==t.identifiers.indexOf(e))return t.contents;return null}toJSON(){return{contents:this.contents,overrides:this.overrides,keys:this.keys}}setValue(e,t){this.addKey(e),og(this.contents,e,t,e=>{throw new Error(e)})}removeValue(e){this.removeKey(e)&&rg(this.contents,e)}addKey(e){let t=this.keys.length;for(let i=0;i<t;i++)0===e.indexOf(this.keys[i])&&(t=i);this.keys.splice(t,1,e)}removeKey(e){let t=this.keys.indexOf(e);return-1!==t&&(this.keys.splice(t,1),!0)}}class dg extends hg{constructor(){const e=cg(),t=lg(),i=[];for(const n of Object.keys(e))Mu.test(n)&&i.push({identifiers:[Iu(n).trim()],keys:Object.keys(e[n]),contents:ng(e[n],e=>console.error("Conflict in default settings file: "+e))});super(e,t,i)}}class ug{constructor(e,t,i=new hg,n=new hg,o=new Es,r=new hg,s=new Es,a=!0){this._defaultConfiguration=e,this._localUserConfiguration=t,this._remoteUserConfiguration=i,this._workspaceConfiguration=n,this._folderConfigurations=o,this._memoryConfiguration=r,this._memoryConfigurationByResource=s,this._freeze=a,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations=new Es,this._userConfiguration=null}getValue(e,t,i){const n=this.getConsolidateConfigurationModel(t,i);return n.getValue(e)}updateValue(e,t,i={}){let n;i.resource?(n=this._memoryConfigurationByResource.get(i.resource),n||(n=new hg,this._memoryConfigurationByResource.set(i.resource,n))):n=this._memoryConfiguration,void 0===t?n.removeValue(e):n.setValue(e,t),i.resource||(this._workspaceConsolidatedConfiguration=null)}get userConfiguration(){return this._userConfiguration||(this._userConfiguration=this._remoteUserConfiguration.isEmpty()?this._localUserConfiguration:this._localUserConfiguration.merge(this._remoteUserConfiguration),this._freeze&&this._userConfiguration.freeze()),this._userConfiguration}getConsolidateConfigurationModel(e,t){let i=this.getConsolidatedConfigurationModelForResource(e,t);return e.overrideIdentifier?i.override(e.overrideIdentifier):i}getConsolidatedConfigurationModelForResource({resource:e},t){let i=this.getWorkspaceConsolidatedConfiguration();if(t&&e){const n=t.getFolder(e);n&&(i=this.getFolderConsolidatedConfiguration(n.uri)||i);const o=this._memoryConfigurationByResource.get(e);o&&(i=i.merge(o))}return i}getWorkspaceConsolidatedConfiguration(){return this._workspaceConsolidatedConfiguration||(this._workspaceConsolidatedConfiguration=this._defaultConfiguration.merge(this.userConfiguration,this._workspaceConfiguration,this._memoryConfiguration),this._freeze&&(this._workspaceConfiguration=this._workspaceConfiguration.freeze())),this._workspaceConsolidatedConfiguration}getFolderConsolidatedConfiguration(e){let t=this._foldersConsolidatedConfigurations.get(e);if(!t){const i=this.getWorkspaceConsolidatedConfiguration(),n=this._folderConfigurations.get(e);n?(t=i.merge(n),this._freeze&&(t=t.freeze()),this._foldersConsolidatedConfigurations.set(e,t)):t=i}return t}toData(){return{defaults:{contents:this._defaultConfiguration.contents,overrides:this._defaultConfiguration.overrides,keys:this._defaultConfiguration.keys},user:{contents:this.userConfiguration.contents,overrides:this.userConfiguration.overrides,keys:this.userConfiguration.keys},workspace:{contents:this._workspaceConfiguration.contents,overrides:this._workspaceConfiguration.overrides,keys:this._workspaceConfiguration.keys},folders:[...this._folderConfigurations.keys()].reduce((e,t)=>{const{contents:i,overrides:n,keys:o}=this._folderConfigurations.get(t);return e.push([t,{contents:i,overrides:n,keys:o}]),e},[])}}static parse(e){const t=this.parseConfigurationModel(e.defaults),i=this.parseConfigurationModel(e.user),n=this.parseConfigurationModel(e.workspace),o=e.folders.reduce((e,t)=>(e.set(Ht.revive(t[0]),this.parseConfigurationModel(t[1])),e),new Es);return new ug(t,i,new hg,n,o,new hg,new Es,!1)}static parseConfigurationModel(e){return new hg(e.contents,e.keys,e.overrides).freeze()}}class gg{constructor(e,t,i,n){this.change=e,this.previous=t,this.currentConfiguraiton=i,this.currentWorkspace=n,this._previousConfiguration=void 0;const o=new Set;e.keys.forEach(e=>o.add(e)),e.overrides.forEach(([,e])=>e.forEach(e=>o.add(e))),this.affectedKeys=[...o.values()];const r=new hg;this.affectedKeys.forEach(e=>r.setValue(e,{})),this.affectedKeysTree=r.contents}get previousConfiguration(){return!this._previousConfiguration&&this.previous&&(this._previousConfiguration=ug.parse(this.previous.data)),this._previousConfiguration}affectsConfiguration(e,t){var i;if(this.doesAffectedKeysTreeContains(this.affectedKeysTree,e)){if(t){const n=this.previousConfiguration?this.previousConfiguration.getValue(e,t,null===(i=this.previous)||void 0===i?void 0:i.workspace):void 0,o=this.currentConfiguraiton.getValue(e,t,this.currentWorkspace);return!hs(n,o)}return!0}return!1}doesAffectedKeysTreeContains(e,t){let i,n=ng({[t]:!0},()=>{});while("object"===typeof n&&(i=Object.keys(n)[0])){if(e=e[i],!e)return!1;n=n[i]}return!0}}class fg extends Oe{constructor(e,t,i,n,o){super(),this._contextKeyService=e,this._commandService=t,this._telemetryService=i,this._notificationService=n,this._logService=o,this._onDidUpdateKeybindings=this._register(new Ve),this._currentChord=null,this._currentChordChecker=new Nn,this._currentChordStatusMessage=null,this._logging=!1}get onDidUpdateKeybindings(){return this._onDidUpdateKeybindings?this._onDidUpdateKeybindings.event:Fe.None}dispose(){super.dispose()}_log(e){this._logging&&this._logService.info("[KeybindingService]: "+e)}getKeybindings(){return this._getResolver().getKeybindings()}lookupKeybindings(e){return Bn(this._getResolver().lookupKeybindings(e).map(e=>e.resolvedKeybinding))}lookupKeybinding(e){const t=this._getResolver().lookupPrimaryKeybinding(e);if(t)return t.resolvedKeybinding}dispatchEvent(e,t){return this._dispatch(e,t)}softDispatch(e,t){const i=this.resolveKeyboardEvent(e);if(i.isChord())return console.warn("Unexpected keyboard event mapped to a chord"),null;const[n]=i.getDispatchParts();if(null===n)return null;const o=this._contextKeyService.getContext(t),r=this._currentChord?this._currentChord.keypress:null;return this._getResolver().resolve(o,r,n)}_enterChordMode(e,t){this._currentChord={keypress:e,label:t},this._currentChordStatusMessage=this._notificationService.status(o("first.chord","({0}) was pressed. Waiting for second key of chord...",t));const i=Date.now();this._currentChordChecker.cancelAndSet(()=>{this._documentHasFocus()?Date.now()-i>5e3&&this._leaveChordMode():this._leaveChordMode()},500)}_leaveChordMode(){this._currentChordStatusMessage&&(this._currentChordStatusMessage.dispose(),this._currentChordStatusMessage=null),this._currentChordChecker.cancel(),this._currentChord=null}_dispatch(e,t){return this._doDispatch(this.resolveKeyboardEvent(e),t)}_doDispatch(e,t){let i=!1;if(e.isChord())return console.warn("Unexpected keyboard event mapped to a chord"),!1;const[n]=e.getDispatchParts();if(null===n)return this._log("\\ Keyboard event cannot be dispatched."),i;const r=this._contextKeyService.getContext(t),s=this._currentChord?this._currentChord.keypress:null,a=e.getLabel(),l=this._getResolver().resolve(r,s,n);return this._logService.trace("KeybindingService#dispatch",a,null===l||void 0===l?void 0:l.commandId),l&&l.enterChord?(i=!0,this._enterChordMode(n,a),i):(this._currentChord&&(l&&l.commandId||(this._notificationService.status(o("missing.chord","The key combination ({0}, {1}) is not a command.",this._currentChord.label,a),{hideAfter:1e4}),i=!0)),this._leaveChordMode(),l&&l.commandId&&(l.bubble||(i=!0),"undefined"===typeof l.commandArgs?this._commandService.executeCommand(l.commandId).then(void 0,e=>this._notificationService.warn(e)):this._commandService.executeCommand(l.commandId,l.commandArgs).then(void 0,e=>this._notificationService.warn(e)),this._telemetryService.publicLog2("workbenchActionExecuted",{id:l.commandId,from:"keybinding"})),i)}mightProducePrintableCharacter(e){return!e.ctrlKey&&!e.metaKey&&(e.keyCode>=31&&e.keyCode<=56||e.keyCode>=21&&e.keyCode<=30)}}class mg{constructor(e,t,i){this._log=i,this._defaultKeybindings=e,this._defaultBoundCommands=new Map;for(let n=0,o=e.length;n<o;n++){const t=e[n].command;t&&this._defaultBoundCommands.set(t,!0)}this._map=new Map,this._lookupMap=new Map,this._keybindings=mg.combine(e,t);for(let n=0,o=this._keybindings.length;n<o;n++){let e=this._keybindings[n];0!==e.keypressParts.length&&(e.when&&0===e.when.type||this._addKeyPress(e.keypressParts[0],e))}}static _isTargetedForRemoval(e,t,i,n,o){if(e.command!==n)return!1;if(t&&e.keypressParts[0]!==t)return!1;if(i&&e.keypressParts[1]!==i)return!1;if(o){if(!e.when)return!1;if(!o.equals(e.when))return!1}return!0}static combine(e,t){e=e.slice(0);let i=[];for(const n of t){if(!n.command||0===n.command.length||"-"!==n.command.charAt(0)){i.push(n);continue}const t=n.command.substr(1),o=n.keypressParts[0],r=n.keypressParts[1],s=n.when;for(let i=e.length-1;i>=0;i--)this._isTargetedForRemoval(e[i],o,r,t,s)&&e.splice(i,1)}return e.concat(i)}_addKeyPress(e,t){const i=this._map.get(e);if("undefined"===typeof i)return this._map.set(e,[t]),void this._addToLookupMap(t);for(let n=i.length-1;n>=0;n--){let e=i[n];if(e.command===t.command)continue;const o=e.keypressParts.length>1,r=t.keypressParts.length>1;o&&r&&e.keypressParts[1]!==t.keypressParts[1]||mg.whenIsEntirelyIncluded(e.when,t.when)&&this._removeFromLookupMap(e)}i.push(t),this._addToLookupMap(t)}_addToLookupMap(e){if(!e.command)return;let t=this._lookupMap.get(e.command);"undefined"===typeof t?(t=[e],this._lookupMap.set(e.command,t)):t.push(e)}_removeFromLookupMap(e){if(!e.command)return;let t=this._lookupMap.get(e.command);if("undefined"!==typeof t)for(let i=0,n=t.length;i<n;i++)if(t[i]===e)return void t.splice(i,1)}static whenIsEntirelyIncluded(e,t){return!t||!!e&&this._implies(e,t)}static _implies(e,t){const i=e.negate(),n=e=>9===e.type?e.expr:[e];let o=n(i).concat(n(t));for(let r=0;r<o.length;r++){const e=o[r],t=e.negate();for(let i=r+1;i<o.length;i++){const e=o[i];if(t.equals(e))return!0}}return!1}getKeybindings(){return this._keybindings}lookupKeybindings(e){let t=this._lookupMap.get(e);if("undefined"===typeof t||0===t.length)return[];let i=[],n=0;for(let o=t.length-1;o>=0;o--)i[n++]=t[o];return i}lookupPrimaryKeybinding(e){let t=this._lookupMap.get(e);return"undefined"===typeof t||0===t.length?null:t[t.length-1]}resolve(e,t,i){this._log(`| Resolving ${i}${t?" chorded from "+t:""}`);let n=null;if(null!==t){const e=this._map.get(t);if("undefined"===typeof e)return this._log("\\ No keybinding entries."),null;n=[];for(let t=0,o=e.length;t<o;t++){let o=e[t];o.keypressParts[1]===i&&n.push(o)}}else{const e=this._map.get(i);if("undefined"===typeof e)return this._log("\\ No keybinding entries."),null;n=e}let o=this._findCommand(e,n);return o?null===t&&o.keypressParts.length>1&&null!==o.keypressParts[1]?(this._log(`\\ From ${n.length} keybinding entries, matched chord, when: ${pg(o.when)}, source: ${_g(o)}.`),{enterChord:!0,leaveChord:!1,commandId:null,commandArgs:null,bubble:!1}):(this._log(`\\ From ${n.length} keybinding entries, matched ${o.command}, when: ${pg(o.when)}, source: ${_g(o)}.`),{enterChord:!1,leaveChord:o.keypressParts.length>1,commandId:o.command,commandArgs:o.commandArgs,bubble:o.bubble}):(this._log(`\\ From ${n.length} keybinding entries, no when clauses matched the context.`),null)}_findCommand(e,t){for(let i=t.length-1;i>=0;i--){let n=t[i];if(mg.contextMatchesRules(e,n.when))return n}return null}static contextMatchesRules(e,t){return!t||t.evaluate(e)}}function pg(e){return e?""+e.serialize():"no when condition"}function _g(e){return e.isDefault?e.extensionId?"built-in extension "+e.extensionId:"built-in":e.extensionId?"user extension "+e.extensionId:"user"}class bg{constructor(){this._coreKeybindings=[],this._extensionKeybindings=[],this._cachedMergedKeybindings=null}static bindToCurrentPlatform(e){if(1===r["a"]){if(e&&e.win)return e.win}else if(2===r["a"]){if(e&&e.mac)return e.mac}else if(e&&e.linux)return e.linux;return e}registerKeybindingRule(e){const t=bg.bindToCurrentPlatform(e);if(t&&t.primary){const i=et(t.primary,r["a"]);i&&this._registerDefaultKeybinding(i,e.id,e.args,e.weight,0,e.when)}if(t&&Array.isArray(t.secondary))for(let i=0,n=t.secondary.length;i<n;i++){const n=t.secondary[i],o=et(n,r["a"]);o&&this._registerDefaultKeybinding(o,e.id,e.args,e.weight,-i-1,e.when)}}registerCommandAndKeybindingRule(e){this.registerKeybindingRule(e),$r.registerCommand(e)}static _mightProduceChar(e){return e>=21&&e<=30||(e>=31&&e<=56||(80===e||81===e||82===e||83===e||84===e||85===e||86===e||110===e||111===e||87===e||88===e||89===e||90===e||91===e||92===e))}_assertNoCtrlAlt(e,t){e.ctrlKey&&e.altKey&&!e.metaKey&&bg._mightProduceChar(e.keyCode)&&console.warn("Ctrl+Alt+ keybindings should not be used by default under Windows. Offender: ",e," for ",t)}_registerDefaultKeybinding(e,t,i,n,o,s){1===r["a"]&&this._assertNoCtrlAlt(e.parts[0],t),this._coreKeybindings.push({keybinding:e,command:t,commandArgs:i,when:s,weight1:n,weight2:o,extensionId:null}),this._cachedMergedKeybindings=null}getDefaultKeybindings(){return this._cachedMergedKeybindings||(this._cachedMergedKeybindings=[].concat(this._coreKeybindings).concat(this._extensionKeybindings),this._cachedMergedKeybindings.sort(Cg)),this._cachedMergedKeybindings.slice(0)}}const vg=new bg,wg={EditorModes:"platform.keybindingsRegistry"};function Cg(e,t){return e.weight1!==t.weight1?e.weight1-t.weight1:e.command<t.command?-1:e.command>t.command?1:e.weight2-t.weight2}mu.add(wg.EditorModes,vg);class yg{constructor(e,t,i,n,o,r){this.resolvedKeybinding=e,this.keypressParts=e?Sg(e.getDispatchParts()):[],this.bubble=!!t&&94===t.charCodeAt(0),this.command=this.bubble?t.substr(1):t,this.commandArgs=i,this.when=n,this.isDefault=o,this.extensionId=r}}function Sg(e){let t=[];for(let i=0,n=e.length;i<n;i++){const n=e[i];if(!n)return t;t.push(n)}return t}class xg{constructor(e,t,i=t){this.modifierLabels=[null],this.modifierLabels[2]=e,this.modifierLabels[1]=t,this.modifierLabels[3]=i}toLabel(e,t,i){if(0===t.length)return null;const n=[];for(let o=0,r=t.length;o<r;o++){const r=t[o],s=i(r);if(null===s)return null;n[o]=Eg(r,s,this.modifierLabels[e])}return n.join(" ")}}const Lg=new xg({ctrlKey:"⌃",shiftKey:"⇧",altKey:"⌥",metaKey:"⌘",separator:""},{ctrlKey:o({key:"ctrlKey",comment:["This is the short form for the Control key on the keyboard"]},"Ctrl"),shiftKey:o({key:"shiftKey",comment:["This is the short form for the Shift key on the keyboard"]},"Shift"),altKey:o({key:"altKey",comment:["This is the short form for the Alt key on the keyboard"]},"Alt"),metaKey:o({key:"windowsKey",comment:["This is the short form for the Windows key on the keyboard"]},"Windows"),separator:"+"},{ctrlKey:o({key:"ctrlKey",comment:["This is the short form for the Control key on the keyboard"]},"Ctrl"),shiftKey:o({key:"shiftKey",comment:["This is the short form for the Shift key on the keyboard"]},"Shift"),altKey:o({key:"altKey",comment:["This is the short form for the Alt key on the keyboard"]},"Alt"),metaKey:o({key:"superKey",comment:["This is the short form for the Super key on the keyboard"]},"Super"),separator:"+"}),kg=new xg({ctrlKey:o({key:"ctrlKey.long",comment:["This is the long form for the Control key on the keyboard"]},"Control"),shiftKey:o({key:"shiftKey.long",comment:["This is the long form for the Shift key on the keyboard"]},"Shift"),altKey:o({key:"altKey.long",comment:["This is the long form for the Alt key on the keyboard"]},"Alt"),metaKey:o({key:"cmdKey.long",comment:["This is the long form for the Command key on the keyboard"]},"Command"),separator:"+"},{ctrlKey:o({key:"ctrlKey.long",comment:["This is the long form for the Control key on the keyboard"]},"Control"),shiftKey:o({key:"shiftKey.long",comment:["This is the long form for the Shift key on the keyboard"]},"Shift"),altKey:o({key:"altKey.long",comment:["This is the long form for the Alt key on the keyboard"]},"Alt"),metaKey:o({key:"windowsKey.long",comment:["This is the long form for the Windows key on the keyboard"]},"Windows"),separator:"+"},{ctrlKey:o({key:"ctrlKey.long",comment:["This is the long form for the Control key on the keyboard"]},"Control"),shiftKey:o({key:"shiftKey.long",comment:["This is the long form for the Shift key on the keyboard"]},"Shift"),altKey:o({key:"altKey.long",comment:["This is the long form for the Alt key on the keyboard"]},"Alt"),metaKey:o({key:"superKey.long",comment:["This is the long form for the Super key on the keyboard"]},"Super"),separator:"+"});function Eg(e,t,i){if(null===t)return"";const n=[];return e.ctrlKey&&n.push(i.ctrlKey),e.shiftKey&&n.push(i.shiftKey),e.altKey&&n.push(i.altKey),e.metaKey&&n.push(i.metaKey),""!==t&&n.push(t),n.join(i.separator)}class Dg extends rt{constructor(e,t){if(super(),0===t.length)throw we("parts");this._os=e,this._parts=t}getLabel(){return Lg.toLabel(this._os,this._parts,e=>this._getLabel(e))}getAriaLabel(){return kg.toLabel(this._os,this._parts,e=>this._getAriaLabel(e))}isChord(){return this._parts.length>1}getParts(){return this._parts.map(e=>this._getPart(e))}_getPart(e){return new ot(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,this._getLabel(e),this._getAriaLabel(e))}getDispatchParts(){return this._parts.map(e=>this._getDispatchPart(e))}}class Ng extends Dg{constructor(e,t){super(t,e.parts)}_keyCodeToUILabel(e){if(2===this._os)switch(e){case 15:return"←";case 16:return"↑";case 17:return"→";case 18:return"↓"}return Qe.toString(e)}_getLabel(e){return e.isDuplicateModifierCase()?"":this._keyCodeToUILabel(e.keyCode)}_getAriaLabel(e){return e.isDuplicateModifierCase()?"":Qe.toString(e.keyCode)}_getDispatchPart(e){return Ng.getDispatchStr(e)}static getDispatchStr(e){if(e.isModifierKey())return null;let t="";return e.ctrlKey&&(t+="ctrl+"),e.shiftKey&&(t+="shift+"),e.altKey&&(t+="alt+"),e.metaKey&&(t+="meta+"),t+=Qe.toString(e.keyCode),t}}const Tg=zi("notificationService");class Mg{}const Ig=zi("contextService");var Og,Ag,Rg,Pg,Fg,Wg,Bg,Vg,Hg,zg,Ug;(function(e){function t(e){return!(!e||"object"!==typeof e||"string"!==typeof e.id||!Array.isArray(e.folders))}e.isIWorkspace=t})(Og||(Og={})),function(e){function t(e){return!(!e||"object"!==typeof e||!Ht.isUri(e.uri)||"string"!==typeof e.name||"function"!==typeof e.toResource)}e.isIWorkspaceFolder=t}(Ag||(Ag={}));class jg{constructor(e,t){this.raw=t,this.uri=e.uri,this.index=e.index,this.name=e.name}toResource(e){return Nr(this.uri,e)}toJSON(){return{uri:this.uri,name:this.name,index:this.index}}}(function(e){e.noSelection=o("noSelection","No selection"),e.singleSelectionRange=o("singleSelectionRange","Line {0}, Column {1} ({2} selected)"),e.singleSelection=o("singleSelection","Line {0}, Column {1}"),e.multiSelectionRange=o("multiSelectionRange","{0} selections ({1} characters selected)"),e.multiSelection=o("multiSelection","{0} selections"),e.emergencyConfOn=o("emergencyConfOn","Now changing the setting `accessibilitySupport` to 'on'."),e.openingDocs=o("openingDocs","Now opening the Editor Accessibility documentation page."),e.readonlyDiffEditor=o("readonlyDiffEditor"," in a read-only pane of a diff editor."),e.editableDiffEditor=o("editableDiffEditor"," in a pane of a diff editor."),e.readonlyEditor=o("readonlyEditor"," in a read-only code editor"),e.editableEditor=o("editableEditor"," in a code editor"),e.changeConfigToOnMac=o("changeConfigToOnMac","To configure the editor to be optimized for usage with a Screen Reader press Command+E now."),e.changeConfigToOnWinLinux=o("changeConfigToOnWinLinux","To configure the editor to be optimized for usage with a Screen Reader press Control+E now."),e.auto_on=o("auto_on","The editor is configured to be optimized for usage with a Screen Reader."),e.auto_off=o("auto_off","The editor is configured to never be optimized for usage with a Screen Reader, which is not the case at this time."),e.tabFocusModeOnMsg=o("tabFocusModeOnMsg","Pressing Tab in the current editor will move focus to the next focusable element. Toggle this behavior by pressing {0}."),e.tabFocusModeOnMsgNoKb=o("tabFocusModeOnMsgNoKb","Pressing Tab in the current editor will move focus to the next focusable element. The command {0} is currently not triggerable by a keybinding."),e.tabFocusModeOffMsg=o("tabFocusModeOffMsg","Pressing Tab in the current editor will insert the tab character. Toggle this behavior by pressing {0}."),e.tabFocusModeOffMsgNoKb=o("tabFocusModeOffMsgNoKb","Pressing Tab in the current editor will insert the tab character. The command {0} is currently not triggerable by a keybinding."),e.openDocMac=o("openDocMac","Press Command+H now to open a browser window with more information related to editor accessibility."),e.openDocWinLinux=o("openDocWinLinux","Press Control+H now to open a browser window with more information related to editor accessibility."),e.outroMsg=o("outroMsg","You can dismiss this tooltip and return to the editor by pressing Escape or Shift+Escape."),e.showAccessibilityHelpAction=o("showAccessibilityHelpAction","Show Accessibility Help")})(Rg||(Rg={})),function(e){e.inspectTokensAction=o("inspectTokens","Developer: Inspect Tokens")}(Pg||(Pg={})),function(e){e.gotoLineActionLabel=o("gotoLineActionLabel","Go to Line/Column...")}(Fg||(Fg={})),function(e){e.helpQuickAccessActionLabel=o("helpQuickAccess","Show all Quick Access Providers")}(Wg||(Wg={})),function(e){e.quickCommandActionLabel=o("quickCommandActionLabel","Command Palette"),e.quickCommandHelp=o("quickCommandActionHelp","Show And Run Commands")}(Bg||(Bg={})),function(e){e.quickOutlineActionLabel=o("quickOutlineActionLabel","Go to Symbol..."),e.quickOutlineByCategoryActionLabel=o("quickOutlineByCategoryActionLabel","Go to Symbol by Category...")}(Vg||(Vg={})),function(e){e.editorViewAccessibleLabel=o("editorViewAccessibleLabel","Editor content"),e.accessibilityHelpMessage=o("accessibilityHelpMessage","Press Alt+F1 for Accessibility Options.")}(Hg||(Hg={})),function(e){e.toggleHighContrast=o("toggleHighContrast","Toggle High Contrast Theme")}(zg||(zg={})),function(e){e.bulkEditServiceSummary=o("bulkEditServiceSummary","Made {0} edits in {1} files")}(Ug||(Ug={}));var Kg=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},qg=function(e,t){return function(i,n){t(i,n,e)}},$g=function(e,t,i,n){function o(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,r){function s(e){try{l(n.next(e))}catch(t){r(t)}}function a(e){try{l(n["throw"](e))}catch(t){r(t)}}function l(e){e.done?i(e.value):o(e.value).then(s,a)}l((n=n.apply(e,t||[])).next())}))};class Gg{constructor(e){this.disposed=!1,this.model=e,this._onDispose=new Ve}get textEditorModel(){return this.model}dispose(){this.disposed=!0,this._onDispose.fire()}}function Yg(e,t,i){return au(e)?t(e):i(e)}let Xg=class{constructor(e){this.modelService=e}setEditor(e){this.editor=e}createModelReference(e){let t=null;return this.editor&&(t=Yg(this.editor,t=>this.findModel(t,e),t=>this.findModel(t.getOriginalEditor(),e)||this.findModel(t.getModifiedEditor(),e))),t?Promise.resolve(new Ae(new Gg(t))):Promise.reject(new Error("Model not found"))}findModel(e,t){let i=this.modelService.getModel(t);return i&&i.uri.toString()!==t.toString()?null:i}};Xg=Kg([qg(0,aa)],Xg);class Zg{show(){return Zg.NULL_PROGRESS_RUNNER}showWhile(e,t){return Promise.resolve(void 0)}}Zg.NULL_PROGRESS_RUNNER={done:()=>{},total:()=>{},worked:()=>{}};class Qg{confirm(e){return this.doConfirm(e).then(e=>({confirmed:e,checkboxChecked:!1}))}doConfirm(e){let t=e.message;return e.detail&&(t=t+"\n\n"+e.detail),Promise.resolve(window.confirm(t))}show(e,t,i,n){return Promise.resolve({choice:0})}}class Jg{info(e){return this.notify({severity:su.Info,message:e})}warn(e){return this.notify({severity:su.Warning,message:e})}error(e){return this.notify({severity:su.Error,message:e})}notify(e){switch(e.severity){case su.Error:console.error(e.message);break;case su.Warning:console.warn(e.message);break;default:console.log(e.message);break}return Jg.NO_OP}status(e,t){return Oe.None}}Jg.NO_OP=new Mg;class ef{constructor(e){this._onWillExecuteCommand=new Ve,this._onDidExecuteCommand=new Ve,this._instantiationService=e}executeCommand(e,...t){const i=$r.getCommand(e);if(!i)return Promise.reject(new Error(`command '${e}' not found`));try{this._onWillExecuteCommand.fire({commandId:e,args:t});const n=this._instantiationService.invokeFunction.apply(this._instantiationService,[i.handler,...t]);return this._onDidExecuteCommand.fire({commandId:e,args:t}),Promise.resolve(n)}catch(n){return Promise.reject(n)}}}class tf extends fg{constructor(e,t,i,n,o,r){super(e,t,i,n,o),this._cachedResolver=null,this._dynamicKeybindings=[],this._register(ho(r,Zo.KEY_DOWN,e=>{let t=new mn(e),i=this._dispatch(t,t.target);i&&(t.preventDefault(),t.stopPropagation())}))}addDynamicKeybinding(e,t,i,n){const o=et(t,r["a"]),s=new Ie;return o&&(this._dynamicKeybindings.push({keybinding:o,command:e,when:n,weight1:1e3,weight2:0,extensionId:null}),s.add(Me(()=>{for(let t=0;t<this._dynamicKeybindings.length;t++){let i=this._dynamicKeybindings[t];if(i.command===e)return this._dynamicKeybindings.splice(t,1),void this.updateResolver({source:1})}}))),s.add($r.registerCommand(e,i)),this.updateResolver({source:1}),s}updateResolver(e){this._cachedResolver=null,this._onDidUpdateKeybindings.fire(e)}_getResolver(){if(!this._cachedResolver){const e=this._toNormalizedKeybindingItems(vg.getDefaultKeybindings(),!0),t=this._toNormalizedKeybindingItems(this._dynamicKeybindings,!1);this._cachedResolver=new mg(e,t,e=>this._log(e))}return this._cachedResolver}_documentHasFocus(){return document.hasFocus()}_toNormalizedKeybindingItems(e,t){let i=[],n=0;for(const o of e){const e=o.when||void 0,r=o.keybinding;if(r){const s=this.resolveKeybinding(r);for(const r of s)i[n++]=new yg(r,o.command,o.commandArgs,e,t,null)}else i[n++]=new yg(void 0,o.command,o.commandArgs,e,t,null)}return i}resolveKeybinding(e){return[new Ng(e,r["a"])]}resolveKeyboardEvent(e){let t=new it(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,e.keyCode).toChord();return new Ng(t,r["a"])}}function nf(e){return e&&"object"===typeof e&&(!e.overrideIdentifier||"string"===typeof e.overrideIdentifier)&&(!e.resource||e.resource instanceof Ht)}class of{constructor(){this._onDidChangeConfiguration=new Ve,this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this._configuration=new ug(new dg,new hg)}getValue(e,t){const i="string"===typeof e?e:void 0,n=nf(e)?e:nf(t)?t:{};return this._configuration.getValue(i,n,void 0)}updateValues(e){const t={data:this._configuration.toData()};let i=[];for(const n of e){const[e,t]=n;this.getValue(e)!==t&&(this._configuration.updateValue(e,t),i.push(e))}if(i.length>0){const e=new gg({keys:i,overrides:[]},t,this._configuration);e.source=7,e.sourceConfig=null,this._onDidChangeConfiguration.fire(e)}return Promise.resolve()}}class rf{constructor(e){this.configurationService=e,this._onDidChangeConfiguration=new Ve,this.configurationService.onDidChangeConfiguration(e=>{this._onDidChangeConfiguration.fire({affectedKeys:e.affectedKeys,affectsConfiguration:(t,i)=>e.affectsConfiguration(i)})})}getValue(e,t,i){const n=Qt.isIPosition(t)?t:null,o=n?"string"===typeof i?i:void 0:"string"===typeof t?t:void 0;return"undefined"===typeof o?this.configurationService.getValue():this.configurationService.getValue(o)}}let sf=class{constructor(e){this.configurationService=e}getEOL(e,t){const i=this.configurationService.getValue("files.eol",{overrideIdentifier:t,resource:e});return i&&"auto"!==i?i:r["d"]||r["f"]?"\n":"\r\n"}};sf=Kg([qg(0,ig)],sf);class af{publicLog(e,t){return Promise.resolve(void 0)}publicLog2(e,t){return this.publicLog(e,t)}}class lf{constructor(){const e=Ht.from({scheme:lf.SCHEME,authority:"model",path:"/"});this.workspace={id:"4064f6ec-cb38-4ad0-af64-ee6467e63c82",folders:[new jg({uri:e,name:"",index:0})]}}getWorkspace(){return this.workspace}getWorkspaceFolder(e){return e&&e.scheme===lf.SCHEME?this.workspace.folders[0]:null}}function cf(e,t,i){if(!t)return;if(!(e instanceof of))return;let n=[];Object.keys(t).forEach(e=>{Ju(e)&&n.push(["editor."+e,t[e]]),i&&eg(e)&&n.push(["diffEditor."+e,t[e]])}),n.length>0&&e.updateValues(n)}lf.SCHEME="inmemory";class hf{constructor(e){this._modelService=e}hasPreviewHandler(){return!1}apply(e,t){return $g(this,void 0,void 0,(function*(){const t=new Map;for(let o of e){if(!(o instanceof uu))throw new Error("bad edit - only text edits are supported");const e=this._modelService.getModel(o.resource);if(!e)throw new Error("bad edit - model not found");if("number"===typeof o.versionId&&e.getVersionId()!==o.versionId)throw new Error("bad state - model changed in the meantime");let i=t.get(e);i||(i=[],t.set(e,i)),i.push(tg.replaceMove(Jt.lift(o.textEdit.range),o.textEdit.text))}let i=0,n=0;for(const[e,o]of t)e.pushStackElement(),e.pushEditOperations([],o,()=>[]),e.pushStackElement(),n+=1,i+=o.length;return{ariaSummary:yr["v"](Ug.bulkEditServiceSummary,i,n)}}))}}class df{getUriLabel(e,t){return"file"===e.scheme?e.fsPath:e.path}}class uf{constructor(e,t){this._codeEditorService=e,this._container=t,this.onLayout=Fe.None}get dimension(){return this._dimension||(this._dimension=Eo(window.document.body)),this._dimension}get container(){return this._container}focus(){var e;null===(e=this._codeEditorService.getFocusedCodeEditor())||void 0===e||e.focus()}}i("0678");const gf=2e4;let ff,mf,pf,_f,bf;function vf(e){ff=document.createElement("div"),ff.className="monaco-aria-container";const t=()=>{const e=document.createElement("div");return e.className="monaco-alert",e.setAttribute("role","alert"),e.setAttribute("aria-atomic","true"),ff.appendChild(e),e};mf=t(),pf=t();const i=()=>{const e=document.createElement("div");return e.className="monaco-status",e.setAttribute("role","complementary"),e.setAttribute("aria-live","polite"),e.setAttribute("aria-atomic","true"),ff.appendChild(e),e};_f=i(),bf=i(),e.appendChild(ff)}function wf(e){ff&&(mf.textContent!==e?(Jn(pf),Cf(mf,e)):(Jn(mf),Cf(pf,e)))}function Cf(e,t){Jn(e),t.length>gf&&(t=t.substr(0,gf)),e.textContent=t,e.style.visibility="hidden",e.style.visibility="visible"}i("0556");class yf{constructor(e,t){this.chr=e,this.type=t,this.width=0}fulfill(e){this.width=e}}class Sf{constructor(e,t){this._bareFontInfo=e,this._requests=t,this._container=null,this._testElements=null}read(){this._createDomElements(),document.body.appendChild(this._container),this._readFromDomElements(),document.body.removeChild(this._container),this._container=null,this._testElements=null}_createDomElements(){const e=document.createElement("div");e.style.position="absolute",e.style.top="-50000px",e.style.width="50000px";const t=document.createElement("div");t.style.fontFamily=this._bareFontInfo.getMassagedFontFamily(),t.style.fontWeight=this._bareFontInfo.fontWeight,t.style.fontSize=this._bareFontInfo.fontSize+"px",t.style.fontFeatureSettings=this._bareFontInfo.fontFeatureSettings,t.style.lineHeight=this._bareFontInfo.lineHeight+"px",t.style.letterSpacing=this._bareFontInfo.letterSpacing+"px",e.appendChild(t);const i=document.createElement("div");i.style.fontFamily=this._bareFontInfo.getMassagedFontFamily(),i.style.fontWeight="bold",i.style.fontSize=this._bareFontInfo.fontSize+"px",i.style.fontFeatureSettings=this._bareFontInfo.fontFeatureSettings,i.style.lineHeight=this._bareFontInfo.lineHeight+"px",i.style.letterSpacing=this._bareFontInfo.letterSpacing+"px",e.appendChild(i);const n=document.createElement("div");n.style.fontFamily=this._bareFontInfo.getMassagedFontFamily(),n.style.fontWeight=this._bareFontInfo.fontWeight,n.style.fontSize=this._bareFontInfo.fontSize+"px",n.style.fontFeatureSettings=this._bareFontInfo.fontFeatureSettings,n.style.lineHeight=this._bareFontInfo.lineHeight+"px",n.style.letterSpacing=this._bareFontInfo.letterSpacing+"px",n.style.fontStyle="italic",e.appendChild(n);const o=[];for(const r of this._requests){let e;0===r.type&&(e=t),2===r.type&&(e=i),1===r.type&&(e=n),e.appendChild(document.createElement("br"));const s=document.createElement("span");Sf._render(s,r),e.appendChild(s),o.push(s)}this._container=e,this._testElements=o}static _render(e,t){if(" "===t.chr){let t=" ";for(let e=0;e<8;e++)t+=t;e.innerText=t}else{let i=t.chr;for(let e=0;e<8;e++)i+=i;e.textContent=i}}_readFromDomElements(){for(let e=0,t=this._requests.length;e<t;e++){const t=this._requests[e],i=this._testElements[e];t.fulfill(i.offsetWidth/256)}}}function xf(e,t){const i=new Sf(e,t);i.read()}class Lf extends Oe{constructor(e,t,i){super(),this.referenceDomElement=e,this.changeCallback=i,this.width=-1,this.height=-1,this.resizeObserver=null,this.measureReferenceDomElementToken=-1,this.measureReferenceDomElement(!1,t)}dispose(){this.stopObserving(),super.dispose()}getWidth(){return this.width}getHeight(){return this.height}startObserving(){"undefined"!==typeof ResizeObserver?!this.resizeObserver&&this.referenceDomElement&&(this.resizeObserver=new ResizeObserver(e=>{e&&e[0]&&e[0].contentRect?this.observe({width:e[0].contentRect.width,height:e[0].contentRect.height}):this.observe()}),this.resizeObserver.observe(this.referenceDomElement)):-1===this.measureReferenceDomElementToken&&(this.measureReferenceDomElementToken=setInterval(()=>this.observe(),100))}stopObserving(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null),-1!==this.measureReferenceDomElementToken&&(clearInterval(this.measureReferenceDomElementToken),this.measureReferenceDomElementToken=-1)}observe(e){this.measureReferenceDomElement(!0,e)}measureReferenceDomElement(e,t){let i=0,n=0;t?(i=t.width,n=t.height):this.referenceDomElement&&(i=this.referenceDomElement.clientWidth,n=this.referenceDomElement.clientHeight),i=Math.max(5,i),n=Math.max(5,n),this.width===i&&this.height===n||(this.width=i,this.height=n,e&&this.changeCallback())}}class kf{constructor(){this._keys=Object.create(null),this._values=Object.create(null)}has(e){const t=e.getId();return!!this._values[t]}get(e){const t=e.getId();return this._values[t]}put(e,t){const i=e.getId();this._keys[i]=e,this._values[i]=t}remove(e){const t=e.getId();delete this._keys[t],delete this._values[t]}getValues(){return Object.keys(this._keys).map(e=>this._values[e])}}function Ef(){Df.INSTANCE.clearCache()}class Df extends Oe{constructor(){super(),this._onDidChange=this._register(new Ve),this.onDidChange=this._onDidChange.event,this._cache=new kf,this._evictUntrustedReadingsTimeout=-1}dispose(){-1!==this._evictUntrustedReadingsTimeout&&(clearTimeout(this._evictUntrustedReadingsTimeout),this._evictUntrustedReadingsTimeout=-1),super.dispose()}clearCache(){this._cache=new kf,this._onDidChange.fire()}_writeToCache(e,t){this._cache.put(e,t),t.isTrusted||-1!==this._evictUntrustedReadingsTimeout||(this._evictUntrustedReadingsTimeout=setTimeout(()=>{this._evictUntrustedReadingsTimeout=-1,this._evictUntrustedReadings()},5e3))}_evictUntrustedReadings(){const e=this._cache.getValues();let t=!1;for(let i=0,n=e.length;i<n;i++){const n=e[i];n.isTrusted||(t=!0,this._cache.remove(n))}t&&this._onDidChange.fire()}readConfiguration(e){if(!this._cache.has(e)){let t=Df._actualReadConfiguration(e);(t.typicalHalfwidthCharacterWidth<=2||t.typicalFullwidthCharacterWidth<=2||t.spaceWidth<=2||t.maxDigitWidth<=2)&&(t=new bs({zoomLevel:qi(),fontFamily:t.fontFamily,fontWeight:t.fontWeight,fontSize:t.fontSize,fontFeatureSettings:t.fontFeatureSettings,lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,isMonospace:t.isMonospace,typicalHalfwidthCharacterWidth:Math.max(t.typicalHalfwidthCharacterWidth,5),typicalFullwidthCharacterWidth:Math.max(t.typicalFullwidthCharacterWidth,5),canUseHalfwidthRightwardsArrow:t.canUseHalfwidthRightwardsArrow,spaceWidth:Math.max(t.spaceWidth,5),middotWidth:Math.max(t.middotWidth,5),wsmiddotWidth:Math.max(t.wsmiddotWidth,5),maxDigitWidth:Math.max(t.maxDigitWidth,5)},!1)),this._writeToCache(e,t)}return this._cache.get(e)}static createRequest(e,t,i,n){const o=new yf(e,t);return i.push(o),n&&n.push(o),o}static _actualReadConfiguration(e){const t=[],i=[],n=this.createRequest("n",0,t,i),o=this.createRequest("m",0,t,null),r=this.createRequest(" ",0,t,i),s=this.createRequest("0",0,t,i),a=this.createRequest("1",0,t,i),l=this.createRequest("2",0,t,i),c=this.createRequest("3",0,t,i),h=this.createRequest("4",0,t,i),d=this.createRequest("5",0,t,i),u=this.createRequest("6",0,t,i),g=this.createRequest("7",0,t,i),f=this.createRequest("8",0,t,i),m=this.createRequest("9",0,t,i),p=this.createRequest("→",0,t,i),_=this.createRequest("→",0,t,null),b=this.createRequest("·",0,t,i),v=this.createRequest(String.fromCharCode(11825),0,t,null);this.createRequest("|",0,t,i),this.createRequest("/",0,t,i),this.createRequest("-",0,t,i),this.createRequest("_",0,t,i),this.createRequest("i",0,t,i),this.createRequest("l",0,t,i),this.createRequest("m",0,t,i),this.createRequest("|",1,t,i),this.createRequest("_",1,t,i),this.createRequest("i",1,t,i),this.createRequest("l",1,t,i),this.createRequest("m",1,t,i),this.createRequest("n",1,t,i),this.createRequest("|",2,t,i),this.createRequest("_",2,t,i),this.createRequest("i",2,t,i),this.createRequest("l",2,t,i),this.createRequest("m",2,t,i),this.createRequest("n",2,t,i),xf(e,t);const w=Math.max(s.width,a.width,l.width,c.width,h.width,d.width,u.width,g.width,f.width,m.width);let C=e.fontFeatureSettings===R.OFF;const y=i[0].width;for(let L=1,k=i.length;C&&L<k;L++){const e=y-i[L].width;if(e<-.001||e>.001){C=!1;break}}let S=!0;C&&_.width!==y&&(S=!1),_.width>p.width&&(S=!1);const x=$i()>2e3;return new bs({zoomLevel:qi(),fontFamily:e.fontFamily,fontWeight:e.fontWeight,fontSize:e.fontSize,fontFeatureSettings:e.fontFeatureSettings,lineHeight:e.lineHeight,letterSpacing:e.letterSpacing,isMonospace:C,typicalHalfwidthCharacterWidth:n.width,typicalFullwidthCharacterWidth:o.width,canUseHalfwidthRightwardsArrow:S,spaceWidth:r.width,middotWidth:b.width,wsmiddotWidth:v.width,maxDigitWidth:w},x)}}Df.INSTANCE=new Df;class Nf extends qu{constructor(e,t,i=null,n){super(e,t),this.accessibilityService=n,this._elementSizeObserver=this._register(new Lf(i,t.dimension,()=>this._onReferenceDomElementSizeChanged())),this._register(Df.INSTANCE.onDidChange(()=>this._onCSSBasedConfigurationChanged())),this._validatedOptions.get(9)&&this._elementSizeObserver.startObserving(),this._register(Gi(e=>this._recomputeOptions())),this._register(this.accessibilityService.onDidChangeScreenReaderOptimized(()=>this._recomputeOptions())),this._recomputeOptions()}static applyFontInfoSlow(e,t){e.style.fontFamily=t.getMassagedFontFamily(),e.style.fontWeight=t.fontWeight,e.style.fontSize=t.fontSize+"px",e.style.fontFeatureSettings=t.fontFeatureSettings,e.style.lineHeight=t.lineHeight+"px",e.style.letterSpacing=t.letterSpacing+"px"}static applyFontInfo(e,t){e.setFontFamily(t.getMassagedFontFamily()),e.setFontWeight(t.fontWeight),e.setFontSize(t.fontSize),e.setFontFeatureSettings(t.fontFeatureSettings),e.setLineHeight(t.lineHeight),e.setLetterSpacing(t.letterSpacing)}_onReferenceDomElementSizeChanged(){this._recomputeOptions()}_onCSSBasedConfigurationChanged(){this._recomputeOptions()}observeReferenceElement(e){this._elementSizeObserver.observe(e)}dispose(){super.dispose()}_getExtraEditorClassName(){let e="";return nn||on||(e+="no-user-select "),r["f"]&&(e+="mac "),e}_getEnvConfiguration(){return{extraEditorClassName:this._getExtraEditorClassName(),outerWidth:this._elementSizeObserver.getWidth(),outerHeight:this._elementSizeObserver.getHeight(),emptySelectionClipboard:en||Ji,pixelRatio:Xi(),zoomLevel:qi(),accessibilitySupport:this.accessibilityService.isScreenReaderOptimized()?2:this.accessibilityService.getAccessibilitySupport()}}readConfiguration(e){return Df.INSTANCE.readConfiguration(e)}}var Tf=function(e,t,i,n){function o(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,r){function s(e){try{l(n.next(e))}catch(t){r(t)}}function a(e){try{l(n["throw"](e))}catch(t){r(t)}}function l(e){e.done?i(e.value):o(e.value).then(s,a)}l((n=n.apply(e,t||[])).next())}))};class Mf extends Oe{constructor(e,t="",i="",n=!0,o){super(),this._onDidChange=this._register(new Ve),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._checked=!1,this._id=e,this._label=t,this._cssClass=i,this._enabled=n,this._actionCallback=o}get id(){return this._id}get label(){return this._label}set label(e){this._setLabel(e)}_setLabel(e){this._label!==e&&(this._label=e,this._onDidChange.fire({label:e}))}get tooltip(){return this._tooltip||""}set tooltip(e){this._setTooltip(e)}_setTooltip(e){this._tooltip!==e&&(this._tooltip=e,this._onDidChange.fire({tooltip:e}))}get class(){return this._cssClass}set class(e){this._setClass(e)}_setClass(e){this._cssClass!==e&&(this._cssClass=e,this._onDidChange.fire({class:e}))}get enabled(){return this._enabled}set enabled(e){this._setEnabled(e)}_setEnabled(e){this._enabled!==e&&(this._enabled=e,this._onDidChange.fire({enabled:e}))}get checked(){return this._checked}set checked(e){this._setChecked(e)}_setChecked(e){this._checked!==e&&(this._checked=e,this._onDidChange.fire({checked:e}))}run(e,t){return this._actionCallback?this._actionCallback(e):Promise.resolve(!0)}}class If extends Oe{constructor(){super(...arguments),this._onDidBeforeRun=this._register(new Ve),this.onDidBeforeRun=this._onDidBeforeRun.event,this._onDidRun=this._register(new Ve),this.onDidRun=this._onDidRun.event}run(e,t){return Tf(this,void 0,void 0,(function*(){if(!e.enabled)return Promise.resolve(null);this._onDidBeforeRun.fire({action:e});try{const i=yield this.runAction(e,t);this._onDidRun.fire({action:e,result:i})}catch(i){this._onDidRun.fire({action:e,error:i})}}))}runAction(e,t){const i=t?e.run(t):e.run();return Promise.resolve(i)}}class Of extends Mf{constructor(e){super(Of.ID,e,e?"separator text":"separator"),this.checked=!1,this.enabled=!1}}Of.ID="vs.actions.separator";class Af extends Mf{constructor(e,t,i,n){super(e,t,n,!0),this._actions=i}get actions(){return Array.isArray(this._actions)?this._actions:this._actions()}}const Rf=new Map;Rf.set("false",!1),Rf.set("true",!0),Rf.set("isMac",r["f"]),Rf.set("isLinux",r["d"]),Rf.set("isWindows",r["i"]),Rf.set("isWeb",r["h"]),Rf.set("isMacNative",r["f"]&&!r["h"]);const Pf=Object.prototype.hasOwnProperty;class Ff{static has(e){return Hf.create(e)}static equals(e,t){return zf.create(e,t)}static regex(e,t){return $f.create(e,t)}static not(e){return qf.create(e)}static and(...e){return Yf.create(e)}static or(...e){return Xf.create(e)}static deserialize(e,t=!1){if(e)return this._deserializeOrExpression(e,t)}static _deserializeOrExpression(e,t){let i=e.split("||");return Xf.create(i.map(e=>this._deserializeAndExpression(e,t)))}static _deserializeAndExpression(e,t){let i=e.split("&&");return Yf.create(i.map(e=>this._deserializeOne(e,t)))}static _deserializeOne(e,t){if(e=e.trim(),e.indexOf("!=")>=0){let i=e.split("!=");return Kf.create(i[0].trim(),this._deserializeValue(i[1],t))}if(e.indexOf("==")>=0){let i=e.split("==");return zf.create(i[0].trim(),this._deserializeValue(i[1],t))}if(e.indexOf("=~")>=0){let i=e.split("=~");return $f.create(i[0].trim(),this._deserializeRegexValue(i[1],t))}if(e.indexOf(" in ")>=0){let t=e.split(" in ");return Uf.create(t[0].trim(),t[1].trim())}return/^\!\s*/.test(e)?qf.create(e.substr(1).trim()):Hf.create(e)}static _deserializeValue(e,t){if(e=e.trim(),"true"===e)return!0;if("false"===e)return!1;let i=/^'([^']*)'$/.exec(e);return i?i[1].trim():e}static _deserializeRegexValue(e,t){if(Object(yr["B"])(e)){if(t)throw new Error("missing regexp-value for =~-expression");return console.warn("missing regexp-value for =~-expression"),null}let i=e.indexOf("/"),n=e.lastIndexOf("/");if(i===n||i<0){if(t)throw new Error(`bad regexp-value '${e}', missing /-enclosure`);return console.warn(`bad regexp-value '${e}', missing /-enclosure`),null}let o=e.slice(i+1,n),r="i"===e[n+1]?"i":"";try{return new RegExp(o,r)}catch(s){if(t)throw new Error(`bad regexp-value '${e}', parse error: ${s}`);return console.warn(`bad regexp-value '${e}', parse error: ${s}`),null}}}function Wf(e,t){return e.cmp(t)}class Bf{constructor(){this.type=0}cmp(e){return this.type-e.type}equals(e){return e.type===this.type}evaluate(e){return!1}serialize(){return"false"}keys(){return[]}negate(){return Vf.INSTANCE}}Bf.INSTANCE=new Bf;class Vf{constructor(){this.type=1}cmp(e){return this.type-e.type}equals(e){return e.type===this.type}evaluate(e){return!0}serialize(){return"true"}keys(){return[]}negate(){return Bf.INSTANCE}}Vf.INSTANCE=new Vf;class Hf{constructor(e){this.key=e,this.type=2}static create(e){const t=Rf.get(e);return"boolean"===typeof t?t?Vf.INSTANCE:Bf.INSTANCE:new Hf(e)}cmp(e){return e.type!==this.type?this.type-e.type:this.key<e.key?-1:this.key>e.key?1:0}equals(e){return e.type===this.type&&this.key===e.key}evaluate(e){return!!e.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return qf.create(this.key)}}class zf{constructor(e,t){this.key=e,this.value=t,this.type=4}static create(e,t){if("boolean"===typeof t)return t?Hf.create(e):qf.create(e);const i=Rf.get(e);if("boolean"===typeof i){const e=i?"true":"false";return t===e?Vf.INSTANCE:Bf.INSTANCE}return new zf(e,t)}cmp(e){return e.type!==this.type?this.type-e.type:this.key<e.key?-1:this.key>e.key?1:this.value<e.value?-1:this.value>e.value?1:0}equals(e){return e.type===this.type&&(this.key===e.key&&this.value===e.value)}evaluate(e){return e.getValue(this.key)==this.value}serialize(){return this.key+" == '"+this.value+"'"}keys(){return[this.key]}negate(){return Kf.create(this.key,this.value)}}class Uf{constructor(e,t){this.key=e,this.valueKey=t,this.type=10}static create(e,t){return new Uf(e,t)}cmp(e){return e.type!==this.type?this.type-e.type:this.key<e.key?-1:this.key>e.key?1:this.valueKey<e.valueKey?-1:this.valueKey>e.valueKey?1:0}equals(e){return e.type===this.type&&(this.key===e.key&&this.valueKey===e.valueKey)}evaluate(e){const t=e.getValue(this.valueKey),i=e.getValue(this.key);return Array.isArray(t)?t.indexOf(i)>=0:"string"===typeof i&&"object"===typeof t&&null!==t&&Pf.call(t,i)}serialize(){return this.key+" in '"+this.valueKey+"'"}keys(){return[this.key,this.valueKey]}negate(){return jf.create(this)}}class jf{constructor(e){this._actual=e,this.type=11}static create(e){return new jf(e)}cmp(e){return e.type!==this.type?this.type-e.type:this._actual.cmp(e._actual)}equals(e){return e.type===this.type&&this._actual.equals(e._actual)}evaluate(e){return!this._actual.evaluate(e)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}class Kf{constructor(e,t){this.key=e,this.value=t,this.type=5}static create(e,t){if("boolean"===typeof t)return t?qf.create(e):Hf.create(e);const i=Rf.get(e);if("boolean"===typeof i){const e=i?"true":"false";return t===e?Bf.INSTANCE:Vf.INSTANCE}return new Kf(e,t)}cmp(e){return e.type!==this.type?this.type-e.type:this.key<e.key?-1:this.key>e.key?1:this.value<e.value?-1:this.value>e.value?1:0}equals(e){return e.type===this.type&&(this.key===e.key&&this.value===e.value)}evaluate(e){return e.getValue(this.key)!=this.value}serialize(){return this.key+" != '"+this.value+"'"}keys(){return[this.key]}negate(){return zf.create(this.key,this.value)}}class qf{constructor(e){this.key=e,this.type=3}static create(e){const t=Rf.get(e);return"boolean"===typeof t?t?Bf.INSTANCE:Vf.INSTANCE:new qf(e)}cmp(e){return e.type!==this.type?this.type-e.type:this.key<e.key?-1:this.key>e.key?1:0}equals(e){return e.type===this.type&&this.key===e.key}evaluate(e){return!e.getValue(this.key)}serialize(){return"!"+this.key}keys(){return[this.key]}negate(){return Hf.create(this.key)}}class $f{constructor(e,t){this.key=e,this.regexp=t,this.type=7}static create(e,t){return new $f(e,t)}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.key<e.key)return-1;if(this.key>e.key)return 1;const t=this.regexp?this.regexp.source:"",i=e.regexp?e.regexp.source:"";return t<i?-1:t>i?1:0}equals(e){if(e.type===this.type){const t=this.regexp?this.regexp.source:"",i=e.regexp?e.regexp.source:"";return this.key===e.key&&t===i}return!1}evaluate(e){let t=e.getValue(this.key);return!!this.regexp&&this.regexp.test(t)}serialize(){const e=this.regexp?`/${this.regexp.source}/${this.regexp.ignoreCase?"i":""}`:"/invalid/";return`${this.key} =~ ${e}`}keys(){return[this.key]}negate(){return Gf.create(this)}}class Gf{constructor(e){this._actual=e,this.type=8}static create(e){return new Gf(e)}cmp(e){return e.type!==this.type?this.type-e.type:this._actual.cmp(e._actual)}equals(e){return e.type===this.type&&this._actual.equals(e._actual)}evaluate(e){return!this._actual.evaluate(e)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}class Yf{constructor(e){this.expr=e,this.type=6}static create(e){return Yf._normalizeArr(e)}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.expr.length<e.expr.length)return-1;if(this.expr.length>e.expr.length)return 1;for(let t=0,i=this.expr.length;t<i;t++){const i=Wf(this.expr[t],e.expr[t]);if(0!==i)return i}return 0}equals(e){if(e.type===this.type){if(this.expr.length!==e.expr.length)return!1;for(let t=0,i=this.expr.length;t<i;t++)if(!this.expr[t].equals(e.expr[t]))return!1;return!0}return!1}evaluate(e){for(let t=0,i=this.expr.length;t<i;t++)if(!this.expr[t].evaluate(e))return!1;return!0}static _normalizeArr(e){const t=[];let i=!1;for(const n of e)if(n)if(1!==n.type){if(0===n.type)return Bf.INSTANCE;6!==n.type?t.push(n):t.push(...n.expr)}else i=!0;if(0===t.length&&i)return Vf.INSTANCE;if(0!==t.length){if(1===t.length)return t[0];t.sort(Wf);while(t.length>1){const e=t[t.length-1];if(9!==e.type)break;t.pop();const i=t.pop(),n=Xf.create(e.expr.map(e=>Yf.create([e,i])));n&&(t.push(n),t.sort(Wf))}return new Yf(t)}}serialize(){return this.expr.map(e=>e.serialize()).join(" && ")}keys(){const e=[];for(let t of this.expr)e.push(...t.keys());return e}negate(){let e=[];for(let t of this.expr)e.push(t.negate());return Xf.create(e)}}class Xf{constructor(e){this.expr=e,this.type=9}static create(e){const t=Xf._normalizeArr(e);if(0!==t.length)return 1===t.length?t[0]:new Xf(t)}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.expr.length<e.expr.length)return-1;if(this.expr.length>e.expr.length)return 1;for(let t=0,i=this.expr.length;t<i;t++){const i=Wf(this.expr[t],e.expr[t]);if(0!==i)return i}return 0}equals(e){if(e.type===this.type){if(this.expr.length!==e.expr.length)return!1;for(let t=0,i=this.expr.length;t<i;t++)if(!this.expr[t].equals(e.expr[t]))return!1;return!0}return!1}evaluate(e){for(let t=0,i=this.expr.length;t<i;t++)if(this.expr[t].evaluate(e))return!0;return!1}static _normalizeArr(e){let t=[],i=!1;if(e){for(let n=0,o=e.length;n<o;n++){const o=e[n];if(o)if(0!==o.type){if(1===o.type)return[Vf.INSTANCE];9!==o.type?t.push(o):t=t.concat(o.expr)}else i=!0}if(0===t.length&&i)return[Bf.INSTANCE];t.sort(Wf)}return t}serialize(){return this.expr.map(e=>e.serialize()).join(" || ")}keys(){const e=[];for(let t of this.expr)e.push(...t.keys());return e}negate(){let e=[];for(let i of this.expr)e.push(i.negate());const t=e=>9===e.type?e.expr:[e];while(e.length>1){const i=e.shift(),n=e.shift(),o=[];for(const e of t(i))for(const i of t(n))o.push(Ff.and(e,i));e.unshift(Ff.or(...o))}return e[0]}}class Zf extends Hf{constructor(e,t){super(e),this._defaultValue=t}bindTo(e){return e.createKey(this.key,this._defaultValue)}getValue(e){return e.getContextKeyValue(this.key)}toNegated(){return Ff.not(this.key)}}const Qf=zi("contextKeyService"),Jf="setContext";var em=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},tm=function(e,t){return function(i,n){t(i,n,e)}};function im(e){return void 0!==e.command}class nm{constructor(e){this.id=nm._idPool++,this._debugName=e}}nm._idPool=0,nm.CommandPalette=new nm("CommandPalette"),nm.EditorContext=new nm("EditorContext"),nm.EditorContextPeek=new nm("EditorContextPeek"),nm.MenubarEditMenu=new nm("MenubarEditMenu"),nm.MenubarGoMenu=new nm("MenubarGoMenu"),nm.MenubarSelectionMenu=new nm("MenubarSelectionMenu");const om=zi("menuService"),rm=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new Ve,this.onDidChangeMenu=this._onDidChangeMenu.event,this._commandPaletteChangeEvent={has:e=>e===nm.CommandPalette}}addCommand(e){return this.addCommands(ye.single(e))}addCommands(e){for(const t of e)this._commands.set(t.id,t);return this._onDidChangeMenu.fire(this._commandPaletteChangeEvent),Me(()=>{let t=!1;for(const i of e)t=this._commands.delete(i.id)||t;t&&this._onDidChangeMenu.fire(this._commandPaletteChangeEvent)})}getCommand(e){return this._commands.get(e)}getCommands(){const e=new Map;return this._commands.forEach((t,i)=>e.set(i,t)),e}appendMenuItem(e,t){return this.appendMenuItems(ye.single({id:e,item:t}))}appendMenuItems(e){const t=new Set,i=new Pe;for(const{id:n,item:o}of e){let e=this._menuItems.get(n);e||(e=new Pe,this._menuItems.set(n,e)),i.push(e.push(o)),t.add(n)}return this._onDidChangeMenu.fire(t),Me(()=>{if(i.size>0){for(let e of i)e();this._onDidChangeMenu.fire(t),i.clear()}})}getMenuItems(e){let t;return t=this._menuItems.has(e)?[...this._menuItems.get(e)]:[],e===nm.CommandPalette&&this._appendImplicitItems(t),t}_appendImplicitItems(e){const t=new Set;for(const i of e)im(i)&&(t.add(i.command.id),i.alt&&t.add(i.alt.id));this._commands.forEach((i,n)=>{t.has(n)||e.push({command:i})})}};let sm=class extends Mf{constructor(e,t,i){super(e,t),this._commandService=i}run(...e){return this._commandService.executeCommand(this.id,...e)}};sm=em([tm(2,qr)],sm);class am extends Af{constructor(e,t,i,n){super("submenuitem."+e.submenu.id,"string"===typeof e.title?e.title:e.title.value,()=>{const o=[],r=t.createMenu(e.submenu,i),s=r.getActions(n);r.dispose();for(let e of s){const[,t]=e;t.length>0&&(o.push(...t),o.push(new Of))}return o.length&&o.pop(),o},"submenu"),this.item=e}}let lm=class e extends sm{constructor(t,i,n,o,r){if("string"===typeof t.title?super(t.id,t.title,r):super(t.id,t.title.value,r),this._cssClass=void 0,this._enabled=!t.precondition||o.contextMatchesRules(t.precondition),this._tooltip=t.tooltip?"string"===typeof t.tooltip?t.tooltip:t.tooltip.value:void 0,t.toggled){const e=t.toggled.condition?t.toggled:{condition:t.toggled};this._checked=o.contextMatchesRules(e.condition),this._checked&&e.tooltip&&(this._tooltip="string"===typeof e.tooltip?e.tooltip:e.tooltip.value)}this._options=n||{},this.item=t,this.alt=i?new e(i,void 0,this._options,o,r):void 0}dispose(){this.alt&&this.alt.dispose(),super.dispose()}run(...e){let t=[];return this._options.arg&&(t=[...t,this._options.arg]),this._options.shouldForwardArgs&&(t=[...t,...e]),super.run(...t)}};lm=em([tm(3,Qf),tm(4,qr)],lm);const cm=zi("telemetryService");class hm{constructor(e){this.id=e.id,this.precondition=e.precondition,this._kbOpts=e.kbOpts,this._menuOpts=e.menuOpts,this._description=e.description}register(){if(Array.isArray(this._menuOpts)?this._menuOpts.forEach(this._registerMenuItem,this):this._menuOpts&&this._registerMenuItem(this._menuOpts),this._kbOpts){let e=this._kbOpts.kbExpr;this.precondition&&(e=e?Ff.and(e,this.precondition):this.precondition),vg.registerCommandAndKeybindingRule({id:this.id,handler:(e,t)=>this.runCommand(e,t),weight:this._kbOpts.weight,args:this._kbOpts.args,when:e,primary:this._kbOpts.primary,secondary:this._kbOpts.secondary,win:this._kbOpts.win,linux:this._kbOpts.linux,mac:this._kbOpts.mac,description:this._description})}else $r.registerCommand({id:this.id,handler:(e,t)=>this.runCommand(e,t),description:this._description})}_registerMenuItem(e){rm.appendMenuItem(e.menuId,{group:e.group,command:{id:this.id,title:e.title,icon:e.icon},when:e.when,order:e.order})}}class dm extends hm{constructor(){super(...arguments),this._implementations=[]}addImplementation(e,t){return this._implementations.push([e,t]),this._implementations.sort((e,t)=>t[0]-e[0]),{dispose:()=>{for(let e=0;e<this._implementations.length;e++)if(this._implementations[e][1]===t)return void this._implementations.splice(e,1)}}}runCommand(e,t){for(const i of this._implementations)if(i[1](e,t))return}}class um extends hm{constructor(e,t){super(t),this.command=e}runCommand(e,t){return this.command.runCommand(e,t)}}class gm extends hm{static bindToContribution(e){return class extends gm{constructor(e){super(e),this._callback=e.handler}runEditorCommand(t,i,n){const o=e(i);o&&this._callback(e(i),n)}}}runCommand(e,t){const i=e.get(ji),n=i.getFocusedCodeEditor()||i.getActiveCodeEditor();if(n)return n.invokeWithinContext(e=>{const i=e.get(Qf);if(i.contextMatchesRules(Kr(this.precondition)))return this.runEditorCommand(e,n,t)})}}class fm extends gm{constructor(e){super(fm.convertOptions(e)),this.label=e.label,this.alias=e.alias}static convertOptions(e){let t;function i(t){return t.menuId||(t.menuId=nm.EditorContext),t.title||(t.title=e.label),t.when=Ff.and(e.precondition,t.when),t}return t=Array.isArray(e.menuOpts)?e.menuOpts:e.menuOpts?[e.menuOpts]:[],Array.isArray(e.contextMenuOpts)?t.push(...e.contextMenuOpts.map(i)):e.contextMenuOpts&&t.push(i(e.contextMenuOpts)),e.menuOpts=t,e}runEditorCommand(e,t,i){return this.reportTelemetry(e,t),this.run(e,t,i||{})}reportTelemetry(e,t){e.get(cm).publicLog2("editorActionInvoked",{name:this.label,id:this.id})}}function mm(e){return wm.INSTANCE.registerEditorCommand(e),e}function pm(e){const t=new e;return wm.INSTANCE.registerEditorAction(t),t}function _m(e,t){wm.INSTANCE.registerEditorContribution(e,t)}var bm;(function(e){function t(e){return wm.INSTANCE.getEditorCommand(e)}function i(){return wm.INSTANCE.getEditorActions()}function n(){return wm.INSTANCE.getEditorContributions()}function o(e){return wm.INSTANCE.getEditorContributions().filter(t=>e.indexOf(t.id)>=0)}function r(){return wm.INSTANCE.getDiffEditorContributions()}e.getEditorCommand=t,e.getEditorActions=i,e.getEditorContributions=n,e.getSomeEditorContributions=o,e.getDiffEditorContributions=r})(bm||(bm={}));const vm={EditorCommonContributions:"editor.contributions"};class wm{constructor(){this.editorContributions=[],this.diffEditorContributions=[],this.editorActions=[],this.editorCommands=Object.create(null)}registerEditorContribution(e,t){this.editorContributions.push({id:e,ctor:t})}getEditorContributions(){return this.editorContributions.slice(0)}getDiffEditorContributions(){return this.diffEditorContributions.slice(0)}registerEditorAction(e){e.register(),this.editorActions.push(e)}getEditorActions(){return this.editorActions.slice(0)}registerEditorCommand(e){e.register(),this.editorCommands[e.id]=e}getEditorCommand(e){return this.editorCommands[e]||null}}function Cm(e){return e.register(),e}wm.INSTANCE=new wm,mu.add(vm.EditorCommonContributions,wm.INSTANCE);const ym=Cm(new dm({id:"undo",precondition:void 0,kbOpts:{weight:0,primary:2104},menuOpts:[{menuId:nm.MenubarEditMenu,group:"1_do",title:o({key:"miUndo",comment:["&& denotes a mnemonic"]},"&&Undo"),order:1},{menuId:nm.CommandPalette,group:"",title:o("undo","Undo"),order:1}]}));Cm(new um(ym,{id:"default:undo",precondition:void 0}));const Sm=Cm(new dm({id:"redo",precondition:void 0,kbOpts:{weight:0,primary:2103,secondary:[3128],mac:{primary:3128}},menuOpts:[{menuId:nm.MenubarEditMenu,group:"1_do",title:o({key:"miRedo",comment:["&& denotes a mnemonic"]},"&&Redo"),order:2},{menuId:nm.CommandPalette,group:"",title:o("redo","Redo"),order:1}]}));Cm(new um(Sm,{id:"default:redo",precondition:void 0}));const xm=Cm(new dm({id:"editor.action.selectAll",precondition:void 0,kbOpts:{weight:0,kbExpr:null,primary:2079},menuOpts:[{menuId:nm.MenubarSelectionMenu,group:"1_basic",title:o({key:"miSelectAll",comment:["&& denotes a mnemonic"]},"&&Select All"),order:1},{menuId:nm.CommandPalette,group:"",title:o("selectAll","Select All"),order:1}]}));class Lm{constructor(e){this.domNode=e,this._maxWidth=-1,this._width=-1,this._height=-1,this._top=-1,this._left=-1,this._bottom=-1,this._right=-1,this._fontFamily="",this._fontWeight="",this._fontSize=-1,this._fontFeatureSettings="",this._lineHeight=-1,this._letterSpacing=-100,this._className="",this._display="",this._position="",this._visibility="",this._backgroundColor="",this._layerHint=!1,this._contain="none",this._boxShadow=""}setMaxWidth(e){this._maxWidth!==e&&(this._maxWidth=e,this.domNode.style.maxWidth=this._maxWidth+"px")}setWidth(e){this._width!==e&&(this._width=e,this.domNode.style.width=this._width+"px")}setHeight(e){this._height!==e&&(this._height=e,this.domNode.style.height=this._height+"px")}setTop(e){this._top!==e&&(this._top=e,this.domNode.style.top=this._top+"px")}unsetTop(){-1!==this._top&&(this._top=-1,this.domNode.style.top="")}setLeft(e){this._left!==e&&(this._left=e,this.domNode.style.left=this._left+"px")}setBottom(e){this._bottom!==e&&(this._bottom=e,this.domNode.style.bottom=this._bottom+"px")}setRight(e){this._right!==e&&(this._right=e,this.domNode.style.right=this._right+"px")}setFontFamily(e){this._fontFamily!==e&&(this._fontFamily=e,this.domNode.style.fontFamily=this._fontFamily)}setFontWeight(e){this._fontWeight!==e&&(this._fontWeight=e,this.domNode.style.fontWeight=this._fontWeight)}setFontSize(e){this._fontSize!==e&&(this._fontSize=e,this.domNode.style.fontSize=this._fontSize+"px")}setFontFeatureSettings(e){this._fontFeatureSettings!==e&&(this._fontFeatureSettings=e,this.domNode.style.fontFeatureSettings=this._fontFeatureSettings)}setLineHeight(e){this._lineHeight!==e&&(this._lineHeight=e,this.domNode.style.lineHeight=this._lineHeight+"px")}setLetterSpacing(e){this._letterSpacing!==e&&(this._letterSpacing=e,this.domNode.style.letterSpacing=this._letterSpacing+"px")}setClassName(e){this._className!==e&&(this._className=e,this.domNode.className=this._className)}toggleClassName(e,t){lo(this.domNode,e,t),this._className=this.domNode.className}setDisplay(e){this._display!==e&&(this._display=e,this.domNode.style.display=this._display)}setPosition(e){this._position!==e&&(this._position=e,this.domNode.style.position=this._position)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this.domNode.style.visibility=this._visibility)}setBackgroundColor(e){this._backgroundColor!==e&&(this._backgroundColor=e,this.domNode.style.backgroundColor=this._backgroundColor)}setLayerHinting(e){this._layerHint!==e&&(this._layerHint=e,this.domNode.style.transform=this._layerHint?"translate3d(0px, 0px, 0px)":"")}setBoxShadow(e){this._boxShadow!==e&&(this._boxShadow=e,this.domNode.style.boxShadow=e)}setContain(e){this._contain!==e&&(this._contain=e,this.domNode.style.contain=this._contain)}setAttribute(e,t){this.domNode.setAttribute(e,t)}removeAttribute(e){this.domNode.removeAttribute(e)}appendChild(e){this.domNode.appendChild(e.domNode)}removeChild(e){this.domNode.removeChild(e.domNode)}}function km(e){return new Lm(e)}let Em=0;function Dm(){const e="$memoize"+Em++;let t=void 0;const i=function(i,n,o){let r=null,s=null;if("function"===typeof o.value?(r="value",s=o.value,0!==s.length&&console.warn("Memoize should only be used in functions with zero parameters")):"function"===typeof o.get&&(r="get",s=o.get),!s)throw new Error("not supported");const a=`${e}:${n}`;o[r]=function(...e){return t=this,this.hasOwnProperty(a)||Object.defineProperty(this,a,{configurable:!0,enumerable:!1,writable:!0,value:s.apply(this,e)}),this[a]}};return i.clear=()=>{"undefined"!==typeof t&&Object.getOwnPropertyNames(t).forEach(i=>{0===i.indexOf(e)&&delete t[i]})},i}function Nm(e,t,i){return Dm()(e,t,i)}var Tm,Mm=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};(function(e){e.Tap="-monaco-gesturetap",e.Change="-monaco-gesturechange",e.Start="-monaco-gesturestart",e.End="-monaco-gesturesend",e.Contextmenu="-monaco-gesturecontextmenu"})(Tm||(Tm={}));class Im extends Oe{constructor(){super(),this.dispatched=!1,this.activeTouches={},this.handle=null,this.targets=[],this.ignoreTargets=[],this._lastSetTapCountTime=0,this._register(ho(document,"touchstart",e=>this.onTouchStart(e),{passive:!1})),this._register(ho(document,"touchend",e=>this.onTouchEnd(e))),this._register(ho(document,"touchmove",e=>this.onTouchMove(e),{passive:!1}))}static addTarget(e){return Im.isTouchDevice()?(Im.INSTANCE||(Im.INSTANCE=new Im),Im.INSTANCE.targets.push(e),{dispose:()=>{Im.INSTANCE.targets=Im.INSTANCE.targets.filter(t=>t!==e)}}):Oe.None}static ignoreTarget(e){return Im.isTouchDevice()?(Im.INSTANCE||(Im.INSTANCE=new Im),Im.INSTANCE.ignoreTargets.push(e),{dispose:()=>{Im.INSTANCE.ignoreTargets=Im.INSTANCE.ignoreTargets.filter(t=>t!==e)}}):Oe.None}static isTouchDevice(){return"ontouchstart"in window||navigator.maxTouchPoints>0||window.navigator.msMaxTouchPoints>0}dispose(){this.handle&&(this.handle.dispose(),this.handle=null),super.dispose()}onTouchStart(e){let t=Date.now();this.handle&&(this.handle.dispose(),this.handle=null);for(let i=0,n=e.targetTouches.length;i<n;i++){let n=e.targetTouches.item(i);this.activeTouches[n.identifier]={id:n.identifier,initialTarget:n.target,initialTimeStamp:t,initialPageX:n.pageX,initialPageY:n.pageY,rollingTimestamps:[t],rollingPageX:[n.pageX],rollingPageY:[n.pageY]};let o=this.newGestureEvent(Tm.Start,n.target);o.pageX=n.pageX,o.pageY=n.pageY,this.dispatchEvent(o)}this.dispatched&&(e.preventDefault(),e.stopPropagation(),this.dispatched=!1)}onTouchEnd(e){let t=Date.now(),i=Object.keys(this.activeTouches).length;for(let n=0,o=e.changedTouches.length;n<o;n++){let o=e.changedTouches.item(n);if(!this.activeTouches.hasOwnProperty(String(o.identifier))){console.warn("move of an UNKNOWN touch",o);continue}let r=this.activeTouches[o.identifier],s=Date.now()-r.initialTimeStamp;if(s<Im.HOLD_DELAY&&Math.abs(r.initialPageX-In(r.rollingPageX))<30&&Math.abs(r.initialPageY-In(r.rollingPageY))<30){let e=this.newGestureEvent(Tm.Tap,r.initialTarget);e.pageX=In(r.rollingPageX),e.pageY=In(r.rollingPageY),this.dispatchEvent(e)}else if(s>=Im.HOLD_DELAY&&Math.abs(r.initialPageX-In(r.rollingPageX))<30&&Math.abs(r.initialPageY-In(r.rollingPageY))<30){let e=this.newGestureEvent(Tm.Contextmenu,r.initialTarget);e.pageX=In(r.rollingPageX),e.pageY=In(r.rollingPageY),this.dispatchEvent(e)}else if(1===i){let e=In(r.rollingPageX),i=In(r.rollingPageY),n=In(r.rollingTimestamps)-r.rollingTimestamps[0],o=e-r.rollingPageX[0],s=i-r.rollingPageY[0];const a=this.targets.filter(e=>r.initialTarget instanceof Node&&e.contains(r.initialTarget));this.inertia(a,t,Math.abs(o)/n,o>0?1:-1,e,Math.abs(s)/n,s>0?1:-1,i)}this.dispatchEvent(this.newGestureEvent(Tm.End,r.initialTarget)),delete this.activeTouches[o.identifier]}this.dispatched&&(e.preventDefault(),e.stopPropagation(),this.dispatched=!1)}newGestureEvent(e,t){let i=document.createEvent("CustomEvent");return i.initEvent(e,!1,!0),i.initialTarget=t,i.tapCount=0,i}dispatchEvent(e){if(e.type===Tm.Tap){const t=(new Date).getTime();let i=0;i=t-this._lastSetTapCountTime>Im.CLEAR_TAP_COUNT_TIME?1:2,this._lastSetTapCountTime=t,e.tapCount=i}else e.type!==Tm.Change&&e.type!==Tm.Contextmenu||(this._lastSetTapCountTime=0);for(let t=0;t<this.ignoreTargets.length;t++)if(e.initialTarget instanceof Node&&this.ignoreTargets[t].contains(e.initialTarget))return;this.targets.forEach(t=>{e.initialTarget instanceof Node&&t.contains(e.initialTarget)&&(t.dispatchEvent(e),this.dispatched=!0)})}inertia(e,t,i,n,o,r,s,a){this.handle=bo(()=>{let l=Date.now(),c=l-t,h=0,d=0,u=!0;i+=Im.SCROLL_FRICTION*c,r+=Im.SCROLL_FRICTION*c,i>0&&(u=!1,h=n*i*c),r>0&&(u=!1,d=s*r*c);let g=this.newGestureEvent(Tm.Change);g.translationX=h,g.translationY=d,e.forEach(e=>e.dispatchEvent(g)),u||this.inertia(e,l,i,n,o+h,r,s,a+d)})}onTouchMove(e){let t=Date.now();for(let i=0,n=e.changedTouches.length;i<n;i++){let n=e.changedTouches.item(i);if(!this.activeTouches.hasOwnProperty(String(n.identifier))){console.warn("end of an UNKNOWN touch",n);continue}let o=this.activeTouches[n.identifier],r=this.newGestureEvent(Tm.Change,o.initialTarget);r.translationX=n.pageX-In(o.rollingPageX),r.translationY=n.pageY-In(o.rollingPageY),r.pageX=n.pageX,r.pageY=n.pageY,this.dispatchEvent(r),o.rollingPageX.length>3&&(o.rollingPageX.shift(),o.rollingPageY.shift(),o.rollingTimestamps.shift()),o.rollingPageX.push(n.pageX),o.rollingPageY.push(n.pageY),o.rollingTimestamps.push(t)}this.dispatched&&(e.preventDefault(),e.stopPropagation(),this.dispatched=!1)}}function Om(e,t){let i=new Cn(t);return i.preventDefault(),{leftButton:i.leftButton,buttons:i.buttons,posx:i.posx,posy:i.posy}}Im.SCROLL_FRICTION=-.005,Im.HOLD_DELAY=700,Im.CLEAR_TAP_COUNT_TIME=400,Mm([Nm],Im,"isTouchDevice",null);class Am{constructor(){this._hooks=new Ie,this._mouseMoveEventMerger=null,this._mouseMoveCallback=null,this._onStopCallback=null}dispose(){this.stopMonitoring(!1),this._hooks.dispose()}stopMonitoring(e){if(!this.isMonitoring())return;this._hooks.clear(),this._mouseMoveEventMerger=null,this._mouseMoveCallback=null;const t=this._onStopCallback;this._onStopCallback=null,e&&t&&t()}isMonitoring(){return!!this._mouseMoveEventMerger}startMonitoring(e,t,i,n,o){if(this.isMonitoring())return;this._mouseMoveEventMerger=i,this._mouseMoveCallback=n,this._onStopCallback=o;const s=wn.getSameOriginWindowChain(),a=r["c"]&&Qn.pointerEvents?"pointermove":"mousemove",l=r["c"]&&Qn.pointerEvents?"pointerup":"mouseup",c=s.map(e=>e.window.document),h=zo(e);h&&c.unshift(h);for(const r of c)this._hooks.add(Lo(r,a,e=>{e.buttons===t?this._mouseMoveCallback(e):this.stopMonitoring(!0)},(e,t)=>this._mouseMoveEventMerger(e,t))),this._hooks.add(ho(r,l,e=>this.stopMonitoring(!0)));if(wn.hasDifferentOriginAncestor()){let e=s[s.length-1];this._hooks.add(ho(e.window.document,"mouseout",e=>{let t=new Cn(e);"html"===t.target.tagName.toLowerCase()&&this.stopMonitoring(!0)})),this._hooks.add(ho(e.window.document,"mouseover",e=>{let t=new Cn(e);"html"===t.target.tagName.toLowerCase()&&this.stopMonitoring(!0)})),this._hooks.add(ho(e.window.document.body,"mouseleave",e=>{this.stopMonitoring(!0)}))}}}class Rm{constructor(e,t){this.x=e,this.y=t}toClientCoordinates(){return new Pm(this.x-Io.scrollX,this.y-Io.scrollY)}}class Pm{constructor(e,t){this.clientX=e,this.clientY=t}toPageCoordinates(){return new Rm(this.clientX+Io.scrollX,this.clientY+Io.scrollY)}}class Fm{constructor(e,t,i,n){this.x=e,this.y=t,this.width=i,this.height=n}}function Wm(e){const t=Mo(e);return new Fm(t.left,t.top,t.width,t.height)}class Bm extends Cn{constructor(e,t){super(e),this.pos=new Rm(this.posx,this.posy),this.editorPos=Wm(t)}}class Vm{constructor(e){this._editorViewDomNode=e}_create(e){return new Bm(e,this._editorViewDomNode)}onContextMenu(e,t){return ho(e,"contextmenu",e=>{t(this._create(e))})}onMouseUp(e,t){return ho(e,"mouseup",e=>{t(this._create(e))})}onMouseDown(e,t){return ho(e,"mousedown",e=>{t(this._create(e))})}onMouseLeave(e,t){return mo(e,e=>{t(this._create(e))})}onMouseMoveThrottled(e,t,i,n){const o=(e,t)=>i(e,this._create(t));return Lo(e,"mousemove",t,o,n)}}class Hm{constructor(e){this._editorViewDomNode=e}_create(e){return new Bm(e,this._editorViewDomNode)}onPointerUp(e,t){return ho(e,"pointerup",e=>{t(this._create(e))})}onPointerDown(e,t){return ho(e,"pointerdown",e=>{t(this._create(e))})}onPointerLeave(e,t){return po(e,e=>{t(this._create(e))})}onPointerMoveThrottled(e,t,i,n){const o=(e,t)=>i(e,this._create(t));return Lo(e,"pointermove",t,o,n)}}class zm extends Oe{constructor(e){super(),this._editorViewDomNode=e,this._globalMouseMoveMonitor=this._register(new Am),this._keydownListener=null}startMonitoring(e,t,i,n,o){this._keydownListener=fo(document,"keydown",e=>{const t=e.toKeybinding();t.isModifierKey()||this._globalMouseMoveMonitor.stopMonitoring(!0)},!0);const r=(e,t)=>i(e,new Bm(t,this._editorViewDomNode));this._globalMouseMoveMonitor.startMonitoring(e,t,r,n,()=>{this._keydownListener.dispose(),o()})}}class Um extends Oe{constructor(){super(),this._shouldRender=!0}shouldRender(){return this._shouldRender}forceShouldRender(){this._shouldRender=!0}setShouldRender(){this._shouldRender=!0}onDidRender(){this._shouldRender=!1}onConfigurationChanged(e){return!1}onCursorStateChanged(e){return!1}onDecorationsChanged(e){return!1}onFlushed(e){return!1}onFocusChanged(e){return!1}onLanguageConfigurationChanged(e){return!1}onLineMappingChanged(e){return!1}onLinesChanged(e){return!1}onLinesDeleted(e){return!1}onLinesInserted(e){return!1}onRevealRangeRequest(e){return!1}onScrollChanged(e){return!1}onThemeChanged(e){return!1}onTokensChanged(e){return!1}onTokensColorsChanged(e){return!1}onZonesChanged(e){return!1}handleEvents(e){let t=!1;for(let i=0,n=e.length;i<n;i++){let n=e[i];switch(n.type){case 0:this.onConfigurationChanged(n)&&(t=!0);break;case 1:this.onCursorStateChanged(n)&&(t=!0);break;case 2:this.onDecorationsChanged(n)&&(t=!0);break;case 3:this.onFlushed(n)&&(t=!0);break;case 4:this.onFocusChanged(n)&&(t=!0);break;case 5:this.onLanguageConfigurationChanged(n)&&(t=!0);break;case 6:this.onLineMappingChanged(n)&&(t=!0);break;case 7:this.onLinesChanged(n)&&(t=!0);break;case 8:this.onLinesDeleted(n)&&(t=!0);break;case 9:this.onLinesInserted(n)&&(t=!0);break;case 10:this.onRevealRangeRequest(n)&&(t=!0);break;case 11:this.onScrollChanged(n)&&(t=!0);break;case 13:this.onTokensChanged(n)&&(t=!0);break;case 12:this.onThemeChanged(n)&&(t=!0);break;case 14:this.onTokensColorsChanged(n)&&(t=!0);break;case 15:this.onZonesChanged(n)&&(t=!0);break;default:console.info("View received unknown event: "),console.info(n)}}t&&(this._shouldRender=!0)}}class jm extends Um{constructor(e){super(),this._context=e,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}}class Km{static write(e,t){e.setAttribute("data-mprt",String(t))}static read(e){const t=e.getAttribute("data-mprt");return null===t?0:parseInt(t,10)}static collect(e,t){let i=[],n=0;while(e&&e!==document.body){if(e===t)break;e.nodeType===e.ELEMENT_NODE&&(i[n++]=this.read(e)),e=e.parentElement}const o=new Uint8Array(n);for(let r=0;r<n;r++)o[r]=i[n-r-1];return o}}class qm{constructor(e,t){this._viewLayout=e,this.viewportData=t,this.scrollWidth=this._viewLayout.getScrollWidth(),this.scrollHeight=this._viewLayout.getScrollHeight(),this.visibleRange=this.viewportData.visibleRange,this.bigNumbersDelta=this.viewportData.bigNumbersDelta;const i=this._viewLayout.getCurrentViewport();this.scrollTop=i.top,this.scrollLeft=i.left,this.viewportWidth=i.width,this.viewportHeight=i.height}getScrolledTopFromAbsoluteTop(e){return e-this.scrollTop}getVerticalOffsetForLineNumber(e){return this._viewLayout.getVerticalOffsetForLineNumber(e)}getDecorationsInViewport(){return this.viewportData.getDecorationsInViewport()}}class $m extends qm{constructor(e,t,i){super(e,t),this._viewLines=i}linesVisibleRangesForRange(e,t){return this._viewLines.linesVisibleRangesForRange(e,t)}visibleRangeForPosition(e){return this._viewLines.visibleRangeForPosition(e)}}class Gm{constructor(e,t,i){this.outsideRenderedLine=e,this.lineNumber=t,this.ranges=i}}class Ym{constructor(e,t){this.left=Math.round(e),this.width=Math.round(t)}toString(){return`[${this.left},${this.width}]`}}class Xm{constructor(e,t){this.outsideRenderedLine=e,this.left=Math.round(t)}}class Zm{constructor(e,t){this.outsideRenderedLine=e,this.ranges=t}}class Qm{constructor(e,t){this.left=e,this.width=t}toString(){return`[${this.left},${this.width}]`}static compare(e,t){return e.left-t.left}}class Jm{static _createRange(){return this._handyReadyRange||(this._handyReadyRange=document.createRange()),this._handyReadyRange}static _detachRange(e,t){e.selectNodeContents(t)}static _readClientRects(e,t,i,n,o){const r=this._createRange();try{return r.setStart(e,t),r.setEnd(i,n),r.getClientRects()}catch(s){return null}finally{this._detachRange(r,o)}}static _mergeAdjacentRanges(e){if(1===e.length)return[new Ym(e[0].left,e[0].width)];e.sort(Qm.compare);let t=[],i=0,n=e[0].left,o=e[0].width;for(let r=1,s=e.length;r<s;r++){const s=e[r],a=s.left,l=s.width;n+o+.9>=a?o=Math.max(o,a+l-n):(t[i++]=new Ym(n,o),n=a,o=l)}return t[i++]=new Ym(n,o),t}static _createHorizontalRangesFromClientRects(e,t){if(!e||0===e.length)return null;const i=[];for(let n=0,o=e.length;n<o;n++){const o=e[n];i[n]=new Qm(Math.max(0,o.left-t),o.width)}return this._mergeAdjacentRanges(i)}static readHorizontalRanges(e,t,i,n,o,r,s){const a=0,l=e.children.length-1;if(a>l)return null;if(t=Math.min(l,Math.max(a,t)),n=Math.min(l,Math.max(a,n)),t===n&&i===o&&0===i){const i=e.children[t].getClientRects();return this._createHorizontalRangesFromClientRects(i,r)}t!==n&&n>0&&0===o&&(n--,o=1073741824);let c=e.children[t].firstChild,h=e.children[n].firstChild;if(c&&h||(!c&&0===i&&t>0&&(c=e.children[t-1].firstChild,i=1073741824),!h&&0===o&&n>0&&(h=e.children[n-1].firstChild,o=1073741824)),!c||!h)return null;i=Math.min(c.textContent.length,Math.max(0,i)),o=Math.min(h.textContent.length,Math.max(0,o));const d=this._readClientRects(c,i,h,o,s);return this._createHorizontalRangesFromClientRects(d,r)}}const ep=zi("themeService");function tp(e){return{id:e}}var ip;(function(e){function t(e){return e&&"object"===typeof e&&"string"===typeof e.id}e.isThemeIcon=t;const i=/^\$\(([a-z.]+\/)?([a-z-~]+)\)$/i;function n(e){const t=i.exec(e);if(!t)return;let[,n,o]=t;return n||(n="codicon/"),{id:n+o}}e.fromString=n;const o=/^(codicon\/)?([a-z-]+)(~[a-z]+)?$/i;function r(e){const t=o.exec(e.id);if(!t)return;let[,,i,n]=t,r="codicon codicon-"+i;return n&&(r+=" "+n.substr(1)),r}e.asClassName=r})(ip||(ip={}));const np="dark",op="hc";function rp(e){switch(e){case np:return"vs-dark";case op:return"hc-black";default:return"vs"}}const sp={ThemingContribution:"base.contributions.theming"};class ap{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new Ve}onColorThemeChange(e){return this.themingParticipants.push(e),this.onThemingParticipantAddedEmitter.fire(e),Me(()=>{const t=this.themingParticipants.indexOf(e);this.themingParticipants.splice(t,1)})}getThemingParticipants(){return this.themingParticipants}}let lp=new ap;function cp(e){return lp.onColorThemeChange(e)}mu.add(sp.ThemingContribution,lp);class hp extends Oe{constructor(e){super(),this.themeService=e,this.theme=e.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(e=>this.onThemeChange(e)))}onThemeChange(e){this.theme=e,this.updateStyles()}updateStyles(){}}const dp=function(){return!!r["g"]||!(r["d"]||Ji||nn)}();let up=!0;const gp=Qi;class fp{constructor(e,t){this._domNode=e,this._clientRectDeltaLeft=0,this._clientRectDeltaLeftRead=!1,this.endNode=t}get clientRectDeltaLeft(){return this._clientRectDeltaLeftRead||(this._clientRectDeltaLeftRead=!0,this._clientRectDeltaLeft=this._domNode.getBoundingClientRect().left),this._clientRectDeltaLeft}}class mp{constructor(e,t){this.themeType=t;const i=e.options,n=i.get(36);this.renderWhitespace=i.get(80),this.renderControlCharacters=i.get(74),this.spaceWidth=n.spaceWidth,this.middotWidth=n.middotWidth,this.wsmiddotWidth=n.wsmiddotWidth,this.useMonospaceOptimizations=n.isMonospace&&!i.get(24),this.canUseHalfwidthRightwardsArrow=n.canUseHalfwidthRightwardsArrow,this.lineHeight=i.get(51),this.stopRenderingLineAfter=i.get(95),this.fontLigatures=i.get(37)}equals(e){return this.themeType===e.themeType&&this.renderWhitespace===e.renderWhitespace&&this.renderControlCharacters===e.renderControlCharacters&&this.spaceWidth===e.spaceWidth&&this.middotWidth===e.middotWidth&&this.wsmiddotWidth===e.wsmiddotWidth&&this.useMonospaceOptimizations===e.useMonospaceOptimizations&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.lineHeight===e.lineHeight&&this.stopRenderingLineAfter===e.stopRenderingLineAfter&&this.fontLigatures===e.fontLigatures}}class pp{constructor(e){this._options=e,this._isMaybeInvalid=!0,this._renderedViewLine=null}getDomNode(){return this._renderedViewLine&&this._renderedViewLine.domNode?this._renderedViewLine.domNode.domNode:null}setDomNode(e){if(!this._renderedViewLine)throw new Error("I have no rendered view line to set the dom node to...");this._renderedViewLine.domNode=km(e)}onContentChanged(){this._isMaybeInvalid=!0}onTokensChanged(){this._isMaybeInvalid=!0}onDecorationsChanged(){this._isMaybeInvalid=!0}onOptionsChanged(e){this._isMaybeInvalid=!0,this._options=e}onSelectionChanged(){return!(!gp&&this._options.themeType!==op&&"selection"!==this._options.renderWhitespace)&&(this._isMaybeInvalid=!0,!0)}renderLine(e,t,i,n){if(!1===this._isMaybeInvalid)return!1;this._isMaybeInvalid=!1;const o=i.getViewLineRenderingData(e),r=this._options,s=ad.filter(o.inlineDecorations,e,o.minColumn,o.maxColumn);let a=null;if(gp||r.themeType===op||"selection"===this._options.renderWhitespace){const t=i.selections;for(const i of t){if(i.endLineNumber<e||i.startLineNumber>e)continue;const t=i.startLineNumber===e?i.startColumn:o.minColumn,n=i.endLineNumber===e?i.endColumn:o.maxColumn;t<n&&(r.themeType===op||"selection"!==this._options.renderWhitespace?s.push(new ad(t,n,"inline-selected-text",0)):(a||(a=[]),a.push(new ud(t-1,n-1))))}}const l=new gd(r.useMonospaceOptimizations,r.canUseHalfwidthRightwardsArrow,o.content,o.continuesWithWrappedLine,o.isBasicASCII,o.containsRTL,o.minColumn-1,o.tokens,s,o.tabSize,o.startVisibleColumn,r.spaceWidth,r.middotWidth,r.wsmiddotWidth,r.stopRenderingLineAfter,r.renderWhitespace,r.renderControlCharacters,r.fontLigatures!==R.OFF,a);if(this._renderedViewLine&&this._renderedViewLine.input.equals(l))return!1;n.appendASCIIString('<div style="top:'),n.appendASCIIString(String(t)),n.appendASCIIString("px;height:"),n.appendASCIIString(String(this._options.lineHeight)),n.appendASCIIString('px;" class="'),n.appendASCIIString(pp.CLASS_NAME),n.appendASCIIString('">');const c=pd(l,n);n.appendASCIIString("</div>");let h=null;return up&&dp&&o.isBasicASCII&&r.useMonospaceOptimizations&&0===c.containsForeignElements&&o.content.length<300&&l.lineTokens.getCount()<100&&(h=new _p(this._renderedViewLine?this._renderedViewLine.domNode:null,l,c.characterMapping)),h||(h=wp(this._renderedViewLine?this._renderedViewLine.domNode:null,l,c.characterMapping,c.containsRTL,c.containsForeignElements)),this._renderedViewLine=h,!0}layoutLine(e,t){this._renderedViewLine&&this._renderedViewLine.domNode&&(this._renderedViewLine.domNode.setTop(t),this._renderedViewLine.domNode.setHeight(this._options.lineHeight))}getWidth(){return this._renderedViewLine?this._renderedViewLine.getWidth():0}getWidthIsFast(){return!this._renderedViewLine||this._renderedViewLine.getWidthIsFast()}needsMonospaceFontCheck(){return!!this._renderedViewLine&&this._renderedViewLine instanceof _p}monospaceAssumptionsAreValid(){return this._renderedViewLine&&this._renderedViewLine instanceof _p?this._renderedViewLine.monospaceAssumptionsAreValid():up}onMonospaceAssumptionsInvalidated(){this._renderedViewLine&&this._renderedViewLine instanceof _p&&(this._renderedViewLine=this._renderedViewLine.toSlowRenderedLine())}getVisibleRangesForRange(e,t,i){if(!this._renderedViewLine)return null;e|=0,t|=0,e=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,e)),t=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,t));const n=0|this._renderedViewLine.input.stopRenderingLineAfter;let o=!1;-1!==n&&e>n+1&&t>n+1&&(o=!0),-1!==n&&e>n+1&&(e=n+1),-1!==n&&t>n+1&&(t=n+1);const r=this._renderedViewLine.getVisibleRangesForRange(e,t,i);return r&&r.length>0?new Zm(o,r):null}getColumnOfNodeOffset(e,t,i){return this._renderedViewLine?this._renderedViewLine.getColumnOfNodeOffset(e,t,i):1}}pp.CLASS_NAME="view-line";class _p{constructor(e,t,i){this.domNode=e,this.input=t,this._characterMapping=i,this._charWidth=t.spaceWidth}getWidth(){return this._getCharPosition(this._characterMapping.length)}getWidthIsFast(){return!0}monospaceAssumptionsAreValid(){if(!this.domNode)return up;const e=this.getWidth(),t=this.domNode.domNode.firstChild.offsetWidth;return Math.abs(e-t)>=2&&(console.warn("monospace assumptions have been violated, therefore disabling monospace optimizations!"),up=!1),up}toSlowRenderedLine(){return wp(this.domNode,this.input,this._characterMapping,!1,0)}getVisibleRangesForRange(e,t,i){const n=this._getCharPosition(e),o=this._getCharPosition(t);return[new Ym(n,o-n)]}_getCharPosition(e){const t=this._characterMapping.getAbsoluteOffsets();return 0===t.length?0:Math.round(this._charWidth*t[e-1])}getColumnOfNodeOffset(e,t,i){const n=t.textContent.length;let o=-1;while(t)t=t.previousSibling,o++;const r=this._characterMapping.partDataToCharOffset(o,n,i);return r+1}}class bp{constructor(e,t,i,n,o){if(this.domNode=e,this.input=t,this._characterMapping=i,this._isWhitespaceOnly=/^\s*$/.test(t.lineContent),this._containsForeignElements=o,this._cachedWidth=-1,this._pixelOffsetCache=null,!n||0===this._characterMapping.length){this._pixelOffsetCache=new Int32Array(Math.max(2,this._characterMapping.length+1));for(let e=0,t=this._characterMapping.length;e<=t;e++)this._pixelOffsetCache[e]=-1}}_getReadingTarget(e){return e.domNode.firstChild}getWidth(){return this.domNode?(-1===this._cachedWidth&&(this._cachedWidth=this._getReadingTarget(this.domNode).offsetWidth),this._cachedWidth):0}getWidthIsFast(){return-1!==this._cachedWidth}getVisibleRangesForRange(e,t,i){if(!this.domNode)return null;if(null!==this._pixelOffsetCache){const n=this._readPixelOffset(this.domNode,e,i);if(-1===n)return null;const o=this._readPixelOffset(this.domNode,t,i);return-1===o?null:[new Ym(n,o-n)]}return this._readVisibleRangesForRange(this.domNode,e,t,i)}_readVisibleRangesForRange(e,t,i,n){if(t===i){const i=this._readPixelOffset(e,t,n);return-1===i?null:[new Ym(i,0)]}return this._readRawVisibleRangesForRange(e,t,i,n)}_readPixelOffset(e,t,i){if(0===this._characterMapping.length){if(0===this._containsForeignElements)return 0;if(2===this._containsForeignElements)return 0;if(1===this._containsForeignElements)return this.getWidth();const t=this._getReadingTarget(e);return t.firstChild?t.firstChild.offsetWidth:0}if(null!==this._pixelOffsetCache){const n=this._pixelOffsetCache[t];if(-1!==n)return n;const o=this._actualReadPixelOffset(e,t,i);return this._pixelOffsetCache[t]=o,o}return this._actualReadPixelOffset(e,t,i)}_actualReadPixelOffset(e,t,i){if(0===this._characterMapping.length){const t=Jm.readHorizontalRanges(this._getReadingTarget(e),0,0,0,0,i.clientRectDeltaLeft,i.endNode);return t&&0!==t.length?t[0].left:-1}if(t===this._characterMapping.length&&this._isWhitespaceOnly&&0===this._containsForeignElements)return this.getWidth();const n=this._characterMapping.charOffsetToPartData(t-1),o=fd.getPartIndex(n),r=fd.getCharIndex(n),s=Jm.readHorizontalRanges(this._getReadingTarget(e),o,r,o,r,i.clientRectDeltaLeft,i.endNode);if(!s||0===s.length)return-1;const a=s[0].left;if(this.input.isBasicASCII){const e=this._characterMapping.getAbsoluteOffsets(),i=Math.round(this.input.spaceWidth*e[t-1]);if(Math.abs(i-a)<=1)return i}return a}_readRawVisibleRangesForRange(e,t,i,n){if(1===t&&i===this._characterMapping.length)return[new Ym(0,this.getWidth())];const o=this._characterMapping.charOffsetToPartData(t-1),r=fd.getPartIndex(o),s=fd.getCharIndex(o),a=this._characterMapping.charOffsetToPartData(i-1),l=fd.getPartIndex(a),c=fd.getCharIndex(a);return Jm.readHorizontalRanges(this._getReadingTarget(e),r,s,l,c,n.clientRectDeltaLeft,n.endNode)}getColumnOfNodeOffset(e,t,i){const n=t.textContent.length;let o=-1;while(t)t=t.previousSibling,o++;const r=this._characterMapping.partDataToCharOffset(o,n,i);return r+1}}class vp extends bp{_readVisibleRangesForRange(e,t,i,n){const o=super._readVisibleRangesForRange(e,t,i,n);if(!o||0===o.length||t===i||1===t&&i===this._characterMapping.length)return o;if(!this.input.containsRTL){const t=this._readPixelOffset(e,i,n);if(-1!==t){const e=o[o.length-1];e.left<t&&(e.width=t-e.left)}}return o}}const wp=function(){return en?Cp:yp}();function Cp(e,t,i,n,o){return new vp(e,t,i,n,o)}function yp(e,t,i,n,o){return new bp(e,t,i,n,o)}class Sp{constructor(e,t,i,n){this.oldPosition=e,this.oldText=t,this.newPosition=i,this.newText=n}get oldLength(){return this.oldText.length}get oldEnd(){return this.oldPosition+this.oldText.length}get newLength(){return this.newText.length}get newEnd(){return this.newPosition+this.newText.length}toString(){return 0===this.oldText.length?`(insert@${this.oldPosition} "${this.newText}")`:0===this.newText.length?`(delete@${this.oldPosition} "${this.oldText}")`:`(replace@${this.oldPosition} "${this.oldText}" with "${this.newText}")`}static _writeStringSize(e){return 4+2*e.length}static _writeString(e,t,i){const n=t.length;vr["f"](e,n,i),i+=4;for(let o=0;o<n;o++)vr["e"](e,t.charCodeAt(o),i),i+=2;return i}static _readString(e,t){const i=vr["c"](e,t);return t+=4,wc(e,t,i)}writeSize(){return 8+Sp._writeStringSize(this.oldText)+Sp._writeStringSize(this.newText)}write(e,t){return vr["f"](e,this.oldPosition,t),t+=4,vr["f"](e,this.newPosition,t),t+=4,t=Sp._writeString(e,this.oldText,t),t=Sp._writeString(e,this.newText,t),t}static read(e,t,i){const n=vr["c"](e,t);t+=4;const o=vr["c"](e,t);t+=4;const r=Sp._readString(e,t);t+=Sp._writeStringSize(r);const s=Sp._readString(e,t);return t+=Sp._writeStringSize(s),i.push(new Sp(n,r,o,s)),t}}function xp(e,t){if(null===e||0===e.length)return t;const i=new Lp(e,t);return i.compress()}class Lp{constructor(e,t){this._prevEdits=e,this._currEdits=t,this._result=[],this._resultLen=0,this._prevLen=this._prevEdits.length,this._prevDeltaOffset=0,this._currLen=this._currEdits.length,this._currDeltaOffset=0}compress(){let e=0,t=0,i=this._getPrev(e),n=this._getCurr(t);while(e<this._prevLen||t<this._currLen){if(null===i){this._acceptCurr(n),n=this._getCurr(++t);continue}if(null===n){this._acceptPrev(i),i=this._getPrev(++e);continue}if(n.oldEnd<=i.newPosition){this._acceptCurr(n),n=this._getCurr(++t);continue}if(i.newEnd<=n.oldPosition){this._acceptPrev(i),i=this._getPrev(++e);continue}if(n.oldPosition<i.newPosition){const[e,t]=Lp._splitCurr(n,i.newPosition-n.oldPosition);this._acceptCurr(e),n=t;continue}if(i.newPosition<n.oldPosition){const[e,t]=Lp._splitPrev(i,n.oldPosition-i.newPosition);this._acceptPrev(e),i=t;continue}let o,r;if(n.oldEnd===i.newEnd)o=i,r=n,i=this._getPrev(++e),n=this._getCurr(++t);else if(n.oldEnd<i.newEnd){const[e,s]=Lp._splitPrev(i,n.oldLength);o=e,r=n,i=s,n=this._getCurr(++t)}else{const[t,s]=Lp._splitCurr(n,i.newLength);o=i,r=t,i=this._getPrev(++e),n=s}this._result[this._resultLen++]=new Sp(o.oldPosition,o.oldText,r.newPosition,r.newText),this._prevDeltaOffset+=o.newLength-o.oldLength,this._currDeltaOffset+=r.newLength-r.oldLength}const o=Lp._merge(this._result),r=Lp._removeNoOps(o);return r}_acceptCurr(e){this._result[this._resultLen++]=Lp._rebaseCurr(this._prevDeltaOffset,e),this._currDeltaOffset+=e.newLength-e.oldLength}_getCurr(e){return e<this._currLen?this._currEdits[e]:null}_acceptPrev(e){this._result[this._resultLen++]=Lp._rebasePrev(this._currDeltaOffset,e),this._prevDeltaOffset+=e.newLength-e.oldLength}_getPrev(e){return e<this._prevLen?this._prevEdits[e]:null}static _rebaseCurr(e,t){return new Sp(t.oldPosition-e,t.oldText,t.newPosition,t.newText)}static _rebasePrev(e,t){return new Sp(t.oldPosition,t.oldText,t.newPosition+e,t.newText)}static _splitPrev(e,t){const i=e.newText.substr(0,t),n=e.newText.substr(t);return[new Sp(e.oldPosition,e.oldText,e.newPosition,i),new Sp(e.oldEnd,"",e.newPosition+t,n)]}static _splitCurr(e,t){const i=e.oldText.substr(0,t),n=e.oldText.substr(t);return[new Sp(e.oldPosition,i,e.newPosition,e.newText),new Sp(e.oldPosition+t,n,e.newEnd,"")]}static _merge(e){if(0===e.length)return e;let t=[],i=0,n=e[0];for(let o=1;o<e.length;o++){const r=e[o];n.oldEnd===r.oldPosition?n=new Sp(n.oldPosition,n.oldText+r.oldText,n.newPosition,n.newText+r.newText):(t[i++]=n,n=r)}return t[i++]=n,t}static _removeNoOps(e){if(0===e.length)return e;let t=[],i=0;for(let n=0;n<e.length;n++){const o=e[n];o.oldText!==o.newText&&(t[i++]=o)}return t}}function kp(e){return e.toString()}class Ep{constructor(e,t,i,n,o,r,s){this.beforeVersionId=e,this.afterVersionId=t,this.beforeEOL=i,this.afterEOL=n,this.beforeCursorState=o,this.afterCursorState=r,this.changes=s}static create(e,t){const i=e.getAlternativeVersionId(),n=Tp(e);return new Ep(i,i,n,n,t,t,[])}append(e,t,i,n,o){t.length>0&&(this.changes=xp(this.changes,t)),this.afterEOL=i,this.afterVersionId=n,this.afterCursorState=o}static _writeSelectionsSize(e){return 4+16*(e?e.length:0)}static _writeSelections(e,t,i){if(vr["f"](e,t?t.length:0,i),i+=4,t)for(const n of t)vr["f"](e,n.selectionStartLineNumber,i),i+=4,vr["f"](e,n.selectionStartColumn,i),i+=4,vr["f"](e,n.positionLineNumber,i),i+=4,vr["f"](e,n.positionColumn,i),i+=4;return i}static _readSelections(e,t,i){const n=vr["c"](e,t);t+=4;for(let o=0;o<n;o++){const n=vr["c"](e,t);t+=4;const o=vr["c"](e,t);t+=4;const r=vr["c"](e,t);t+=4;const s=vr["c"](e,t);t+=4,i.push(new ei(n,o,r,s))}return t}serialize(){let e=10+Ep._writeSelectionsSize(this.beforeCursorState)+Ep._writeSelectionsSize(this.afterCursorState)+4;for(const n of this.changes)e+=n.writeSize();const t=new Uint8Array(e);let i=0;vr["f"](t,this.beforeVersionId,i),i+=4,vr["f"](t,this.afterVersionId,i),i+=4,vr["g"](t,this.beforeEOL,i),i+=1,vr["g"](t,this.afterEOL,i),i+=1,i=Ep._writeSelections(t,this.beforeCursorState,i),i=Ep._writeSelections(t,this.afterCursorState,i),vr["f"](t,this.changes.length,i),i+=4;for(const n of this.changes)i=n.write(t,i);return t.buffer}static deserialize(e){const t=new Uint8Array(e);let i=0;const n=vr["c"](t,i);i+=4;const o=vr["c"](t,i);i+=4;const r=vr["d"](t,i);i+=1;const s=vr["d"](t,i);i+=1;const a=[];i=Ep._readSelections(t,i,a);const l=[];i=Ep._readSelections(t,i,l);const c=vr["c"](t,i);i+=4;const h=[];for(let d=0;d<c;d++)i=Sp.read(t,i,h);return new Ep(n,o,r,s,a,l,h)}}class Dp{constructor(e,t){this.model=e,this._data=Ep.create(e,t)}get type(){return 0}get resource(){return Ht.isUri(this.model)?this.model:this.model.uri}get label(){return o("edit","Typing")}toString(){const e=this._data instanceof Ep?this._data:Ep.deserialize(this._data);return e.changes.map(e=>e.toString()).join(", ")}matchesResource(e){const t=Ht.isUri(this.model)?this.model:this.model.uri;return t.toString()===e.toString()}setModel(e){this.model=e}canAppend(e){return this.model===e&&this._data instanceof Ep}append(e,t,i,n,o){this._data instanceof Ep&&this._data.append(e,t,i,n,o)}close(){this._data instanceof Ep&&(this._data=this._data.serialize())}undo(){if(Ht.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof Ep&&(this._data=this._data.serialize());const e=Ep.deserialize(this._data);this.model._applyUndo(e.changes,e.beforeEOL,e.beforeVersionId,e.beforeCursorState)}redo(){if(Ht.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof Ep&&(this._data=this._data.serialize());const e=Ep.deserialize(this._data);this.model._applyRedo(e.changes,e.afterEOL,e.afterVersionId,e.afterCursorState)}}class Np{constructor(e,t){this.type=1,this.label=e,this._isOpen=!0,this._editStackElementsArr=t.slice(0),this._editStackElementsMap=new Map;for(const i of this._editStackElementsArr){const e=kp(i.resource);this._editStackElementsMap.set(e,i)}this._delegate=null}get resources(){return this._editStackElementsArr.map(e=>e.resource)}prepareUndoRedo(){if(this._delegate)return this._delegate.prepareUndoRedo(this)}matchesResource(e){const t=kp(e);return this._editStackElementsMap.has(t)}setModel(e){const t=kp(Ht.isUri(e)?e:e.uri);this._editStackElementsMap.has(t)&&this._editStackElementsMap.get(t).setModel(e)}canAppend(e){if(!this._isOpen)return!1;const t=kp(e.uri);if(this._editStackElementsMap.has(t)){const i=this._editStackElementsMap.get(t);return i.canAppend(e)}return!1}append(e,t,i,n,o){const r=kp(e.uri),s=this._editStackElementsMap.get(r);s.append(e,t,i,n,o)}close(){this._isOpen=!1}undo(){this._isOpen=!1;for(const e of this._editStackElementsArr)e.undo()}redo(){for(const e of this._editStackElementsArr)e.redo()}split(){return this._editStackElementsArr}}function Tp(e){const t=e.getEOL();return"\n"===t?0:1}function Mp(e){return!!e&&(e instanceof Dp||e instanceof Np)}class Ip{constructor(e,t){this._model=e,this._undoRedoService=t}pushStackElement(){const e=this._undoRedoService.getLastElement(this._model.uri);Mp(e)&&e.close()}clear(){this._undoRedoService.removeElements(this._model.uri)}_getOrCreateEditStackElement(e){const t=this._undoRedoService.getLastElement(this._model.uri);if(Mp(t)&&t.canAppend(this._model))return t;const i=new Dp(this._model,e);return this._undoRedoService.pushElement(i),i}pushEOL(e){const t=this._getOrCreateEditStackElement(null);this._model.setEOL(e),t.append(this._model,[],Tp(this._model),this._model.getAlternativeVersionId(),null)}pushEditOperation(e,t,i){const n=this._getOrCreateEditStackElement(e),o=this._model.applyEdits(t,!0),r=Ip._computeCursorState(i,o),s=o.map((e,t)=>({index:t,textChange:e.textChange}));return s.sort((e,t)=>e.textChange.oldPosition===t.textChange.oldPosition?e.index-t.index:e.textChange.oldPosition-t.textChange.oldPosition),n.append(this._model,s.map(e=>e.textChange),Tp(this._model),this._model.getAlternativeVersionId(),r),r}static _computeCursorState(e,t){try{return e?e(t):null}catch(i){return me(i),null}}}class Op{constructor(){this.spacesDiff=0,this.looksLikeAlignment=!1}}function Ap(e,t,i,n,o){let r;for(o.spacesDiff=0,o.looksLikeAlignment=!1,r=0;r<t&&r<n;r++){let t=e.charCodeAt(r),n=i.charCodeAt(r);if(t!==n)break}let s=0,a=0;for(let u=r;u<t;u++){let t=e.charCodeAt(u);32===t?s++:a++}let l=0,c=0;for(let u=r;u<n;u++){let e=i.charCodeAt(u);32===e?l++:c++}if(s>0&&a>0)return;if(l>0&&c>0)return;let h=Math.abs(a-c),d=Math.abs(s-l);if(0===h)return o.spacesDiff=d,void(d>0&&0<=l-1&&l-1<e.length&&l<i.length&&32!==i.charCodeAt(l)&&32===e.charCodeAt(l-1)&&44===e.charCodeAt(e.length-1)&&(o.looksLikeAlignment=!0));d%h!==0||(o.spacesDiff=d/h)}function Rp(e,t,i){const n=Math.min(e.getLineCount(),1e4);let o=0,r=0,s="",a=0;const l=[2,4,6,8,3,5,7],c=8;let h=[0,0,0,0,0,0,0,0,0],d=new Op;for(let f=1;f<=n;f++){let n=e.getLineLength(f),l=e.getLineContent(f);const u=n<=65536;let g=!1,m=0,p=0,_=0;for(let t=0,i=n;t<i;t++){let i=u?l.charCodeAt(t):e.getLineCharCode(f,t);if(9===i)_++;else{if(32!==i){g=!0,m=t;break}p++}}if(!g)continue;if(_>0?o++:p>1&&r++,Ap(s,a,l,m,d),d.looksLikeAlignment&&(!i||t!==d.spacesDiff))continue;let b=d.spacesDiff;b<=c&&h[b]++,s=l,a=m}let u=i;o!==r&&(u=o<r);let g=t;if(u){let e=u?0:.1*n;l.forEach(t=>{let i=h[t];i>e&&(e=i,g=t)}),4===g&&h[4]>0&&h[2]>0&&h[2]>=h[4]/2&&(g=2)}return{insertSpaces:u,tabSize:g}}function Pp(e){return(1&e.metadata)>>>0}function Fp(e,t){e.metadata=254&e.metadata|t<<0}function Wp(e){return(2&e.metadata)>>>1===1}function Bp(e,t){e.metadata=253&e.metadata|(t?1:0)<<1}function Vp(e){return(4&e.metadata)>>>2===1}function Hp(e,t){e.metadata=251&e.metadata|(t?1:0)<<2}function zp(e){return(8&e.metadata)>>>3===1}function Up(e,t){e.metadata=247&e.metadata|(t?1:0)<<3}function jp(e){return(48&e.metadata)>>>4}function Kp(e,t){e.metadata=207&e.metadata|t<<4}function qp(e){return(64&e.metadata)>>>6===1}function $p(e,t){e.metadata=191&e.metadata|(t?1:0)<<6}class Gp{constructor(e,t,i){this.metadata=0,this.parent=this,this.left=this,this.right=this,Fp(this,1),this.start=t,this.end=i,this.delta=0,this.maxEnd=i,this.id=e,this.ownerId=0,this.options=null,Hp(this,!1),Kp(this,1),Up(this,!1),$p(this,!1),this.cachedVersionId=0,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=i,this.range=null,Bp(this,!1)}reset(e,t,i,n){this.start=t,this.end=i,this.maxEnd=i,this.cachedVersionId=e,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=i,this.range=n}setOptions(e){this.options=e;let t=this.options.className;Hp(this,"squiggly-error"===t||"squiggly-warning"===t||"squiggly-info"===t),Kp(this,this.options.stickiness),Up(this,!(!this.options.overviewRuler||!this.options.overviewRuler.color)),$p(this,this.options.collapseOnReplaceEdit)}setCachedOffsets(e,t,i){this.cachedVersionId!==i&&(this.range=null),this.cachedVersionId=i,this.cachedAbsoluteStart=e,this.cachedAbsoluteEnd=t}detach(){this.parent=null,this.left=null,this.right=null}}const Yp=new Gp(null,0,0);Yp.parent=Yp,Yp.left=Yp,Yp.right=Yp,Fp(Yp,0);class Xp{constructor(){this.root=Yp,this.requestNormalizeDelta=!1}intervalSearch(e,t,i,n,o){return this.root===Yp?[]:r_(this,e,t,i,n,o)}search(e,t,i){return this.root===Yp?[]:o_(this,e,t,i)}collectNodesFromOwner(e){return i_(this,e)}collectNodesPostOrder(){return n_(this)}insert(e){s_(this,e),this._normalizeDeltaIfNecessary()}delete(e){l_(this,e),this._normalizeDeltaIfNecessary()}resolveNode(e,t){const i=e;let n=0;while(e!==this.root)e===e.parent.right&&(n+=e.parent.delta),e=e.parent;const o=i.start+n,r=i.end+n;i.setCachedOffsets(o,r,t)}acceptReplace(e,t,i,n){const o=e_(this,e,e+t);for(let r=0,s=o.length;r<s;r++){const e=o[r];l_(this,e)}this._normalizeDeltaIfNecessary(),t_(this,e,e+t,i),this._normalizeDeltaIfNecessary();for(let r=0,s=o.length;r<s;r++){const s=o[r];s.start=s.cachedAbsoluteStart,s.end=s.cachedAbsoluteEnd,Jp(s,e,e+t,i,n),s.maxEnd=s.end,s_(this,s)}this._normalizeDeltaIfNecessary()}_normalizeDeltaIfNecessary(){this.requestNormalizeDelta&&(this.requestNormalizeDelta=!1,Zp(this))}}function Zp(e){let t=e.root,i=0;while(t!==Yp)t.left===Yp||Wp(t.left)?t.right===Yp||Wp(t.right)?(t.start=i+t.start,t.end=i+t.end,t.delta=0,f_(t),Bp(t,!0),Bp(t.left,!1),Bp(t.right,!1),t===t.parent.right&&(i-=t.parent.delta),t=t.parent):(i+=t.delta,t=t.right):t=t.left;Bp(e.root,!1)}function Qp(e,t,i,n){return e<i||!(e>i)&&(1!==n&&(2===n||t))}function Jp(e,t,i,n,o){const r=jp(e),s=0===r||2===r,a=1===r||2===r,l=i-t,c=n,h=Math.min(l,c),d=e.start;let u=!1;const g=e.end;let f=!1;t<=d&&g<=i&&qp(e)&&(e.start=t,u=!0,e.end=t,f=!0);{const e=o?1:l>0?2:0;!u&&Qp(d,s,t,e)&&(u=!0),!f&&Qp(g,a,t,e)&&(f=!0)}if(h>0&&!o){const e=l>c?2:0;!u&&Qp(d,s,t+h,e)&&(u=!0),!f&&Qp(g,a,t+h,e)&&(f=!0)}{const n=o?1:0;!u&&Qp(d,s,i,n)&&(e.start=t+c,u=!0),!f&&Qp(g,a,i,n)&&(e.end=t+c,f=!0)}const m=c-l;u||(e.start=Math.max(0,d+m)),f||(e.end=Math.max(0,g+m)),e.start>e.end&&(e.end=e.start)}function e_(e,t,i){let n=e.root,o=0,r=0,s=0,a=0,l=[],c=0;while(n!==Yp)if(Wp(n))Bp(n.left,!1),Bp(n.right,!1),n===n.parent.right&&(o-=n.parent.delta),n=n.parent;else{if(!Wp(n.left)){if(r=o+n.maxEnd,r<t){Bp(n,!0);continue}if(n.left!==Yp){n=n.left;continue}}s=o+n.start,s>i?Bp(n,!0):(a=o+n.end,a>=t&&(n.setCachedOffsets(s,a,0),l[c++]=n),Bp(n,!0),n.right===Yp||Wp(n.right)||(o+=n.delta,n=n.right))}return Bp(e.root,!1),l}function t_(e,t,i,n){let o=e.root,r=0,s=0,a=0;const l=n-(i-t);while(o!==Yp)if(Wp(o))Bp(o.left,!1),Bp(o.right,!1),o===o.parent.right&&(r-=o.parent.delta),f_(o),o=o.parent;else{if(!Wp(o.left)){if(s=r+o.maxEnd,s<t){Bp(o,!0);continue}if(o.left!==Yp){o=o.left;continue}}a=r+o.start,a>i?(o.start+=l,o.end+=l,o.delta+=l,(o.delta<-1073741824||o.delta>1073741824)&&(e.requestNormalizeDelta=!0),Bp(o,!0)):(Bp(o,!0),o.right===Yp||Wp(o.right)||(r+=o.delta,o=o.right))}Bp(e.root,!1)}function i_(e,t){let i=e.root,n=[],o=0;while(i!==Yp)Wp(i)?(Bp(i.left,!1),Bp(i.right,!1),i=i.parent):i.left===Yp||Wp(i.left)?(i.ownerId===t&&(n[o++]=i),Bp(i,!0),i.right===Yp||Wp(i.right)||(i=i.right)):i=i.left;return Bp(e.root,!1),n}function n_(e){let t=e.root,i=[],n=0;while(t!==Yp)Wp(t)?(Bp(t.left,!1),Bp(t.right,!1),t=t.parent):t.left===Yp||Wp(t.left)?t.right===Yp||Wp(t.right)?(i[n++]=t,Bp(t,!0)):t=t.right:t=t.left;return Bp(e.root,!1),i}function o_(e,t,i,n){let o=e.root,r=0,s=0,a=0,l=[],c=0;while(o!==Yp){if(Wp(o)){Bp(o.left,!1),Bp(o.right,!1),o===o.parent.right&&(r-=o.parent.delta),o=o.parent;continue}if(o.left!==Yp&&!Wp(o.left)){o=o.left;continue}s=r+o.start,a=r+o.end,o.setCachedOffsets(s,a,n);let e=!0;t&&o.ownerId&&o.ownerId!==t&&(e=!1),i&&Vp(o)&&(e=!1),e&&(l[c++]=o),Bp(o,!0),o.right===Yp||Wp(o.right)||(r+=o.delta,o=o.right)}return Bp(e.root,!1),l}function r_(e,t,i,n,o,r){let s=e.root,a=0,l=0,c=0,h=0,d=[],u=0;while(s!==Yp)if(Wp(s))Bp(s.left,!1),Bp(s.right,!1),s===s.parent.right&&(a-=s.parent.delta),s=s.parent;else{if(!Wp(s.left)){if(l=a+s.maxEnd,l<t){Bp(s,!0);continue}if(s.left!==Yp){s=s.left;continue}}if(c=a+s.start,c>i)Bp(s,!0);else{if(h=a+s.end,h>=t){s.setCachedOffsets(c,h,r);let e=!0;n&&s.ownerId&&s.ownerId!==n&&(e=!1),o&&Vp(s)&&(e=!1),e&&(d[u++]=s)}Bp(s,!0),s.right===Yp||Wp(s.right)||(a+=s.delta,s=s.right)}}return Bp(e.root,!1),d}function s_(e,t){if(e.root===Yp)return t.parent=Yp,t.left=Yp,t.right=Yp,Fp(t,0),e.root=t,e.root;a_(e,t),m_(t.parent);let i=t;while(i!==e.root&&1===Pp(i.parent))if(i.parent===i.parent.parent.left){const t=i.parent.parent.right;1===Pp(t)?(Fp(i.parent,0),Fp(t,0),Fp(i.parent.parent,1),i=i.parent.parent):(i===i.parent.right&&(i=i.parent,d_(e,i)),Fp(i.parent,0),Fp(i.parent.parent,1),u_(e,i.parent.parent))}else{const t=i.parent.parent.left;1===Pp(t)?(Fp(i.parent,0),Fp(t,0),Fp(i.parent.parent,1),i=i.parent.parent):(i===i.parent.left&&(i=i.parent,u_(e,i)),Fp(i.parent,0),Fp(i.parent.parent,1),d_(e,i.parent.parent))}return Fp(e.root,0),t}function a_(e,t){let i=0,n=e.root;const o=t.start,r=t.end;while(1){const e=p_(o,r,n.start+i,n.end+i);if(e<0){if(n.left===Yp){t.start-=i,t.end-=i,t.maxEnd-=i,n.left=t;break}n=n.left}else{if(n.right===Yp){t.start-=i+n.delta,t.end-=i+n.delta,t.maxEnd-=i+n.delta,n.right=t;break}i+=n.delta,n=n.right}}t.parent=n,t.left=Yp,t.right=Yp,Fp(t,1)}function l_(e,t){let i,n;if(t.left===Yp?(i=t.right,n=t,i.delta+=t.delta,(i.delta<-1073741824||i.delta>1073741824)&&(e.requestNormalizeDelta=!0),i.start+=t.delta,i.end+=t.delta):t.right===Yp?(i=t.left,n=t):(n=c_(t.right),i=n.right,i.start+=n.delta,i.end+=n.delta,i.delta+=n.delta,(i.delta<-1073741824||i.delta>1073741824)&&(e.requestNormalizeDelta=!0),n.start+=t.delta,n.end+=t.delta,n.delta=t.delta,(n.delta<-1073741824||n.delta>1073741824)&&(e.requestNormalizeDelta=!0)),n===e.root)return e.root=i,Fp(i,0),t.detach(),h_(),f_(i),void(e.root.parent=Yp);let o,r=1===Pp(n);if(n===n.parent.left?n.parent.left=i:n.parent.right=i,n===t?i.parent=n.parent:(n.parent===t?i.parent=n:i.parent=n.parent,n.left=t.left,n.right=t.right,n.parent=t.parent,Fp(n,Pp(t)),t===e.root?e.root=n:t===t.parent.left?t.parent.left=n:t.parent.right=n,n.left!==Yp&&(n.left.parent=n),n.right!==Yp&&(n.right.parent=n)),t.detach(),r)return m_(i.parent),n!==t&&(m_(n),m_(n.parent)),void h_();m_(i),m_(i.parent),n!==t&&(m_(n),m_(n.parent));while(i!==e.root&&0===Pp(i))i===i.parent.left?(o=i.parent.right,1===Pp(o)&&(Fp(o,0),Fp(i.parent,1),d_(e,i.parent),o=i.parent.right),0===Pp(o.left)&&0===Pp(o.right)?(Fp(o,1),i=i.parent):(0===Pp(o.right)&&(Fp(o.left,0),Fp(o,1),u_(e,o),o=i.parent.right),Fp(o,Pp(i.parent)),Fp(i.parent,0),Fp(o.right,0),d_(e,i.parent),i=e.root)):(o=i.parent.left,1===Pp(o)&&(Fp(o,0),Fp(i.parent,1),u_(e,i.parent),o=i.parent.left),0===Pp(o.left)&&0===Pp(o.right)?(Fp(o,1),i=i.parent):(0===Pp(o.left)&&(Fp(o.right,0),Fp(o,1),d_(e,o),o=i.parent.left),Fp(o,Pp(i.parent)),Fp(i.parent,0),Fp(o.left,0),u_(e,i.parent),i=e.root));Fp(i,0),h_()}function c_(e){while(e.left!==Yp)e=e.left;return e}function h_(){Yp.parent=Yp,Yp.delta=0,Yp.start=0,Yp.end=0}function d_(e,t){const i=t.right;i.delta+=t.delta,(i.delta<-1073741824||i.delta>1073741824)&&(e.requestNormalizeDelta=!0),i.start+=t.delta,i.end+=t.delta,t.right=i.left,i.left!==Yp&&(i.left.parent=t),i.parent=t.parent,t.parent===Yp?e.root=i:t===t.parent.left?t.parent.left=i:t.parent.right=i,i.left=t,t.parent=i,f_(t),f_(i)}function u_(e,t){const i=t.left;t.delta-=i.delta,(t.delta<-1073741824||t.delta>1073741824)&&(e.requestNormalizeDelta=!0),t.start-=i.delta,t.end-=i.delta,t.left=i.right,i.right!==Yp&&(i.right.parent=t),i.parent=t.parent,t.parent===Yp?e.root=i:t===t.parent.right?t.parent.right=i:t.parent.left=i,i.right=t,t.parent=i,f_(t),f_(i)}function g_(e){let t=e.end;if(e.left!==Yp){const i=e.left.maxEnd;i>t&&(t=i)}if(e.right!==Yp){const i=e.right.maxEnd+e.delta;i>t&&(t=i)}return t}function f_(e){e.maxEnd=g_(e)}function m_(e){while(e!==Yp){const t=g_(e);if(e.maxEnd===t)return;e.maxEnd=t,e=e.parent}}function p_(e,t,i,n){return e===i?t-n:e-i}class __{constructor(e,t){this.piece=e,this.color=t,this.size_left=0,this.lf_left=0,this.parent=this,this.left=this,this.right=this}next(){if(this.right!==b_)return v_(this.right);let e=this;while(e.parent!==b_){if(e.parent.left===e)break;e=e.parent}return e.parent===b_?b_:e.parent}prev(){if(this.left!==b_)return w_(this.left);let e=this;while(e.parent!==b_){if(e.parent.right===e)break;e=e.parent}return e.parent===b_?b_:e.parent}detach(){this.parent=null,this.left=null,this.right=null}}const b_=new __(null,0);function v_(e){while(e.left!==b_)e=e.left;return e}function w_(e){while(e.right!==b_)e=e.right;return e}function C_(e){return e===b_?0:e.size_left+e.piece.length+C_(e.right)}function y_(e){return e===b_?0:e.lf_left+e.piece.lineFeedCnt+y_(e.right)}function S_(){b_.parent=b_}function x_(e,t){let i=t.right;i.size_left+=t.size_left+(t.piece?t.piece.length:0),i.lf_left+=t.lf_left+(t.piece?t.piece.lineFeedCnt:0),t.right=i.left,i.left!==b_&&(i.left.parent=t),i.parent=t.parent,t.parent===b_?e.root=i:t.parent.left===t?t.parent.left=i:t.parent.right=i,i.left=t,t.parent=i}function L_(e,t){let i=t.left;t.left=i.right,i.right!==b_&&(i.right.parent=t),i.parent=t.parent,t.size_left-=i.size_left+(i.piece?i.piece.length:0),t.lf_left-=i.lf_left+(i.piece?i.piece.lineFeedCnt:0),t.parent===b_?e.root=i:t===t.parent.right?t.parent.right=i:t.parent.left=i,i.right=t,t.parent=i}function k_(e,t){let i,n;if(t.left===b_?(n=t,i=n.right):t.right===b_?(n=t,i=n.left):(n=v_(t.right),i=n.right),n===e.root)return e.root=i,i.color=0,t.detach(),S_(),void(e.root.parent=b_);let o,r=1===n.color;if(n===n.parent.left?n.parent.left=i:n.parent.right=i,n===t?(i.parent=n.parent,N_(e,i)):(n.parent===t?i.parent=n:i.parent=n.parent,N_(e,i),n.left=t.left,n.right=t.right,n.parent=t.parent,n.color=t.color,t===e.root?e.root=n:t===t.parent.left?t.parent.left=n:t.parent.right=n,n.left!==b_&&(n.left.parent=n),n.right!==b_&&(n.right.parent=n),n.size_left=t.size_left,n.lf_left=t.lf_left,N_(e,n)),t.detach(),i.parent.left===i){let t=C_(i),n=y_(i);if(t!==i.parent.size_left||n!==i.parent.lf_left){let o=t-i.parent.size_left,r=n-i.parent.lf_left;i.parent.size_left=t,i.parent.lf_left=n,D_(e,i.parent,o,r)}}if(N_(e,i.parent),r)S_();else{while(i!==e.root&&0===i.color)i===i.parent.left?(o=i.parent.right,1===o.color&&(o.color=0,i.parent.color=1,x_(e,i.parent),o=i.parent.right),0===o.left.color&&0===o.right.color?(o.color=1,i=i.parent):(0===o.right.color&&(o.left.color=0,o.color=1,L_(e,o),o=i.parent.right),o.color=i.parent.color,i.parent.color=0,o.right.color=0,x_(e,i.parent),i=e.root)):(o=i.parent.left,1===o.color&&(o.color=0,i.parent.color=1,L_(e,i.parent),o=i.parent.left),0===o.left.color&&0===o.right.color?(o.color=1,i=i.parent):(0===o.left.color&&(o.right.color=0,o.color=1,x_(e,o),o=i.parent.left),o.color=i.parent.color,i.parent.color=0,o.left.color=0,L_(e,i.parent),i=e.root));i.color=0,S_()}}function E_(e,t){N_(e,t);while(t!==e.root&&1===t.parent.color)if(t.parent===t.parent.parent.left){const i=t.parent.parent.right;1===i.color?(t.parent.color=0,i.color=0,t.parent.parent.color=1,t=t.parent.parent):(t===t.parent.right&&(t=t.parent,x_(e,t)),t.parent.color=0,t.parent.parent.color=1,L_(e,t.parent.parent))}else{const i=t.parent.parent.left;1===i.color?(t.parent.color=0,i.color=0,t.parent.parent.color=1,t=t.parent.parent):(t===t.parent.left&&(t=t.parent,L_(e,t)),t.parent.color=0,t.parent.parent.color=1,x_(e,t.parent.parent))}e.root.color=0}function D_(e,t,i,n){while(t!==e.root&&t!==b_)t.parent.left===t&&(t.parent.size_left+=i,t.parent.lf_left+=n),t=t.parent}function N_(e,t){let i=0,n=0;if(t!==e.root){if(0===i){while(t!==e.root&&t===t.parent.right)t=t.parent;if(t===e.root)return;t=t.parent,i=C_(t.left)-t.size_left,n=y_(t.left)-t.lf_left,t.size_left+=i,t.lf_left+=n}while(t!==e.root&&(0!==i||0!==n))t.parent.left===t&&(t.parent.size_left+=i,t.parent.lf_left+=n),t=t.parent}}b_.parent=b_,b_.left=b_,b_.right=b_,b_.color=0;class T_ extends yh{constructor(e){super(0);for(let t=0,i=e.length;t<i;t++)this.set(e.charCodeAt(t),2);this.set(32,1),this.set(9,1)}}function M_(e){let t={};return i=>(t.hasOwnProperty(i)||(t[i]=e(i)),t[i])}const I_=M_(e=>new T_(e)),O_=999;class A_{constructor(e,t,i,n){this.searchString=e,this.isRegex=t,this.matchCase=i,this.wordSeparators=n}parseSearchRequest(){if(""===this.searchString)return null;let e;e=this.isRegex?R_(this.searchString):this.searchString.indexOf("\n")>=0;let t=null;try{t=yr["o"](this.searchString,this.isRegex,{matchCase:this.matchCase,wholeWord:!1,multiline:e,global:!0,unicode:!0})}catch(n){return null}if(!t)return null;let i=!this.isRegex&&!e;return i&&this.searchString.toLowerCase()!==this.searchString.toUpperCase()&&(i=this.matchCase),new P_(t,this.wordSeparators?I_(this.wordSeparators):null,i?this.searchString:null)}}function R_(e){if(!e||0===e.length)return!1;for(let t=0,i=e.length;t<i;t++){const n=e.charCodeAt(t);if(92===n){if(t++,t>=i)break;const n=e.charCodeAt(t);if(110===n||114===n||87===n||119===n)return!0}}return!1}class P_{constructor(e,t,i){this.regex=e,this.wordSeparators=t,this.simpleSearch=i}}function F_(e,t,i){if(!i)return new xs(e,null);let n=[];for(let o=0,r=t.length;o<r;o++)n[o]=t[o];return new xs(e,n)}class W_{constructor(e){let t=[],i=0;for(let n=0,o=e.length;n<o;n++)10===e.charCodeAt(n)&&(t[i++]=n);this._lineFeedsOffsets=t}findLineFeedCountBeforeOffset(e){const t=this._lineFeedsOffsets;let i=0,n=t.length-1;if(-1===n)return 0;if(e<=t[0])return 0;while(i<n){const o=i+((n-i)/2>>0);t[o]>=e?n=o-1:t[o+1]>=e?(i=o,n=o):i=o+1}return i+1}}class B_{static findMatches(e,t,i,n,o){const r=t.parseSearchRequest();return r?r.regex.multiline?this._doFindMatchesMultiline(e,i,new U_(r.wordSeparators,r.regex),n,o):this._doFindMatchesLineByLine(e,i,r,n,o):[]}static _getMultilineMatchRange(e,t,i,n,o,r){let s,a,l=0;if(n?(l=n.findLineFeedCountBeforeOffset(o),s=t+o+l):s=t+o,n){let e=n.findLineFeedCountBeforeOffset(o+r.length),t=e-l;a=s+r.length+t}else a=s+r.length;const c=e.getPositionAt(s),h=e.getPositionAt(a);return new Jt(c.lineNumber,c.column,h.lineNumber,h.column)}static _doFindMatchesMultiline(e,t,i,n,o){const r=e.getOffsetAt(t.getStartPosition()),s=e.getValueInRange(t,1),a="\r\n"===e.getEOL()?new W_(s):null,l=[];let c,h=0;i.reset(0);while(c=i.next(s))if(l[h++]=F_(this._getMultilineMatchRange(e,r,s,a,c.index,c[0]),c,n),h>=o)return l;return l}static _doFindMatchesLineByLine(e,t,i,n,o){const r=[];let s=0;if(t.startLineNumber===t.endLineNumber){const a=e.getLineContent(t.startLineNumber).substring(t.startColumn-1,t.endColumn-1);return s=this._findMatchesInLine(i,a,t.startLineNumber,t.startColumn-1,s,r,n,o),r}const a=e.getLineContent(t.startLineNumber).substring(t.startColumn-1);s=this._findMatchesInLine(i,a,t.startLineNumber,t.startColumn-1,s,r,n,o);for(let l=t.startLineNumber+1;l<t.endLineNumber&&s<o;l++)s=this._findMatchesInLine(i,e.getLineContent(l),l,0,s,r,n,o);if(s<o){const a=e.getLineContent(t.endLineNumber).substring(0,t.endColumn-1);s=this._findMatchesInLine(i,a,t.endLineNumber,0,s,r,n,o)}return r}static _findMatchesInLine(e,t,i,n,o,r,s,a){const l=e.wordSeparators;if(!s&&e.simpleSearch){const s=e.simpleSearch,c=s.length,h=t.length;let d=-c;while(-1!==(d=t.indexOf(s,d+c)))if((!l||z_(l,t,h,d,c))&&(r[o++]=new xs(new Jt(i,d+1+n,i,d+1+c+n),null),o>=a))return o;return o}const c=new U_(e.wordSeparators,e.regex);let h;c.reset(0);do{if(h=c.next(t),h&&(r[o++]=F_(new Jt(i,h.index+1+n,i,h.index+1+h[0].length+n),h,s),o>=a))return o}while(h);return o}static findNextMatch(e,t,i,n){const o=t.parseSearchRequest();if(!o)return null;const r=new U_(o.wordSeparators,o.regex);return o.regex.multiline?this._doFindNextMatchMultiline(e,i,r,n):this._doFindNextMatchLineByLine(e,i,r,n)}static _doFindNextMatchMultiline(e,t,i,n){const o=new Qt(t.lineNumber,1),r=e.getOffsetAt(o),s=e.getLineCount(),a=e.getValueInRange(new Jt(o.lineNumber,o.column,s,e.getLineMaxColumn(s)),1),l="\r\n"===e.getEOL()?new W_(a):null;i.reset(t.column-1);let c=i.next(a);return c?F_(this._getMultilineMatchRange(e,r,a,l,c.index,c[0]),c,n):1!==t.lineNumber||1!==t.column?this._doFindNextMatchMultiline(e,new Qt(1,1),i,n):null}static _doFindNextMatchLineByLine(e,t,i,n){const o=e.getLineCount(),r=t.lineNumber,s=e.getLineContent(r),a=this._findFirstMatchInLine(i,s,r,t.column,n);if(a)return a;for(let l=1;l<=o;l++){const t=(r+l-1)%o,s=e.getLineContent(t+1),a=this._findFirstMatchInLine(i,s,t+1,1,n);if(a)return a}return null}static _findFirstMatchInLine(e,t,i,n,o){e.reset(n-1);const r=e.next(t);return r?F_(new Jt(i,r.index+1,i,r.index+1+r[0].length),r,o):null}static findPreviousMatch(e,t,i,n){const o=t.parseSearchRequest();if(!o)return null;const r=new U_(o.wordSeparators,o.regex);return o.regex.multiline?this._doFindPreviousMatchMultiline(e,i,r,n):this._doFindPreviousMatchLineByLine(e,i,r,n)}static _doFindPreviousMatchMultiline(e,t,i,n){const o=this._doFindMatchesMultiline(e,new Jt(1,1,t.lineNumber,t.column),i,n,10*O_);if(o.length>0)return o[o.length-1];const r=e.getLineCount();return t.lineNumber!==r||t.column!==e.getLineMaxColumn(r)?this._doFindPreviousMatchMultiline(e,new Qt(r,e.getLineMaxColumn(r)),i,n):null}static _doFindPreviousMatchLineByLine(e,t,i,n){const o=e.getLineCount(),r=t.lineNumber,s=e.getLineContent(r).substring(0,t.column-1),a=this._findLastMatchInLine(i,s,r,n);if(a)return a;for(let l=1;l<=o;l++){const t=(o+r-l-1)%o,s=e.getLineContent(t+1),a=this._findLastMatchInLine(i,s,t+1,n);if(a)return a}return null}static _findLastMatchInLine(e,t,i,n){let o,r=null;e.reset(0);while(o=e.next(t))r=F_(new Jt(i,o.index+1,i,o.index+1+o[0].length),o,n);return r}}function V_(e,t,i,n,o){if(0===n)return!0;const r=t.charCodeAt(n-1);if(0!==e.get(r))return!0;if(13===r||10===r)return!0;if(o>0){const i=t.charCodeAt(n);if(0!==e.get(i))return!0}return!1}function H_(e,t,i,n,o){if(n+o===i)return!0;const r=t.charCodeAt(n+o);if(0!==e.get(r))return!0;if(13===r||10===r)return!0;if(o>0){const i=t.charCodeAt(n+o-1);if(0!==e.get(i))return!0}return!1}function z_(e,t,i,n,o){return V_(e,t,i,n,o)&&H_(e,t,i,n,o)}class U_{constructor(e,t){this._wordSeparators=e,this._searchRegex=t,this._prevMatchStartIndex=-1,this._prevMatchLength=0}reset(e){this._searchRegex.lastIndex=e,this._prevMatchStartIndex=-1,this._prevMatchLength=0}next(e){const t=e.length;let i;do{if(this._prevMatchStartIndex+this._prevMatchLength===t)return null;if(i=this._searchRegex.exec(e),!i)return null;const n=i.index,o=i[0].length;if(n===this._prevMatchStartIndex&&o===this._prevMatchLength){if(0===o){yr["y"](e,t,this._searchRegex.lastIndex)>65535?this._searchRegex.lastIndex+=2:this._searchRegex.lastIndex+=1;continue}return null}if(this._prevMatchStartIndex=n,this._prevMatchLength=o,!this._wordSeparators||z_(this._wordSeparators,e,t,n,o))return i}while(i);return null}}const j_=65535;function K_(e){let t;return t=e[e.length-1]<65536?new Uint16Array(e.length):new Uint32Array(e.length),t.set(e,0),t}class q_{constructor(e,t,i,n,o){this.lineStarts=e,this.cr=t,this.lf=i,this.crlf=n,this.isBasicASCII=o}}function $_(e,t=!0){let i=[0],n=1;for(let o=0,r=e.length;o<r;o++){const t=e.charCodeAt(o);13===t?o+1<r&&10===e.charCodeAt(o+1)?(i[n++]=o+2,o++):i[n++]=o+1:10===t&&(i[n++]=o+1)}return t?K_(i):i}function G_(e,t){e.length=0,e[0]=0;let i=1,n=0,o=0,r=0,s=!0;for(let l=0,c=t.length;l<c;l++){const a=t.charCodeAt(l);13===a?l+1<c&&10===t.charCodeAt(l+1)?(r++,e[i++]=l+2,l++):(n++,e[i++]=l+1):10===a?(o++,e[i++]=l+1):s&&9!==a&&(a<32||a>126)&&(s=!1)}const a=new q_(K_(e),n,o,r,s);return e.length=0,a}class Y_{constructor(e,t,i,n,o){this.bufferIndex=e,this.start=t,this.end=i,this.lineFeedCnt=n,this.length=o}}class X_{constructor(e,t){this.buffer=e,this.lineStarts=t}}class Z_{constructor(e,t){this._pieces=[],this._tree=e,this._BOM=t,this._index=0,e.root!==b_&&e.iterate(e.root,e=>(e!==b_&&this._pieces.push(e.piece),!0))}read(){return 0===this._pieces.length?0===this._index?(this._index++,this._BOM):null:this._index>this._pieces.length-1?null:0===this._index?this._BOM+this._tree.getPieceContent(this._pieces[this._index++]):this._tree.getPieceContent(this._pieces[this._index++])}}class Q_{constructor(e){this._limit=e,this._cache=[]}get(e){for(let t=this._cache.length-1;t>=0;t--){let i=this._cache[t];if(i.nodeStartOffset<=e&&i.nodeStartOffset+i.node.piece.length>=e)return i}return null}get2(e){for(let t=this._cache.length-1;t>=0;t--){let i=this._cache[t];if(i.nodeStartLineNumber&&i.nodeStartLineNumber<e&&i.nodeStartLineNumber+i.node.piece.lineFeedCnt>=e)return i}return null}set(e){this._cache.length>=this._limit&&this._cache.shift(),this._cache.push(e)}validate(e){let t=!1,i=this._cache;for(let n=0;n<i.length;n++){let o=i[n];(null===o.node.parent||o.nodeStartOffset>=e)&&(i[n]=null,t=!0)}if(t){let e=[];for(const t of i)null!==t&&e.push(t);this._cache=e}}}class J_{constructor(e,t,i){this.create(e,t,i)}create(e,t,i){this._buffers=[new X_("",[0])],this._lastChangeBufferPos={line:0,column:0},this.root=b_,this._lineCnt=1,this._length=0,this._EOL=t,this._EOLLength=t.length,this._EOLNormalized=i;let n=null;for(let o=0,r=e.length;o<r;o++)if(e[o].buffer.length>0){e[o].lineStarts||(e[o].lineStarts=$_(e[o].buffer));let t=new Y_(o+1,{line:0,column:0},{line:e[o].lineStarts.length-1,column:e[o].buffer.length-e[o].lineStarts[e[o].lineStarts.length-1]},e[o].lineStarts.length-1,e[o].buffer.length);this._buffers.push(e[o]),n=this.rbInsertRight(n,t)}this._searchCache=new Q_(1),this._lastVisitedLine={lineNumber:0,value:""},this.computeBufferMetadata()}normalizeEOL(e){let t=j_,i=t-Math.floor(t/3),n=2*i,o="",r=0,s=[];if(this.iterate(this.root,t=>{let a=this.getNodeContent(t),l=a.length;if(r<=i||r+l<n)return o+=a,r+=l,!0;let c=o.replace(/\r\n|\r|\n/g,e);return s.push(new X_(c,$_(c))),o=a,r=l,!0}),r>0){let t=o.replace(/\r\n|\r|\n/g,e);s.push(new X_(t,$_(t)))}this.create(s,e,!0)}getEOL(){return this._EOL}setEOL(e){this._EOL=e,this._EOLLength=this._EOL.length,this.normalizeEOL(e)}createSnapshot(e){return new Z_(this,e)}getOffsetAt(e,t){let i=0,n=this.root;while(n!==b_)if(n.left!==b_&&n.lf_left+1>=e)n=n.left;else{if(n.lf_left+n.piece.lineFeedCnt+1>=e){i+=n.size_left;let o=this.getAccumulatedValue(n,e-n.lf_left-2);return i+(o+t-1)}e-=n.lf_left+n.piece.lineFeedCnt,i+=n.size_left+n.piece.length,n=n.right}return i}getPositionAt(e){e=Math.floor(e),e=Math.max(0,e);let t=this.root,i=0,n=e;while(t!==b_)if(0!==t.size_left&&t.size_left>=e)t=t.left;else{if(t.size_left+t.piece.length>=e){let o=this.getIndexOf(t,e-t.size_left);if(i+=t.lf_left+o.index,0===o.index){let e=this.getOffsetAt(i+1,1),t=n-e;return new Qt(i+1,t+1)}return new Qt(i+1,o.remainder+1)}if(e-=t.size_left+t.piece.length,i+=t.lf_left+t.piece.lineFeedCnt,t.right===b_){let t=this.getOffsetAt(i+1,1),o=n-e-t;return new Qt(i+1,o+1)}t=t.right}return new Qt(1,1)}getValueInRange(e,t){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return"";let i=this.nodeAt2(e.startLineNumber,e.startColumn),n=this.nodeAt2(e.endLineNumber,e.endColumn),o=this.getValueInRange2(i,n);return t?t===this._EOL&&this._EOLNormalized&&t===this.getEOL()&&this._EOLNormalized?o:o.replace(/\r\n|\r|\n/g,t):o}getValueInRange2(e,t){if(e.node===t.node){let i=e.node,n=this._buffers[i.piece.bufferIndex].buffer,o=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);return n.substring(o+e.remainder,o+t.remainder)}let i=e.node,n=this._buffers[i.piece.bufferIndex].buffer,o=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start),r=n.substring(o+e.remainder,o+i.piece.length);i=i.next();while(i!==b_){let e=this._buffers[i.piece.bufferIndex].buffer,n=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);if(i===t.node){r+=e.substring(n,n+t.remainder);break}r+=e.substr(n,i.piece.length),i=i.next()}return r}getLinesContent(){let e=[],t=0,i="",n=!1;return this.iterate(this.root,o=>{if(o===b_)return!0;const r=o.piece;let s=r.length;if(0===s)return!0;const a=this._buffers[r.bufferIndex].buffer,l=this._buffers[r.bufferIndex].lineStarts,c=r.start.line,h=r.end.line;let d=l[c]+r.start.column;if(n&&(10===a.charCodeAt(d)&&(d++,s--),e[t++]=i,i="",n=!1,0===s))return!0;if(c===h)return this._EOLNormalized||13!==a.charCodeAt(d+s-1)?i+=a.substr(d,s):(n=!0,i+=a.substr(d,s-1)),!0;i+=this._EOLNormalized?a.substring(d,Math.max(d,l[c+1]-this._EOLLength)):a.substring(d,l[c+1]).replace(/(\r\n|\r|\n)$/,""),e[t++]=i;for(let n=c+1;n<h;n++)i=this._EOLNormalized?a.substring(l[n],l[n+1]-this._EOLLength):a.substring(l[n],l[n+1]).replace(/(\r\n|\r|\n)$/,""),e[t++]=i;return this._EOLNormalized||13!==a.charCodeAt(l[h]+r.end.column-1)?i=a.substr(l[h],r.end.column):(n=!0,0===r.end.column?t--:i=a.substr(l[h],r.end.column-1)),!0}),n&&(e[t++]=i,i=""),e[t++]=i,e}getLength(){return this._length}getLineCount(){return this._lineCnt}getLineContent(e){return this._lastVisitedLine.lineNumber===e||(this._lastVisitedLine.lineNumber=e,e===this._lineCnt?this._lastVisitedLine.value=this.getLineRawContent(e):this._EOLNormalized?this._lastVisitedLine.value=this.getLineRawContent(e,this._EOLLength):this._lastVisitedLine.value=this.getLineRawContent(e).replace(/(\r\n|\r|\n)$/,"")),this._lastVisitedLine.value}_getCharCode(e){if(e.remainder===e.node.piece.length){let t=e.node.next();if(!t)return 0;let i=this._buffers[t.piece.bufferIndex],n=this.offsetInBuffer(t.piece.bufferIndex,t.piece.start);return i.buffer.charCodeAt(n)}{let t=this._buffers[e.node.piece.bufferIndex],i=this.offsetInBuffer(e.node.piece.bufferIndex,e.node.piece.start),n=i+e.remainder;return t.buffer.charCodeAt(n)}}getLineCharCode(e,t){let i=this.nodeAt2(e,t+1);return this._getCharCode(i)}getLineLength(e){if(e===this.getLineCount()){let t=this.getOffsetAt(e,1);return this.getLength()-t}return this.getOffsetAt(e+1,1)-this.getOffsetAt(e,1)-this._EOLLength}findMatchesInNode(e,t,i,n,o,r,s,a,l,c,h){let d,u,g,f=this._buffers[e.piece.bufferIndex],m=this.offsetInBuffer(e.piece.bufferIndex,e.piece.start),p=this.offsetInBuffer(e.piece.bufferIndex,o),_=this.offsetInBuffer(e.piece.bufferIndex,r),b={line:0,column:0};t._wordSeparators?(u=f.buffer.substring(p,_),g=e=>e+p,t.reset(0)):(u=f.buffer,g=e=>e,t.reset(p));do{if(d=t.next(u),d){if(g(d.index)>=_)return c;this.positionInBuffer(e,g(d.index)-m,b);let t=this.getLineFeedCnt(e.piece.bufferIndex,o,b),r=b.line===o.line?b.column-o.column+n:b.column+1,s=r+d[0].length;if(h[c++]=F_(new Jt(i+t,r,i+t,s),d,a),g(d.index)+d[0].length>=_)return c;if(c>=l)return c}}while(d);return c}findMatchesLineByLine(e,t,i,n){const o=[];let r=0;const s=new U_(t.wordSeparators,t.regex);let a=this.nodeAt2(e.startLineNumber,e.startColumn);if(null===a)return[];let l=this.nodeAt2(e.endLineNumber,e.endColumn);if(null===l)return[];let c=this.positionInBuffer(a.node,a.remainder),h=this.positionInBuffer(l.node,l.remainder);if(a.node===l.node)return this.findMatchesInNode(a.node,s,e.startLineNumber,e.startColumn,c,h,t,i,n,r,o),o;let d=e.startLineNumber,u=a.node;while(u!==l.node){let l=this.getLineFeedCnt(u.piece.bufferIndex,c,u.piece.end);if(l>=1){let a=this._buffers[u.piece.bufferIndex].lineStarts,h=this.offsetInBuffer(u.piece.bufferIndex,u.piece.start),g=a[c.line+l],f=d===e.startLineNumber?e.startColumn:1;if(r=this.findMatchesInNode(u,s,d,f,c,this.positionInBuffer(u,g-h),t,i,n,r,o),r>=n)return o;d+=l}let h=d===e.startLineNumber?e.startColumn-1:0;if(d===e.endLineNumber){const a=this.getLineContent(d).substring(h,e.endColumn-1);return r=this._findMatchesInLine(t,s,a,e.endLineNumber,h,r,o,i,n),o}if(r=this._findMatchesInLine(t,s,this.getLineContent(d).substr(h),d,h,r,o,i,n),r>=n)return o;d++,a=this.nodeAt2(d,1),u=a.node,c=this.positionInBuffer(a.node,a.remainder)}if(d===e.endLineNumber){let a=d===e.startLineNumber?e.startColumn-1:0;const l=this.getLineContent(d).substring(a,e.endColumn-1);return r=this._findMatchesInLine(t,s,l,e.endLineNumber,a,r,o,i,n),o}let g=d===e.startLineNumber?e.startColumn:1;return r=this.findMatchesInNode(l.node,s,d,g,c,h,t,i,n,r,o),o}_findMatchesInLine(e,t,i,n,o,r,s,a,l){const c=e.wordSeparators;if(!a&&e.simpleSearch){const t=e.simpleSearch,a=t.length,h=i.length;let d=-a;while(-1!==(d=i.indexOf(t,d+a)))if((!c||z_(c,i,h,d,a))&&(s[r++]=new xs(new Jt(n,d+1+o,n,d+1+a+o),null),r>=l))return r;return r}let h;t.reset(0);do{if(h=t.next(i),h&&(s[r++]=F_(new Jt(n,h.index+1+o,n,h.index+1+h[0].length+o),h,a),r>=l))return r}while(h);return r}insert(e,t,i=!1){if(this._EOLNormalized=this._EOLNormalized&&i,this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",this.root!==b_){let{node:i,remainder:n,nodeStartOffset:o}=this.nodeAt(e),r=i.piece,s=r.bufferIndex,a=this.positionInBuffer(i,n);if(0===i.piece.bufferIndex&&r.end.line===this._lastChangeBufferPos.line&&r.end.column===this._lastChangeBufferPos.column&&o+r.length===e&&t.length<j_)return this.appendToNode(i,t),void this.computeBufferMetadata();if(o===e)this.insertContentToNodeLeft(t,i),this._searchCache.validate(e);else if(o+i.piece.length>e){let e=[],o=new Y_(r.bufferIndex,a,r.end,this.getLineFeedCnt(r.bufferIndex,a,r.end),this.offsetInBuffer(s,r.end)-this.offsetInBuffer(s,a));if(this.shouldCheckCRLF()&&this.endWithCR(t)){let e=this.nodeCharCodeAt(i,n);if(10===e){let e={line:o.start.line+1,column:0};o=new Y_(o.bufferIndex,e,o.end,this.getLineFeedCnt(o.bufferIndex,e,o.end),o.length-1),t+="\n"}}if(this.shouldCheckCRLF()&&this.startWithLF(t)){let o=this.nodeCharCodeAt(i,n-1);if(13===o){let o=this.positionInBuffer(i,n-1);this.deleteNodeTail(i,o),t="\r"+t,0===i.piece.length&&e.push(i)}else this.deleteNodeTail(i,a)}else this.deleteNodeTail(i,a);let l=this.createNewPieces(t);o.length>0&&this.rbInsertRight(i,o);let c=i;for(let t=0;t<l.length;t++)c=this.rbInsertRight(c,l[t]);this.deleteNodes(e)}else this.insertContentToNodeRight(t,i)}else{let e=this.createNewPieces(t),i=this.rbInsertLeft(null,e[0]);for(let t=1;t<e.length;t++)i=this.rbInsertRight(i,e[t])}this.computeBufferMetadata()}delete(e,t){if(this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",t<=0||this.root===b_)return;let i=this.nodeAt(e),n=this.nodeAt(e+t),o=i.node,r=n.node;if(o===r){let r=this.positionInBuffer(o,i.remainder),s=this.positionInBuffer(o,n.remainder);if(i.nodeStartOffset===e){if(t===o.piece.length){let e=o.next();return k_(this,o),this.validateCRLFWithPrevNode(e),void this.computeBufferMetadata()}return this.deleteNodeHead(o,s),this._searchCache.validate(e),this.validateCRLFWithPrevNode(o),void this.computeBufferMetadata()}return i.nodeStartOffset+o.piece.length===e+t?(this.deleteNodeTail(o,r),this.validateCRLFWithNextNode(o),void this.computeBufferMetadata()):(this.shrinkNode(o,r,s),void this.computeBufferMetadata())}let s=[],a=this.positionInBuffer(o,i.remainder);this.deleteNodeTail(o,a),this._searchCache.validate(e),0===o.piece.length&&s.push(o);let l=this.positionInBuffer(r,n.remainder);this.deleteNodeHead(r,l),0===r.piece.length&&s.push(r);let c=o.next();for(let d=c;d!==b_&&d!==r;d=d.next())s.push(d);let h=0===o.piece.length?o.prev():o;this.deleteNodes(s),this.validateCRLFWithNextNode(h),this.computeBufferMetadata()}insertContentToNodeLeft(e,t){let i=[];if(this.shouldCheckCRLF()&&this.endWithCR(e)&&this.startWithLF(t)){let n=t.piece,o={line:n.start.line+1,column:0},r=new Y_(n.bufferIndex,o,n.end,this.getLineFeedCnt(n.bufferIndex,o,n.end),n.length-1);t.piece=r,e+="\n",D_(this,t,-1,-1),0===t.piece.length&&i.push(t)}let n=this.createNewPieces(e),o=this.rbInsertLeft(t,n[n.length-1]);for(let r=n.length-2;r>=0;r--)o=this.rbInsertLeft(o,n[r]);this.validateCRLFWithPrevNode(o),this.deleteNodes(i)}insertContentToNodeRight(e,t){this.adjustCarriageReturnFromNext(e,t)&&(e+="\n");let i=this.createNewPieces(e),n=this.rbInsertRight(t,i[0]),o=n;for(let r=1;r<i.length;r++)o=this.rbInsertRight(o,i[r]);this.validateCRLFWithPrevNode(n)}positionInBuffer(e,t,i){let n=e.piece,o=e.piece.bufferIndex,r=this._buffers[o].lineStarts,s=r[n.start.line]+n.start.column,a=s+t,l=n.start.line,c=n.end.line,h=0,d=0,u=0;while(l<=c){if(h=l+(c-l)/2|0,u=r[h],h===c)break;if(d=r[h+1],a<u)c=h-1;else{if(!(a>=d))break;l=h+1}}return i?(i.line=h,i.column=a-u,null):{line:h,column:a-u}}getLineFeedCnt(e,t,i){if(0===i.column)return i.line-t.line;let n=this._buffers[e].lineStarts;if(i.line===n.length-1)return i.line-t.line;let o=n[i.line+1],r=n[i.line]+i.column;if(o>r+1)return i.line-t.line;let s=r-1,a=this._buffers[e].buffer;return 13===a.charCodeAt(s)?i.line-t.line+1:i.line-t.line}offsetInBuffer(e,t){let i=this._buffers[e].lineStarts;return i[t.line]+t.column}deleteNodes(e){for(let t=0;t<e.length;t++)k_(this,e[t])}createNewPieces(e){if(e.length>j_){let t=[];while(e.length>j_){const i=e.charCodeAt(j_-1);let n;13===i||i>=55296&&i<=56319?(n=e.substring(0,j_-1),e=e.substring(j_-1)):(n=e.substring(0,j_),e=e.substring(j_));let o=$_(n);t.push(new Y_(this._buffers.length,{line:0,column:0},{line:o.length-1,column:n.length-o[o.length-1]},o.length-1,n.length)),this._buffers.push(new X_(n,o))}let i=$_(e);return t.push(new Y_(this._buffers.length,{line:0,column:0},{line:i.length-1,column:e.length-i[i.length-1]},i.length-1,e.length)),this._buffers.push(new X_(e,i)),t}let t=this._buffers[0].buffer.length;const i=$_(e,!1);let n=this._lastChangeBufferPos;if(this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-1]===t&&0!==t&&this.startWithLF(e)&&this.endWithCR(this._buffers[0].buffer)){this._lastChangeBufferPos={line:this._lastChangeBufferPos.line,column:this._lastChangeBufferPos.column+1},n=this._lastChangeBufferPos;for(let e=0;e<i.length;e++)i[e]+=t+1;this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(i.slice(1)),this._buffers[0].buffer+="_"+e,t+=1}else{if(0!==t)for(let e=0;e<i.length;e++)i[e]+=t;this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(i.slice(1)),this._buffers[0].buffer+=e}const o=this._buffers[0].buffer.length;let r=this._buffers[0].lineStarts.length-1,s=o-this._buffers[0].lineStarts[r],a={line:r,column:s},l=new Y_(0,n,a,this.getLineFeedCnt(0,n,a),o-t);return this._lastChangeBufferPos=a,[l]}getLineRawContent(e,t=0){let i=this.root,n="",o=this._searchCache.get2(e);if(o){i=o.node;let r=this.getAccumulatedValue(i,e-o.nodeStartLineNumber-1),s=this._buffers[i.piece.bufferIndex].buffer,a=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);if(o.nodeStartLineNumber+i.piece.lineFeedCnt!==e){let n=this.getAccumulatedValue(i,e-o.nodeStartLineNumber);return s.substring(a+r,a+n-t)}n=s.substring(a+r,a+i.piece.length)}else{let o=0;const r=e;while(i!==b_)if(i.left!==b_&&i.lf_left>=e-1)i=i.left;else{if(i.lf_left+i.piece.lineFeedCnt>e-1){let n=this.getAccumulatedValue(i,e-i.lf_left-2),s=this.getAccumulatedValue(i,e-i.lf_left-1),a=this._buffers[i.piece.bufferIndex].buffer,l=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);return o+=i.size_left,this._searchCache.set({node:i,nodeStartOffset:o,nodeStartLineNumber:r-(e-1-i.lf_left)}),a.substring(l+n,l+s-t)}if(i.lf_left+i.piece.lineFeedCnt===e-1){let t=this.getAccumulatedValue(i,e-i.lf_left-2),o=this._buffers[i.piece.bufferIndex].buffer,r=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);n=o.substring(r+t,r+i.piece.length);break}e-=i.lf_left+i.piece.lineFeedCnt,o+=i.size_left+i.piece.length,i=i.right}}i=i.next();while(i!==b_){let e=this._buffers[i.piece.bufferIndex].buffer;if(i.piece.lineFeedCnt>0){let o=this.getAccumulatedValue(i,0),r=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);return n+=e.substring(r,r+o-t),n}{let t=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);n+=e.substr(t,i.piece.length)}i=i.next()}return n}computeBufferMetadata(){let e=this.root,t=1,i=0;while(e!==b_)t+=e.lf_left+e.piece.lineFeedCnt,i+=e.size_left+e.piece.length,e=e.right;this._lineCnt=t,this._length=i,this._searchCache.validate(this._length)}getIndexOf(e,t){let i=e.piece,n=this.positionInBuffer(e,t),o=n.line-i.start.line;if(this.offsetInBuffer(i.bufferIndex,i.end)-this.offsetInBuffer(i.bufferIndex,i.start)===t){let t=this.getLineFeedCnt(e.piece.bufferIndex,i.start,n);if(t!==o)return{index:t,remainder:0}}return{index:o,remainder:n.column}}getAccumulatedValue(e,t){if(t<0)return 0;let i=e.piece,n=this._buffers[i.bufferIndex].lineStarts,o=i.start.line+t+1;return o>i.end.line?n[i.end.line]+i.end.column-n[i.start.line]-i.start.column:n[o]-n[i.start.line]-i.start.column}deleteNodeTail(e,t){const i=e.piece,n=i.lineFeedCnt,o=this.offsetInBuffer(i.bufferIndex,i.end),r=t,s=this.offsetInBuffer(i.bufferIndex,r),a=this.getLineFeedCnt(i.bufferIndex,i.start,r),l=a-n,c=s-o,h=i.length+c;e.piece=new Y_(i.bufferIndex,i.start,r,a,h),D_(this,e,c,l)}deleteNodeHead(e,t){const i=e.piece,n=i.lineFeedCnt,o=this.offsetInBuffer(i.bufferIndex,i.start),r=t,s=this.getLineFeedCnt(i.bufferIndex,r,i.end),a=this.offsetInBuffer(i.bufferIndex,r),l=s-n,c=o-a,h=i.length+c;e.piece=new Y_(i.bufferIndex,r,i.end,s,h),D_(this,e,c,l)}shrinkNode(e,t,i){const n=e.piece,o=n.start,r=n.end,s=n.length,a=n.lineFeedCnt,l=t,c=this.getLineFeedCnt(n.bufferIndex,n.start,l),h=this.offsetInBuffer(n.bufferIndex,t)-this.offsetInBuffer(n.bufferIndex,o);e.piece=new Y_(n.bufferIndex,n.start,l,c,h),D_(this,e,h-s,c-a);let d=new Y_(n.bufferIndex,i,r,this.getLineFeedCnt(n.bufferIndex,i,r),this.offsetInBuffer(n.bufferIndex,r)-this.offsetInBuffer(n.bufferIndex,i)),u=this.rbInsertRight(e,d);this.validateCRLFWithPrevNode(u)}appendToNode(e,t){this.adjustCarriageReturnFromNext(t,e)&&(t+="\n");const i=this.shouldCheckCRLF()&&this.startWithLF(t)&&this.endWithCR(e),n=this._buffers[0].buffer.length;this._buffers[0].buffer+=t;const o=$_(t,!1);for(let u=0;u<o.length;u++)o[u]+=n;if(i){let e=this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-2];this._buffers[0].lineStarts.pop(),this._lastChangeBufferPos={line:this._lastChangeBufferPos.line-1,column:n-e}}this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(o.slice(1));const r=this._buffers[0].lineStarts.length-1,s=this._buffers[0].buffer.length-this._buffers[0].lineStarts[r],a={line:r,column:s},l=e.piece.length+t.length,c=e.piece.lineFeedCnt,h=this.getLineFeedCnt(0,e.piece.start,a),d=h-c;e.piece=new Y_(e.piece.bufferIndex,e.piece.start,a,h,l),this._lastChangeBufferPos=a,D_(this,e,t.length,d)}nodeAt(e){let t=this.root,i=this._searchCache.get(e);if(i)return{node:i.node,nodeStartOffset:i.nodeStartOffset,remainder:e-i.nodeStartOffset};let n=0;while(t!==b_)if(t.size_left>e)t=t.left;else{if(t.size_left+t.piece.length>=e){n+=t.size_left;let i={node:t,remainder:e-t.size_left,nodeStartOffset:n};return this._searchCache.set(i),i}e-=t.size_left+t.piece.length,n+=t.size_left+t.piece.length,t=t.right}return null}nodeAt2(e,t){let i=this.root,n=0;while(i!==b_)if(i.left!==b_&&i.lf_left>=e-1)i=i.left;else{if(i.lf_left+i.piece.lineFeedCnt>e-1){let o=this.getAccumulatedValue(i,e-i.lf_left-2),r=this.getAccumulatedValue(i,e-i.lf_left-1);return n+=i.size_left,{node:i,remainder:Math.min(o+t-1,r),nodeStartOffset:n}}if(i.lf_left+i.piece.lineFeedCnt===e-1){let o=this.getAccumulatedValue(i,e-i.lf_left-2);if(o+t-1<=i.piece.length)return{node:i,remainder:o+t-1,nodeStartOffset:n};t-=i.piece.length-o;break}e-=i.lf_left+i.piece.lineFeedCnt,n+=i.size_left+i.piece.length,i=i.right}i=i.next();while(i!==b_){if(i.piece.lineFeedCnt>0){let e=this.getAccumulatedValue(i,0),n=this.offsetOfNode(i);return{node:i,remainder:Math.min(t-1,e),nodeStartOffset:n}}if(i.piece.length>=t-1){let e=this.offsetOfNode(i);return{node:i,remainder:t-1,nodeStartOffset:e}}t-=i.piece.length,i=i.next()}return null}nodeCharCodeAt(e,t){if(e.piece.lineFeedCnt<1)return-1;let i=this._buffers[e.piece.bufferIndex],n=this.offsetInBuffer(e.piece.bufferIndex,e.piece.start)+t;return i.buffer.charCodeAt(n)}offsetOfNode(e){if(!e)return 0;let t=e.size_left;while(e!==this.root)e.parent.right===e&&(t+=e.parent.size_left+e.parent.piece.length),e=e.parent;return t}shouldCheckCRLF(){return!(this._EOLNormalized&&"\n"===this._EOL)}startWithLF(e){if("string"===typeof e)return 10===e.charCodeAt(0);if(e===b_||0===e.piece.lineFeedCnt)return!1;let t=e.piece,i=this._buffers[t.bufferIndex].lineStarts,n=t.start.line,o=i[n]+t.start.column;if(n===i.length-1)return!1;let r=i[n+1];return!(r>o+1)&&10===this._buffers[t.bufferIndex].buffer.charCodeAt(o)}endWithCR(e){return"string"===typeof e?13===e.charCodeAt(e.length-1):e!==b_&&0!==e.piece.lineFeedCnt&&13===this.nodeCharCodeAt(e,e.piece.length-1)}validateCRLFWithPrevNode(e){if(this.shouldCheckCRLF()&&this.startWithLF(e)){let t=e.prev();this.endWithCR(t)&&this.fixCRLF(t,e)}}validateCRLFWithNextNode(e){if(this.shouldCheckCRLF()&&this.endWithCR(e)){let t=e.next();this.startWithLF(t)&&this.fixCRLF(e,t)}}fixCRLF(e,t){let i,n=[],o=this._buffers[e.piece.bufferIndex].lineStarts;i=0===e.piece.end.column?{line:e.piece.end.line-1,column:o[e.piece.end.line]-o[e.piece.end.line-1]-1}:{line:e.piece.end.line,column:e.piece.end.column-1};const r=e.piece.length-1,s=e.piece.lineFeedCnt-1;e.piece=new Y_(e.piece.bufferIndex,e.piece.start,i,s,r),D_(this,e,-1,-1),0===e.piece.length&&n.push(e);let a={line:t.piece.start.line+1,column:0};const l=t.piece.length-1,c=this.getLineFeedCnt(t.piece.bufferIndex,a,t.piece.end);t.piece=new Y_(t.piece.bufferIndex,a,t.piece.end,c,l),D_(this,t,-1,-1),0===t.piece.length&&n.push(t);let h=this.createNewPieces("\r\n");this.rbInsertRight(e,h[0]);for(let d=0;d<n.length;d++)k_(this,n[d])}adjustCarriageReturnFromNext(e,t){if(this.shouldCheckCRLF()&&this.endWithCR(e)){let i=t.next();if(this.startWithLF(i)){if(e+="\n",1===i.piece.length)k_(this,i);else{const e=i.piece,t={line:e.start.line+1,column:0},n=e.length-1,o=this.getLineFeedCnt(e.bufferIndex,t,e.end);i.piece=new Y_(e.bufferIndex,t,e.end,o,n),D_(this,i,-1,-1)}return!0}}return!1}iterate(e,t){if(e===b_)return t(b_);let i=this.iterate(e.left,t);return i?t(e)&&this.iterate(e.right,t):i}getNodeContent(e){if(e===b_)return"";let t,i=this._buffers[e.piece.bufferIndex],n=e.piece,o=this.offsetInBuffer(n.bufferIndex,n.start),r=this.offsetInBuffer(n.bufferIndex,n.end);return t=i.buffer.substring(o,r),t}getPieceContent(e){let t=this._buffers[e.bufferIndex],i=this.offsetInBuffer(e.bufferIndex,e.start),n=this.offsetInBuffer(e.bufferIndex,e.end),o=t.buffer.substring(i,n);return o}rbInsertRight(e,t){let i=new __(t,1);i.left=b_,i.right=b_,i.parent=b_,i.size_left=0,i.lf_left=0;let n=this.root;if(n===b_)this.root=i,i.color=0;else if(e.right===b_)e.right=i,i.parent=e;else{let t=v_(e.right);t.left=i,i.parent=t}return E_(this,i),i}rbInsertLeft(e,t){let i=new __(t,1);if(i.left=b_,i.right=b_,i.parent=b_,i.size_left=0,i.lf_left=0,this.root===b_)this.root=i,i.color=0;else if(e.left===b_)e.left=i,i.parent=e;else{let t=w_(e.left);t.right=i,i.parent=t}return E_(this,i),i}}function eb(e){let t=0,i=0,n=0,o=0;for(let r=0,s=e.length;r<s;r++){const a=e.charCodeAt(r);13===a?(0===t&&(i=r),t++,r+1<s&&10===e.charCodeAt(r+1)?(o|=2,r++):o|=3,n=r+1):10===a&&(o|=1,0===t&&(i=r),t++,n=r+1)}return 0===t&&(i=e.length),[t,i,e.length-n,o]}function tb(e){return(16384|e<<0|2<<23)>>>0}const ib=new Uint32Array(0).buffer;class nb{constructor(){this.tokens=[]}add(e,t){if(this.tokens.length>0){const i=this.tokens[this.tokens.length-1],n=i.startLineNumber+i.tokens.length-1;if(n+1===e)return void i.tokens.push(t)}this.tokens.push(new ab(e,[t]))}}class ob{constructor(e){this._tokens=e,this._tokenCount=e.length/4}toString(e){let t=[];for(let i=0;i<this._tokenCount;i++)t.push(`(${this._getDeltaLine(i)+e},${this._getStartCharacter(i)}-${this._getEndCharacter(i)})`);return`[${t.join(",")}]`}getMaxDeltaLine(){const e=this._getTokenCount();return 0===e?-1:this._getDeltaLine(e-1)}getRange(){const e=this._getTokenCount();if(0===e)return null;const t=this._getStartCharacter(0),i=this._getDeltaLine(e-1),n=this._getEndCharacter(e-1);return new Jt(0,t+1,i,n+1)}_getTokenCount(){return this._tokenCount}_getDeltaLine(e){return this._tokens[4*e]}_getStartCharacter(e){return this._tokens[4*e+1]}_getEndCharacter(e){return this._tokens[4*e+2]}isEmpty(){return 0===this._getTokenCount()}getLineTokens(e){let t=0,i=this._getTokenCount()-1;while(t<i){const n=t+Math.floor((i-t)/2),o=this._getDeltaLine(n);if(o<e)t=n+1;else{if(!(o>e)){let o=n;while(o>t&&this._getDeltaLine(o-1)===e)o--;let r=n;while(r<i&&this._getDeltaLine(r+1)===e)r++;return new rb(this._tokens.subarray(4*o,4*r+4))}i=n-1}}return this._getDeltaLine(t)===e?new rb(this._tokens.subarray(4*t,4*t+4)):null}clear(){this._tokenCount=0}removeTokens(e,t,i,n){const o=this._tokens,r=this._tokenCount;let s=0,a=!1,l=0;for(let c=0;c<r;c++){const r=4*c,h=o[r],d=o[r+1],u=o[r+2],g=o[r+3];if((h>e||h===e&&u>=t)&&(h<i||h===i&&d<=n))a=!0;else{if(0===s&&(l=h),a){const e=4*s;o[e]=h-l,o[e+1]=d,o[e+2]=u,o[e+3]=g}s++}}return this._tokenCount=s,l}split(e,t,i,n){const o=this._tokens,r=this._tokenCount;let s=[],a=[],l=s,c=0,h=0;for(let d=0;d<r;d++){const r=4*d,s=o[r],u=o[r+1],g=o[r+2],f=o[r+3];if(s>e||s===e&&g>=t){if(s<i||s===i&&u<=n)continue;l!==a&&(l=a,c=0,h=s)}l[c++]=s-h,l[c++]=u,l[c++]=g,l[c++]=f}return[new ob(new Uint32Array(s)),new ob(new Uint32Array(a)),h]}acceptDeleteRange(e,t,i,n,o){const r=this._tokens,s=this._tokenCount,a=n-t;let l=0,c=!1;for(let h=0;h<s;h++){const d=4*h;let u=r[d],g=r[d+1],f=r[d+2];const m=r[d+3];if(u<t||u===t&&f<=i){l++;continue}if(u===t&&g<i)u===n&&f>o?f-=o-i:f=i;else if(u===t&&g===i){if(!(u===n&&f>o)){c=!0;continue}f-=o-i}else if(u<n||u===n&&g<o){if(!(u===n&&f>o)){c=!0;continue}u===t?(g=i,f=g+(f-o)):(g=0,f=g+(f-o))}else if(u>n){if(0===a&&!c){l=s;break}u-=a}else{if(!(u===n&&g>=o))throw new Error("Not possible!");e&&0===u&&(g+=e,f+=e),u-=a,g-=o-i,f-=o-i}const p=4*l;r[p]=u,r[p+1]=g,r[p+2]=f,r[p+3]=m,l++}this._tokenCount=l}acceptInsertText(e,t,i,n,o,r){const s=0===i&&1===n&&(r>=48&&r<=57||r>=65&&r<=90||r>=97&&r<=122),a=this._tokens,l=this._tokenCount;for(let c=0;c<l;c++){const r=4*c;let l=a[r],h=a[r+1],d=a[r+2];if(!(l<e||l===e&&d<t)){if(l===e&&d===t){if(!s)continue;d+=1}else if(l===e&&h<t&&t<d)0===i?d+=n:d=t;else{if(l===e&&h===t&&s)continue;if(l===e)if(l+=i,0===i)h+=n,d+=n;else{const e=d-h;h=o+(h-t),d=h+e}else l+=i}a[r]=l,a[r+1]=h,a[r+2]=d}}}}class rb{constructor(e){this._tokens=e}getCount(){return this._tokens.length/4}getStartCharacter(e){return this._tokens[4*e+1]}getEndCharacter(e){return this._tokens[4*e+2]}getMetadata(e){return this._tokens[4*e+3]}}class sb{constructor(e,t){this.startLineNumber=e,this.tokens=t,this.endLineNumber=this.startLineNumber+this.tokens.getMaxDeltaLine()}toString(){return this.tokens.toString(this.startLineNumber)}_updateEndLineNumber(){this.endLineNumber=this.startLineNumber+this.tokens.getMaxDeltaLine()}isEmpty(){return this.tokens.isEmpty()}getLineTokens(e){return this.startLineNumber<=e&&e<=this.endLineNumber?this.tokens.getLineTokens(e-this.startLineNumber):null}getRange(){const e=this.tokens.getRange();return e?new Jt(this.startLineNumber+e.startLineNumber,e.startColumn,this.startLineNumber+e.endLineNumber,e.endColumn):e}removeTokens(e){const t=e.startLineNumber-this.startLineNumber,i=e.endLineNumber-this.startLineNumber;this.startLineNumber+=this.tokens.removeTokens(t,e.startColumn-1,i,e.endColumn-1),this._updateEndLineNumber()}split(e){const t=e.startLineNumber-this.startLineNumber,i=e.endLineNumber-this.startLineNumber,[n,o,r]=this.tokens.split(t,e.startColumn-1,i,e.endColumn-1);return[new sb(this.startLineNumber,n),new sb(this.startLineNumber+r,o)]}applyEdit(e,t){const[i,n,o]=eb(t);this.acceptEdit(e,i,n,o,t.length>0?t.charCodeAt(0):0)}acceptEdit(e,t,i,n,o){this._acceptDeleteRange(e),this._acceptInsertText(new Qt(e.startLineNumber,e.startColumn),t,i,n,o),this._updateEndLineNumber()}_acceptDeleteRange(e){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return;const t=e.startLineNumber-this.startLineNumber,i=e.endLineNumber-this.startLineNumber;if(i<0){const e=i-t;return void(this.startLineNumber-=e)}const n=this.tokens.getMaxDeltaLine();if(!(t>=n+1)){if(t<0&&i>=n+1)return this.startLineNumber=0,void this.tokens.clear();if(t<0){const n=-t;this.startLineNumber-=n,this.tokens.acceptDeleteRange(e.startColumn-1,0,0,i,e.endColumn-1)}else this.tokens.acceptDeleteRange(0,t,e.startColumn-1,i,e.endColumn-1)}}_acceptInsertText(e,t,i,n,o){if(0===t&&0===i)return;const r=e.lineNumber-this.startLineNumber;if(r<0)return void(this.startLineNumber+=t);const s=this.tokens.getMaxDeltaLine();r>=s+1||this.tokens.acceptInsertText(r,e.column-1,t,i,n,o)}}class ab{constructor(e,t){this.startLineNumber=e,this.tokens=t}}function lb(e){return e instanceof Uint32Array?e:new Uint32Array(e)}class cb{constructor(){this._pieces=[],this._isComplete=!1}flush(){this._pieces=[],this._isComplete=!1}set(e,t){this._pieces=e||[],this._isComplete=t}setPartial(e,t){let i=e;if(t.length>0){const n=t[0].getRange(),o=t[t.length-1].getRange();if(!n||!o)return e;i=e.plusRange(n).plusRange(o)}let n=null;for(let o=0,r=this._pieces.length;o<r;o++){const e=this._pieces[o];if(e.endLineNumber<i.startLineNumber)continue;if(e.startLineNumber>i.endLineNumber){n=n||{index:o};break}if(e.removeTokens(i),e.isEmpty()){this._pieces.splice(o,1),o--,r--;continue}if(e.endLineNumber<i.startLineNumber)continue;if(e.startLineNumber>i.endLineNumber){n=n||{index:o};continue}const[t,s]=e.split(i);t.isEmpty()?n=n||{index:o}:s.isEmpty()||(this._pieces.splice(o,1,t,s),o++,r++,n=n||{index:o})}return n=n||{index:this._pieces.length},t.length>0&&(this._pieces=Gn(this._pieces,n.index,t)),i}isComplete(){return this._isComplete}addSemanticTokens(e,t){const i=this._pieces;if(0===i.length)return t;const n=cb._findFirstPieceWithLine(i,e),o=i[n].getLineTokens(e);if(!o)return t;const r=t.getCount(),s=o.getCount();let a=0,l=[],c=0,h=0;const d=(e,t)=>{e!==h&&(h=e,l[c++]=e,l[c++]=t)};for(let u=0;u<s;u++){const e=o.getStartCharacter(u),i=o.getEndCharacter(u),n=o.getMetadata(u),s=((1&n?2048:0)|(2&n?4096:0)|(4&n?8192:0)|(8&n?8372224:0)|(16&n?4286578688:0))>>>0,l=~s>>>0;while(a<r&&t.getEndOffset(a)<=e)d(t.getEndOffset(a),t.getMetadata(a)),a++;a<r&&t.getStartOffset(a)<e&&d(e,t.getMetadata(a));while(a<r&&t.getEndOffset(a)<i)d(t.getEndOffset(a),t.getMetadata(a)&l|n&s),a++;if(a<r)d(i,t.getMetadata(a)&l|n&s),t.getEndOffset(a)===i&&a++;else{const e=Math.min(Math.max(0,a-1),r-1);d(i,t.getMetadata(e)&l|n&s)}}while(a<r)d(t.getEndOffset(a),t.getMetadata(a)),a++;return new rd(new Uint32Array(l),t.getLineContent())}static _findFirstPieceWithLine(e,t){let i=0,n=e.length-1;while(i<n){let o=i+Math.floor((n-i)/2);if(e[o].endLineNumber<t)i=o+1;else{if(!(e[o].startLineNumber>t)){while(o>i&&e[o-1].startLineNumber<=t&&t<=e[o-1].endLineNumber)o--;return o}n=o-1}}return i}acceptEdit(e,t,i,n,o){for(const r of this._pieces)r.acceptEdit(e,t,i,n,o)}}class hb{constructor(){this._lineTokens=[],this._len=0}flush(){this._lineTokens=[],this._len=0}getTokens(e,t,i){let n=null;if(t<this._len&&(n=this._lineTokens[t]),null!==n&&n!==ib)return new rd(lb(n),i);let o=new Uint32Array(2);return o[0]=i.length,o[1]=tb(e),new rd(o,i)}static _massageTokens(e,t,i){const n=i?lb(i):null;if(0===t){let t=!1;if(n&&n.length>1&&(t=_l.getLanguageId(n[1])!==e),!t)return ib}if(!n||0===n.length){const i=new Uint32Array(2);return i[0]=t,i[1]=tb(e),i.buffer}return n[n.length-2]=t,0===n.byteOffset&&n.byteLength===n.buffer.byteLength?n.buffer:n}_ensureLine(e){while(e>=this._len)this._lineTokens[this._len]=null,this._len++}_deleteLines(e,t){0!==t&&(e+t>this._len&&(t=this._len-e),this._lineTokens.splice(e,t),this._len-=t)}_insertLines(e,t){if(0===t)return;let i=[];for(let n=0;n<t;n++)i[n]=null;this._lineTokens=Gn(this._lineTokens,e,i),this._len+=t}setTokens(e,t,i,n,o){const r=hb._massageTokens(e,i,n);this._ensureLine(t);const s=this._lineTokens[t];return this._lineTokens[t]=r,!!o&&!hb._equals(s,r)}static _equals(e,t){if(!e||!t)return!e&&!t;const i=lb(e),n=lb(t);if(i.length!==n.length)return!1;for(let o=0,r=i.length;o<r;o++)if(i[o]!==n[o])return!1;return!0}acceptEdit(e,t,i){this._acceptDeleteRange(e),this._acceptInsertText(new Qt(e.startLineNumber,e.startColumn),t,i)}_acceptDeleteRange(e){const t=e.startLineNumber-1;if(t>=this._len)return;if(e.startLineNumber===e.endLineNumber){if(e.startColumn===e.endColumn)return;return void(this._lineTokens[t]=hb._delete(this._lineTokens[t],e.startColumn-1,e.endColumn-1))}this._lineTokens[t]=hb._deleteEnding(this._lineTokens[t],e.startColumn-1);const i=e.endLineNumber-1;let n=null;i<this._len&&(n=hb._deleteBeginning(this._lineTokens[i],e.endColumn-1)),this._lineTokens[t]=hb._append(this._lineTokens[t],n),this._deleteLines(e.startLineNumber,e.endLineNumber-e.startLineNumber)}_acceptInsertText(e,t,i){if(0===t&&0===i)return;const n=e.lineNumber-1;n>=this._len||(0!==t?(this._lineTokens[n]=hb._deleteEnding(this._lineTokens[n],e.column-1),this._lineTokens[n]=hb._insert(this._lineTokens[n],e.column-1,i),this._insertLines(e.lineNumber,t)):this._lineTokens[n]=hb._insert(this._lineTokens[n],e.column-1,i))}static _deleteBeginning(e,t){return null===e||e===ib?e:hb._delete(e,0,t)}static _deleteEnding(e,t){if(null===e||e===ib)return e;const i=lb(e),n=i[i.length-2];return hb._delete(e,t,n)}static _delete(e,t,i){if(null===e||e===ib||t===i)return e;const n=lb(e),o=n.length>>>1;if(0===t&&n[n.length-2]===i)return ib;const r=rd.findIndexInTokensArray(n,t),s=r>0?n[r-1<<1]:0,a=n[r<<1];if(i<a){const s=i-t;for(let e=r;e<o;e++)n[e<<1]-=s;return e}let l,c;s!==t?(n[r<<1]=t,l=r+1<<1,c=t):(l=r<<1,c=s);const h=i-t;for(let u=r+1;u<o;u++){const e=n[u<<1]-h;e>c&&(n[l++]=e,n[l++]=n[1+(u<<1)],c=e)}if(l===n.length)return e;let d=new Uint32Array(l);return d.set(n.subarray(0,l),0),d.buffer}static _append(e,t){if(t===ib)return e;if(e===ib)return t;if(null===e)return e;if(null===t)return null;const i=lb(e),n=lb(t),o=n.length>>>1;let r=new Uint32Array(i.length+n.length);r.set(i,0);let s=i.length;const a=i[i.length-2];for(let l=0;l<o;l++)r[s++]=n[l<<1]+a,r[s++]=n[1+(l<<1)];return r.buffer}static _insert(e,t,i){if(null===e||e===ib)return e;const n=lb(e),o=n.length>>>1;let r=rd.findIndexInTokensArray(n,t);if(r>0){const e=n[r-1<<1];e===t&&r--}for(let s=r;s<o;s++)n[s<<1]+=i;return e}}class db{constructor(e,t,i,n,o,r,s){this._onDidChangeContent=new Ve,this._BOM=t,this._mightContainNonBasicASCII=!r,this._mightContainRTL=n,this._mightContainUnusualLineTerminators=o,this._pieceTree=new J_(e,i,s)}dispose(){this._onDidChangeContent.dispose()}mightContainRTL(){return this._mightContainRTL}mightContainUnusualLineTerminators(){return this._mightContainUnusualLineTerminators}resetMightContainUnusualLineTerminators(){this._mightContainUnusualLineTerminators=!1}mightContainNonBasicASCII(){return this._mightContainNonBasicASCII}getBOM(){return this._BOM}getEOL(){return this._pieceTree.getEOL()}createSnapshot(e){return this._pieceTree.createSnapshot(e?this._BOM:"")}getOffsetAt(e,t){return this._pieceTree.getOffsetAt(e,t)}getPositionAt(e){return this._pieceTree.getPositionAt(e)}getRangeAt(e,t){let i=e+t;const n=this.getPositionAt(e),o=this.getPositionAt(i);return new Jt(n.lineNumber,n.column,o.lineNumber,o.column)}getValueInRange(e,t=0){if(e.isEmpty())return"";const i=this._getEndOfLine(t);return this._pieceTree.getValueInRange(e,i)}getValueLengthInRange(e,t=0){if(e.isEmpty())return 0;if(e.startLineNumber===e.endLineNumber)return e.endColumn-e.startColumn;let i=this.getOffsetAt(e.startLineNumber,e.startColumn),n=this.getOffsetAt(e.endLineNumber,e.endColumn);return n-i}getCharacterCountInRange(e,t=0){if(this._mightContainNonBasicASCII){let i=0;const n=e.startLineNumber,o=e.endLineNumber;for(let t=n;t<=o;t++){const r=this.getLineContent(t),s=t===n?e.startColumn-1:0,a=t===o?e.endColumn-1:r.length;for(let e=s;e<a;e++)yr["D"](r.charCodeAt(e))?(i+=1,e+=1):i+=1}return i+=this._getEndOfLine(t).length*(o-n),i}return this.getValueLengthInRange(e,t)}getLength(){return this._pieceTree.getLength()}getLineCount(){return this._pieceTree.getLineCount()}getLinesContent(){return this._pieceTree.getLinesContent()}getLineContent(e){return this._pieceTree.getLineContent(e)}getLineCharCode(e,t){return this._pieceTree.getLineCharCode(e,t)}getLineLength(e){return this._pieceTree.getLineLength(e)}getLineFirstNonWhitespaceColumn(e){const t=yr["u"](this.getLineContent(e));return-1===t?0:t+1}getLineLastNonWhitespaceColumn(e){const t=yr["H"](this.getLineContent(e));return-1===t?0:t+2}_getEndOfLine(e){switch(e){case 1:return"\n";case 2:return"\r\n";case 0:return this.getEOL();default:throw new Error("Unknown EOL preference")}}setEOL(e){this._pieceTree.setEOL(e)}applyEdits(e,t,i){let n=this._mightContainRTL,o=this._mightContainUnusualLineTerminators,r=this._mightContainNonBasicASCII,s=!0,a=[];for(let f=0;f<e.length;f++){let t=e[f];s&&t._isTracked&&(s=!1);let i=t.range;if(t.text){let e=!0;r||(e=!yr["z"](t.text),r=e),!n&&e&&(n=yr["l"](t.text)),!o&&e&&(o=yr["m"](t.text))}let l="",c=0,h=0,d=0;if(t.text){let e;[c,h,d,e]=eb(t.text);const i=this.getEOL(),n="\r\n"===i?2:1;l=0===e||e===n?t.text:t.text.replace(/\r\n|\r|\n/g,i)}a[f]={sortIndex:f,identifier:t.identifier||null,range:i,rangeOffset:this.getOffsetAt(i.startLineNumber,i.startColumn),rangeLength:this.getValueLengthInRange(i),text:l,eolCount:c,firstLineLength:h,lastLineLength:d,forceMoveMarkers:Boolean(t.forceMoveMarkers),isAutoWhitespaceEdit:t.isAutoWhitespaceEdit||!1}}a.sort(db._sortOpsAscending);let l=!1;for(let f=0,m=a.length-1;f<m;f++){let e=a[f].range.getEndPosition(),t=a[f+1].range.getStartPosition();if(t.isBeforeOrEqual(e)){if(t.isBefore(e))throw new Error("Overlapping ranges are not allowed!");l=!0}}s&&(a=this._reduceOperations(a));let c=i||t?db._getInverseEditRanges(a):[],h=[];if(t)for(let f=0;f<a.length;f++){let e=a[f],t=c[f];if(e.isAutoWhitespaceEdit&&e.range.isEmpty())for(let i=t.startLineNumber;i<=t.endLineNumber;i++){let n="";i===t.startLineNumber&&(n=this.getLineContent(e.range.startLineNumber),-1!==yr["u"](n))||h.push({lineNumber:i,oldContent:n})}}let d=null;if(i){let e=0;d=[];for(let t=0;t<a.length;t++){const i=a[t],n=c[t],o=this.getValueInRange(i.range),r=i.rangeOffset+e;e+=i.text.length-o.length,d[t]={sortIndex:i.sortIndex,identifier:i.identifier,range:n,text:o,textChange:new Sp(i.rangeOffset,o,r,i.text)}}l||d.sort((e,t)=>e.sortIndex-t.sortIndex)}this._mightContainRTL=n,this._mightContainUnusualLineTerminators=o,this._mightContainNonBasicASCII=r;const u=this._doApplyEdits(a);let g=null;if(t&&h.length>0){h.sort((e,t)=>t.lineNumber-e.lineNumber),g=[];for(let e=0,t=h.length;e<t;e++){let t=h[e].lineNumber;if(e>0&&h[e-1].lineNumber===t)continue;let i=h[e].oldContent,n=this.getLineContent(t);0!==n.length&&n!==i&&-1===yr["u"](n)&&g.push(t)}}return this._onDidChangeContent.fire(),new ks(d,u,g)}_reduceOperations(e){return e.length<1e3?e:[this._toSingleEditOperation(e)]}_toSingleEditOperation(e){let t=!1;const i=e[0].range,n=e[e.length-1].range,o=new Jt(i.startLineNumber,i.startColumn,n.endLineNumber,n.endColumn);let r=i.startLineNumber,s=i.startColumn;const a=[];for(let u=0,g=e.length;u<g;u++){const i=e[u],n=i.range;t=t||i.forceMoveMarkers,a.push(this.getValueInRange(new Jt(r,s,n.startLineNumber,n.startColumn))),i.text.length>0&&a.push(i.text),r=n.endLineNumber,s=n.endColumn}const l=a.join(""),[c,h,d]=eb(l);return{sortIndex:0,identifier:e[0].identifier,range:o,rangeOffset:this.getOffsetAt(o.startLineNumber,o.startColumn),rangeLength:this.getValueLengthInRange(o,0),text:l,eolCount:c,firstLineLength:h,lastLineLength:d,forceMoveMarkers:t,isAutoWhitespaceEdit:!1}}_doApplyEdits(e){e.sort(db._sortOpsDescending);let t=[];for(let i=0;i<e.length;i++){let n=e[i];const o=n.range.startLineNumber,r=n.range.startColumn,s=n.range.endLineNumber,a=n.range.endColumn;if(o===s&&r===a&&0===n.text.length)continue;n.text?(this._pieceTree.delete(n.rangeOffset,n.rangeLength),this._pieceTree.insert(n.rangeOffset,n.text,!0)):this._pieceTree.delete(n.rangeOffset,n.rangeLength);const l=new Jt(o,r,s,a);t.push({range:l,rangeLength:n.rangeLength,text:n.text,rangeOffset:n.rangeOffset,forceMoveMarkers:n.forceMoveMarkers})}return t}findMatchesLineByLine(e,t,i,n){return this._pieceTree.findMatchesLineByLine(e,t,i,n)}static _getInverseEditRanges(e){let t=[],i=0,n=0,o=null;for(let r=0,s=e.length;r<s;r++){let s,a,l,c=e[r];if(o?o.range.endLineNumber===c.range.startLineNumber?(s=i,a=n+(c.range.startColumn-o.range.endColumn)):(s=i+(c.range.startLineNumber-o.range.endLineNumber),a=c.range.startColumn):(s=c.range.startLineNumber,a=c.range.startColumn),c.text.length>0){const e=c.eolCount+1;l=1===e?new Jt(s,a,s,a+c.firstLineLength):new Jt(s,a,s+e-1,c.lastLineLength+1)}else l=new Jt(s,a,s,a);i=l.endLineNumber,n=l.endColumn,t.push(l),o=c}return t}static _sortOpsAscending(e,t){let i=Jt.compareRangesUsingEnds(e.range,t.range);return 0===i?e.sortIndex-t.sortIndex:i}static _sortOpsDescending(e,t){let i=Jt.compareRangesUsingEnds(e.range,t.range);return 0===i?t.sortIndex-e.sortIndex:-i}}class ub{constructor(e,t,i,n,o,r,s,a,l){this._chunks=e,this._bom=t,this._cr=i,this._lf=n,this._crlf=o,this._containsRTL=r,this._containsUnusualLineTerminators=s,this._isBasicASCII=a,this._normalizeEOL=l}_getEOL(e){const t=this._cr+this._lf+this._crlf,i=this._cr+this._crlf;return 0===t?1===e?"\n":"\r\n":i>t/2?"\r\n":"\n"}create(e){const t=this._getEOL(e);let i=this._chunks;if(this._normalizeEOL&&("\r\n"===t&&(this._cr>0||this._lf>0)||"\n"===t&&(this._cr>0||this._crlf>0)))for(let n=0,o=i.length;n<o;n++){let e=i[n].buffer.replace(/\r\n|\r|\n/g,t),o=$_(e);i[n]=new X_(e,o)}return new db(i,this._bom,t,this._containsRTL,this._containsUnusualLineTerminators,this._isBasicASCII,this._normalizeEOL)}}class gb{constructor(){this.chunks=[],this.BOM="",this._hasPreviousChar=!1,this._previousChar=0,this._tmpLineStarts=[],this.cr=0,this.lf=0,this.crlf=0,this.containsRTL=!1,this.containsUnusualLineTerminators=!1,this.isBasicASCII=!0}acceptChunk(e){if(0===e.length)return;0===this.chunks.length&&yr["R"](e)&&(this.BOM=yr["b"],e=e.substr(1));const t=e.charCodeAt(e.length-1);13===t||t>=55296&&t<=56319?(this._acceptChunk1(e.substr(0,e.length-1),!1),this._hasPreviousChar=!0,this._previousChar=t):(this._acceptChunk1(e,!1),this._hasPreviousChar=!1,this._previousChar=t)}_acceptChunk1(e,t){(t||0!==e.length)&&(this._hasPreviousChar?this._acceptChunk2(String.fromCharCode(this._previousChar)+e):this._acceptChunk2(e))}_acceptChunk2(e){const t=G_(this._tmpLineStarts,e);this.chunks.push(new X_(e,t.lineStarts)),this.cr+=t.cr,this.lf+=t.lf,this.crlf+=t.crlf,this.isBasicASCII&&(this.isBasicASCII=t.isBasicASCII),this.isBasicASCII||this.containsRTL||(this.containsRTL=yr["l"](e)),this.isBasicASCII||this.containsUnusualLineTerminators||(this.containsUnusualLineTerminators=yr["m"](e))}finish(e=!0){return this._finish(),new ub(this.chunks,this.BOM,this.cr,this.lf,this.crlf,this.containsRTL,this.containsUnusualLineTerminators,this.isBasicASCII,e)}_finish(){if(0===this.chunks.length&&this._acceptChunk1("",!0),this._hasPreviousChar){this._hasPreviousChar=!1;let e=this.chunks[this.chunks.length-1];e.buffer+=String.fromCharCode(this._previousChar);let t=$_(e.buffer);e.lineStarts=t,13===this._previousChar&&this.cr++}}}class fb{constructor(){this.changeType=1}}class mb{constructor(e,t){this.changeType=2,this.lineNumber=e,this.detail=t}}class pb{constructor(e,t){this.changeType=3,this.fromLineNumber=e,this.toLineNumber=t}}class _b{constructor(e,t,i){this.changeType=4,this.fromLineNumber=e,this.toLineNumber=t,this.detail=i}}class bb{constructor(){this.changeType=5}}class vb{constructor(e,t,i,n){this.changes=e,this.versionId=t,this.isUndoing=i,this.isRedoing=n,this.resultingSelection=null}containsEvent(e){for(let t=0,i=this.changes.length;t<i;t++){const i=this.changes[t];if(i.changeType===e)return!0}return!1}static merge(e,t){const i=[].concat(e.changes).concat(t.changes),n=t.versionId,o=e.isUndoing||t.isUndoing,r=e.isRedoing||t.isRedoing;return new vb(i,n,o,r)}}class wb{constructor(e,t){this.rawContentChangedEvent=e,this.contentChangedEvent=t}merge(e){const t=vb.merge(this.rawContentChangedEvent,e.rawContentChangedEvent),i=wb._mergeChangeEvents(this.contentChangedEvent,e.contentChangedEvent);return new wb(t,i)}static _mergeChangeEvents(e,t){const i=[].concat(e.changes).concat(t.changes),n=t.eol,o=t.versionId,r=e.isUndoing||t.isUndoing,s=e.isRedoing||t.isRedoing,a=e.isFlush||t.isFlush;return{changes:i,eol:n,versionId:o,isUndoing:r,isRedoing:s,isFlush:a}}}class Cb{constructor(){this._beginState=[],this._valid=[],this._len=0,this._invalidLineStartIndex=0}_reset(e){this._beginState=[],this._valid=[],this._len=0,this._invalidLineStartIndex=0,e&&this._setBeginState(0,e)}flush(e){this._reset(e)}get invalidLineStartIndex(){return this._invalidLineStartIndex}_invalidateLine(e){e<this._len&&(this._valid[e]=!1),e<this._invalidLineStartIndex&&(this._invalidLineStartIndex=e)}_isValid(e){return e<this._len&&this._valid[e]}getBeginState(e){return e<this._len?this._beginState[e]:null}_ensureLine(e){while(e>=this._len)this._beginState[this._len]=null,this._valid[this._len]=!1,this._len++}_deleteLines(e,t){0!==t&&(e+t>this._len&&(t=this._len-e),this._beginState.splice(e,t),this._valid.splice(e,t),this._len-=t)}_insertLines(e,t){if(0===t)return;let i=[],n=[];for(let o=0;o<t;o++)i[o]=null,n[o]=!1;this._beginState=Gn(this._beginState,e,i),this._valid=Gn(this._valid,e,n),this._len+=t}_setValid(e,t){this._ensureLine(e),this._valid[e]=t}_setBeginState(e,t){this._ensureLine(e),this._beginState[e]=t}setEndState(e,t,i){if(this._setValid(t,!0),this._invalidLineStartIndex=t+1,t===e-1)return;const n=this.getBeginState(t+1);if(null===n||!i.equals(n))return this._setBeginState(t+1,i),void this._invalidateLine(t+1);let o=t+1;while(o<e){if(!this._isValid(o))break;o++}this._invalidLineStartIndex=o}setFakeTokens(e){this._setValid(e,!1)}applyEdits(e,t){const i=e.endLineNumber-e.startLineNumber,n=t,o=Math.min(i,n);for(let r=o;r>=0;r--)this._invalidateLine(e.startLineNumber+r-1);this._acceptDeleteRange(e),this._acceptInsertText(new Qt(e.startLineNumber,e.startColumn),t)}_acceptDeleteRange(e){const t=e.startLineNumber-1;t>=this._len||this._deleteLines(e.startLineNumber,e.endLineNumber-e.startLineNumber)}_acceptInsertText(e,t){const i=e.lineNumber-1;i>=this._len||this._insertLines(e.lineNumber,t)}}class yb extends Oe{constructor(e){super(),this._isDisposed=!1,this._textModel=e,this._tokenizationStateStore=new Cb,this._tokenizationSupport=null,this._register(Kl.onDidChange(e=>{const t=this._textModel.getLanguageIdentifier();-1!==e.changedLanguages.indexOf(t.language)&&(this._resetTokenizationState(),this._textModel.clearTokens())})),this._register(this._textModel.onDidChangeRawContentFast(e=>{e.containsEvent(1)&&this._resetTokenizationState()})),this._register(this._textModel.onDidChangeContentFast(e=>{for(let t=0,i=e.changes.length;t<i;t++){const i=e.changes[t],[n]=eb(i.text);this._tokenizationStateStore.applyEdits(i.range,n)}this._beginBackgroundTokenization()})),this._register(this._textModel.onDidChangeAttached(()=>{this._beginBackgroundTokenization()})),this._register(this._textModel.onDidChangeLanguage(()=>{this._resetTokenizationState(),this._textModel.clearTokens()})),this._resetTokenizationState()}dispose(){this._isDisposed=!0,super.dispose()}_resetTokenizationState(){const[e,t]=Sb(this._textModel);this._tokenizationSupport=e,this._tokenizationStateStore.flush(t),this._beginBackgroundTokenization()}_beginBackgroundTokenization(){this._textModel.isAttachedToEditor()&&this._hasLinesToTokenize()&&r["j"](()=>{this._isDisposed||this._revalidateTokensNow()})}_revalidateTokensNow(e=this._textModel.getLineCount()){const t=1,i=new nb,n=Uh.create(!1);while(this._hasLinesToTokenize()){if(n.elapsed()>t)break;const o=this._tokenizeOneInvalidLine(i);if(o>=e)break}this._beginBackgroundTokenization(),this._textModel.setTokens(i.tokens)}tokenizeViewport(e,t){const i=new nb;this._tokenizeViewport(i,e,t),this._textModel.setTokens(i.tokens)}reset(){this._resetTokenizationState(),this._textModel.clearTokens()}forceTokenization(e){const t=new nb;this._updateTokensUntilLine(t,e),this._textModel.setTokens(t.tokens)}isCheapToTokenize(e){if(!this._tokenizationSupport)return!0;const t=this._tokenizationStateStore.invalidLineStartIndex+1;return!(e>t)&&(e<t||this._textModel.getLineLength(e)<2048)}_hasLinesToTokenize(){return!!this._tokenizationSupport&&this._tokenizationStateStore.invalidLineStartIndex<this._textModel.getLineCount()}_tokenizeOneInvalidLine(e){if(!this._hasLinesToTokenize())return this._textModel.getLineCount()+1;const t=this._tokenizationStateStore.invalidLineStartIndex+1;return this._updateTokensUntilLine(e,t),t}_updateTokensUntilLine(e,t){if(!this._tokenizationSupport)return;const i=this._textModel.getLanguageIdentifier(),n=this._textModel.getLineCount(),o=t-1;for(let r=this._tokenizationStateStore.invalidLineStartIndex;r<=o;r++){const t=this._textModel.getLineContent(r+1),o=this._tokenizationStateStore.getBeginState(r),s=xb(i,this._tokenizationSupport,t,o);e.add(r+1,s.tokens),this._tokenizationStateStore.setEndState(n,r,s.endState),r=this._tokenizationStateStore.invalidLineStartIndex-1}}_tokenizeViewport(e,t,i){if(!this._tokenizationSupport)return;if(i<=this._tokenizationStateStore.invalidLineStartIndex)return;if(t<=this._tokenizationStateStore.invalidLineStartIndex)return void this._updateTokensUntilLine(e,i);let n=this._textModel.getLineFirstNonWhitespaceColumn(t),o=[],r=null;for(let l=t-1;n>0&&l>=1;l--){let e=this._textModel.getLineFirstNonWhitespaceColumn(l);if(0!==e&&e<n){if(r=this._tokenizationStateStore.getBeginState(l-1),r)break;o.push(this._textModel.getLineContent(l)),n=e}}r||(r=this._tokenizationSupport.getInitialState());const s=this._textModel.getLanguageIdentifier();let a=r;for(let l=o.length-1;l>=0;l--){let e=xb(s,this._tokenizationSupport,o[l],a);a=e.endState}for(let l=t;l<=i;l++){let t=this._textModel.getLineContent(l),i=xb(s,this._tokenizationSupport,t,a);e.add(l,i.tokens),this._tokenizationStateStore.setFakeTokens(l-1),a=i.endState}}}function Sb(e){const t=e.getLanguageIdentifier();let i=e.isTooLargeForTokenization()?null:Kl.get(t.language),n=null;if(i)try{n=i.getInitialState()}catch(o){me(o),i=null}return[i,n]}function xb(e,t,i,n){let o=null;if(t)try{o=t.tokenize2(i,n.clone(),0)}catch(r){me(r)}return o||(o=Zl(e.id,i,n,0)),rd.convertToEndOffset(o.tokens,i.length),o}function Lb(e,t){const i=Math.pow(10,t);return Math.round(e*i)/i}class kb{constructor(e,t,i,n=1){this.r=0|Math.min(255,Math.max(0,e)),this.g=0|Math.min(255,Math.max(0,t)),this.b=0|Math.min(255,Math.max(0,i)),this.a=Lb(Math.max(Math.min(1,n),0),3)}static equals(e,t){return e.r===t.r&&e.g===t.g&&e.b===t.b&&e.a===t.a}}class Eb{constructor(e,t,i,n){this.h=0|Math.max(Math.min(360,e),0),this.s=Lb(Math.max(Math.min(1,t),0),3),this.l=Lb(Math.max(Math.min(1,i),0),3),this.a=Lb(Math.max(Math.min(1,n),0),3)}static equals(e,t){return e.h===t.h&&e.s===t.s&&e.l===t.l&&e.a===t.a}static fromRGBA(e){const t=e.r/255,i=e.g/255,n=e.b/255,o=e.a,r=Math.max(t,i,n),s=Math.min(t,i,n);let a=0,l=0;const c=(s+r)/2,h=r-s;if(h>0){switch(l=Math.min(c<=.5?h/(2*c):h/(2-2*c),1),r){case t:a=(i-n)/h+(i<n?6:0);break;case i:a=(n-t)/h+2;break;case n:a=(t-i)/h+4;break}a*=60,a=Math.round(a)}return new Eb(a,l,c,o)}static _hue2rgb(e,t,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?e+6*(t-e)*i:i<.5?t:i<2/3?e+(t-e)*(2/3-i)*6:e}static toRGBA(e){const t=e.h/360,{s:i,l:n,a:o}=e;let r,s,a;if(0===i)r=s=a=n;else{const e=n<.5?n*(1+i):n+i-n*i,o=2*n-e;r=Eb._hue2rgb(o,e,t+1/3),s=Eb._hue2rgb(o,e,t),a=Eb._hue2rgb(o,e,t-1/3)}return new kb(Math.round(255*r),Math.round(255*s),Math.round(255*a),o)}}class Db{constructor(e,t,i,n){this.h=0|Math.max(Math.min(360,e),0),this.s=Lb(Math.max(Math.min(1,t),0),3),this.v=Lb(Math.max(Math.min(1,i),0),3),this.a=Lb(Math.max(Math.min(1,n),0),3)}static equals(e,t){return e.h===t.h&&e.s===t.s&&e.v===t.v&&e.a===t.a}static fromRGBA(e){const t=e.r/255,i=e.g/255,n=e.b/255,o=Math.max(t,i,n),r=Math.min(t,i,n),s=o-r,a=0===o?0:s/o;let l;return l=0===s?0:o===t?((i-n)/s%6+6)%6:o===i?(n-t)/s+2:(t-i)/s+4,new Db(Math.round(60*l),a,o,e.a)}static toRGBA(e){const{h:t,s:i,v:n,a:o}=e,r=n*i,s=r*(1-Math.abs(t/60%2-1)),a=n-r;let[l,c,h]=[0,0,0];return t<60?(l=r,c=s):t<120?(l=s,c=r):t<180?(c=r,h=s):t<240?(c=s,h=r):t<300?(l=s,h=r):t<360&&(l=r,h=s),l=Math.round(255*(l+a)),c=Math.round(255*(c+a)),h=Math.round(255*(h+a)),new kb(l,c,h,o)}}class Nb{constructor(e){if(!e)throw new Error("Color needs a value");if(e instanceof kb)this.rgba=e;else if(e instanceof Eb)this._hsla=e,this.rgba=Eb.toRGBA(e);else{if(!(e instanceof Db))throw new Error("Invalid color ctor argument");this._hsva=e,this.rgba=Db.toRGBA(e)}}static fromHex(e){return Nb.Format.CSS.parseHex(e)||Nb.red}get hsla(){return this._hsla?this._hsla:Eb.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:Db.fromRGBA(this.rgba)}equals(e){return!!e&&kb.equals(this.rgba,e.rgba)&&Eb.equals(this.hsla,e.hsla)&&Db.equals(this.hsva,e.hsva)}getRelativeLuminance(){const e=Nb._relativeLuminanceForComponent(this.rgba.r),t=Nb._relativeLuminanceForComponent(this.rgba.g),i=Nb._relativeLuminanceForComponent(this.rgba.b),n=.2126*e+.7152*t+.0722*i;return Lb(n,4)}static _relativeLuminanceForComponent(e){const t=e/255;return t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)}isLighter(){const e=(299*this.rgba.r+587*this.rgba.g+114*this.rgba.b)/1e3;return e>=128}isLighterThan(e){const t=this.getRelativeLuminance(),i=e.getRelativeLuminance();return t>i}isDarkerThan(e){const t=this.getRelativeLuminance(),i=e.getRelativeLuminance();return t<i}lighten(e){return new Nb(new Eb(this.hsla.h,this.hsla.s,this.hsla.l+this.hsla.l*e,this.hsla.a))}darken(e){return new Nb(new Eb(this.hsla.h,this.hsla.s,this.hsla.l-this.hsla.l*e,this.hsla.a))}transparent(e){const{r:t,g:i,b:n,a:o}=this.rgba;return new Nb(new kb(t,i,n,o*e))}isTransparent(){return 0===this.rgba.a}isOpaque(){return 1===this.rgba.a}opposite(){return new Nb(new kb(255-this.rgba.r,255-this.rgba.g,255-this.rgba.b,this.rgba.a))}toString(){return""+Nb.Format.CSS.format(this)}static getLighterColor(e,t,i){if(e.isLighterThan(t))return e;i=i||.5;const n=e.getRelativeLuminance(),o=t.getRelativeLuminance();return i=i*(o-n)/o,e.lighten(i)}static getDarkerColor(e,t,i){if(e.isDarkerThan(t))return e;i=i||.5;const n=e.getRelativeLuminance(),o=t.getRelativeLuminance();return i=i*(n-o)/n,e.darken(i)}}function Tb(){return new gb}function Mb(e){const t=Tb();return t.acceptChunk(e),t.finish()}function Ib(e,t){const i="string"===typeof e?Mb(e):e;return i.create(t)}Nb.white=new Nb(new kb(255,255,255,1)),Nb.black=new Nb(new kb(0,0,0,1)),Nb.red=new Nb(new kb(255,0,0,1)),Nb.blue=new Nb(new kb(0,0,255,1)),Nb.cyan=new Nb(new kb(0,255,255,1)),Nb.lightgrey=new Nb(new kb(211,211,211,1)),Nb.transparent=new Nb(new kb(0,0,0,0)),function(e){let t;(function(t){let i;(function(t){function i(t){return 1===t.rgba.a?`rgb(${t.rgba.r}, ${t.rgba.g}, ${t.rgba.b})`:e.Format.CSS.formatRGBA(t)}function n(e){return`rgba(${e.rgba.r}, ${e.rgba.g}, ${e.rgba.b}, ${+e.rgba.a.toFixed(2)})`}function o(t){return 1===t.hsla.a?`hsl(${t.hsla.h}, ${(100*t.hsla.s).toFixed(2)}%, ${(100*t.hsla.l).toFixed(2)}%)`:e.Format.CSS.formatHSLA(t)}function r(e){return`hsla(${e.hsla.h}, ${(100*e.hsla.s).toFixed(2)}%, ${(100*e.hsla.l).toFixed(2)}%, ${e.hsla.a.toFixed(2)})`}function s(e){const t=e.toString(16);return 2!==t.length?"0"+t:t}function a(e){return`#${s(e.rgba.r)}${s(e.rgba.g)}${s(e.rgba.b)}`}function l(t,i=!1){return i&&1===t.rgba.a?e.Format.CSS.formatHex(t):`#${s(t.rgba.r)}${s(t.rgba.g)}${s(t.rgba.b)}${s(Math.round(255*t.rgba.a))}`}function c(t){return t.isOpaque()?e.Format.CSS.formatHex(t):e.Format.CSS.formatRGBA(t)}function h(t){const i=t.length;if(0===i)return null;if(35!==t.charCodeAt(0))return null;if(7===i){const i=16*d(t.charCodeAt(1))+d(t.charCodeAt(2)),n=16*d(t.charCodeAt(3))+d(t.charCodeAt(4)),o=16*d(t.charCodeAt(5))+d(t.charCodeAt(6));return new e(new kb(i,n,o,1))}if(9===i){const i=16*d(t.charCodeAt(1))+d(t.charCodeAt(2)),n=16*d(t.charCodeAt(3))+d(t.charCodeAt(4)),o=16*d(t.charCodeAt(5))+d(t.charCodeAt(6)),r=16*d(t.charCodeAt(7))+d(t.charCodeAt(8));return new e(new kb(i,n,o,r/255))}if(4===i){const i=d(t.charCodeAt(1)),n=d(t.charCodeAt(2)),o=d(t.charCodeAt(3));return new e(new kb(16*i+i,16*n+n,16*o+o))}if(5===i){const i=d(t.charCodeAt(1)),n=d(t.charCodeAt(2)),o=d(t.charCodeAt(3)),r=d(t.charCodeAt(4));return new e(new kb(16*i+i,16*n+n,16*o+o,(16*r+r)/255))}return null}function d(e){switch(e){case 48:return 0;case 49:return 1;case 50:return 2;case 51:return 3;case 52:return 4;case 53:return 5;case 54:return 6;case 55:return 7;case 56:return 8;case 57:return 9;case 97:return 10;case 65:return 10;case 98:return 11;case 66:return 11;case 99:return 12;case 67:return 12;case 100:return 13;case 68:return 13;case 101:return 14;case 69:return 14;case 102:return 15;case 70:return 15}return 0}t.formatRGB=i,t.formatRGBA=n,t.formatHSL=o,t.formatHSLA=r,t.formatHex=a,t.formatHexA=l,t.format=c,t.parseHex=h})(i=t.CSS||(t.CSS={}))})(t=e.Format||(e.Format={}))}(Nb||(Nb={}));let Ob=0;const Ab=999,Rb=1e4;class Pb{constructor(e){this._source=e,this._eos=!1}read(){if(this._eos)return null;let e=[],t=0,i=0;do{let n=this._source.read();if(null===n)return this._eos=!0,0===t?null:e.join("");if(n.length>0&&(e[t++]=n,i+=n.length),i>=65536)return e.join("")}while(1)}}const Fb=()=>{throw new Error("Invalid change accessor")};class Wb{constructor(){this._searchCanceledBrand=void 0}}function Bb(e){return e instanceof Wb?null:e}Wb.INSTANCE=new Wb;class Vb extends Oe{constructor(e,t,i,n=null,o){super(),this._onWillDispose=this._register(new Ve),this.onWillDispose=this._onWillDispose.event,this._onDidChangeDecorations=this._register(new Yb),this.onDidChangeDecorations=this._onDidChangeDecorations.event,this._onDidChangeLanguage=this._register(new Ve),this.onDidChangeLanguage=this._onDidChangeLanguage.event,this._onDidChangeLanguageConfiguration=this._register(new Ve),this.onDidChangeLanguageConfiguration=this._onDidChangeLanguageConfiguration.event,this._onDidChangeTokens=this._register(new Ve),this.onDidChangeTokens=this._onDidChangeTokens.event,this._onDidChangeOptions=this._register(new Ve),this.onDidChangeOptions=this._onDidChangeOptions.event,this._onDidChangeAttached=this._register(new Ve),this.onDidChangeAttached=this._onDidChangeAttached.event,this._eventEmitter=this._register(new Xb),Ob++,this.id="$model"+Ob,this.isForSimpleWidget=t.isForSimpleWidget,this._associatedResource="undefined"===typeof n||null===n?Ht.parse("inmemory://model/"+Ob):n,this._undoRedoService=o,this._attachedEditorCount=0,this._buffer=Ib(e,t.defaultEOL),this._options=Vb.resolveOptions(this._buffer,t);const r=this._buffer.getLineCount(),s=this._buffer.getValueLengthInRange(new Jt(1,1,r,this._buffer.getLineLength(r)+1),0);t.largeFileOptimizations?this._isTooLargeForTokenization=s>Vb.LARGE_FILE_SIZE_THRESHOLD||r>Vb.LARGE_FILE_LINE_COUNT_THRESHOLD:this._isTooLargeForTokenization=!1,this._isTooLargeForSyncing=s>Vb.MODEL_SYNC_LIMIT,this._versionId=1,this._alternativeVersionId=1,this._initialUndoRedoSnapshot=null,this._isDisposed=!1,this._isDisposing=!1,this._languageIdentifier=i||Yl,this._languageRegistryListener=Kc.onDidChange(e=>{e.languageIdentifier.id===this._languageIdentifier.id&&this._onDidChangeLanguageConfiguration.fire({})}),this._instanceId=yr["O"](Ob),this._lastDecorationId=0,this._decorations=Object.create(null),this._decorationsTree=new Hb,this._commandManager=new Ip(this,o),this._isUndoing=!1,this._isRedoing=!1,this._trimAutoWhitespaceLines=null,this._tokens=new hb,this._tokens2=new cb,this._tokenization=new yb(this)}static resolveOptions(e,t){if(t.detectIndentation){const i=Rp(e,t.tabSize,t.insertSpaces);return new Ss({tabSize:i.tabSize,indentSize:i.tabSize,insertSpaces:i.insertSpaces,trimAutoWhitespace:t.trimAutoWhitespace,defaultEOL:t.defaultEOL})}return new Ss({tabSize:t.tabSize,indentSize:t.indentSize,insertSpaces:t.insertSpaces,trimAutoWhitespace:t.trimAutoWhitespace,defaultEOL:t.defaultEOL})}onDidChangeRawContentFast(e){return this._eventEmitter.fastEvent(t=>e(t.rawContentChangedEvent))}onDidChangeContentFast(e){return this._eventEmitter.fastEvent(t=>e(t.contentChangedEvent))}onDidChangeContent(e){return this._eventEmitter.slowEvent(t=>e(t.contentChangedEvent))}dispose(){this._isDisposing=!0,this._onWillDispose.fire(),this._languageRegistryListener.dispose(),this._tokenization.dispose(),this._isDisposed=!0,super.dispose(),this._isDisposing=!1}_assertNotDisposed(){if(this._isDisposed)throw new Error("Model is disposed!")}_emitContentChangedEvent(e,t){this._isDisposing||this._eventEmitter.fire(new wb(e,t))}setValue(e){if(this._assertNotDisposed(),null===e)return;const t=Ib(e,this._options.defaultEOL);this.setValueFromTextBuffer(t)}_createContentChanged2(e,t,i,n,o,r,s){return{changes:[{range:e,rangeOffset:t,rangeLength:i,text:n}],eol:this._buffer.getEOL(),versionId:this.getVersionId(),isUndoing:o,isRedoing:r,isFlush:s}}setValueFromTextBuffer(e){if(this._assertNotDisposed(),null===e)return;const t=this.getFullModelRange(),i=this.getValueLengthInRange(t),n=this.getLineCount(),o=this.getLineMaxColumn(n);this._buffer=e,this._increaseVersionId(),this._tokens.flush(),this._tokens2.flush(),this._decorations=Object.create(null),this._decorationsTree=new Hb,this._commandManager.clear(),this._trimAutoWhitespaceLines=null,this._emitContentChangedEvent(new vb([new fb],this._versionId,!1,!1),this._createContentChanged2(new Jt(1,1,n,o),0,i,this.getValue(),!1,!1,!0))}setEOL(e){this._assertNotDisposed();const t=1===e?"\r\n":"\n";if(this._buffer.getEOL()===t)return;const i=this.getFullModelRange(),n=this.getValueLengthInRange(i),o=this.getLineCount(),r=this.getLineMaxColumn(o);this._onBeforeEOLChange(),this._buffer.setEOL(t),this._increaseVersionId(),this._onAfterEOLChange(),this._emitContentChangedEvent(new vb([new bb],this._versionId,!1,!1),this._createContentChanged2(new Jt(1,1,o,r),0,n,this.getValue(),!1,!1,!1))}_onBeforeEOLChange(){const e=this.getVersionId(),t=this._decorationsTree.search(0,!1,!1,e);this._ensureNodesHaveRanges(t)}_onAfterEOLChange(){const e=this.getVersionId(),t=this._decorationsTree.collectNodesPostOrder();for(let i=0,n=t.length;i<n;i++){const n=t[i],o=n.cachedAbsoluteStart-n.start,r=this._buffer.getOffsetAt(n.range.startLineNumber,n.range.startColumn),s=this._buffer.getOffsetAt(n.range.endLineNumber,n.range.endColumn);n.cachedAbsoluteStart=r,n.cachedAbsoluteEnd=s,n.cachedVersionId=e,n.start=r-o,n.end=s-o,f_(n)}}onBeforeAttached(){this._attachedEditorCount++,1===this._attachedEditorCount&&this._onDidChangeAttached.fire(void 0)}onBeforeDetached(){this._attachedEditorCount--,0===this._attachedEditorCount&&this._onDidChangeAttached.fire(void 0)}isAttachedToEditor(){return this._attachedEditorCount>0}getAttachedEditorCount(){return this._attachedEditorCount}isTooLargeForSyncing(){return this._isTooLargeForSyncing}isTooLargeForTokenization(){return this._isTooLargeForTokenization}isDisposed(){return this._isDisposed}isDominatedByLongLines(){if(this._assertNotDisposed(),this.isTooLargeForTokenization())return!1;let e=0,t=0;const i=this._buffer.getLineCount();for(let n=1;n<=i;n++){const i=this._buffer.getLineLength(n);i>=Rb?t+=i:e+=i}return t>e}get uri(){return this._associatedResource}getOptions(){return this._assertNotDisposed(),this._options}getFormattingOptions(){return{tabSize:this._options.indentSize,insertSpaces:this._options.insertSpaces}}updateOptions(e){this._assertNotDisposed();let t="undefined"!==typeof e.tabSize?e.tabSize:this._options.tabSize,i="undefined"!==typeof e.indentSize?e.indentSize:this._options.indentSize,n="undefined"!==typeof e.insertSpaces?e.insertSpaces:this._options.insertSpaces,o="undefined"!==typeof e.trimAutoWhitespace?e.trimAutoWhitespace:this._options.trimAutoWhitespace,r=new Ss({tabSize:t,indentSize:i,insertSpaces:n,defaultEOL:this._options.defaultEOL,trimAutoWhitespace:o});if(this._options.equals(r))return;let s=this._options.createChangeEvent(r);this._options=r,this._onDidChangeOptions.fire(s)}detectIndentation(e,t){this._assertNotDisposed();let i=Rp(this._buffer,t,e);this.updateOptions({insertSpaces:i.insertSpaces,tabSize:i.tabSize,indentSize:i.tabSize})}static _normalizeIndentationFromWhitespace(e,t,i){let n=0;for(let r=0;r<e.length;r++)"\t"===e.charAt(r)?n+=t:n++;let o="";if(!i){let e=Math.floor(n/t);n%=t;for(let t=0;t<e;t++)o+="\t"}for(let r=0;r<n;r++)o+=" ";return o}static normalizeIndentation(e,t,i){let n=yr["u"](e);return-1===n&&(n=e.length),Vb._normalizeIndentationFromWhitespace(e.substring(0,n),t,i)+e.substring(n)}normalizeIndentation(e){return this._assertNotDisposed(),Vb.normalizeIndentation(e,this._options.indentSize,this._options.insertSpaces)}getVersionId(){return this._assertNotDisposed(),this._versionId}mightContainRTL(){return this._buffer.mightContainRTL()}mightContainUnusualLineTerminators(){return this._buffer.mightContainUnusualLineTerminators()}removeUnusualLineTerminators(e=null){const t=this.findMatches(yr["a"].source,!1,!0,!1,null,!1,1073741824);this._buffer.resetMightContainUnusualLineTerminators(),this.pushEditOperations(e,t.map(e=>({range:e.range,text:null})),()=>null)}mightContainNonBasicASCII(){return this._buffer.mightContainNonBasicASCII()}getAlternativeVersionId(){return this._assertNotDisposed(),this._alternativeVersionId}getOffsetAt(e){this._assertNotDisposed();let t=this._validatePosition(e.lineNumber,e.column,0);return this._buffer.getOffsetAt(t.lineNumber,t.column)}getPositionAt(e){this._assertNotDisposed();let t=Math.min(this._buffer.getLength(),Math.max(0,e));return this._buffer.getPositionAt(t)}_increaseVersionId(){this._versionId=this._versionId+1,this._alternativeVersionId=this._versionId}_overwriteVersionId(e){this._versionId=e}_overwriteAlternativeVersionId(e){this._alternativeVersionId=e}_overwriteInitialUndoRedoSnapshot(e){this._initialUndoRedoSnapshot=e}getValue(e,t=!1){this._assertNotDisposed();const i=this.getFullModelRange(),n=this.getValueInRange(i,e);return t?this._buffer.getBOM()+n:n}createSnapshot(e=!1){return new Pb(this._buffer.createSnapshot(e))}getValueLength(e,t=!1){this._assertNotDisposed();const i=this.getFullModelRange(),n=this.getValueLengthInRange(i,e);return t?this._buffer.getBOM().length+n:n}getValueInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getValueInRange(this.validateRange(e),t)}getValueLengthInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getValueLengthInRange(this.validateRange(e),t)}getCharacterCountInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getCharacterCountInRange(this.validateRange(e),t)}getLineCount(){return this._assertNotDisposed(),this._buffer.getLineCount()}getLineContent(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineContent(e)}getLineLength(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLength(e)}getLinesContent(){return this._assertNotDisposed(),this._buffer.getLinesContent()}getEOL(){return this._assertNotDisposed(),this._buffer.getEOL()}getLineMinColumn(e){return this._assertNotDisposed(),1}getLineMaxColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLength(e)+1}getLineFirstNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineFirstNonWhitespaceColumn(e)}getLineLastNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLastNonWhitespaceColumn(e)}_validateRangeRelaxedNoAllocations(e){const t=this._buffer.getLineCount(),i=e.startLineNumber,n=e.startColumn;let o,r;if(i<1)o=1,r=1;else if(i>t)o=t,r=this.getLineMaxColumn(o);else if(o=0|i,n<=1)r=1;else{const e=this.getLineMaxColumn(o);r=n>=e?e:0|n}const s=e.endLineNumber,a=e.endColumn;let l,c;if(s<1)l=1,c=1;else if(s>t)l=t,c=this.getLineMaxColumn(l);else if(l=0|s,a<=1)c=1;else{const e=this.getLineMaxColumn(l);c=a>=e?e:0|a}return i===o&&n===r&&s===l&&a===c&&e instanceof Jt&&!(e instanceof ei)?e:new Jt(o,r,l,c)}_isValidPosition(e,t,i){if("number"!==typeof e||"number"!==typeof t)return!1;if(isNaN(e)||isNaN(t))return!1;if(e<1||t<1)return!1;if((0|e)!==e||(0|t)!==t)return!1;const n=this._buffer.getLineCount();if(e>n)return!1;if(1===t)return!0;const o=this.getLineMaxColumn(e);if(t>o)return!1;if(1===i){const i=this._buffer.getLineCharCode(e,t-2);if(yr["D"](i))return!1}return!0}_validatePosition(e,t,i){const n=Math.floor("number"!==typeof e||isNaN(e)?1:e),o=Math.floor("number"!==typeof t||isNaN(t)?1:t),r=this._buffer.getLineCount();if(n<1)return new Qt(1,1);if(n>r)return new Qt(r,this.getLineMaxColumn(r));if(o<=1)return new Qt(n,1);const s=this.getLineMaxColumn(n);if(o>=s)return new Qt(n,s);if(1===i){const e=this._buffer.getLineCharCode(n,o-2);if(yr["D"](e))return new Qt(n,o-1)}return new Qt(n,o)}validatePosition(e){const t=1;return this._assertNotDisposed(),e instanceof Qt&&this._isValidPosition(e.lineNumber,e.column,t)?e:this._validatePosition(e.lineNumber,e.column,t)}_isValidRange(e,t){const i=e.startLineNumber,n=e.startColumn,o=e.endLineNumber,r=e.endColumn;if(!this._isValidPosition(i,n,0))return!1;if(!this._isValidPosition(o,r,0))return!1;if(1===t){const e=n>1?this._buffer.getLineCharCode(i,n-2):0,t=r>1&&r<=this._buffer.getLineLength(o)?this._buffer.getLineCharCode(o,r-2):0,s=yr["D"](e),a=yr["D"](t);return!s&&!a}return!0}validateRange(e){const t=1;if(this._assertNotDisposed(),e instanceof Jt&&!(e instanceof ei)&&this._isValidRange(e,t))return e;const i=this._validatePosition(e.startLineNumber,e.startColumn,0),n=this._validatePosition(e.endLineNumber,e.endColumn,0),o=i.lineNumber,r=i.column,s=n.lineNumber,a=n.column;if(1===t){const e=r>1?this._buffer.getLineCharCode(o,r-2):0,t=a>1&&a<=this._buffer.getLineLength(s)?this._buffer.getLineCharCode(s,a-2):0,i=yr["D"](e),n=yr["D"](t);return i||n?o===s&&r===a?new Jt(o,r-1,s,a-1):i&&n?new Jt(o,r-1,s,a+1):i?new Jt(o,r-1,s,a):new Jt(o,r,s,a+1):new Jt(o,r,s,a)}return new Jt(o,r,s,a)}modifyPosition(e,t){this._assertNotDisposed();let i=this.getOffsetAt(e)+t;return this.getPositionAt(Math.min(this._buffer.getLength(),Math.max(0,i)))}getFullModelRange(){this._assertNotDisposed();const e=this.getLineCount();return new Jt(1,1,e,this.getLineMaxColumn(e))}findMatchesLineByLine(e,t,i,n){return this._buffer.findMatchesLineByLine(e,t,i,n)}findMatches(e,t,i,n,o,r,s=Ab){this._assertNotDisposed();let a=null;null!==t&&(Array.isArray(t)||(t=[t]),t.every(e=>Jt.isIRange(e))&&(a=t.map(e=>this.validateRange(e)))),null===a&&(a=[this.getFullModelRange()]),a=a.sort((e,t)=>e.startLineNumber-t.startLineNumber||e.startColumn-t.startColumn);const l=[];let c;if(l.push(a.reduce((e,t)=>Jt.areIntersecting(e,t)?e.plusRange(t):(l.push(e),t))),!i&&e.indexOf("\n")<0){const t=new A_(e,i,n,o),a=t.parseSearchRequest();if(!a)return[];c=e=>this.findMatchesLineByLine(e,a,r,s)}else c=t=>B_.findMatches(this,new A_(e,i,n,o),t,r,s);return l.map(c).reduce((e,t)=>e.concat(t),[])}findNextMatch(e,t,i,n,o,r){this._assertNotDisposed();const s=this.validatePosition(t);if(!i&&e.indexOf("\n")<0){const t=new A_(e,i,n,o),a=t.parseSearchRequest();if(!a)return null;const l=this.getLineCount();let c=new Jt(s.lineNumber,s.column,l,this.getLineMaxColumn(l)),h=this.findMatchesLineByLine(c,a,r,1);return B_.findNextMatch(this,new A_(e,i,n,o),s,r),h.length>0?h[0]:(c=new Jt(1,1,s.lineNumber,this.getLineMaxColumn(s.lineNumber)),h=this.findMatchesLineByLine(c,a,r,1),h.length>0?h[0]:null)}return B_.findNextMatch(this,new A_(e,i,n,o),s,r)}findPreviousMatch(e,t,i,n,o,r){this._assertNotDisposed();const s=this.validatePosition(t);return B_.findPreviousMatch(this,new A_(e,i,n,o),s,r)}pushStackElement(){this._commandManager.pushStackElement()}pushEOL(e){const t="\n"===this.getEOL()?0:1;if(t!==e)try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),null===this._initialUndoRedoSnapshot&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEOL(e)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_validateEditOperation(e){return e instanceof Ls?e:new Ls(e.identifier||null,this.validateRange(e.range),e.text,e.forceMoveMarkers||!1,e.isAutoWhitespaceEdit||!1,e._isTracked||!1)}_validateEditOperations(e){const t=[];for(let i=0,n=e.length;i<n;i++)t[i]=this._validateEditOperation(e[i]);return t}pushEditOperations(e,t,i){try{return this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._pushEditOperations(e,this._validateEditOperations(t),i)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_pushEditOperations(e,t,i){if(this._options.trimAutoWhitespace&&this._trimAutoWhitespaceLines){let i=t.map(e=>({range:this.validateRange(e.range),text:e.text})),n=!0;if(e)for(let t=0,o=e.length;t<o;t++){let o=e[t],r=!1;for(let e=0,t=i.length;e<t;e++){let t=i[e].range,n=t.startLineNumber>o.endLineNumber,s=o.startLineNumber>t.endLineNumber;if(!n&&!s){r=!0;break}}if(!r){n=!1;break}}if(n)for(let e=0,o=this._trimAutoWhitespaceLines.length;e<o;e++){let n=this._trimAutoWhitespaceLines[e],o=this.getLineMaxColumn(n),r=!0;for(let e=0,t=i.length;e<t;e++){let t=i[e].range,s=i[e].text;if(!(n<t.startLineNumber||n>t.endLineNumber)&&(!(n===t.startLineNumber&&t.startColumn===o&&t.isEmpty()&&s&&s.length>0&&"\n"===s.charAt(0))&&!(n===t.startLineNumber&&1===t.startColumn&&t.isEmpty()&&s&&s.length>0&&"\n"===s.charAt(s.length-1)))){r=!1;break}}if(r){const e=new Jt(n,1,n,o);t.push(new Ls(null,e,null,!1,!1,!1))}}this._trimAutoWhitespaceLines=null}return null===this._initialUndoRedoSnapshot&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEditOperation(e,t,i)}_applyUndo(e,t,i,n){const o=e.map(e=>{const t=this.getPositionAt(e.newPosition),i=this.getPositionAt(e.newEnd);return{range:new Jt(t.lineNumber,t.column,i.lineNumber,i.column),text:e.oldText}});this._applyUndoRedoEdits(o,t,!0,!1,i,n)}_applyRedo(e,t,i,n){const o=e.map(e=>{const t=this.getPositionAt(e.oldPosition),i=this.getPositionAt(e.oldEnd);return{range:new Jt(t.lineNumber,t.column,i.lineNumber,i.column),text:e.newText}});this._applyUndoRedoEdits(o,t,!1,!0,i,n)}_applyUndoRedoEdits(e,t,i,n,o,r){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._isUndoing=i,this._isRedoing=n,this.applyEdits(e,!1),this.setEOL(t),this._overwriteAlternativeVersionId(o)}finally{this._isUndoing=!1,this._isRedoing=!1,this._eventEmitter.endDeferredEmit(r),this._onDidChangeDecorations.endDeferredEmit()}}applyEdits(e,t=!1){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit();const i=this._validateEditOperations(e);return this._doApplyEdits(i,t)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_doApplyEdits(e,t){const i=this._buffer.getLineCount(),n=this._buffer.applyEdits(e,this._options.trimAutoWhitespace,t),o=this._buffer.getLineCount(),r=n.changes;if(this._trimAutoWhitespaceLines=n.trimAutoWhitespaceLineNumbers,0!==r.length){let e=[],t=i;for(let i=0,n=r.length;i<n;i++){const n=r[i],[s,a,l]=eb(n.text);this._tokens.acceptEdit(n.range,s,a),this._tokens2.acceptEdit(n.range,s,a,l,n.text.length>0?n.text.charCodeAt(0):0),this._onDidChangeDecorations.fire(),this._decorationsTree.acceptReplace(n.rangeOffset,n.rangeLength,n.text.length,n.forceMoveMarkers);const c=n.range.startLineNumber,h=n.range.endLineNumber,d=h-c,u=s,g=Math.min(d,u),f=u-d;for(let i=g;i>=0;i--){const n=c+i,r=o-t-f+n;e.push(new mb(n,this.getLineContent(r)))}if(g<d){const t=c+g;e.push(new pb(t+1,h))}if(g<u){const i=c+g,n=u-g,r=o-t-n+i+1;let s=[];for(let e=0;e<n;e++){let t=r+e;s[t-r]=this.getLineContent(t)}e.push(new _b(i+1,c+u,s))}t+=f}this._increaseVersionId(),this._emitContentChangedEvent(new vb(e,this.getVersionId(),this._isUndoing,this._isRedoing),{changes:r,eol:this._buffer.getEOL(),versionId:this.getVersionId(),isUndoing:this._isUndoing,isRedoing:this._isRedoing,isFlush:!1})}return null===n.reverseEdits?void 0:n.reverseEdits}undo(){this._undoRedoService.undo(this.uri)}canUndo(){return this._undoRedoService.canUndo(this.uri)}redo(){this._undoRedoService.redo(this.uri)}canRedo(){return this._undoRedoService.canRedo(this.uri)}changeDecorations(e,t=0){this._assertNotDisposed();try{return this._onDidChangeDecorations.beginDeferredEmit(),this._changeDecorations(t,e)}finally{this._onDidChangeDecorations.endDeferredEmit()}}_changeDecorations(e,t){let i={addDecoration:(t,i)=>this._deltaDecorationsImpl(e,[],[{range:t,options:i}])[0],changeDecoration:(e,t)=>{this._changeDecorationImpl(e,t)},changeDecorationOptions:(e,t)=>{this._changeDecorationOptionsImpl(e,Gb(t))},removeDecoration:t=>{this._deltaDecorationsImpl(e,[t],[])},deltaDecorations:(t,i)=>0===t.length&&0===i.length?[]:this._deltaDecorationsImpl(e,t,i)},n=null;try{n=t(i)}catch(o){me(o)}return i.addDecoration=Fb,i.changeDecoration=Fb,i.changeDecorationOptions=Fb,i.removeDecoration=Fb,i.deltaDecorations=Fb,n}deltaDecorations(e,t,i=0){if(this._assertNotDisposed(),e||(e=[]),0===e.length&&0===t.length)return[];try{return this._onDidChangeDecorations.beginDeferredEmit(),this._deltaDecorationsImpl(i,e,t)}finally{this._onDidChangeDecorations.endDeferredEmit()}}_getTrackedRange(e){return this.getDecorationRange(e)}_setTrackedRange(e,t,i){const n=e?this._decorations[e]:null;if(!n)return t?this._deltaDecorationsImpl(0,[],[{range:t,options:$b[i]}])[0]:null;if(!t)return this._decorationsTree.delete(n),delete this._decorations[n.id],null;const o=this._validateRangeRelaxedNoAllocations(t),r=this._buffer.getOffsetAt(o.startLineNumber,o.startColumn),s=this._buffer.getOffsetAt(o.endLineNumber,o.endColumn);return this._decorationsTree.delete(n),n.reset(this.getVersionId(),r,s,o),n.setOptions($b[i]),this._decorationsTree.insert(n),n.id}removeAllDecorationsWithOwnerId(e){if(this._isDisposed)return;const t=this._decorationsTree.collectNodesFromOwner(e);for(let i=0,n=t.length;i<n;i++){const e=t[i];this._decorationsTree.delete(e),delete this._decorations[e.id]}}getDecorationOptions(e){const t=this._decorations[e];return t?t.options:null}getDecorationRange(e){const t=this._decorations[e];if(!t)return null;const i=this.getVersionId();return t.cachedVersionId!==i&&this._decorationsTree.resolveNode(t,i),null===t.range&&(t.range=this._getRangeAt(t.cachedAbsoluteStart,t.cachedAbsoluteEnd)),t.range}getLineDecorations(e,t=0,i=!1){return e<1||e>this.getLineCount()?[]:this.getLinesDecorations(e,e,t,i)}getLinesDecorations(e,t,i=0,n=!1){let o=this.getLineCount(),r=Math.min(o,Math.max(1,e)),s=Math.min(o,Math.max(1,t)),a=this.getLineMaxColumn(s);return this._getDecorationsInRange(new Jt(r,1,s,a),i,n)}getDecorationsInRange(e,t=0,i=!1){let n=this.validateRange(e);return this._getDecorationsInRange(n,t,i)}getOverviewRulerDecorations(e=0,t=!1){const i=this.getVersionId(),n=this._decorationsTree.search(e,t,!0,i);return this._ensureNodesHaveRanges(n)}getAllDecorations(e=0,t=!1){const i=this.getVersionId(),n=this._decorationsTree.search(e,t,!1,i);return this._ensureNodesHaveRanges(n)}_getDecorationsInRange(e,t,i){const n=this._buffer.getOffsetAt(e.startLineNumber,e.startColumn),o=this._buffer.getOffsetAt(e.endLineNumber,e.endColumn),r=this.getVersionId(),s=this._decorationsTree.intervalSearch(n,o,t,i,r);return this._ensureNodesHaveRanges(s)}_ensureNodesHaveRanges(e){for(let t=0,i=e.length;t<i;t++){const i=e[t];null===i.range&&(i.range=this._getRangeAt(i.cachedAbsoluteStart,i.cachedAbsoluteEnd))}return e}_getRangeAt(e,t){return this._buffer.getRangeAt(e,t-e)}_changeDecorationImpl(e,t){const i=this._decorations[e];if(!i)return;const n=this._validateRangeRelaxedNoAllocations(t),o=this._buffer.getOffsetAt(n.startLineNumber,n.startColumn),r=this._buffer.getOffsetAt(n.endLineNumber,n.endColumn);this._decorationsTree.delete(i),i.reset(this.getVersionId(),o,r,n),this._decorationsTree.insert(i),this._onDidChangeDecorations.checkAffectedAndFire(i.options)}_changeDecorationOptionsImpl(e,t){const i=this._decorations[e];if(!i)return;const n=!(!i.options.overviewRuler||!i.options.overviewRuler.color),o=!(!t.overviewRuler||!t.overviewRuler.color);this._onDidChangeDecorations.checkAffectedAndFire(i.options),this._onDidChangeDecorations.checkAffectedAndFire(t),n!==o?(this._decorationsTree.delete(i),i.setOptions(t),this._decorationsTree.insert(i)):i.setOptions(t)}_deltaDecorationsImpl(e,t,i){const n=this.getVersionId(),o=t.length;let r=0;const s=i.length;let a=0,l=new Array(s);while(r<o||a<s){let c=null;if(r<o){do{c=this._decorations[t[r++]]}while(!c&&r<o);c&&(this._decorationsTree.delete(c),this._onDidChangeDecorations.checkAffectedAndFire(c.options))}if(a<s){if(!c){const e=++this._lastDecorationId,t=`${this._instanceId};${e}`;c=new Gp(t,0,0),this._decorations[t]=c}const t=i[a],o=this._validateRangeRelaxedNoAllocations(t.range),r=Gb(t.options),s=this._buffer.getOffsetAt(o.startLineNumber,o.startColumn),h=this._buffer.getOffsetAt(o.endLineNumber,o.endColumn);c.ownerId=e,c.reset(n,s,h,o),c.setOptions(r),this._onDidChangeDecorations.checkAffectedAndFire(r),this._decorationsTree.insert(c),l[a]=c.id,a++}else c&&delete this._decorations[c.id]}return l}setTokens(e){if(0===e.length)return;let t=[];for(let i=0,n=e.length;i<n;i++){const n=e[i];let o=0,r=0,s=!1;for(let e=0,t=n.tokens.length;e<t;e++){const t=n.startLineNumber+e;if(s)this._tokens.setTokens(this._languageIdentifier.id,t-1,this._buffer.getLineLength(t),n.tokens[e],!1),r=t;else{const i=this._tokens.setTokens(this._languageIdentifier.id,t-1,this._buffer.getLineLength(t),n.tokens[e],!0);i&&(s=!0,o=t,r=t)}}s&&t.push({fromLineNumber:o,toLineNumber:r})}t.length>0&&this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,semanticTokensApplied:!1,ranges:t})}setSemanticTokens(e,t){this._tokens2.set(e,t),this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,semanticTokensApplied:null!==e,ranges:[{fromLineNumber:1,toLineNumber:this.getLineCount()}]})}hasSemanticTokens(){return this._tokens2.isComplete()}setPartialSemanticTokens(e,t){if(this.hasSemanticTokens())return;const i=this._tokens2.setPartial(e,t);this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,semanticTokensApplied:!0,ranges:[{fromLineNumber:i.startLineNumber,toLineNumber:i.endLineNumber}]})}tokenizeViewport(e,t){e=Math.max(1,e),t=Math.min(this._buffer.getLineCount(),t),this._tokenization.tokenizeViewport(e,t)}clearTokens(){this._tokens.flush(),this._emitModelTokensChangedEvent({tokenizationSupportChanged:!0,semanticTokensApplied:!1,ranges:[{fromLineNumber:1,toLineNumber:this._buffer.getLineCount()}]})}_emitModelTokensChangedEvent(e){this._isDisposing||this._onDidChangeTokens.fire(e)}resetTokenization(){this._tokenization.reset()}forceTokenization(e){if(e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");this._tokenization.forceTokenization(e)}isCheapToTokenize(e){return this._tokenization.isCheapToTokenize(e)}tokenizeIfCheap(e){this.isCheapToTokenize(e)&&this.forceTokenization(e)}getLineTokens(e){if(e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._getLineTokens(e)}_getLineTokens(e){const t=this.getLineContent(e),i=this._tokens.getTokens(this._languageIdentifier.id,e-1,t);return this._tokens2.addSemanticTokens(e,i)}getLanguageIdentifier(){return this._languageIdentifier}getModeId(){return this._languageIdentifier.language}setMode(e){if(this._languageIdentifier.id===e.id)return;let t={oldLanguage:this._languageIdentifier.language,newLanguage:e.language};this._languageIdentifier=e,this._onDidChangeLanguage.fire(t),this._onDidChangeLanguageConfiguration.fire({})}getLanguageIdAtPosition(e,t){const i=this.validatePosition(new Qt(e,t)),n=this.getLineTokens(i.lineNumber);return n.getLanguageId(n.findTokenIndexAtOffset(i.column-1))}getWordAtPosition(e){this._assertNotDisposed();const t=this.validatePosition(e),i=this.getLineContent(t.lineNumber),n=this._getLineTokens(t.lineNumber),o=n.findTokenIndexAtOffset(t.column-1),[r,s]=Vb._findLanguageBoundaries(n,o),a=d(t.column,Kc.getWordDefinition(n.getLanguageId(o)),i.substring(r,s),r);if(a&&a.startColumn<=e.column&&e.column<=a.endColumn)return a;if(o>0&&r===t.column-1){const[r,s]=Vb._findLanguageBoundaries(n,o-1),a=d(t.column,Kc.getWordDefinition(n.getLanguageId(o-1)),i.substring(r,s),r);if(a&&a.startColumn<=e.column&&e.column<=a.endColumn)return a}return null}static _findLanguageBoundaries(e,t){const i=e.getLanguageId(t);let n=0;for(let r=t;r>=0&&e.getLanguageId(r)===i;r--)n=e.getStartOffset(r);let o=e.getLineContent().length;for(let r=t,s=e.getCount();r<s&&e.getLanguageId(r)===i;r++)o=e.getEndOffset(r);return[n,o]}getWordUntilPosition(e){const t=this.getWordAtPosition(e);return t?{word:t.word.substr(0,e.column-t.startColumn),startColumn:t.startColumn,endColumn:e.column}:{word:"",startColumn:e.column,endColumn:e.column}}findMatchingBracketUp(e,t){let i=e.toLowerCase(),n=this.validatePosition(t),o=this._getLineTokens(n.lineNumber),r=o.getLanguageId(o.findTokenIndexAtOffset(n.column-1)),s=Kc.getBracketsSupport(r);if(!s)return null;let a=s.textIsBracket[i];return a?Bb(this._findMatchingBracketUp(a,n,null)):null}matchBracket(e){return this._matchBracket(this.validatePosition(e))}_matchBracket(e){const t=e.lineNumber,i=this._getLineTokens(t),n=i.getCount(),o=this._buffer.getLineContent(t),r=i.findTokenIndexAtOffset(e.column-1);if(r<0)return null;const s=Kc.getBracketsSupport(i.getLanguageId(r));if(s&&!fc(i.getStandardTokenType(r))){let n=Math.max(0,e.column-1-s.maxBracketLength);for(let e=r-1;e>=0;e--){const t=i.getEndOffset(e);if(t<=n)break;fc(i.getStandardTokenType(e))&&(n=t)}const a=Math.min(o.length,e.column-1+s.maxBracketLength);let l=null;while(1){const i=Wc.findNextBracketInRange(s.forwardRegex,t,o,n,a);if(!i)break;if(i.startColumn<=e.column&&e.column<=i.endColumn){const e=o.substring(i.startColumn-1,i.endColumn-1).toLowerCase(),t=this._matchFoundBracket(i,s.textIsBracket[e],s.textIsOpenBracket[e],null);if(t){if(t instanceof Wb)return null;l=t}}n=i.endColumn-1}if(l)return l}if(r>0&&i.getStartOffset(r)===e.column-1){const s=r-1,a=Kc.getBracketsSupport(i.getLanguageId(s));if(a&&!fc(i.getStandardTokenType(s))){const r=Math.max(0,e.column-1-a.maxBracketLength);let l=Math.min(o.length,e.column-1+a.maxBracketLength);for(let e=s+1;e<n;e++){const t=i.getStartOffset(e);if(t>=l)break;fc(i.getStandardTokenType(e))&&(l=t)}const c=Wc.findPrevBracketInRange(a.reversedRegex,t,o,r,l);if(c&&c.startColumn<=e.column&&e.column<=c.endColumn){const e=o.substring(c.startColumn-1,c.endColumn-1).toLowerCase(),t=this._matchFoundBracket(c,a.textIsBracket[e],a.textIsOpenBracket[e],null);if(t)return t instanceof Wb?null:t}}}return null}_matchFoundBracket(e,t,i,n){if(!t)return null;const o=i?this._findMatchingBracketDown(t,e.getEndPosition(),n):this._findMatchingBracketUp(t,e.getStartPosition(),n);return o?o instanceof Wb?o:[e,o]:null}_findMatchingBracketUp(e,t,i){const n=e.languageIdentifier.id,o=e.reversedRegex;let r=-1,s=0;const a=(t,n,a,l)=>{while(1){if(i&&++s%100===0&&!i())return Wb.INSTANCE;const c=Wc.findPrevBracketInRange(o,t,n,a,l);if(!c)break;const h=n.substring(c.startColumn-1,c.endColumn-1).toLowerCase();if(e.isOpen(h)?r++:e.isClose(h)&&r--,0===r)return c;l=c.startColumn-1}return null};for(let l=t.lineNumber;l>=1;l--){const e=this._getLineTokens(l),i=e.getCount(),o=this._buffer.getLineContent(l);let r=i-1,s=o.length,c=o.length;l===t.lineNumber&&(r=e.findTokenIndexAtOffset(t.column-1),s=t.column-1,c=t.column-1);let h=!0;for(;r>=0;r--){const t=e.getLanguageId(r)===n&&!fc(e.getStandardTokenType(r));if(t)h?s=e.getStartOffset(r):(s=e.getStartOffset(r),c=e.getEndOffset(r));else if(h&&s!==c){const e=a(l,o,s,c);if(e)return e}h=t}if(h&&s!==c){const e=a(l,o,s,c);if(e)return e}}return null}_findMatchingBracketDown(e,t,i){const n=e.languageIdentifier.id,o=e.forwardRegex;let r=1,s=0;const a=(t,n,a,l)=>{while(1){if(i&&++s%100===0&&!i())return Wb.INSTANCE;const c=Wc.findNextBracketInRange(o,t,n,a,l);if(!c)break;const h=n.substring(c.startColumn-1,c.endColumn-1).toLowerCase();if(e.isOpen(h)?r++:e.isClose(h)&&r--,0===r)return c;a=c.endColumn-1}return null},l=this.getLineCount();for(let c=t.lineNumber;c<=l;c++){const e=this._getLineTokens(c),i=e.getCount(),o=this._buffer.getLineContent(c);let r=0,s=0,l=0;c===t.lineNumber&&(r=e.findTokenIndexAtOffset(t.column-1),s=t.column-1,l=t.column-1);let h=!0;for(;r<i;r++){const t=e.getLanguageId(r)===n&&!fc(e.getStandardTokenType(r));if(t)h||(s=e.getStartOffset(r)),l=e.getEndOffset(r);else if(h&&s!==l){const e=a(c,o,s,l);if(e)return e}h=t}if(h&&s!==l){const e=a(c,o,s,l);if(e)return e}}return null}findPrevBracket(e){const t=this.validatePosition(e);let i=-1,n=null;for(let o=t.lineNumber;o>=1;o--){const e=this._getLineTokens(o),r=e.getCount(),s=this._buffer.getLineContent(o);let a=r-1,l=s.length,c=s.length;if(o===t.lineNumber){a=e.findTokenIndexAtOffset(t.column-1),l=t.column-1,c=t.column-1;const o=e.getLanguageId(a);i!==o&&(i=o,n=Kc.getBracketsSupport(i))}let h=!0;for(;a>=0;a--){const t=e.getLanguageId(a);if(i!==t){if(n&&h&&l!==c){const e=Wc.findPrevBracketInRange(n.reversedRegex,o,s,l,c);if(e)return this._toFoundBracket(n,e);h=!1}i=t,n=Kc.getBracketsSupport(i)}const r=!!n&&!fc(e.getStandardTokenType(a));if(r)h?l=e.getStartOffset(a):(l=e.getStartOffset(a),c=e.getEndOffset(a));else if(n&&h&&l!==c){const e=Wc.findPrevBracketInRange(n.reversedRegex,o,s,l,c);if(e)return this._toFoundBracket(n,e)}h=r}if(n&&h&&l!==c){const e=Wc.findPrevBracketInRange(n.reversedRegex,o,s,l,c);if(e)return this._toFoundBracket(n,e)}}return null}findNextBracket(e){const t=this.validatePosition(e),i=this.getLineCount();let n=-1,o=null;for(let r=t.lineNumber;r<=i;r++){const e=this._getLineTokens(r),i=e.getCount(),s=this._buffer.getLineContent(r);let a=0,l=0,c=0;if(r===t.lineNumber){a=e.findTokenIndexAtOffset(t.column-1),l=t.column-1,c=t.column-1;const i=e.getLanguageId(a);n!==i&&(n=i,o=Kc.getBracketsSupport(n))}let h=!0;for(;a<i;a++){const t=e.getLanguageId(a);if(n!==t){if(o&&h&&l!==c){const e=Wc.findNextBracketInRange(o.forwardRegex,r,s,l,c);if(e)return this._toFoundBracket(o,e);h=!1}n=t,o=Kc.getBracketsSupport(n)}const i=!!o&&!fc(e.getStandardTokenType(a));if(i)h||(l=e.getStartOffset(a)),c=e.getEndOffset(a);else if(o&&h&&l!==c){const e=Wc.findNextBracketInRange(o.forwardRegex,r,s,l,c);if(e)return this._toFoundBracket(o,e)}h=i}if(o&&h&&l!==c){const e=Wc.findNextBracketInRange(o.forwardRegex,r,s,l,c);if(e)return this._toFoundBracket(o,e)}}return null}findEnclosingBrackets(e,t){let i;if("undefined"===typeof t)i=null;else{const e=Date.now();i=()=>Date.now()-e<=t}const n=this.validatePosition(e),o=this.getLineCount(),r=new Map;let s=[];const a=(e,t)=>{if(!r.has(e)){let i=[];for(let e=0,n=t?t.brackets.length:0;e<n;e++)i[e]=0;r.set(e,i)}s=r.get(e)};let l=0;const c=(e,t,n,o,r)=>{while(1){if(i&&++l%100===0&&!i())return Wb.INSTANCE;const a=Wc.findNextBracketInRange(e.forwardRegex,t,n,o,r);if(!a)break;const c=n.substring(a.startColumn-1,a.endColumn-1).toLowerCase(),h=e.textIsBracket[c];if(h&&(h.isOpen(c)?s[h.index]++:h.isClose(c)&&s[h.index]--,-1===s[h.index]))return this._matchFoundBracket(a,h,!1,i);o=a.endColumn-1}return null};let h=-1,d=null;for(let u=n.lineNumber;u<=o;u++){const e=this._getLineTokens(u),t=e.getCount(),i=this._buffer.getLineContent(u);let o=0,r=0,s=0;if(u===n.lineNumber){o=e.findTokenIndexAtOffset(n.column-1),r=n.column-1,s=n.column-1;const t=e.getLanguageId(o);h!==t&&(h=t,d=Kc.getBracketsSupport(h),a(h,d))}let l=!0;for(;o<t;o++){const t=e.getLanguageId(o);if(h!==t){if(d&&l&&r!==s){const e=c(d,u,i,r,s);if(e)return Bb(e);l=!1}h=t,d=Kc.getBracketsSupport(h),a(h,d)}const n=!!d&&!fc(e.getStandardTokenType(o));if(n)l||(r=e.getStartOffset(o)),s=e.getEndOffset(o);else if(d&&l&&r!==s){const e=c(d,u,i,r,s);if(e)return Bb(e)}l=n}if(d&&l&&r!==s){const e=c(d,u,i,r,s);if(e)return Bb(e)}}return null}_toFoundBracket(e,t){if(!t)return null;let i=this.getValueInRange(t);i=i.toLowerCase();let n=e.textIsBracket[i];return n?{range:t,open:n.open,close:n.close,isOpen:e.textIsOpenBracket[i]}:null}static computeIndentLevel(e,t){let i=0,n=0,o=e.length;while(n<o){let o=e.charCodeAt(n);if(32===o)i++;else{if(9!==o)break;i=i-i%t+t}n++}return n===o?-1:i}_computeIndentLevel(e){return Vb.computeIndentLevel(this._buffer.getLineContent(e+1),this._options.tabSize)}getActiveIndentGuide(e,t,i){this._assertNotDisposed();const n=this.getLineCount();if(e<1||e>n)throw new Error("Illegal value for lineNumber");const o=Kc.getFoldingRules(this._languageIdentifier.id),r=Boolean(o&&o.offSide);let s=-2,a=-1,l=-2,c=-1;const h=e=>{if(-1!==s&&(-2===s||s>e-1)){s=-1,a=-1;for(let t=e-2;t>=0;t--){let e=this._computeIndentLevel(t);if(e>=0){s=t,a=e;break}}}if(-2===l){l=-1,c=-1;for(let t=e;t<n;t++){let e=this._computeIndentLevel(t);if(e>=0){l=t,c=e;break}}}};let d=-2,u=-1,g=-2,f=-1;const m=e=>{if(-2===d){d=-1,u=-1;for(let t=e-2;t>=0;t--){let e=this._computeIndentLevel(t);if(e>=0){d=t,u=e;break}}}if(-1!==g&&(-2===g||g<e-1)){g=-1,f=-1;for(let t=e;t<n;t++){let e=this._computeIndentLevel(t);if(e>=0){g=t,f=e;break}}}};let p=0,_=!0,b=0,v=!0,w=0,C=0;for(let y=0;_||v;y++){const o=e-y,s=e+y;y>1&&(o<1||o<t)&&(_=!1),y>1&&(s>n||s>i)&&(v=!1),y>5e4&&(_=!1,v=!1);let g=-1;if(_){const e=this._computeIndentLevel(o-1);e>=0?(l=o-1,c=e,g=Math.ceil(e/this._options.indentSize)):(h(o),g=this._getIndentLevelForWhitespaceLine(r,a,c))}let S=-1;if(v){const e=this._computeIndentLevel(s-1);e>=0?(d=s-1,u=e,S=Math.ceil(e/this._options.indentSize)):(m(s),S=this._getIndentLevelForWhitespaceLine(r,u,f))}if(0!==y){if(1===y){if(s<=n&&S>=0&&C+1===S){_=!1,p=s,b=s,w=S;continue}if(o>=1&&g>=0&&g-1===C){v=!1,p=o,b=o,w=g;continue}if(p=e,b=e,w=C,0===w)return{startLineNumber:p,endLineNumber:b,indent:w}}_&&(g>=w?p=o:_=!1),v&&(S>=w?b=s:v=!1)}else C=g}return{startLineNumber:p,endLineNumber:b,indent:w}}getLinesIndentGuides(e,t){this._assertNotDisposed();const i=this.getLineCount();if(e<1||e>i)throw new Error("Illegal value for startLineNumber");if(t<1||t>i)throw new Error("Illegal value for endLineNumber");const n=Kc.getFoldingRules(this._languageIdentifier.id),o=Boolean(n&&n.offSide);let r=new Array(t-e+1),s=-2,a=-1,l=-2,c=-1;for(let h=e;h<=t;h++){let t=h-e;const n=this._computeIndentLevel(h-1);if(n>=0)s=h-1,a=n,r[t]=Math.ceil(n/this._options.indentSize);else{if(-2===s){s=-1,a=-1;for(let e=h-2;e>=0;e--){let t=this._computeIndentLevel(e);if(t>=0){s=e,a=t;break}}}if(-1!==l&&(-2===l||l<h-1)){l=-1,c=-1;for(let e=h;e<i;e++){let t=this._computeIndentLevel(e);if(t>=0){l=e,c=t;break}}}r[t]=this._getIndentLevelForWhitespaceLine(o,a,c)}}return r}_getIndentLevelForWhitespaceLine(e,t,i){return-1===t||-1===i?0:t<i?1+Math.floor(t/this._options.indentSize):t===i||e?Math.ceil(i/this._options.indentSize):1+Math.floor(i/this._options.indentSize)}}Vb.MODEL_SYNC_LIMIT=52428800,Vb.LARGE_FILE_SIZE_THRESHOLD=20971520,Vb.LARGE_FILE_LINE_COUNT_THRESHOLD=3e5,Vb.DEFAULT_CREATION_OPTIONS={isForSimpleWidget:!1,tabSize:ce.tabSize,indentSize:ce.indentSize,insertSpaces:ce.insertSpaces,detectIndentation:!1,defaultEOL:1,trimAutoWhitespace:ce.trimAutoWhitespace,largeFileOptimizations:ce.largeFileOptimizations};class Hb{constructor(){this._decorationsTree0=new Xp,this._decorationsTree1=new Xp}intervalSearch(e,t,i,n,o){const r=this._decorationsTree0.intervalSearch(e,t,i,n,o),s=this._decorationsTree1.intervalSearch(e,t,i,n,o);return r.concat(s)}search(e,t,i,n){if(i)return this._decorationsTree1.search(e,t,n);{const i=this._decorationsTree0.search(e,t,n),o=this._decorationsTree1.search(e,t,n);return i.concat(o)}}collectNodesFromOwner(e){const t=this._decorationsTree0.collectNodesFromOwner(e),i=this._decorationsTree1.collectNodesFromOwner(e);return t.concat(i)}collectNodesPostOrder(){const e=this._decorationsTree0.collectNodesPostOrder(),t=this._decorationsTree1.collectNodesPostOrder();return e.concat(t)}insert(e){zp(e)?this._decorationsTree1.insert(e):this._decorationsTree0.insert(e)}delete(e){zp(e)?this._decorationsTree1.delete(e):this._decorationsTree0.delete(e)}resolveNode(e,t){zp(e)?this._decorationsTree1.resolveNode(e,t):this._decorationsTree0.resolveNode(e,t)}acceptReplace(e,t,i,n){this._decorationsTree0.acceptReplace(e,t,i,n),this._decorationsTree1.acceptReplace(e,t,i,n)}}function zb(e){return e.replace(/[^a-z0-9\-_]/gi," ")}class Ub{constructor(e){this.color=e.color||"",this.darkColor=e.darkColor||""}}class jb extends Ub{constructor(e){super(e),this._resolvedColor=null,this.position="number"===typeof e.position?e.position:Cs.Center}getColor(e){return this._resolvedColor||("light"!==e.type&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,e):this._resolvedColor=this._resolveColor(this.color,e)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=null}_resolveColor(e,t){if("string"===typeof e)return e;let i=e?t.getColor(e.id):null;return i?i.toString():""}}class Kb extends Ub{constructor(e){super(e),this.position=e.position}getColor(e){return this._resolvedColor||("light"!==e.type&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,e):this._resolvedColor=this._resolveColor(this.color,e)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=void 0}_resolveColor(e,t){return"string"===typeof e?Nb.fromHex(e):t.getColor(e.id)}}class qb{constructor(e){this.stickiness=e.stickiness||0,this.zIndex=e.zIndex||0,this.className=e.className?zb(e.className):null,this.hoverMessage=e.hoverMessage||null,this.glyphMarginHoverMessage=e.glyphMarginHoverMessage||null,this.isWholeLine=e.isWholeLine||!1,this.showIfCollapsed=e.showIfCollapsed||!1,this.collapseOnReplaceEdit=e.collapseOnReplaceEdit||!1,this.overviewRuler=e.overviewRuler?new jb(e.overviewRuler):null,this.minimap=e.minimap?new Kb(e.minimap):null,this.glyphMarginClassName=e.glyphMarginClassName?zb(e.glyphMarginClassName):null,this.linesDecorationsClassName=e.linesDecorationsClassName?zb(e.linesDecorationsClassName):null,this.firstLineDecorationClassName=e.firstLineDecorationClassName?zb(e.firstLineDecorationClassName):null,this.marginClassName=e.marginClassName?zb(e.marginClassName):null,this.inlineClassName=e.inlineClassName?zb(e.inlineClassName):null,this.inlineClassNameAffectsLetterSpacing=e.inlineClassNameAffectsLetterSpacing||!1,this.beforeContentClassName=e.beforeContentClassName?zb(e.beforeContentClassName):null,this.afterContentClassName=e.afterContentClassName?zb(e.afterContentClassName):null}static register(e){return new qb(e)}static createDynamic(e){return new qb(e)}}qb.EMPTY=qb.register({});const $b=[qb.register({stickiness:0}),qb.register({stickiness:1}),qb.register({stickiness:2}),qb.register({stickiness:3})];function Gb(e){return e instanceof qb?e:qb.createDynamic(e)}class Yb extends Oe{constructor(){super(),this._actual=this._register(new Ve),this.event=this._actual.event,this._deferredCnt=0,this._shouldFire=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(){if(this._deferredCnt--,0===this._deferredCnt&&this._shouldFire){const e={affectsMinimap:this._affectsMinimap,affectsOverviewRuler:this._affectsOverviewRuler};this._shouldFire=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1,this._actual.fire(e)}}checkAffectedAndFire(e){this._affectsMinimap||(this._affectsMinimap=!(!e.minimap||!e.minimap.position)),this._affectsOverviewRuler||(this._affectsOverviewRuler=!(!e.overviewRuler||!e.overviewRuler.color)),this._shouldFire=!0}fire(){this._affectsMinimap=!0,this._affectsOverviewRuler=!0,this._shouldFire=!0}}class Xb extends Oe{constructor(){super(),this._fastEmitter=this._register(new Ve),this.fastEvent=this._fastEmitter.event,this._slowEmitter=this._register(new Ve),this.slowEvent=this._slowEmitter.event,this._deferredCnt=0,this._deferredEvent=null}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(e=null){if(this._deferredCnt--,0===this._deferredCnt&&null!==this._deferredEvent){this._deferredEvent.rawContentChangedEvent.resultingSelection=e;const t=this._deferredEvent;this._deferredEvent=null,this._fastEmitter.fire(t),this._slowEmitter.fire(t)}}fire(e){this._deferredCnt>0?this._deferredEvent?this._deferredEvent=this._deferredEvent.merge(e):this._deferredEvent=e:(this._fastEmitter.fire(e),this._slowEmitter.fire(e))}}const Zb=()=>!0,Qb=()=>!1,Jb=e=>" "===e||"\t"===e;function ev(e,t,i){e.has(t)?e.get(t).push(i):e.set(t,[i])}class tv{constructor(e,t,i){this._languageIdentifier=e;const n=i.options,o=n.get(117);this.readOnly=n.get(72),this.tabSize=t.tabSize,this.indentSize=t.indentSize,this.insertSpaces=t.insertSpaces,this.lineHeight=n.get(51),this.pageSize=Math.max(1,Math.floor(o.height/this.lineHeight)-2),this.useTabStops=n.get(104),this.wordSeparators=n.get(105),this.emptySelectionClipboard=n.get(26),this.copyWithSyntaxHighlighting=n.get(16),this.multiCursorMergeOverlapping=n.get(60),this.multiCursorPaste=n.get(62),this.autoClosingBrackets=n.get(5),this.autoClosingQuotes=n.get(7),this.autoClosingOvertype=n.get(6),this.autoSurround=n.get(10),this.autoIndent=n.get(8),this.autoClosingPairsOpen2=new Map,this.autoClosingPairsClose2=new Map,this.surroundingPairs={},this._electricChars=null,this.shouldAutoCloseBefore={quote:tv._getShouldAutoClose(e,this.autoClosingQuotes),bracket:tv._getShouldAutoClose(e,this.autoClosingBrackets)};let r=tv._getAutoClosingPairs(e);if(r)for(const a of r)ev(this.autoClosingPairsOpen2,a.open.charAt(a.open.length-1),a),1===a.close.length&&ev(this.autoClosingPairsClose2,a.close,a);let s=tv._getSurroundingPairs(e);if(s)for(const a of s)this.surroundingPairs[a.open]=a.close}static shouldRecreate(e){return e.hasChanged(117)||e.hasChanged(105)||e.hasChanged(26)||e.hasChanged(60)||e.hasChanged(62)||e.hasChanged(5)||e.hasChanged(7)||e.hasChanged(6)||e.hasChanged(10)||e.hasChanged(104)||e.hasChanged(51)||e.hasChanged(72)}get electricChars(){if(!this._electricChars){this._electricChars={};let e=tv._getElectricCharacters(this._languageIdentifier);if(e)for(const t of e)this._electricChars[t]=!0}return this._electricChars}normalizeIndentation(e){return Vb.normalizeIndentation(e,this.indentSize,this.insertSpaces)}static _getElectricCharacters(e){try{return Kc.getElectricCharacters(e.id)}catch(t){return me(t),null}}static _getAutoClosingPairs(e){try{return Kc.getAutoClosingPairs(e.id)}catch(t){return me(t),null}}static _getShouldAutoClose(e,t){switch(t){case"beforeWhitespace":return Jb;case"languageDefined":return tv._getLanguageDefinedShouldAutoClose(e);case"always":return Zb;case"never":return Qb}}static _getLanguageDefinedShouldAutoClose(e){try{const t=Kc.getAutoCloseBeforeSet(e.id);return e=>-1!==t.indexOf(e)}catch(t){return me(t),Qb}}static _getSurroundingPairs(e){try{return Kc.getSurroundingPairs(e.id)}catch(t){return me(t),null}}}class iv{constructor(e,t,i,n){this.selectionStart=e,this.selectionStartLeftoverVisibleColumns=t,this.position=i,this.leftoverVisibleColumns=n,this.selection=iv._computeSelection(this.selectionStart,this.position)}equals(e){return this.selectionStartLeftoverVisibleColumns===e.selectionStartLeftoverVisibleColumns&&this.leftoverVisibleColumns===e.leftoverVisibleColumns&&this.position.equals(e.position)&&this.selectionStart.equalsRange(e.selectionStart)}hasSelection(){return!this.selection.isEmpty()||!this.selectionStart.isEmpty()}move(e,t,i,n){return e?new iv(this.selectionStart,this.selectionStartLeftoverVisibleColumns,new Qt(t,i),n):new iv(new Jt(t,i,t,i),n,new Qt(t,i),n)}static _computeSelection(e,t){let i,n,o,r;return e.isEmpty()?(i=e.startLineNumber,n=e.startColumn,o=t.lineNumber,r=t.column):t.isBeforeOrEqual(e.getStartPosition())?(i=e.endLineNumber,n=e.endColumn,o=t.lineNumber,r=t.column):(i=e.startLineNumber,n=e.startColumn,o=t.lineNumber,r=t.column),new ei(i,n,o,r)}}class nv{constructor(e,t,i){this.model=e,this.coordinatesConverter=t,this.cursorConfig=i}}class ov{constructor(e){this.modelState=e,this.viewState=null}}class rv{constructor(e){this.modelState=null,this.viewState=e}}class sv{constructor(e,t){this.modelState=e,this.viewState=t}static fromModelState(e){return new ov(e)}static fromViewState(e){return new rv(e)}static fromModelSelection(e){const t=e.selectionStartLineNumber,i=e.selectionStartColumn,n=e.positionLineNumber,o=e.positionColumn,r=new iv(new Jt(t,i,t,i),0,new Qt(n,o),0);return sv.fromModelState(r)}static fromModelSelections(e){let t=[];for(let i=0,n=e.length;i<n;i++)t[i]=this.fromModelSelection(e[i]);return t}equals(e){return this.viewState.equals(e.viewState)&&this.modelState.equals(e.modelState)}}class av{constructor(e,t,i){this.type=e,this.commands=t,this.shouldPushStackElementBefore=i.shouldPushStackElementBefore,this.shouldPushStackElementAfter=i.shouldPushStackElementAfter}}class lv{static visibleColumnFromColumn(e,t,i){const n=e.length,o=t-1<n?t-1:n;let r=0,s=0;while(s<o){const t=yr["y"](e,o,s);if(s+=t>=65536?2:1,9===t)r=lv.nextRenderTabStop(r,i);else{let i=yr["w"](t);while(s<o){const t=yr["y"](e,o,s),n=yr["w"](t);if(yr["c"](i,n))break;s+=t>=65536?2:1,i=n}yr["C"](t)||yr["A"](t)?r+=2:r+=1}}return r}static visibleColumnFromColumn2(e,t,i){return this.visibleColumnFromColumn(t.getLineContent(i.lineNumber),i.column,e.tabSize)}static columnFromVisibleColumn(e,t,i){if(t<=0)return 1;const n=e.length;let o=0,r=1,s=0;while(s<n){const a=yr["y"](e,n,s);let l;if(s+=a>=65536?2:1,9===a)l=lv.nextRenderTabStop(o,i);else{let t=yr["w"](a);while(s<n){const i=yr["y"](e,n,s),o=yr["w"](i);if(yr["c"](t,o))break;s+=i>=65536?2:1,t=o}l=yr["C"](a)||yr["A"](a)?o+2:o+1}const c=s+1;if(l>=t){const e=t-o,i=l-t;return i<e?c:r}o=l,r=c}return n+1}static columnFromVisibleColumn2(e,t,i,n){let o=this.columnFromVisibleColumn(t.getLineContent(i),n,e.tabSize),r=t.getLineMinColumn(i);if(o<r)return r;let s=t.getLineMaxColumn(i);return o>s?s:o}static nextRenderTabStop(e,t){return e+t-e%t}static nextIndentTabStop(e,t){return e+t-e%t}static prevRenderTabStop(e,t){return e-1-(e-1)%t}static prevIndentTabStop(e,t){return e-1-(e-1)%t}}function cv(e){return"'"===e||'"'===e||"`"===e}class hv{constructor(e,t){this.lastViewCursorsRenderData=e,this.lastTextareaPosition=t}}class dv{constructor(e,t,i=0,n=null,o=null,r=null){this.element=e,this.type=t,this.mouseColumn=i,this.position=n,!o&&n&&(o=new Jt(n.lineNumber,n.column,n.lineNumber,n.column)),this.range=o,this.detail=r}static _typeToString(e){return 1===e?"TEXTAREA":2===e?"GUTTER_GLYPH_MARGIN":3===e?"GUTTER_LINE_NUMBERS":4===e?"GUTTER_LINE_DECORATIONS":5===e?"GUTTER_VIEW_ZONE":6===e?"CONTENT_TEXT":7===e?"CONTENT_EMPTY":8===e?"CONTENT_VIEW_ZONE":9===e?"CONTENT_WIDGET":10===e?"OVERVIEW_RULER":11===e?"SCROLLBAR":12===e?"OVERLAY_WIDGET":"UNKNOWN"}static toString(e){return this._typeToString(e.type)+": "+e.position+" - "+e.range+" - "+e.detail}toString(){return dv.toString(this)}}class uv{static isTextArea(e){return 2===e.length&&3===e[0]&&6===e[1]}static isChildOfViewLines(e){return e.length>=4&&3===e[0]&&7===e[3]}static isStrictChildOfViewLines(e){return e.length>4&&3===e[0]&&7===e[3]}static isChildOfScrollableElement(e){return e.length>=2&&3===e[0]&&5===e[1]}static isChildOfMinimap(e){return e.length>=2&&3===e[0]&&8===e[1]}static isChildOfContentWidgets(e){return e.length>=4&&3===e[0]&&1===e[3]}static isChildOfOverflowingContentWidgets(e){return e.length>=1&&2===e[0]}static isChildOfOverlayWidgets(e){return e.length>=2&&3===e[0]&&4===e[1]}}class gv{constructor(e,t,i){this.model=e.model;const n=e.configuration.options;this.layoutInfo=n.get(117),this.viewDomNode=t.viewDomNode,this.lineHeight=n.get(51),this.typicalHalfwidthCharacterWidth=n.get(36).typicalHalfwidthCharacterWidth,this.lastRenderData=i,this._context=e,this._viewHelper=t}getZoneAtCoord(e){return gv.getZoneAtCoord(this._context,e)}static getZoneAtCoord(e,t){const i=e.viewLayout.getWhitespaceAtVerticalOffset(t);if(i){let n,o=i.verticalOffset+i.height/2,r=e.model.getLineCount(),s=null,a=null;return i.afterLineNumber!==r&&(a=new Qt(i.afterLineNumber+1,1)),i.afterLineNumber>0&&(s=new Qt(i.afterLineNumber,e.model.getLineMaxColumn(i.afterLineNumber))),n=null===a?s:null===s?a:t<o?s:a,{viewZoneId:i.id,afterLineNumber:i.afterLineNumber,positionBefore:s,positionAfter:a,position:n}}return null}getFullLineRangeAtCoord(e){if(this._context.viewLayout.isAfterLines(e)){const e=this._context.model.getLineCount(),t=this._context.model.getLineMaxColumn(e);return{range:new Jt(e,t,e,t),isAfterLines:!0}}const t=this._context.viewLayout.getLineNumberAtVerticalOffset(e),i=this._context.model.getLineMaxColumn(t);return{range:new Jt(t,1,t,i),isAfterLines:!1}}getLineNumberAtVerticalOffset(e){return this._context.viewLayout.getLineNumberAtVerticalOffset(e)}isAfterLines(e){return this._context.viewLayout.isAfterLines(e)}getVerticalOffsetForLineNumber(e){return this._context.viewLayout.getVerticalOffsetForLineNumber(e)}findAttribute(e,t){return gv._findAttribute(e,t,this._viewHelper.viewDomNode)}static _findAttribute(e,t,i){while(e&&e!==document.body){if(e.hasAttribute&&e.hasAttribute(t))return e.getAttribute(t);if(e===i)return null;e=e.parentNode}return null}getLineWidth(e){return this._viewHelper.getLineWidth(e)}visibleRangeForPosition(e,t){return this._viewHelper.visibleRangeForPosition(e,t)}getPositionFromDOMInfo(e,t){return this._viewHelper.getPositionFromDOMInfo(e,t)}getCurrentScrollTop(){return this._context.viewLayout.getCurrentScrollTop()}getCurrentScrollLeft(){return this._context.viewLayout.getCurrentScrollLeft()}}class fv{constructor(e,t,i){this.editorPos=t,this.pos=i,this.mouseVerticalOffset=Math.max(0,e.getCurrentScrollTop()+i.y-t.y),this.mouseContentHorizontalOffset=e.getCurrentScrollLeft()+i.x-t.x-e.layoutInfo.contentLeft,this.isInMarginArea=i.x-t.x<e.layoutInfo.contentLeft&&i.x-t.x>=e.layoutInfo.glyphMarginLeft,this.isInContentArea=!this.isInMarginArea,this.mouseColumn=Math.max(0,bv._getMouseColumn(this.mouseContentHorizontalOffset,e.typicalHalfwidthCharacterWidth))}}class mv extends fv{constructor(e,t,i,n){super(e,t,i),this._ctx=e,n?(this.target=n,this.targetPath=Km.collect(n,e.viewDomNode)):(this.target=null,this.targetPath=new Uint8Array(0))}toString(){return`pos(${this.pos.x},${this.pos.y}), editorPos(${this.editorPos.x},${this.editorPos.y}), mouseVerticalOffset: ${this.mouseVerticalOffset}, mouseContentHorizontalOffset: ${this.mouseContentHorizontalOffset}\n\ttarget: ${this.target?this.target.outerHTML:null}`}fulfill(e,t=null,i=null,n=null){let o=this.mouseColumn;return t&&t.column<this._ctx.model.getLineMaxColumn(t.lineNumber)&&(o=lv.visibleColumnFromColumn(this._ctx.model.getLineContent(t.lineNumber),t.column,this._ctx.model.getTextModelOptions().tabSize)+1),new dv(this.target,e,o,t,i,n)}withTarget(e){return new mv(this._ctx,this.editorPos,this.pos,e)}}const pv={isAfterLines:!0};function _v(e){return{isAfterLines:!1,horizontalDistanceToText:e}}class bv{constructor(e,t){this._context=e,this._viewHelper=t}mouseTargetIsWidget(e){const t=e.target,i=Km.collect(t,this._viewHelper.viewDomNode);return!(!uv.isChildOfContentWidgets(i)&&!uv.isChildOfOverflowingContentWidgets(i))||!!uv.isChildOfOverlayWidgets(i)}createMouseTarget(e,t,i,n){const o=new gv(this._context,this._viewHelper,e),r=new mv(o,t,i,n);try{const e=bv._createMouseTarget(o,r,!1);return e}catch(s){return r.fulfill(0)}}static _createMouseTarget(e,t,i){if(null===t.target){if(i)return t.fulfill(0);const n=bv._doHitTest(e,t);return n.position?bv.createMouseTargetFromHitTestPosition(e,t,n.position.lineNumber,n.position.column):this._createMouseTarget(e,t.withTarget(n.hitTarget),!0)}const n=t;let o=null;return o=o||bv._hitTestContentWidget(e,n),o=o||bv._hitTestOverlayWidget(e,n),o=o||bv._hitTestMinimap(e,n),o=o||bv._hitTestScrollbarSlider(e,n),o=o||bv._hitTestViewZone(e,n),o=o||bv._hitTestMargin(e,n),o=o||bv._hitTestViewCursor(e,n),o=o||bv._hitTestTextArea(e,n),o=o||bv._hitTestViewLines(e,n,i),o=o||bv._hitTestScrollbar(e,n),o||t.fulfill(0)}static _hitTestContentWidget(e,t){if(uv.isChildOfContentWidgets(t.targetPath)||uv.isChildOfOverflowingContentWidgets(t.targetPath)){const i=e.findAttribute(t.target,"widgetId");return i?t.fulfill(9,null,null,i):t.fulfill(0)}return null}static _hitTestOverlayWidget(e,t){if(uv.isChildOfOverlayWidgets(t.targetPath)){const i=e.findAttribute(t.target,"widgetId");return i?t.fulfill(12,null,null,i):t.fulfill(0)}return null}static _hitTestViewCursor(e,t){if(t.target){const i=e.lastRenderData.lastViewCursorsRenderData;for(const e of i)if(t.target===e.domNode)return t.fulfill(6,e.position)}if(t.isInContentArea){const i=e.lastRenderData.lastViewCursorsRenderData,n=t.mouseContentHorizontalOffset,o=t.mouseVerticalOffset;for(const r of i){if(n<r.contentLeft)continue;if(n>r.contentLeft+r.width)continue;const i=e.getVerticalOffsetForLineNumber(r.position.lineNumber);if(i<=o&&o<=i+r.height)return t.fulfill(6,r.position)}}return null}static _hitTestViewZone(e,t){const i=e.getZoneAtCoord(t.mouseVerticalOffset);if(i){const e=t.isInContentArea?8:5;return t.fulfill(e,i.position,null,i)}return null}static _hitTestTextArea(e,t){return uv.isTextArea(t.targetPath)?e.lastRenderData.lastTextareaPosition?t.fulfill(6,e.lastRenderData.lastTextareaPosition):t.fulfill(1,e.lastRenderData.lastTextareaPosition):null}static _hitTestMargin(e,t){if(t.isInMarginArea){const i=e.getFullLineRangeAtCoord(t.mouseVerticalOffset),n=i.range.getStartPosition();let o=Math.abs(t.pos.x-t.editorPos.x);const r={isAfterLines:i.isAfterLines,glyphMarginLeft:e.layoutInfo.glyphMarginLeft,glyphMarginWidth:e.layoutInfo.glyphMarginWidth,lineNumbersWidth:e.layoutInfo.lineNumbersWidth,offsetX:o};return o-=e.layoutInfo.glyphMarginLeft,o<=e.layoutInfo.glyphMarginWidth?t.fulfill(2,n,i.range,r):(o-=e.layoutInfo.glyphMarginWidth,o<=e.layoutInfo.lineNumbersWidth?t.fulfill(3,n,i.range,r):(o-=e.layoutInfo.lineNumbersWidth,t.fulfill(4,n,i.range,r)))}return null}static _hitTestViewLines(e,t,i){if(!uv.isChildOfViewLines(t.targetPath))return null;if(e.isAfterLines(t.mouseVerticalOffset)){const i=e.model.getLineCount(),n=e.model.getLineMaxColumn(i);return t.fulfill(7,new Qt(i,n),void 0,pv)}if(i){if(uv.isStrictChildOfViewLines(t.targetPath)){const i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset);if(0===e.model.getLineLength(i)){const n=e.getLineWidth(i),o=_v(t.mouseContentHorizontalOffset-n);return t.fulfill(7,new Qt(i,1),void 0,o)}const n=e.getLineWidth(i);if(t.mouseContentHorizontalOffset>=n){const o=_v(t.mouseContentHorizontalOffset-n),r=new Qt(i,e.model.getLineMaxColumn(i));return t.fulfill(7,r,void 0,o)}}return t.fulfill(0)}const n=bv._doHitTest(e,t);return n.position?bv.createMouseTargetFromHitTestPosition(e,t,n.position.lineNumber,n.position.column):this._createMouseTarget(e,t.withTarget(n.hitTarget),!0)}static _hitTestMinimap(e,t){if(uv.isChildOfMinimap(t.targetPath)){const i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),n=e.model.getLineMaxColumn(i);return t.fulfill(11,new Qt(i,n))}return null}static _hitTestScrollbarSlider(e,t){if(uv.isChildOfScrollableElement(t.targetPath)&&t.target&&1===t.target.nodeType){const i=t.target.className;if(i&&/\b(slider|scrollbar)\b/.test(i)){const i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),n=e.model.getLineMaxColumn(i);return t.fulfill(11,new Qt(i,n))}}return null}static _hitTestScrollbar(e,t){if(uv.isChildOfScrollableElement(t.targetPath)){const i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),n=e.model.getLineMaxColumn(i);return t.fulfill(11,new Qt(i,n))}return null}getMouseColumn(e,t){const i=this._context.configuration.options,n=i.get(117),o=this._context.viewLayout.getCurrentScrollLeft()+t.x-e.x-n.contentLeft;return bv._getMouseColumn(o,i.get(36).typicalHalfwidthCharacterWidth)}static _getMouseColumn(e,t){if(e<0)return 1;const i=Math.round(e/t);return i+1}static createMouseTargetFromHitTestPosition(e,t,i,n){const o=new Qt(i,n),r=e.getLineWidth(i);if(t.mouseContentHorizontalOffset>r){if(Qi&&1===o.column){const n=_v(t.mouseContentHorizontalOffset-r);return t.fulfill(7,new Qt(i,e.model.getLineMaxColumn(i)),void 0,n)}const n=_v(t.mouseContentHorizontalOffset-r);return t.fulfill(7,o,void 0,n)}const s=e.visibleRangeForPosition(i,n);if(!s)return t.fulfill(0,o);const a=s.left;if(t.mouseContentHorizontalOffset===a)return t.fulfill(6,o);const l=[];if(l.push({offset:s.left,column:n}),n>1){const t=e.visibleRangeForPosition(i,n-1);t&&l.push({offset:t.left,column:n-1})}const c=e.model.getLineMaxColumn(i);if(n<c){const t=e.visibleRangeForPosition(i,n+1);t&&l.push({offset:t.left,column:n+1})}l.sort((e,t)=>e.offset-t.offset);for(let h=1;h<l.length;h++){const e=l[h-1],n=l[h];if(e.offset<=t.mouseContentHorizontalOffset&&t.mouseContentHorizontalOffset<=n.offset){const r=new Jt(i,e.column,i,n.column);return t.fulfill(6,o,r)}}return t.fulfill(6,o)}static _doHitTestWithCaretRangeFromPoint(e,t){const i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),n=e.getVerticalOffsetForLineNumber(i),o=n+Math.floor(e.lineHeight/2);let r=t.pos.y+(o-t.mouseVerticalOffset);r<=t.editorPos.y&&(r=t.editorPos.y+1),r>=t.editorPos.y+e.layoutInfo.height&&(r=t.editorPos.y+e.layoutInfo.height-1);const s=new Rm(t.pos.x,r),a=this._actualDoHitTestWithCaretRangeFromPoint(e,s.toClientCoordinates());return a.position?a:this._actualDoHitTestWithCaretRangeFromPoint(e,t.pos.toClientCoordinates())}static _actualDoHitTestWithCaretRangeFromPoint(e,t){const i=zo(e.viewDomNode);let n;if(n=i?"undefined"===typeof i.caretRangeFromPoint?vv(i,t.clientX,t.clientY):i.caretRangeFromPoint(t.clientX,t.clientY):document.caretRangeFromPoint(t.clientX,t.clientY),!n||!n.startContainer)return{position:null,hitTarget:null};const o=n.startContainer;let r=null;if(o.nodeType===o.TEXT_NODE){const t=o.parentNode,i=t?t.parentNode:null,s=i?i.parentNode:null,a=s&&s.nodeType===s.ELEMENT_NODE?s.className:null;if(a===pp.CLASS_NAME){const i=e.getPositionFromDOMInfo(t,n.startOffset);return{position:i,hitTarget:null}}r=o.parentNode}else if(o.nodeType===o.ELEMENT_NODE){const t=o.parentNode,i=t?t.parentNode:null,n=i&&i.nodeType===i.ELEMENT_NODE?i.className:null;if(n===pp.CLASS_NAME){const t=e.getPositionFromDOMInfo(o,o.textContent.length);return{position:t,hitTarget:null}}r=o}return{position:null,hitTarget:r}}static _doHitTestWithCaretPositionFromPoint(e,t){const i=document.caretPositionFromPoint(t.clientX,t.clientY);if(i.offsetNode.nodeType===i.offsetNode.TEXT_NODE){const t=i.offsetNode.parentNode,n=t?t.parentNode:null,o=n?n.parentNode:null,r=o&&o.nodeType===o.ELEMENT_NODE?o.className:null;if(r===pp.CLASS_NAME){const t=e.getPositionFromDOMInfo(i.offsetNode.parentNode,i.offset);return{position:t,hitTarget:null}}return{position:null,hitTarget:i.offsetNode.parentNode}}if(i.offsetNode.nodeType===i.offsetNode.ELEMENT_NODE){const t=i.offsetNode.parentNode,n=t&&t.nodeType===t.ELEMENT_NODE?t.className:null;if(n===pp.CLASS_NAME){const t=i.offsetNode.childNodes[Math.min(i.offset,i.offsetNode.childNodes.length-1)];if(t){const i=e.getPositionFromDOMInfo(t,0);return{position:i,hitTarget:null}}}}return{position:null,hitTarget:i.offsetNode}}static _doHitTestWithMoveToPoint(e,t){let i=null,n=null;const o=document.body.createTextRange();try{o.moveToPoint(t.clientX,t.clientY)}catch(c){return{position:null,hitTarget:null}}o.collapse(!0);const r=o?o.parentElement():null,s=r?r.parentNode:null,a=s?s.parentNode:null,l=a&&a.nodeType===a.ELEMENT_NODE?a.className:"";if(l===pp.CLASS_NAME){const t=o.duplicate();t.moveToElementText(r),t.setEndPoint("EndToStart",o),i=e.getPositionFromDOMInfo(r,t.text.length),t.moveToElementText(e.viewDomNode)}else n=r;return o.moveToElementText(e.viewDomNode),{position:i,hitTarget:n}}static _doHitTest(e,t){return"function"===typeof document.caretRangeFromPoint?this._doHitTestWithCaretRangeFromPoint(e,t):document.caretPositionFromPoint?this._doHitTestWithCaretPositionFromPoint(e,t.pos.toClientCoordinates()):document.body.createTextRange?this._doHitTestWithMoveToPoint(e,t.pos.toClientCoordinates()):{position:null,hitTarget:null}}}function vv(e,t,i){const n=document.createRange();let o=e.elementFromPoint(t,i);if(null!==o){while(o&&o.firstChild&&o.firstChild.nodeType!==o.firstChild.TEXT_NODE)o=o.lastChild;const e=o.getBoundingClientRect(),i=window.getComputedStyle(o,null).getPropertyValue("font"),r=o.innerText;let s,a=e.left,l=0;if(t>e.left+e.width)l=r.length;else{const e=wv.getInstance();for(let n=0;n<r.length+1;n++){if(s=e.getCharWidth(r.charAt(n),i)/2,a+=s,t<a){l=n;break}a+=s}}n.setStart(o.firstChild,l),n.setEnd(o.firstChild,l)}return n}class wv{constructor(){this._cache={},this._canvas=document.createElement("canvas")}static getInstance(){return wv._INSTANCE||(wv._INSTANCE=new wv),wv._INSTANCE}getCharWidth(e,t){const i=e+t;if(this._cache[i])return this._cache[i];const n=this._canvas.getContext("2d");n.font=t;const o=n.measureText(e),r=o.width;return this._cache[i]=r,r}}function Cv(e){return function(t,i){let n=!1;return e&&(n=e.mouseTargetIsWidget(i)),n||i.preventDefault(),i}}wv._INSTANCE=null;class yv extends Um{constructor(e,t,i){super(),this._context=e,this.viewController=t,this.viewHelper=i,this.mouseTargetFactory=new bv(this._context,i),this._mouseDownOperation=this._register(new Sv(this._context,this.viewController,this.viewHelper,(e,t)=>this._createMouseTarget(e,t),e=>this._getMouseColumn(e))),this.lastMouseLeaveTime=-1;const n=new Vm(this.viewHelper.viewDomNode);this._register(n.onContextMenu(this.viewHelper.viewDomNode,e=>this._onContextMenu(e,!0))),this._register(n.onMouseMoveThrottled(this.viewHelper.viewDomNode,e=>this._onMouseMove(e),Cv(this.mouseTargetFactory),yv.MOUSE_MOVE_MINIMUM_TIME)),this._register(n.onMouseUp(this.viewHelper.viewDomNode,e=>this._onMouseUp(e))),this._register(n.onMouseLeave(this.viewHelper.viewDomNode,e=>this._onMouseLeave(e))),this._register(n.onMouseDown(this.viewHelper.viewDomNode,e=>this._onMouseDown(e)));const o=e=>{if(this.viewController.emitMouseWheel(e),!this._context.configuration.options.get(59))return;const t=new yn(e);if(t.browserEvent.ctrlKey||t.browserEvent.metaKey){const e=fs.getZoomLevel(),i=t.deltaY>0?1:-1;fs.setZoomLevel(e+i),t.preventDefault(),t.stopPropagation()}};this._register(ho(this.viewHelper.viewDomNode,Zo.MOUSE_WHEEL,o,{capture:!0,passive:!1})),this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}onCursorStateChanged(e){return this._mouseDownOperation.onCursorStateChanged(e),!1}onFocusChanged(e){return!1}onScrollChanged(e){return this._mouseDownOperation.onScrollChanged(),!1}getTargetAtClientPoint(e,t){const i=new Pm(e,t),n=i.toPageCoordinates(),o=Wm(this.viewHelper.viewDomNode);return n.y<o.y||n.y>o.y+o.height||n.x<o.x||n.x>o.x+o.width?null:this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),o,n,null)}_createMouseTarget(e,t){return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),e.editorPos,e.pos,t?e.target:null)}_getMouseColumn(e){return this.mouseTargetFactory.getMouseColumn(e.editorPos,e.pos)}_onContextMenu(e,t){this.viewController.emitContextMenu({event:e,target:this._createMouseTarget(e,t)})}_onMouseMove(e){if(this._mouseDownOperation.isActive())return;const t=e.timestamp;t<this.lastMouseLeaveTime||this.viewController.emitMouseMove({event:e,target:this._createMouseTarget(e,!0)})}_onMouseLeave(e){this.lastMouseLeaveTime=(new Date).getTime(),this.viewController.emitMouseLeave({event:e,target:null})}_onMouseUp(e){this.viewController.emitMouseUp({event:e,target:this._createMouseTarget(e,!0)})}_onMouseDown(e){const t=this._createMouseTarget(e,!0),i=6===t.type||7===t.type,n=2===t.type||3===t.type||4===t.type,o=3===t.type,s=this._context.configuration.options.get(90),a=8===t.type||5===t.type,l=9===t.type;let c=e.leftButton||e.middleButton;r["f"]&&e.leftButton&&e.ctrlKey&&(c=!1);const h=()=>{e.preventDefault(),this.viewHelper.focusTextArea()};if(c&&(i||o&&s))h(),this._mouseDownOperation.start(t.type,e);else if(n)e.preventDefault();else if(a){const i=t.detail;this.viewHelper.shouldSuppressMouseDownOnViewZone(i.viewZoneId)&&(h(),this._mouseDownOperation.start(t.type,e),e.preventDefault())}else l&&this.viewHelper.shouldSuppressMouseDownOnWidget(t.detail)&&(h(),e.preventDefault());this.viewController.emitMouseDown({event:e,target:t})}}yv.MOUSE_MOVE_MINIMUM_TIME=100;class Sv extends Oe{constructor(e,t,i,n,o){super(),this._context=e,this._viewController=t,this._viewHelper=i,this._createMouseTarget=n,this._getMouseColumn=o,this._mouseMoveMonitor=this._register(new zm(this._viewHelper.viewDomNode)),this._onScrollTimeout=this._register(new Dn),this._mouseState=new xv,this._currentSelection=new ei(1,1,1,1),this._isActive=!1,this._lastMouseEvent=null}dispose(){super.dispose()}isActive(){return this._isActive}_onMouseDownThenMove(e){this._lastMouseEvent=e,this._mouseState.setModifiers(e);const t=this._findMousePosition(e,!0);t&&(this._mouseState.isDragAndDrop?this._viewController.emitMouseDrag({event:e,target:t}):this._dispatchMouse(t,!0))}start(e,t){this._lastMouseEvent=t,this._mouseState.setStartedOnLineNumbers(3===e),this._mouseState.setStartButtons(t),this._mouseState.setModifiers(t);const i=this._findMousePosition(t,!0);if(!i||!i.position)return;this._mouseState.trySetCount(t.detail,i.position),t.detail=this._mouseState.count;const n=this._context.configuration.options;if(!n.get(72)&&n.get(25)&&!n.get(13)&&!this._mouseState.altKey&&t.detail<2&&!this._isActive&&!this._currentSelection.isEmpty()&&6===i.type&&i.position&&this._currentSelection.containsPosition(i.position))return this._mouseState.isDragAndDrop=!0,this._isActive=!0,void this._mouseMoveMonitor.startMonitoring(t.target,t.buttons,Cv(null),e=>this._onMouseDownThenMove(e),()=>{const e=this._findMousePosition(this._lastMouseEvent,!0);this._viewController.emitMouseDrop({event:this._lastMouseEvent,target:e?this._createMouseTarget(this._lastMouseEvent,!0):null}),this._stop()});this._mouseState.isDragAndDrop=!1,this._dispatchMouse(i,t.shiftKey),this._isActive||(this._isActive=!0,this._mouseMoveMonitor.startMonitoring(t.target,t.buttons,Cv(null),e=>this._onMouseDownThenMove(e),()=>this._stop()))}_stop(){this._isActive=!1,this._onScrollTimeout.cancel()}onScrollChanged(){this._isActive&&this._onScrollTimeout.setIfNotSet(()=>{if(!this._lastMouseEvent)return;const e=this._findMousePosition(this._lastMouseEvent,!1);e&&(this._mouseState.isDragAndDrop||this._dispatchMouse(e,!0))},10)}onCursorStateChanged(e){this._currentSelection=e.selections[0]}_getPositionOutsideEditor(e){const t=e.editorPos,i=this._context.model,n=this._context.viewLayout,o=this._getMouseColumn(e);if(e.posy<t.y){const i=Math.max(n.getCurrentScrollTop()-(t.y-e.posy),0),r=gv.getZoneAtCoord(this._context,i);if(r){const e=this._helpPositionJumpOverViewZone(r);if(e)return new dv(null,13,o,e)}const s=n.getLineNumberAtVerticalOffset(i);return new dv(null,13,o,new Qt(s,1))}if(e.posy>t.y+t.height){const r=n.getCurrentScrollTop()+(e.posy-t.y),s=gv.getZoneAtCoord(this._context,r);if(s){const e=this._helpPositionJumpOverViewZone(s);if(e)return new dv(null,13,o,e)}const a=n.getLineNumberAtVerticalOffset(r);return new dv(null,13,o,new Qt(a,i.getLineMaxColumn(a)))}const r=n.getLineNumberAtVerticalOffset(n.getCurrentScrollTop()+(e.posy-t.y));return e.posx<t.x?new dv(null,13,o,new Qt(r,1)):e.posx>t.x+t.width?new dv(null,13,o,new Qt(r,i.getLineMaxColumn(r))):null}_findMousePosition(e,t){const i=this._getPositionOutsideEditor(e);if(i)return i;const n=this._createMouseTarget(e,t),o=n.position;if(!o)return null;if(8===n.type||5===n.type){const e=this._helpPositionJumpOverViewZone(n.detail);if(e)return new dv(n.element,n.type,n.mouseColumn,e,null,n.detail)}return n}_helpPositionJumpOverViewZone(e){const t=new Qt(this._currentSelection.selectionStartLineNumber,this._currentSelection.selectionStartColumn),i=e.positionBefore,n=e.positionAfter;return i&&n?i.isBefore(t)?i:n:null}_dispatchMouse(e,t){e.position&&this._viewController.dispatchMouse({position:e.position,mouseColumn:e.mouseColumn,startedOnLineNumbers:this._mouseState.startedOnLineNumbers,inSelectionMode:t,mouseDownCount:this._mouseState.count,altKey:this._mouseState.altKey,ctrlKey:this._mouseState.ctrlKey,metaKey:this._mouseState.metaKey,shiftKey:this._mouseState.shiftKey,leftButton:this._mouseState.leftButton,middleButton:this._mouseState.middleButton})}}class xv{constructor(){this._altKey=!1,this._ctrlKey=!1,this._metaKey=!1,this._shiftKey=!1,this._leftButton=!1,this._middleButton=!1,this._startedOnLineNumbers=!1,this._lastMouseDownPosition=null,this._lastMouseDownPositionEqualCount=0,this._lastMouseDownCount=0,this._lastSetMouseDownCountTime=0,this.isDragAndDrop=!1}get altKey(){return this._altKey}get ctrlKey(){return this._ctrlKey}get metaKey(){return this._metaKey}get shiftKey(){return this._shiftKey}get leftButton(){return this._leftButton}get middleButton(){return this._middleButton}get startedOnLineNumbers(){return this._startedOnLineNumbers}get count(){return this._lastMouseDownCount}setModifiers(e){this._altKey=e.altKey,this._ctrlKey=e.ctrlKey,this._metaKey=e.metaKey,this._shiftKey=e.shiftKey}setStartButtons(e){this._leftButton=e.leftButton,this._middleButton=e.middleButton}setStartedOnLineNumbers(e){this._startedOnLineNumbers=e}trySetCount(e,t){const i=(new Date).getTime();i-this._lastSetMouseDownCountTime>xv.CLEAR_MOUSE_DOWN_COUNT_TIME&&(e=1),this._lastSetMouseDownCountTime=i,e>this._lastMouseDownCount+1&&(e=this._lastMouseDownCount+1),this._lastMouseDownPosition&&this._lastMouseDownPosition.equals(t)?this._lastMouseDownPositionEqualCount++:this._lastMouseDownPositionEqualCount=1,this._lastMouseDownPosition=t,this._lastMouseDownCount=Math.min(e,this._lastMouseDownPositionEqualCount)}}function Lv(e,t){const i={translationY:t.translationY,translationX:t.translationX};return e&&(i.translationY+=e.translationY,i.translationX+=e.translationX),i}xv.CLEAR_MOUSE_DOWN_COUNT_TIME=400;class kv extends yv{constructor(e,t,i){super(e,t,i),this.viewHelper.linesContentDomNode.style.touchAction="none",this._installGestureHandlerTimeout=window.setTimeout(()=>{if(this._installGestureHandlerTimeout=-1,window.MSGesture){const e=new MSGesture,t=new MSGesture;e.target=this.viewHelper.linesContentDomNode,t.target=this.viewHelper.linesContentDomNode,this.viewHelper.linesContentDomNode.addEventListener("pointerdown",i=>{const n=i.pointerType;"mouse"!==n?"touch"===n?(this._lastPointerType="touch",e.addPointer(i.pointerId)):(this._lastPointerType="pen",t.addPointer(i.pointerId)):this._lastPointerType="mouse"}),this._register(Lo(this.viewHelper.linesContentDomNode,"MSGestureChange",e=>this._onGestureChange(e),Lv)),this._register(ho(this.viewHelper.linesContentDomNode,"MSGestureTap",e=>this._onCaptureGestureTap(e),!0))}},100),this._lastPointerType="mouse"}_onMouseDown(e){"mouse"===this._lastPointerType&&super._onMouseDown(e)}_onCaptureGestureTap(e){const t=new Bm(e,this.viewHelper.viewDomNode),i=this._createMouseTarget(t,!1);i.position&&this.viewController.moveTo(i.position),t.browserEvent.fromElement?(t.preventDefault(),this.viewHelper.focusTextArea()):setTimeout(()=>{this.viewHelper.focusTextArea()})}_onGestureChange(e){this._context.model.deltaScrollNow(-e.translationX,-e.translationY)}dispose(){window.clearTimeout(this._installGestureHandlerTimeout),super.dispose()}}class Ev extends yv{constructor(e,t,i){super(e,t,i),this._register(Im.addTarget(this.viewHelper.linesContentDomNode)),this._register(ho(this.viewHelper.linesContentDomNode,Tm.Tap,e=>this.onTap(e))),this._register(ho(this.viewHelper.linesContentDomNode,Tm.Change,e=>this.onChange(e))),this._register(ho(this.viewHelper.linesContentDomNode,Tm.Contextmenu,e=>this._onContextMenu(new Bm(e,this.viewHelper.viewDomNode),!1))),this._lastPointerType="mouse",this._register(ho(this.viewHelper.linesContentDomNode,"pointerdown",e=>{const t=e.pointerType;this._lastPointerType="mouse"!==t?"touch"===t?"touch":"pen":"mouse"}));const n=new Hm(this.viewHelper.viewDomNode);this._register(n.onPointerMoveThrottled(this.viewHelper.viewDomNode,e=>this._onMouseMove(e),Cv(this.mouseTargetFactory),yv.MOUSE_MOVE_MINIMUM_TIME)),this._register(n.onPointerUp(this.viewHelper.viewDomNode,e=>this._onMouseUp(e))),this._register(n.onPointerLeave(this.viewHelper.viewDomNode,e=>this._onMouseLeave(e))),this._register(n.onPointerDown(this.viewHelper.viewDomNode,e=>this._onMouseDown(e)))}onTap(e){if(!e.initialTarget||!this.viewHelper.linesContentDomNode.contains(e.initialTarget))return;e.preventDefault(),this.viewHelper.focusTextArea();const t=this._createMouseTarget(new Bm(e,this.viewHelper.viewDomNode),!1);t.position&&this.viewController.dispatchMouse({position:t.position,mouseColumn:t.position.column,startedOnLineNumbers:!1,mouseDownCount:e.tapCount,inSelectionMode:!1,altKey:!1,ctrlKey:!1,metaKey:!1,shiftKey:!1,leftButton:!1,middleButton:!1})}onChange(e){"touch"===this._lastPointerType&&this._context.model.deltaScrollNow(-e.translationX,-e.translationY)}_onMouseDown(e){e.target&&this.viewHelper.linesContentDomNode.contains(e.target)&&"touch"===this._lastPointerType||super._onMouseDown(e)}}class Dv extends yv{constructor(e,t,i){super(e,t,i),this._register(Im.addTarget(this.viewHelper.linesContentDomNode)),this._register(ho(this.viewHelper.linesContentDomNode,Tm.Tap,e=>this.onTap(e))),this._register(ho(this.viewHelper.linesContentDomNode,Tm.Change,e=>this.onChange(e))),this._register(ho(this.viewHelper.linesContentDomNode,Tm.Contextmenu,e=>this._onContextMenu(new Bm(e,this.viewHelper.viewDomNode),!1)))}onTap(e){e.preventDefault(),this.viewHelper.focusTextArea();const t=this._createMouseTarget(new Bm(e,this.viewHelper.viewDomNode),!1);t.position&&this.viewController.moveTo(t.position)}onChange(e){this._context.model.deltaScrollNow(-e.translationX,-e.translationY)}}class Nv extends Oe{constructor(e,t,i){super(),r["c"]&&Qn.pointerEvents?this.handler=this._register(new Ev(e,t,i)):window.TouchEvent?this.handler=this._register(new Dv(e,t,i)):window.navigator.pointerEnabled||window.PointerEvent?this.handler=this._register(new kv(e,t,i)):this.handler=this._register(new yv(e,t,i))}getTargetAtClientPoint(e,t){return this.handler.getTargetAtClientPoint(e,t)}}i("1a37");class Tv{constructor(e,t,i,n,o){this.value=e,this.selectionStart=t,this.selectionEnd=i,this.selectionStartPosition=n,this.selectionEndPosition=o}toString(){return"[ <"+this.value+">, selectionStart: "+this.selectionStart+", selectionEnd: "+this.selectionEnd+"]"}static readFromTextArea(e){return new Tv(e.getValue(),e.getSelectionStart(),e.getSelectionEnd(),null,null)}collapseSelection(){return new Tv(this.value,this.value.length,this.value.length,null,null)}writeToTextArea(e,t,i){t.setValue(e,this.value),i&&t.setSelectionRange(e,this.selectionStart,this.selectionEnd)}deduceEditorPosition(e){if(e<=this.selectionStart){const t=this.value.substring(e,this.selectionStart);return this._finishDeduceEditorPosition(this.selectionStartPosition,t,-1)}if(e>=this.selectionEnd){const t=this.value.substring(this.selectionEnd,e);return this._finishDeduceEditorPosition(this.selectionEndPosition,t,1)}const t=this.value.substring(this.selectionStart,e);if(-1===t.indexOf(String.fromCharCode(8230)))return this._finishDeduceEditorPosition(this.selectionStartPosition,t,1);const i=this.value.substring(e,this.selectionEnd);return this._finishDeduceEditorPosition(this.selectionEndPosition,i,-1)}_finishDeduceEditorPosition(e,t,i){let n=0,o=-1;while(-1!==(o=t.indexOf("\n",o+1)))n++;return[e,i*t.length,n]}static selectedText(e){return new Tv(e,0,e.length,null,null)}static deduceInput(e,t,i){if(!e)return{text:"",replaceCharCnt:0};let n=e.value,o=e.selectionStart,r=e.selectionEnd,s=t.value,a=t.selectionStart,l=t.selectionEnd;const c=n.substring(r),h=s.substring(l),d=yr["e"](c,h);s=s.substring(0,s.length-d),n=n.substring(0,n.length-d);const u=n.substring(0,o),g=s.substring(0,a),f=yr["d"](u,g);if(s=s.substring(f),n=n.substring(f),a-=f,o-=f,l-=f,r-=f,i&&a===l&&n.length>0){let e=null;if(a===s.length?yr["P"](s,n)&&(e=s.substring(n.length)):yr["q"](s,n)&&(e=s.substring(0,s.length-n.length)),null!==e&&e.length>0&&(/\uFE0F/.test(e)||yr["j"](e)))return{text:e,replaceCharCnt:0}}if(a===l){if(n===s&&0===o&&r===n.length&&a===s.length&&-1===s.indexOf("\n")&&yr["k"](s))return{text:"",replaceCharCnt:0};const e=u.length-f;return{text:s,replaceCharCnt:e}}const m=r-o;return{text:s,replaceCharCnt:m}}}Tv.EMPTY=new Tv("",0,0,null,null);class Mv{static _getPageOfLine(e,t){return Math.floor((e-1)/t)}static _getRangeForPage(e,t){const i=e*t,n=i+1,o=i+t;return new Jt(n,1,o+1,1)}static fromEditorSelection(e,t,i,n,o){const r=Mv._getPageOfLine(i.startLineNumber,n),s=Mv._getRangeForPage(r,n),a=Mv._getPageOfLine(i.endLineNumber,n),l=Mv._getRangeForPage(a,n),c=s.intersectRanges(new Jt(1,1,i.startLineNumber,i.startColumn));let h=t.getValueInRange(c,1);const d=t.getLineCount(),u=t.getLineMaxColumn(d),g=l.intersectRanges(new Jt(i.endLineNumber,i.endColumn,d,u));let f,m=t.getValueInRange(g,1);if(r===a||r+1===a)f=t.getValueInRange(i,1);else{const e=s.intersectRanges(i),n=l.intersectRanges(i);f=t.getValueInRange(e,1)+String.fromCharCode(8230)+t.getValueInRange(n,1)}if(o){const e=500;h.length>e&&(h=h.substring(h.length-e,h.length)),m.length>e&&(m=m.substring(0,e)),f.length>2*e&&(f=f.substring(0,e)+String.fromCharCode(8230)+f.substring(f.length-e,f.length))}return new Tv(h+f+m,h.length,h.length+f.length,new Qt(i.startLineNumber,i.startColumn),new Qt(i.endLineNumber,i.endColumn))}}const Iv={forceCopyWithSyntaxHighlighting:!1};class Ov{constructor(){this._lastState=null}set(e,t){this._lastState={lastCopiedValue:e,data:t}}get(e){return this._lastState&&this._lastState.lastCopiedValue===e?this._lastState.data:(this._lastState=null,null)}}Ov.INSTANCE=new Ov;class Av extends Oe{constructor(e,t){super(),this.textArea=t,this._onFocus=this._register(new Ve),this.onFocus=this._onFocus.event,this._onBlur=this._register(new Ve),this.onBlur=this._onBlur.event,this._onKeyDown=this._register(new Ve),this.onKeyDown=this._onKeyDown.event,this._onKeyUp=this._register(new Ve),this.onKeyUp=this._onKeyUp.event,this._onCut=this._register(new Ve),this.onCut=this._onCut.event,this._onPaste=this._register(new Ve),this.onPaste=this._onPaste.event,this._onType=this._register(new Ve),this.onType=this._onType.event,this._onCompositionStart=this._register(new Ve),this.onCompositionStart=this._onCompositionStart.event,this._onCompositionUpdate=this._register(new Ve),this.onCompositionUpdate=this._onCompositionUpdate.event,this._onCompositionEnd=this._register(new Ve),this.onCompositionEnd=this._onCompositionEnd.event,this._onSelectionChangeRequest=this._register(new Ve),this.onSelectionChangeRequest=this._onSelectionChangeRequest.event,this._host=e,this._textArea=this._register(new Pv(t)),this._asyncTriggerCut=this._register(new Tn(()=>this._onCut.fire(),0)),this._textAreaState=Tv.EMPTY,this._selectionChangeListener=null,this.writeScreenReaderContent("ctor"),this._hasFocus=!1,this._isDoingComposition=!1,this._nextCommand=0;let i=null;this._register(fo(t.domNode,"keydown",e=>{(109===e.keyCode||this._isDoingComposition&&1===e.keyCode)&&e.stopPropagation(),e.equals(9)&&e.preventDefault(),i=e,this._onKeyDown.fire(e)})),this._register(fo(t.domNode,"keyup",e=>{this._onKeyUp.fire(e)})),this._register(ho(t.domNode,"compositionstart",e=>{if(this._isDoingComposition)return;this._isDoingComposition=!0;let t=!1;r["f"]&&i&&i.equals(109)&&this._textAreaState.selectionStart===this._textAreaState.selectionEnd&&this._textAreaState.selectionStart>0&&this._textAreaState.value.substr(this._textAreaState.selectionStart-1,1)===e.data&&("ArrowRight"!==i.code&&"ArrowLeft"!==i.code||(t=!0)),t?this._textAreaState=new Tv(this._textAreaState.value,this._textAreaState.selectionStart-1,this._textAreaState.selectionEnd,this._textAreaState.selectionStartPosition?new Qt(this._textAreaState.selectionStartPosition.lineNumber,this._textAreaState.selectionStartPosition.column-1):null,this._textAreaState.selectionEndPosition):Qi||this._setAndWriteTextAreaState("compositionstart",Tv.EMPTY),this._onCompositionStart.fire({moveOneCharacterLeft:t})}));const n=e=>{const t=this._textAreaState,i=Tv.readFromTextArea(this._textArea);return[i,Tv.deduceInput(t,i,e)]},o=e=>{const t=this._textAreaState,i=Tv.selectedText(e),n={text:i.value,replaceCharCnt:t.selectionEnd-t.selectionStart};return[i,n]},s=e=>!(!Qi||"ja"!==e);this._register(ho(t.domNode,"compositionupdate",e=>{if(s(e.locale)){const[t,i]=n(!1);return this._textAreaState=t,this._onType.fire(i),void this._onCompositionUpdate.fire(e)}const[t,i]=o(e.data||"");this._textAreaState=t,this._onType.fire(i),this._onCompositionUpdate.fire(e)})),this._register(ho(t.domNode,"compositionend",e=>{if(this._isDoingComposition){if(s(e.locale)){const[e,t]=n(!1);this._textAreaState=e,this._onType.fire(t)}else{const[t,i]=o(e.data||"");this._textAreaState=t,this._onType.fire(i)}(Qi||tn)&&(this._textAreaState=Tv.readFromTextArea(this._textArea)),this._isDoingComposition&&(this._isDoingComposition=!1,this._onCompositionEnd.fire())}})),this._register(ho(t.domNode,"input",()=>{if(this._textArea.setIgnoreSelectionChangeTime("received input event"),this._isDoingComposition)return;const[e,t]=n(r["f"]);0===t.replaceCharCnt&&1===t.text.length&&yr["D"](t.text.charCodeAt(0))||(this._textAreaState=e,0===this._nextCommand?""!==t.text&&this._onType.fire(t):(""===t.text&&0===t.replaceCharCnt||this._firePaste(t.text,null),this._nextCommand=0))})),this._register(ho(t.domNode,"cut",e=>{this._textArea.setIgnoreSelectionChangeTime("received cut event"),this._ensureClipboardGetsEditorSelection(e),this._asyncTriggerCut.schedule()})),this._register(ho(t.domNode,"copy",e=>{this._ensureClipboardGetsEditorSelection(e)})),this._register(ho(t.domNode,"paste",e=>{if(this._textArea.setIgnoreSelectionChangeTime("received paste event"),Rv.canUseTextData(e)){const[t,i]=Rv.getTextData(e);""!==t&&this._firePaste(t,i)}else this._textArea.getSelectionStart()!==this._textArea.getSelectionEnd()&&this._setAndWriteTextAreaState("paste",Tv.EMPTY),this._nextCommand=1})),this._register(ho(t.domNode,"focus",()=>{this._setHasFocus(!0)})),this._register(ho(t.domNode,"blur",()=>{this._setHasFocus(!1)}))}_installSelectionChangeListener(){let e=0;return ho(document,"selectionchange",t=>{if(!this._hasFocus)return;if(this._isDoingComposition)return;if(!tn)return;const i=Date.now(),n=i-e;if(e=i,n<5)return;const o=i-this._textArea.getIgnoreSelectionChangeTime();if(this._textArea.resetSelectionChangeTime(),o<100)return;if(!this._textAreaState.selectionStartPosition||!this._textAreaState.selectionEndPosition)return;const r=this._textArea.getValue();if(this._textAreaState.value!==r)return;const s=this._textArea.getSelectionStart(),a=this._textArea.getSelectionEnd();if(this._textAreaState.selectionStart===s&&this._textAreaState.selectionEnd===a)return;const l=this._textAreaState.deduceEditorPosition(s),c=this._host.deduceModelPosition(l[0],l[1],l[2]),h=this._textAreaState.deduceEditorPosition(a),d=this._host.deduceModelPosition(h[0],h[1],h[2]),u=new ei(c.lineNumber,c.column,d.lineNumber,d.column);this._onSelectionChangeRequest.fire(u)})}dispose(){super.dispose(),this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null)}focusTextArea(){this._setHasFocus(!0),this.refreshFocusState()}isFocused(){return this._hasFocus}refreshFocusState(){const e=zo(this.textArea.domNode);e?this._setHasFocus(e.activeElement===this.textArea.domNode):to(this.textArea.domNode)?this._setHasFocus(document.activeElement===this.textArea.domNode):this._setHasFocus(!1)}_setHasFocus(e){this._hasFocus!==e&&(this._hasFocus=e,this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null),this._hasFocus&&(this._selectionChangeListener=this._installSelectionChangeListener()),this._hasFocus&&(Qi?this._setAndWriteTextAreaState("focusgain",Tv.EMPTY):this.writeScreenReaderContent("focusgain")),this._hasFocus?this._onFocus.fire():this._onBlur.fire())}_setAndWriteTextAreaState(e,t){this._hasFocus||(t=t.collapseSelection()),t.writeToTextArea(e,this._textArea,this._hasFocus),this._textAreaState=t}writeScreenReaderContent(e){this._isDoingComposition||this._setAndWriteTextAreaState(e,this._host.getScreenReaderContent(this._textAreaState))}_ensureClipboardGetsEditorSelection(e){const t=this._host.getDataToCopy(Rv.canUseTextData(e)&&Qn.clipboard.richText),i={version:1,isFromEmptySelection:t.isFromEmptySelection,multicursorText:t.multicursorText,mode:t.mode};Ov.INSTANCE.set(Ji?t.text.replace(/\r\n/g,"\n"):t.text,i),Rv.canUseTextData(e)?Rv.setTextData(e,t.text,t.html,i):this._setAndWriteTextAreaState("copy or cut",Tv.selectedText(t.text))}_firePaste(e,t){t||(t=Ov.INSTANCE.get(e)),this._onPaste.fire({text:e,metadata:t})}}class Rv{static canUseTextData(e){return!!e.clipboardData||!!window.clipboardData}static getTextData(e){if(e.clipboardData){e.preventDefault();const i=e.clipboardData.getData("text/plain");let n=null;const o=e.clipboardData.getData("vscode-editor-data");if("string"===typeof o)try{n=JSON.parse(o),1!==n.version&&(n=null)}catch(t){}return[i,n]}if(window.clipboardData){e.preventDefault();const t=window.clipboardData.getData("Text");return[t,null]}throw new Error("ClipboardEventUtils.getTextData: Cannot use text data!")}static setTextData(e,t,i,n){if(e.clipboardData)return e.clipboardData.setData("text/plain",t),"string"===typeof i&&e.clipboardData.setData("text/html",i),e.clipboardData.setData("vscode-editor-data",JSON.stringify(n)),void e.preventDefault();if(window.clipboardData)return window.clipboardData.setData("Text",t),void e.preventDefault();throw new Error("ClipboardEventUtils.setTextData: Cannot use text data!")}}class Pv extends Oe{constructor(e){super(),this._actual=e,this._ignoreSelectionChangeTime=0}setIgnoreSelectionChangeTime(e){this._ignoreSelectionChangeTime=Date.now()}getIgnoreSelectionChangeTime(){return this._ignoreSelectionChangeTime}resetSelectionChangeTime(){this._ignoreSelectionChangeTime=0}getValue(){return this._actual.domNode.value}setValue(e,t){const i=this._actual.domNode;i.value!==t&&(this.setIgnoreSelectionChangeTime("setValue"),i.value=t)}getSelectionStart(){return this._actual.domNode.selectionStart}getSelectionEnd(){return this._actual.domNode.selectionEnd}setSelectionRange(e,t,i){const n=this._actual.domNode;let o=null;const r=zo(n);o=r?r.activeElement:document.activeElement;const s=o===n,a=n.selectionStart,l=n.selectionEnd;if(s&&a===t&&l===i)Ji&&window.parent!==window&&n.focus();else{if(s)return this.setIgnoreSelectionChangeTime("setSelectionRange"),n.setSelectionRange(t,i),void(Ji&&window.parent!==window&&n.focus());try{const e=Jo(n);this.setIgnoreSelectionChangeTime("setSelectionRange"),n.focus(),n.setSelectionRange(t,i),er(n,e)}catch(c){}}}}i("1f2d");class Fv extends Um{}const Wv={ColorContribution:"base.contributions.colors"};class Bv{constructor(){this._onDidChangeSchema=new Ve,this.onDidChangeSchema=this._onDidChangeSchema.event,this.colorSchema={type:"object",properties:{}},this.colorReferenceSchema={type:"string",enum:[],enumDescriptions:[]},this.colorsById={}}registerColor(e,t,i,n=!1,o){let r={id:e,description:i,defaults:t,needsTransparency:n,deprecationMessage:o};this.colorsById[e]=r;let s={type:"string",description:i,format:"color-hex",defaultSnippets:[{body:"${1:#ff0000}"}]};return o&&(s.deprecationMessage=o),this.colorSchema.properties[e]=s,this.colorReferenceSchema.enum.push(e),this.colorReferenceSchema.enumDescriptions.push(i),this._onDidChangeSchema.fire(),e}resolveDefaultColor(e,t){const i=this.colorsById[e];if(i&&i.defaults){const e=i.defaults[t.type];return EC(e,t)}}getColorSchema(){return this.colorSchema}toString(){let e=(e,t)=>{let i=-1===e.indexOf(".")?0:1,n=-1===t.indexOf(".")?0:1;return i!==n?i-n:e.localeCompare(t)};return Object.keys(this.colorsById).sort(e).map(e=>`- \`${e}\`: ${this.colorsById[e].description}`).join("\n")}}const Vv=new Bv;function Hv(e,t,i,n,o){return Vv.registerColor(e,t,i,n,o)}mu.add(Wv.ColorContribution,Vv);const zv=Hv("foreground",{dark:"#CCCCCC",light:"#616161",hc:"#FFFFFF"},o("foreground","Overall foreground color. This color is only used if not overridden by a component.")),Uv=(Hv("errorForeground",{dark:"#F48771",light:"#A1260D",hc:"#F48771"},o("errorForeground","Overall foreground color for error messages. This color is only used if not overridden by a component.")),Hv("icon.foreground",{dark:"#C5C5C5",light:"#424242",hc:"#FFFFFF"},o("iconForeground","The default color for icons in the workbench.")),Hv("focusBorder",{dark:"#007FD4",light:"#0090F1",hc:"#F38518"},o("focusBorder","Overall border color for focused elements. This color is only used if not overridden by a component."))),jv=Hv("contrastBorder",{light:null,dark:null,hc:"#6FC3DF"},o("contrastBorder","An extra border around elements to separate them from others for greater contrast.")),Kv=Hv("contrastActiveBorder",{light:null,dark:null,hc:Uv},o("activeContrastBorder","An extra border around active elements to separate them from others for greater contrast.")),qv=(Hv("textLink.foreground",{light:"#006AB1",dark:"#3794FF",hc:"#3794FF"},o("textLinkForeground","Foreground color for links in text.")),Hv("textCodeBlock.background",{light:"#dcdcdc66",dark:"#0a0a0a66",hc:Nb.black},o("textCodeBlockBackground","Background color for code blocks in text.")),Hv("widget.shadow",{dark:"#000000",light:"#A8A8A8",hc:null},o("widgetShadow","Shadow color of widgets such as find/replace inside the editor."))),$v=Hv("input.background",{dark:"#3C3C3C",light:Nb.white,hc:Nb.black},o("inputBoxBackground","Input box background.")),Gv=Hv("input.foreground",{dark:zv,light:zv,hc:zv},o("inputBoxForeground","Input box foreground.")),Yv=Hv("input.border",{dark:null,light:null,hc:jv},o("inputBoxBorder","Input box border.")),Xv=(Hv("inputOption.activeBorder",{dark:"#007ACC00",light:"#007ACC00",hc:jv},o("inputBoxActiveOptionBorder","Border color of activated options in input fields.")),Hv("inputOption.activeBackground",{dark:LC(Uv,.4),light:LC(Uv,.2),hc:Nb.transparent},o("inputOption.activeBackground","Background color of activated options in input fields.")),Hv("inputOption.activeForeground",{dark:Nb.white,light:Nb.black,hc:null},o("inputOption.activeForeground","Foreground color of activated options in input fields.")),Hv("inputValidation.infoBackground",{dark:"#063B49",light:"#D6ECF2",hc:Nb.black},o("inputValidationInfoBackground","Input validation background color for information severity."))),Zv=Hv("inputValidation.infoForeground",{dark:null,light:null,hc:null},o("inputValidationInfoForeground","Input validation foreground color for information severity.")),Qv=Hv("inputValidation.infoBorder",{dark:"#007acc",light:"#007acc",hc:jv},o("inputValidationInfoBorder","Input validation border color for information severity.")),Jv=Hv("inputValidation.warningBackground",{dark:"#352A05",light:"#F6F5D2",hc:Nb.black},o("inputValidationWarningBackground","Input validation background color for warning severity.")),ew=Hv("inputValidation.warningForeground",{dark:null,light:null,hc:null},o("inputValidationWarningForeground","Input validation foreground color for warning severity.")),tw=Hv("inputValidation.warningBorder",{dark:"#B89500",light:"#B89500",hc:jv},o("inputValidationWarningBorder","Input validation border color for warning severity.")),iw=Hv("inputValidation.errorBackground",{dark:"#5A1D1D",light:"#F2DEDE",hc:Nb.black},o("inputValidationErrorBackground","Input validation background color for error severity.")),nw=Hv("inputValidation.errorForeground",{dark:null,light:null,hc:null},o("inputValidationErrorForeground","Input validation foreground color for error severity.")),ow=Hv("inputValidation.errorBorder",{dark:"#BE1100",light:"#BE1100",hc:jv},o("inputValidationErrorBorder","Input validation border color for error severity.")),rw=Hv("dropdown.background",{dark:"#3C3C3C",light:Nb.white,hc:Nb.black},o("dropdownBackground","Dropdown background.")),sw=Hv("dropdown.foreground",{dark:"#F0F0F0",light:null,hc:Nb.white},o("dropdownForeground","Dropdown foreground.")),aw=Hv("button.foreground",{dark:Nb.white,light:Nb.white,hc:Nb.white},o("buttonForeground","Button foreground color.")),lw=Hv("button.background",{dark:"#0E639C",light:"#007ACC",hc:null},o("buttonBackground","Button background color.")),cw=Hv("button.hoverBackground",{dark:xC(lw,.2),light:SC(lw,.2),hc:null},o("buttonHoverBackground","Button background color when hovering.")),hw=Hv("badge.background",{dark:"#4D4D4D",light:"#C4C4C4",hc:Nb.black},o("badgeBackground","Badge background color. Badges are small information labels, e.g. for search results count.")),dw=Hv("badge.foreground",{dark:Nb.white,light:"#333",hc:Nb.white},o("badgeForeground","Badge foreground color. Badges are small information labels, e.g. for search results count.")),uw=Hv("scrollbar.shadow",{dark:"#000000",light:"#DDDDDD",hc:null},o("scrollbarShadow","Scrollbar shadow to indicate that the view is scrolled.")),gw=Hv("scrollbarSlider.background",{dark:Nb.fromHex("#797979").transparent(.4),light:Nb.fromHex("#646464").transparent(.4),hc:LC(jv,.6)},o("scrollbarSliderBackground","Scrollbar slider background color.")),fw=Hv("scrollbarSlider.hoverBackground",{dark:Nb.fromHex("#646464").transparent(.7),light:Nb.fromHex("#646464").transparent(.7),hc:LC(jv,.8)},o("scrollbarSliderHoverBackground","Scrollbar slider background color when hovering.")),mw=Hv("scrollbarSlider.activeBackground",{dark:Nb.fromHex("#BFBFBF").transparent(.4),light:Nb.fromHex("#000000").transparent(.6),hc:jv},o("scrollbarSliderActiveBackground","Scrollbar slider background color when clicked on.")),pw=Hv("progressBar.background",{dark:Nb.fromHex("#0E70C0"),light:Nb.fromHex("#0E70C0"),hc:jv},o("progressBarBackground","Background color of the progress bar that can show for long running operations.")),_w=Hv("editorError.foreground",{dark:"#F48771",light:"#E51400",hc:null},o("editorError.foreground","Foreground color of error squigglies in the editor.")),bw=Hv("editorError.border",{dark:null,light:null,hc:Nb.fromHex("#E47777").transparent(.8)},o("errorBorder","Border color of error boxes in the editor.")),vw=Hv("editorWarning.foreground",{dark:"#CCA700",light:"#E9A700",hc:null},o("editorWarning.foreground","Foreground color of warning squigglies in the editor.")),ww=Hv("editorWarning.border",{dark:null,light:null,hc:Nb.fromHex("#FFCC00").transparent(.8)},o("warningBorder","Border color of warning boxes in the editor.")),Cw=Hv("editorInfo.foreground",{dark:"#75BEFF",light:"#75BEFF",hc:null},o("editorInfo.foreground","Foreground color of info squigglies in the editor.")),yw=Hv("editorInfo.border",{dark:null,light:null,hc:Nb.fromHex("#75BEFF").transparent(.8)},o("infoBorder","Border color of info boxes in the editor.")),Sw=Hv("editorHint.foreground",{dark:Nb.fromHex("#eeeeee").transparent(.7),light:"#6c6c6c",hc:null},o("editorHint.foreground","Foreground color of hint squigglies in the editor.")),xw=Hv("editorHint.border",{dark:null,light:null,hc:Nb.fromHex("#eeeeee").transparent(.8)},o("hintBorder","Border color of hint boxes in the editor.")),Lw=Hv("editor.background",{light:"#fffffe",dark:"#1E1E1E",hc:Nb.black},o("editorBackground","Editor background color.")),kw=Hv("editor.foreground",{light:"#333333",dark:"#BBBBBB",hc:Nb.white},o("editorForeground","Editor default foreground color.")),Ew=Hv("editorWidget.background",{dark:"#252526",light:"#F3F3F3",hc:"#0C141F"},o("editorWidgetBackground","Background color of editor widgets, such as find/replace.")),Dw=Hv("editorWidget.foreground",{dark:zv,light:zv,hc:zv},o("editorWidgetForeground","Foreground color of editor widgets, such as find/replace.")),Nw=Hv("editorWidget.border",{dark:"#454545",light:"#C8C8C8",hc:jv},o("editorWidgetBorder","Border color of editor widgets. The color is only used if the widget chooses to have a border and if the color is not overridden by a widget.")),Tw=(Hv("editorWidget.resizeBorder",{light:null,dark:null,hc:null},o("editorWidgetResizeBorder","Border color of the resize bar of editor widgets. The color is only used if the widget chooses to have a resize border and if the color is not overridden by a widget.")),Hv("quickInput.background",{dark:Ew,light:Ew,hc:Ew},o("pickerBackground","Quick picker background color. The quick picker widget is the container for pickers like the command palette."))),Mw=Hv("quickInput.foreground",{dark:Dw,light:Dw,hc:Dw},o("pickerForeground","Quick picker foreground color. The quick picker widget is the container for pickers like the command palette.")),Iw=Hv("quickInputTitle.background",{dark:new Nb(new kb(255,255,255,.105)),light:new Nb(new kb(0,0,0,.06)),hc:"#000000"},o("pickerTitleBackground","Quick picker title background color. The quick picker widget is the container for pickers like the command palette.")),Ow=Hv("pickerGroup.foreground",{dark:"#3794FF",light:"#0066BF",hc:Nb.white},o("pickerGroupForeground","Quick picker color for grouping labels.")),Aw=Hv("pickerGroup.border",{dark:"#3F3F46",light:"#CCCEDB",hc:Nb.white},o("pickerGroupBorder","Quick picker color for grouping borders.")),Rw=Hv("editor.selectionBackground",{light:"#ADD6FF",dark:"#264F78",hc:"#f3f518"},o("editorSelectionBackground","Color of the editor selection.")),Pw=Hv("editor.selectionForeground",{light:null,dark:null,hc:"#000000"},o("editorSelectionForeground","Color of the selected text for high contrast.")),Fw=Hv("editor.inactiveSelectionBackground",{light:LC(Rw,.5),dark:LC(Rw,.5),hc:LC(Rw,.5)},o("editorInactiveSelection","Color of the selection in an inactive editor. The color must not be opaque so as not to hide underlying decorations."),!0),Ww=Hv("editor.selectionHighlightBackground",{light:kC(Rw,Lw,.3,.6),dark:kC(Rw,Lw,.3,.6),hc:null},o("editorSelectionHighlight","Color for regions with the same content as the selection. The color must not be opaque so as not to hide underlying decorations."),!0),Bw=(Hv("editor.selectionHighlightBorder",{light:null,dark:null,hc:Kv},o("editorSelectionHighlightBorder","Border color for regions with the same content as the selection.")),Hv("editor.findMatchBackground",{light:"#A8AC94",dark:"#515C6A",hc:null},o("editorFindMatch","Color of the current search match.")),Hv("editor.findMatchHighlightBackground",{light:"#EA5C0055",dark:"#EA5C0055",hc:null},o("findMatchHighlight","Color of the other search matches. The color must not be opaque so as not to hide underlying decorations."),!0)),Vw=(Hv("editor.findRangeHighlightBackground",{dark:"#3a3d4166",light:"#b4b4b44d",hc:null},o("findRangeHighlight","Color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0),Hv("editor.findMatchBorder",{light:null,dark:null,hc:Kv},o("editorFindMatchBorder","Border color of the current search match.")),Hv("editor.findMatchHighlightBorder",{light:null,dark:null,hc:Kv},o("findMatchHighlightBorder","Border color of the other search matches.")),Hv("editor.findRangeHighlightBorder",{dark:null,light:null,hc:LC(Kv,.4)},o("findRangeHighlightBorder","Border color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0),Hv("editor.hoverHighlightBackground",{light:"#ADD6FF26",dark:"#264f7840",hc:"#ADD6FF26"},o("hoverHighlight","Highlight below the word for which a hover is shown. The color must not be opaque so as not to hide underlying decorations."),!0),Hv("editorHoverWidget.background",{light:Ew,dark:Ew,hc:Ew},o("hoverBackground","Background color of the editor hover."))),Hw=(Hv("editorHoverWidget.foreground",{light:Dw,dark:Dw,hc:Dw},o("hoverForeground","Foreground color of the editor hover.")),Hv("editorHoverWidget.border",{light:Nw,dark:Nw,hc:Nw},o("hoverBorder","Border color of the editor hover.")),Hv("editorHoverWidget.statusBarBackground",{dark:xC(Vw,.2),light:SC(Vw,.05),hc:Ew},o("statusBarBackground","Background color of the editor hover status bar.")),Hv("editorLink.activeForeground",{dark:"#4E94CE",light:Nb.blue,hc:Nb.cyan},o("activeLinkForeground","Color of active links.")),Hv("editorLightBulb.foreground",{dark:"#FFCC00",light:"#DDB100",hc:"#FFCC00"},o("editorLightBulbForeground","The color used for the lightbulb actions icon.")),Hv("editorLightBulbAutoFix.foreground",{dark:"#75BEFF",light:"#007ACC",hc:"#75BEFF"},o("editorLightBulbAutoFixForeground","The color used for the lightbulb auto fix actions icon.")),new Nb(new kb(155,185,85,.2))),zw=new Nb(new kb(255,0,0,.2)),Uw=Hv("diffEditor.insertedTextBackground",{dark:Hw,light:Hw,hc:null},o("diffEditorInserted","Background color for text that got inserted. The color must not be opaque so as not to hide underlying decorations."),!0),jw=Hv("diffEditor.removedTextBackground",{dark:zw,light:zw,hc:null},o("diffEditorRemoved","Background color for text that got removed. The color must not be opaque so as not to hide underlying decorations."),!0),Kw=Hv("diffEditor.insertedTextBorder",{dark:null,light:null,hc:"#33ff2eff"},o("diffEditorInsertedOutline","Outline color for the text that got inserted.")),qw=Hv("diffEditor.removedTextBorder",{dark:null,light:null,hc:"#FF008F"},o("diffEditorRemovedOutline","Outline color for text that got removed.")),$w=Hv("diffEditor.border",{dark:null,light:null,hc:jv},o("diffEditorBorder","Border color between the two text editors.")),Gw=Hv("diffEditor.diagonalFill",{dark:"#cccccc33",light:"#22222233",hc:null},o("diffDiagonalFill","Color of the diff editor's diagonal fill. The diagonal fill is used in side-by-side diff views.")),Yw=Hv("list.focusBackground",{dark:"#062F4A",light:"#D6EBFF",hc:null},o("listFocusBackground","List/Tree background color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),Xw=Hv("list.focusForeground",{dark:null,light:null,hc:null},o("listFocusForeground","List/Tree foreground color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),Zw=Hv("list.activeSelectionBackground",{dark:"#094771",light:"#0074E8",hc:null},o("listActiveSelectionBackground","List/Tree background color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),Qw=Hv("list.activeSelectionForeground",{dark:Nb.white,light:Nb.white,hc:null},o("listActiveSelectionForeground","List/Tree foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),Jw=Hv("list.inactiveSelectionBackground",{dark:"#37373D",light:"#E4E6F1",hc:null},o("listInactiveSelectionBackground","List/Tree background color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),eC=Hv("list.inactiveSelectionForeground",{dark:null,light:null,hc:null},o("listInactiveSelectionForeground","List/Tree foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),tC=Hv("list.inactiveFocusBackground",{dark:null,light:null,hc:null},o("listInactiveFocusBackground","List/Tree background color for the focused item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),iC=Hv("list.hoverBackground",{dark:"#2A2D2E",light:"#F0F0F0",hc:null},o("listHoverBackground","List/Tree background when hovering over items using the mouse.")),nC=Hv("list.hoverForeground",{dark:null,light:null,hc:null},o("listHoverForeground","List/Tree foreground when hovering over items using the mouse.")),oC=Hv("list.dropBackground",{dark:Yw,light:Yw,hc:null},o("listDropBackground","List/Tree drag and drop background when moving items around using the mouse.")),rC=(Hv("list.highlightForeground",{dark:"#0097fb",light:"#0066BF",hc:Uv},o("highlight","List/Tree foreground color of the match highlights when searching inside the list/tree.")),Hv("listFilterWidget.background",{light:"#efc1ad",dark:"#653723",hc:Nb.black},o("listFilterWidgetBackground","Background color of the type filter widget in lists and trees."))),sC=Hv("listFilterWidget.outline",{dark:Nb.transparent,light:Nb.transparent,hc:"#f38518"},o("listFilterWidgetOutline","Outline color of the type filter widget in lists and trees.")),aC=Hv("listFilterWidget.noMatchesOutline",{dark:"#BE1100",light:"#BE1100",hc:jv},o("listFilterWidgetNoMatchesOutline","Outline color of the type filter widget in lists and trees, when there are no matches.")),lC=Hv("tree.indentGuidesStroke",{dark:"#585858",light:"#a9a9a9",hc:"#a9a9a9"},o("treeIndentGuidesStroke","Tree stroke color for the indentation guides.")),cC=Hv("menu.border",{dark:null,light:null,hc:jv},o("menuBorder","Border color of menus.")),hC=Hv("menu.foreground",{dark:sw,light:zv,hc:sw},o("menuForeground","Foreground color of menu items.")),dC=Hv("menu.background",{dark:rw,light:rw,hc:rw},o("menuBackground","Background color of menu items.")),uC=Hv("menu.selectionForeground",{dark:Qw,light:Qw,hc:Qw},o("menuSelectionForeground","Foreground color of the selected menu item in menus.")),gC=Hv("menu.selectionBackground",{dark:Zw,light:Zw,hc:Zw},o("menuSelectionBackground","Background color of the selected menu item in menus.")),fC=Hv("menu.selectionBorder",{dark:null,light:null,hc:Kv},o("menuSelectionBorder","Border color of the selected menu item in menus.")),mC=Hv("menu.separatorBackground",{dark:"#BBBBBB",light:"#888888",hc:jv},o("menuSeparatorBackground","Color of a separator menu item in menus.")),pC=(Hv("editor.snippetTabstopHighlightBackground",{dark:new Nb(new kb(124,124,124,.3)),light:new Nb(new kb(10,50,100,.2)),hc:new Nb(new kb(124,124,124,.3))},o("snippetTabstopHighlightBackground","Highlight background color of a snippet tabstop.")),Hv("editor.snippetTabstopHighlightBorder",{dark:null,light:null,hc:null},o("snippetTabstopHighlightBorder","Highlight border color of a snippet tabstop.")),Hv("editor.snippetFinalTabstopHighlightBackground",{dark:null,light:null,hc:null},o("snippetFinalTabstopHighlightBackground","Highlight background color of the final tabstop of a snippet.")),Hv("editor.snippetFinalTabstopHighlightBorder",{dark:"#525252",light:new Nb(new kb(10,50,100,.5)),hc:"#525252"},o("snippetFinalTabstopHighlightBorder","Highlight border color of the final tabstop of a snippet.")),Hv("editorOverviewRuler.findMatchForeground",{dark:"#d186167e",light:"#d186167e",hc:"#AB5A00"},o("overviewRulerFindMatchForeground","Overview ruler marker color for find matches. The color must not be opaque so as not to hide underlying decorations."),!0),Hv("editorOverviewRuler.selectionHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hc:"#A0A0A0CC"},o("overviewRulerSelectionHighlightForeground","Overview ruler marker color for selection highlights. The color must not be opaque so as not to hide underlying decorations."),!0),Hv("minimap.findMatchHighlight",{light:"#d18616",dark:"#d18616",hc:"#AB5A00"},o("minimapFindMatchHighlight","Minimap marker color for find matches."),!0),Hv("minimap.selectionHighlight",{light:"#ADD6FF",dark:"#264F78",hc:"#ffffff"},o("minimapSelectionHighlight","Minimap marker color for the editor selection."),!0)),_C=Hv("minimap.errorHighlight",{dark:new Nb(new kb(255,18,18,.7)),light:new Nb(new kb(255,18,18,.7)),hc:new Nb(new kb(255,50,50,1))},o("minimapError","Minimap marker color for errors.")),bC=Hv("minimap.warningHighlight",{dark:vw,light:vw,hc:ww},o("overviewRuleWarning","Minimap marker color for warnings.")),vC=Hv("minimap.background",{dark:null,light:null,hc:null},o("minimapBackground","Minimap background color.")),wC=Hv("minimapSlider.background",{light:LC(gw,.5),dark:LC(gw,.5),hc:LC(gw,.5)},o("minimapSliderBackground","Minimap slider background color.")),CC=Hv("minimapSlider.hoverBackground",{light:LC(fw,.5),dark:LC(fw,.5),hc:LC(fw,.5)},o("minimapSliderHoverBackground","Minimap slider background color when hovering.")),yC=Hv("minimapSlider.activeBackground",{light:LC(mw,.5),dark:LC(mw,.5),hc:LC(mw,.5)},o("minimapSliderActiveBackground","Minimap slider background color when clicked on."));Hv("problemsErrorIcon.foreground",{dark:_w,light:_w,hc:_w},o("problemsErrorIconForeground","The color used for the problems error icon.")),Hv("problemsWarningIcon.foreground",{dark:vw,light:vw,hc:vw},o("problemsWarningIconForeground","The color used for the problems warning icon.")),Hv("problemsInfoIcon.foreground",{dark:Cw,light:Cw,hc:Cw},o("problemsInfoIconForeground","The color used for the problems info icon."));function SC(e,t){return i=>{let n=EC(e,i);if(n)return n.darken(t)}}function xC(e,t){return i=>{let n=EC(e,i);if(n)return n.lighten(t)}}function LC(e,t){return i=>{let n=EC(e,i);if(n)return n.transparent(t)}}function kC(e,t,i,n){return o=>{let r=EC(e,o);if(r){let e=EC(t,o);return e?r.isDarkerThan(e)?Nb.getLighterColor(r,e,i).transparent(n):Nb.getDarkerColor(r,e,i).transparent(n):r.transparent(i*n)}}}function EC(e,t){if(null!==e)return"string"===typeof e?"#"===e[0]?Nb.fromHex(e):t.getColor(e):e instanceof Nb?e:"function"===typeof e?e(t):void 0}const DC="vscode://schemas/workbench-colors";let NC=mu.as(pu.JSONContribution);NC.registerSchema(DC,Vv.getColorSchema());const TC=new Tn(()=>NC.notifySchemaChanged(DC),200);Vv.onDidChangeSchema(()=>{TC.isScheduled()||TC.schedule()});const MC=Hv("editor.lineHighlightBackground",{dark:null,light:null,hc:null},o("lineHighlight","Background color for the highlight of line at the cursor position.")),IC=Hv("editor.lineHighlightBorder",{dark:"#282828",light:"#eeeeee",hc:"#f38518"},o("lineHighlightBorderBox","Background color for the border around the line at the cursor position.")),OC=Hv("editor.rangeHighlightBackground",{dark:"#ffffff0b",light:"#fdff0033",hc:null},o("rangeHighlight","Background color of highlighted ranges, like by quick open and find features. The color must not be opaque so as not to hide underlying decorations."),!0),AC=Hv("editor.rangeHighlightBorder",{dark:null,light:null,hc:Kv},o("rangeHighlightBorder","Background color of the border around highlighted ranges."),!0),RC=Hv("editor.symbolHighlightBackground",{dark:Bw,light:Bw,hc:null},o("symbolHighlight","Background color of highlighted symbol, like for go to definition or go next/previous symbol. The color must not be opaque so as not to hide underlying decorations."),!0),PC=Hv("editor.symbolHighlightBorder",{dark:null,light:null,hc:Kv},o("symbolHighlightBorder","Background color of the border around highlighted symbols."),!0),FC=Hv("editorCursor.foreground",{dark:"#AEAFAD",light:Nb.black,hc:Nb.white},o("caret","Color of the editor cursor.")),WC=Hv("editorCursor.background",null,o("editorCursorBackground","The background color of the editor cursor. Allows customizing the color of a character overlapped by a block cursor.")),BC=Hv("editorWhitespace.foreground",{dark:"#e3e4e229",light:"#33333333",hc:"#e3e4e229"},o("editorWhitespaces","Color of whitespace characters in the editor.")),VC=Hv("editorIndentGuide.background",{dark:BC,light:BC,hc:BC},o("editorIndentGuides","Color of the editor indentation guides.")),HC=Hv("editorIndentGuide.activeBackground",{dark:BC,light:BC,hc:BC},o("editorActiveIndentGuide","Color of the active editor indentation guides.")),zC=Hv("editorLineNumber.foreground",{dark:"#858585",light:"#237893",hc:Nb.white},o("editorLineNumbers","Color of editor line numbers.")),UC=Hv("editorActiveLineNumber.foreground",{dark:"#c6c6c6",light:"#0B216F",hc:Kv},o("editorActiveLineNumber","Color of editor active line number"),!1,o("deprecatedEditorActiveLineNumber","Id is deprecated. Use 'editorLineNumber.activeForeground' instead.")),jC=Hv("editorLineNumber.activeForeground",{dark:UC,light:UC,hc:UC},o("editorActiveLineNumber","Color of editor active line number")),KC=Hv("editorRuler.foreground",{dark:"#5A5A5A",light:Nb.lightgrey,hc:Nb.white},o("editorRuler","Color of the editor rulers.")),qC=(Hv("editorCodeLens.foreground",{dark:"#999999",light:"#999999",hc:"#999999"},o("editorCodeLensForeground","Foreground color of editor CodeLens")),Hv("editorBracketMatch.background",{dark:"#0064001a",light:"#0064001a",hc:"#0064001a"},o("editorBracketMatchBackground","Background color behind matching brackets")),Hv("editorBracketMatch.border",{dark:"#888",light:"#B9B9B9",hc:jv},o("editorBracketMatchBorder","Color for matching brackets boxes")),Hv("editorOverviewRuler.border",{dark:"#7f7f7f4d",light:"#7f7f7f4d",hc:"#7f7f7f4d"},o("editorOverviewRulerBorder","Color of the overview ruler border."))),$C=Hv("editorOverviewRuler.background",null,o("editorOverviewRulerBackground","Background color of the editor overview ruler. Only used when the minimap is enabled and placed on the right side of the editor.")),GC=Hv("editorGutter.background",{dark:Lw,light:Lw,hc:Lw},o("editorGutter","Background color of the editor gutter. The gutter contains the glyph margins and the line numbers.")),YC=Hv("editorUnnecessaryCode.border",{dark:null,light:null,hc:Nb.fromHex("#fff").transparent(.8)},o("unnecessaryCodeBorder","Border color of unnecessary (unused) source code in the editor.")),XC=Hv("editorUnnecessaryCode.opacity",{dark:Nb.fromHex("#000a"),light:Nb.fromHex("#0007"),hc:null},o("unnecessaryCodeOpacity","Opacity of unnecessary (unused) source code in the editor. For example, \"#000000c0\" will render the code with 75% opacity. For high contrast themes, use the 'editorUnnecessaryCode.border' theme color to underline unnecessary code instead of fading it out.")),ZC=new Nb(new kb(0,122,204,.6)),QC=(Hv("editorOverviewRuler.rangeHighlightForeground",{dark:ZC,light:ZC,hc:ZC},o("overviewRulerRangeHighlight","Overview ruler marker color for range highlights. The color must not be opaque so as not to hide underlying decorations."),!0),Hv("editorOverviewRuler.errorForeground",{dark:new Nb(new kb(255,18,18,.7)),light:new Nb(new kb(255,18,18,.7)),hc:new Nb(new kb(255,50,50,1))},o("overviewRuleError","Overview ruler marker color for errors."))),JC=Hv("editorOverviewRuler.warningForeground",{dark:vw,light:vw,hc:ww},o("overviewRuleWarning","Overview ruler marker color for warnings.")),ey=Hv("editorOverviewRuler.infoForeground",{dark:Cw,light:Cw,hc:yw},o("overviewRuleInfo","Overview ruler marker color for infos."));cp((e,t)=>{const i=e.getColor(Lw);i&&t.addRule(`.monaco-editor, .monaco-editor-background, .monaco-editor .inputarea.ime-input { background-color: ${i}; }`);const n=e.getColor(kw);n&&t.addRule(`.monaco-editor, .monaco-editor .inputarea.ime-input { color: ${n}; }`);const o=e.getColor(GC);o&&t.addRule(`.monaco-editor .margin { background-color: ${o}; }`);const r=e.getColor(OC);r&&t.addRule(`.monaco-editor .rangeHighlight { background-color: ${r}; }`);const s=e.getColor(AC);s&&t.addRule(`.monaco-editor .rangeHighlight { border: 1px ${"hc"===e.type?"dotted":"solid"} ${s}; }`);const a=e.getColor(RC);a&&t.addRule(`.monaco-editor .symbolHighlight { background-color: ${a}; }`);const l=e.getColor(PC);l&&t.addRule(`.monaco-editor .symbolHighlight { border: 1px ${"hc"===e.type?"dotted":"solid"} ${l}; }`);const c=e.getColor(BC);c&&(t.addRule(`.monaco-editor .mtkw { color: ${c} !important; }`),t.addRule(`.monaco-editor .mtkz { color: ${c} !important; }`))});class ty extends Fv{constructor(e){super(),this._context=e,this._readConfig(),this._lastCursorModelPosition=new Qt(1,1),this._renderResult=null,this._context.addEventHandler(this)}_readConfig(){const e=this._context.configuration.options;this._lineHeight=e.get(51);const t=e.get(52);this._renderLineNumbers=t.renderType,this._renderCustomLineNumbers=t.renderFn,this._renderFinalNewline=e.get(76);const i=e.get(117);this._lineNumbersLeft=i.lineNumbersLeft,this._lineNumbersWidth=i.lineNumbersWidth}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){return this._readConfig(),!0}onCursorStateChanged(e){const t=e.selections[0].getPosition();return this._lastCursorModelPosition=this._context.model.coordinatesConverter.convertViewPositionToModelPosition(t),2===this._renderLineNumbers||3===this._renderLineNumbers}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_getLineRenderLineNumber(e){const t=this._context.model.coordinatesConverter.convertViewPositionToModelPosition(new Qt(e,1));if(1!==t.column)return"";const i=t.lineNumber;if(this._renderCustomLineNumbers)return this._renderCustomLineNumbers(i);if(2===this._renderLineNumbers){const e=Math.abs(this._lastCursorModelPosition.lineNumber-i);return 0===e?'<span class="relative-current-line-number">'+i+"</span>":String(e)}return 3===this._renderLineNumbers?this._lastCursorModelPosition.lineNumber===i||i%10===0?String(i):"":String(i)}prepareRender(e){if(0===this._renderLineNumbers)return void(this._renderResult=null);const t=r["d"]?this._lineHeight%2===0?" lh-even":" lh-odd":"",i=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber,o='<div class="'+ty.CLASS_NAME+t+'" style="left:'+this._lineNumbersLeft.toString()+"px;width:"+this._lineNumbersWidth.toString()+'px;">',s=this._context.model.getLineCount(),a=[];for(let r=i;r<=n;r++){const e=r-i;if(!this._renderFinalNewline&&r===s&&0===this._context.model.getLineLength(r)){a[e]="";continue}const t=this._getLineRenderLineNumber(r);a[e]=t?o+t+"</div>":""}this._renderResult=a}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}ty.CLASS_NAME="line-numbers",cp((e,t)=>{const i=e.getColor(zC);i&&t.addRule(`.monaco-editor .line-numbers { color: ${i}; }`);const n=e.getColor(jC);n&&t.addRule(`.monaco-editor .current-line ~ .line-numbers { color: ${n}; }`)});class iy extends jm{constructor(e){super(e);const t=this._context.configuration.options,i=t.get(117);this._canUseLayerHinting=!t.get(23),this._contentLeft=i.contentLeft,this._glyphMarginLeft=i.glyphMarginLeft,this._glyphMarginWidth=i.glyphMarginWidth,this._domNode=km(document.createElement("div")),this._domNode.setClassName(iy.OUTER_CLASS_NAME),this._domNode.setPosition("absolute"),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._glyphMarginBackgroundDomNode=km(document.createElement("div")),this._glyphMarginBackgroundDomNode.setClassName(iy.CLASS_NAME),this._domNode.appendChild(this._glyphMarginBackgroundDomNode)}dispose(){super.dispose()}getDomNode(){return this._domNode}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(117);return this._canUseLayerHinting=!t.get(23),this._contentLeft=i.contentLeft,this._glyphMarginLeft=i.glyphMarginLeft,this._glyphMarginWidth=i.glyphMarginWidth,!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollTopChanged}prepareRender(e){}render(e){this._domNode.setLayerHinting(this._canUseLayerHinting),this._domNode.setContain("strict");const t=e.scrollTop-e.bigNumbersDelta;this._domNode.setTop(-t);const i=Math.min(e.scrollHeight,1e6);this._domNode.setHeight(i),this._domNode.setWidth(this._contentLeft),this._glyphMarginBackgroundDomNode.setLeft(this._glyphMarginLeft),this._glyphMarginBackgroundDomNode.setWidth(this._glyphMarginWidth),this._glyphMarginBackgroundDomNode.setHeight(i)}}iy.CLASS_NAME="glyph-margin",iy.OUTER_CLASS_NAME="margin";i("53d7");const ny="monaco-mouse-cursor-text";class oy{constructor(e,t,i){this.top=e,this.left=t,this.width=i}setWidth(e){return new oy(this.top,this.left,e)}}const ry=Qi||Ji;class sy extends jm{constructor(e,t,i){super(e),this._primaryCursorPosition=new Qt(1,1),this._primaryCursorVisibleRange=null,this._viewController=t,this._viewHelper=i,this._scrollLeft=0,this._scrollTop=0;const n=this._context.configuration.options,s=n.get(117);this._setAccessibilityOptions(n),this._contentLeft=s.contentLeft,this._contentWidth=s.contentWidth,this._contentHeight=s.height,this._fontInfo=n.get(36),this._lineHeight=n.get(51),this._emptySelectionClipboard=n.get(26),this._copyWithSyntaxHighlighting=n.get(16),this._visibleTextArea=null,this._selections=[new ei(1,1,1,1)],this._modelSelections=[new ei(1,1,1,1)],this._lastRenderPosition=null,this.textArea=km(document.createElement("textarea")),Km.write(this.textArea,6),this.textArea.setClassName("inputarea "+ny),this.textArea.setAttribute("wrap","off"),this.textArea.setAttribute("autocorrect","off"),this.textArea.setAttribute("autocapitalize","off"),this.textArea.setAttribute("autocomplete","off"),this.textArea.setAttribute("spellcheck","false"),this.textArea.setAttribute("aria-label",this._getAriaLabel(n)),this.textArea.setAttribute("tabindex",String(n.get(102))),this.textArea.setAttribute("role","textbox"),this.textArea.setAttribute("aria-roledescription",o("editor","editor")),this.textArea.setAttribute("aria-multiline","true"),this.textArea.setAttribute("aria-haspopup","false"),this.textArea.setAttribute("aria-autocomplete","both"),r["h"]&&n.get(72)&&this.textArea.setAttribute("readonly","true"),this.textAreaCover=km(document.createElement("div")),this.textAreaCover.setPosition("absolute");const a={getLineCount:()=>this._context.model.getLineCount(),getLineMaxColumn:e=>this._context.model.getLineMaxColumn(e),getValueInRange:(e,t)=>this._context.model.getValueInRange(e,t)},l={getDataToCopy:e=>{const t=this._context.model.getPlainTextToCopy(this._modelSelections,this._emptySelectionClipboard,r["i"]),i=this._context.model.getEOL(),n=this._emptySelectionClipboard&&1===this._modelSelections.length&&this._modelSelections[0].isEmpty(),o=Array.isArray(t)?t:null,s=Array.isArray(t)?t.join(i):t;let a=void 0,l=null;if(e&&(Iv.forceCopyWithSyntaxHighlighting||this._copyWithSyntaxHighlighting&&s.length<65536)){const e=this._context.model.getRichTextToCopy(this._modelSelections,this._emptySelectionClipboard);e&&(a=e.html,l=e.mode)}return{isFromEmptySelection:n,multicursorText:o,text:s,html:a,mode:l}},getScreenReaderContent:e=>{if(1===this._accessibilitySupport){if(r["f"]){const e=this._selections[0];if(e.isEmpty()){const t=e.getStartPosition();let i=this._getWordBeforePosition(t);if(0===i.length&&(i=this._getCharacterBeforePosition(t)),i.length>0)return new Tv(i,i.length,i.length,t,t)}}return Tv.EMPTY}return Mv.fromEditorSelection(e,a,this._selections[0],this._accessibilityPageSize,0===this._accessibilitySupport)},deduceModelPosition:(e,t,i)=>this._context.model.deduceModelPositionRelativeToViewPosition(e,t,i)};this._textAreaInput=this._register(new Av(l,this.textArea)),this._register(this._textAreaInput.onKeyDown(e=>{this._viewController.emitKeyDown(e)})),this._register(this._textAreaInput.onKeyUp(e=>{this._viewController.emitKeyUp(e)})),this._register(this._textAreaInput.onPaste(e=>{let t=!1,i=null,n=null;e.metadata&&(t=this._emptySelectionClipboard&&!!e.metadata.isFromEmptySelection,i="undefined"!==typeof e.metadata.multicursorText?e.metadata.multicursorText:null,n=e.metadata.mode),this._viewController.paste(e.text,t,i,n)})),this._register(this._textAreaInput.onCut(()=>{this._viewController.cut()})),this._register(this._textAreaInput.onType(e=>{e.replaceCharCnt?this._viewController.replacePreviousChar(e.text,e.replaceCharCnt):this._viewController.type(e.text)})),this._register(this._textAreaInput.onSelectionChangeRequest(e=>{this._viewController.setSelection(e)})),this._register(this._textAreaInput.onCompositionStart(e=>{const t=this._selections[0].startLineNumber,i=this._selections[0].startColumn-(e.moveOneCharacterLeft?1:0);this._context.model.revealRange("keyboard",!0,new Jt(t,i,t,i),0,1);const n=this._viewHelper.visibleRangeForPositionRelativeToEditor(t,i);n&&(this._visibleTextArea=new oy(this._context.viewLayout.getVerticalOffsetForLineNumber(t),n.left,ry?0:1),this._render()),this.textArea.setClassName(`inputarea ${ny} ime-input`),this._viewController.compositionStart()})),this._register(this._textAreaInput.onCompositionUpdate(e=>{this._visibleTextArea=Qi?this._visibleTextArea.setWidth(0):this._visibleTextArea.setWidth(ay(e.data,this._fontInfo)),this._render()})),this._register(this._textAreaInput.onCompositionEnd(()=>{this._visibleTextArea=null,this._render(),this.textArea.setClassName("inputarea "+ny),this._viewController.compositionEnd()})),this._register(this._textAreaInput.onFocus(()=>{this._context.model.setHasFocus(!0)})),this._register(this._textAreaInput.onBlur(()=>{this._context.model.setHasFocus(!1)}))}dispose(){super.dispose()}_getWordBeforePosition(e){const t=this._context.model.getLineContent(e.lineNumber),i=I_(this._context.configuration.options.get(105));let n=e.column,o=0;while(n>1){const r=t.charCodeAt(n-2),s=i.get(r);if(0!==s||o>50)return t.substring(n-1,e.column-1);o++,n--}return t.substring(0,e.column-1)}_getCharacterBeforePosition(e){if(e.column>1){const t=this._context.model.getLineContent(e.lineNumber),i=t.charAt(e.column-2);if(!yr["D"](i.charCodeAt(0)))return i}return""}_getAriaLabel(e){const t=e.get(2);return 1===t?o("accessibilityOffAriaLabel","The editor is not accessible at this time. Press {0} for options.",r["d"]?"Shift+Alt+F1":"Alt+F1"):e.get(4)}_setAccessibilityOptions(e){this._accessibilitySupport=e.get(2);const t=e.get(3);2===this._accessibilitySupport&&t===ue.accessibilityPageSize.defaultValue?this._accessibilityPageSize=100:this._accessibilityPageSize=t}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(117);return this._setAccessibilityOptions(t),this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,this._contentHeight=i.height,this._fontInfo=t.get(36),this._lineHeight=t.get(51),this._emptySelectionClipboard=t.get(26),this._copyWithSyntaxHighlighting=t.get(16),this.textArea.setAttribute("aria-label",this._getAriaLabel(t)),this.textArea.setAttribute("tabindex",String(t.get(102))),r["h"]&&e.hasChanged(72)&&(t.get(72)?this.textArea.setAttribute("readonly","true"):this.textArea.removeAttribute("readonly")),e.hasChanged(2)&&this._textAreaInput.writeScreenReaderContent("strategy changed"),!0}onCursorStateChanged(e){return this._selections=e.selections.slice(0),this._modelSelections=e.modelSelections.slice(0),this._textAreaInput.writeScreenReaderContent("selection changed"),!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return this._scrollLeft=e.scrollLeft,this._scrollTop=e.scrollTop,!0}onZonesChanged(e){return!0}isFocused(){return this._textAreaInput.isFocused()}focusTextArea(){this._textAreaInput.focusTextArea()}getLastRenderData(){return this._lastRenderPosition}setAriaOptions(e){e.activeDescendant?(this.textArea.setAttribute("aria-haspopup","true"),this.textArea.setAttribute("aria-autocomplete","list"),this.textArea.setAttribute("aria-activedescendant",e.activeDescendant)):(this.textArea.setAttribute("aria-haspopup","false"),this.textArea.setAttribute("aria-autocomplete","both"),this.textArea.removeAttribute("aria-activedescendant")),e.role&&this.textArea.setAttribute("role",e.role)}prepareRender(e){this._primaryCursorPosition=new Qt(this._selections[0].positionLineNumber,this._selections[0].positionColumn),this._primaryCursorVisibleRange=e.visibleRangeForPosition(this._primaryCursorPosition)}render(e){this._textAreaInput.writeScreenReaderContent("render"),this._render()}_render(){if(this._visibleTextArea)return void this._renderInsideEditor(null,this._visibleTextArea.top-this._scrollTop,this._contentLeft+this._visibleTextArea.left-this._scrollLeft,this._visibleTextArea.width,this._lineHeight);if(!this._primaryCursorVisibleRange)return void this._renderAtTopLeft();const e=this._contentLeft+this._primaryCursorVisibleRange.left-this._scrollLeft;if(e<this._contentLeft||e>this._contentLeft+this._contentWidth)return void this._renderAtTopLeft();const t=this._context.viewLayout.getVerticalOffsetForLineNumber(this._selections[0].positionLineNumber)-this._scrollTop;t<0||t>this._contentHeight?this._renderAtTopLeft():r["f"]?this._renderInsideEditor(this._primaryCursorPosition,t,e,ry?0:1,this._lineHeight):this._renderInsideEditor(this._primaryCursorPosition,t,e,ry?0:1,ry?0:1)}_renderInsideEditor(e,t,i,n,o){this._lastRenderPosition=e;const r=this.textArea,s=this.textAreaCover;Nf.applyFontInfo(r,this._fontInfo),r.setTop(t),r.setLeft(i),r.setWidth(n),r.setHeight(o),s.setTop(0),s.setLeft(0),s.setWidth(0),s.setHeight(0)}_renderAtTopLeft(){this._lastRenderPosition=null;const e=this.textArea,t=this.textAreaCover;if(Nf.applyFontInfo(e,this._fontInfo),e.setTop(0),e.setLeft(0),t.setTop(0),t.setLeft(0),ry)return e.setWidth(0),e.setHeight(0),t.setWidth(0),void t.setHeight(0);e.setWidth(1),e.setHeight(1),t.setWidth(1),t.setHeight(1);const i=this._context.configuration.options;i.get(42)?t.setClassName("monaco-editor-background textAreaCover "+iy.OUTER_CLASS_NAME):0!==i.get(52).renderType?t.setClassName("monaco-editor-background textAreaCover "+ty.CLASS_NAME):t.setClassName("monaco-editor-background textAreaCover")}}function ay(e,t){const i=document.createElement("canvas"),n=i.getContext("2d");n.font=ly(t);const o=n.measureText(e);return Ji?o.width+2:o.width}function ly(e){return cy("normal",e.fontWeight,e.fontSize,e.lineHeight,e.fontFamily)}function cy(e,t,i,n,o){return`${e} normal ${t} ${i}px / ${n}px ${o}`}class hy{static columnSelect(e,t,i,n,o,r){let s=Math.abs(o-i)+1,a=i>o,l=n>r,c=n<r,h=[];for(let d=0;d<s;d++){let o=i+(a?-d:d),s=lv.columnFromVisibleColumn2(e,t,o,n),u=lv.columnFromVisibleColumn2(e,t,o,r),g=lv.visibleColumnFromColumn2(e,t,new Qt(o,s)),f=lv.visibleColumnFromColumn2(e,t,new Qt(o,u));if(c){if(g>r)continue;if(f<n)continue}if(l){if(f>n)continue;if(g<r)continue}h.push(new iv(new Jt(o,s,o,s),0,new Qt(o,u),0))}if(0===h.length)for(let d=0;d<s;d++){const e=i+(a?-d:d),n=t.getLineMaxColumn(e);h.push(new iv(new Jt(e,n,e,n),0,new Qt(e,n),0))}return{viewStates:h,reversed:a,fromLineNumber:i,fromVisualColumn:n,toLineNumber:o,toVisualColumn:r}}static columnSelectLeft(e,t,i){let n=i.toViewVisualColumn;return n>1&&n--,hy.columnSelect(e,t,i.fromViewLineNumber,i.fromViewVisualColumn,i.toViewLineNumber,n)}static columnSelectRight(e,t,i){let n=0;const o=Math.min(i.fromViewLineNumber,i.toViewLineNumber),r=Math.max(i.fromViewLineNumber,i.toViewLineNumber);for(let a=o;a<=r;a++){const i=t.getLineMaxColumn(a),o=lv.visibleColumnFromColumn2(e,t,new Qt(a,i));n=Math.max(n,o)}let s=i.toViewVisualColumn;return s<n&&s++,this.columnSelect(e,t,i.fromViewLineNumber,i.fromViewVisualColumn,i.toViewLineNumber,s)}static columnSelectUp(e,t,i,n){const o=n?e.pageSize:1,r=Math.max(1,i.toViewLineNumber-o);return this.columnSelect(e,t,i.fromViewLineNumber,i.fromViewVisualColumn,r,i.toViewVisualColumn)}static columnSelectDown(e,t,i,n){const o=n?e.pageSize:1,r=Math.min(t.getLineCount(),i.toViewLineNumber+o);return this.columnSelect(e,t,i.fromViewLineNumber,i.fromViewVisualColumn,r,i.toViewVisualColumn)}}class dy{constructor(e,t,i=!1){this._range=e,this._text=t,this.insertsAutoWhitespace=i}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){let i=t.getInverseEditOperations(),n=i[0].range;return new ei(n.endLineNumber,n.endColumn,n.endLineNumber,n.endColumn)}}class uy{constructor(e,t,i=!1){this._range=e,this._text=t,this.insertsAutoWhitespace=i}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){let i=t.getInverseEditOperations(),n=i[0].range;return new ei(n.startLineNumber,n.startColumn,n.startLineNumber,n.startColumn)}}class gy{constructor(e,t,i,n,o=!1){this._range=e,this._text=t,this._columnDeltaOffset=n,this._lineNumberDeltaOffset=i,this.insertsAutoWhitespace=o}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){let i=t.getInverseEditOperations(),n=i[0].range;return new ei(n.endLineNumber+this._lineNumberDeltaOffset,n.endColumn+this._columnDeltaOffset,n.endLineNumber+this._lineNumberDeltaOffset,n.endColumn+this._columnDeltaOffset)}}class fy{constructor(e,t,i,n=!1){this._range=e,this._text=t,this._initialSelection=i,this._forceMoveMarkers=n,this._selectionId=null}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text,this._forceMoveMarkers),this._selectionId=t.trackSelection(this._initialSelection)}computeCursorState(e,t){return t.getTrackedSelection(this._selectionId)}}class my{constructor(e,t,i){this.lineNumber=e,this.column=t,this.leftoverVisibleColumns=i}}class py{static leftPosition(e,t,i){return i>e.getLineMinColumn(t)?i-=yr["K"](e.getLineContent(t),i-1):t>1&&(t-=1,i=e.getLineMaxColumn(t)),new Qt(t,i)}static left(e,t,i,n){const o=py.leftPosition(t,i,n);return new my(o.lineNumber,o.column,0)}static moveLeft(e,t,i,n,o){let r,s;if(i.hasSelection()&&!n)r=i.selection.startLineNumber,s=i.selection.startColumn;else{let n=py.left(e,t,i.position.lineNumber,i.position.column-(o-1));r=n.lineNumber,s=n.column}return i.move(n,r,s,0)}static rightPosition(e,t,i){return i<e.getLineMaxColumn(t)?i+=yr["J"](e.getLineContent(t),i-1):t<e.getLineCount()&&(t+=1,i=e.getLineMinColumn(t)),new Qt(t,i)}static right(e,t,i,n){const o=py.rightPosition(t,i,n);return new my(o.lineNumber,o.column,0)}static moveRight(e,t,i,n,o){let r,s;if(i.hasSelection()&&!n)r=i.selection.endLineNumber,s=i.selection.endColumn;else{let n=py.right(e,t,i.position.lineNumber,i.position.column+(o-1));r=n.lineNumber,s=n.column}return i.move(n,r,s,0)}static down(e,t,i,n,o,r,s){const a=lv.visibleColumnFromColumn(t.getLineContent(i),n,e.tabSize)+o,l=t.getLineCount(),c=i===l&&n===t.getLineMaxColumn(i);return i+=r,i>l?(i=l,n=s?t.getLineMaxColumn(i):Math.min(t.getLineMaxColumn(i),n)):n=lv.columnFromVisibleColumn2(e,t,i,a),o=c?0:a-lv.visibleColumnFromColumn(t.getLineContent(i),n,e.tabSize),new my(i,n,o)}static moveDown(e,t,i,n,o){let r,s;i.hasSelection()&&!n?(r=i.selection.endLineNumber,s=i.selection.endColumn):(r=i.position.lineNumber,s=i.position.column);let a=py.down(e,t,r,s,i.leftoverVisibleColumns,o,!0);return i.move(n,a.lineNumber,a.column,a.leftoverVisibleColumns)}static translateDown(e,t,i){let n=i.selection,o=py.down(e,t,n.selectionStartLineNumber,n.selectionStartColumn,i.selectionStartLeftoverVisibleColumns,1,!1),r=py.down(e,t,n.positionLineNumber,n.positionColumn,i.leftoverVisibleColumns,1,!1);return new iv(new Jt(o.lineNumber,o.column,o.lineNumber,o.column),o.leftoverVisibleColumns,new Qt(r.lineNumber,r.column),r.leftoverVisibleColumns)}static up(e,t,i,n,o,r,s){const a=lv.visibleColumnFromColumn(t.getLineContent(i),n,e.tabSize)+o,l=1===i&&1===n;return i-=r,i<1?(i=1,n=s?t.getLineMinColumn(i):Math.min(t.getLineMaxColumn(i),n)):n=lv.columnFromVisibleColumn2(e,t,i,a),o=l?0:a-lv.visibleColumnFromColumn(t.getLineContent(i),n,e.tabSize),new my(i,n,o)}static moveUp(e,t,i,n,o){let r,s;i.hasSelection()&&!n?(r=i.selection.startLineNumber,s=i.selection.startColumn):(r=i.position.lineNumber,s=i.position.column);let a=py.up(e,t,r,s,i.leftoverVisibleColumns,o,!0);return i.move(n,a.lineNumber,a.column,a.leftoverVisibleColumns)}static translateUp(e,t,i){let n=i.selection,o=py.up(e,t,n.selectionStartLineNumber,n.selectionStartColumn,i.selectionStartLeftoverVisibleColumns,1,!1),r=py.up(e,t,n.positionLineNumber,n.positionColumn,i.leftoverVisibleColumns,1,!1);return new iv(new Jt(o.lineNumber,o.column,o.lineNumber,o.column),o.leftoverVisibleColumns,new Qt(r.lineNumber,r.column),r.leftoverVisibleColumns)}static moveToBeginningOfLine(e,t,i,n){let o,r=i.position.lineNumber,s=t.getLineMinColumn(r),a=t.getLineFirstNonWhitespaceColumn(r)||s,l=i.position.column;return o=l===a?s:a,i.move(n,r,o,0)}static moveToEndOfLine(e,t,i,n,o){let r=i.position.lineNumber,s=t.getLineMaxColumn(r);return i.move(n,r,s,o?1073741824-s:0)}static moveToBeginningOfBuffer(e,t,i,n){return i.move(n,1,1,0)}static moveToEndOfBuffer(e,t,i,n){let o=t.getLineCount(),r=t.getLineMaxColumn(o);return i.move(n,o,r,0)}}class _y{static deleteRight(e,t,i,n){let o=[],r=3!==e;for(let s=0,a=n.length;s<a;s++){const e=n[s];let a=e;if(a.isEmpty()){let n=e.getPosition(),o=py.right(t,i,n.lineNumber,n.column);a=new Jt(o.lineNumber,o.column,n.lineNumber,n.column)}a.isEmpty()?o[s]=null:(a.startLineNumber!==a.endLineNumber&&(r=!0),o[s]=new dy(a,""))}return[r,o]}static _isAutoClosingPairDelete(e,t,i){if("never"===e.autoClosingBrackets&&"never"===e.autoClosingQuotes)return!1;for(let n=0,o=i.length;n<o;n++){const o=i[n],r=o.getPosition();if(!o.isEmpty())return!1;const s=t.getLineContent(r.lineNumber),a=s[r.column-2],l=e.autoClosingPairsOpen2.get(a);if(!l)return!1;if(cv(a)){if("never"===e.autoClosingQuotes)return!1}else if("never"===e.autoClosingBrackets)return!1;const c=s[r.column-1];let h=!1;for(const e of l)e.open===a&&e.close===c&&(h=!0);if(!h)return!1}return!0}static _runAutoClosingPairDelete(e,t,i){let n=[];for(let o=0,r=i.length;o<r;o++){const e=i[o].getPosition(),t=new Jt(e.lineNumber,e.column-1,e.lineNumber,e.column+1);n[o]=new dy(t,"")}return[!0,n]}static deleteLeft(e,t,i,n){if(this._isAutoClosingPairDelete(t,i,n))return this._runAutoClosingPairDelete(t,i,n);let o=[],r=2!==e;for(let s=0,a=n.length;s<a;s++){const e=n[s];let a=e;if(a.isEmpty()){let n=e.getPosition();if(t.useTabStops&&n.column>1){let e=i.getLineContent(n.lineNumber),o=yr["u"](e),r=-1===o?e.length+1:o+1;if(n.column<=r){let e=lv.visibleColumnFromColumn2(t,i,n),o=lv.prevIndentTabStop(e,t.indentSize),r=lv.columnFromVisibleColumn2(t,i,n.lineNumber,o);a=new Jt(n.lineNumber,r,n.lineNumber,n.column)}else a=new Jt(n.lineNumber,n.column-1,n.lineNumber,n.column)}else{let e=py.left(t,i,n.lineNumber,n.column);a=new Jt(e.lineNumber,e.column,n.lineNumber,n.column)}}a.isEmpty()?o[s]=null:(a.startLineNumber!==a.endLineNumber&&(r=!0),o[s]=new dy(a,""))}return[r,o]}static cut(e,t,i){let n=[];for(let o=0,r=i.length;o<r;o++){const r=i[o];if(r.isEmpty())if(e.emptySelectionClipboard){let e,i,s,a,l=r.getPosition();l.lineNumber<t.getLineCount()?(e=l.lineNumber,i=1,s=l.lineNumber+1,a=1):l.lineNumber>1?(e=l.lineNumber-1,i=t.getLineMaxColumn(l.lineNumber-1),s=l.lineNumber,a=t.getLineMaxColumn(l.lineNumber)):(e=l.lineNumber,i=1,s=l.lineNumber,a=t.getLineMaxColumn(l.lineNumber));let c=new Jt(e,i,s,a);c.isEmpty()?n[o]=null:n[o]=new dy(c,"")}else n[o]=null;else n[o]=new dy(r,"")}return new av(0,n,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}}class by{static _createWord(e,t,i,n,o){return{start:n,end:o,wordType:t,nextCharClass:i}}static _findPreviousWordOnLine(e,t,i){let n=t.getLineContent(i.lineNumber);return this._doFindPreviousWordOnLine(n,e,i)}static _doFindPreviousWordOnLine(e,t,i){let n=0;for(let o=i.column-2;o>=0;o--){let i=e.charCodeAt(o),r=t.get(i);if(0===r){if(2===n)return this._createWord(e,n,r,o+1,this._findEndOfWord(e,t,n,o+1));n=1}else if(2===r){if(1===n)return this._createWord(e,n,r,o+1,this._findEndOfWord(e,t,n,o+1));n=2}else if(1===r&&0!==n)return this._createWord(e,n,r,o+1,this._findEndOfWord(e,t,n,o+1))}return 0!==n?this._createWord(e,n,1,0,this._findEndOfWord(e,t,n,0)):null}static _findEndOfWord(e,t,i,n){let o=e.length;for(let r=n;r<o;r++){let n=e.charCodeAt(r),o=t.get(n);if(1===o)return r;if(1===i&&2===o)return r;if(2===i&&0===o)return r}return o}static _findNextWordOnLine(e,t,i){let n=t.getLineContent(i.lineNumber);return this._doFindNextWordOnLine(n,e,i)}static _doFindNextWordOnLine(e,t,i){let n=0,o=e.length;for(let r=i.column-1;r<o;r++){let i=e.charCodeAt(r),o=t.get(i);if(0===o){if(2===n)return this._createWord(e,n,o,this._findStartOfWord(e,t,n,r-1),r);n=1}else if(2===o){if(1===n)return this._createWord(e,n,o,this._findStartOfWord(e,t,n,r-1),r);n=2}else if(1===o&&0!==n)return this._createWord(e,n,o,this._findStartOfWord(e,t,n,r-1),r)}return 0!==n?this._createWord(e,n,1,this._findStartOfWord(e,t,n,o-1),o):null}static _findStartOfWord(e,t,i,n){for(let o=n;o>=0;o--){let n=e.charCodeAt(o),r=t.get(n);if(1===r)return o+1;if(1===i&&2===r)return o+1;if(2===i&&0===r)return o+1}return 0}static moveWordLeft(e,t,i,n){let o=i.lineNumber,r=i.column;1===r&&o>1&&(o-=1,r=t.getLineMaxColumn(o));let s=by._findPreviousWordOnLine(e,t,new Qt(o,r));if(0===n)return new Qt(o,s?s.start+1:1);if(1===n)return s&&2===s.wordType&&s.end-s.start===1&&0===s.nextCharClass&&(s=by._findPreviousWordOnLine(e,t,new Qt(o,s.start+1))),new Qt(o,s?s.start+1:1);if(3===n){while(s&&2===s.wordType)s=by._findPreviousWordOnLine(e,t,new Qt(o,s.start+1));return new Qt(o,s?s.start+1:1)}return s&&r<=s.end+1&&(s=by._findPreviousWordOnLine(e,t,new Qt(o,s.start+1))),new Qt(o,s?s.end+1:1)}static _moveWordPartLeft(e,t){const i=t.lineNumber,n=e.getLineMaxColumn(i);if(1===t.column)return i>1?new Qt(i-1,e.getLineMaxColumn(i-1)):t;const o=e.getLineContent(i);for(let r=t.column-1;r>1;r--){const e=o.charCodeAt(r-2),t=o.charCodeAt(r-1);if(95===e&&95!==t)return new Qt(i,r);if(yr["F"](e)&&yr["G"](t))return new Qt(i,r);if(yr["G"](e)&&yr["G"](t)&&r+1<n){const e=o.charCodeAt(r);if(yr["F"](e))return new Qt(i,r)}}return new Qt(i,1)}static moveWordRight(e,t,i,n){let o=i.lineNumber,r=i.column,s=!1;r===t.getLineMaxColumn(o)&&o<t.getLineCount()&&(s=!0,o+=1,r=1);let a=by._findNextWordOnLine(e,t,new Qt(o,r));if(2===n)a&&2===a.wordType&&a.end-a.start===1&&0===a.nextCharClass&&(a=by._findNextWordOnLine(e,t,new Qt(o,a.end+1))),r=a?a.end+1:t.getLineMaxColumn(o);else if(3===n){s&&(r=0);while(a&&(2===a.wordType||a.start+1<=r))a=by._findNextWordOnLine(e,t,new Qt(o,a.end+1));r=a?a.start+1:t.getLineMaxColumn(o)}else a&&!s&&r>=a.start+1&&(a=by._findNextWordOnLine(e,t,new Qt(o,a.end+1))),r=a?a.start+1:t.getLineMaxColumn(o);return new Qt(o,r)}static _moveWordPartRight(e,t){const i=t.lineNumber,n=e.getLineMaxColumn(i);if(t.column===n)return i<e.getLineCount()?new Qt(i+1,1):t;const o=e.getLineContent(i);for(let r=t.column+1;r<n;r++){const e=o.charCodeAt(r-2),t=o.charCodeAt(r-1);if(95!==e&&95===t)return new Qt(i,r);if(yr["F"](e)&&yr["G"](t))return new Qt(i,r);if(yr["G"](e)&&yr["G"](t)&&r+1<n){const e=o.charCodeAt(r);if(yr["F"](e))return new Qt(i,r)}}return new Qt(i,n)}static _deleteWordLeftWhitespace(e,t){const i=e.getLineContent(t.lineNumber),n=t.column-2,o=yr["H"](i,n);return o+1<n?new Jt(t.lineNumber,o+2,t.lineNumber,t.column):null}static deleteWordLeft(e,t,i,n,o){if(!i.isEmpty())return i;const r=new Qt(i.positionLineNumber,i.positionColumn);let s=r.lineNumber,a=r.column;if(1===s&&1===a)return null;if(n){let e=this._deleteWordLeftWhitespace(t,r);if(e)return e}let l=by._findPreviousWordOnLine(e,t,r);return 0===o?l?a=l.start+1:a>1?a=1:(s--,a=t.getLineMaxColumn(s)):(l&&a<=l.end+1&&(l=by._findPreviousWordOnLine(e,t,new Qt(s,l.start+1))),l?a=l.end+1:a>1?a=1:(s--,a=t.getLineMaxColumn(s))),new Jt(s,a,r.lineNumber,r.column)}static _deleteWordPartLeft(e,t){if(!t.isEmpty())return t;const i=t.getPosition(),n=by._moveWordPartLeft(e,i);return new Jt(i.lineNumber,i.column,n.lineNumber,n.column)}static _findFirstNonWhitespaceChar(e,t){let i=e.length;for(let n=t;n<i;n++){let t=e.charAt(n);if(" "!==t&&"\t"!==t)return n}return i}static _deleteWordRightWhitespace(e,t){const i=e.getLineContent(t.lineNumber),n=t.column-1,o=this._findFirstNonWhitespaceChar(i,n);return n+1<o?new Jt(t.lineNumber,t.column,t.lineNumber,o+1):null}static deleteWordRight(e,t,i,n,o){if(!i.isEmpty())return i;const r=new Qt(i.positionLineNumber,i.positionColumn);let s=r.lineNumber,a=r.column;const l=t.getLineCount(),c=t.getLineMaxColumn(s);if(s===l&&a===c)return null;if(n){let e=this._deleteWordRightWhitespace(t,r);if(e)return e}let h=by._findNextWordOnLine(e,t,r);return 2===o?h?a=h.end+1:a<c||s===l?a=c:(s++,h=by._findNextWordOnLine(e,t,new Qt(s,1)),a=h?h.start+1:t.getLineMaxColumn(s)):(h&&a>=h.start+1&&(h=by._findNextWordOnLine(e,t,new Qt(s,h.end+1))),h?a=h.start+1:a<c||s===l?a=c:(s++,h=by._findNextWordOnLine(e,t,new Qt(s,1)),a=h?h.start+1:t.getLineMaxColumn(s))),new Jt(s,a,r.lineNumber,r.column)}static _deleteWordPartRight(e,t){if(!t.isEmpty())return t;const i=t.getPosition(),n=by._moveWordPartRight(e,i);return new Jt(i.lineNumber,i.column,n.lineNumber,n.column)}static _createWordAtPosition(e,t,i){const n=new Jt(t,i.start+1,t,i.end+1);return{word:e.getValueInRange(n),startColumn:n.startColumn,endColumn:n.endColumn}}static getWordAtPosition(e,t,i){const n=I_(t),o=by._findPreviousWordOnLine(n,e,i);if(o&&1===o.wordType&&o.start<=i.column-1&&i.column-1<=o.end)return by._createWordAtPosition(e,i.lineNumber,o);const r=by._findNextWordOnLine(n,e,i);return r&&1===r.wordType&&r.start<=i.column-1&&i.column-1<=r.end?by._createWordAtPosition(e,i.lineNumber,r):null}static word(e,t,i,n,o){const r=I_(e.wordSeparators);let s,a,l=by._findPreviousWordOnLine(r,t,o),c=by._findNextWordOnLine(r,t,o);if(!n){let e,i;return l&&1===l.wordType&&l.start<=o.column-1&&o.column-1<=l.end?(e=l.start+1,i=l.end+1):c&&1===c.wordType&&c.start<=o.column-1&&o.column-1<=c.end?(e=c.start+1,i=c.end+1):(e=l?l.end+1:1,i=c?c.start+1:t.getLineMaxColumn(o.lineNumber)),new iv(new Jt(o.lineNumber,e,o.lineNumber,i),0,new Qt(o.lineNumber,i),0)}l&&1===l.wordType&&l.start<o.column-1&&o.column-1<l.end?(s=l.start+1,a=l.end+1):c&&1===c.wordType&&c.start<o.column-1&&o.column-1<c.end?(s=c.start+1,a=c.end+1):(s=o.column,a=o.column);let h,d=o.lineNumber;if(i.selectionStart.containsPosition(o))h=i.selectionStart.endColumn;else if(o.isBeforeOrEqual(i.selectionStart.getStartPosition())){h=s;let e=new Qt(d,h);i.selectionStart.containsPosition(e)&&(h=i.selectionStart.endColumn)}else{h=a;let e=new Qt(d,h);i.selectionStart.containsPosition(e)&&(h=i.selectionStart.startColumn)}return i.move(!0,d,h,0)}}class vy{static addCursorDown(e,t,i){let n=[],o=0;for(let r=0,s=t.length;r<s;r++){const s=t[r];n[o++]=new sv(s.modelState,s.viewState),n[o++]=i?sv.fromModelState(py.translateDown(e.cursorConfig,e.model,s.modelState)):sv.fromViewState(py.translateDown(e.cursorConfig,e,s.viewState))}return n}static addCursorUp(e,t,i){let n=[],o=0;for(let r=0,s=t.length;r<s;r++){const s=t[r];n[o++]=new sv(s.modelState,s.viewState),n[o++]=i?sv.fromModelState(py.translateUp(e.cursorConfig,e.model,s.modelState)):sv.fromViewState(py.translateUp(e.cursorConfig,e,s.viewState))}return n}static moveToBeginningOfLine(e,t,i){let n=[];for(let o=0,r=t.length;o<r;o++){const r=t[o];n[o]=this._moveToLineStart(e,r,i)}return n}static _moveToLineStart(e,t,i){const n=t.viewState.position.column,o=t.modelState.position.column,r=n===o,s=t.viewState.position.lineNumber,a=e.getLineFirstNonWhitespaceColumn(s),l=n===a;return r||l?this._moveToLineStartByModel(e,t,i):this._moveToLineStartByView(e,t,i)}static _moveToLineStartByView(e,t,i){return sv.fromViewState(py.moveToBeginningOfLine(e.cursorConfig,e,t.viewState,i))}static _moveToLineStartByModel(e,t,i){return sv.fromModelState(py.moveToBeginningOfLine(e.cursorConfig,e.model,t.modelState,i))}static moveToEndOfLine(e,t,i,n){let o=[];for(let r=0,s=t.length;r<s;r++){const s=t[r];o[r]=this._moveToLineEnd(e,s,i,n)}return o}static _moveToLineEnd(e,t,i,n){const o=t.viewState.position,r=e.getLineMaxColumn(o.lineNumber),s=o.column===r,a=t.modelState.position,l=e.model.getLineMaxColumn(a.lineNumber),c=r-o.column===l-a.column;return s||c?this._moveToLineEndByModel(e,t,i,n):this._moveToLineEndByView(e,t,i,n)}static _moveToLineEndByView(e,t,i,n){return sv.fromViewState(py.moveToEndOfLine(e.cursorConfig,e,t.viewState,i,n))}static _moveToLineEndByModel(e,t,i,n){return sv.fromModelState(py.moveToEndOfLine(e.cursorConfig,e.model,t.modelState,i,n))}static expandLineSelection(e,t){let i=[];for(let n=0,o=t.length;n<o;n++){const o=t[n],r=o.modelState.selection.startLineNumber,s=e.model.getLineCount();let a,l=o.modelState.selection.endLineNumber;l===s?a=e.model.getLineMaxColumn(s):(l++,a=1),i[n]=sv.fromModelState(new iv(new Jt(r,1,r,1),0,new Qt(l,a),0))}return i}static moveToBeginningOfBuffer(e,t,i){let n=[];for(let o=0,r=t.length;o<r;o++){const r=t[o];n[o]=sv.fromModelState(py.moveToBeginningOfBuffer(e.cursorConfig,e.model,r.modelState,i))}return n}static moveToEndOfBuffer(e,t,i){let n=[];for(let o=0,r=t.length;o<r;o++){const r=t[o];n[o]=sv.fromModelState(py.moveToEndOfBuffer(e.cursorConfig,e.model,r.modelState,i))}return n}static selectAll(e,t){const i=e.model.getLineCount(),n=e.model.getLineMaxColumn(i);return sv.fromModelState(new iv(new Jt(1,1,1,1),0,new Qt(i,n),0))}static line(e,t,i,n,o){const r=e.model.validatePosition(n),s=o?e.coordinatesConverter.validateViewPosition(new Qt(o.lineNumber,o.column),r):e.coordinatesConverter.convertModelPositionToViewPosition(r);if(!i||!t.modelState.hasSelection()){const t=e.model.getLineCount();let i=r.lineNumber+1,n=1;return i>t&&(i=t,n=e.model.getLineMaxColumn(i)),sv.fromModelState(new iv(new Jt(r.lineNumber,1,i,n),0,new Qt(i,n),0))}const a=t.modelState.selectionStart.getStartPosition().lineNumber;if(r.lineNumber<a)return sv.fromViewState(t.viewState.move(t.modelState.hasSelection(),s.lineNumber,1,0));if(r.lineNumber>a){const i=e.getLineCount();let n=s.lineNumber+1,o=1;return n>i&&(n=i,o=e.getLineMaxColumn(n)),sv.fromViewState(t.viewState.move(t.modelState.hasSelection(),n,o,0))}{const e=t.modelState.selectionStart.getEndPosition();return sv.fromModelState(t.modelState.move(t.modelState.hasSelection(),e.lineNumber,e.column,0))}}static word(e,t,i,n){const o=e.model.validatePosition(n);return sv.fromModelState(by.word(e.cursorConfig,e.model,t.modelState,i,o))}static cancelSelection(e,t){if(!t.modelState.hasSelection())return new sv(t.modelState,t.viewState);const i=t.viewState.position.lineNumber,n=t.viewState.position.column;return sv.fromViewState(new iv(new Jt(i,n,i,n),0,new Qt(i,n),0))}static moveTo(e,t,i,n,o){const r=e.model.validatePosition(n),s=o?e.coordinatesConverter.validateViewPosition(new Qt(o.lineNumber,o.column),r):e.coordinatesConverter.convertModelPositionToViewPosition(r);return sv.fromViewState(t.viewState.move(i,s.lineNumber,s.column,0))}static simpleMove(e,t,i,n,o,r){switch(i){case 0:return 4===r?this._moveHalfLineLeft(e,t,n):this._moveLeft(e,t,n,o);case 1:return 4===r?this._moveHalfLineRight(e,t,n):this._moveRight(e,t,n,o);case 2:return 2===r?this._moveUpByViewLines(e,t,n,o):this._moveUpByModelLines(e,t,n,o);case 3:return 2===r?this._moveDownByViewLines(e,t,n,o):this._moveDownByModelLines(e,t,n,o);case 4:return this._moveToViewMinColumn(e,t,n);case 5:return this._moveToViewFirstNonWhitespaceColumn(e,t,n);case 6:return this._moveToViewCenterColumn(e,t,n);case 7:return this._moveToViewMaxColumn(e,t,n);case 8:return this._moveToViewLastNonWhitespaceColumn(e,t,n);default:return null}}static viewportMove(e,t,i,n,o){const r=e.getCompletelyVisibleViewRange(),s=e.coordinatesConverter.convertViewRangeToModelRange(r);switch(i){case 9:{const i=this._firstLineNumberInRange(e.model,s,o),r=e.model.getLineFirstNonWhitespaceColumn(i);return[this._moveToModelPosition(e,t[0],n,i,r)]}case 11:{const i=this._lastLineNumberInRange(e.model,s,o),r=e.model.getLineFirstNonWhitespaceColumn(i);return[this._moveToModelPosition(e,t[0],n,i,r)]}case 10:{const i=Math.round((s.startLineNumber+s.endLineNumber)/2),o=e.model.getLineFirstNonWhitespaceColumn(i);return[this._moveToModelPosition(e,t[0],n,i,o)]}case 12:{let i=[];for(let o=0,s=t.length;o<s;o++){const s=t[o];i[o]=this.findPositionInViewportIfOutside(e,s,r,n)}return i}default:return null}}static findPositionInViewportIfOutside(e,t,i,n){let o=t.viewState.position.lineNumber;if(i.startLineNumber<=o&&o<=i.endLineNumber-1)return new sv(t.modelState,t.viewState);{o>i.endLineNumber-1&&(o=i.endLineNumber-1),o<i.startLineNumber&&(o=i.startLineNumber);const r=e.getLineFirstNonWhitespaceColumn(o);return this._moveToViewPosition(e,t,n,o,r)}}static _firstLineNumberInRange(e,t,i){let n=t.startLineNumber;return t.startColumn!==e.getLineMinColumn(n)&&n++,Math.min(t.endLineNumber,n+i-1)}static _lastLineNumberInRange(e,t,i){let n=t.startLineNumber;return t.startColumn!==e.getLineMinColumn(n)&&n++,Math.max(n,t.endLineNumber-i+1)}static _moveLeft(e,t,i,n){const o=t.length>1;let r=[];for(let s=0,a=t.length;s<a;s++){const a=t[s],l=o||!a.viewState.hasSelection();let c=py.moveLeft(e.cursorConfig,e,a.viewState,i,n);if(l&&1===n&&c.position.lineNumber!==a.viewState.position.lineNumber){const t=e.coordinatesConverter.convertViewPositionToModelPosition(c.position);t.lineNumber===a.modelState.position.lineNumber&&(c=py.moveLeft(e.cursorConfig,e,c,i,1))}r[s]=sv.fromViewState(c)}return r}static _moveHalfLineLeft(e,t,i){let n=[];for(let o=0,r=t.length;o<r;o++){const r=t[o],s=r.viewState.position.lineNumber,a=Math.round(e.getLineContent(s).length/2);n[o]=sv.fromViewState(py.moveLeft(e.cursorConfig,e,r.viewState,i,a))}return n}static _moveRight(e,t,i,n){const o=t.length>1;let r=[];for(let s=0,a=t.length;s<a;s++){const a=t[s],l=o||!a.viewState.hasSelection();let c=py.moveRight(e.cursorConfig,e,a.viewState,i,n);if(l&&1===n&&c.position.lineNumber!==a.viewState.position.lineNumber){const t=e.coordinatesConverter.convertViewPositionToModelPosition(c.position);t.lineNumber===a.modelState.position.lineNumber&&(c=py.moveRight(e.cursorConfig,e,c,i,1))}r[s]=sv.fromViewState(c)}return r}static _moveHalfLineRight(e,t,i){let n=[];for(let o=0,r=t.length;o<r;o++){const r=t[o],s=r.viewState.position.lineNumber,a=Math.round(e.getLineContent(s).length/2);n[o]=sv.fromViewState(py.moveRight(e.cursorConfig,e,r.viewState,i,a))}return n}static _moveDownByViewLines(e,t,i,n){let o=[];for(let r=0,s=t.length;r<s;r++){const s=t[r];o[r]=sv.fromViewState(py.moveDown(e.cursorConfig,e,s.viewState,i,n))}return o}static _moveDownByModelLines(e,t,i,n){let o=[];for(let r=0,s=t.length;r<s;r++){const s=t[r];o[r]=sv.fromModelState(py.moveDown(e.cursorConfig,e.model,s.modelState,i,n))}return o}static _moveUpByViewLines(e,t,i,n){let o=[];for(let r=0,s=t.length;r<s;r++){const s=t[r];o[r]=sv.fromViewState(py.moveUp(e.cursorConfig,e,s.viewState,i,n))}return o}static _moveUpByModelLines(e,t,i,n){let o=[];for(let r=0,s=t.length;r<s;r++){const s=t[r];o[r]=sv.fromModelState(py.moveUp(e.cursorConfig,e.model,s.modelState,i,n))}return o}static _moveToViewPosition(e,t,i,n,o){return sv.fromViewState(t.viewState.move(i,n,o,0))}static _moveToModelPosition(e,t,i,n,o){return sv.fromModelState(t.modelState.move(i,n,o,0))}static _moveToViewMinColumn(e,t,i){let n=[];for(let o=0,r=t.length;o<r;o++){const r=t[o],s=r.viewState.position.lineNumber,a=e.getLineMinColumn(s);n[o]=this._moveToViewPosition(e,r,i,s,a)}return n}static _moveToViewFirstNonWhitespaceColumn(e,t,i){let n=[];for(let o=0,r=t.length;o<r;o++){const r=t[o],s=r.viewState.position.lineNumber,a=e.getLineFirstNonWhitespaceColumn(s);n[o]=this._moveToViewPosition(e,r,i,s,a)}return n}static _moveToViewCenterColumn(e,t,i){let n=[];for(let o=0,r=t.length;o<r;o++){const r=t[o],s=r.viewState.position.lineNumber,a=Math.round((e.getLineMaxColumn(s)+e.getLineMinColumn(s))/2);n[o]=this._moveToViewPosition(e,r,i,s,a)}return n}static _moveToViewMaxColumn(e,t,i){let n=[];for(let o=0,r=t.length;o<r;o++){const r=t[o],s=r.viewState.position.lineNumber,a=e.getLineMaxColumn(s);n[o]=this._moveToViewPosition(e,r,i,s,a)}return n}static _moveToViewLastNonWhitespaceColumn(e,t,i){let n=[];for(let o=0,r=t.length;o<r;o++){const r=t[o],s=r.viewState.position.lineNumber,a=e.getLineLastNonWhitespaceColumn(s);n[o]=this._moveToViewPosition(e,r,i,s,a)}return n}}var wy;(function(e){const t=function(e){if(!Ar(e))return!1;let t=e;return!!Or(t.to)&&(!(!Fr(t.select)&&!Pr(t.select))&&(!(!Fr(t.by)&&!Or(t.by))&&!(!Fr(t.value)&&!Rr(t.value))))};function i(t){if(!t.to)return null;let i;switch(t.to){case e.RawDirection.Left:i=0;break;case e.RawDirection.Right:i=1;break;case e.RawDirection.Up:i=2;break;case e.RawDirection.Down:i=3;break;case e.RawDirection.WrappedLineStart:i=4;break;case e.RawDirection.WrappedLineFirstNonWhitespaceCharacter:i=5;break;case e.RawDirection.WrappedLineColumnCenter:i=6;break;case e.RawDirection.WrappedLineEnd:i=7;break;case e.RawDirection.WrappedLineLastNonWhitespaceCharacter:i=8;break;case e.RawDirection.ViewPortTop:i=9;break;case e.RawDirection.ViewPortBottom:i=11;break;case e.RawDirection.ViewPortCenter:i=10;break;case e.RawDirection.ViewPortIfOutside:i=12;break;default:return null}let n=0;switch(t.by){case e.RawUnit.Line:n=1;break;case e.RawUnit.WrappedLine:n=2;break;case e.RawUnit.Character:n=3;break;case e.RawUnit.HalfLine:n=4;break}return{direction:i,unit:n,select:!!t.select,value:t.value||1}}e.description={description:"Move cursor to a logical position in the view",args:[{name:"Cursor move argument object",description:"Property-value pairs that can be passed through this argument:\n\t\t\t\t\t* 'to': A mandatory logical position value providing where to move the cursor.\n\t\t\t\t\t\t```\n\t\t\t\t\t\t'left', 'right', 'up', 'down'\n\t\t\t\t\t\t'wrappedLineStart', 'wrappedLineEnd', 'wrappedLineColumnCenter'\n\t\t\t\t\t\t'wrappedLineFirstNonWhitespaceCharacter', 'wrappedLineLastNonWhitespaceCharacter'\n\t\t\t\t\t\t'viewPortTop', 'viewPortCenter', 'viewPortBottom', 'viewPortIfOutside'\n\t\t\t\t\t\t```\n\t\t\t\t\t* 'by': Unit to move. Default is computed based on 'to' value.\n\t\t\t\t\t\t```\n\t\t\t\t\t\t'line', 'wrappedLine', 'character', 'halfLine'\n\t\t\t\t\t\t```\n\t\t\t\t\t* 'value': Number of units to move. Default is '1'.\n\t\t\t\t\t* 'select': If 'true' makes the selection. Default is 'false'.\n\t\t\t\t",constraint:t,schema:{type:"object",required:["to"],properties:{to:{type:"string",enum:["left","right","up","down","wrappedLineStart","wrappedLineEnd","wrappedLineColumnCenter","wrappedLineFirstNonWhitespaceCharacter","wrappedLineLastNonWhitespaceCharacter","viewPortTop","viewPortCenter","viewPortBottom","viewPortIfOutside"]},by:{type:"string",enum:["line","wrappedLine","character","halfLine"]},value:{type:"number",default:1},select:{type:"boolean",default:!1}}}}]},e.RawDirection={Left:"left",Right:"right",Up:"up",Down:"down",WrappedLineStart:"wrappedLineStart",WrappedLineFirstNonWhitespaceCharacter:"wrappedLineFirstNonWhitespaceCharacter",WrappedLineColumnCenter:"wrappedLineColumnCenter",WrappedLineEnd:"wrappedLineEnd",WrappedLineLastNonWhitespaceCharacter:"wrappedLineLastNonWhitespaceCharacter",ViewPortTop:"viewPortTop",ViewPortCenter:"viewPortCenter",ViewPortBottom:"viewPortBottom",ViewPortIfOutside:"viewPortIfOutside"},e.RawUnit={Line:"line",WrappedLine:"wrappedLine",Character:"character",HalfLine:"halfLine"},e.parse=i})(wy||(wy={}));const Cy=Object.create(null);function yy(e,t){Cy[e]||(Cy[e]=["",e]);const i=Cy[e];for(let n=i.length;n<=t;n++)i[n]=i[n-1]+e;return i[t]}class Sy{constructor(e,t){this._opts=t,this._selection=e,this._selectionId=null,this._useLastEditRangeForCursorEndPosition=!1,this._selectionStartColumnStaysPut=!1}static unshiftIndent(e,t,i,n,o){const r=lv.visibleColumnFromColumn(e,t,i);if(o){const e=yy(" ",n),t=lv.prevIndentTabStop(r,n),i=t/n;return yy(e,i)}{const e="\t",t=lv.prevRenderTabStop(r,i),n=t/i;return yy(e,n)}}static shiftIndent(e,t,i,n,o){const r=lv.visibleColumnFromColumn(e,t,i);if(o){const e=yy(" ",n),t=lv.nextIndentTabStop(r,n),i=t/n;return yy(e,i)}{const e="\t",t=lv.nextRenderTabStop(r,i),n=t/i;return yy(e,n)}}_addEditOperation(e,t,i){this._useLastEditRangeForCursorEndPosition?e.addTrackedEditOperation(t,i):e.addEditOperation(t,i)}getEditOperations(e,t){const i=this._selection.startLineNumber;let n=this._selection.endLineNumber;1===this._selection.endColumn&&i!==n&&(n-=1);const{tabSize:o,indentSize:r,insertSpaces:s}=this._opts,a=i===n;if(this._opts.useTabStops){this._selection.isEmpty()&&/^\s*$/.test(e.getLineContent(i))&&(this._useLastEditRangeForCursorEndPosition=!0);let l=0,c=0;for(let h=i;h<=n;h++,l=c){c=0;let n,d=e.getLineContent(h),u=yr["u"](d);if((!this._opts.isUnshift||0!==d.length&&0!==u)&&(a||this._opts.isUnshift||0!==d.length)){if(-1===u&&(u=d.length),h>1){let t=lv.visibleColumnFromColumn(d,u+1,o);if(t%r!==0&&e.isCheapToTokenize(h-1)){let t=Kc.getEnterAction(this._opts.autoIndent,e,new Jt(h-1,e.getLineMaxColumn(h-1),h-1,e.getLineMaxColumn(h-1)));if(t){if(c=l,t.appendText)for(let e=0,i=t.appendText.length;e<i&&c<r;e++){if(32!==t.appendText.charCodeAt(e))break;c++}t.removeText&&(c=Math.max(0,c-t.removeText));for(let e=0;e<c;e++){if(0===u||32!==d.charCodeAt(u-1))break;u--}}}}this._opts.isUnshift&&0===u||(n=this._opts.isUnshift?Sy.unshiftIndent(d,u+1,o,r,s):Sy.shiftIndent(d,u+1,o,r,s),this._addEditOperation(t,new Jt(h,1,h,u+1),n),h!==i||this._selection.isEmpty()||(this._selectionStartColumnStaysPut=this._selection.startColumn<=u+1))}}}else{!this._opts.isUnshift&&this._selection.isEmpty()&&0===e.getLineLength(i)&&(this._useLastEditRangeForCursorEndPosition=!0);const o=s?yy(" ",r):"\t";for(let s=i;s<=n;s++){const n=e.getLineContent(s);let l=yr["u"](n);if((!this._opts.isUnshift||0!==n.length&&0!==l)&&((a||this._opts.isUnshift||0!==n.length)&&(-1===l&&(l=n.length),!this._opts.isUnshift||0!==l)))if(this._opts.isUnshift){l=Math.min(l,r);for(let e=0;e<l;e++){const t=n.charCodeAt(e);if(9===t){l=e+1;break}}this._addEditOperation(t,new Jt(s,1,s,l+1),"")}else this._addEditOperation(t,new Jt(s,1,s,1),o),s!==i||this._selection.isEmpty()||(this._selectionStartColumnStaysPut=1===this._selection.startColumn)}}this._selectionId=t.trackSelection(this._selection)}computeCursorState(e,t){if(this._useLastEditRangeForCursorEndPosition){let e=t.getInverseEditOperations()[0];return new ei(e.range.endLineNumber,e.range.endColumn,e.range.endLineNumber,e.range.endColumn)}const i=t.getTrackedSelection(this._selectionId);if(this._selectionStartColumnStaysPut){let e=this._selection.startColumn,t=i.startColumn;return t<=e?i:0===i.getDirection()?new ei(i.startLineNumber,e,i.endLineNumber,i.endColumn):new ei(i.endLineNumber,i.endColumn,i.startLineNumber,e)}return i}}class xy{constructor(e,t,i){this._range=e,this._charBeforeSelection=t,this._charAfterSelection=i}getEditOperations(e,t){t.addTrackedEditOperation(new Jt(this._range.startLineNumber,this._range.startColumn,this._range.startLineNumber,this._range.startColumn),this._charBeforeSelection),t.addTrackedEditOperation(new Jt(this._range.endLineNumber,this._range.endColumn,this._range.endLineNumber,this._range.endColumn),this._charAfterSelection)}computeCursorState(e,t){let i=t.getInverseEditOperations(),n=i[0].range,o=i[1].range;return new ei(n.endLineNumber,n.endColumn,o.endLineNumber,o.endColumn-this._charAfterSelection.length)}}class Ly{static indent(e,t,i){if(null===t||null===i)return[];let n=[];for(let o=0,r=i.length;o<r;o++)n[o]=new Sy(i[o],{isUnshift:!1,tabSize:e.tabSize,indentSize:e.indentSize,insertSpaces:e.insertSpaces,useTabStops:e.useTabStops,autoIndent:e.autoIndent});return n}static outdent(e,t,i){let n=[];for(let o=0,r=i.length;o<r;o++)n[o]=new Sy(i[o],{isUnshift:!0,tabSize:e.tabSize,indentSize:e.indentSize,insertSpaces:e.insertSpaces,useTabStops:e.useTabStops,autoIndent:e.autoIndent});return n}static shiftIndent(e,t,i){return i=i||1,Sy.shiftIndent(t,t.length+i,e.tabSize,e.indentSize,e.insertSpaces)}static unshiftIndent(e,t,i){return i=i||1,Sy.unshiftIndent(t,t.length+i,e.tabSize,e.indentSize,e.insertSpaces)}static _distributedPaste(e,t,i,n){let o=[];for(let r=0,s=i.length;r<s;r++)o[r]=new dy(i[r],n[r]);return new av(0,o,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}static _simplePaste(e,t,i,n,o){let r=[];for(let s=0,a=i.length;s<a;s++){const e=i[s];let t=e.getPosition();if(o&&!e.isEmpty()&&(o=!1),o&&n.indexOf("\n")!==n.length-1&&(o=!1),o){let i=new Jt(t.lineNumber,1,t.lineNumber,1);r[s]=new fy(i,n,e,!0)}else r[s]=new dy(e,n)}return new av(0,r,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}static _distributePasteToCursors(e,t,i,n,o){if(n)return null;if(1===t.length)return null;if(o&&o.length===t.length)return o;if("spread"===e.multiCursorPaste){10===i.charCodeAt(i.length-1)&&(i=i.substr(0,i.length-1)),13===i.charCodeAt(i.length-1)&&(i=i.substr(0,i.length-1));let e=i.split(/\r\n|\r|\n/);if(e.length===t.length)return e}return null}static paste(e,t,i,n,o,r){const s=this._distributePasteToCursors(e,i,n,o,r);return s?(i=i.sort(Jt.compareRangesUsingStarts),this._distributedPaste(e,t,i,s)):this._simplePaste(e,t,i,n,o)}static _goodIndentForLine(e,t,i){let n=null,o="";const r=Kc.getInheritIndentForLine(e.autoIndent,t,i,!1);if(r)n=r.action,o=r.indentation;else if(i>1){let n;for(n=i-1;n>=1;n--){const e=t.getLineContent(n),i=yr["H"](e);if(i>=0)break}if(n<1)return null;const r=t.getLineMaxColumn(n),s=Kc.getEnterAction(e.autoIndent,t,new Jt(n,r,n,r));s&&(o=s.indentation+s.appendText)}return n&&(n===hc.Indent&&(o=Ly.shiftIndent(e,o)),n===hc.Outdent&&(o=Ly.unshiftIndent(e,o)),o=e.normalizeIndentation(o)),o||null}static _replaceJumpToNextIndent(e,t,i,n){let o="",r=i.getStartPosition();if(e.insertSpaces){let i=lv.visibleColumnFromColumn2(e,t,r),n=e.indentSize,s=n-i%n;for(let e=0;e<s;e++)o+=" "}else o="\t";return new dy(i,o,n)}static tab(e,t,i){let n=[];for(let o=0,r=i.length;o<r;o++){const r=i[o];if(r.isEmpty()){let i=t.getLineContent(r.startLineNumber);if(/^\s*$/.test(i)&&t.isCheapToTokenize(r.startLineNumber)){let s=this._goodIndentForLine(e,t,r.startLineNumber);s=s||"\t";let a=e.normalizeIndentation(s);if(!yr["P"](i,a)){n[o]=new dy(new Jt(r.startLineNumber,1,r.startLineNumber,i.length+1),a,!0);continue}}n[o]=this._replaceJumpToNextIndent(e,t,r,!0)}else{if(r.startLineNumber===r.endLineNumber){let i=t.getLineMaxColumn(r.startLineNumber);if(1!==r.startColumn||r.endColumn!==i){n[o]=this._replaceJumpToNextIndent(e,t,r,!1);continue}}n[o]=new Sy(r,{isUnshift:!1,tabSize:e.tabSize,indentSize:e.indentSize,insertSpaces:e.insertSpaces,useTabStops:e.useTabStops,autoIndent:e.autoIndent})}}return n}static replacePreviousChar(e,t,i,n,o,r){let s=[];for(let a=0,l=n.length;a<l;a++){const e=n[a];if(!e.isEmpty()){s[a]=null;continue}const t=e.getPosition(),l=Math.max(1,t.column-r),c=new Jt(t.lineNumber,l,t.lineNumber,t.column),h=i.getValueInRange(c);h!==o?s[a]=new dy(c,o):s[a]=null}return new av(1,s,{shouldPushStackElementBefore:1!==e,shouldPushStackElementAfter:!1})}static _typeCommand(e,t,i){return i?new uy(e,t,!0):new dy(e,t,!0)}static _enter(e,t,i,n){if(0===e.autoIndent)return Ly._typeCommand(n,"\n",i);if(!t.isCheapToTokenize(n.getStartPosition().lineNumber)||1===e.autoIndent){let o=t.getLineContent(n.startLineNumber),r=yr["x"](o).substring(0,n.startColumn-1);return Ly._typeCommand(n,"\n"+e.normalizeIndentation(r),i)}const o=Kc.getEnterAction(e.autoIndent,t,n);if(o){if(o.indentAction===hc.None)return Ly._typeCommand(n,"\n"+e.normalizeIndentation(o.indentation+o.appendText),i);if(o.indentAction===hc.Indent)return Ly._typeCommand(n,"\n"+e.normalizeIndentation(o.indentation+o.appendText),i);if(o.indentAction===hc.IndentOutdent){const t=e.normalizeIndentation(o.indentation),r=e.normalizeIndentation(o.indentation+o.appendText),s="\n"+r+"\n"+t;return i?new uy(n,s,!0):new gy(n,s,-1,r.length-t.length,!0)}if(o.indentAction===hc.Outdent){const t=Ly.unshiftIndent(e,o.indentation);return Ly._typeCommand(n,"\n"+e.normalizeIndentation(t+o.appendText),i)}}const r=t.getLineContent(n.startLineNumber),s=yr["x"](r).substring(0,n.startColumn-1);if(e.autoIndent>=4){const o=Kc.getIndentForEnter(e.autoIndent,t,n,{unshiftIndent:t=>Ly.unshiftIndent(e,t),shiftIndent:t=>Ly.shiftIndent(e,t),normalizeIndentation:t=>e.normalizeIndentation(t)});if(o){let a=lv.visibleColumnFromColumn2(e,t,n.getEndPosition());const l=n.endColumn;let c="\n";s!==e.normalizeIndentation(o.beforeEnter)&&(c=e.normalizeIndentation(o.beforeEnter)+r.substring(s.length,n.startColumn-1)+"\n",n=new Jt(n.startLineNumber,1,n.endLineNumber,n.endColumn));const h=t.getLineContent(n.endLineNumber),d=yr["u"](h);if(n=d>=0?n.setEndPosition(n.endLineNumber,Math.max(n.endColumn,d+1)):n.setEndPosition(n.endLineNumber,t.getLineMaxColumn(n.endLineNumber)),i)return new uy(n,c+e.normalizeIndentation(o.afterEnter),!0);{let t=0;return l<=d+1&&(e.insertSpaces||(a=Math.ceil(a/e.indentSize)),t=Math.min(a+1-e.normalizeIndentation(o.afterEnter).length-1,0)),new gy(n,c+e.normalizeIndentation(o.afterEnter),0,t,!0)}}}return Ly._typeCommand(n,"\n"+e.normalizeIndentation(s),i)}static _isAutoIndentType(e,t,i){if(e.autoIndent<4)return!1;for(let n=0,o=i.length;n<o;n++)if(!t.isCheapToTokenize(i[n].getEndPosition().lineNumber))return!1;return!0}static _runAutoIndentType(e,t,i,n){const o=Kc.getIndentationAtPosition(t,i.startLineNumber,i.startColumn),r=Kc.getIndentActionForType(e.autoIndent,t,i,n,{shiftIndent:t=>Ly.shiftIndent(e,t),unshiftIndent:t=>Ly.unshiftIndent(e,t)});if(null===r)return null;if(r!==e.normalizeIndentation(o)){const o=t.getLineFirstNonWhitespaceColumn(i.startLineNumber);return 0===o?Ly._typeCommand(new Jt(i.startLineNumber,0,i.endLineNumber,i.endColumn),e.normalizeIndentation(r)+n,!1):Ly._typeCommand(new Jt(i.startLineNumber,0,i.endLineNumber,i.endColumn),e.normalizeIndentation(r)+t.getLineContent(i.startLineNumber).substring(o-1,i.startColumn-1)+n,!1)}return null}static _isAutoClosingOvertype(e,t,i,n,o){if("never"===e.autoClosingOvertype)return!1;if(!e.autoClosingPairsClose2.has(o))return!1;for(let r=0,s=i.length;r<s;r++){const s=i[r];if(!s.isEmpty())return!1;const a=s.getPosition(),l=t.getLineContent(a.lineNumber),c=l.charAt(a.column-1);if(c!==o)return!1;const h=cv(o),d=a.column>2?l.charCodeAt(a.column-2):0;if(92===d&&h)return!1;if("auto"===e.autoClosingOvertype){let e=!1;for(let t=0,i=n.length;t<i;t++){const i=n[t];if(a.lineNumber===i.startLineNumber&&a.column===i.startColumn){e=!0;break}}if(!e)return!1}}return!0}static _runAutoClosingOvertype(e,t,i,n,o){let r=[];for(let s=0,a=n.length;s<a;s++){const e=n[s],t=e.getPosition(),i=new Jt(t.lineNumber,t.column,t.lineNumber,t.column+1);r[s]=new dy(i,o)}return new av(1,r,{shouldPushStackElementBefore:1!==e,shouldPushStackElementAfter:!1})}static _autoClosingPairIsSymmetric(e){const{open:t,close:i}=e;return t.indexOf(i)>=0||i.indexOf(t)>=0}static _isBeforeClosingBrace(e,t,i){const n=e.autoClosingPairsClose2.get(i);if(!n)return!1;const o=Ly._autoClosingPairIsSymmetric(t);for(const r of n){const e=Ly._autoClosingPairIsSymmetric(r);if(o||!e)return!0}return!1}static _findAutoClosingPairOpen(e,t,i,n){const o=e.autoClosingPairsOpen2.get(n);if(!o)return null;let r=null;for(const s of o)if(null===r||s.open.length>r.open.length){let e=!0;for(const o of i){const i=t.getValueInRange(new Jt(o.lineNumber,o.column-s.open.length+1,o.lineNumber,o.column));if(i+n!==s.open){e=!1;break}}e&&(r=s)}return r}static _isAutoClosingOpenCharType(e,t,i,n,o){const r=cv(n),s=r?e.autoClosingQuotes:e.autoClosingBrackets;if("never"===s)return null;const a=this._findAutoClosingPairOpen(e,t,i.map(e=>e.getPosition()),n);if(!a)return null;const l=r?e.shouldAutoCloseBefore.quote:e.shouldAutoCloseBefore.bracket;for(let h=0,d=i.length;h<d;h++){const n=i[h];if(!n.isEmpty())return null;const d=n.getPosition(),u=t.getLineContent(d.lineNumber);if(u.length>d.column-1){const t=u.charAt(d.column-1),i=Ly._isBeforeClosingBrace(e,a,t);if(!i&&!l(t))return null}if(!t.isCheapToTokenize(d.lineNumber))return null;if(1===a.open.length&&r&&"always"!==s){const t=I_(e.wordSeparators);if(o&&d.column>1&&0===t.get(u.charCodeAt(d.column-2)))return null;if(!o&&d.column>2&&0===t.get(u.charCodeAt(d.column-3)))return null}t.forceTokenization(d.lineNumber);const g=t.getLineTokens(d.lineNumber);let f=!1;try{f=Kc.shouldAutoClosePair(a,g,o?d.column:d.column-1)}catch(c){me(c)}if(!f)return null}return a}static _runAutoClosingOpenCharType(e,t,i,n,o,r,s){let a=[];for(let l=0,c=n.length;l<c;l++){const e=n[l];a[l]=new ky(e,o,r,s.close)}return new av(1,a,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}static _shouldSurroundChar(e,t){return cv(t)?"quotes"===e.autoSurround||"languageDefined"===e.autoSurround:"brackets"===e.autoSurround||"languageDefined"===e.autoSurround}static _isSurroundSelectionType(e,t,i,n){if(!Ly._shouldSurroundChar(e,n)||!e.surroundingPairs.hasOwnProperty(n))return!1;const o=cv(n);for(let r=0,s=i.length;r<s;r++){const e=i[r];if(e.isEmpty())return!1;let n=!0;for(let i=e.startLineNumber;i<=e.endLineNumber;i++){const o=t.getLineContent(i),r=i===e.startLineNumber?e.startColumn-1:0,s=i===e.endLineNumber?e.endColumn-1:o.length,a=o.substring(r,s);if(/[^ \t]/.test(a)){n=!1;break}}if(n)return!1;if(o&&e.startLineNumber===e.endLineNumber&&e.startColumn+1===e.endColumn){const i=t.getValueInRange(e);if(cv(i))return!1}}return!0}static _runSurroundSelectionType(e,t,i,n,o){let r=[];for(let s=0,a=n.length;s<a;s++){const e=n[s],i=t.surroundingPairs[o];r[s]=new xy(e,o,i)}return new av(0,r,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}static _isTypeInterceptorElectricChar(e,t,i){return!(1!==i.length||!t.isCheapToTokenize(i[0].getEndPosition().lineNumber))}static _typeInterceptorElectricChar(e,t,i,n,o){if(!t.electricChars.hasOwnProperty(o)||!n.isEmpty())return null;let r=n.getPosition();i.forceTokenization(r.lineNumber);let s,a=i.getLineTokens(r.lineNumber);try{s=Kc.onElectricCharacter(o,a,r.column)}catch(l){return me(l),null}if(!s)return null;if(s.matchOpenBracket){let e=(a.getLineContent()+o).lastIndexOf(s.matchOpenBracket)+1,n=i.findMatchingBracketUp(s.matchOpenBracket,{lineNumber:r.lineNumber,column:e});if(n){if(n.startLineNumber===r.lineNumber)return null;let e=i.getLineContent(n.startLineNumber),s=yr["x"](e),a=t.normalizeIndentation(s),l=i.getLineContent(r.lineNumber),c=i.getLineFirstNonWhitespaceColumn(r.lineNumber)||r.column,h=l.substring(c-1,r.column-1),d=a+h+o,u=new Jt(r.lineNumber,1,r.lineNumber,r.column);const g=new dy(u,d);return new av(1,[g],{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!0})}}return null}static compositionEndWithInterceptors(e,t,i,n,o,r){if(!n||ei.selectionsArrEqual(n,o))return null;let s=null;for(const l of o){if(!l.isEmpty())return null;const e=l.getPosition(),t=i.getValueInRange(new Jt(e.lineNumber,e.column-1,e.lineNumber,e.column));if(null===s)s=t;else if(s!==t)return null}if(!s)return null;if(this._isAutoClosingOvertype(t,i,o,r,s)){const e=o.map(e=>new dy(new Jt(e.positionLineNumber,e.positionColumn,e.positionLineNumber,e.positionColumn+1),"",!1));return new av(1,e,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}const a=this._isAutoClosingOpenCharType(t,i,o,s,!1);return a?this._runAutoClosingOpenCharType(e,t,i,o,s,!1,a):null}static typeWithInterceptors(e,t,i,n,o,r,s){if(!e&&"\n"===s){let e=[];for(let t=0,r=o.length;t<r;t++)e[t]=Ly._enter(i,n,!1,o[t]);return new av(1,e,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}if(!e&&this._isAutoIndentType(i,n,o)){let e=[],t=!1;for(let r=0,a=o.length;r<a;r++)if(e[r]=this._runAutoIndentType(i,n,o[r],s),!e[r]){t=!0;break}if(!t)return new av(1,e,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}if(!e&&this._isAutoClosingOvertype(i,n,o,r,s))return this._runAutoClosingOvertype(t,i,n,o,s);if(!e){const e=this._isAutoClosingOpenCharType(i,n,o,s,!0);if(e)return this._runAutoClosingOpenCharType(t,i,n,o,s,!0,e)}if(this._isSurroundSelectionType(i,n,o,s))return this._runSurroundSelectionType(t,i,n,o,s);if(!e&&this._isTypeInterceptorElectricChar(i,n,o)){const e=this._typeInterceptorElectricChar(t,i,n,o[0],s);if(e)return e}let a=[];for(let c=0,h=o.length;c<h;c++)a[c]=new dy(o[c],s);let l=1!==t;return" "===s&&(l=!0),new av(1,a,{shouldPushStackElementBefore:l,shouldPushStackElementAfter:!1})}static typeWithoutInterceptors(e,t,i,n,o){let r=[];for(let s=0,a=n.length;s<a;s++)r[s]=new dy(n[s],o);return new av(1,r,{shouldPushStackElementBefore:1!==e,shouldPushStackElementAfter:!1})}static lineInsertBefore(e,t,i){if(null===t||null===i)return[];let n=[];for(let o=0,r=i.length;o<r;o++){let r=i[o].positionLineNumber;if(1===r)n[o]=new uy(new Jt(1,1,1,1),"\n");else{r--;let i=t.getLineMaxColumn(r);n[o]=this._enter(e,t,!1,new Jt(r,i,r,i))}}return n}static lineInsertAfter(e,t,i){if(null===t||null===i)return[];let n=[];for(let o=0,r=i.length;o<r;o++){const r=i[o].positionLineNumber;let s=t.getLineMaxColumn(r);n[o]=this._enter(e,t,!1,new Jt(r,s,r,s))}return n}static lineBreakInsert(e,t,i){let n=[];for(let o=0,r=i.length;o<r;o++)n[o]=this._enter(e,t,!0,i[o]);return n}}class ky extends gy{constructor(e,t,i,n){super(e,(i?t:"")+n,0,-n.length),this._openCharacter=t,this._closeCharacter=n,this.closeCharacterRange=null,this.enclosingRange=null}computeCursorState(e,t){let i=t.getInverseEditOperations(),n=i[0].range;return this.closeCharacterRange=new Jt(n.startLineNumber,n.endColumn-this._closeCharacter.length,n.endLineNumber,n.endColumn),this.enclosingRange=new Jt(n.startLineNumber,n.endColumn-this._openCharacter.length-this._closeCharacter.length,n.endLineNumber,n.endColumn),super.computeCursorState(e,t)}}var Ey;(function(e){e.editorSimpleInput=new Zf("editorSimpleInput",!1),e.editorTextFocus=new Zf("editorTextFocus",!1),e.focus=new Zf("editorFocus",!1),e.textInputFocus=new Zf("textInputFocus",!1),e.readOnly=new Zf("editorReadonly",!1),e.columnSelection=new Zf("editorColumnSelection",!1),e.writable=e.readOnly.toNegated(),e.hasNonEmptySelection=new Zf("editorHasSelection",!1),e.hasOnlyEmptySelection=e.hasNonEmptySelection.toNegated(),e.hasMultipleSelections=new Zf("editorHasMultipleSelections",!1),e.hasSingleSelection=e.hasMultipleSelections.toNegated(),e.tabMovesFocus=new Zf("editorTabMovesFocus",!1),e.tabDoesNotMoveFocus=e.tabMovesFocus.toNegated(),e.isInWalkThroughSnippet=new Zf("isInEmbeddedEditor",!1),e.canUndo=new Zf("canUndo",!1),e.canRedo=new Zf("canRedo",!1),e.hoverVisible=new Zf("editorHoverVisible",!1),e.inCompositeEditor=new Zf("inCompositeEditor",void 0),e.notInCompositeEditor=e.inCompositeEditor.toNegated(),e.languageId=new Zf("editorLangId",""),e.hasCompletionItemProvider=new Zf("editorHasCompletionItemProvider",!1),e.hasCodeActionsProvider=new Zf("editorHasCodeActionsProvider",!1),e.hasCodeLensProvider=new Zf("editorHasCodeLensProvider",!1),e.hasDefinitionProvider=new Zf("editorHasDefinitionProvider",!1),e.hasDeclarationProvider=new Zf("editorHasDeclarationProvider",!1),e.hasImplementationProvider=new Zf("editorHasImplementationProvider",!1),e.hasTypeDefinitionProvider=new Zf("editorHasTypeDefinitionProvider",!1),e.hasHoverProvider=new Zf("editorHasHoverProvider",!1),e.hasDocumentHighlightProvider=new Zf("editorHasDocumentHighlightProvider",!1),e.hasDocumentSymbolProvider=new Zf("editorHasDocumentSymbolProvider",!1),e.hasReferenceProvider=new Zf("editorHasReferenceProvider",!1),e.hasRenameProvider=new Zf("editorHasRenameProvider",!1),e.hasSignatureHelpProvider=new Zf("editorHasSignatureHelpProvider",!1),e.hasDocumentFormattingProvider=new Zf("editorHasDocumentFormattingProvider",!1),e.hasDocumentSelectionFormattingProvider=new Zf("editorHasDocumentSelectionFormattingProvider",!1),e.hasMultipleDocumentFormattingProvider=new Zf("editorHasMultipleDocumentFormattingProvider",!1),e.hasMultipleDocumentSelectionFormattingProvider=new Zf("editorHasMultipleDocumentSelectionFormattingProvider",!1)})(Ey||(Ey={}));const Dy=0;class Ny extends gm{runEditorCommand(e,t,i){const n=t._getViewModel();n&&this.runCoreEditorCommand(n,i||{})}}var Ty,My,Iy;(function(e){const t=function(e){if(!Ar(e))return!1;const t=e;return!!Or(t.to)&&(!(!Fr(t.by)&&!Or(t.by))&&(!(!Fr(t.value)&&!Rr(t.value))&&!(!Fr(t.revealCursor)&&!Pr(t.revealCursor))))};function i(t){let i,n;switch(t.to){case e.RawDirection.Up:i=1;break;case e.RawDirection.Down:i=2;break;default:return null}switch(t.by){case e.RawUnit.Line:n=1;break;case e.RawUnit.WrappedLine:n=2;break;case e.RawUnit.Page:n=3;break;case e.RawUnit.HalfPage:n=4;break;default:n=2}const o=Math.floor(t.value||1),r=!!t.revealCursor;return{direction:i,unit:n,value:o,revealCursor:r,select:!!t.select}}e.description={description:"Scroll editor in the given direction",args:[{name:"Editor scroll argument object",description:"Property-value pairs that can be passed through this argument:\n\t\t\t\t\t* 'to': A mandatory direction value.\n\t\t\t\t\t\t```\n\t\t\t\t\t\t'up', 'down'\n\t\t\t\t\t\t```\n\t\t\t\t\t* 'by': Unit to move. Default is computed based on 'to' value.\n\t\t\t\t\t\t```\n\t\t\t\t\t\t'line', 'wrappedLine', 'page', 'halfPage'\n\t\t\t\t\t\t```\n\t\t\t\t\t* 'value': Number of units to move. Default is '1'.\n\t\t\t\t\t* 'revealCursor': If 'true' reveals the cursor if it is outside view port.\n\t\t\t\t",constraint:t,schema:{type:"object",required:["to"],properties:{to:{type:"string",enum:["up","down"]},by:{type:"string",enum:["line","wrappedLine","page","halfPage"]},value:{type:"number",default:1},revealCursor:{type:"boolean"}}}}]},e.RawDirection={Up:"up",Down:"down"},e.RawUnit={Line:"line",WrappedLine:"wrappedLine",Page:"page",HalfPage:"halfPage"},e.parse=i})(Ty||(Ty={})),function(e){const t=function(e){if(!Ar(e))return!1;const t=e;return!!Rr(t.lineNumber)&&!(!Fr(t.at)&&!Or(t.at))};e.description={description:"Reveal the given line at the given logical position",args:[{name:"Reveal line argument object",description:"Property-value pairs that can be passed through this argument:\n\t\t\t\t\t* 'lineNumber': A mandatory line number value.\n\t\t\t\t\t* 'at': Logical position at which line has to be revealed .\n\t\t\t\t\t\t```\n\t\t\t\t\t\t'top', 'center', 'bottom'\n\t\t\t\t\t\t```\n\t\t\t\t",constraint:t,schema:{type:"object",required:["lineNumber"],properties:{lineNumber:{type:"number"},at:{type:"string",enum:["top","center","bottom"]}}}}]},e.RawAtArgument={Top:"top",Center:"center",Bottom:"bottom"}}(My||(My={}));class Oy{constructor(e){e.addImplementation(1e4,(e,t)=>{const i=e.get(ji).getFocusedCodeEditor();return!(!i||!i.hasTextFocus())&&(this.runEditorCommand(e,i,t),!0)}),e.addImplementation(1e3,(e,t)=>{const i=document.activeElement;return!!(i&&["input","textarea"].indexOf(i.tagName.toLowerCase())>=0)&&(this.runDOMCommand(),!0)}),e.addImplementation(0,(e,t)=>{const i=e.get(ji).getActiveCodeEditor();return!!i&&(i.focus(),this.runEditorCommand(e,i,t),!0)})}}(function(e){class t extends Ny{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates(t.source,3,[vy.moveTo(e,e.getPrimaryCursorState(),this._inSelectionMode,t.position,t.viewPosition)]),e.revealPrimaryCursor(t.source,!0)}}e.MoveTo=mm(new t({id:"_moveTo",inSelectionMode:!1,precondition:void 0})),e.MoveToSelect=mm(new t({id:"_moveToSelect",inSelectionMode:!0,precondition:void 0}));class i extends Ny{runCoreEditorCommand(e,t){e.model.pushStackElement();const i=this._getColumnSelectResult(e,e.getPrimaryCursorState(),e.getCursorColumnSelectData(),t);e.setCursorStates(t.source,3,i.viewStates.map(e=>sv.fromViewState(e))),e.setCursorColumnSelectData({isReal:!0,fromViewLineNumber:i.fromLineNumber,fromViewVisualColumn:i.fromVisualColumn,toViewLineNumber:i.toLineNumber,toViewVisualColumn:i.toVisualColumn}),i.reversed?e.revealTopMostCursor(t.source):e.revealBottomMostCursor(t.source)}}e.ColumnSelect=mm(new class extends i{constructor(){super({id:"columnSelect",precondition:void 0})}_getColumnSelectResult(e,t,i,n){const o=e.model.validatePosition(n.position),r=e.coordinatesConverter.validateViewPosition(new Qt(n.viewPosition.lineNumber,n.viewPosition.column),o);let s=n.doColumnSelect?i.fromViewLineNumber:r.lineNumber,a=n.doColumnSelect?i.fromViewVisualColumn:n.mouseColumn-1;return hy.columnSelect(e.cursorConfig,e,s,a,r.lineNumber,n.mouseColumn-1)}}),e.CursorColumnSelectLeft=mm(new class extends i{constructor(){super({id:"cursorColumnSelectLeft",precondition:void 0,kbOpts:{weight:Dy,kbExpr:Ey.textInputFocus,primary:3599,linux:{primary:0}}})}_getColumnSelectResult(e,t,i,n){return hy.columnSelectLeft(e.cursorConfig,e,i)}}),e.CursorColumnSelectRight=mm(new class extends i{constructor(){super({id:"cursorColumnSelectRight",precondition:void 0,kbOpts:{weight:Dy,kbExpr:Ey.textInputFocus,primary:3601,linux:{primary:0}}})}_getColumnSelectResult(e,t,i,n){return hy.columnSelectRight(e.cursorConfig,e,i)}});class n extends i{constructor(e){super(e),this._isPaged=e.isPaged}_getColumnSelectResult(e,t,i,n){return hy.columnSelectUp(e.cursorConfig,e,i,this._isPaged)}}e.CursorColumnSelectUp=mm(new n({isPaged:!1,id:"cursorColumnSelectUp",precondition:void 0,kbOpts:{weight:Dy,kbExpr:Ey.textInputFocus,primary:3600,linux:{primary:0}}})),e.CursorColumnSelectPageUp=mm(new n({isPaged:!0,id:"cursorColumnSelectPageUp",precondition:void 0,kbOpts:{weight:Dy,kbExpr:Ey.textInputFocus,primary:3595,linux:{primary:0}}}));class r extends i{constructor(e){super(e),this._isPaged=e.isPaged}_getColumnSelectResult(e,t,i,n){return hy.columnSelectDown(e.cursorConfig,e,i,this._isPaged)}}e.CursorColumnSelectDown=mm(new r({isPaged:!1,id:"cursorColumnSelectDown",precondition:void 0,kbOpts:{weight:Dy,kbExpr:Ey.textInputFocus,primary:3602,linux:{primary:0}}})),e.CursorColumnSelectPageDown=mm(new r({isPaged:!0,id:"cursorColumnSelectPageDown",precondition:void 0,kbOpts:{weight:Dy,kbExpr:Ey.textInputFocus,primary:3596,linux:{primary:0}}}));class s extends Ny{constructor(){super({id:"cursorMove",precondition:void 0,description:wy.description})}runCoreEditorCommand(e,t){const i=wy.parse(t);i&&this._runCursorMove(e,t.source,i)}_runCursorMove(e,t,i){e.model.pushStackElement(),e.setCursorStates(t,3,s._move(e,e.getCursorStates(),i)),e.revealPrimaryCursor(t,!0)}static _move(e,t,i){const n=i.select,o=i.value;switch(i.direction){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:return vy.simpleMove(e,t,i.direction,n,o,i.unit);case 9:case 11:case 10:case 12:return vy.viewportMove(e,t,i.direction,n,o);default:return null}}}e.CursorMoveImpl=s,e.CursorMove=mm(new s);class a extends Ny{constructor(e){super(e),this._staticArgs=e.args}runCoreEditorCommand(e,t){let i=this._staticArgs;-1===this._staticArgs.value&&(i={direction:this._staticArgs.direction,unit:this._staticArgs.unit,select:this._staticArgs.select,value:e.cursorConfig.pageSize}),e.model.pushStackElement(),e.setCursorStates(t.source,3,vy.simpleMove(e,e.getCursorStates(),i.direction,i.select,i.value,i.unit)),e.revealPrimaryCursor(t.source,!0)}}e.CursorLeft=mm(new a({args:{direction:0,unit:0,select:!1,value:1},id:"cursorLeft",precondition:void 0,kbOpts:{weight:Dy,kbExpr:Ey.textInputFocus,primary:15,mac:{primary:15,secondary:[288]}}})),e.CursorLeftSelect=mm(new a({args:{direction:0,unit:0,select:!0,value:1},id:"cursorLeftSelect",precondition:void 0,kbOpts:{weight:Dy,kbExpr:Ey.textInputFocus,primary:1039}})),e.CursorRight=mm(new a({args:{direction:1,unit:0,select:!1,value:1},id:"cursorRight",precondition:void 0,kbOpts:{weight:Dy,kbExpr:Ey.textInputFocus,primary:17,mac:{primary:17,secondary:[292]}}})),e.CursorRightSelect=mm(new a({args:{direction:1,unit:0,select:!0,value:1},id:"cursorRightSelect",precondition:void 0,kbOpts:{weight:Dy,kbExpr:Ey.textInputFocus,primary:1041}})),e.CursorUp=mm(new a({args:{direction:2,unit:2,select:!1,value:1},id:"cursorUp",precondition:void 0,kbOpts:{weight:Dy,kbExpr:Ey.textInputFocus,primary:16,mac:{primary:16,secondary:[302]}}})),e.CursorUpSelect=mm(new a({args:{direction:2,unit:2,select:!0,value:1},id:"cursorUpSelect",precondition:void 0,kbOpts:{weight:Dy,kbExpr:Ey.textInputFocus,primary:1040,secondary:[3088],mac:{primary:1040},linux:{primary:1040}}})),e.CursorPageUp=mm(new a({args:{direction:2,unit:2,select:!1,value:-1},id:"cursorPageUp",precondition:void 0,kbOpts:{weight:Dy,kbExpr:Ey.textInputFocus,primary:11}})),e.CursorPageUpSelect=mm(new a({args:{direction:2,unit:2,select:!0,value:-1},id:"cursorPageUpSelect",precondition:void 0,kbOpts:{weight:Dy,kbExpr:Ey.textInputFocus,primary:1035}})),e.CursorDown=mm(new a({args:{direction:3,unit:2,select:!1,value:1},id:"cursorDown",precondition:void 0,kbOpts:{weight:Dy,kbExpr:Ey.textInputFocus,primary:18,mac:{primary:18,secondary:[300]}}})),e.CursorDownSelect=mm(new a({args:{direction:3,unit:2,select:!0,value:1},id:"cursorDownSelect",precondition:void 0,kbOpts:{weight:Dy,kbExpr:Ey.textInputFocus,primary:1042,secondary:[3090],mac:{primary:1042},linux:{primary:1042}}})),e.CursorPageDown=mm(new a({args:{direction:3,unit:2,select:!1,value:-1},id:"cursorPageDown",precondition:void 0,kbOpts:{weight:Dy,kbExpr:Ey.textInputFocus,primary:12}})),e.CursorPageDownSelect=mm(new a({args:{direction:3,unit:2,select:!0,value:-1},id:"cursorPageDownSelect",precondition:void 0,kbOpts:{weight:Dy,kbExpr:Ey.textInputFocus,primary:1036}})),e.CreateCursor=mm(new class extends Ny{constructor(){super({id:"createCursor",precondition:void 0})}runCoreEditorCommand(e,t){let i;i=t.wholeLine?vy.line(e,e.getPrimaryCursorState(),!1,t.position,t.viewPosition):vy.moveTo(e,e.getPrimaryCursorState(),!1,t.position,t.viewPosition);const n=e.getCursorStates();if(n.length>1){const o=i.modelState?i.modelState.position:null,r=i.viewState?i.viewState.position:null;for(let i=0,s=n.length;i<s;i++){const s=n[i];if((!o||s.modelState.selection.containsPosition(o))&&(!r||s.viewState.selection.containsPosition(r)))return n.splice(i,1),e.model.pushStackElement(),void e.setCursorStates(t.source,3,n)}}n.push(i),e.model.pushStackElement(),e.setCursorStates(t.source,3,n)}}),e.LastCursorMoveToSelect=mm(new class extends Ny{constructor(){super({id:"_lastCursorMoveToSelect",precondition:void 0})}runCoreEditorCommand(e,t){const i=e.getLastAddedCursorIndex(),n=e.getCursorStates(),o=n.slice(0);o[i]=vy.moveTo(e,n[i],!0,t.position,t.viewPosition),e.model.pushStackElement(),e.setCursorStates(t.source,3,o)}});class l extends Ny{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates(t.source,3,vy.moveToBeginningOfLine(e,e.getCursorStates(),this._inSelectionMode)),e.revealPrimaryCursor(t.source,!0)}}e.CursorHome=mm(new l({inSelectionMode:!1,id:"cursorHome",precondition:void 0,kbOpts:{weight:Dy,kbExpr:Ey.textInputFocus,primary:14,mac:{primary:14,secondary:[2063]}}})),e.CursorHomeSelect=mm(new l({inSelectionMode:!0,id:"cursorHomeSelect",precondition:void 0,kbOpts:{weight:Dy,kbExpr:Ey.textInputFocus,primary:1038,mac:{primary:1038,secondary:[3087]}}}));class c extends Ny{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates(t.source,3,this._exec(e.getCursorStates())),e.revealPrimaryCursor(t.source,!0)}_exec(e){const t=[];for(let i=0,n=e.length;i<n;i++){const n=e[i],o=n.modelState.position.lineNumber;t[i]=sv.fromModelState(n.modelState.move(this._inSelectionMode,o,1,0))}return t}}e.CursorLineStart=mm(new c({inSelectionMode:!1,id:"cursorLineStart",precondition:void 0,kbOpts:{weight:Dy,kbExpr:Ey.textInputFocus,primary:0,mac:{primary:287}}})),e.CursorLineStartSelect=mm(new c({inSelectionMode:!0,id:"cursorLineStartSelect",precondition:void 0,kbOpts:{weight:Dy,kbExpr:Ey.textInputFocus,primary:0,mac:{primary:1311}}}));class h extends Ny{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates(t.source,3,vy.moveToEndOfLine(e,e.getCursorStates(),this._inSelectionMode,t.sticky||!1)),e.revealPrimaryCursor(t.source,!0)}}e.CursorEnd=mm(new h({inSelectionMode:!1,id:"cursorEnd",precondition:void 0,kbOpts:{args:{sticky:!1},weight:Dy,kbExpr:Ey.textInputFocus,primary:13,mac:{primary:13,secondary:[2065]}},description:{description:"Go to End",args:[{name:"args",schema:{type:"object",properties:{sticky:{description:o("stickydesc","Stick to the end even when going to longer lines"),type:"boolean",default:!1}}}}]}})),e.CursorEndSelect=mm(new h({inSelectionMode:!0,id:"cursorEndSelect",precondition:void 0,kbOpts:{args:{sticky:!1},weight:Dy,kbExpr:Ey.textInputFocus,primary:1037,mac:{primary:1037,secondary:[3089]}},description:{description:"Select to End",args:[{name:"args",schema:{type:"object",properties:{sticky:{description:o("stickydesc","Stick to the end even when going to longer lines"),type:"boolean",default:!1}}}}]}}));class d extends Ny{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates(t.source,3,this._exec(e,e.getCursorStates())),e.revealPrimaryCursor(t.source,!0)}_exec(e,t){const i=[];for(let n=0,o=t.length;n<o;n++){const o=t[n],r=o.modelState.position.lineNumber,s=e.model.getLineMaxColumn(r);i[n]=sv.fromModelState(o.modelState.move(this._inSelectionMode,r,s,0))}return i}}e.CursorLineEnd=mm(new d({inSelectionMode:!1,id:"cursorLineEnd",precondition:void 0,kbOpts:{weight:Dy,kbExpr:Ey.textInputFocus,primary:0,mac:{primary:291}}})),e.CursorLineEndSelect=mm(new d({inSelectionMode:!0,id:"cursorLineEndSelect",precondition:void 0,kbOpts:{weight:Dy,kbExpr:Ey.textInputFocus,primary:0,mac:{primary:1315}}}));class u extends Ny{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates(t.source,3,vy.moveToBeginningOfBuffer(e,e.getCursorStates(),this._inSelectionMode)),e.revealPrimaryCursor(t.source,!0)}}e.CursorTop=mm(new u({inSelectionMode:!1,id:"cursorTop",precondition:void 0,kbOpts:{weight:Dy,kbExpr:Ey.textInputFocus,primary:2062,mac:{primary:2064}}})),e.CursorTopSelect=mm(new u({inSelectionMode:!0,id:"cursorTopSelect",precondition:void 0,kbOpts:{weight:Dy,kbExpr:Ey.textInputFocus,primary:3086,mac:{primary:3088}}}));class g extends Ny{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates(t.source,3,vy.moveToEndOfBuffer(e,e.getCursorStates(),this._inSelectionMode)),e.revealPrimaryCursor(t.source,!0)}}e.CursorBottom=mm(new g({inSelectionMode:!1,id:"cursorBottom",precondition:void 0,kbOpts:{weight:Dy,kbExpr:Ey.textInputFocus,primary:2061,mac:{primary:2066}}})),e.CursorBottomSelect=mm(new g({inSelectionMode:!0,id:"cursorBottomSelect",precondition:void 0,kbOpts:{weight:Dy,kbExpr:Ey.textInputFocus,primary:3085,mac:{primary:3090}}}));class f extends Ny{constructor(){super({id:"editorScroll",precondition:void 0,description:Ty.description})}runCoreEditorCommand(e,t){const i=Ty.parse(t);i&&this._runEditorScroll(e,t.source,i)}_runEditorScroll(e,t,i){const n=this._computeDesiredScrollTop(e,i);if(i.revealCursor){const o=e.getCompletelyVisibleViewRangeAtScrollTop(n);e.setCursorStates(t,3,[vy.findPositionInViewportIfOutside(e,e.getPrimaryCursorState(),o,i.select)])}e.setScrollTop(n,0)}_computeDesiredScrollTop(e,t){if(1===t.unit){const i=e.getCompletelyVisibleViewRange(),n=e.coordinatesConverter.convertViewRangeToModelRange(i);let o;o=1===t.direction?Math.max(1,n.startLineNumber-t.value):Math.min(e.model.getLineCount(),n.startLineNumber+t.value);const r=e.coordinatesConverter.convertModelPositionToViewPosition(new Qt(o,1));return e.getVerticalOffsetForLineNumber(r.lineNumber)}let i;i=3===t.unit?e.cursorConfig.pageSize*t.value:4===t.unit?Math.round(e.cursorConfig.pageSize/2)*t.value:t.value;const n=(1===t.direction?-1:1)*i;return e.getScrollTop()+n*e.cursorConfig.lineHeight}}e.EditorScrollImpl=f,e.EditorScroll=mm(new f),e.ScrollLineUp=mm(new class extends Ny{constructor(){super({id:"scrollLineUp",precondition:void 0,kbOpts:{weight:Dy,kbExpr:Ey.textInputFocus,primary:2064,mac:{primary:267}}})}runCoreEditorCommand(t,i){e.EditorScroll._runEditorScroll(t,i.source,{direction:1,unit:2,value:1,revealCursor:!1,select:!1})}}),e.ScrollPageUp=mm(new class extends Ny{constructor(){super({id:"scrollPageUp",precondition:void 0,kbOpts:{weight:Dy,kbExpr:Ey.textInputFocus,primary:2059,win:{primary:523},linux:{primary:523}}})}runCoreEditorCommand(t,i){e.EditorScroll._runEditorScroll(t,i.source,{direction:1,unit:3,value:1,revealCursor:!1,select:!1})}}),e.ScrollLineDown=mm(new class extends Ny{constructor(){super({id:"scrollLineDown",precondition:void 0,kbOpts:{weight:Dy,kbExpr:Ey.textInputFocus,primary:2066,mac:{primary:268}}})}runCoreEditorCommand(t,i){e.EditorScroll._runEditorScroll(t,i.source,{direction:2,unit:2,value:1,revealCursor:!1,select:!1})}}),e.ScrollPageDown=mm(new class extends Ny{constructor(){super({id:"scrollPageDown",precondition:void 0,kbOpts:{weight:Dy,kbExpr:Ey.textInputFocus,primary:2060,win:{primary:524},linux:{primary:524}}})}runCoreEditorCommand(t,i){e.EditorScroll._runEditorScroll(t,i.source,{direction:2,unit:3,value:1,revealCursor:!1,select:!1})}});class m extends Ny{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates(t.source,3,[vy.word(e,e.getPrimaryCursorState(),this._inSelectionMode,t.position)]),e.revealPrimaryCursor(t.source,!0)}}e.WordSelect=mm(new m({inSelectionMode:!1,id:"_wordSelect",precondition:void 0})),e.WordSelectDrag=mm(new m({inSelectionMode:!0,id:"_wordSelectDrag",precondition:void 0})),e.LastCursorWordSelect=mm(new class extends Ny{constructor(){super({id:"lastCursorWordSelect",precondition:void 0})}runCoreEditorCommand(e,t){const i=e.getLastAddedCursorIndex(),n=e.getCursorStates(),o=n.slice(0),r=n[i];o[i]=vy.word(e,r,r.modelState.hasSelection(),t.position),e.model.pushStackElement(),e.setCursorStates(t.source,3,o)}});class p extends Ny{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates(t.source,3,[vy.line(e,e.getPrimaryCursorState(),this._inSelectionMode,t.position,t.viewPosition)]),e.revealPrimaryCursor(t.source,!1)}}e.LineSelect=mm(new p({inSelectionMode:!1,id:"_lineSelect",precondition:void 0})),e.LineSelectDrag=mm(new p({inSelectionMode:!0,id:"_lineSelectDrag",precondition:void 0}));class _ extends Ny{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode}runCoreEditorCommand(e,t){const i=e.getLastAddedCursorIndex(),n=e.getCursorStates(),o=n.slice(0);o[i]=vy.line(e,n[i],this._inSelectionMode,t.position,t.viewPosition),e.model.pushStackElement(),e.setCursorStates(t.source,3,o)}}e.LastCursorLineSelect=mm(new _({inSelectionMode:!1,id:"lastCursorLineSelect",precondition:void 0})),e.LastCursorLineSelectDrag=mm(new _({inSelectionMode:!0,id:"lastCursorLineSelectDrag",precondition:void 0})),e.ExpandLineSelection=mm(new class extends Ny{constructor(){super({id:"expandLineSelection",precondition:void 0,kbOpts:{weight:Dy,kbExpr:Ey.textInputFocus,primary:2090}})}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates(t.source,3,vy.expandLineSelection(e,e.getCursorStates())),e.revealPrimaryCursor(t.source,!0)}}),e.CancelSelection=mm(new class extends Ny{constructor(){super({id:"cancelSelection",precondition:Ey.hasNonEmptySelection,kbOpts:{weight:Dy,kbExpr:Ey.textInputFocus,primary:9,secondary:[1033]}})}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates(t.source,3,[vy.cancelSelection(e,e.getPrimaryCursorState())]),e.revealPrimaryCursor(t.source,!0)}}),e.RemoveSecondaryCursors=mm(new class extends Ny{constructor(){super({id:"removeSecondaryCursors",precondition:Ey.hasMultipleSelections,kbOpts:{weight:Dy+1,kbExpr:Ey.textInputFocus,primary:9,secondary:[1033]}})}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates(t.source,3,[e.getPrimaryCursorState()]),e.revealPrimaryCursor(t.source,!0)}}),e.RevealLine=mm(new class extends Ny{constructor(){super({id:"revealLine",precondition:void 0,description:My.description})}runCoreEditorCommand(e,t){const i=t;let n=(i.lineNumber||0)+1;n<1&&(n=1);const o=e.model.getLineCount();n>o&&(n=o);const r=new Jt(n,1,n,e.model.getLineMaxColumn(n));let s=0;if(i.at)switch(i.at){case My.RawAtArgument.Top:s=3;break;case My.RawAtArgument.Center:s=1;break;case My.RawAtArgument.Bottom:s=4;break;default:break}const a=e.coordinatesConverter.convertModelRangeToViewRange(r);e.revealRange(t.source,!1,a,s,0)}}),e.SelectAll=new class extends Oy{constructor(){super(xm)}runDOMCommand(){document.execCommand("selectAll")}runEditorCommand(e,t,i){const n=t._getViewModel();n&&this.runCoreEditorCommand(n,i)}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates("keyboard",3,[vy.selectAll(e,e.getPrimaryCursorState())])}},e.SetSelection=mm(new class extends Ny{constructor(){super({id:"setSelection",precondition:void 0})}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates(t.source,3,[sv.fromModelSelection(t.selection)])}})})(Iy||(Iy={}));const Ay=Ff.and(Ey.textInputFocus,Ey.columnSelection);function Ry(e,t){vg.registerKeybindingRule({id:e,primary:t,when:Ay,weight:Dy+1})}function Py(e){return e.register(),e}var Fy;Ry(Iy.CursorColumnSelectLeft.id,1039),Ry(Iy.CursorColumnSelectRight.id,1041),Ry(Iy.CursorColumnSelectUp.id,1040),Ry(Iy.CursorColumnSelectPageUp.id,1035),Ry(Iy.CursorColumnSelectDown.id,1042),Ry(Iy.CursorColumnSelectPageDown.id,1036),function(e){class t extends gm{runEditorCommand(e,t,i){const n=t._getViewModel();n&&this.runCoreEditingCommand(t,n,i||{})}}e.CoreEditingCommand=t,e.LineBreakInsert=mm(new class extends t{constructor(){super({id:"lineBreakInsert",precondition:Ey.writable,kbOpts:{weight:Dy,kbExpr:Ey.textInputFocus,primary:0,mac:{primary:301}}})}runCoreEditingCommand(e,t,i){e.pushUndoStop(),e.executeCommands(this.id,Ly.lineBreakInsert(t.cursorConfig,t.model,t.getCursorStates().map(e=>e.modelState.selection)))}}),e.Outdent=mm(new class extends t{constructor(){super({id:"outdent",precondition:Ey.writable,kbOpts:{weight:Dy,kbExpr:Ff.and(Ey.editorTextFocus,Ey.tabDoesNotMoveFocus),primary:1026}})}runCoreEditingCommand(e,t,i){e.pushUndoStop(),e.executeCommands(this.id,Ly.outdent(t.cursorConfig,t.model,t.getCursorStates().map(e=>e.modelState.selection))),e.pushUndoStop()}}),e.Tab=mm(new class extends t{constructor(){super({id:"tab",precondition:Ey.writable,kbOpts:{weight:Dy,kbExpr:Ff.and(Ey.editorTextFocus,Ey.tabDoesNotMoveFocus),primary:2}})}runCoreEditingCommand(e,t,i){e.pushUndoStop(),e.executeCommands(this.id,Ly.tab(t.cursorConfig,t.model,t.getCursorStates().map(e=>e.modelState.selection))),e.pushUndoStop()}}),e.DeleteLeft=mm(new class extends t{constructor(){super({id:"deleteLeft",precondition:void 0,kbOpts:{weight:Dy,kbExpr:Ey.textInputFocus,primary:1,secondary:[1025],mac:{primary:1,secondary:[1025,294,257]}}})}runCoreEditingCommand(e,t,i){const[n,o]=_y.deleteLeft(t.getPrevEditOperationType(),t.cursorConfig,t.model,t.getCursorStates().map(e=>e.modelState.selection));n&&e.pushUndoStop(),e.executeCommands(this.id,o),t.setPrevEditOperationType(2)}}),e.DeleteRight=mm(new class extends t{constructor(){super({id:"deleteRight",precondition:void 0,kbOpts:{weight:Dy,kbExpr:Ey.textInputFocus,primary:20,mac:{primary:20,secondary:[290,276]}}})}runCoreEditingCommand(e,t,i){const[n,o]=_y.deleteRight(t.getPrevEditOperationType(),t.cursorConfig,t.model,t.getCursorStates().map(e=>e.modelState.selection));n&&e.pushUndoStop(),e.executeCommands(this.id,o),t.setPrevEditOperationType(3)}}),e.Undo=new class extends Oy{constructor(){super(ym)}runDOMCommand(){document.execCommand("undo")}runEditorCommand(e,t,i){t.hasModel()&&!0!==t.getOption(72)&&t.getModel().undo()}},e.Redo=new class extends Oy{constructor(){super(Sm)}runDOMCommand(){document.execCommand("redo")}runEditorCommand(e,t,i){t.hasModel()&&!0!==t.getOption(72)&&t.getModel().redo()}}}(Fy||(Fy={}));class Wy extends hm{constructor(e,t,i){super({id:e,precondition:void 0,description:i}),this._handlerId=t}runCommand(e,t){const i=e.get(ji).getFocusedCodeEditor();i&&i.trigger("keyboard",this._handlerId,t)}}function By(e,t){Py(new Wy("default:"+e,e)),Py(new Wy(e,e,t))}By("type",{description:"Type",args:[{name:"args",schema:{type:"object",required:["text"],properties:{text:{type:"string"}}}}]}),By("replacePreviousChar"),By("compositionStart"),By("compositionEnd"),By("paste"),By("cut");class Vy{constructor(e,t,i,n){this.configuration=e,this.viewModel=t,this.userInputEvents=i,this.commandDelegate=n}paste(e,t,i,n){this.commandDelegate.paste(e,t,i,n)}type(e){this.commandDelegate.type(e)}replacePreviousChar(e,t){this.commandDelegate.replacePreviousChar(e,t)}compositionStart(){this.commandDelegate.startComposition()}compositionEnd(){this.commandDelegate.endComposition()}cut(){this.commandDelegate.cut()}setSelection(e){Iy.SetSelection.runCoreEditorCommand(this.viewModel,{source:"keyboard",selection:e})}_validateViewColumn(e){const t=this.viewModel.getLineMinColumn(e.lineNumber);return e.column<t?new Qt(e.lineNumber,t):e}_hasMulticursorModifier(e){switch(this.configuration.options.get(61)){case"altKey":return e.altKey;case"ctrlKey":return e.ctrlKey;case"metaKey":return e.metaKey;default:return!1}}_hasNonMulticursorModifier(e){switch(this.configuration.options.get(61)){case"altKey":return e.ctrlKey||e.metaKey;case"ctrlKey":return e.altKey||e.metaKey;case"metaKey":return e.ctrlKey||e.altKey;default:return!1}}dispatchMouse(e){const t=this.configuration.options,i=r["d"]&&t.get(88),n=t.get(13);e.middleButton&&!i?this._columnSelect(e.position,e.mouseColumn,e.inSelectionMode):e.startedOnLineNumbers?this._hasMulticursorModifier(e)?e.inSelectionMode?this._lastCursorLineSelect(e.position):this._createCursor(e.position,!0):e.inSelectionMode?this._lineSelectDrag(e.position):this._lineSelect(e.position):e.mouseDownCount>=4?this._selectAll():3===e.mouseDownCount?this._hasMulticursorModifier(e)?e.inSelectionMode?this._lastCursorLineSelectDrag(e.position):this._lastCursorLineSelect(e.position):e.inSelectionMode?this._lineSelectDrag(e.position):this._lineSelect(e.position):2===e.mouseDownCount?this._hasMulticursorModifier(e)?this._lastCursorWordSelect(e.position):e.inSelectionMode?this._wordSelectDrag(e.position):this._wordSelect(e.position):this._hasMulticursorModifier(e)?this._hasNonMulticursorModifier(e)||(e.shiftKey?this._columnSelect(e.position,e.mouseColumn,!0):e.inSelectionMode?this._lastCursorMoveToSelect(e.position):this._createCursor(e.position,!1)):e.inSelectionMode?e.altKey||n?this._columnSelect(e.position,e.mouseColumn,!0):this._moveToSelect(e.position):this.moveTo(e.position)}_usualArgs(e){return e=this._validateViewColumn(e),{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e}}moveTo(e){Iy.MoveTo.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_moveToSelect(e){Iy.MoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_columnSelect(e,t,i){e=this._validateViewColumn(e),Iy.ColumnSelect.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,mouseColumn:t,doColumnSelect:i})}_createCursor(e,t){e=this._validateViewColumn(e),Iy.CreateCursor.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,wholeLine:t})}_lastCursorMoveToSelect(e){Iy.LastCursorMoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_wordSelect(e){Iy.WordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_wordSelectDrag(e){Iy.WordSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_lastCursorWordSelect(e){Iy.LastCursorWordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_lineSelect(e){Iy.LineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_lineSelectDrag(e){Iy.LineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_lastCursorLineSelect(e){Iy.LastCursorLineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_lastCursorLineSelectDrag(e){Iy.LastCursorLineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_selectAll(){Iy.SelectAll.runCoreEditorCommand(this.viewModel,{source:"mouse"})}_convertViewToModelPosition(e){return this.viewModel.coordinatesConverter.convertViewPositionToModelPosition(e)}emitKeyDown(e){this.userInputEvents.emitKeyDown(e)}emitKeyUp(e){this.userInputEvents.emitKeyUp(e)}emitContextMenu(e){this.userInputEvents.emitContextMenu(e)}emitMouseMove(e){this.userInputEvents.emitMouseMove(e)}emitMouseLeave(e){this.userInputEvents.emitMouseLeave(e)}emitMouseUp(e){this.userInputEvents.emitMouseUp(e)}emitMouseDown(e){this.userInputEvents.emitMouseDown(e)}emitMouseDrag(e){this.userInputEvents.emitMouseDrag(e)}emitMouseDrop(e){this.userInputEvents.emitMouseDrop(e)}emitMouseWheel(e){this.userInputEvents.emitMouseWheel(e)}}class Hy{constructor(e){this.onKeyDown=null,this.onKeyUp=null,this.onContextMenu=null,this.onMouseMove=null,this.onMouseLeave=null,this.onMouseDown=null,this.onMouseUp=null,this.onMouseDrag=null,this.onMouseDrop=null,this.onMouseWheel=null,this._coordinatesConverter=e}emitKeyDown(e){this.onKeyDown&&this.onKeyDown(e)}emitKeyUp(e){this.onKeyUp&&this.onKeyUp(e)}emitContextMenu(e){this.onContextMenu&&this.onContextMenu(this._convertViewToModelMouseEvent(e))}emitMouseMove(e){this.onMouseMove&&this.onMouseMove(this._convertViewToModelMouseEvent(e))}emitMouseLeave(e){this.onMouseLeave&&this.onMouseLeave(this._convertViewToModelMouseEvent(e))}emitMouseDown(e){this.onMouseDown&&this.onMouseDown(this._convertViewToModelMouseEvent(e))}emitMouseUp(e){this.onMouseUp&&this.onMouseUp(this._convertViewToModelMouseEvent(e))}emitMouseDrag(e){this.onMouseDrag&&this.onMouseDrag(this._convertViewToModelMouseEvent(e))}emitMouseDrop(e){this.onMouseDrop&&this.onMouseDrop(this._convertViewToModelMouseEvent(e))}emitMouseWheel(e){this.onMouseWheel&&this.onMouseWheel(e)}_convertViewToModelMouseEvent(e){return e.target?{event:e.event,target:this._convertViewToModelMouseTarget(e.target)}:e}_convertViewToModelMouseTarget(e){return Hy.convertViewToModelMouseTarget(e,this._coordinatesConverter)}static convertViewToModelMouseTarget(e,t){return new zy(e.element,e.type,e.mouseColumn,e.position?t.convertViewPositionToModelPosition(e.position):null,e.range?t.convertViewRangeToModelRange(e.range):null,e.detail)}}class zy{constructor(e,t,i,n,o,r){this.element=e,this.type=t,this.mouseColumn=i,this.position=n,this.range=o,this.detail=r}toString(){return dv.toString(this)}}class Uy{constructor(e){this._createLine=e,this._set(1,[])}flush(){this._set(1,[])}_set(e,t){this._lines=t,this._rendLineNumberStart=e}_get(){return{rendLineNumberStart:this._rendLineNumberStart,lines:this._lines}}getStartLineNumber(){return this._rendLineNumberStart}getEndLineNumber(){return this._rendLineNumberStart+this._lines.length-1}getCount(){return this._lines.length}getLine(e){const t=e-this._rendLineNumberStart;if(t<0||t>=this._lines.length)throw new Error("Illegal value for lineNumber");return this._lines[t]}onLinesDeleted(e,t){if(0===this.getCount())return null;const i=this.getStartLineNumber(),n=this.getEndLineNumber();if(t<i){const i=t-e+1;return this._rendLineNumberStart-=i,null}if(e>n)return null;let o=0,r=0;for(let a=i;a<=n;a++){const i=a-this._rendLineNumberStart;e<=a&&a<=t&&(0===r?(o=i,r=1):r++)}if(e<i){let n=0;n=t<i?t-e+1:i-e,this._rendLineNumberStart-=n}const s=this._lines.splice(o,r);return s}onLinesChanged(e,t){if(0===this.getCount())return!1;const i=this.getStartLineNumber(),n=this.getEndLineNumber();let o=!1;for(let r=e;r<=t;r++)r>=i&&r<=n&&(this._lines[r-this._rendLineNumberStart].onContentChanged(),o=!0);return o}onLinesInserted(e,t){if(0===this.getCount())return null;const i=t-e+1,n=this.getStartLineNumber(),o=this.getEndLineNumber();if(e<=n)return this._rendLineNumberStart+=i,null;if(e>o)return null;if(i+e>o){const t=this._lines.splice(e-this._rendLineNumberStart,o-e+1);return t}const r=[];for(let h=0;h<i;h++)r[h]=this._createLine();const s=e-this._rendLineNumberStart,a=this._lines.slice(0,s),l=this._lines.slice(s,this._lines.length-i),c=this._lines.slice(this._lines.length-i,this._lines.length);return this._lines=a.concat(r).concat(l),c}onTokensChanged(e){if(0===this.getCount())return!1;const t=this.getStartLineNumber(),i=this.getEndLineNumber();let n=!1;for(let o=0,r=e.length;o<r;o++){const r=e[o];if(r.toLineNumber<t||r.fromLineNumber>i)continue;const s=Math.max(t,r.fromLineNumber),a=Math.min(i,r.toLineNumber);for(let e=s;e<=a;e++){const t=e-this._rendLineNumberStart;this._lines[t].onTokensChanged(),n=!0}}return n}}class jy{constructor(e){this._host=e,this.domNode=this._createDomNode(),this._linesCollection=new Uy(()=>this._host.createVisibleLine())}_createDomNode(){const e=km(document.createElement("div"));return e.setClassName("view-layer"),e.setPosition("absolute"),e.domNode.setAttribute("role","presentation"),e.domNode.setAttribute("aria-hidden","true"),e}onConfigurationChanged(e){return!!e.hasChanged(117)}onFlushed(e){return this._linesCollection.flush(),!0}onLinesChanged(e){return this._linesCollection.onLinesChanged(e.fromLineNumber,e.toLineNumber)}onLinesDeleted(e){const t=this._linesCollection.onLinesDeleted(e.fromLineNumber,e.toLineNumber);if(t)for(let i=0,n=t.length;i<n;i++){const e=t[i].getDomNode();e&&this.domNode.domNode.removeChild(e)}return!0}onLinesInserted(e){const t=this._linesCollection.onLinesInserted(e.fromLineNumber,e.toLineNumber);if(t)for(let i=0,n=t.length;i<n;i++){const e=t[i].getDomNode();e&&this.domNode.domNode.removeChild(e)}return!0}onScrollChanged(e){return e.scrollTopChanged}onTokensChanged(e){return this._linesCollection.onTokensChanged(e.ranges)}onZonesChanged(e){return!0}getStartLineNumber(){return this._linesCollection.getStartLineNumber()}getEndLineNumber(){return this._linesCollection.getEndLineNumber()}getVisibleLine(e){return this._linesCollection.getLine(e)}renderLines(e){const t=this._linesCollection._get(),i=new Ky(this.domNode.domNode,this._host,e),n={rendLineNumberStart:t.rendLineNumberStart,lines:t.lines,linesLength:t.lines.length},o=i.render(n,e.startLineNumber,e.endLineNumber,e.relativeVerticalOffset);this._linesCollection._set(o.rendLineNumberStart,o.lines)}}class Ky{constructor(e,t,i){this.domNode=e,this.host=t,this.viewportData=i}render(e,t,i,n){const o={rendLineNumberStart:e.rendLineNumberStart,lines:e.lines.slice(0),linesLength:e.linesLength};if(o.rendLineNumberStart+o.linesLength-1<t||i<o.rendLineNumberStart){o.rendLineNumberStart=t,o.linesLength=i-t+1,o.lines=[];for(let e=t;e<=i;e++)o.lines[e-t]=this.host.createVisibleLine();return this._finishRendering(o,!0,n),o}if(this._renderUntouchedLines(o,Math.max(t-o.rendLineNumberStart,0),Math.min(i-o.rendLineNumberStart,o.linesLength-1),n,t),o.rendLineNumberStart>t){const e=t,r=Math.min(i,o.rendLineNumberStart-1);e<=r&&(this._insertLinesBefore(o,e,r,n,t),o.linesLength+=r-e+1)}else if(o.rendLineNumberStart<t){const e=Math.min(o.linesLength,t-o.rendLineNumberStart);e>0&&(this._removeLinesBefore(o,e),o.linesLength-=e)}if(o.rendLineNumberStart=t,o.rendLineNumberStart+o.linesLength-1<i){const e=o.rendLineNumberStart+o.linesLength,r=i;e<=r&&(this._insertLinesAfter(o,e,r,n,t),o.linesLength+=r-e+1)}else if(o.rendLineNumberStart+o.linesLength-1>i){const e=Math.max(0,i-o.rendLineNumberStart+1),t=o.linesLength-1,n=t-e+1;n>0&&(this._removeLinesAfter(o,n),o.linesLength-=n)}return this._finishRendering(o,!1,n),o}_renderUntouchedLines(e,t,i,n,o){const r=e.rendLineNumberStart,s=e.lines;for(let a=t;a<=i;a++){const e=r+a;s[a].layoutLine(e,n[e-o])}}_insertLinesBefore(e,t,i,n,o){const r=[];let s=0;for(let a=t;a<=i;a++)r[s++]=this.host.createVisibleLine();e.lines=r.concat(e.lines)}_removeLinesBefore(e,t){for(let i=0;i<t;i++){const t=e.lines[i].getDomNode();t&&this.domNode.removeChild(t)}e.lines.splice(0,t)}_insertLinesAfter(e,t,i,n,o){const r=[];let s=0;for(let a=t;a<=i;a++)r[s++]=this.host.createVisibleLine();e.lines=e.lines.concat(r)}_removeLinesAfter(e,t){const i=e.linesLength-t;for(let n=0;n<t;n++){const t=e.lines[i+n].getDomNode();t&&this.domNode.removeChild(t)}e.lines.splice(i,t)}_finishRenderingNewLines(e,t,i,n){const o=this.domNode.lastChild;t||!o?this.domNode.innerHTML=i:o.insertAdjacentHTML("afterend",i);let r=this.domNode.lastChild;for(let s=e.linesLength-1;s>=0;s--){const t=e.lines[s];n[s]&&(t.setDomNode(r),r=r.previousSibling)}}_finishRenderingInvalidLines(e,t,i){const n=document.createElement("div");n.innerHTML=t;for(let o=0;o<e.linesLength;o++){const t=e.lines[o];if(i[o]){const e=n.firstChild,i=t.getDomNode();i.parentNode.replaceChild(e,i),t.setDomNode(e)}}}_finishRendering(e,t,i){const n=Ky._sb,o=e.linesLength,r=e.lines,s=e.rendLineNumberStart,a=[];{n.reset();let l=!1;for(let e=0;e<o;e++){const t=r[e];a[e]=!1;const o=t.getDomNode();if(o)continue;const c=t.renderLine(e+s,i[e],this.viewportData,n);c&&(a[e]=!0,l=!0)}l&&this._finishRenderingNewLines(e,t,n.build(),a)}{n.reset();let t=!1;const l=[];for(let e=0;e<o;e++){const o=r[e];if(l[e]=!1,a[e])continue;const c=o.renderLine(e+s,i[e],this.viewportData,n);c&&(l[e]=!0,t=!0)}t&&this._finishRenderingInvalidLines(e,n.build(),l)}}}Ky._sb=vc(1e5);class qy extends jm{constructor(e){super(e),this._visibleLines=new jy(this),this.domNode=this._visibleLines.domNode,this._dynamicOverlays=[],this._isFocused=!1,this.domNode.setClassName("view-overlays")}shouldRender(){if(super.shouldRender())return!0;for(let e=0,t=this._dynamicOverlays.length;e<t;e++){const t=this._dynamicOverlays[e];if(t.shouldRender())return!0}return!1}dispose(){super.dispose();for(let e=0,t=this._dynamicOverlays.length;e<t;e++){const t=this._dynamicOverlays[e];t.dispose()}this._dynamicOverlays=[]}getDomNode(){return this.domNode}createVisibleLine(){return new $y(this._context.configuration,this._dynamicOverlays)}addDynamicOverlay(e){this._dynamicOverlays.push(e)}onConfigurationChanged(e){this._visibleLines.onConfigurationChanged(e);const t=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();for(let n=t;n<=i;n++){const t=this._visibleLines.getVisibleLine(n);t.onConfigurationChanged(e)}return!0}onFlushed(e){return this._visibleLines.onFlushed(e)}onFocusChanged(e){return this._isFocused=e.isFocused,!0}onLinesChanged(e){return this._visibleLines.onLinesChanged(e)}onLinesDeleted(e){return this._visibleLines.onLinesDeleted(e)}onLinesInserted(e){return this._visibleLines.onLinesInserted(e)}onScrollChanged(e){return this._visibleLines.onScrollChanged(e)||!0}onTokensChanged(e){return this._visibleLines.onTokensChanged(e)}onZonesChanged(e){return this._visibleLines.onZonesChanged(e)}prepareRender(e){const t=this._dynamicOverlays.filter(e=>e.shouldRender());for(let i=0,n=t.length;i<n;i++){const n=t[i];n.prepareRender(e),n.onDidRender()}}render(e){this._viewOverlaysRender(e),this.domNode.toggleClassName("focused",this._isFocused)}_viewOverlaysRender(e){this._visibleLines.renderLines(e.viewportData)}}class $y{constructor(e,t){this._configuration=e,this._lineHeight=this._configuration.options.get(51),this._dynamicOverlays=t,this._domNode=null,this._renderedContent=null}getDomNode(){return this._domNode?this._domNode.domNode:null}setDomNode(e){this._domNode=km(e)}onContentChanged(){}onTokensChanged(){}onConfigurationChanged(e){this._lineHeight=this._configuration.options.get(51)}renderLine(e,t,i,n){let o="";for(let r=0,s=this._dynamicOverlays.length;r<s;r++){const t=this._dynamicOverlays[r];o+=t.render(i.startLineNumber,e)}return this._renderedContent!==o&&(this._renderedContent=o,n.appendASCIIString('<div style="position:absolute;top:'),n.appendASCIIString(String(t)),n.appendASCIIString("px;width:100%;height:"),n.appendASCIIString(String(this._lineHeight)),n.appendASCIIString('px;">'),n.appendASCIIString(o),n.appendASCIIString("</div>"),!0)}layoutLine(e,t){this._domNode&&(this._domNode.setTop(t),this._domNode.setHeight(this._lineHeight))}}class Gy extends qy{constructor(e){super(e);const t=this._context.configuration.options,i=t.get(117);this._contentWidth=i.contentWidth,this.domNode.setHeight(0)}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(117);return this._contentWidth=i.contentWidth,super.onConfigurationChanged(e)||!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollWidthChanged}_viewOverlaysRender(e){super._viewOverlaysRender(e),this.domNode.setWidth(Math.max(e.scrollWidth,this._contentWidth))}}class Yy extends qy{constructor(e){super(e);const t=this._context.configuration.options,i=t.get(117);this._contentLeft=i.contentLeft,this.domNode.setClassName("margin-view-overlays"),this.domNode.setWidth(1),Nf.applyFontInfo(this.domNode,t.get(36))}onConfigurationChanged(e){const t=this._context.configuration.options;Nf.applyFontInfo(this.domNode,t.get(36));const i=t.get(117);return this._contentLeft=i.contentLeft,super.onConfigurationChanged(e)||!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollHeightChanged}_viewOverlaysRender(e){super._viewOverlaysRender(e);const t=Math.min(e.scrollHeight,1e6);this.domNode.setHeight(t),this.domNode.setWidth(this._contentLeft)}}class Xy{constructor(e,t){this.top=e,this.left=t}}class Zy extends jm{constructor(e,t){super(e),this._viewDomNode=t,this._widgets={},this.domNode=km(document.createElement("div")),Km.write(this.domNode,1),this.domNode.setClassName("contentWidgets"),this.domNode.setPosition("absolute"),this.domNode.setTop(0),this.overflowingContentWidgetsDomNode=km(document.createElement("div")),Km.write(this.overflowingContentWidgetsDomNode,2),this.overflowingContentWidgetsDomNode.setClassName("overflowingContentWidgets")}dispose(){super.dispose(),this._widgets={}}onConfigurationChanged(e){const t=Object.keys(this._widgets);for(const i of t)this._widgets[i].onConfigurationChanged(e);return!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLineMappingChanged(e){const t=Object.keys(this._widgets);for(const i of t)this._widgets[i].onLineMappingChanged(e);return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return!0}onZonesChanged(e){return!0}addWidget(e){const t=new Qy(this._context,this._viewDomNode,e);this._widgets[t.id]=t,t.allowEditorOverflow?this.overflowingContentWidgetsDomNode.appendChild(t.domNode):this.domNode.appendChild(t.domNode),this.setShouldRender()}setWidgetPosition(e,t,i){const n=this._widgets[e.getId()];n.setPosition(t,i),this.setShouldRender()}removeWidget(e){const t=e.getId();if(this._widgets.hasOwnProperty(t)){const e=this._widgets[t];delete this._widgets[t];const i=e.domNode.domNode;i.parentNode.removeChild(i),i.removeAttribute("monaco-visible-content-widget"),this.setShouldRender()}}shouldSuppressMouseDownOnWidget(e){return!!this._widgets.hasOwnProperty(e)&&this._widgets[e].suppressMouseDown}onBeforeRender(e){const t=Object.keys(this._widgets);for(const i of t)this._widgets[i].onBeforeRender(e)}prepareRender(e){const t=Object.keys(this._widgets);for(const i of t)this._widgets[i].prepareRender(e)}render(e){const t=Object.keys(this._widgets);for(const i of t)this._widgets[i].render(e)}}class Qy{constructor(e,t,i){this._context=e,this._viewDomNode=t,this._actual=i,this.domNode=km(this._actual.getDomNode()),this.id=this._actual.getId(),this.allowEditorOverflow=this._actual.allowEditorOverflow||!1,this.suppressMouseDown=this._actual.suppressMouseDown||!1;const n=this._context.configuration.options,o=n.get(117);this._fixedOverflowWidgets=n.get(30),this._contentWidth=o.contentWidth,this._contentLeft=o.contentLeft,this._lineHeight=n.get(51),this._range=null,this._viewRange=null,this._preference=[],this._cachedDomNodeClientWidth=-1,this._cachedDomNodeClientHeight=-1,this._maxWidth=this._getMaxWidth(),this._isVisible=!1,this._renderData=null,this.domNode.setPosition(this._fixedOverflowWidgets&&this.allowEditorOverflow?"fixed":"absolute"),this.domNode.setVisibility("hidden"),this.domNode.setAttribute("widgetId",this.id),this.domNode.setMaxWidth(this._maxWidth)}onConfigurationChanged(e){const t=this._context.configuration.options;if(this._lineHeight=t.get(51),e.hasChanged(117)){const e=t.get(117);this._contentLeft=e.contentLeft,this._contentWidth=e.contentWidth,this._maxWidth=this._getMaxWidth()}}onLineMappingChanged(e){this._setPosition(this._range)}_setPosition(e){if(this._range=e,this._viewRange=null,this._range){const e=this._context.model.validateModelRange(this._range);(this._context.model.coordinatesConverter.modelPositionIsVisible(e.getStartPosition())||this._context.model.coordinatesConverter.modelPositionIsVisible(e.getEndPosition()))&&(this._viewRange=this._context.model.coordinatesConverter.convertModelRangeToViewRange(e))}}_getMaxWidth(){return this.allowEditorOverflow?window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth:this._contentWidth}setPosition(e,t){this._setPosition(e),this._preference=t,this._cachedDomNodeClientWidth=-1,this._cachedDomNodeClientHeight=-1}_layoutBoxInViewport(e,t,i,n,o){const r=e.top,s=r,a=t.top+this._lineHeight,l=o.viewportHeight-a,c=r-n,h=s>=n,d=a,u=l>=n;let g=e.left,f=t.left;return g+i>o.scrollLeft+o.viewportWidth&&(g=o.scrollLeft+o.viewportWidth-i),f+i>o.scrollLeft+o.viewportWidth&&(f=o.scrollLeft+o.viewportWidth-i),g<o.scrollLeft&&(g=o.scrollLeft),f<o.scrollLeft&&(f=o.scrollLeft),{fitsAbove:h,aboveTop:c,aboveLeft:g,fitsBelow:u,belowTop:d,belowLeft:f}}_layoutHorizontalSegmentInPage(e,t,i,n){const o=Math.max(0,t.left-n),r=Math.min(t.left+t.width+n,e.width);let s=t.left+i-Io.scrollX;if(s+n>r){const e=s-(r-n);s-=e,i-=e}if(s<o){const e=s-o;s-=e,i-=e}return[i,s]}_layoutBoxInPage(e,t,i,n,o){const r=e.top-n,s=t.top+this._lineHeight,a=Mo(this._viewDomNode.domNode),l=a.top+r-Io.scrollY,c=a.top+s-Io.scrollY,h=Eo(document.body),[d,u]=this._layoutHorizontalSegmentInPage(h,a,e.left-o.scrollLeft+this._contentLeft,i),[g,f]=this._layoutHorizontalSegmentInPage(h,a,t.left-o.scrollLeft+this._contentLeft,i),m=22,p=22,_=l>=m,b=c+n<=h.height-p;return this._fixedOverflowWidgets?{fitsAbove:_,aboveTop:Math.max(l,m),aboveLeft:u,fitsBelow:b,belowTop:c,belowLeft:f}:{fitsAbove:_,aboveTop:r,aboveLeft:d,fitsBelow:b,belowTop:s,belowLeft:g}}_prepareRenderWidgetAtExactPositionOverflowing(e){return new Xy(e.top,e.left+this._contentLeft)}_getTopAndBottomLeft(e){if(!this._viewRange)return[null,null];const t=e.linesVisibleRangesForRange(this._viewRange,!1);if(!t||0===t.length)return[null,null];let i=t[0],n=t[0];for(const h of t)h.lineNumber<i.lineNumber&&(i=h),h.lineNumber>n.lineNumber&&(n=h);let o=1073741824;for(const h of i.ranges)h.left<o&&(o=h.left);let r=1073741824;for(const h of n.ranges)h.left<r&&(r=h.left);const s=e.getVerticalOffsetForLineNumber(i.lineNumber)-e.scrollTop,a=new Xy(s,o),l=e.getVerticalOffsetForLineNumber(n.lineNumber)-e.scrollTop,c=new Xy(l,r);return[a,c]}_prepareRenderWidget(e){const[t,i]=this._getTopAndBottomLeft(e);if(!t||!i)return null;if(-1===this._cachedDomNodeClientWidth||-1===this._cachedDomNodeClientHeight){const e=this.domNode.domNode;this._cachedDomNodeClientWidth=e.clientWidth,this._cachedDomNodeClientHeight=e.clientHeight}let n;if(n=this.allowEditorOverflow?this._layoutBoxInPage(t,i,this._cachedDomNodeClientWidth,this._cachedDomNodeClientHeight,e):this._layoutBoxInViewport(t,i,this._cachedDomNodeClientWidth,this._cachedDomNodeClientHeight,e),this._preference)for(let o=1;o<=2;o++)for(const e of this._preference)if(1===e){if(!n)return null;if(2===o||n.fitsAbove)return new Xy(n.aboveTop,n.aboveLeft)}else{if(2!==e)return this.allowEditorOverflow?this._prepareRenderWidgetAtExactPositionOverflowing(t):t;if(!n)return null;if(2===o||n.fitsBelow)return new Xy(n.belowTop,n.belowLeft)}return null}onBeforeRender(e){this._viewRange&&this._preference&&(this._viewRange.endLineNumber<e.startLineNumber||this._viewRange.startLineNumber>e.endLineNumber||this.domNode.setMaxWidth(this._maxWidth))}prepareRender(e){this._renderData=this._prepareRenderWidget(e)}render(e){this._renderData?(this.allowEditorOverflow?(this.domNode.setTop(this._renderData.top),this.domNode.setLeft(this._renderData.left)):(this.domNode.setTop(this._renderData.top+e.scrollTop-e.bigNumbersDelta),this.domNode.setLeft(this._renderData.left)),this._isVisible||(this.domNode.setVisibility("inherit"),this.domNode.setAttribute("monaco-visible-content-widget","true"),this._isVisible=!0)):this._isVisible&&(this.domNode.removeAttribute("monaco-visible-content-widget"),this._isVisible=!1,this.domNode.setVisibility("hidden"))}}i("a2e5");let Jy=!0;class eS extends Fv{constructor(e){super(),this._context=e;const t=this._context.configuration.options,i=t.get(117);this._lineHeight=t.get(51),this._renderLineHighlight=t.get(77),this._renderLineHightlightOnlyWhenFocus=t.get(78),this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,this._selectionIsEmpty=!0,this._focused=!1,this._cursorLineNumbers=[],this._selections=[],this._renderData=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}_readFromSelections(){let e=!1;const t=Jy?this._selections.slice(0,1):this._selections,i=t.map(e=>e.positionLineNumber);i.sort((e,t)=>e-t),An(this._cursorLineNumbers,i)||(this._cursorLineNumbers=i,e=!0);const n=t.every(e=>e.isEmpty());return this._selectionIsEmpty!==n&&(this._selectionIsEmpty=n,e=!0),e}onThemeChanged(e){return this._readFromSelections()}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(117);return this._lineHeight=t.get(51),this._renderLineHighlight=t.get(77),this._renderLineHightlightOnlyWhenFocus=t.get(78),this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,!0}onCursorStateChanged(e){return this._selections=e.selections,this._readFromSelections()}onFlushed(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollWidthChanged||e.scrollTopChanged}onZonesChanged(e){return!0}onFocusChanged(e){return!!this._renderLineHightlightOnlyWhenFocus&&(this._focused=e.isFocused,!0)}prepareRender(e){if(!this._shouldRenderThis())return void(this._renderData=null);const t=this._renderOne(e),i=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber,o=this._cursorLineNumbers.length;let r=0;const s=[];for(let a=i;a<=n;a++){const e=a-i;while(r<o&&this._cursorLineNumbers[r]<a)r++;r<o&&this._cursorLineNumbers[r]===a?s[e]=t:s[e]=""}this._renderData=s}render(e,t){if(!this._renderData)return"";const i=t-e;return i>=this._renderData.length?"":this._renderData[i]}}class tS extends eS{_renderOne(e){const t="current-line"+(this._shouldRenderOther()?" current-line-both":"");return`<div class="${t}" style="width:${Math.max(e.scrollWidth,this._contentWidth)}px; height:${this._lineHeight}px;"></div>`}_shouldRenderThis(){return("line"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&this._selectionIsEmpty&&(!this._renderLineHightlightOnlyWhenFocus||this._focused)}_shouldRenderOther(){return("gutter"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&(!this._renderLineHightlightOnlyWhenFocus||this._focused)}}class iS extends eS{_renderOne(e){const t="current-line current-line-margin"+(this._shouldRenderOther()?" current-line-margin-both":"");return`<div class="${t}" style="width:${this._contentLeft}px; height:${this._lineHeight}px;"></div>`}_shouldRenderThis(){return("gutter"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&(!this._renderLineHightlightOnlyWhenFocus||this._focused)}_shouldRenderOther(){return("line"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&this._selectionIsEmpty&&(!this._renderLineHightlightOnlyWhenFocus||this._focused)}}cp((e,t)=>{Jy=!1;const i=e.getColor(MC);if(i&&(t.addRule(`.monaco-editor .view-overlays .current-line { background-color: ${i}; }`),t.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { background-color: ${i}; border: none; }`)),!i||i.isTransparent()||e.defines(IC)){const i=e.getColor(IC);i&&(Jy=!0,t.addRule(`.monaco-editor .view-overlays .current-line { border: 2px solid ${i}; }`),t.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { border: 2px solid ${i}; }`),"hc"===e.type&&(t.addRule(".monaco-editor .view-overlays .current-line { border-width: 1px; }"),t.addRule(".monaco-editor .margin-view-overlays .current-line-margin { border-width: 1px; }")))}});i("cc1a");class nS extends Fv{constructor(e){super(),this._context=e;const t=this._context.configuration.options;this._lineHeight=t.get(51),this._typicalHalfwidthCharacterWidth=t.get(36).typicalHalfwidthCharacterWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return this._lineHeight=t.get(51),this._typicalHalfwidthCharacterWidth=t.get(36).typicalHalfwidthCharacterWidth,!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged||e.scrollWidthChanged}onZonesChanged(e){return!0}prepareRender(e){const t=e.getDecorationsInViewport();let i=[],n=0;for(let a=0,l=t.length;a<l;a++){const e=t[a];e.options.className&&(i[n++]=e)}i=i.sort((e,t)=>{if(e.options.zIndex<t.options.zIndex)return-1;if(e.options.zIndex>t.options.zIndex)return 1;const i=e.options.className,n=t.options.className;return i<n?-1:i>n?1:Jt.compareRangesUsingStarts(e.range,t.range)});const o=e.visibleRange.startLineNumber,r=e.visibleRange.endLineNumber,s=[];for(let a=o;a<=r;a++){const e=a-o;s[e]=""}this._renderWholeLineDecorations(e,i,s),this._renderNormalDecorations(e,i,s),this._renderResult=s}_renderWholeLineDecorations(e,t,i){const n=String(this._lineHeight),o=e.visibleRange.startLineNumber,r=e.visibleRange.endLineNumber;for(let s=0,a=t.length;s<a;s++){const e=t[s];if(!e.options.isWholeLine)continue;const a='<div class="cdr '+e.options.className+'" style="left:0;width:100%;height:'+n+'px;"></div>',l=Math.max(e.range.startLineNumber,o),c=Math.min(e.range.endLineNumber,r);for(let t=l;t<=c;t++){const e=t-o;i[e]+=a}}}_renderNormalDecorations(e,t,i){const n=String(this._lineHeight),o=e.visibleRange.startLineNumber;let r=null,s=!1,a=null;for(let l=0,c=t.length;l<c;l++){const c=t[l];if(c.options.isWholeLine)continue;const h=c.options.className,d=Boolean(c.options.showIfCollapsed);let u=c.range;d&&1===u.endColumn&&u.endLineNumber!==u.startLineNumber&&(u=new Jt(u.startLineNumber,u.startColumn,u.endLineNumber-1,this._context.model.getLineMaxColumn(u.endLineNumber-1))),r===h&&s===d&&Jt.areIntersectingOrTouching(a,u)?a=Jt.plusRange(a,u):(null!==r&&this._renderNormalDecoration(e,a,r,s,n,o,i),r=h,s=d,a=u)}null!==r&&this._renderNormalDecoration(e,a,r,s,n,o,i)}_renderNormalDecoration(e,t,i,n,o,r,s){const a=e.linesVisibleRangesForRange(t,"findMatch"===i);if(a)for(let l=0,c=a.length;l<c;l++){const e=a[l];if(e.outsideRenderedLine)continue;const t=e.lineNumber-r;if(n&&1===e.ranges.length){const t=e.ranges[0];0===t.width&&(e.ranges[0]=new Ym(t.left,this._typicalHalfwidthCharacterWidth))}for(let n=0,r=e.ranges.length;n<r;n++){const r=e.ranges[n],a='<div class="cdr '+i+'" style="left:'+String(r.left)+"px;width:"+String(r.width)+"px;height:"+o+'px;"></div>';s[t]+=a}}}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}i("7043");class oS extends Oe{onclick(e,t){this._register(ho(e,Zo.CLICK,e=>t(new Cn(e))))}onmousedown(e,t){this._register(ho(e,Zo.MOUSE_DOWN,e=>t(new Cn(e))))}onmouseover(e,t){this._register(ho(e,Zo.MOUSE_OVER,e=>t(new Cn(e))))}onnonbubblingmouseout(e,t){this._register(mo(e,e=>t(new Cn(e))))}onkeydown(e,t){this._register(ho(e,Zo.KEY_DOWN,e=>t(new mn(e))))}onkeyup(e,t){this._register(ho(e,Zo.KEY_UP,e=>t(new mn(e))))}oninput(e,t){this._register(ho(e,Zo.INPUT,t))}onblur(e,t){this._register(ho(e,Zo.BLUR,t))}onfocus(e,t){this._register(ho(e,Zo.FOCUS,t))}ignoreGesture(e){Im.ignoreTarget(e)}}const rS=11;class sS extends oS{constructor(e){super(),this._onActivate=e.onActivate,this.bgDomNode=document.createElement("div"),this.bgDomNode.className="arrow-background",this.bgDomNode.style.position="absolute",this.bgDomNode.style.width=e.bgWidth+"px",this.bgDomNode.style.height=e.bgHeight+"px","undefined"!==typeof e.top&&(this.bgDomNode.style.top="0px"),"undefined"!==typeof e.left&&(this.bgDomNode.style.left="0px"),"undefined"!==typeof e.bottom&&(this.bgDomNode.style.bottom="0px"),"undefined"!==typeof e.right&&(this.bgDomNode.style.right="0px"),this.domNode=document.createElement("div"),this.domNode.className=e.className,ro(this.domNode,e.icon.classNames),this.domNode.style.position="absolute",this.domNode.style.width=rS+"px",this.domNode.style.height=rS+"px","undefined"!==typeof e.top&&(this.domNode.style.top=e.top+"px"),"undefined"!==typeof e.left&&(this.domNode.style.left=e.left+"px"),"undefined"!==typeof e.bottom&&(this.domNode.style.bottom=e.bottom+"px"),"undefined"!==typeof e.right&&(this.domNode.style.right=e.right+"px"),this._mouseMoveMonitor=this._register(new Am),this.onmousedown(this.bgDomNode,e=>this._arrowMouseDown(e)),this.onmousedown(this.domNode,e=>this._arrowMouseDown(e)),this._mousedownRepeatTimer=this._register(new Nn),this._mousedownScheduleRepeatTimer=this._register(new Dn)}_arrowMouseDown(e){let t=()=>{this._mousedownRepeatTimer.cancelAndSet(()=>this._onActivate(),1e3/24)};this._onActivate(),this._mousedownRepeatTimer.cancel(),this._mousedownScheduleRepeatTimer.cancelAndSet(t,200),this._mouseMoveMonitor.startMonitoring(e.target,e.buttons,Om,e=>{},()=>{this._mousedownRepeatTimer.cancel(),this._mousedownScheduleRepeatTimer.cancel()}),e.preventDefault()}}class aS extends Oe{constructor(e,t,i){super(),this._visibility=e,this._visibleClassName=t,this._invisibleClassName=i,this._domNode=null,this._isVisible=!1,this._isNeeded=!1,this._shouldBeVisible=!1,this._revealTimer=this._register(new Dn)}applyVisibilitySetting(e){return 2!==this._visibility&&(3===this._visibility||e)}setShouldBeVisible(e){let t=this.applyVisibilitySetting(e);this._shouldBeVisible!==t&&(this._shouldBeVisible=t,this.ensureVisibility())}setIsNeeded(e){this._isNeeded!==e&&(this._isNeeded=e,this.ensureVisibility())}setDomNode(e){this._domNode=e,this._domNode.setClassName(this._invisibleClassName),this.setShouldBeVisible(!1)}ensureVisibility(){this._isNeeded?this._shouldBeVisible?this._reveal():this._hide(!0):this._hide(!1)}_reveal(){this._isVisible||(this._isVisible=!0,this._revealTimer.setIfNotSet(()=>{this._domNode&&this._domNode.setClassName(this._visibleClassName)},0))}_hide(e){this._revealTimer.cancel(),this._isVisible&&(this._isVisible=!1,this._domNode&&this._domNode.setClassName(this._invisibleClassName+(e?" fade":"")))}}const lS=140;class cS extends oS{constructor(e){super(),this._lazyRender=e.lazyRender,this._host=e.host,this._scrollable=e.scrollable,this._scrollbarState=e.scrollbarState,this._visibilityController=this._register(new aS(e.visibility,"visible scrollbar "+e.extraScrollbarClassName,"invisible scrollbar "+e.extraScrollbarClassName)),this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._mouseMoveMonitor=this._register(new Am),this._shouldRender=!0,this.domNode=km(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this._visibilityController.setDomNode(this.domNode),this.domNode.setPosition("absolute"),this.onmousedown(this.domNode.domNode,e=>this._domNodeMouseDown(e))}_createArrow(e){let t=this._register(new sS(e));this.domNode.domNode.appendChild(t.bgDomNode),this.domNode.domNode.appendChild(t.domNode)}_createSlider(e,t,i,n){this.slider=km(document.createElement("div")),this.slider.setClassName("slider"),this.slider.setPosition("absolute"),this.slider.setTop(e),this.slider.setLeft(t),"number"===typeof i&&this.slider.setWidth(i),"number"===typeof n&&this.slider.setHeight(n),this.slider.setLayerHinting(!0),this.slider.setContain("strict"),this.domNode.domNode.appendChild(this.slider.domNode),this.onmousedown(this.slider.domNode,e=>{e.leftButton&&(e.preventDefault(),this._sliderMouseDown(e,()=>{}))}),this.onclick(this.slider.domNode,e=>{e.leftButton&&e.stopPropagation()})}_onElementSize(e){return this._scrollbarState.setVisibleSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollSize(e){return this._scrollbarState.setScrollSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollPosition(e){return this._scrollbarState.setScrollPosition(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}beginReveal(){this._visibilityController.setShouldBeVisible(!0)}beginHide(){this._visibilityController.setShouldBeVisible(!1)}render(){this._shouldRender&&(this._shouldRender=!1,this._renderDomNode(this._scrollbarState.getRectangleLargeSize(),this._scrollbarState.getRectangleSmallSize()),this._updateSlider(this._scrollbarState.getSliderSize(),this._scrollbarState.getArrowSize()+this._scrollbarState.getSliderPosition()))}_domNodeMouseDown(e){e.target===this.domNode.domNode&&this._onMouseDown(e)}delegateMouseDown(e){let t=this.domNode.domNode.getClientRects()[0].top,i=t+this._scrollbarState.getSliderPosition(),n=t+this._scrollbarState.getSliderPosition()+this._scrollbarState.getSliderSize(),o=this._sliderMousePosition(e);i<=o&&o<=n?e.leftButton&&(e.preventDefault(),this._sliderMouseDown(e,()=>{})):this._onMouseDown(e)}_onMouseDown(e){let t,i;if(e.target===this.domNode.domNode&&"number"===typeof e.browserEvent.offsetX&&"number"===typeof e.browserEvent.offsetY)t=e.browserEvent.offsetX,i=e.browserEvent.offsetY;else{const n=Mo(this.domNode.domNode);t=e.posx-n.left,i=e.posy-n.top}this._setDesiredScrollPositionNow(this._scrollbarState.getDesiredScrollPositionFromOffset(this._mouseDownRelativePosition(t,i))),e.leftButton&&(e.preventDefault(),this._sliderMouseDown(e,()=>{}))}_sliderMouseDown(e,t){const i=this._sliderMousePosition(e),n=this._sliderOrthogonalMousePosition(e),o=this._scrollbarState.clone();this.slider.toggleClassName("active",!0),this._mouseMoveMonitor.startMonitoring(e.target,e.buttons,Om,e=>{const t=this._sliderOrthogonalMousePosition(e),s=Math.abs(t-n);if(r["i"]&&s>lS)return void this._setDesiredScrollPositionNow(o.getScrollPosition());const a=this._sliderMousePosition(e),l=a-i;this._setDesiredScrollPositionNow(o.getDesiredScrollPositionFromDelta(l))},()=>{this.slider.toggleClassName("active",!1),this._host.onDragEnd(),t()}),this._host.onDragStart()}_setDesiredScrollPositionNow(e){let t={};this.writeScrollPosition(t,e),this._scrollable.setScrollPositionNow(t)}updateScrollbarSize(e){this._updateScrollbarSize(e),this._scrollbarState.setScrollbarSize(e),this._shouldRender=!0,this._lazyRender||this.render()}}const hS=20;class dS{constructor(e,t,i,n,o,r){this._scrollbarSize=Math.round(t),this._oppositeScrollbarSize=Math.round(i),this._arrowSize=Math.round(e),this._visibleSize=n,this._scrollSize=o,this._scrollPosition=r,this._computedAvailableSize=0,this._computedIsNeeded=!1,this._computedSliderSize=0,this._computedSliderRatio=0,this._computedSliderPosition=0,this._refreshComputedValues()}clone(){return new dS(this._arrowSize,this._scrollbarSize,this._oppositeScrollbarSize,this._visibleSize,this._scrollSize,this._scrollPosition)}setVisibleSize(e){let t=Math.round(e);return this._visibleSize!==t&&(this._visibleSize=t,this._refreshComputedValues(),!0)}setScrollSize(e){let t=Math.round(e);return this._scrollSize!==t&&(this._scrollSize=t,this._refreshComputedValues(),!0)}setScrollPosition(e){let t=Math.round(e);return this._scrollPosition!==t&&(this._scrollPosition=t,this._refreshComputedValues(),!0)}setScrollbarSize(e){this._scrollbarSize=e}static _computeValues(e,t,i,n,o){const r=Math.max(0,i-e),s=Math.max(0,r-2*t),a=n>0&&n>i;if(!a)return{computedAvailableSize:Math.round(r),computedIsNeeded:a,computedSliderSize:Math.round(s),computedSliderRatio:0,computedSliderPosition:0};const l=Math.round(Math.max(hS,Math.floor(i*s/n))),c=(s-l)/(n-i),h=o*c;return{computedAvailableSize:Math.round(r),computedIsNeeded:a,computedSliderSize:Math.round(l),computedSliderRatio:c,computedSliderPosition:Math.round(h)}}_refreshComputedValues(){const e=dS._computeValues(this._oppositeScrollbarSize,this._arrowSize,this._visibleSize,this._scrollSize,this._scrollPosition);this._computedAvailableSize=e.computedAvailableSize,this._computedIsNeeded=e.computedIsNeeded,this._computedSliderSize=e.computedSliderSize,this._computedSliderRatio=e.computedSliderRatio,this._computedSliderPosition=e.computedSliderPosition}getArrowSize(){return this._arrowSize}getScrollPosition(){return this._scrollPosition}getRectangleLargeSize(){return this._computedAvailableSize}getRectangleSmallSize(){return this._scrollbarSize}isNeeded(){return this._computedIsNeeded}getSliderSize(){return this._computedSliderSize}getSliderPosition(){return this._computedSliderPosition}getDesiredScrollPositionFromOffset(e){if(!this._computedIsNeeded)return 0;let t=e-this._arrowSize-this._computedSliderSize/2;return Math.round(t/this._computedSliderRatio)}getDesiredScrollPositionFromDelta(e){if(!this._computedIsNeeded)return 0;let t=this._computedSliderPosition+e;return Math.round(t/this._computedSliderRatio)}}const uS=hl("scrollbar-button-left",dl.triangleLeft),gS=hl("scrollbar-button-right",dl.triangleRight);class fS extends cS{constructor(e,t,i){const n=e.getScrollDimensions(),o=e.getCurrentScrollPosition();if(super({lazyRender:t.lazyRender,host:i,scrollbarState:new dS(t.horizontalHasArrows?t.arrowSize:0,2===t.horizontal?0:t.horizontalScrollbarSize,2===t.vertical?0:t.verticalScrollbarSize,n.width,n.scrollWidth,o.scrollLeft),visibility:t.horizontal,extraScrollbarClassName:"horizontal",scrollable:e}),t.horizontalHasArrows){let e=(t.arrowSize-rS)/2,i=(t.horizontalScrollbarSize-rS)/2;this._createArrow({className:"scra",icon:uS,top:i,left:e,bottom:void 0,right:void 0,bgWidth:t.arrowSize,bgHeight:t.horizontalScrollbarSize,onActivate:()=>this._host.onMouseWheel(new yn(null,1,0))}),this._createArrow({className:"scra",icon:gS,top:i,left:void 0,bottom:void 0,right:e,bgWidth:t.arrowSize,bgHeight:t.horizontalScrollbarSize,onActivate:()=>this._host.onMouseWheel(new yn(null,-1,0))})}this._createSlider(Math.floor((t.horizontalScrollbarSize-t.horizontalSliderSize)/2),0,void 0,t.horizontalSliderSize)}_updateSlider(e,t){this.slider.setWidth(e),this.slider.setLeft(t)}_renderDomNode(e,t){this.domNode.setWidth(e),this.domNode.setHeight(t),this.domNode.setLeft(0),this.domNode.setBottom(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollWidth)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollLeft)||this._shouldRender,this._shouldRender=this._onElementSize(e.width)||this._shouldRender,this._shouldRender}_mouseDownRelativePosition(e,t){return e}_sliderMousePosition(e){return e.posx}_sliderOrthogonalMousePosition(e){return e.posy}_updateScrollbarSize(e){this.slider.setHeight(e)}writeScrollPosition(e,t){e.scrollLeft=t}}const mS=hl("scrollbar-button-up",dl.triangleUp),pS=hl("scrollbar-button-down",dl.triangleDown);class _S extends cS{constructor(e,t,i){const n=e.getScrollDimensions(),o=e.getCurrentScrollPosition();if(super({lazyRender:t.lazyRender,host:i,scrollbarState:new dS(t.verticalHasArrows?t.arrowSize:0,2===t.vertical?0:t.verticalScrollbarSize,0,n.height,n.scrollHeight,o.scrollTop),visibility:t.vertical,extraScrollbarClassName:"vertical",scrollable:e}),t.verticalHasArrows){let e=(t.arrowSize-rS)/2,i=(t.verticalScrollbarSize-rS)/2;this._createArrow({className:"scra",icon:mS,top:e,left:i,bottom:void 0,right:void 0,bgWidth:t.verticalScrollbarSize,bgHeight:t.arrowSize,onActivate:()=>this._host.onMouseWheel(new yn(null,0,1))}),this._createArrow({className:"scra",icon:pS,top:void 0,left:i,bottom:e,right:void 0,bgWidth:t.verticalScrollbarSize,bgHeight:t.arrowSize,onActivate:()=>this._host.onMouseWheel(new yn(null,0,-1))})}this._createSlider(0,Math.floor((t.verticalScrollbarSize-t.verticalSliderSize)/2),t.verticalSliderSize,void 0)}_updateSlider(e,t){this.slider.setHeight(e),this.slider.setTop(t)}_renderDomNode(e,t){this.domNode.setWidth(t),this.domNode.setHeight(e),this.domNode.setRight(0),this.domNode.setTop(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollHeight)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollTop)||this._shouldRender,this._shouldRender=this._onElementSize(e.height)||this._shouldRender,this._shouldRender}_mouseDownRelativePosition(e,t){return t}_sliderMousePosition(e){return e.posy}_sliderOrthogonalMousePosition(e){return e.posx}_updateScrollbarSize(e){this.slider.setWidth(e)}writeScrollPosition(e,t){e.scrollTop=t}}class bS{constructor(e,t,i,n,o,r){e|=0,t|=0,i|=0,n|=0,o|=0,r|=0,this.rawScrollLeft=i,this.rawScrollTop=r,e<0&&(e=0),i+e>t&&(i=t-e),i<0&&(i=0),n<0&&(n=0),r+n>o&&(r=o-n),r<0&&(r=0),this.width=e,this.scrollWidth=t,this.scrollLeft=i,this.height=n,this.scrollHeight=o,this.scrollTop=r}equals(e){return this.rawScrollLeft===e.rawScrollLeft&&this.rawScrollTop===e.rawScrollTop&&this.width===e.width&&this.scrollWidth===e.scrollWidth&&this.scrollLeft===e.scrollLeft&&this.height===e.height&&this.scrollHeight===e.scrollHeight&&this.scrollTop===e.scrollTop}withScrollDimensions(e,t){return new bS("undefined"!==typeof e.width?e.width:this.width,"undefined"!==typeof e.scrollWidth?e.scrollWidth:this.scrollWidth,t?this.rawScrollLeft:this.scrollLeft,"undefined"!==typeof e.height?e.height:this.height,"undefined"!==typeof e.scrollHeight?e.scrollHeight:this.scrollHeight,t?this.rawScrollTop:this.scrollTop)}withScrollPosition(e){return new bS(this.width,this.scrollWidth,"undefined"!==typeof e.scrollLeft?e.scrollLeft:this.rawScrollLeft,this.height,this.scrollHeight,"undefined"!==typeof e.scrollTop?e.scrollTop:this.rawScrollTop)}createScrollEvent(e){const t=this.width!==e.width,i=this.scrollWidth!==e.scrollWidth,n=this.scrollLeft!==e.scrollLeft,o=this.height!==e.height,r=this.scrollHeight!==e.scrollHeight,s=this.scrollTop!==e.scrollTop;return{oldWidth:e.width,oldScrollWidth:e.scrollWidth,oldScrollLeft:e.scrollLeft,width:this.width,scrollWidth:this.scrollWidth,scrollLeft:this.scrollLeft,oldHeight:e.height,oldScrollHeight:e.scrollHeight,oldScrollTop:e.scrollTop,height:this.height,scrollHeight:this.scrollHeight,scrollTop:this.scrollTop,widthChanged:t,scrollWidthChanged:i,scrollLeftChanged:n,heightChanged:o,scrollHeightChanged:r,scrollTopChanged:s}}}class vS extends Oe{constructor(e,t){super(),this._onScroll=this._register(new Ve),this.onScroll=this._onScroll.event,this._smoothScrollDuration=e,this._scheduleAtNextAnimationFrame=t,this._state=new bS(0,0,0,0,0,0),this._smoothScrolling=null}dispose(){this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),super.dispose()}setSmoothScrollDuration(e){this._smoothScrollDuration=e}validateScrollPosition(e){return this._state.withScrollPosition(e)}getScrollDimensions(){return this._state}setScrollDimensions(e,t){const i=this._state.withScrollDimensions(e,t);this._setState(i),this._smoothScrolling&&this._smoothScrolling.acceptScrollDimensions(this._state)}getFutureScrollPosition(){return this._smoothScrolling?this._smoothScrolling.to:this._state}getCurrentScrollPosition(){return this._state}setScrollPositionNow(e){const t=this._state.withScrollPosition(e);this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),this._setState(t)}setScrollPositionSmooth(e){if(0===this._smoothScrollDuration)return this.setScrollPositionNow(e);if(this._smoothScrolling){e={scrollLeft:"undefined"===typeof e.scrollLeft?this._smoothScrolling.to.scrollLeft:e.scrollLeft,scrollTop:"undefined"===typeof e.scrollTop?this._smoothScrolling.to.scrollTop:e.scrollTop};const t=this._state.withScrollPosition(e);if(this._smoothScrolling.to.scrollLeft===t.scrollLeft&&this._smoothScrolling.to.scrollTop===t.scrollTop)return;const i=this._smoothScrolling.combine(this._state,t,this._smoothScrollDuration);this._smoothScrolling.dispose(),this._smoothScrolling=i}else{const t=this._state.withScrollPosition(e);this._smoothScrolling=SS.start(this._state,t,this._smoothScrollDuration)}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}_performSmoothScrolling(){if(!this._smoothScrolling)return;const e=this._smoothScrolling.tick(),t=this._state.withScrollPosition(e);return this._setState(t),this._smoothScrolling?e.isDone?(this._smoothScrolling.dispose(),void(this._smoothScrolling=null)):void(this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})):void 0}_setState(e){const t=this._state;t.equals(e)||(this._state=e,this._onScroll.fire(this._state.createScrollEvent(t)))}}class wS{constructor(e,t,i){this.scrollLeft=e,this.scrollTop=t,this.isDone=i}}function CS(e,t){const i=t-e;return function(t){return e+i*LS(t)}}function yS(e,t,i){return function(n){return n<i?e(n/i):t((n-i)/(1-i))}}class SS{constructor(e,t,i,n){this.from=e,this.to=t,this.duration=n,this._startTime=i,this.animationFrameDisposable=null,this._initAnimations()}_initAnimations(){this.scrollLeft=this._initAnimation(this.from.scrollLeft,this.to.scrollLeft,this.to.width),this.scrollTop=this._initAnimation(this.from.scrollTop,this.to.scrollTop,this.to.height)}_initAnimation(e,t,i){const n=Math.abs(e-t);if(n>2.5*i){let n,o;return e<t?(n=e+.75*i,o=t-.75*i):(n=e-.75*i,o=t+.75*i),yS(CS(e,n),CS(o,t),.33)}return CS(e,t)}dispose(){null!==this.animationFrameDisposable&&(this.animationFrameDisposable.dispose(),this.animationFrameDisposable=null)}acceptScrollDimensions(e){this.to=e.withScrollPosition(this.to),this._initAnimations()}tick(){return this._tick(Date.now())}_tick(e){const t=(e-this._startTime)/this.duration;if(t<1){const e=this.scrollLeft(t),i=this.scrollTop(t);return new wS(e,i,!1)}return new wS(this.to.scrollLeft,this.to.scrollTop,!0)}combine(e,t,i){return SS.start(e,t,i)}static start(e,t,i){i+=10;const n=Date.now()-10;return new SS(e,t,n,i)}}function xS(e){return Math.pow(e,3)}function LS(e){return 1-xS(1-e)}const kS=500,ES=50,DS=!0;class NS{constructor(e,t,i){this.timestamp=e,this.deltaX=t,this.deltaY=i,this.score=0}}class TS{constructor(){this._capacity=5,this._memory=[],this._front=-1,this._rear=-1}isPhysicalMouseWheel(){if(-1===this._front&&-1===this._rear)return!1;let e=1,t=0,i=1,n=this._rear;do{const o=n===this._front?e:Math.pow(2,-i);if(e-=o,t+=this._memory[n].score*o,n===this._front)break;n=(this._capacity+n-1)%this._capacity,i++}while(1);return t<=.5}accept(e,t,i){const n=new NS(e,t,i);n.score=this._computeScore(n),-1===this._front&&-1===this._rear?(this._memory[0]=n,this._front=0,this._rear=0):(this._rear=(this._rear+1)%this._capacity,this._rear===this._front&&(this._front=(this._front+1)%this._capacity),this._memory[this._rear]=n)}_computeScore(e){if(Math.abs(e.deltaX)>0&&Math.abs(e.deltaY)>0)return 1;let t=.5;-1===this._front&&-1===this._rear||this._memory[this._rear];return this._isAlmostInt(e.deltaX)&&this._isAlmostInt(e.deltaY)||(t+=.25),Math.min(Math.max(t,0),1)}_isAlmostInt(e){const t=Math.abs(Math.round(e)-e);return t<.01}}TS.INSTANCE=new TS;class MS extends oS{constructor(e,t,i){super(),this._onScroll=this._register(new Ve),this.onScroll=this._onScroll.event,this._onWillScroll=this._register(new Ve),e.style.overflow="hidden",this._options=RS(t),this._scrollable=i,this._register(this._scrollable.onScroll(e=>{this._onWillScroll.fire(e),this._onDidScroll(e),this._onScroll.fire(e)}));let n={onMouseWheel:e=>this._onMouseWheel(e),onDragStart:()=>this._onDragStart(),onDragEnd:()=>this._onDragEnd()};this._verticalScrollbar=this._register(new _S(this._scrollable,this._options,n)),this._horizontalScrollbar=this._register(new fS(this._scrollable,this._options,n)),this._domNode=document.createElement("div"),this._domNode.className="monaco-scrollable-element "+this._options.className,this._domNode.setAttribute("role","presentation"),this._domNode.style.position="relative",this._domNode.style.overflow="hidden",this._domNode.appendChild(e),this._domNode.appendChild(this._horizontalScrollbar.domNode.domNode),this._domNode.appendChild(this._verticalScrollbar.domNode.domNode),this._options.useShadows?(this._leftShadowDomNode=km(document.createElement("div")),this._leftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._leftShadowDomNode.domNode),this._topShadowDomNode=km(document.createElement("div")),this._topShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topShadowDomNode.domNode),this._topLeftShadowDomNode=km(document.createElement("div")),this._topLeftShadowDomNode.setClassName("shadow top-left-corner"),this._domNode.appendChild(this._topLeftShadowDomNode.domNode)):(this._leftShadowDomNode=null,this._topShadowDomNode=null,this._topLeftShadowDomNode=null),this._listenOnDomNode=this._options.listenOnDomNode||this._domNode,this._mouseWheelToDispose=[],this._setListeningToMouseWheel(this._options.handleMouseWheel),this.onmouseover(this._listenOnDomNode,e=>this._onMouseOver(e)),this.onnonbubblingmouseout(this._listenOnDomNode,e=>this._onMouseOut(e)),this._hideTimeout=this._register(new Dn),this._isDragging=!1,this._mouseIsOver=!1,this._shouldRender=!0,this._revealOnScroll=!0}dispose(){this._mouseWheelToDispose=Ne(this._mouseWheelToDispose),super.dispose()}getDomNode(){return this._domNode}getOverviewRulerLayoutInfo(){return{parent:this._domNode,insertBefore:this._verticalScrollbar.domNode.domNode}}delegateVerticalScrollbarMouseDown(e){this._verticalScrollbar.delegateMouseDown(e)}getScrollDimensions(){return this._scrollable.getScrollDimensions()}setScrollDimensions(e){this._scrollable.setScrollDimensions(e,!1)}updateClassName(e){this._options.className=e,r["f"]&&(this._options.className+=" mac"),this._domNode.className="monaco-scrollable-element "+this._options.className}updateOptions(e){"undefined"!==typeof e.handleMouseWheel&&(this._options.handleMouseWheel=e.handleMouseWheel,this._setListeningToMouseWheel(this._options.handleMouseWheel)),"undefined"!==typeof e.mouseWheelScrollSensitivity&&(this._options.mouseWheelScrollSensitivity=e.mouseWheelScrollSensitivity),"undefined"!==typeof e.fastScrollSensitivity&&(this._options.fastScrollSensitivity=e.fastScrollSensitivity),"undefined"!==typeof e.scrollPredominantAxis&&(this._options.scrollPredominantAxis=e.scrollPredominantAxis),"undefined"!==typeof e.horizontalScrollbarSize&&this._horizontalScrollbar.updateScrollbarSize(e.horizontalScrollbarSize),this._options.lazyRender||this._render()}_setListeningToMouseWheel(e){let t=this._mouseWheelToDispose.length>0;if(t!==e&&(this._mouseWheelToDispose=Ne(this._mouseWheelToDispose),e)){let e=e=>{this._onMouseWheel(new yn(e))};this._mouseWheelToDispose.push(ho(this._listenOnDomNode,Zo.MOUSE_WHEEL,e,{passive:!1}))}}_onMouseWheel(e){const t=TS.INSTANCE;if(DS){const i=window.devicePixelRatio/Yi();r["i"]||r["d"]?t.accept(Date.now(),e.deltaX/i,e.deltaY/i):t.accept(Date.now(),e.deltaX,e.deltaY)}if(e.deltaY||e.deltaX){let i=e.deltaY*this._options.mouseWheelScrollSensitivity,n=e.deltaX*this._options.mouseWheelScrollSensitivity;this._options.scrollPredominantAxis&&(Math.abs(i)>=Math.abs(n)?n=0:i=0),this._options.flipAxes&&([i,n]=[n,i]);const o=!r["f"]&&e.browserEvent&&e.browserEvent.shiftKey;!this._options.scrollYToX&&!o||n||(n=i,i=0),e.browserEvent&&e.browserEvent.altKey&&(n*=this._options.fastScrollSensitivity,i*=this._options.fastScrollSensitivity);const s=this._scrollable.getFutureScrollPosition();let a={};if(i){const e=s.scrollTop-ES*i;this._verticalScrollbar.writeScrollPosition(a,e)}if(n){const e=s.scrollLeft-ES*n;this._horizontalScrollbar.writeScrollPosition(a,e)}if(a=this._scrollable.validateScrollPosition(a),s.scrollLeft!==a.scrollLeft||s.scrollTop!==a.scrollTop){const e=DS&&this._options.mouseWheelSmoothScroll&&t.isPhysicalMouseWheel();e?this._scrollable.setScrollPositionSmooth(a):this._scrollable.setScrollPositionNow(a),this._shouldRender=!0}}(this._options.alwaysConsumeMouseWheel||this._shouldRender)&&(e.preventDefault(),e.stopPropagation())}_onDidScroll(e){this._shouldRender=this._horizontalScrollbar.onDidScroll(e)||this._shouldRender,this._shouldRender=this._verticalScrollbar.onDidScroll(e)||this._shouldRender,this._options.useShadows&&(this._shouldRender=!0),this._revealOnScroll&&this._reveal(),this._options.lazyRender||this._render()}renderNow(){if(!this._options.lazyRender)throw new Error("Please use `lazyRender` together with `renderNow`!");this._render()}_render(){if(this._shouldRender&&(this._shouldRender=!1,this._horizontalScrollbar.render(),this._verticalScrollbar.render(),this._options.useShadows)){const e=this._scrollable.getCurrentScrollPosition();let t=e.scrollTop>0,i=e.scrollLeft>0;this._leftShadowDomNode.setClassName("shadow"+(i?" left":"")),this._topShadowDomNode.setClassName("shadow"+(t?" top":"")),this._topLeftShadowDomNode.setClassName("shadow top-left-corner"+(t?" top":"")+(i?" left":""))}}_onDragStart(){this._isDragging=!0,this._reveal()}_onDragEnd(){this._isDragging=!1,this._hide()}_onMouseOut(e){this._mouseIsOver=!1,this._hide()}_onMouseOver(e){this._mouseIsOver=!0,this._reveal()}_reveal(){this._verticalScrollbar.beginReveal(),this._horizontalScrollbar.beginReveal(),this._scheduleHide()}_hide(){this._mouseIsOver||this._isDragging||(this._verticalScrollbar.beginHide(),this._horizontalScrollbar.beginHide())}_scheduleHide(){this._mouseIsOver||this._isDragging||this._hideTimeout.cancelAndSet(()=>this._hide(),kS)}}class IS extends MS{constructor(e,t){t=t||{},t.mouseWheelSmoothScroll=!1;const i=new vS(0,e=>bo(e));super(e,t,i),this._register(i)}setScrollPosition(e){this._scrollable.setScrollPositionNow(e)}}class OS extends MS{constructor(e,t,i){super(e,t,i)}setScrollPosition(e){this._scrollable.setScrollPositionNow(e)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}}class AS extends IS{constructor(e,t){super(e,t),this._element=e,this.onScroll(e=>{e.scrollTopChanged&&(this._element.scrollTop=e.scrollTop),e.scrollLeftChanged&&(this._element.scrollLeft=e.scrollLeft)}),this.scanDomNode()}scanDomNode(){this.setScrollDimensions({width:this._element.clientWidth,scrollWidth:this._element.scrollWidth,height:this._element.clientHeight,scrollHeight:this._element.scrollHeight}),this.setScrollPosition({scrollLeft:this._element.scrollLeft,scrollTop:this._element.scrollTop})}}function RS(e){let t={lazyRender:"undefined"!==typeof e.lazyRender&&e.lazyRender,className:"undefined"!==typeof e.className?e.className:"",useShadows:"undefined"===typeof e.useShadows||e.useShadows,handleMouseWheel:"undefined"===typeof e.handleMouseWheel||e.handleMouseWheel,flipAxes:"undefined"!==typeof e.flipAxes&&e.flipAxes,alwaysConsumeMouseWheel:"undefined"!==typeof e.alwaysConsumeMouseWheel&&e.alwaysConsumeMouseWheel,scrollYToX:"undefined"!==typeof e.scrollYToX&&e.scrollYToX,mouseWheelScrollSensitivity:"undefined"!==typeof e.mouseWheelScrollSensitivity?e.mouseWheelScrollSensitivity:1,fastScrollSensitivity:"undefined"!==typeof e.fastScrollSensitivity?e.fastScrollSensitivity:5,scrollPredominantAxis:"undefined"===typeof e.scrollPredominantAxis||e.scrollPredominantAxis,mouseWheelSmoothScroll:"undefined"===typeof e.mouseWheelSmoothScroll||e.mouseWheelSmoothScroll,arrowSize:"undefined"!==typeof e.arrowSize?e.arrowSize:11,listenOnDomNode:"undefined"!==typeof e.listenOnDomNode?e.listenOnDomNode:null,horizontal:"undefined"!==typeof e.horizontal?e.horizontal:1,horizontalScrollbarSize:"undefined"!==typeof e.horizontalScrollbarSize?e.horizontalScrollbarSize:10,horizontalSliderSize:"undefined"!==typeof e.horizontalSliderSize?e.horizontalSliderSize:0,horizontalHasArrows:"undefined"!==typeof e.horizontalHasArrows&&e.horizontalHasArrows,vertical:"undefined"!==typeof e.vertical?e.vertical:1,verticalScrollbarSize:"undefined"!==typeof e.verticalScrollbarSize?e.verticalScrollbarSize:10,verticalHasArrows:"undefined"!==typeof e.verticalHasArrows&&e.verticalHasArrows,verticalSliderSize:"undefined"!==typeof e.verticalSliderSize?e.verticalSliderSize:0};return t.horizontalSliderSize="undefined"!==typeof e.horizontalSliderSize?e.horizontalSliderSize:t.horizontalScrollbarSize,t.verticalSliderSize="undefined"!==typeof e.verticalSliderSize?e.verticalSliderSize:t.verticalScrollbarSize,r["f"]&&(t.className+=" mac"),t}class PS extends jm{constructor(e,t,i,n){super(e);const o=this._context.configuration.options,r=o.get(84),s=o.get(58),a=o.get(28),l=o.get(87),c={listenOnDomNode:i.domNode,className:"editor-scrollable "+rp(e.theme.type),useShadows:!1,lazyRender:!0,vertical:r.vertical,horizontal:r.horizontal,verticalHasArrows:r.verticalHasArrows,horizontalHasArrows:r.horizontalHasArrows,verticalScrollbarSize:r.verticalScrollbarSize,verticalSliderSize:r.verticalSliderSize,horizontalScrollbarSize:r.horizontalScrollbarSize,horizontalSliderSize:r.horizontalSliderSize,handleMouseWheel:r.handleMouseWheel,alwaysConsumeMouseWheel:r.alwaysConsumeMouseWheel,arrowSize:r.arrowSize,mouseWheelScrollSensitivity:s,fastScrollSensitivity:a,scrollPredominantAxis:l};this.scrollbar=this._register(new OS(t.domNode,c,this._context.viewLayout.getScrollable())),Km.write(this.scrollbar.getDomNode(),5),this.scrollbarDomNode=km(this.scrollbar.getDomNode()),this.scrollbarDomNode.setPosition("absolute"),this._setLayout();const h=(e,t,i)=>{const n={};if(t){const t=e.scrollTop;t&&(n.scrollTop=this._context.viewLayout.getCurrentScrollTop()+t,e.scrollTop=0)}if(i){const t=e.scrollLeft;t&&(n.scrollLeft=this._context.viewLayout.getCurrentScrollLeft()+t,e.scrollLeft=0)}this._context.model.setScrollPosition(n,1)};this._register(ho(i.domNode,"scroll",e=>h(i.domNode,!0,!0))),this._register(ho(t.domNode,"scroll",e=>h(t.domNode,!0,!1))),this._register(ho(n.domNode,"scroll",e=>h(n.domNode,!0,!1))),this._register(ho(this.scrollbarDomNode.domNode,"scroll",e=>h(this.scrollbarDomNode.domNode,!0,!1)))}dispose(){super.dispose()}_setLayout(){const e=this._context.configuration.options,t=e.get(117);this.scrollbarDomNode.setLeft(t.contentLeft);const i=e.get(56),n=i.side;"right"===n?this.scrollbarDomNode.setWidth(t.contentWidth+t.minimap.minimapWidth):this.scrollbarDomNode.setWidth(t.contentWidth),this.scrollbarDomNode.setHeight(t.height)}getOverviewRulerLayoutInfo(){return this.scrollbar.getOverviewRulerLayoutInfo()}getDomNode(){return this.scrollbarDomNode}delegateVerticalScrollbarMouseDown(e){this.scrollbar.delegateVerticalScrollbarMouseDown(e)}onConfigurationChanged(e){if(e.hasChanged(84)||e.hasChanged(58)||e.hasChanged(28)){const e=this._context.configuration.options,t=e.get(84),i=e.get(58),n=e.get(28),o=e.get(87),r={handleMouseWheel:t.handleMouseWheel,mouseWheelScrollSensitivity:i,fastScrollSensitivity:n,scrollPredominantAxis:o};this.scrollbar.updateOptions(r)}return e.hasChanged(117)&&this._setLayout(),!0}onScrollChanged(e){return!0}onThemeChanged(e){return this.scrollbar.updateClassName("editor-scrollable "+rp(this._context.theme.type)),!0}prepareRender(e){}render(e){this.scrollbar.renderNow()}}i("df70");class FS{constructor(e,t,i){this.startLineNumber=+e,this.endLineNumber=+t,this.className=String(i)}}class WS extends Fv{_render(e,t,i){const n=[];for(let s=e;s<=t;s++){const t=s-e;n[t]=[]}if(0===i.length)return n;i.sort((e,t)=>e.className===t.className?e.startLineNumber===t.startLineNumber?e.endLineNumber-t.endLineNumber:e.startLineNumber-t.startLineNumber:e.className<t.className?-1:1);let o=null,r=0;for(let s=0,a=i.length;s<a;s++){const a=i[s],l=a.className;let c=Math.max(a.startLineNumber,e)-e;const h=Math.min(a.endLineNumber,t)-e;o===l?(c=Math.max(r+1,c),r=Math.max(r,h)):(o=l,r=h);for(let e=c;e<=r;e++)n[e].push(o)}return n}}class BS extends WS{constructor(e){super(),this._context=e;const t=this._context.configuration.options,i=t.get(117);this._lineHeight=t.get(51),this._glyphMargin=t.get(42),this._glyphMarginLeft=i.glyphMarginLeft,this._glyphMarginWidth=i.glyphMarginWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(117);return this._lineHeight=t.get(51),this._glyphMargin=t.get(42),this._glyphMarginLeft=i.glyphMarginLeft,this._glyphMarginWidth=i.glyphMarginWidth,!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_getDecorations(e){const t=e.getDecorationsInViewport();let i=[],n=0;for(let o=0,r=t.length;o<r;o++){const e=t[o],r=e.options.glyphMarginClassName;r&&(i[n++]=new FS(e.range.startLineNumber,e.range.endLineNumber,r))}return i}prepareRender(e){if(!this._glyphMargin)return void(this._renderResult=null);const t=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber,n=this._render(t,i,this._getDecorations(e)),o=this._lineHeight.toString(),r=this._glyphMarginLeft.toString(),s=this._glyphMarginWidth.toString(),a='" style="left:'+r+"px;width:"+s+"px;height:"+o+'px;"></div>',l=[];for(let c=t;c<=i;c++){const e=c-t,i=n[e];0===i.length?l[e]="":l[e]='<div class="cgmr codicon '+i.join(" ")+a}this._renderResult=l}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}i("9c85");class VS extends Fv{constructor(e){super(),this._context=e,this._primaryLineNumber=0;const t=this._context.configuration.options,i=t.get(118),n=t.get(36);this._lineHeight=t.get(51),this._spaceWidth=n.spaceWidth,this._enabled=t.get(75),this._activeIndentEnabled=t.get(45),this._maxIndentLeft=-1===i.wrappingColumn?-1:i.wrappingColumn*n.typicalHalfwidthCharacterWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(118),n=t.get(36);return this._lineHeight=t.get(51),this._spaceWidth=n.spaceWidth,this._enabled=t.get(75),this._activeIndentEnabled=t.get(45),this._maxIndentLeft=-1===i.wrappingColumn?-1:i.wrappingColumn*n.typicalHalfwidthCharacterWidth,!0}onCursorStateChanged(e){const t=e.selections[0],i=t.isEmpty()?t.positionLineNumber:0;return this._primaryLineNumber!==i&&(this._primaryLineNumber=i,!0)}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}onLanguageConfigurationChanged(e){return!0}prepareRender(e){if(!this._enabled)return void(this._renderResult=null);const t=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber,{indentSize:n}=this._context.model.getTextModelOptions(),o=n*this._spaceWidth,r=e.scrollWidth,s=this._lineHeight,a=this._context.model.getLinesIndentGuides(t,i);let l=0,c=0,h=0;if(this._activeIndentEnabled&&this._primaryLineNumber){const e=this._context.model.getActiveIndentGuide(this._primaryLineNumber,t,i);l=e.startLineNumber,c=e.endLineNumber,h=e.indent}const d=[];for(let u=t;u<=i;u++){const i=l<=u&&u<=c,n=u-t,g=a[n];let f="";if(g>=1){const t=e.visibleRangeForPosition(new Qt(u,1));let n=t?t.left:0;for(let e=1;e<=g;e++){const t=i&&e===h?"cigra":"cigr";if(f+=`<div class="${t}" style="left:${n}px;height:${s}px;width:${o}px"></div>`,n+=o,n>r||this._maxIndentLeft>0&&n>this._maxIndentLeft)break}}d[n]=f}this._renderResult=d}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}cp((e,t)=>{const i=e.getColor(VC);i&&t.addRule(`.monaco-editor .lines-content .cigr { box-shadow: 1px 0 0 0 ${i} inset; }`);const n=e.getColor(HC)||i;n&&t.addRule(`.monaco-editor .lines-content .cigra { box-shadow: 1px 0 0 0 ${n} inset; }`)});i("11cb");class HS{constructor(){this._currentVisibleRange=new Jt(1,1,1,1)}getCurrentVisibleRange(){return this._currentVisibleRange}setCurrentVisibleRange(e){this._currentVisibleRange=e}}class zS{constructor(e,t,i,n,o,r){this.lineNumber=e,this.startColumn=t,this.endColumn=i,this.startScrollTop=n,this.stopScrollTop=o,this.scrollType=r,this.type="range",this.minLineNumber=e,this.maxLineNumber=e}}class US{constructor(e,t,i,n){this.selections=e,this.startScrollTop=t,this.stopScrollTop=i,this.scrollType=n,this.type="selections";let o=e[0].startLineNumber,r=e[0].endLineNumber;for(let s=1,a=e.length;s<a;s++){const t=e[s];o=Math.min(o,t.startLineNumber),r=Math.max(r,t.endLineNumber)}this.minLineNumber=o,this.maxLineNumber=r}}class jS extends jm{constructor(e,t){super(e),this._linesContent=t,this._textRangeRestingSpot=document.createElement("div"),this._visibleLines=new jy(this),this.domNode=this._visibleLines.domNode;const i=this._context.configuration,n=this._context.configuration.options,o=n.get(36),r=n.get(118);this._lineHeight=n.get(51),this._typicalHalfwidthCharacterWidth=o.typicalHalfwidthCharacterWidth,this._isViewportWrapping=r.isViewportWrapping,this._revealHorizontalRightPadding=n.get(81),this._cursorSurroundingLines=n.get(20),this._cursorSurroundingLinesStyle=n.get(21),this._canUseLayerHinting=!n.get(23),this._viewLineOptions=new mp(i,this._context.theme.type),Km.write(this.domNode,7),this.domNode.setClassName("view-lines "+ny),Nf.applyFontInfo(this.domNode,o),this._maxLineWidth=0,this._asyncUpdateLineWidths=new Tn(()=>{this._updateLineWidthsSlow()},200),this._asyncCheckMonospaceFontAssumptions=new Tn(()=>{this._checkMonospaceFontAssumptions()},2e3),this._lastRenderedData=new HS,this._horizontalRevealRequest=null}dispose(){this._asyncUpdateLineWidths.dispose(),this._asyncCheckMonospaceFontAssumptions.dispose(),super.dispose()}getDomNode(){return this.domNode}createVisibleLine(){return new pp(this._viewLineOptions)}onConfigurationChanged(e){this._visibleLines.onConfigurationChanged(e),e.hasChanged(118)&&(this._maxLineWidth=0);const t=this._context.configuration.options,i=t.get(36),n=t.get(118);return this._lineHeight=t.get(51),this._typicalHalfwidthCharacterWidth=i.typicalHalfwidthCharacterWidth,this._isViewportWrapping=n.isViewportWrapping,this._revealHorizontalRightPadding=t.get(81),this._cursorSurroundingLines=t.get(20),this._cursorSurroundingLinesStyle=t.get(21),this._canUseLayerHinting=!t.get(23),Nf.applyFontInfo(this.domNode,i),this._onOptionsMaybeChanged(),e.hasChanged(117)&&(this._maxLineWidth=0),!0}_onOptionsMaybeChanged(){const e=this._context.configuration,t=new mp(e,this._context.theme.type);if(!this._viewLineOptions.equals(t)){this._viewLineOptions=t;const e=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();for(let t=e;t<=i;t++){const e=this._visibleLines.getVisibleLine(t);e.onOptionsChanged(this._viewLineOptions)}return!0}return!1}onCursorStateChanged(e){const t=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();let n=!1;for(let o=t;o<=i;o++)n=this._visibleLines.getVisibleLine(o).onSelectionChanged()||n;return n}onDecorationsChanged(e){{const e=this._visibleLines.getStartLineNumber(),t=this._visibleLines.getEndLineNumber();for(let i=e;i<=t;i++)this._visibleLines.getVisibleLine(i).onDecorationsChanged()}return!0}onFlushed(e){const t=this._visibleLines.onFlushed(e);return this._maxLineWidth=0,t}onLinesChanged(e){return this._visibleLines.onLinesChanged(e)}onLinesDeleted(e){return this._visibleLines.onLinesDeleted(e)}onLinesInserted(e){return this._visibleLines.onLinesInserted(e)}onRevealRangeRequest(e){const t=this._computeScrollTopToRevealRange(this._context.viewLayout.getFutureViewport(),e.source,e.range,e.selections,e.verticalType);if(-1===t)return!1;let i=this._context.viewLayout.validateScrollPosition({scrollTop:t});e.revealHorizontal?e.range&&e.range.startLineNumber!==e.range.endLineNumber?i={scrollTop:i.scrollTop,scrollLeft:0}:e.range?this._horizontalRevealRequest=new zS(e.range.startLineNumber,e.range.startColumn,e.range.endColumn,this._context.viewLayout.getCurrentScrollTop(),i.scrollTop,e.scrollType):e.selections&&e.selections.length>0&&(this._horizontalRevealRequest=new US(e.selections,this._context.viewLayout.getCurrentScrollTop(),i.scrollTop,e.scrollType)):this._horizontalRevealRequest=null;const n=Math.abs(this._context.viewLayout.getCurrentScrollTop()-i.scrollTop),o=n<=this._lineHeight?1:e.scrollType;return this._context.model.setScrollPosition(i,o),!0}onScrollChanged(e){if(this._horizontalRevealRequest&&e.scrollLeftChanged&&(this._horizontalRevealRequest=null),this._horizontalRevealRequest&&e.scrollTopChanged){const t=Math.min(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop),i=Math.max(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop);(e.scrollTop<t||e.scrollTop>i)&&(this._horizontalRevealRequest=null)}return this.domNode.setWidth(e.scrollWidth),this._visibleLines.onScrollChanged(e)||!0}onTokensChanged(e){return this._visibleLines.onTokensChanged(e)}onZonesChanged(e){return this._context.model.setMaxLineWidth(this._maxLineWidth),this._visibleLines.onZonesChanged(e)}onThemeChanged(e){return this._onOptionsMaybeChanged()}getPositionFromDOMInfo(e,t){const i=this._getViewLineDomNode(e);if(null===i)return null;const n=this._getLineNumberFor(i);if(-1===n)return null;if(n<1||n>this._context.model.getLineCount())return null;if(1===this._context.model.getLineMaxColumn(n))return new Qt(n,1);const o=this._visibleLines.getStartLineNumber(),r=this._visibleLines.getEndLineNumber();if(n<o||n>r)return null;let s=this._visibleLines.getVisibleLine(n).getColumnOfNodeOffset(n,e,t);const a=this._context.model.getLineMinColumn(n);return s<a&&(s=a),new Qt(n,s)}_getViewLineDomNode(e){while(e&&1===e.nodeType){if(e.className===pp.CLASS_NAME)return e;e=e.parentElement}return null}_getLineNumberFor(e){const t=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();for(let n=t;n<=i;n++){const t=this._visibleLines.getVisibleLine(n);if(e===t.getDomNode())return n}return-1}getLineWidth(e){const t=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();return e<t||e>i?-1:this._visibleLines.getVisibleLine(e).getWidth()}linesVisibleRangesForRange(e,t){if(this.shouldRender())return null;const i=e.endLineNumber,n=Jt.intersectRanges(e,this._lastRenderedData.getCurrentVisibleRange());if(!n)return null;let o=[],r=0;const s=new fp(this.domNode.domNode,this._textRangeRestingSpot);let a=0;t&&(a=this._context.model.coordinatesConverter.convertViewPositionToModelPosition(new Qt(n.startLineNumber,1)).lineNumber);const l=this._visibleLines.getStartLineNumber(),c=this._visibleLines.getEndLineNumber();for(let h=n.startLineNumber;h<=n.endLineNumber;h++){if(h<l||h>c)continue;const e=h===n.startLineNumber?n.startColumn:1,d=h===n.endLineNumber?n.endColumn:this._context.model.getLineMaxColumn(h),u=this._visibleLines.getVisibleLine(h).getVisibleRangesForRange(e,d,s);if(u){if(t&&h<i){const e=a;a=this._context.model.coordinatesConverter.convertViewPositionToModelPosition(new Qt(h+1,1)).lineNumber,e!==a&&(u.ranges[u.ranges.length-1].width+=this._typicalHalfwidthCharacterWidth)}o[r++]=new Gm(u.outsideRenderedLine,h,u.ranges)}}return 0===r?null:o}_visibleRangesForLineRange(e,t,i){return this.shouldRender()||e<this._visibleLines.getStartLineNumber()||e>this._visibleLines.getEndLineNumber()?null:this._visibleLines.getVisibleLine(e).getVisibleRangesForRange(t,i,new fp(this.domNode.domNode,this._textRangeRestingSpot))}visibleRangeForPosition(e){const t=this._visibleRangesForLineRange(e.lineNumber,e.column,e.column);return t?new Xm(t.outsideRenderedLine,t.ranges[0].left):null}updateLineWidths(){this._updateLineWidths(!1)}_updateLineWidthsFast(){return this._updateLineWidths(!0)}_updateLineWidthsSlow(){this._updateLineWidths(!1)}_updateLineWidths(e){const t=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();let n=1,o=!0;for(let r=t;r<=i;r++){const t=this._visibleLines.getVisibleLine(r);!e||t.getWidthIsFast()?n=Math.max(n,t.getWidth()):o=!1}return o&&1===t&&i===this._context.model.getLineCount()&&(this._maxLineWidth=0),this._ensureMaxLineWidth(n),o}_checkMonospaceFontAssumptions(){let e=-1,t=-1;const i=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber();for(let o=i;o<=n;o++){const i=this._visibleLines.getVisibleLine(o);if(i.needsMonospaceFontCheck()){const n=i.getWidth();n>t&&(t=n,e=o)}}if(-1!==e&&!this._visibleLines.getVisibleLine(e).monospaceAssumptionsAreValid())for(let o=i;o<=n;o++){const e=this._visibleLines.getVisibleLine(o);e.onMonospaceAssumptionsInvalidated()}}prepareRender(){throw new Error("Not supported")}render(){throw new Error("Not supported")}renderText(e){if(this._visibleLines.renderLines(e),this._lastRenderedData.setCurrentVisibleRange(e.visibleRange),this.domNode.setWidth(this._context.viewLayout.getScrollWidth()),this.domNode.setHeight(Math.min(this._context.viewLayout.getScrollHeight(),1e6)),this._horizontalRevealRequest){const t=this._horizontalRevealRequest;if(e.startLineNumber<=t.minLineNumber&&t.maxLineNumber<=e.endLineNumber){this._horizontalRevealRequest=null,this.onDidRender();const e=this._computeScrollLeftToReveal(t);e&&(this._isViewportWrapping||this._ensureMaxLineWidth(e.maxHorizontalOffset),this._context.model.setScrollPosition({scrollLeft:e.scrollLeft},t.scrollType))}}if(this._updateLineWidthsFast()||this._asyncUpdateLineWidths.schedule(),r["d"]&&!this._asyncCheckMonospaceFontAssumptions.isScheduled()){const e=this._visibleLines.getStartLineNumber(),t=this._visibleLines.getEndLineNumber();for(let i=e;i<=t;i++){const e=this._visibleLines.getVisibleLine(i);if(e.needsMonospaceFontCheck()){this._asyncCheckMonospaceFontAssumptions.schedule();break}}}this._linesContent.setLayerHinting(this._canUseLayerHinting),this._linesContent.setContain("strict");const t=this._context.viewLayout.getCurrentScrollTop()-e.bigNumbersDelta;this._linesContent.setTop(-t),this._linesContent.setLeft(-this._context.viewLayout.getCurrentScrollLeft())}_ensureMaxLineWidth(e){const t=Math.ceil(e);this._maxLineWidth<t&&(this._maxLineWidth=t,this._context.model.setMaxLineWidth(this._maxLineWidth))}_computeScrollTopToRevealRange(e,t,i,n,o){const r=e.top,s=e.height,a=r+s;let l,c,h;if(n&&n.length>0){let e=n[0].startLineNumber,t=n[0].endLineNumber;for(let i=1,o=n.length;i<o;i++){const o=n[i];e=Math.min(e,o.startLineNumber),t=Math.max(t,o.endLineNumber)}l=!1,c=this._context.viewLayout.getVerticalOffsetForLineNumber(e),h=this._context.viewLayout.getVerticalOffsetForLineNumber(t)+this._lineHeight}else{if(!i)return-1;l=!0,c=this._context.viewLayout.getVerticalOffsetForLineNumber(i.startLineNumber),h=this._context.viewLayout.getVerticalOffsetForLineNumber(i.endLineNumber)+this._lineHeight}const d="mouse"===t&&"default"===this._cursorSurroundingLinesStyle;if(!d){const e=Math.min(s/this._lineHeight/2,this._cursorSurroundingLines);c-=e*this._lineHeight,h+=Math.max(0,e-1)*this._lineHeight}let u;if(0!==o&&4!==o||(h+=this._lineHeight),h-c>s){if(!l)return-1;u=c}else if(5===o||6===o)if(6===o&&r<=c&&h<=a)u=r;else{const e=Math.max(5*this._lineHeight,.2*s),t=c-e,i=h-s;u=Math.max(i,t)}else if(1===o||2===o)if(2===o&&r<=c&&h<=a)u=r;else{const e=(c+h)/2;u=Math.max(0,e-s/2)}else u=this._computeMinimumScrolling(r,a,c,h,3===o,4===o);return u}_computeScrollLeftToReveal(e){const t=this._context.viewLayout.getCurrentViewport(),i=t.left,n=i+t.width;let o=1073741824,r=0;if("range"===e.type){const t=this._visibleRangesForLineRange(e.lineNumber,e.startColumn,e.endColumn);if(!t)return null;for(const e of t.ranges)o=Math.min(o,e.left),r=Math.max(r,e.left+e.width)}else for(const a of e.selections){if(a.startLineNumber!==a.endLineNumber)return null;const e=this._visibleRangesForLineRange(a.startLineNumber,a.startColumn,a.endColumn);if(!e)return null;for(const t of e.ranges)o=Math.min(o,t.left),r=Math.max(r,t.left+t.width)}if(o=Math.max(0,o-jS.HORIZONTAL_EXTRA_PX),r+=this._revealHorizontalRightPadding,"selections"===e.type&&r-o>t.width)return null;const s=this._computeMinimumScrolling(i,n,o,r);return{scrollLeft:s,maxHorizontalOffset:r}}_computeMinimumScrolling(e,t,i,n,o,r){e|=0,t|=0,i|=0,n|=0,o=!!o,r=!!r;const s=t-e,a=n-i;return a<s?o?i:r?Math.max(0,n-s):i<e?i:n>t?Math.max(0,n-s):e:i}}jS.HORIZONTAL_EXTRA_PX=30;i("b042");class KS extends WS{constructor(e){super(),this._context=e;const t=this._context.configuration.options,i=t.get(117);this._decorationsLeft=i.decorationsLeft,this._decorationsWidth=i.decorationsWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(117);return this._decorationsLeft=i.decorationsLeft,this._decorationsWidth=i.decorationsWidth,!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_getDecorations(e){const t=e.getDecorationsInViewport();let i=[],n=0;for(let o=0,r=t.length;o<r;o++){const e=t[o],r=e.options.linesDecorationsClassName;r&&(i[n++]=new FS(e.range.startLineNumber,e.range.endLineNumber,r));const s=e.options.firstLineDecorationClassName;s&&(i[n++]=new FS(e.range.startLineNumber,e.range.startLineNumber,s))}return i}prepareRender(e){const t=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber,n=this._render(t,i,this._getDecorations(e)),o=this._decorationsLeft.toString(),r=this._decorationsWidth.toString(),s='" style="left:'+o+"px;width:"+r+'px;"></div>',a=[];for(let l=t;l<=i;l++){const e=l-t,i=n[e];let o="";for(let t=0,n=i.length;t<n;t++)o+='<div class="cldr '+i[t]+s;a[e]=o}this._renderResult=a}render(e,t){return this._renderResult?this._renderResult[t-e]:""}}i("a23c");class qS extends WS{constructor(e){super(),this._context=e,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){return!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_getDecorations(e){const t=e.getDecorationsInViewport();let i=[],n=0;for(let o=0,r=t.length;o<r;o++){const e=t[o],r=e.options.marginClassName;r&&(i[n++]=new FS(e.range.startLineNumber,e.range.endLineNumber,r))}return i}prepareRender(e){const t=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber,n=this._render(t,i,this._getDecorations(e)),o=[];for(let r=t;r<=i;r++){const e=r-t,i=n[e];let s="";for(let t=0,n=i.length;t<n;t++)s+='<div class="cmdr '+i[t]+'" style=""></div>';o[e]=s}this._renderResult=o}render(e,t){return this._renderResult?this._renderResult[t-e]:""}}i("36df");class $S{constructor(e,t,i,n){this.r=$S._clamp(e),this.g=$S._clamp(t),this.b=$S._clamp(i),this.a=$S._clamp(n)}equals(e){return this.r===e.r&&this.g===e.g&&this.b===e.b&&this.a===e.a}static _clamp(e){return e<0?0:e>255?255:0|e}}$S.Empty=new $S(0,0,0,0);class GS{constructor(){this._onDidChange=new Ve,this.onDidChange=this._onDidChange.event,this._updateColorMap(),Kl.onDidChange(e=>{e.changedColorMap&&this._updateColorMap()})}static getInstance(){return this._INSTANCE||(this._INSTANCE=new GS),this._INSTANCE}_updateColorMap(){const e=Kl.getColorMap();if(!e)return this._colors=[$S.Empty],void(this._backgroundIsLight=!0);this._colors=[$S.Empty];for(let i=1;i<e.length;i++){const t=e[i].rgba;this._colors[i]=new $S(t.r,t.g,t.b,Math.round(255*t.a))}let t=e[2].getRelativeLuminance();this._backgroundIsLight=t>=.5,this._onDidChange.fire(void 0)}getColor(e){return(e<1||e>=this._colors.length)&&(e=2),this._colors[e]}backgroundIsLight(){return this._backgroundIsLight}}GS._INSTANCE=null;const YS=(()=>{const e=[];for(let t=32;t<=126;t++)e.push(t);return e.push(65533),e})(),XS=(e,t)=>(e-=32,e<0||e>96?t<=2?(e+96)%96:95:e);class ZS{constructor(e,t){this.scale=t,this.charDataNormal=ZS.soften(e,.8),this.charDataLight=ZS.soften(e,50/60)}static soften(e,t){let i=new Uint8ClampedArray(e.length);for(let n=0,o=e.length;n<o;n++)i[n]=_h(e[n]*t);return i}renderChar(e,t,i,n,o,r,s,a,l){const c=1*this.scale,h=2*this.scale,d=l?1:h;if(t+c>e.width||i+d>e.height)return void console.warn("bad render request outside image data");const u=a?this.charDataLight:this.charDataNormal,g=XS(n,s),f=4*e.width,m=r.r,p=r.g,_=r.b,b=o.r-m,v=o.g-p,w=o.b-_,C=e.data;let y=g*c*h,S=i*f+4*t;for(let x=0;x<d;x++){let e=S;for(let t=0;t<c;t++){const t=u[y++]/255;C[e++]=m+b*t,C[e++]=p+v*t,C[e++]=_+w*t,e++}S+=f}}blockRenderChar(e,t,i,n,o,r,s){const a=1*this.scale,l=2*this.scale,c=s?1:l;if(t+a>e.width||i+c>e.height)return void console.warn("bad render request outside image data");const h=4*e.width,d=.5,u=o.r,g=o.g,f=o.b,m=n.r-u,p=n.g-g,_=n.b-f,b=u+m*d,v=g+p*d,w=f+_*d,C=e.data;let y=i*h+4*t;for(let S=0;S<c;S++){let e=y;for(let t=0;t<a;t++)C[e++]=b,C[e++]=v,C[e++]=w,e++;y+=h}}}function QS(e){const t=this;let i,n=!1;return function(){return n||(n=!0,i=e.apply(t,arguments)),i}}const JS={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15},ex=e=>{const t=new Uint8ClampedArray(e.length/2);for(let i=0;i<e.length;i+=2)t[i>>1]=JS[e[i]]<<4|15&JS[e[i+1]];return t},tx={1:QS(()=>ex("0000511D6300CF609C709645A78432005642574171487021003C451900274D35D762755E8B629C5BA856AF57BA649530C167D1512A272A3F6038604460398526BCA2A968DB6F8957C768BE5FBE2FB467CF5D8D5B795DC7625B5DFF50DE64C466DB2FC47CD860A65E9A2EB96CB54CE06DA763AB2EA26860524D3763536601005116008177A8705E53AB738E6A982F88BAA35B5F5B626D9C636B449B737E5B7B678598869A662F6B5B8542706C704C80736A607578685B70594A49715A4522E792")),2:QS(()=>ex("000000000000000055394F383D2800008B8B1F210002000081B1CBCBCC820000847AAF6B9AAF2119BE08B8881AD60000A44FD07DCCF107015338130C00000000385972265F390B406E2437634B4B48031B12B8A0847000001E15B29A402F0000000000004B33460B00007A752C2A0000000000004D3900000084394B82013400ABA5CFC7AD9C0302A45A3E5A98AB000089A43382D97900008BA54AA087A70A0248A6A7AE6DBE0000BF6F94987EA40A01A06DCFA7A7A9030496C32F77891D0000A99FB1A0AFA80603B29AB9CA75930D010C0948354D3900000C0948354F37460D0028BE673D8400000000AF9D7B6E00002B007AA8933400007AA642675C2700007984CFB9C3985B768772A8A6B7B20000CAAECAAFC4B700009F94A6009F840009D09F9BA4CA9C0000CC8FC76DC87F0000C991C472A2000000A894A48CA7B501079BA2C9C69BA20000B19A5D3FA89000005CA6009DA2960901B0A7F0669FB200009D009E00B7890000DAD0F5D092820000D294D4C48BD10000B5A7A4A3B1A50402CAB6CBA6A2000000B5A7A4A3B1A8044FCDADD19D9CB00000B7778F7B8AAE0803C9AB5D3F5D3F00009EA09EA0BAB006039EA0989A8C7900009B9EF4D6B7C00000A9A7816CACA80000ABAC84705D3F000096DA635CDC8C00006F486F266F263D4784006124097B00374F6D2D6D2D6D4A3A95872322000000030000000000008D8939130000000000002E22A5C9CBC70600AB25C0B5C9B400061A2DB04CA67001082AA6BEBEBFC606002321DACBC19E03087AA08B6768380000282FBAC0B8CA7A88AD25BBA5A29900004C396C5894A6000040485A6E356E9442A32CD17EADA70000B4237923628600003E2DE9C1D7B500002F25BBA5A2990000231DB6AFB4A804023025C0B5CAB588062B2CBDBEC0C706882435A75CA20000002326BD6A82A908048B4B9A5A668000002423A09CB4BB060025259C9D8A7900001C1FCAB2C7C700002A2A9387ABA200002626A4A47D6E9D14333163A0C87500004B6F9C2D643A257049364936493647358A34438355497F1A0000A24C1D590000D38DFFBDD4CD3126"))};class ix{static create(e,t){if(this.lastCreated&&e===this.lastCreated.scale&&t===this.lastFontFamily)return this.lastCreated;let i;return i=tx[e]?new ZS(tx[e](),e):ix.createFromSampleData(ix.createSampleData(t).data,e),this.lastFontFamily=t,this.lastCreated=i,i}static createSampleData(e){const t=document.createElement("canvas"),i=t.getContext("2d");t.style.height="16px",t.height=16,t.width=960,t.style.width="960px",i.fillStyle="#ffffff",i.font="bold 16px "+e,i.textBaseline="middle";let n=0;for(const o of YS)i.fillText(String.fromCharCode(o),n,8),n+=10;return i.getImageData(0,0,960,16)}static createFromSampleData(e,t){const i=61440;if(e.length!==i)throw new Error("Unexpected source in MinimapCharRenderer");let n=ix._downsample(e,t);return new ZS(n,t)}static _downsampleChar(e,t,i,n,o){const r=1*o,s=2*o;let a=n,l=0;for(let c=0;c<s;c++){const n=c/s*16,o=(c+1)/s*16;for(let s=0;s<r;s++){const c=s/r*10,h=(s+1)/r*10;let d=0,u=0;for(let i=n;i<o;i++){const n=t+3840*Math.floor(i),o=1-(i-Math.floor(i));for(let t=c;t<h;t++){const i=1-(t-Math.floor(t)),r=n+4*Math.floor(t),s=i*o;u+=s,d+=e[r]*e[r+3]/255*s}}const g=d/u;l=Math.max(l,g),i[a++]=_h(g)}}return l}static _downsample(e,t){const i=2*t*1*t,n=96*i,o=new Uint8ClampedArray(n);let r=0,s=0,a=0;for(let l=0;l<96;l++)a=Math.max(a,this._downsampleChar(e,s,o,r,t)),r+=i,s+=40;if(a>0){const e=255/a;for(let t=0;t<n;t++)o[t]*=e}return o}}const nx=140,ox=2;class rx{constructor(e,t,i){const n=e.options,o=n.get(115),r=n.get(117),s=r.minimap,a=n.get(36),l=n.get(56);this.renderMinimap=s.renderMinimap,this.size=l.size,this.minimapHeightIsEditorHeight=s.minimapHeightIsEditorHeight,this.scrollBeyondLastLine=n.get(86),this.showSlider=l.showSlider,this.pixelRatio=o,this.typicalHalfwidthCharacterWidth=a.typicalHalfwidthCharacterWidth,this.lineHeight=n.get(51),this.minimapLeft=s.minimapLeft,this.minimapWidth=s.minimapWidth,this.minimapHeight=r.height,this.canvasInnerWidth=s.minimapCanvasInnerWidth,this.canvasInnerHeight=s.minimapCanvasInnerHeight,this.canvasOuterWidth=s.minimapCanvasOuterWidth,this.canvasOuterHeight=s.minimapCanvasOuterHeight,this.isSampling=s.minimapIsSampling,this.editorHeight=r.height,this.fontScale=s.minimapScale,this.minimapLineHeight=s.minimapLineHeight,this.minimapCharWidth=1*this.fontScale,this.charRenderer=QS(()=>ix.create(this.fontScale,a.fontFamily)),this.backgroundColor=rx._getMinimapBackground(t,i)}static _getMinimapBackground(e,t){const i=e.getColor(vC);return i?new $S(i.rgba.r,i.rgba.g,i.rgba.b,i.rgba.a):t.getColor(2)}equals(e){return this.renderMinimap===e.renderMinimap&&this.size===e.size&&this.minimapHeightIsEditorHeight===e.minimapHeightIsEditorHeight&&this.scrollBeyondLastLine===e.scrollBeyondLastLine&&this.showSlider===e.showSlider&&this.pixelRatio===e.pixelRatio&&this.typicalHalfwidthCharacterWidth===e.typicalHalfwidthCharacterWidth&&this.lineHeight===e.lineHeight&&this.minimapLeft===e.minimapLeft&&this.minimapWidth===e.minimapWidth&&this.minimapHeight===e.minimapHeight&&this.canvasInnerWidth===e.canvasInnerWidth&&this.canvasInnerHeight===e.canvasInnerHeight&&this.canvasOuterWidth===e.canvasOuterWidth&&this.canvasOuterHeight===e.canvasOuterHeight&&this.isSampling===e.isSampling&&this.editorHeight===e.editorHeight&&this.fontScale===e.fontScale&&this.minimapLineHeight===e.minimapLineHeight&&this.minimapCharWidth===e.minimapCharWidth&&this.backgroundColor&&this.backgroundColor.equals(e.backgroundColor)}}class sx{constructor(e,t,i,n,o,r,s,a){this.scrollTop=e,this.scrollHeight=t,this.sliderNeeded=i,this._computedSliderRatio=n,this.sliderTop=o,this.sliderHeight=r,this.startLineNumber=s,this.endLineNumber=a}getDesiredScrollTopFromDelta(e){const t=this.sliderTop+e;return Math.round(t/this._computedSliderRatio)}getDesiredScrollTopFromTouchLocation(e){return Math.round((e-this.sliderHeight/2)/this._computedSliderRatio)}static create(e,t,i,n,o,r,s,a,l,c){const h=e.pixelRatio,d=e.minimapLineHeight,u=Math.floor(e.canvasInnerHeight/d),g=e.lineHeight;if(e.minimapHeightIsEditorHeight){const t=s*e.lineHeight+(e.scrollBeyondLastLine?n-e.lineHeight:0),i=Math.max(1,Math.floor(n*n/t)),o=Math.max(0,e.minimapHeight-i),c=o/(l-n),h=a*c,d=o>0,u=Math.floor(e.canvasInnerHeight/e.minimapLineHeight);return new sx(a,l,d,c,h,i,1,Math.min(r,u))}let f,m;if(o&&i!==r){const e=i-t+1;f=Math.floor(e*d/h)}else{const e=n/g;f=Math.floor(e*d/h)}m=e.scrollBeyondLastLine?(r-1)*d/h:Math.max(0,r*d/h-f),m=Math.min(e.minimapHeight-f,m);const p=m/(l-n),_=a*p;let b=0;if(e.scrollBeyondLastLine){const e=n/g;b=e-1}if(u>=r+b){const e=1,t=r,i=m>0;return new sx(a,l,i,p,_,f,e,t)}{let e=Math.max(1,Math.floor(t-_*h/d));c&&c.scrollHeight===l&&(c.scrollTop>a&&(e=Math.min(e,c.startLineNumber)),c.scrollTop<a&&(e=Math.max(e,c.startLineNumber)));const i=Math.min(r,e+u-1);return new sx(a,l,!0,p,_,f,e,i)}}}class ax{constructor(e){this.dy=e}onContentChanged(){this.dy=-1}onTokensChanged(){this.dy=-1}}ax.INVALID=new ax(-1);class lx{constructor(e,t,i){this.renderedLayout=e,this._imageData=t,this._renderedLines=new Uy(()=>ax.INVALID),this._renderedLines._set(e.startLineNumber,i)}linesEquals(e){if(!this.scrollEquals(e))return!1;const t=this._renderedLines._get(),i=t.lines;for(let n=0,o=i.length;n<o;n++)if(-1===i[n].dy)return!1;return!0}scrollEquals(e){return this.renderedLayout.startLineNumber===e.startLineNumber&&this.renderedLayout.endLineNumber===e.endLineNumber}_get(){const e=this._renderedLines._get();return{imageData:this._imageData,rendLineNumberStart:e.rendLineNumberStart,lines:e.lines}}onLinesChanged(e,t){return this._renderedLines.onLinesChanged(e,t)}onLinesDeleted(e,t){this._renderedLines.onLinesDeleted(e,t)}onLinesInserted(e,t){this._renderedLines.onLinesInserted(e,t)}onTokensChanged(e){return this._renderedLines.onTokensChanged(e)}}class cx{constructor(e,t,i,n){this._backgroundFillData=cx._createBackgroundFillData(t,i,n),this._buffers=[e.createImageData(t,i),e.createImageData(t,i)],this._lastUsedBuffer=0}getBuffer(){this._lastUsedBuffer=1-this._lastUsedBuffer;const e=this._buffers[this._lastUsedBuffer];return e.data.set(this._backgroundFillData),e}static _createBackgroundFillData(e,t,i){const n=i.r,o=i.g,r=i.b,s=new Uint8ClampedArray(e*t*4);let a=0;for(let l=0;l<t;l++)for(let t=0;t<e;t++)s[a]=n,s[a+1]=o,s[a+2]=r,s[a+3]=255,a+=4;return s}}class hx{constructor(e,t){this.samplingRatio=e,this.minimapLines=t}static compute(e,t,i){if(0===e.renderMinimap||!e.isSampling)return[null,[]];const n=e.pixelRatio,o=e.lineHeight,r=e.scrollBeyondLastLine,{minimapLineCount:s}=H.computeContainedMinimapLineCount({viewLineCount:t,scrollBeyondLastLine:r,height:e.editorHeight,lineHeight:o,pixelRatio:n}),a=t/s,l=a/2;if(!i||0===i.minimapLines.length){let e=[];if(e[0]=1,s>1){for(let t=0,i=s-1;t<i;t++)e[t]=Math.round(t*a+l);e[s-1]=t}return[new hx(a,e),[]]}const c=i.minimapLines,h=c.length;let d=[],u=0,g=0,f=1;const m=10;let p=[],_=null;for(let b=0;b<s;b++){const e=Math.max(f,Math.round(b*a)),i=Math.max(e,Math.round((b+1)*a));while(u<h&&c[u]<e){if(p.length<m){const e=u+1+g;_&&"deleted"===_.type&&_._oldIndex===u-1?_.deleteToLineNumber++:(_={type:"deleted",_oldIndex:u,deleteFromLineNumber:e,deleteToLineNumber:e},p.push(_)),g--}u++}let n;if(u<h&&c[u]<=i)n=c[u],u++;else if(n=0===b?1:b+1===s?t:Math.round(b*a+l),p.length<m){const e=u+1+g;_&&"inserted"===_.type&&_._i===b-1?_.insertToLineNumber++:(_={type:"inserted",_i:b,insertFromLineNumber:e,insertToLineNumber:e},p.push(_)),g++}d[b]=n,f=n}if(p.length<m)while(u<h){const e=u+1+g;_&&"deleted"===_.type&&_._oldIndex===u-1?_.deleteToLineNumber++:(_={type:"deleted",_oldIndex:u,deleteFromLineNumber:e,deleteToLineNumber:e},p.push(_)),g--,u++}else p=[{type:"flush"}];return[new hx(a,d),p]}modelLineToMinimapLine(e){return Math.min(this.minimapLines.length,Math.max(1,Math.round(e/this.samplingRatio)))}modelLineRangeToMinimapLineRange(e,t){let i=this.modelLineToMinimapLine(e)-1;while(i>0&&this.minimapLines[i-1]>=e)i--;let n=this.modelLineToMinimapLine(t)-1;while(n+1<this.minimapLines.length&&this.minimapLines[n+1]<=t)n++;if(i===n){const n=this.minimapLines[i];if(n<e||n>t)return null}return[i+1,n+1]}decorationLineRangeToMinimapLineRange(e,t){let i=this.modelLineToMinimapLine(e),n=this.modelLineToMinimapLine(t);return e!==t&&n===i&&(n===this.minimapLines.length?i>1&&i--:n++),[i,n]}onLinesDeleted(e){const t=e.toLineNumber-e.fromLineNumber+1;let i=this.minimapLines.length,n=0;for(let o=this.minimapLines.length-1;o>=0;o--){if(this.minimapLines[o]<e.fromLineNumber)break;this.minimapLines[o]<=e.toLineNumber?(this.minimapLines[o]=Math.max(1,e.fromLineNumber-1),i=Math.min(i,o),n=Math.max(n,o)):this.minimapLines[o]-=t}return[i,n]}onLinesInserted(e){const t=e.toLineNumber-e.fromLineNumber+1;for(let i=this.minimapLines.length-1;i>=0;i--){if(this.minimapLines[i]<e.fromLineNumber)break;this.minimapLines[i]+=t}}}class dx extends jm{constructor(e){super(e),this.tokensColorTracker=GS.getInstance(),this._selections=[],this._minimapSelections=null,this.options=new rx(this._context.configuration,this._context.theme,this.tokensColorTracker);const[t]=hx.compute(this.options,this._context.model.getLineCount(),null);this._samplingState=t,this._shouldCheckSampling=!1,this._actual=new ux(e.theme,this)}dispose(){this._actual.dispose(),super.dispose()}getDomNode(){return this._actual.getDomNode()}_onOptionsMaybeChanged(){const e=new rx(this._context.configuration,this._context.theme,this.tokensColorTracker);return!this.options.equals(e)&&(this.options=e,this._recreateLineSampling(),this._actual.onDidChangeOptions(),!0)}onConfigurationChanged(e){return this._onOptionsMaybeChanged()}onCursorStateChanged(e){return this._selections=e.selections,this._minimapSelections=null,this._actual.onSelectionChanged()}onDecorationsChanged(e){return!!e.affectsMinimap&&this._actual.onDecorationsChanged()}onFlushed(e){return this._samplingState&&(this._shouldCheckSampling=!0),this._actual.onFlushed()}onLinesChanged(e){if(this._samplingState){const t=this._samplingState.modelLineRangeToMinimapLineRange(e.fromLineNumber,e.toLineNumber);return!!t&&this._actual.onLinesChanged(t[0],t[1])}return this._actual.onLinesChanged(e.fromLineNumber,e.toLineNumber)}onLinesDeleted(e){if(this._samplingState){const[t,i]=this._samplingState.onLinesDeleted(e);return t<=i&&this._actual.onLinesChanged(t+1,i+1),this._shouldCheckSampling=!0,!0}return this._actual.onLinesDeleted(e.fromLineNumber,e.toLineNumber)}onLinesInserted(e){return this._samplingState?(this._samplingState.onLinesInserted(e),this._shouldCheckSampling=!0,!0):this._actual.onLinesInserted(e.fromLineNumber,e.toLineNumber)}onScrollChanged(e){return this._actual.onScrollChanged()}onThemeChanged(e){return this._context.model.invalidateMinimapColorCache(),this._actual.onThemeChanged(),this._onOptionsMaybeChanged(),!0}onTokensChanged(e){if(this._samplingState){let t=[];for(const i of e.ranges){const e=this._samplingState.modelLineRangeToMinimapLineRange(i.fromLineNumber,i.toLineNumber);e&&t.push({fromLineNumber:e[0],toLineNumber:e[1]})}return!!t.length&&this._actual.onTokensChanged(t)}return this._actual.onTokensChanged(e.ranges)}onTokensColorsChanged(e){return this._actual.onTokensColorsChanged()}onZonesChanged(e){return this._actual.onZonesChanged()}prepareRender(e){this._shouldCheckSampling&&(this._shouldCheckSampling=!1,this._recreateLineSampling())}render(e){let t=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber;this._samplingState&&(t=this._samplingState.modelLineToMinimapLine(t),i=this._samplingState.modelLineToMinimapLine(i));const n={viewportContainsWhitespaceGaps:e.viewportData.whitespaceViewportData.length>0,scrollWidth:e.scrollWidth,scrollHeight:e.scrollHeight,viewportStartLineNumber:t,viewportEndLineNumber:i,scrollTop:e.scrollTop,scrollLeft:e.scrollLeft,viewportWidth:e.viewportWidth,viewportHeight:e.viewportHeight};this._actual.render(n)}_recreateLineSampling(){this._minimapSelections=null;const e=Boolean(this._samplingState),[t,i]=hx.compute(this.options,this._context.model.getLineCount(),this._samplingState);if(this._samplingState=t,e&&this._samplingState)for(const n of i)switch(n.type){case"deleted":this._actual.onLinesDeleted(n.deleteFromLineNumber,n.deleteToLineNumber);break;case"inserted":this._actual.onLinesInserted(n.insertFromLineNumber,n.insertToLineNumber);break;case"flush":this._actual.onFlushed();break}}getLineCount(){return this._samplingState?this._samplingState.minimapLines.length:this._context.model.getLineCount()}getRealLineCount(){return this._context.model.getLineCount()}getLineContent(e){return this._samplingState?this._context.model.getLineContent(this._samplingState.minimapLines[e-1]):this._context.model.getLineContent(e)}getMinimapLinesRenderingData(e,t,i){if(this._samplingState){let n=[];for(let o=0,r=t-e+1;o<r;o++)i[o]?n[o]=this._context.model.getViewLineData(this._samplingState.minimapLines[e+o-1]):n[o]=null;return n}return this._context.model.getMinimapLinesRenderingData(e,t,i).data}getSelections(){if(null===this._minimapSelections)if(this._samplingState){this._minimapSelections=[];for(const e of this._selections){const[t,i]=this._samplingState.decorationLineRangeToMinimapLineRange(e.startLineNumber,e.endLineNumber);this._minimapSelections.push(new ei(t,e.startColumn,i,e.endColumn))}}else this._minimapSelections=this._selections;return this._minimapSelections}getMinimapDecorationsInViewport(e,t){let i;if(this._samplingState){const n=this._samplingState.minimapLines[e-1],o=this._samplingState.minimapLines[t-1];i=new Jt(n,1,o,this._context.model.getLineMaxColumn(o))}else i=new Jt(e,1,t,this._context.model.getLineMaxColumn(t));const n=this._context.model.getDecorationsInViewport(i);if(this._samplingState){let e=[];for(const t of n){if(!t.options.minimap)continue;const i=t.range,n=this._samplingState.modelLineToMinimapLine(i.startLineNumber),o=this._samplingState.modelLineToMinimapLine(i.endLineNumber);e.push(new Md(new Jt(n,i.startColumn,o,i.endColumn),t.options))}return e}return n}getOptions(){return this._context.model.getTextModelOptions()}revealLineNumber(e){this._samplingState&&(e=this._samplingState.minimapLines[e-1]),this._context.model.revealRange("mouse",!1,new Jt(e,1,e,1),1,0)}setScrollTop(e){this._context.model.setScrollPosition({scrollTop:e},1)}}class ux extends Oe{constructor(e,t){super(),this._renderDecorations=!1,this._gestureInProgress=!1,this._theme=e,this._model=t,this._lastRenderData=null,this._buffers=null,this._selectionColor=this._theme.getColor(pC),this._domNode=km(document.createElement("div")),Km.write(this._domNode,8),this._domNode.setClassName(this._getMinimapDomNodeClassName()),this._domNode.setPosition("absolute"),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._shadow=km(document.createElement("div")),this._shadow.setClassName("minimap-shadow-hidden"),this._domNode.appendChild(this._shadow),this._canvas=km(document.createElement("canvas")),this._canvas.setPosition("absolute"),this._canvas.setLeft(0),this._domNode.appendChild(this._canvas),this._decorationsCanvas=km(document.createElement("canvas")),this._decorationsCanvas.setPosition("absolute"),this._decorationsCanvas.setClassName("minimap-decorations-layer"),this._decorationsCanvas.setLeft(0),this._domNode.appendChild(this._decorationsCanvas),this._slider=km(document.createElement("div")),this._slider.setPosition("absolute"),this._slider.setClassName("minimap-slider"),this._slider.setLayerHinting(!0),this._slider.setContain("strict"),this._domNode.appendChild(this._slider),this._sliderHorizontal=km(document.createElement("div")),this._sliderHorizontal.setPosition("absolute"),this._sliderHorizontal.setClassName("minimap-slider-horizontal"),this._slider.appendChild(this._sliderHorizontal),this._applyLayout(),this._mouseDownListener=fo(this._domNode.domNode,"mousedown",e=>{e.preventDefault();const t=this._model.options.renderMinimap;if(0===t)return;if(!this._lastRenderData)return;if("proportional"!==this._model.options.size){if(e.leftButton&&this._lastRenderData){const t=Mo(this._slider.domNode),i=t.top+t.height/2;this._startSliderDragging(e.buttons,e.posx,i,e.posy,this._lastRenderData.renderedLayout)}return}const i=this._model.options.minimapLineHeight,n=this._model.options.canvasInnerHeight/this._model.options.canvasOuterHeight*e.browserEvent.offsetY,o=Math.floor(n/i);let r=o+this._lastRenderData.renderedLayout.startLineNumber;r=Math.min(r,this._model.getLineCount()),this._model.revealLineNumber(r)}),this._sliderMouseMoveMonitor=new Am,this._sliderMouseDownListener=fo(this._slider.domNode,"mousedown",e=>{e.preventDefault(),e.stopPropagation(),e.leftButton&&this._lastRenderData&&this._startSliderDragging(e.buttons,e.posx,e.posy,e.posy,this._lastRenderData.renderedLayout)}),this._gestureDisposable=Im.addTarget(this._domNode.domNode),this._sliderTouchStartListener=ho(this._domNode.domNode,Tm.Start,e=>{e.preventDefault(),e.stopPropagation(),this._lastRenderData&&(this._slider.toggleClassName("active",!0),this._gestureInProgress=!0,this.scrollDueToTouchEvent(e))},{passive:!1}),this._sliderTouchMoveListener=ho(this._domNode.domNode,Tm.Change,e=>{e.preventDefault(),e.stopPropagation(),this._lastRenderData&&this._gestureInProgress&&this.scrollDueToTouchEvent(e)},{passive:!1}),this._sliderTouchEndListener=fo(this._domNode.domNode,Tm.End,e=>{e.preventDefault(),e.stopPropagation(),this._gestureInProgress=!1,this._slider.toggleClassName("active",!1)})}_startSliderDragging(e,t,i,n,o){this._slider.toggleClassName("active",!0);const s=(e,n)=>{const s=Math.abs(n-t);if(r["i"]&&s>nx)return void this._model.setScrollTop(o.scrollTop);const a=e-i;this._model.setScrollTop(o.getDesiredScrollTopFromDelta(a))};n!==i&&s(n,t),this._sliderMouseMoveMonitor.startMonitoring(this._slider.domNode,e,Om,e=>s(e.posy,e.posx),()=>{this._slider.toggleClassName("active",!1)})}scrollDueToTouchEvent(e){const t=this._domNode.domNode.getBoundingClientRect().top,i=this._lastRenderData.renderedLayout.getDesiredScrollTopFromTouchLocation(e.pageY-t);this._model.setScrollTop(i)}dispose(){this._mouseDownListener.dispose(),this._sliderMouseMoveMonitor.dispose(),this._sliderMouseDownListener.dispose(),this._gestureDisposable.dispose(),this._sliderTouchStartListener.dispose(),this._sliderTouchMoveListener.dispose(),this._sliderTouchEndListener.dispose(),super.dispose()}_getMinimapDomNodeClassName(){return"always"===this._model.options.showSlider?"minimap slider-always":"minimap slider-mouseover"}getDomNode(){return this._domNode}_applyLayout(){this._domNode.setLeft(this._model.options.minimapLeft),this._domNode.setWidth(this._model.options.minimapWidth),this._domNode.setHeight(this._model.options.minimapHeight),this._shadow.setHeight(this._model.options.minimapHeight),this._canvas.setWidth(this._model.options.canvasOuterWidth),this._canvas.setHeight(this._model.options.canvasOuterHeight),this._canvas.domNode.width=this._model.options.canvasInnerWidth,this._canvas.domNode.height=this._model.options.canvasInnerHeight,this._decorationsCanvas.setWidth(this._model.options.canvasOuterWidth),this._decorationsCanvas.setHeight(this._model.options.canvasOuterHeight),this._decorationsCanvas.domNode.width=this._model.options.canvasInnerWidth,this._decorationsCanvas.domNode.height=this._model.options.canvasInnerHeight,this._slider.setWidth(this._model.options.minimapWidth)}_getBuffer(){return this._buffers||this._model.options.canvasInnerWidth>0&&this._model.options.canvasInnerHeight>0&&(this._buffers=new cx(this._canvas.domNode.getContext("2d"),this._model.options.canvasInnerWidth,this._model.options.canvasInnerHeight,this._model.options.backgroundColor)),this._buffers?this._buffers.getBuffer():null}onDidChangeOptions(){this._lastRenderData=null,this._buffers=null,this._applyLayout(),this._domNode.setClassName(this._getMinimapDomNodeClassName())}onSelectionChanged(){return this._renderDecorations=!0,!0}onDecorationsChanged(){return this._renderDecorations=!0,!0}onFlushed(){return this._lastRenderData=null,!0}onLinesChanged(e,t){return!!this._lastRenderData&&this._lastRenderData.onLinesChanged(e,t)}onLinesDeleted(e,t){return this._lastRenderData&&this._lastRenderData.onLinesDeleted(e,t),!0}onLinesInserted(e,t){return this._lastRenderData&&this._lastRenderData.onLinesInserted(e,t),!0}onScrollChanged(){return this._renderDecorations=!0,!0}onThemeChanged(){return this._selectionColor=this._theme.getColor(pC),this._renderDecorations=!0,!0}onTokensChanged(e){return!!this._lastRenderData&&this._lastRenderData.onTokensChanged(e)}onTokensColorsChanged(){return this._lastRenderData=null,this._buffers=null,!0}onZonesChanged(){return this._lastRenderData=null,!0}render(e){const t=this._model.options.renderMinimap;if(0===t)return this._shadow.setClassName("minimap-shadow-hidden"),this._sliderHorizontal.setWidth(0),void this._sliderHorizontal.setHeight(0);e.scrollLeft+e.viewportWidth>=e.scrollWidth?this._shadow.setClassName("minimap-shadow-hidden"):this._shadow.setClassName("minimap-shadow-visible");const i=sx.create(this._model.options,e.viewportStartLineNumber,e.viewportEndLineNumber,e.viewportHeight,e.viewportContainsWhitespaceGaps,this._model.getLineCount(),this._model.getRealLineCount(),e.scrollTop,e.scrollHeight,this._lastRenderData?this._lastRenderData.renderedLayout:null);this._slider.setDisplay(i.sliderNeeded?"block":"none"),this._slider.setTop(i.sliderTop),this._slider.setHeight(i.sliderHeight);const n=e.scrollLeft/this._model.options.typicalHalfwidthCharacterWidth,o=Math.min(this._model.options.minimapWidth,Math.round(n*this._model.options.minimapCharWidth/this._model.options.pixelRatio));this._sliderHorizontal.setLeft(o),this._sliderHorizontal.setWidth(this._model.options.minimapWidth-o),this._sliderHorizontal.setTop(0),this._sliderHorizontal.setHeight(i.sliderHeight),this.renderDecorations(i),this._lastRenderData=this.renderLines(i)}renderDecorations(e){if(this._renderDecorations){this._renderDecorations=!1;const t=this._model.getSelections(),i=this._model.getMinimapDecorationsInViewport(e.startLineNumber,e.endLineNumber),{canvasInnerWidth:n,canvasInnerHeight:o}=this._model.options,r=this._model.options.minimapLineHeight,s=this._model.options.minimapCharWidth,a=this._model.getOptions().tabSize,l=this._decorationsCanvas.domNode.getContext("2d");l.clearRect(0,0,n,o);const c=new Map;for(let h=0;h<t.length;h++){const i=t[h];for(let t=i.startLineNumber;t<=i.endLineNumber;t++)this.renderDecorationOnLine(l,c,i,this._selectionColor,e,t,r,r,a,s)}for(let h=0;h<i.length;h++){const t=i[h];if(!t.options.minimap)continue;const n=t.options.minimap.getColor(this._theme);for(let i=t.range.startLineNumber;i<=t.range.endLineNumber;i++)switch(t.options.minimap.position){case ys.Inline:this.renderDecorationOnLine(l,c,t.range,n,e,i,r,r,a,s);continue;case ys.Gutter:const o=(i-e.startLineNumber)*r,h=2;this.renderDecoration(l,n,h,o,ox,r);continue}}}}renderDecorationOnLine(e,t,i,n,o,r,s,a,l,c){const h=(r-o.startLineNumber)*a;if(h+s<0||h>this._model.options.canvasInnerHeight)return;let d=t.get(r);const u=!d;if(!d){const e=this._model.getLineContent(r);d=[g];for(let t=1;t<e.length+1;t++){const i=e.charCodeAt(t-1),n=9===i?l*c:yr["C"](i)?2*c:c;d[t]=d[t-1]+n}t.set(r,d)}const{startColumn:f,endColumn:m,startLineNumber:p,endLineNumber:_}=i,b=p===r?d[f-1]:g,v=_>r?d.length-1:m-1;if(v>0){const t=d[v]-b||2;this.renderDecoration(e,n,b,h,t,s)}u&&this.renderLineHighlight(e,n,h,s)}renderLineHighlight(e,t,i,n){e.fillStyle=t&&t.transparent(.5).toString()||"",e.fillRect(g,i,e.canvas.width,n)}renderDecoration(e,t,i,n,o,r){e.fillStyle=t&&t.toString()||"",e.fillRect(i,n,o,r)}renderLines(e){const t=e.startLineNumber,i=e.endLineNumber,n=this._model.options.minimapLineHeight;if(this._lastRenderData&&this._lastRenderData.linesEquals(e)){const t=this._lastRenderData._get();return new lx(e,t.imageData,t.lines)}const o=this._getBuffer();if(!o)return null;let[r,s,a]=ux._renderUntouchedLines(o,t,i,n,this._lastRenderData);const l=this._model.getMinimapLinesRenderingData(t,i,a),c=this._model.getOptions().tabSize,h=this._model.options.backgroundColor,d=this._model.tokensColorTracker,u=d.backgroundIsLight(),g=this._model.options.renderMinimap,f=this._model.options.charRenderer(),m=this._model.options.fontScale,p=this._model.options.minimapCharWidth,_=1===g?2:3,b=_*m,v=n>b?Math.floor((n-b)/2):0;let w=0;const C=[];for(let k=0,E=i-t+1;k<E;k++)a[k]&&ux._renderLine(o,h,u,g,p,d,f,w,v,c,l[k],m,n),C[k]=new ax(w),w+=n;const y=-1===r?0:r,S=-1===s?o.height:s,x=S-y,L=this._canvas.domNode.getContext("2d");return L.putImageData(o,0,0,0,y,o.width,x),new lx(e,o,C)}static _renderUntouchedLines(e,t,i,n,o){const r=[];if(!o){for(let e=0,n=i-t+1;e<n;e++)r[e]=!0;return[-1,-1,r]}const s=o._get(),a=s.imageData.data,l=s.rendLineNumberStart,c=s.lines,h=c.length,d=e.width,u=e.data,g=(i-t+1)*n*d*4;let f=-1,m=-1,p=-1,_=-1,b=-1,v=-1,w=0;for(let S=t;S<=i;S++){const e=S-t,i=S-l,o=i>=0&&i<h?c[i].dy:-1;if(-1===o){r[e]=!0,w+=n;continue}const s=o*d*4,C=(o+n)*d*4,y=w*d*4,x=(w+n)*d*4;_===s&&v===y?(_=C,v=x):(-1!==p&&(u.set(a.subarray(p,_),b),-1===f&&0===p&&p===b&&(f=_),-1===m&&_===g&&p===b&&(m=p)),p=s,_=C,b=y,v=x),r[e]=!1,w+=n}-1!==p&&(u.set(a.subarray(p,_),b),-1===f&&0===p&&p===b&&(f=_),-1===m&&_===g&&p===b&&(m=p));const C=-1===f?-1:f/(4*d),y=-1===m?-1:m/(4*d);return[C,y,r]}static _renderLine(e,t,i,n,o,r,s,a,l,c,h,d,u){const f=h.content,m=h.tokens,p=e.width-o,_=1===u;let b=g,v=0,w=0;for(let g=0,C=m.getCount();g<C;g++){const h=m.getEndOffset(g),u=m.getForeground(g),C=r.getColor(u);for(;v<h;v++){if(b>p)return;const r=f.charCodeAt(v);if(9===r){const e=c-(v+w)%c;w+=e-1,b+=e*o}else if(32===r)b+=o;else{const c=yr["C"](r)?2:1;for(let h=0;h<c;h++)if(2===n?s.blockRenderChar(e,b,a+l,C,t,i,_):s.renderChar(e,b,a+l,r,C,t,d,i,_),b+=o,b>p)return}}}}}cp((e,t)=>{const i=e.getColor(vC);i&&t.addRule(`.monaco-editor .minimap > canvas { opacity: ${i.rgba.a}; will-change: opacity; }`);const n=e.getColor(wC);n&&t.addRule(`.monaco-editor .minimap-slider .minimap-slider-horizontal { background: ${n}; }`);const o=e.getColor(CC);o&&t.addRule(`.monaco-editor .minimap-slider:hover .minimap-slider-horizontal { background: ${o}; }`);const r=e.getColor(yC);r&&t.addRule(`.monaco-editor .minimap-slider.active .minimap-slider-horizontal { background: ${r}; }`);const s=e.getColor(uw);s&&t.addRule(`.monaco-editor .minimap-shadow-visible { box-shadow: ${s} -6px 0 6px -6px inset; }`)});i("70a8");class gx extends jm{constructor(e){super(e);const t=this._context.configuration.options,i=t.get(117);this._widgets={},this._verticalScrollbarWidth=i.verticalScrollbarWidth,this._minimapWidth=i.minimap.minimapWidth,this._horizontalScrollbarHeight=i.horizontalScrollbarHeight,this._editorHeight=i.height,this._editorWidth=i.width,this._domNode=km(document.createElement("div")),Km.write(this._domNode,4),this._domNode.setClassName("overlayWidgets")}dispose(){super.dispose(),this._widgets={}}getDomNode(){return this._domNode}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(117);return this._verticalScrollbarWidth=i.verticalScrollbarWidth,this._minimapWidth=i.minimap.minimapWidth,this._horizontalScrollbarHeight=i.horizontalScrollbarHeight,this._editorHeight=i.height,this._editorWidth=i.width,!0}addWidget(e){const t=km(e.getDomNode());this._widgets[e.getId()]={widget:e,preference:null,domNode:t},t.setPosition("absolute"),t.setAttribute("widgetId",e.getId()),this._domNode.appendChild(t),this.setShouldRender()}setWidgetPosition(e,t){const i=this._widgets[e.getId()];return i.preference!==t&&(i.preference=t,this.setShouldRender(),!0)}removeWidget(e){const t=e.getId();if(this._widgets.hasOwnProperty(t)){const e=this._widgets[t],i=e.domNode.domNode;delete this._widgets[t],i.parentNode.removeChild(i),this.setShouldRender()}}_renderWidget(e){const t=e.domNode;if(null!==e.preference)if(0===e.preference)t.setTop(0),t.setRight(2*this._verticalScrollbarWidth+this._minimapWidth);else if(1===e.preference){const e=t.domNode.clientHeight;t.setTop(this._editorHeight-e-2*this._horizontalScrollbarHeight),t.setRight(2*this._verticalScrollbarWidth+this._minimapWidth)}else 2===e.preference&&(t.setTop(0),t.domNode.style.right="50%");else t.unsetTop()}prepareRender(e){}render(e){this._domNode.setWidth(this._editorWidth);const t=Object.keys(this._widgets);for(let i=0,n=t.length;i<n;i++){const e=t[i];this._renderWidget(this._widgets[e])}}}class fx{constructor(e,t){const i=e.options;this.lineHeight=i.get(51),this.pixelRatio=i.get(115),this.overviewRulerLanes=i.get(65),this.renderBorder=i.get(64);const n=t.getColor(qC);this.borderColor=n?n.toString():null,this.hideCursor=i.get(44);const o=t.getColor(FC);this.cursorColor=o?o.transparent(.7).toString():null,this.themeType=t.type;const r=i.get(56),s=r.enabled,a=r.side,l=s?t.getColor($C)||Kl.getDefaultBackground():null;this.backgroundColor=null===l||"left"===a?null:Nb.Format.CSS.formatHex(l);const c=i.get(117),h=c.overviewRuler;this.top=h.top,this.right=h.right,this.domWidth=h.width,this.domHeight=h.height,0===this.overviewRulerLanes?(this.canvasWidth=0,this.canvasHeight=0):(this.canvasWidth=this.domWidth*this.pixelRatio|0,this.canvasHeight=this.domHeight*this.pixelRatio|0);const[d,u]=this._initLanes(1,this.canvasWidth,this.overviewRulerLanes);this.x=d,this.w=u}_initLanes(e,t,i){const n=t-e;if(i>=3){const t=Math.floor(n/3),i=Math.floor(n/3),o=n-t-i,r=e,s=r+t,a=r+t+o;return[[0,r,s,r,a,r,s,r],[0,t,o,t+o,i,t+o+i,o+i,t+o+i]]}if(2===i){const t=Math.floor(n/2),i=n-t,o=e,r=o+t;return[[0,o,o,o,r,o,o,o],[0,t,t,t,i,t+i,t+i,t+i]]}{const t=e,i=n;return[[0,t,t,t,t,t,t,t],[0,i,i,i,i,i,i,i]]}}equals(e){return this.lineHeight===e.lineHeight&&this.pixelRatio===e.pixelRatio&&this.overviewRulerLanes===e.overviewRulerLanes&&this.renderBorder===e.renderBorder&&this.borderColor===e.borderColor&&this.hideCursor===e.hideCursor&&this.cursorColor===e.cursorColor&&this.themeType===e.themeType&&this.backgroundColor===e.backgroundColor&&this.top===e.top&&this.right===e.right&&this.domWidth===e.domWidth&&this.domHeight===e.domHeight&&this.canvasWidth===e.canvasWidth&&this.canvasHeight===e.canvasHeight}}class mx extends jm{constructor(e){super(e),this._domNode=km(document.createElement("canvas")),this._domNode.setClassName("decorationsOverviewRuler"),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._domNode.setAttribute("aria-hidden","true"),this._updateSettings(!1),this._tokensColorTrackerListener=Kl.onDidChange(e=>{e.changedColorMap&&this._updateSettings(!0)}),this._cursorPositions=[]}dispose(){super.dispose(),this._tokensColorTrackerListener.dispose()}_updateSettings(e){const t=new fx(this._context.configuration,this._context.theme);return(!this._settings||!this._settings.equals(t))&&(this._settings=t,this._domNode.setTop(this._settings.top),this._domNode.setRight(this._settings.right),this._domNode.setWidth(this._settings.domWidth),this._domNode.setHeight(this._settings.domHeight),this._domNode.domNode.width=this._settings.canvasWidth,this._domNode.domNode.height=this._settings.canvasHeight,e&&this._render(),!0)}onConfigurationChanged(e){return this._updateSettings(!1)}onCursorStateChanged(e){this._cursorPositions=[];for(let t=0,i=e.selections.length;t<i;t++)this._cursorPositions[t]=e.selections[t].getPosition();return this._cursorPositions.sort(Qt.compare),!0}onDecorationsChanged(e){return!!e.affectsOverviewRuler}onFlushed(e){return!0}onScrollChanged(e){return e.scrollHeightChanged}onZonesChanged(e){return!0}onThemeChanged(e){return this._context.model.invalidateOverviewRulerColorCache(),this._updateSettings(!1)}getDomNode(){return this._domNode.domNode}prepareRender(e){}render(e){this._render()}_render(){if(0===this._settings.overviewRulerLanes)return void this._domNode.setBackgroundColor(this._settings.backgroundColor?this._settings.backgroundColor:"");const e=this._settings.canvasWidth,t=this._settings.canvasHeight,i=this._settings.lineHeight,n=this._context.viewLayout,o=this._context.viewLayout.getScrollHeight(),r=t/o,s=this._context.model.getAllOverviewRulerDecorations(this._context.theme),a=6*this._settings.pixelRatio|0,l=a/2|0,c=this._domNode.domNode.getContext("2d");null===this._settings.backgroundColor?c.clearRect(0,0,e,t):(c.fillStyle=this._settings.backgroundColor,c.fillRect(0,0,e,t));const h=this._settings.x,d=this._settings.w,u=Object.keys(s);u.sort();for(let g=0,f=u.length;g<f;g++){const e=u[g],o=s[e];c.fillStyle=e;let f=0,m=0,p=0;for(let s=0,u=o.length;s<u;s++){const e=o[3*s],u=o[3*s+1],g=o[3*s+2];let _=n.getVerticalOffsetForLineNumber(u)*r|0,b=(n.getVerticalOffsetForLineNumber(g)+i)*r|0;const v=b-_;if(v<a){let e=(_+b)/2|0;e<l?e=l:e+l>t&&(e=t-l),_=e-l,b=e+l}_>p+1||e!==f?(0!==s&&c.fillRect(h[f],m,d[f],p-m),f=e,m=_,p=b):b>p&&(p=b)}c.fillRect(h[f],m,d[f],p-m)}if(!this._settings.hideCursor&&this._settings.cursorColor){const e=2*this._settings.pixelRatio|0,i=e/2|0,o=this._settings.x[7],s=this._settings.w[7];c.fillStyle=this._settings.cursorColor;let a=-100,l=-100;for(let h=0,d=this._cursorPositions.length;h<d;h++){const d=this._cursorPositions[h];let u=n.getVerticalOffsetForLineNumber(d.lineNumber)*r|0;u<i?u=i:u+i>t&&(u=t-i);const g=u-i,f=g+e;g>l+1?(0!==h&&c.fillRect(o,a,s,l-a),a=g,l=f):f>l&&(l=f)}c.fillRect(o,a,s,l-a)}this._settings.renderBorder&&this._settings.borderColor&&this._settings.overviewRulerLanes>0&&(c.beginPath(),c.lineWidth=1,c.strokeStyle=this._settings.borderColor,c.moveTo(0,0),c.lineTo(0,t),c.stroke(),c.moveTo(0,0),c.lineTo(e,0),c.stroke())}}class px{constructor(e,t,i){this.from=0|e,this.to=0|t,this.colorId=0|i}static compare(e,t){return e.colorId===t.colorId?e.from===t.from?e.to-t.to:e.from-t.from:e.colorId-t.colorId}}class _x{constructor(e,t,i){this.startLineNumber=e,this.endLineNumber=t,this.color=i,this._colorZone=null}static compare(e,t){return e.color===t.color?e.startLineNumber===t.startLineNumber?e.endLineNumber-t.endLineNumber:e.startLineNumber-t.startLineNumber:e.color<t.color?-1:1}setColorZone(e){this._colorZone=e}getColorZones(){return this._colorZone}}class bx{constructor(e){this._getVerticalOffsetForLine=e,this._zones=[],this._colorZonesInvalid=!1,this._lineHeight=0,this._domWidth=0,this._domHeight=0,this._outerHeight=0,this._pixelRatio=1,this._lastAssignedId=0,this._color2Id=Object.create(null),this._id2Color=[]}getId2Color(){return this._id2Color}setZones(e){this._zones=e,this._zones.sort(_x.compare)}setLineHeight(e){return this._lineHeight!==e&&(this._lineHeight=e,this._colorZonesInvalid=!0,!0)}setPixelRatio(e){this._pixelRatio=e,this._colorZonesInvalid=!0}getDOMWidth(){return this._domWidth}getCanvasWidth(){return this._domWidth*this._pixelRatio}setDOMWidth(e){return this._domWidth!==e&&(this._domWidth=e,this._colorZonesInvalid=!0,!0)}getDOMHeight(){return this._domHeight}getCanvasHeight(){return this._domHeight*this._pixelRatio}setDOMHeight(e){return this._domHeight!==e&&(this._domHeight=e,this._colorZonesInvalid=!0,!0)}getOuterHeight(){return this._outerHeight}setOuterHeight(e){return this._outerHeight!==e&&(this._outerHeight=e,this._colorZonesInvalid=!0,!0)}resolveColorZones(){const e=this._colorZonesInvalid,t=Math.floor(this._lineHeight),i=Math.floor(this.getCanvasHeight()),n=Math.floor(this._outerHeight),o=i/n,r=Math.floor(4*this._pixelRatio/2);let s=[];for(let a=0,l=this._zones.length;a<l;a++){const n=this._zones[a];if(!e){const e=n.getColorZones();if(e){s.push(e);continue}}const l=Math.floor(o*this._getVerticalOffsetForLine(n.startLineNumber)),c=Math.floor(o*(this._getVerticalOffsetForLine(n.endLineNumber)+t));let h=Math.floor((l+c)/2),d=c-h;d<r&&(d=r),h-d<0&&(h=d),h+d>i&&(h=i-d);const u=n.color;let g=this._color2Id[u];g||(g=++this._lastAssignedId,this._color2Id[u]=g,this._id2Color[g]=u);const f=new px(h-d,h+d,g);n.setColorZone(f),s.push(f)}return this._colorZonesInvalid=!1,s.sort(px.compare),s}}class vx extends Um{constructor(e,t){super(),this._context=e;const i=this._context.configuration.options;this._domNode=km(document.createElement("canvas")),this._domNode.setClassName(t),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._zoneManager=new bx(e=>this._context.viewLayout.getVerticalOffsetForLineNumber(e)),this._zoneManager.setDOMWidth(0),this._zoneManager.setDOMHeight(0),this._zoneManager.setOuterHeight(this._context.viewLayout.getScrollHeight()),this._zoneManager.setLineHeight(i.get(51)),this._zoneManager.setPixelRatio(i.get(115)),this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return e.hasChanged(51)&&(this._zoneManager.setLineHeight(t.get(51)),this._render()),e.hasChanged(115)&&(this._zoneManager.setPixelRatio(t.get(115)),this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render()),!0}onFlushed(e){return this._render(),!0}onScrollChanged(e){return e.scrollHeightChanged&&(this._zoneManager.setOuterHeight(e.scrollHeight),this._render()),!0}onZonesChanged(e){return this._render(),!0}getDomNode(){return this._domNode.domNode}setLayout(e){this._domNode.setTop(e.top),this._domNode.setRight(e.right);let t=!1;t=this._zoneManager.setDOMWidth(e.width)||t,t=this._zoneManager.setDOMHeight(e.height)||t,t&&(this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render())}setZones(e){this._zoneManager.setZones(e),this._render()}_render(){if(0===this._zoneManager.getOuterHeight())return!1;const e=this._zoneManager.getCanvasWidth(),t=this._zoneManager.getCanvasHeight(),i=this._zoneManager.resolveColorZones(),n=this._zoneManager.getId2Color(),o=this._domNode.domNode.getContext("2d");return o.clearRect(0,0,e,t),i.length>0&&this._renderOneLane(o,i,n,e),!0}_renderOneLane(e,t,i,n){let o=0,r=0,s=0;for(const a of t){const t=a.colorId,l=a.from,c=a.to;t!==o?(e.fillRect(0,r,n,s-r),o=t,e.fillStyle=i[o],r=l,s=c):s>=l?s=Math.max(s,c):(e.fillRect(0,r,n,s-r),r=l,s=c)}e.fillRect(0,r,n,s-r)}}i("df93");class wx extends jm{constructor(e){super(e),this.domNode=km(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.domNode.setClassName("view-rulers"),this._renderedRulers=[];const t=this._context.configuration.options;this._rulers=t.get(83),this._typicalHalfwidthCharacterWidth=t.get(36).typicalHalfwidthCharacterWidth}dispose(){super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return this._rulers=t.get(83),this._typicalHalfwidthCharacterWidth=t.get(36).typicalHalfwidthCharacterWidth,!0}onScrollChanged(e){return e.scrollHeightChanged}prepareRender(e){}_ensureRulersCount(){const e=this._renderedRulers.length,t=this._rulers.length;if(e===t)return;if(e<t){const{tabSize:i}=this._context.model.getTextModelOptions(),n=i;let o=t-e;while(o>0){const e=km(document.createElement("div"));e.setClassName("view-ruler"),e.setWidth(n),this.domNode.appendChild(e),this._renderedRulers.push(e),o--}return}let i=e-t;while(i>0){const e=this._renderedRulers.pop();this.domNode.removeChild(e),i--}}render(e){this._ensureRulersCount();for(let t=0,i=this._rulers.length;t<i;t++){const i=this._renderedRulers[t],n=this._rulers[t];i.setBoxShadow(n.color?`1px 0 0 0 ${n.color} inset`:""),i.setHeight(Math.min(e.scrollHeight,1e6)),i.setLeft(n.column*this._typicalHalfwidthCharacterWidth)}}}cp((e,t)=>{const i=e.getColor(KC);i&&t.addRule(`.monaco-editor .view-ruler { box-shadow: 1px 0 0 0 ${i} inset; }`)});i("9368");class Cx extends jm{constructor(e){super(e),this._scrollTop=0,this._width=0,this._updateWidth(),this._shouldShow=!1;const t=this._context.configuration.options,i=t.get(84);this._useShadows=i.useShadows,this._domNode=km(document.createElement("div")),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true")}dispose(){super.dispose()}_updateShouldShow(){const e=this._useShadows&&this._scrollTop>0;return this._shouldShow!==e&&(this._shouldShow=e,!0)}getDomNode(){return this._domNode}_updateWidth(){const e=this._context.configuration.options,t=e.get(117);0===t.minimap.renderMinimap||t.minimap.minimapWidth>0&&0===t.minimap.minimapLeft?this._width=t.width:this._width=t.width-t.minimap.minimapWidth-t.verticalScrollbarWidth}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(84);return this._useShadows=i.useShadows,this._updateWidth(),this._updateShouldShow(),!0}onScrollChanged(e){return this._scrollTop=e.scrollTop,this._updateShouldShow()}prepareRender(e){}render(e){this._domNode.setWidth(this._width),this._domNode.setClassName(this._shouldShow?"scroll-decoration":"")}}cp((e,t)=>{const i=e.getColor(uw);i&&t.addRule(`.monaco-editor .scroll-decoration { box-shadow: ${i} 0 6px 6px -6px inset; }`)});i("adf0");class yx{constructor(e){this.left=e.left,this.width=e.width,this.startStyle=null,this.endStyle=null}}class Sx{constructor(e,t){this.lineNumber=e,this.ranges=t}}function xx(e){return new yx(e)}function Lx(e){return new Sx(e.lineNumber,e.ranges.map(xx))}const kx=Qi;class Ex extends Fv{constructor(e){super(),this._previousFrameVisibleRangesWithStyle=[],this._context=e;const t=this._context.configuration.options;this._lineHeight=t.get(51),this._roundedSelection=t.get(82),this._typicalHalfwidthCharacterWidth=t.get(36).typicalHalfwidthCharacterWidth,this._selections=[],this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return this._lineHeight=t.get(51),this._roundedSelection=t.get(82),this._typicalHalfwidthCharacterWidth=t.get(36).typicalHalfwidthCharacterWidth,!0}onCursorStateChanged(e){return this._selections=e.selections.slice(0),!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_visibleRangesHaveGaps(e){for(let t=0,i=e.length;t<i;t++){const i=e[t];if(i.ranges.length>1)return!0}return!1}_enrichVisibleRangesWithStyle(e,t,i){const n=this._typicalHalfwidthCharacterWidth/4;let o=null,r=null;if(i&&i.length>0&&t.length>0){const n=t[0].lineNumber;if(n===e.startLineNumber)for(let e=0;!o&&e<i.length;e++)i[e].lineNumber===n&&(o=i[e].ranges[0]);const s=t[t.length-1].lineNumber;if(s===e.endLineNumber)for(let e=i.length-1;!r&&e>=0;e--)i[e].lineNumber===s&&(r=i[e].ranges[0]);o&&!o.startStyle&&(o=null),r&&!r.startStyle&&(r=null)}for(let s=0,a=t.length;s<a;s++){const e=t[s].ranges[0],i=e.left,l=e.left+e.width,c={top:0,bottom:0},h={top:0,bottom:0};if(s>0){const e=t[s-1].ranges[0].left,o=t[s-1].ranges[0].left+t[s-1].ranges[0].width;Dx(i-e)<n?c.top=2:i>e&&(c.top=1),Dx(l-o)<n?h.top=2:e<l&&l<o&&(h.top=1)}else o&&(c.top=o.startStyle.top,h.top=o.endStyle.top);if(s+1<a){const e=t[s+1].ranges[0].left,o=t[s+1].ranges[0].left+t[s+1].ranges[0].width;Dx(i-e)<n?c.bottom=2:e<i&&i<o&&(c.bottom=1),Dx(l-o)<n?h.bottom=2:l<o&&(h.bottom=1)}else r&&(c.bottom=r.startStyle.bottom,h.bottom=r.endStyle.bottom);e.startStyle=c,e.endStyle=h}}_getVisibleRangesWithStyle(e,t,i){const n=t.linesVisibleRangesForRange(e,!0)||[],o=n.map(Lx),r=this._visibleRangesHaveGaps(o);return kx||r||!this._roundedSelection||this._enrichVisibleRangesWithStyle(t.visibleRange,o,i),o}_createSelectionPiece(e,t,i,n,o){return'<div class="cslr '+i+'" style="top:'+e.toString()+"px;left:"+n.toString()+"px;width:"+o.toString()+"px;height:"+t+'px;"></div>'}_actualRenderOneSelection(e,t,i,n){if(0===n.length)return;const o=!!n[0].ranges[0].startStyle,r=this._lineHeight.toString(),s=(this._lineHeight-1).toString(),a=n[0].lineNumber,l=n[n.length-1].lineNumber;for(let c=0,h=n.length;c<h;c++){const h=n[c],d=h.lineNumber,u=d-t,g=i&&(d===l||d===a)?s:r,f=i&&d===a?1:0;let m="",p="";for(let e=0,t=h.ranges.length;e<t;e++){const t=h.ranges[e];if(o){const e=t.startStyle,i=t.endStyle;if(1===e.top||1===e.bottom){m+=this._createSelectionPiece(f,g,Ex.SELECTION_CLASS_NAME,t.left-Ex.ROUNDED_PIECE_WIDTH,Ex.ROUNDED_PIECE_WIDTH);let i=Ex.EDITOR_BACKGROUND_CLASS_NAME;1===e.top&&(i+=" "+Ex.SELECTION_TOP_RIGHT),1===e.bottom&&(i+=" "+Ex.SELECTION_BOTTOM_RIGHT),m+=this._createSelectionPiece(f,g,i,t.left-Ex.ROUNDED_PIECE_WIDTH,Ex.ROUNDED_PIECE_WIDTH)}if(1===i.top||1===i.bottom){m+=this._createSelectionPiece(f,g,Ex.SELECTION_CLASS_NAME,t.left+t.width,Ex.ROUNDED_PIECE_WIDTH);let e=Ex.EDITOR_BACKGROUND_CLASS_NAME;1===i.top&&(e+=" "+Ex.SELECTION_TOP_LEFT),1===i.bottom&&(e+=" "+Ex.SELECTION_BOTTOM_LEFT),m+=this._createSelectionPiece(f,g,e,t.left+t.width,Ex.ROUNDED_PIECE_WIDTH)}}let i=Ex.SELECTION_CLASS_NAME;if(o){const e=t.startStyle,n=t.endStyle;0===e.top&&(i+=" "+Ex.SELECTION_TOP_LEFT),0===e.bottom&&(i+=" "+Ex.SELECTION_BOTTOM_LEFT),0===n.top&&(i+=" "+Ex.SELECTION_TOP_RIGHT),0===n.bottom&&(i+=" "+Ex.SELECTION_BOTTOM_RIGHT)}p+=this._createSelectionPiece(f,g,i,t.left,t.width)}e[u][0]+=m,e[u][1]+=p}}prepareRender(e){const t=[],i=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber;for(let r=i;r<=n;r++){const e=r-i;t[e]=["",""]}const o=[];for(let r=0,s=this._selections.length;r<s;r++){const n=this._selections[r];if(n.isEmpty()){o[r]=null;continue}const s=this._getVisibleRangesWithStyle(n,e,this._previousFrameVisibleRangesWithStyle[r]);o[r]=s,this._actualRenderOneSelection(t,i,this._selections.length>1,s)}this._previousFrameVisibleRangesWithStyle=o,this._renderResult=t.map(([e,t])=>e+t)}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}function Dx(e){return e<0?-e:e}Ex.SELECTION_CLASS_NAME="selected-text",Ex.SELECTION_TOP_LEFT="top-left-radius",Ex.SELECTION_BOTTOM_LEFT="bottom-left-radius",Ex.SELECTION_TOP_RIGHT="top-right-radius",Ex.SELECTION_BOTTOM_RIGHT="bottom-right-radius",Ex.EDITOR_BACKGROUND_CLASS_NAME="monaco-editor-background",Ex.ROUNDED_PIECE_WIDTH=10,cp((e,t)=>{const i=e.getColor(Rw);i&&t.addRule(`.monaco-editor .focused .selected-text { background-color: ${i}; }`);const n=e.getColor(Fw);n&&t.addRule(`.monaco-editor .selected-text { background-color: ${n}; }`);const o=e.getColor(Pw);o&&!o.isTransparent()&&t.addRule(`.monaco-editor .view-line span.inline-selected-text { color: ${o}; }`)});i("b856");class Nx{constructor(e,t,i,n,o,r){this.top=e,this.left=t,this.width=i,this.height=n,this.textContent=o,this.textContentClassName=r}}class Tx{constructor(e){this._context=e;const t=this._context.configuration.options,i=t.get(36);this._cursorStyle=t.get(19),this._lineHeight=t.get(51),this._typicalHalfwidthCharacterWidth=i.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(t.get(22),this._typicalHalfwidthCharacterWidth),this._isVisible=!0,this._domNode=km(document.createElement("div")),this._domNode.setClassName("cursor "+ny),this._domNode.setHeight(this._lineHeight),this._domNode.setTop(0),this._domNode.setLeft(0),Nf.applyFontInfo(this._domNode,i),this._domNode.setDisplay("none"),this._position=new Qt(1,1),this._lastRenderedContent="",this._renderData=null}getDomNode(){return this._domNode}getPosition(){return this._position}show(){this._isVisible||(this._domNode.setVisibility("inherit"),this._isVisible=!0)}hide(){this._isVisible&&(this._domNode.setVisibility("hidden"),this._isVisible=!1)}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(36);return this._cursorStyle=t.get(19),this._lineHeight=t.get(51),this._typicalHalfwidthCharacterWidth=i.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(t.get(22),this._typicalHalfwidthCharacterWidth),Nf.applyFontInfo(this._domNode,i),!0}onCursorPositionChanged(e){return this._position=e,!0}_prepareRender(e){let t="";if(this._cursorStyle===T.Line||this._cursorStyle===T.LineThin){const i=e.visibleRangeForPosition(this._position);if(!i||i.outsideRenderedLine)return null;let n;if(this._cursorStyle===T.Line){if(n=fr(this._lineCursorWidth>0?this._lineCursorWidth:2),n>2){const e=this._context.model.getLineContent(this._position.lineNumber),i=yr["J"](e,this._position.column-1);t=e.substr(this._position.column-1,i)}}else n=fr(1);let o=i.left;n>=2&&o>=1&&(o-=1);const r=e.getVerticalOffsetForLineNumber(this._position.lineNumber)-e.bigNumbersDelta;return new Nx(r,o,n,this._lineHeight,t,"")}const i=this._context.model.getLineContent(this._position.lineNumber),n=yr["J"](i,this._position.column-1),o=e.linesVisibleRangesForRange(new Jt(this._position.lineNumber,this._position.column,this._position.lineNumber,this._position.column+n),!1);if(!o||0===o.length)return null;const r=o[0];if(r.outsideRenderedLine||0===r.ranges.length)return null;const s=r.ranges[0],a=s.width<1?this._typicalHalfwidthCharacterWidth:s.width;let l="";if(this._cursorStyle===T.Block){const e=this._context.model.getViewLineData(this._position.lineNumber);t=i.substr(this._position.column-1,n);const o=e.tokens.findTokenIndexAtOffset(this._position.column-1);l=e.tokens.getClassName(o)}let c=e.getVerticalOffsetForLineNumber(this._position.lineNumber)-e.bigNumbersDelta,h=this._lineHeight;return this._cursorStyle!==T.Underline&&this._cursorStyle!==T.UnderlineThin||(c+=this._lineHeight-2,h=2),new Nx(c,s.left,a,h,t,l)}prepareRender(e){this._renderData=this._prepareRender(e)}render(e){return this._renderData?(this._lastRenderedContent!==this._renderData.textContent&&(this._lastRenderedContent=this._renderData.textContent,this._domNode.domNode.textContent=this._lastRenderedContent),this._domNode.setClassName(`cursor ${ny} ${this._renderData.textContentClassName}`),this._domNode.setDisplay("block"),this._domNode.setTop(this._renderData.top),this._domNode.setLeft(this._renderData.left),this._domNode.setWidth(this._renderData.width),this._domNode.setLineHeight(this._renderData.height),this._domNode.setHeight(this._renderData.height),{domNode:this._domNode.domNode,position:this._position,contentLeft:this._renderData.left,height:this._renderData.height,width:2}):(this._domNode.setDisplay("none"),null)}}class Mx extends jm{constructor(e){super(e);const t=this._context.configuration.options;this._readOnly=t.get(72),this._cursorBlinking=t.get(17),this._cursorStyle=t.get(19),this._cursorSmoothCaretAnimation=t.get(18),this._selectionIsEmpty=!0,this._isVisible=!1,this._primaryCursor=new Tx(this._context),this._secondaryCursors=[],this._renderData=[],this._domNode=km(document.createElement("div")),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._updateDomClassName(),this._domNode.appendChild(this._primaryCursor.getDomNode()),this._startCursorBlinkAnimation=new Dn,this._cursorFlatBlinkInterval=new Nn,this._blinkingEnabled=!1,this._editorHasFocus=!1,this._updateBlinking()}dispose(){super.dispose(),this._startCursorBlinkAnimation.dispose(),this._cursorFlatBlinkInterval.dispose()}getDomNode(){return this._domNode}onConfigurationChanged(e){const t=this._context.configuration.options;this._readOnly=t.get(72),this._cursorBlinking=t.get(17),this._cursorStyle=t.get(19),this._cursorSmoothCaretAnimation=t.get(18),this._updateBlinking(),this._updateDomClassName(),this._primaryCursor.onConfigurationChanged(e);for(let i=0,n=this._secondaryCursors.length;i<n;i++)this._secondaryCursors[i].onConfigurationChanged(e);return!0}_onCursorPositionChanged(e,t){if(this._primaryCursor.onCursorPositionChanged(e),this._updateBlinking(),this._secondaryCursors.length<t.length){const e=t.length-this._secondaryCursors.length;for(let t=0;t<e;t++){const e=new Tx(this._context);this._domNode.domNode.insertBefore(e.getDomNode().domNode,this._primaryCursor.getDomNode().domNode.nextSibling),this._secondaryCursors.push(e)}}else if(this._secondaryCursors.length>t.length){const e=this._secondaryCursors.length-t.length;for(let t=0;t<e;t++)this._domNode.removeChild(this._secondaryCursors[0].getDomNode()),this._secondaryCursors.splice(0,1)}for(let i=0;i<t.length;i++)this._secondaryCursors[i].onCursorPositionChanged(t[i])}onCursorStateChanged(e){const t=[];for(let n=0,o=e.selections.length;n<o;n++)t[n]=e.selections[n].getPosition();this._onCursorPositionChanged(t[0],t.slice(1));const i=e.selections[0].isEmpty();return this._selectionIsEmpty!==i&&(this._selectionIsEmpty=i,this._updateDomClassName()),!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onFocusChanged(e){return this._editorHasFocus=e.isFocused,this._updateBlinking(),!1}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return!0}onTokensChanged(e){const t=t=>{for(let i=0,n=e.ranges.length;i<n;i++)if(e.ranges[i].fromLineNumber<=t.lineNumber&&t.lineNumber<=e.ranges[i].toLineNumber)return!0;return!1};if(t(this._primaryCursor.getPosition()))return!0;for(const i of this._secondaryCursors)if(t(i.getPosition()))return!0;return!1}onZonesChanged(e){return!0}_getCursorBlinking(){return this._editorHasFocus?this._readOnly?5:this._cursorBlinking:0}_updateBlinking(){this._startCursorBlinkAnimation.cancel(),this._cursorFlatBlinkInterval.cancel();const e=this._getCursorBlinking(),t=0===e,i=5===e;t?this._hide():this._show(),this._blinkingEnabled=!1,this._updateDomClassName(),t||i||(1===e?this._cursorFlatBlinkInterval.cancelAndSet(()=>{this._isVisible?this._hide():this._show()},Mx.BLINK_INTERVAL):this._startCursorBlinkAnimation.setIfNotSet(()=>{this._blinkingEnabled=!0,this._updateDomClassName()},Mx.BLINK_INTERVAL))}_updateDomClassName(){this._domNode.setClassName(this._getClassName())}_getClassName(){let e="cursors-layer";switch(this._selectionIsEmpty||(e+=" has-selection"),this._cursorStyle){case T.Line:e+=" cursor-line-style";break;case T.Block:e+=" cursor-block-style";break;case T.Underline:e+=" cursor-underline-style";break;case T.LineThin:e+=" cursor-line-thin-style";break;case T.BlockOutline:e+=" cursor-block-outline-style";break;case T.UnderlineThin:e+=" cursor-underline-thin-style";break;default:e+=" cursor-line-style"}if(this._blinkingEnabled)switch(this._getCursorBlinking()){case 1:e+=" cursor-blink";break;case 2:e+=" cursor-smooth";break;case 3:e+=" cursor-phase";break;case 4:e+=" cursor-expand";break;case 5:e+=" cursor-solid";break;default:e+=" cursor-solid"}else e+=" cursor-solid";return this._cursorSmoothCaretAnimation&&(e+=" cursor-smooth-caret-animation"),e}_show(){this._primaryCursor.show();for(let e=0,t=this._secondaryCursors.length;e<t;e++)this._secondaryCursors[e].show();this._isVisible=!0}_hide(){this._primaryCursor.hide();for(let e=0,t=this._secondaryCursors.length;e<t;e++)this._secondaryCursors[e].hide();this._isVisible=!1}prepareRender(e){this._primaryCursor.prepareRender(e);for(let t=0,i=this._secondaryCursors.length;t<i;t++)this._secondaryCursors[t].prepareRender(e)}render(e){let t=[],i=0;const n=this._primaryCursor.render(e);n&&(t[i++]=n);for(let o=0,r=this._secondaryCursors.length;o<r;o++){const n=this._secondaryCursors[o].render(e);n&&(t[i++]=n)}this._renderData=t}getLastRenderData(){return this._renderData}}Mx.BLINK_INTERVAL=500,cp((e,t)=>{const i=e.getColor(FC);if(i){let n=e.getColor(WC);n||(n=i.opposite()),t.addRule(`.monaco-editor .cursors-layer .cursor { background-color: ${i}; border-color: ${i}; color: ${n}; }`),"hc"===e.type&&t.addRule(`.monaco-editor .cursors-layer.has-selection .cursor { border-left: 1px solid ${n}; border-right: 1px solid ${n}; }`)}});const Ix=()=>{throw new Error("Invalid change accessor")};class Ox extends jm{constructor(e){super(e);const t=this._context.configuration.options,i=t.get(117);this._lineHeight=t.get(51),this._contentWidth=i.contentWidth,this._contentLeft=i.contentLeft,this.domNode=km(document.createElement("div")),this.domNode.setClassName("view-zones"),this.domNode.setPosition("absolute"),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.marginDomNode=km(document.createElement("div")),this.marginDomNode.setClassName("margin-view-zones"),this.marginDomNode.setPosition("absolute"),this.marginDomNode.setAttribute("role","presentation"),this.marginDomNode.setAttribute("aria-hidden","true"),this._zones={}}dispose(){super.dispose(),this._zones={}}_recomputeWhitespacesProps(){const e=this._context.viewLayout.getWhitespaces(),t=new Map;for(const n of e)t.set(n.id,n);let i=!1;return this._context.model.changeWhitespace(e=>{const n=Object.keys(this._zones);for(let o=0,r=n.length;o<r;o++){const r=n[o],s=this._zones[r],a=this._computeWhitespaceProps(s.delegate),l=t.get(r);!l||l.afterLineNumber===a.afterViewLineNumber&&l.height===a.heightInPx||(e.changeOneWhitespace(r,a.afterViewLineNumber,a.heightInPx),this._safeCallOnComputedHeight(s.delegate,a.heightInPx),i=!0)}}),i}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(117);return this._lineHeight=t.get(51),this._contentWidth=i.contentWidth,this._contentLeft=i.contentLeft,e.hasChanged(51)&&this._recomputeWhitespacesProps(),!0}onLineMappingChanged(e){return this._recomputeWhitespacesProps()}onLinesDeleted(e){return!0}onScrollChanged(e){return e.scrollTopChanged||e.scrollWidthChanged}onZonesChanged(e){return!0}onLinesInserted(e){return!0}_getZoneOrdinal(e){return"undefined"!==typeof e.afterColumn?e.afterColumn:1e4}_computeWhitespaceProps(e){if(0===e.afterLineNumber)return{afterViewLineNumber:0,heightInPx:this._heightInPixels(e),minWidthInPx:this._minWidthInPixels(e)};let t,i;if("undefined"!==typeof e.afterColumn)t=this._context.model.validateModelPosition({lineNumber:e.afterLineNumber,column:e.afterColumn});else{const i=this._context.model.validateModelPosition({lineNumber:e.afterLineNumber,column:1}).lineNumber;t=new Qt(i,this._context.model.getModelLineMaxColumn(i))}i=t.column===this._context.model.getModelLineMaxColumn(t.lineNumber)?this._context.model.validateModelPosition({lineNumber:t.lineNumber+1,column:1}):this._context.model.validateModelPosition({lineNumber:t.lineNumber,column:t.column+1});const n=this._context.model.coordinatesConverter.convertModelPositionToViewPosition(t),o=this._context.model.coordinatesConverter.modelPositionIsVisible(i);return{afterViewLineNumber:n.lineNumber,heightInPx:o?this._heightInPixels(e):0,minWidthInPx:this._minWidthInPixels(e)}}changeViewZones(e){let t=!1;return this._context.model.changeWhitespace(i=>{const n={addZone:e=>(t=!0,this._addZone(i,e)),removeZone:e=>{e&&(t=this._removeZone(i,e)||t)},layoutZone:e=>{e&&(t=this._layoutZone(i,e)||t)}};Ax(e,n),n.addZone=Ix,n.removeZone=Ix,n.layoutZone=Ix}),t}_addZone(e,t){const i=this._computeWhitespaceProps(t),n=e.insertWhitespace(i.afterViewLineNumber,this._getZoneOrdinal(t),i.heightInPx,i.minWidthInPx),o={whitespaceId:n,delegate:t,isVisible:!1,domNode:km(t.domNode),marginDomNode:t.marginDomNode?km(t.marginDomNode):null};return this._safeCallOnComputedHeight(o.delegate,i.heightInPx),o.domNode.setPosition("absolute"),o.domNode.domNode.style.width="100%",o.domNode.setDisplay("none"),o.domNode.setAttribute("monaco-view-zone",o.whitespaceId),this.domNode.appendChild(o.domNode),o.marginDomNode&&(o.marginDomNode.setPosition("absolute"),o.marginDomNode.domNode.style.width="100%",o.marginDomNode.setDisplay("none"),o.marginDomNode.setAttribute("monaco-view-zone",o.whitespaceId),this.marginDomNode.appendChild(o.marginDomNode)),this._zones[o.whitespaceId]=o,this.setShouldRender(),o.whitespaceId}_removeZone(e,t){if(this._zones.hasOwnProperty(t)){const i=this._zones[t];return delete this._zones[t],e.removeWhitespace(i.whitespaceId),i.domNode.removeAttribute("monaco-visible-view-zone"),i.domNode.removeAttribute("monaco-view-zone"),i.domNode.domNode.parentNode.removeChild(i.domNode.domNode),i.marginDomNode&&(i.marginDomNode.removeAttribute("monaco-visible-view-zone"),i.marginDomNode.removeAttribute("monaco-view-zone"),i.marginDomNode.domNode.parentNode.removeChild(i.marginDomNode.domNode)),this.setShouldRender(),!0}return!1}_layoutZone(e,t){if(this._zones.hasOwnProperty(t)){const i=this._zones[t],n=this._computeWhitespaceProps(i.delegate);return e.changeOneWhitespace(i.whitespaceId,n.afterViewLineNumber,n.heightInPx),this._safeCallOnComputedHeight(i.delegate,n.heightInPx),this.setShouldRender(),!0}return!1}shouldSuppressMouseDownOnViewZone(e){if(this._zones.hasOwnProperty(e)){const t=this._zones[e];return Boolean(t.delegate.suppressMouseDown)}return!1}_heightInPixels(e){return"number"===typeof e.heightInPx?e.heightInPx:"number"===typeof e.heightInLines?this._lineHeight*e.heightInLines:this._lineHeight}_minWidthInPixels(e){return"number"===typeof e.minWidthInPx?e.minWidthInPx:0}_safeCallOnComputedHeight(e,t){if("function"===typeof e.onComputedHeight)try{e.onComputedHeight(t)}catch(i){me(i)}}_safeCallOnDomNodeTop(e,t){if("function"===typeof e.onDomNodeTop)try{e.onDomNodeTop(t)}catch(i){me(i)}}prepareRender(e){}render(e){const t=e.viewportData.whitespaceViewportData,i={};let n=!1;for(let r=0,s=t.length;r<s;r++)i[t[r].id]=t[r],n=!0;const o=Object.keys(this._zones);for(let r=0,s=o.length;r<s;r++){const t=o[r],n=this._zones[t];let s=0,a=0,l="none";i.hasOwnProperty(t)?(s=i[t].verticalOffset-e.bigNumbersDelta,a=i[t].height,l="block",n.isVisible||(n.domNode.setAttribute("monaco-visible-view-zone","true"),n.isVisible=!0),this._safeCallOnDomNodeTop(n.delegate,e.getScrolledTopFromAbsoluteTop(i[t].verticalOffset))):(n.isVisible&&(n.domNode.removeAttribute("monaco-visible-view-zone"),n.isVisible=!1),this._safeCallOnDomNodeTop(n.delegate,e.getScrolledTopFromAbsoluteTop(-1e6))),n.domNode.setTop(s),n.domNode.setHeight(a),n.domNode.setDisplay(l),n.marginDomNode&&(n.marginDomNode.setTop(s),n.marginDomNode.setHeight(a),n.marginDomNode.setDisplay(l))}n&&(this.domNode.setWidth(Math.max(e.scrollWidth,this._contentWidth)),this.marginDomNode.setWidth(this._contentLeft))}}function Ax(e,t){try{return e(t)}catch(i){me(i)}}class Rx{constructor(e){this._theme=e}get type(){return this._theme.type}update(e){this._theme=e}getColor(e){return this._theme.getColor(e)}}class Px{constructor(e,t,i){this.configuration=e,this.theme=new Rx(t),this.model=i,this.viewLayout=i.viewLayout}addEventHandler(e){this.model.addViewEventHandler(e)}removeEventHandler(e){this.model.removeViewEventHandler(e)}}class Fx{constructor(e,t,i,n){this.selections=e,this.startLineNumber=0|t.startLineNumber,this.endLineNumber=0|t.endLineNumber,this.relativeVerticalOffset=t.relativeVerticalOffset,this.bigNumbersDelta=0|t.bigNumbersDelta,this.whitespaceViewportData=i,this._model=n,this.visibleRange=new Jt(t.startLineNumber,this._model.getLineMinColumn(t.startLineNumber),t.endLineNumber,this._model.getLineMaxColumn(t.endLineNumber))}getViewLineRenderingData(e){return this._model.getViewLineRenderingData(this.visibleRange,e)}getDecorationsInViewport(){return this._model.getDecorationsInViewport(this.visibleRange)}}class Wx extends Um{constructor(e,t,i,n,o,r){super(),this._selections=[new ei(1,1,1,1)],this._renderAnimationFrame=null;const s=new Vy(t,n,o,e);this._context=new Px(t,i.getColorTheme(),n),this._context.addEventHandler(this),this._register(i.onDidColorThemeChange(e=>{this._context.theme.update(e),this._context.model.onDidColorThemeChange(),this.render(!0,!1)})),this._viewParts=[],this._textAreaHandler=new sy(this._context,s,this._createTextAreaHandlerHelper()),this._viewParts.push(this._textAreaHandler),this._linesContent=km(document.createElement("div")),this._linesContent.setClassName("lines-content monaco-editor-background"),this._linesContent.setPosition("absolute"),this.domNode=km(document.createElement("div")),this.domNode.setClassName(this._getEditorClassName()),this.domNode.setAttribute("role","code"),this._overflowGuardContainer=km(document.createElement("div")),Km.write(this._overflowGuardContainer,3),this._overflowGuardContainer.setClassName("overflow-guard"),this._scrollbar=new PS(this._context,this._linesContent,this.domNode,this._overflowGuardContainer),this._viewParts.push(this._scrollbar),this._viewLines=new jS(this._context,this._linesContent),this._viewZones=new Ox(this._context),this._viewParts.push(this._viewZones);const a=new mx(this._context);this._viewParts.push(a);const l=new Cx(this._context);this._viewParts.push(l);const c=new Gy(this._context);this._viewParts.push(c),c.addDynamicOverlay(new tS(this._context)),c.addDynamicOverlay(new Ex(this._context)),c.addDynamicOverlay(new VS(this._context)),c.addDynamicOverlay(new nS(this._context));const h=new Yy(this._context);this._viewParts.push(h),h.addDynamicOverlay(new iS(this._context)),h.addDynamicOverlay(new BS(this._context)),h.addDynamicOverlay(new qS(this._context)),h.addDynamicOverlay(new KS(this._context)),h.addDynamicOverlay(new ty(this._context));const d=new iy(this._context);d.getDomNode().appendChild(this._viewZones.marginDomNode),d.getDomNode().appendChild(h.getDomNode()),this._viewParts.push(d),this._contentWidgets=new Zy(this._context,this.domNode),this._viewParts.push(this._contentWidgets),this._viewCursors=new Mx(this._context),this._viewParts.push(this._viewCursors),this._overlayWidgets=new gx(this._context),this._viewParts.push(this._overlayWidgets);const u=new wx(this._context);this._viewParts.push(u);const g=new dx(this._context);if(this._viewParts.push(g),a){const e=this._scrollbar.getOverviewRulerLayoutInfo();e.parent.insertBefore(a.getDomNode(),e.insertBefore)}this._linesContent.appendChild(c.getDomNode()),this._linesContent.appendChild(u.domNode),this._linesContent.appendChild(this._viewZones.domNode),this._linesContent.appendChild(this._viewLines.getDomNode()),this._linesContent.appendChild(this._contentWidgets.domNode),this._linesContent.appendChild(this._viewCursors.getDomNode()),this._overflowGuardContainer.appendChild(d.getDomNode()),this._overflowGuardContainer.appendChild(this._scrollbar.getDomNode()),this._overflowGuardContainer.appendChild(l.getDomNode()),this._overflowGuardContainer.appendChild(this._textAreaHandler.textArea),this._overflowGuardContainer.appendChild(this._textAreaHandler.textAreaCover),this._overflowGuardContainer.appendChild(this._overlayWidgets.getDomNode()),this._overflowGuardContainer.appendChild(g.getDomNode()),this.domNode.appendChild(this._overflowGuardContainer),r?r.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode.domNode):this.domNode.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode),this._applyLayout(),this._pointerHandler=this._register(new Nv(this._context,s,this._createPointerHandlerHelper()))}_flushAccumulatedAndRenderNow(){this._renderNow()}_createPointerHandlerHelper(){return{viewDomNode:this.domNode.domNode,linesContentDomNode:this._linesContent.domNode,focusTextArea:()=>{this.focus()},getLastRenderData:()=>{const e=this._viewCursors.getLastRenderData()||[],t=this._textAreaHandler.getLastRenderData();return new hv(e,t)},shouldSuppressMouseDownOnViewZone:e=>this._viewZones.shouldSuppressMouseDownOnViewZone(e),shouldSuppressMouseDownOnWidget:e=>this._contentWidgets.shouldSuppressMouseDownOnWidget(e),getPositionFromDOMInfo:(e,t)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getPositionFromDOMInfo(e,t)),visibleRangeForPosition:(e,t)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(new Qt(e,t))),getLineWidth:e=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getLineWidth(e))}}_createTextAreaHandlerHelper(){return{visibleRangeForPositionRelativeToEditor:(e,t)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(new Qt(e,t)))}}_applyLayout(){const e=this._context.configuration.options,t=e.get(117);this.domNode.setWidth(t.width),this.domNode.setHeight(t.height),this._overflowGuardContainer.setWidth(t.width),this._overflowGuardContainer.setHeight(t.height),this._linesContent.setWidth(1e6),this._linesContent.setHeight(1e6)}_getEditorClassName(){const e=this._textAreaHandler.isFocused()?" focused":"";return this._context.configuration.options.get(114)+" "+rp(this._context.theme.type)+e}handleEvents(e){super.handleEvents(e),this._scheduleRender()}onConfigurationChanged(e){return this.domNode.setClassName(this._getEditorClassName()),this._applyLayout(),!1}onCursorStateChanged(e){return this._selections=e.selections,!1}onFocusChanged(e){return this.domNode.setClassName(this._getEditorClassName()),!1}onThemeChanged(e){return this.domNode.setClassName(this._getEditorClassName()),!1}dispose(){null!==this._renderAnimationFrame&&(this._renderAnimationFrame.dispose(),this._renderAnimationFrame=null),this._contentWidgets.overflowingContentWidgetsDomNode.domNode.remove(),this._context.removeEventHandler(this),this._viewLines.dispose();for(let e=0,t=this._viewParts.length;e<t;e++)this._viewParts[e].dispose();super.dispose()}_scheduleRender(){null===this._renderAnimationFrame&&(this._renderAnimationFrame=_o(this._onRenderScheduled.bind(this),100))}_onRenderScheduled(){this._renderAnimationFrame=null,this._flushAccumulatedAndRenderNow()}_renderNow(){Bx(()=>this._actualRender())}_getViewPartsToRender(){let e=[],t=0;for(let i=0,n=this._viewParts.length;i<n;i++){const n=this._viewParts[i];n.shouldRender()&&(e[t++]=n)}return e}_actualRender(){if(!to(this.domNode.domNode))return;let e=this._getViewPartsToRender();if(!this._viewLines.shouldRender()&&0===e.length)return;const t=this._context.viewLayout.getLinesViewportData();this._context.model.setViewport(t.startLineNumber,t.endLineNumber,t.centeredLineNumber);const i=new Fx(this._selections,t,this._context.viewLayout.getWhitespaceViewportData(),this._context.model);this._contentWidgets.shouldRender()&&this._contentWidgets.onBeforeRender(i),this._viewLines.shouldRender()&&(this._viewLines.renderText(i),this._viewLines.onDidRender(),e=this._getViewPartsToRender());const n=new $m(this._context.viewLayout,i,this._viewLines);for(let o=0,r=e.length;o<r;o++){const t=e[o];t.prepareRender(n)}for(let o=0,r=e.length;o<r;o++){const t=e[o];t.render(n),t.onDidRender()}}delegateVerticalScrollbarMouseDown(e){this._scrollbar.delegateVerticalScrollbarMouseDown(e)}restoreState(e){this._context.model.setScrollPosition({scrollTop:e.scrollTop},1),this._context.model.tokenizeViewport(),this._renderNow(),this._viewLines.updateLineWidths(),this._context.model.setScrollPosition({scrollLeft:e.scrollLeft},1)}getOffsetForColumn(e,t){const i=this._context.model.validateModelPosition({lineNumber:e,column:t}),n=this._context.model.coordinatesConverter.convertModelPositionToViewPosition(i);this._flushAccumulatedAndRenderNow();const o=this._viewLines.visibleRangeForPosition(new Qt(n.lineNumber,n.column));return o?o.left:-1}getTargetAtClientPoint(e,t){const i=this._pointerHandler.getTargetAtClientPoint(e,t);return i?Hy.convertViewToModelMouseTarget(i,this._context.model.coordinatesConverter):null}createOverviewRuler(e){return new vx(this._context,e)}change(e){this._viewZones.changeViewZones(e),this._scheduleRender()}render(e,t){if(t){this._viewLines.forceShouldRender();for(let e=0,t=this._viewParts.length;e<t;e++){const t=this._viewParts[e];t.forceShouldRender()}}e?this._flushAccumulatedAndRenderNow():this._scheduleRender()}focus(){this._textAreaHandler.focusTextArea()}isFocused(){return this._textAreaHandler.isFocused()}setAriaOptions(e){this._textAreaHandler.setAriaOptions(e)}addContentWidget(e){this._contentWidgets.addWidget(e.widget),this.layoutContentWidget(e),this._scheduleRender()}layoutContentWidget(e){let t=e.position&&e.position.range||null;if(null===t){const i=e.position?e.position.position:null;null!==i&&(t=new Jt(i.lineNumber,i.column,i.lineNumber,i.column))}const i=e.position?e.position.preference:null;this._contentWidgets.setWidgetPosition(e.widget,t,i),this._scheduleRender()}removeContentWidget(e){this._contentWidgets.removeWidget(e.widget),this._scheduleRender()}addOverlayWidget(e){this._overlayWidgets.addWidget(e.widget),this.layoutOverlayWidget(e),this._scheduleRender()}layoutOverlayWidget(e){const t=e.position?e.position.preference:null,i=this._overlayWidgets.setWidgetPosition(e.widget,t);i&&this._scheduleRender()}removeOverlayWidget(e){this._overlayWidgets.removeWidget(e.widget),this._scheduleRender()}}function Bx(e){try{return e()}catch(t){me(t)}}class Vx{constructor(e){this._selTrackedRange=null,this._trackSelection=!0,this._setState(e,new iv(new Jt(1,1,1,1),0,new Qt(1,1),0),new iv(new Jt(1,1,1,1),0,new Qt(1,1),0))}dispose(e){this._removeTrackedRange(e)}startTrackingSelection(e){this._trackSelection=!0,this._updateTrackedRange(e)}stopTrackingSelection(e){this._trackSelection=!1,this._removeTrackedRange(e)}_updateTrackedRange(e){this._trackSelection&&(this._selTrackedRange=e.model._setTrackedRange(this._selTrackedRange,this.modelState.selection,0))}_removeTrackedRange(e){this._selTrackedRange=e.model._setTrackedRange(this._selTrackedRange,null,0)}asCursorState(){return new sv(this.modelState,this.viewState)}readSelectionFromMarkers(e){const t=e.model._getTrackedRange(this._selTrackedRange);return 0===this.modelState.selection.getDirection()?new ei(t.startLineNumber,t.startColumn,t.endLineNumber,t.endColumn):new ei(t.endLineNumber,t.endColumn,t.startLineNumber,t.startColumn)}ensureValidState(e){this._setState(e,this.modelState,this.viewState)}setState(e,t,i){this._setState(e,t,i)}_setState(e,t,i){if(t){const i=e.model.validateRange(t.selectionStart),n=t.selectionStart.equalsRange(i)?t.selectionStartLeftoverVisibleColumns:0,o=e.model.validatePosition(t.position),r=t.position.equals(o)?t.leftoverVisibleColumns:0;t=new iv(i,n,o,r)}else{if(!i)return;const n=e.model.validateRange(e.coordinatesConverter.convertViewRangeToModelRange(i.selectionStart)),o=e.model.validatePosition(e.coordinatesConverter.convertViewPositionToModelPosition(i.position));t=new iv(n,i.selectionStartLeftoverVisibleColumns,o,i.leftoverVisibleColumns)}if(i){const n=e.coordinatesConverter.validateViewRange(i.selectionStart,t.selectionStart),o=e.coordinatesConverter.validateViewPosition(i.position,t.position);i=new iv(n,t.selectionStartLeftoverVisibleColumns,o,t.leftoverVisibleColumns)}else{const n=e.coordinatesConverter.convertModelPositionToViewPosition(new Qt(t.selectionStart.startLineNumber,t.selectionStart.startColumn)),o=e.coordinatesConverter.convertModelPositionToViewPosition(new Qt(t.selectionStart.endLineNumber,t.selectionStart.endColumn)),r=new Jt(n.lineNumber,n.column,o.lineNumber,o.column),s=e.coordinatesConverter.convertModelPositionToViewPosition(t.position);i=new iv(r,t.selectionStartLeftoverVisibleColumns,s,t.leftoverVisibleColumns)}this.modelState=t,this.viewState=i,this._updateTrackedRange(e)}}class Hx{constructor(e){this.context=e,this.primaryCursor=new Vx(e),this.secondaryCursors=[],this.lastAddedCursorIndex=0}dispose(){this.primaryCursor.dispose(this.context),this.killSecondaryCursors()}startTrackingSelections(){this.primaryCursor.startTrackingSelection(this.context);for(let e=0,t=this.secondaryCursors.length;e<t;e++)this.secondaryCursors[e].startTrackingSelection(this.context)}stopTrackingSelections(){this.primaryCursor.stopTrackingSelection(this.context);for(let e=0,t=this.secondaryCursors.length;e<t;e++)this.secondaryCursors[e].stopTrackingSelection(this.context)}updateContext(e){this.context=e}ensureValidState(){this.primaryCursor.ensureValidState(this.context);for(let e=0,t=this.secondaryCursors.length;e<t;e++)this.secondaryCursors[e].ensureValidState(this.context)}readSelectionFromMarkers(){let e=[];e[0]=this.primaryCursor.readSelectionFromMarkers(this.context);for(let t=0,i=this.secondaryCursors.length;t<i;t++)e[t+1]=this.secondaryCursors[t].readSelectionFromMarkers(this.context);return e}getAll(){let e=[];e[0]=this.primaryCursor.asCursorState();for(let t=0,i=this.secondaryCursors.length;t<i;t++)e[t+1]=this.secondaryCursors[t].asCursorState();return e}getViewPositions(){let e=[];e[0]=this.primaryCursor.viewState.position;for(let t=0,i=this.secondaryCursors.length;t<i;t++)e[t+1]=this.secondaryCursors[t].viewState.position;return e}getTopMostViewPosition(){let e=this.primaryCursor.viewState.position;for(let t=0,i=this.secondaryCursors.length;t<i;t++){const i=this.secondaryCursors[t].viewState.position;i.isBefore(e)&&(e=i)}return e}getBottomMostViewPosition(){let e=this.primaryCursor.viewState.position;for(let t=0,i=this.secondaryCursors.length;t<i;t++){const i=this.secondaryCursors[t].viewState.position;e.isBeforeOrEqual(i)&&(e=i)}return e}getSelections(){let e=[];e[0]=this.primaryCursor.modelState.selection;for(let t=0,i=this.secondaryCursors.length;t<i;t++)e[t+1]=this.secondaryCursors[t].modelState.selection;return e}getViewSelections(){let e=[];e[0]=this.primaryCursor.viewState.selection;for(let t=0,i=this.secondaryCursors.length;t<i;t++)e[t+1]=this.secondaryCursors[t].viewState.selection;return e}setSelections(e){this.setStates(sv.fromModelSelections(e))}getPrimaryCursor(){return this.primaryCursor.asCursorState()}setStates(e){null!==e&&(this.primaryCursor.setState(this.context,e[0].modelState,e[0].viewState),this._setSecondaryStates(e.slice(1)))}_setSecondaryStates(e){const t=this.secondaryCursors.length,i=e.length;if(t<i){let e=i-t;for(let t=0;t<e;t++)this._addSecondaryCursor()}else if(t>i){let e=t-i;for(let t=0;t<e;t++)this._removeSecondaryCursor(this.secondaryCursors.length-1)}for(let n=0;n<i;n++)this.secondaryCursors[n].setState(this.context,e[n].modelState,e[n].viewState)}killSecondaryCursors(){this._setSecondaryStates([])}_addSecondaryCursor(){this.secondaryCursors.push(new Vx(this.context)),this.lastAddedCursorIndex=this.secondaryCursors.length}getLastAddedCursorIndex(){return 0===this.secondaryCursors.length||0===this.lastAddedCursorIndex?0:this.lastAddedCursorIndex}_removeSecondaryCursor(e){this.lastAddedCursorIndex>=e+1&&this.lastAddedCursorIndex--,this.secondaryCursors[e].dispose(this.context),this.secondaryCursors.splice(e,1)}_getAll(){let e=[];e[0]=this.primaryCursor;for(let t=0,i=this.secondaryCursors.length;t<i;t++)e[t+1]=this.secondaryCursors[t];return e}normalize(){if(0===this.secondaryCursors.length)return;let e=this._getAll(),t=[];for(let i=0,n=e.length;i<n;i++)t.push({index:i,selection:e[i].modelState.selection});t.sort((e,t)=>e.selection.startLineNumber===t.selection.startLineNumber?e.selection.startColumn-t.selection.startColumn:e.selection.startLineNumber-t.selection.startLineNumber);for(let i=0;i<t.length-1;i++){const n=t[i],o=t[i+1],r=n.selection,s=o.selection;if(!this.context.cursorConfig.multiCursorMergeOverlapping)continue;let a;if(a=s.isEmpty()||r.isEmpty()?s.getStartPosition().isBeforeOrEqual(r.getEndPosition()):s.getStartPosition().isBefore(r.getEndPosition()),a){const r=n.index<o.index?i:i+1,s=n.index<o.index?i+1:i,a=t[s].index,l=t[r].index,c=t[s].selection,h=t[r].selection;if(!c.equalsSelection(h)){const i=c.plusRange(h),n=c.selectionStartLineNumber===c.startLineNumber&&c.selectionStartColumn===c.startColumn,o=h.selectionStartLineNumber===h.startLineNumber&&h.selectionStartColumn===h.startColumn;let s,d;a===this.lastAddedCursorIndex?(s=n,this.lastAddedCursorIndex=l):s=o,d=s?new ei(i.startLineNumber,i.startColumn,i.endLineNumber,i.endColumn):new ei(i.endLineNumber,i.endColumn,i.startLineNumber,i.startColumn),t[r].selection=d;const u=sv.fromModelSelection(d);e[l].setState(this.context,u.modelState,u.viewState)}for(const e of t)e.index>a&&e.index--;e.splice(a,1),t.splice(s,1),this._removeSecondaryCursor(a-1),i--}}}}class zx{constructor(e){this.type=0,this._source=e}hasChanged(e){return this._source.hasChanged(e)}}class Ux{constructor(e,t){this.type=1,this.selections=e,this.modelSelections=t}}class jx{constructor(e){this.type=2,e?(this.affectsMinimap=e.affectsMinimap,this.affectsOverviewRuler=e.affectsOverviewRuler):(this.affectsMinimap=!0,this.affectsOverviewRuler=!0)}}class Kx{constructor(){this.type=3}}class qx{constructor(e){this.type=4,this.isFocused=e}}class $x{constructor(){this.type=5}}class Gx{constructor(){this.type=6}}class Yx{constructor(e,t){this.type=7,this.fromLineNumber=e,this.toLineNumber=t}}class Xx{constructor(e,t){this.type=8,this.fromLineNumber=e,this.toLineNumber=t}}class Zx{constructor(e,t){this.type=9,this.fromLineNumber=e,this.toLineNumber=t}}class Qx{constructor(e,t,i,n,o,r){this.type=10,this.source=e,this.range=t,this.selections=i,this.verticalType=n,this.revealHorizontal=o,this.scrollType=r}}class Jx{constructor(e){this.type=11,this.scrollWidth=e.scrollWidth,this.scrollLeft=e.scrollLeft,this.scrollHeight=e.scrollHeight,this.scrollTop=e.scrollTop,this.scrollWidthChanged=e.scrollWidthChanged,this.scrollLeftChanged=e.scrollLeftChanged,this.scrollHeightChanged=e.scrollHeightChanged,this.scrollTopChanged=e.scrollTopChanged}}class eL{constructor(){this.type=12}}class tL{constructor(e){this.type=13,this.ranges=e}}class iL{constructor(){this.type=14}}class nL{constructor(){this.type=15}}class oL extends Oe{constructor(){super(),this._onEvent=this._register(new Ve),this.onEvent=this._onEvent.event,this._eventHandlers=[],this._viewEventQueue=null,this._isConsumingViewEventQueue=!1,this._collector=null,this._collectorCnt=0,this._outgoingEvents=[]}emitOutgoingEvent(e){this._addOutgoingEvent(e),this._emitOugoingEvents()}_addOutgoingEvent(e){for(let t=0,i=this._outgoingEvents.length;t<i;t++)if(this._outgoingEvents[t].kind===e.kind)return void(this._outgoingEvents[t]=this._outgoingEvents[t].merge(e));this._outgoingEvents.push(e)}_emitOugoingEvents(){while(this._outgoingEvents.length>0){if(this._collector||this._isConsumingViewEventQueue)return;const e=this._outgoingEvents.shift();e.isNoOp()||this._onEvent.fire(e)}}addViewEventHandler(e){for(let t=0,i=this._eventHandlers.length;t<i;t++)this._eventHandlers[t]===e&&console.warn("Detected duplicate listener in ViewEventDispatcher",e);this._eventHandlers.push(e)}removeViewEventHandler(e){for(let t=0;t<this._eventHandlers.length;t++)if(this._eventHandlers[t]===e){this._eventHandlers.splice(t,1);break}}beginEmitViewEvents(){return this._collectorCnt++,1===this._collectorCnt&&(this._collector=new rL),this._collector}endEmitViewEvents(){if(this._collectorCnt--,0===this._collectorCnt){const e=this._collector.outgoingEvents,t=this._collector.viewEvents;this._collector=null;for(const i of e)this._addOutgoingEvent(i);t.length>0&&this._emitMany(t)}this._emitOugoingEvents()}emitSingleViewEvent(e){try{const t=this.beginEmitViewEvents();t.emitViewEvent(e)}finally{this.endEmitViewEvents()}}_emitMany(e){this._viewEventQueue?this._viewEventQueue=this._viewEventQueue.concat(e):this._viewEventQueue=e,this._isConsumingViewEventQueue||this._consumeViewEventQueue()}_consumeViewEventQueue(){try{this._isConsumingViewEventQueue=!0,this._doConsumeQueue()}finally{this._isConsumingViewEventQueue=!1}}_doConsumeQueue(){while(this._viewEventQueue){const e=this._viewEventQueue;this._viewEventQueue=null;const t=this._eventHandlers.slice(0);for(const i of t)i.handleEvents(e)}}}class rL{constructor(){this.viewEvents=[],this.outgoingEvents=[]}emitViewEvent(e){this.viewEvents.push(e)}emitOutgoingEvent(e){this.outgoingEvents.push(e)}}class sL{constructor(e,t,i,n){this.kind=0,this._oldContentWidth=e,this._oldContentHeight=t,this.contentWidth=i,this.contentHeight=n,this.contentWidthChanged=this._oldContentWidth!==this.contentWidth,this.contentHeightChanged=this._oldContentHeight!==this.contentHeight}isNoOp(){return!this.contentWidthChanged&&!this.contentHeightChanged}merge(e){return 0!==e.kind?this:new sL(this._oldContentWidth,this._oldContentHeight,e.contentWidth,e.contentHeight)}}class aL{constructor(e,t){this.kind=1,this.oldHasFocus=e,this.hasFocus=t}isNoOp(){return this.oldHasFocus===this.hasFocus}merge(e){return 1!==e.kind?this:new aL(this.oldHasFocus,e.hasFocus)}}class lL{constructor(e,t,i,n,o,r,s,a){this.kind=2,this._oldScrollWidth=e,this._oldScrollLeft=t,this._oldScrollHeight=i,this._oldScrollTop=n,this.scrollWidth=o,this.scrollLeft=r,this.scrollHeight=s,this.scrollTop=a,this.scrollWidthChanged=this._oldScrollWidth!==this.scrollWidth,this.scrollLeftChanged=this._oldScrollLeft!==this.scrollLeft,this.scrollHeightChanged=this._oldScrollHeight!==this.scrollHeight,this.scrollTopChanged=this._oldScrollTop!==this.scrollTop}isNoOp(){return!this.scrollWidthChanged&&!this.scrollLeftChanged&&!this.scrollHeightChanged&&!this.scrollTopChanged}merge(e){return 2!==e.kind?this:new lL(this._oldScrollWidth,this._oldScrollLeft,this._oldScrollHeight,this._oldScrollTop,e.scrollWidth,e.scrollLeft,e.scrollHeight,e.scrollTop)}}class cL{constructor(){this.kind=3}isNoOp(){return!1}merge(e){return this}}class hL{constructor(e,t,i,n,o,r,s){this.kind=5,this.oldSelections=e,this.selections=t,this.oldModelVersionId=i,this.modelVersionId=n,this.source=o,this.reason=r,this.reachedMaxCursorCount=s}static _selectionsAreEqual(e,t){if(!e&&!t)return!0;if(!e||!t)return!1;const i=e.length,n=t.length;if(i!==n)return!1;for(let o=0;o<i;o++)if(!e[o].equalsSelection(t[o]))return!1;return!0}isNoOp(){return hL._selectionsAreEqual(this.oldSelections,this.selections)&&this.oldModelVersionId===this.modelVersionId}merge(e){return 5!==e.kind?this:new hL(this.oldSelections,e.selections,this.oldModelVersionId,e.modelVersionId,e.source,e.reason,this.reachedMaxCursorCount||e.reachedMaxCursorCount)}}class dL{constructor(){this.kind=4}isNoOp(){return!1}merge(e){return this}}class uL{constructor(e,t){this.modelVersionId=e.getVersionId(),this.cursorState=t.getCursorStates()}equals(e){if(!e)return!1;if(this.modelVersionId!==e.modelVersionId)return!1;if(this.cursorState.length!==e.cursorState.length)return!1;for(let t=0,i=this.cursorState.length;t<i;t++)if(!this.cursorState[t].equals(e.cursorState[t]))return!1;return!0}}class gL{constructor(e,t,i){this._model=e,this._autoClosedCharactersDecorations=t,this._autoClosedEnclosingDecorations=i}static getAllAutoClosedCharacters(e){let t=[];for(const i of e)t=t.concat(i.getAutoClosedCharactersRanges());return t}dispose(){this._autoClosedCharactersDecorations=this._model.deltaDecorations(this._autoClosedCharactersDecorations,[]),this._autoClosedEnclosingDecorations=this._model.deltaDecorations(this._autoClosedEnclosingDecorations,[])}getAutoClosedCharactersRanges(){let e=[];for(let t=0;t<this._autoClosedCharactersDecorations.length;t++){const i=this._model.getDecorationRange(this._autoClosedCharactersDecorations[t]);i&&e.push(i)}return e}isValid(e){let t=[];for(let i=0;i<this._autoClosedEnclosingDecorations.length;i++){const e=this._model.getDecorationRange(this._autoClosedEnclosingDecorations[i]);if(e&&(t.push(e),e.startLineNumber!==e.endLineNumber))return!1}t.sort(Jt.compareRangesUsingStarts),e.sort(Jt.compareRangesUsingStarts);for(let i=0;i<e.length;i++){if(i>=t.length)return!1;if(!t[i].strictContainsRange(e[i]))return!1}return!0}}class fL extends Oe{constructor(e,t,i,n){super(),this._model=e,this._knownModelVersionId=this._model.getVersionId(),this._viewModel=t,this._coordinatesConverter=i,this.context=new nv(this._model,this._coordinatesConverter,n),this._cursors=new Hx(this.context),this._hasFocus=!1,this._isHandling=!1,this._isDoingComposition=!1,this._selectionsWhenCompositionStarted=null,this._columnSelectData=null,this._autoClosedActions=[],this._prevEditOperationType=0}dispose(){this._cursors.dispose(),this._autoClosedActions=Ne(this._autoClosedActions),super.dispose()}updateConfiguration(e){this.context=new nv(this._model,this._coordinatesConverter,e),this._cursors.updateContext(this.context)}onLineMappingChanged(e){this._knownModelVersionId===this._model.getVersionId()&&this.setStates(e,"viewModel",0,this.getCursorStates())}setHasFocus(e){this._hasFocus=e}_validateAutoClosedActions(){if(this._autoClosedActions.length>0){let e=this._cursors.getSelections();for(let t=0;t<this._autoClosedActions.length;t++){const i=this._autoClosedActions[t];i.isValid(e)||(i.dispose(),this._autoClosedActions.splice(t,1),t--)}}}getPrimaryCursorState(){return this._cursors.getPrimaryCursor()}getLastAddedCursorIndex(){return this._cursors.getLastAddedCursorIndex()}getCursorStates(){return this._cursors.getAll()}setStates(e,t,i,n){let o=!1;null!==n&&n.length>fL.MAX_CURSOR_COUNT&&(n=n.slice(0,fL.MAX_CURSOR_COUNT),o=!0);const r=new uL(this._model,this);return this._cursors.setStates(n),this._cursors.normalize(),this._columnSelectData=null,this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(e,t,i,r,o)}setCursorColumnSelectData(e){this._columnSelectData=e}revealPrimary(e,t,i,n){const o=this._cursors.getViewPositions();if(o.length>1)this._emitCursorRevealRange(e,t,null,this._cursors.getViewSelections(),0,i,n);else{const r=o[0],s=new Jt(r.lineNumber,r.column,r.lineNumber,r.column);this._emitCursorRevealRange(e,t,s,null,0,i,n)}}_revealPrimaryCursor(e,t,i,n,o){const r=this._cursors.getViewPositions();if(r.length>1)this._emitCursorRevealRange(e,t,null,this._cursors.getViewSelections(),i,n,o);else{const s=r[0],a=new Jt(s.lineNumber,s.column,s.lineNumber,s.column);this._emitCursorRevealRange(e,t,a,null,i,n,o)}}_emitCursorRevealRange(e,t,i,n,o,r,s){e.emitViewEvent(new Qx(t,i,n,o,r,s))}saveState(){let e=[];const t=this._cursors.getSelections();for(let i=0,n=t.length;i<n;i++){const n=t[i];e.push({inSelectionMode:!n.isEmpty(),selectionStart:{lineNumber:n.selectionStartLineNumber,column:n.selectionStartColumn},position:{lineNumber:n.positionLineNumber,column:n.positionColumn}})}return e}restoreState(e,t){let i=[];for(let n=0,o=t.length;n<o;n++){const e=t[n];let o=1,r=1;e.position&&e.position.lineNumber&&(o=e.position.lineNumber),e.position&&e.position.column&&(r=e.position.column);let s=o,a=r;e.selectionStart&&e.selectionStart.lineNumber&&(s=e.selectionStart.lineNumber),e.selectionStart&&e.selectionStart.column&&(a=e.selectionStart.column),i.push({selectionStartLineNumber:s,selectionStartColumn:a,positionLineNumber:o,positionColumn:r})}this.setStates(e,"restoreState",0,sv.fromModelSelections(i)),this.revealPrimary(e,"restoreState",!0,1)}onModelContentChanged(e,t){if(this._knownModelVersionId=t.versionId,this._isHandling)return;const i=t.containsEvent(1);if(this._prevEditOperationType=0,i)this._cursors.dispose(),this._cursors=new Hx(this.context),this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(e,"model",1,null,!1);else if(this._hasFocus&&t.resultingSelection&&t.resultingSelection.length>0){const i=sv.fromModelSelections(t.resultingSelection);this.setStates(e,"modelChange",t.isUndoing?5:t.isRedoing?6:2,i)&&this._revealPrimaryCursor(e,"modelChange",0,!0,0)}else{const t=this._cursors.readSelectionFromMarkers();this.setStates(e,"modelChange",2,sv.fromModelSelections(t))}}getSelection(){return this._cursors.getPrimaryCursor().modelState.selection}getTopMostViewPosition(){return this._cursors.getTopMostViewPosition()}getBottomMostViewPosition(){return this._cursors.getBottomMostViewPosition()}getCursorColumnSelectData(){if(this._columnSelectData)return this._columnSelectData;const e=this._cursors.getPrimaryCursor(),t=e.viewState.selectionStart.getStartPosition(),i=e.viewState.position;return{isReal:!1,fromViewLineNumber:t.lineNumber,fromViewVisualColumn:lv.visibleColumnFromColumn2(this.context.cursorConfig,this._viewModel,t),toViewLineNumber:i.lineNumber,toViewVisualColumn:lv.visibleColumnFromColumn2(this.context.cursorConfig,this._viewModel,i)}}getSelections(){return this._cursors.getSelections()}setSelections(e,t,i){this.setStates(e,t,0,sv.fromModelSelections(i))}getPrevEditOperationType(){return this._prevEditOperationType}setPrevEditOperationType(e){this._prevEditOperationType=e}_pushAutoClosedAction(e,t){let i=[],n=[];for(let s=0,a=e.length;s<a;s++)i.push({range:e[s],options:{inlineClassName:"auto-closed-character",stickiness:1}}),n.push({range:t[s],options:{stickiness:1}});const o=this._model.deltaDecorations([],i),r=this._model.deltaDecorations([],n);this._autoClosedActions.push(new gL(this._model,o,r))}_executeEditOperation(e){if(!e)return;e.shouldPushStackElementBefore&&this._model.pushStackElement();const t=mL.executeCommands(this._model,this._cursors.getSelections(),e.commands);if(t){this._interpretCommandResult(t);let i=[],n=[];for(let t=0;t<e.commands.length;t++){const o=e.commands[t];o instanceof ky&&o.enclosingRange&&o.closeCharacterRange&&(i.push(o.closeCharacterRange),n.push(o.enclosingRange))}i.length>0&&this._pushAutoClosedAction(i,n),this._prevEditOperationType=e.type}e.shouldPushStackElementAfter&&this._model.pushStackElement()}_interpretCommandResult(e){e&&0!==e.length||(e=this._cursors.readSelectionFromMarkers()),this._columnSelectData=null,this._cursors.setSelections(e),this._cursors.normalize()}_emitStateChangedIfNecessary(e,t,i,n,o){const r=new uL(this._model,this);if(r.equals(n))return!1;const s=this._cursors.getSelections(),a=this._cursors.getViewSelections();if(e.emitViewEvent(new Ux(a,s)),!n||n.cursorState.length!==r.cursorState.length||r.cursorState.some((e,t)=>!e.modelState.equals(n.cursorState[t].modelState))){const a=n?n.cursorState.map(e=>e.modelState.selection):null,l=n?n.modelVersionId:0;e.emitOutgoingEvent(new hL(a,s,l,r.modelVersionId,t||"keyboard",i,o))}return!0}_findAutoClosingPairs(e){if(!e.length)return null;let t=[];for(let i=0,n=e.length;i<n;i++){const n=e[i];if(!n.text||n.text.indexOf("\n")>=0)return null;const o=n.text.match(/([)\]}>'"`])([^)\]}>'"`]*)$/);if(!o)return null;const r=o[1],s=this.context.cursorConfig.autoClosingPairsClose2.get(r);if(!s||1!==s.length)return null;const a=s[0].open,l=n.text.length-o[2].length-1,c=n.text.lastIndexOf(a,l-1);if(-1===c)return null;t.push([c,l])}return t}executeEdits(e,t,i,n){let o=null;"snippet"===t&&(o=this._findAutoClosingPairs(i)),o&&(i[0]._isTracked=!0);let r=[],s=[];const a=this._model.pushEditOperations(this.getSelections(),i,e=>{if(o)for(let i=0,n=o.length;i<n;i++){const[t,n]=o[i],a=e[i],l=a.range.startLineNumber,c=a.range.startColumn-1+t,h=a.range.startColumn-1+n;r.push(new Jt(l,h+1,l,h+2)),s.push(new Jt(l,c+1,l,h+2))}const t=n(e);return t&&(this._isHandling=!0),t});a&&(this._isHandling=!1,this.setSelections(e,t,a)),r.length>0&&this._pushAutoClosedAction(r,s)}_executeEdit(e,t,i,n=0){if(this.context.cursorConfig.readOnly)return;const o=new uL(this._model,this);this._cursors.stopTrackingSelections(),this._isHandling=!0;try{this._cursors.ensureValidState(),e()}catch(r){me(r)}this._isHandling=!1,this._cursors.startTrackingSelections(),this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(t,i,n,o,!1)&&this._revealPrimaryCursor(t,i,0,!0,0)}setIsDoingComposition(e){this._isDoingComposition=e}startComposition(e){this._selectionsWhenCompositionStarted=this.getSelections().slice(0)}endComposition(e,t){this._executeEdit(()=>{if("keyboard"===t){const e=gL.getAllAutoClosedCharacters(this._autoClosedActions);this._executeEditOperation(Ly.compositionEndWithInterceptors(this._prevEditOperationType,this.context.cursorConfig,this._model,this._selectionsWhenCompositionStarted,this.getSelections(),e)),this._selectionsWhenCompositionStarted=null}},e,t)}type(e,t,i){this._executeEdit(()=>{if("keyboard"===i){const e=t.length;let i=0;while(i<e){const e=yr["J"](t,i),n=t.substr(i,e),o=gL.getAllAutoClosedCharacters(this._autoClosedActions);this._executeEditOperation(Ly.typeWithInterceptors(this._isDoingComposition,this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),o,n)),i+=e}}else this._executeEditOperation(Ly.typeWithoutInterceptors(this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),t))},e,i)}replacePreviousChar(e,t,i,n){this._executeEdit(()=>{this._executeEditOperation(Ly.replacePreviousChar(this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),t,i))},e,n)}paste(e,t,i,n,o){this._executeEdit(()=>{this._executeEditOperation(Ly.paste(this.context.cursorConfig,this._model,this.getSelections(),t,i,n||[]))},e,o,4)}cut(e,t){this._executeEdit(()=>{this._executeEditOperation(_y.cut(this.context.cursorConfig,this._model,this.getSelections()))},e,t)}executeCommand(e,t,i){this._executeEdit(()=>{this._cursors.killSecondaryCursors(),this._executeEditOperation(new av(0,[t],{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))},e,i)}executeCommands(e,t,i){this._executeEdit(()=>{this._executeEditOperation(new av(0,t,{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))},e,i)}}fL.MAX_CURSOR_COUNT=1e4;class mL{static executeCommands(e,t,i){const n={model:e,selectionsBefore:t,trackedRanges:[],trackedRangesDirection:[]},o=this._innerExecuteCommands(n,i);for(let r=0,s=n.trackedRanges.length;r<s;r++)n.model._setTrackedRange(n.trackedRanges[r],null,0);return o}static _innerExecuteCommands(e,t){if(this._arrayIsEmpty(t))return null;const i=this._getEditOperations(e,t);if(0===i.operations.length)return null;const n=i.operations,o=this._getLoserCursorMap(n);if(o.hasOwnProperty("0"))return console.warn("Ignoring commands"),null;let r=[];for(let l=0,c=n.length;l<c;l++)o.hasOwnProperty(n[l].identifier.major.toString())||r.push(n[l]);i.hadTrackedEditOperation&&r.length>0&&(r[0]._isTracked=!0);let s=e.model.pushEditOperations(e.selectionsBefore,r,i=>{let n=[];for(let t=0;t<e.selectionsBefore.length;t++)n[t]=[];for(const e of i)e.identifier&&n[e.identifier.major].push(e);const o=(e,t)=>e.identifier.minor-t.identifier.minor;let r=[];for(let s=0;s<e.selectionsBefore.length;s++)n[s].length>0?(n[s].sort(o),r[s]=t[s].computeCursorState(e.model,{getInverseEditOperations:()=>n[s],getTrackedSelection:t=>{const i=parseInt(t,10),n=e.model._getTrackedRange(e.trackedRanges[i]);return 0===e.trackedRangesDirection[i]?new ei(n.startLineNumber,n.startColumn,n.endLineNumber,n.endColumn):new ei(n.endLineNumber,n.endColumn,n.startLineNumber,n.startColumn)}})):r[s]=e.selectionsBefore[s];return r});s||(s=e.selectionsBefore);let a=[];for(let l in o)o.hasOwnProperty(l)&&a.push(parseInt(l,10));a.sort((e,t)=>t-e);for(const l of a)s.splice(l,1);return s}static _arrayIsEmpty(e){for(let t=0,i=e.length;t<i;t++)if(e[t])return!1;return!0}static _getEditOperations(e,t){let i=[],n=!1;for(let o=0,r=t.length;o<r;o++){const r=t[o];if(r){const t=this._getEditOperationsFromCommand(e,o,r);i=i.concat(t.operations),n=n||t.hadTrackedEditOperation}}return{operations:i,hadTrackedEditOperation:n}}static _getEditOperationsFromCommand(e,t,i){let n=[],o=0;const r=(e,r,s=!1)=>{Jt.isEmpty(e)&&""===r||n.push({identifier:{major:t,minor:o++},range:e,text:r,forceMoveMarkers:s,isAutoWhitespaceEdit:i.insertsAutoWhitespace})};let s=!1;const a=(e,t,i)=>{s=!0,r(e,t,i)},l=(t,i)=>{const n=ei.liftSelection(t);let o;if(n.isEmpty())if("boolean"===typeof i)o=i?2:3;else{const t=e.model.getLineMaxColumn(n.startLineNumber);o=n.startColumn===t?2:3}else o=1;const r=e.trackedRanges.length,s=e.model._setTrackedRange(null,n,o);return e.trackedRanges[r]=s,e.trackedRangesDirection[r]=n.getDirection(),r.toString()},c={addEditOperation:r,addTrackedEditOperation:a,trackSelection:l};try{i.getEditOperations(e.model,c)}catch(h){return me(h),{operations:[],hadTrackedEditOperation:!1}}return{operations:n,hadTrackedEditOperation:s}}static _getLoserCursorMap(e){e=e.slice(0),e.sort((e,t)=>-Jt.compareRangesUsingEnds(e.range,t.range));let t={};for(let i=1;i<e.length;i++){const n=e[i-1],o=e[i];if(Jt.getStartPosition(n.range).isBefore(Jt.getEndPosition(o.range))){let r;r=n.identifier.major>o.identifier.major?n.identifier.major:o.identifier.major,t[r.toString()]=!0;for(let t=0;t<e.length;t++)e[t].identifier.major===r&&(e.splice(t,1),t<i&&i--,t--);i>0&&i--}}return t}}class pL{constructor(e,t,i,n,o,r){this.id=e,this.label=t,this.alias=i,this._precondition=n,this._run=o,this._contextKeyService=r}isSupported(){return this._contextKeyService.contextMatchesRules(this._precondition)}run(){return this.isSupported()?this._run():Promise.resolve(void 0)}}function _L(e,t,i,n,o,r,s){let a="<div>",l=n,c=0;for(let h=0,d=t.getCount();h<d;h++){const d=t.getEndOffset(h);if(d<=n)continue;let u="";for(;l<d&&l<o;l++){const t=e.charCodeAt(l);switch(t){case 9:let e=r-(l+c)%r;c+=e-1;while(e>0)u+=s?"&#160;":" ",e--;break;case 60:u+="&lt;";break;case 62:u+="&gt;";break;case 38:u+="&amp;";break;case 0:u+="&#00;";break;case 65279:case 8232:case 8233:case 133:u+="�";break;case 13:u+="&#8203";break;case 32:u+=s?"&#160;":" ";break;default:u+=String.fromCharCode(t)}}if(a+=`<span style="${t.getInlineStyle(h,i)}">${u}</span>`,d>o||l>=o)break}return a+="</div>",a}class bL{constructor(){this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[]}insert(e){this._hasPending=!0,this._inserts.push(e)}change(e){this._hasPending=!0,this._changes.push(e)}remove(e){this._hasPending=!0,this._removes.push(e)}mustCommit(){return this._hasPending}commit(e){if(!this._hasPending)return;const t=this._inserts,i=this._changes,n=this._removes;this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[],e._commitPendingChanges(t,i,n)}}class vL{constructor(e,t,i,n,o){this.id=e,this.afterLineNumber=t,this.ordinal=i,this.height=n,this.minWidth=o,this.prefixSum=0}}class wL{constructor(e,t,i,n){this._instanceId=yr["O"](++wL.INSTANCE_COUNT),this._pendingChanges=new bL,this._lastWhitespaceId=0,this._arr=[],this._prefixSumValidIndex=-1,this._minWidth=-1,this._lineCount=e,this._lineHeight=t,this._paddingTop=i,this._paddingBottom=n}static findInsertionIndex(e,t,i){let n=0,o=e.length;while(n<o){const r=n+o>>>1;t===e[r].afterLineNumber?i<e[r].ordinal?o=r:n=r+1:t<e[r].afterLineNumber?o=r:n=r+1}return n}setLineHeight(e){this._checkPendingChanges(),this._lineHeight=e}setPadding(e,t){this._paddingTop=e,this._paddingBottom=t}onFlushed(e){this._checkPendingChanges(),this._lineCount=e}changeWhitespace(e){let t=!1;try{const i={insertWhitespace:(e,i,n,o)=>{t=!0,e|=0,i|=0,n|=0,o|=0;const r=this._instanceId+ ++this._lastWhitespaceId;return this._pendingChanges.insert(new vL(r,e,i,n,o)),r},changeOneWhitespace:(e,i,n)=>{t=!0,i|=0,n|=0,this._pendingChanges.change({id:e,newAfterLineNumber:i,newHeight:n})},removeWhitespace:e=>{t=!0,this._pendingChanges.remove({id:e})}};e(i)}finally{this._pendingChanges.commit(this)}return t}_commitPendingChanges(e,t,i){if((e.length>0||i.length>0)&&(this._minWidth=-1),e.length+t.length+i.length<=1){for(const t of e)this._insertWhitespace(t);for(const e of t)this._changeOneWhitespace(e.id,e.newAfterLineNumber,e.newHeight);for(const e of i){const t=this._findWhitespaceIndex(e.id);-1!==t&&this._removeWhitespace(t)}return}const n=new Set;for(const a of i)n.add(a.id);const o=new Map;for(const a of t)o.set(a.id,a);const r=e=>{let t=[];for(const i of e)if(!n.has(i.id)){if(o.has(i.id)){const e=o.get(i.id);i.afterLineNumber=e.newAfterLineNumber,i.height=e.newHeight}t.push(i)}return t},s=r(this._arr).concat(r(e));s.sort((e,t)=>e.afterLineNumber===t.afterLineNumber?e.ordinal-t.ordinal:e.afterLineNumber-t.afterLineNumber),this._arr=s,this._prefixSumValidIndex=-1}_checkPendingChanges(){this._pendingChanges.mustCommit()&&this._pendingChanges.commit(this)}_insertWhitespace(e){const t=wL.findInsertionIndex(this._arr,e.afterLineNumber,e.ordinal);this._arr.splice(t,0,e),this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,t-1)}_findWhitespaceIndex(e){const t=this._arr;for(let i=0,n=t.length;i<n;i++)if(t[i].id===e)return i;return-1}_changeOneWhitespace(e,t,i){const n=this._findWhitespaceIndex(e);if(-1!==n&&(this._arr[n].height!==i&&(this._arr[n].height=i,this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,n-1)),this._arr[n].afterLineNumber!==t)){const e=this._arr[n];this._removeWhitespace(n),e.afterLineNumber=t,this._insertWhitespace(e)}}_removeWhitespace(e){this._arr.splice(e,1),this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,e-1)}onLinesDeleted(e,t){this._checkPendingChanges(),e|=0,t|=0,this._lineCount-=t-e+1;for(let i=0,n=this._arr.length;i<n;i++){const n=this._arr[i].afterLineNumber;e<=n&&n<=t?this._arr[i].afterLineNumber=e-1:n>t&&(this._arr[i].afterLineNumber-=t-e+1)}}onLinesInserted(e,t){this._checkPendingChanges(),e|=0,t|=0,this._lineCount+=t-e+1;for(let i=0,n=this._arr.length;i<n;i++){const n=this._arr[i].afterLineNumber;e<=n&&(this._arr[i].afterLineNumber+=t-e+1)}}getWhitespacesTotalHeight(){return this._checkPendingChanges(),0===this._arr.length?0:this.getWhitespacesAccumulatedHeight(this._arr.length-1)}getWhitespacesAccumulatedHeight(e){this._checkPendingChanges(),e|=0;let t=Math.max(0,this._prefixSumValidIndex+1);0===t&&(this._arr[0].prefixSum=this._arr[0].height,t++);for(let i=t;i<=e;i++)this._arr[i].prefixSum=this._arr[i-1].prefixSum+this._arr[i].height;return this._prefixSumValidIndex=Math.max(this._prefixSumValidIndex,e),this._arr[e].prefixSum}getLinesTotalHeight(){this._checkPendingChanges();const e=this._lineHeight*this._lineCount,t=this.getWhitespacesTotalHeight();return e+t+this._paddingTop+this._paddingBottom}getWhitespaceAccumulatedHeightBeforeLineNumber(e){this._checkPendingChanges(),e|=0;const t=this._findLastWhitespaceBeforeLineNumber(e);return-1===t?0:this.getWhitespacesAccumulatedHeight(t)}_findLastWhitespaceBeforeLineNumber(e){e|=0;const t=this._arr;let i=0,n=t.length-1;while(i<=n){const o=n-i|0,r=o/2|0,s=i+r|0;if(t[s].afterLineNumber<e){if(s+1>=t.length||t[s+1].afterLineNumber>=e)return s;i=s+1|0}else n=s-1|0}return-1}_findFirstWhitespaceAfterLineNumber(e){e|=0;const t=this._findLastWhitespaceBeforeLineNumber(e),i=t+1;return i<this._arr.length?i:-1}getFirstWhitespaceIndexAfterLineNumber(e){return this._checkPendingChanges(),e|=0,this._findFirstWhitespaceAfterLineNumber(e)}getVerticalOffsetForLineNumber(e){let t;this._checkPendingChanges(),e|=0,t=e>1?this._lineHeight*(e-1):0;const i=this.getWhitespaceAccumulatedHeightBeforeLineNumber(e);return t+i+this._paddingTop}getWhitespaceMinWidth(){if(this._checkPendingChanges(),-1===this._minWidth){let e=0;for(let t=0,i=this._arr.length;t<i;t++)e=Math.max(e,this._arr[t].minWidth);this._minWidth=e}return this._minWidth}isAfterLines(e){this._checkPendingChanges();const t=this.getLinesTotalHeight();return e>t}getLineNumberAtOrAfterVerticalOffset(e){if(this._checkPendingChanges(),e|=0,e<0)return 1;const t=0|this._lineCount,i=this._lineHeight;let n=1,o=t;while(n<o){const t=(n+o)/2|0,r=0|this.getVerticalOffsetForLineNumber(t);if(e>=r+i)n=t+1;else{if(e>=r)return t;o=t}}return n>t?t:n}getLinesViewportData(e,t){this._checkPendingChanges(),e|=0,t|=0;const i=this._lineHeight,n=0|this.getLineNumberAtOrAfterVerticalOffset(e),o=0|this.getVerticalOffsetForLineNumber(n);let r=0|this._lineCount,s=0|this.getFirstWhitespaceIndexAfterLineNumber(n);const a=0|this.getWhitespacesCount();let l,c;-1===s?(s=a,c=r+1,l=0):(c=0|this.getAfterLineNumberForWhitespaceIndex(s),l=0|this.getHeightForWhitespaceIndex(s));let h=o,d=h;const u=5e5;let g=0;o>=u&&(g=Math.floor(o/u)*u,g=Math.floor(g/i)*i,d-=g);const f=[],m=e+(t-e)/2;let p=-1;for(let w=n;w<=r;w++){if(-1===p){const e=h,t=h+i;(e<=m&&m<t||e>m)&&(p=w)}h+=i,f[w-n]=d,d+=i;while(c===w)d+=l,h+=l,s++,s>=a?c=r+1:(c=0|this.getAfterLineNumberForWhitespaceIndex(s),l=0|this.getHeightForWhitespaceIndex(s));if(h>=t){r=w;break}}-1===p&&(p=r);const _=0|this.getVerticalOffsetForLineNumber(r);let b=n,v=r;return b<v&&o<e&&b++,b<v&&_+i>t&&v--,{bigNumbersDelta:g,startLineNumber:n,endLineNumber:r,relativeVerticalOffset:f,centeredLineNumber:p,completelyVisibleStartLineNumber:b,completelyVisibleEndLineNumber:v}}getVerticalOffsetForWhitespaceIndex(e){this._checkPendingChanges(),e|=0;const t=this.getAfterLineNumberForWhitespaceIndex(e);let i,n;return i=t>=1?this._lineHeight*t:0,n=e>0?this.getWhitespacesAccumulatedHeight(e-1):0,i+n+this._paddingTop}getWhitespaceIndexAtOrAfterVerticallOffset(e){this._checkPendingChanges(),e|=0;let t=0,i=this.getWhitespacesCount()-1;if(i<0)return-1;const n=this.getVerticalOffsetForWhitespaceIndex(i),o=this.getHeightForWhitespaceIndex(i);if(e>=n+o)return-1;while(t<i){const n=Math.floor((t+i)/2),o=this.getVerticalOffsetForWhitespaceIndex(n),r=this.getHeightForWhitespaceIndex(n);if(e>=o+r)t=n+1;else{if(e>=o)return n;i=n}}return t}getWhitespaceAtVerticalOffset(e){this._checkPendingChanges(),e|=0;const t=this.getWhitespaceIndexAtOrAfterVerticallOffset(e);if(t<0)return null;if(t>=this.getWhitespacesCount())return null;const i=this.getVerticalOffsetForWhitespaceIndex(t);if(i>e)return null;const n=this.getHeightForWhitespaceIndex(t),o=this.getIdForWhitespaceIndex(t),r=this.getAfterLineNumberForWhitespaceIndex(t);return{id:o,afterLineNumber:r,verticalOffset:i,height:n}}getWhitespaceViewportData(e,t){this._checkPendingChanges(),e|=0,t|=0;const i=this.getWhitespaceIndexAtOrAfterVerticallOffset(e),n=this.getWhitespacesCount()-1;if(i<0)return[];let o=[];for(let r=i;r<=n;r++){const e=this.getVerticalOffsetForWhitespaceIndex(r),i=this.getHeightForWhitespaceIndex(r);if(e>=t)break;o.push({id:this.getIdForWhitespaceIndex(r),afterLineNumber:this.getAfterLineNumberForWhitespaceIndex(r),verticalOffset:e,height:i})}return o}getWhitespaces(){return this._checkPendingChanges(),this._arr.slice(0)}getWhitespacesCount(){return this._checkPendingChanges(),this._arr.length}getIdForWhitespaceIndex(e){return this._checkPendingChanges(),e|=0,this._arr[e].id}getAfterLineNumberForWhitespaceIndex(e){return this._checkPendingChanges(),e|=0,this._arr[e].afterLineNumber}getHeightForWhitespaceIndex(e){return this._checkPendingChanges(),e|=0,this._arr[e].height}}wL.INSTANCE_COUNT=0;const CL=125;class yL{constructor(e,t,i,n){e|=0,t|=0,i|=0,n|=0,e<0&&(e=0),t<0&&(t=0),i<0&&(i=0),n<0&&(n=0),this.width=e,this.contentWidth=t,this.scrollWidth=Math.max(e,t),this.height=i,this.contentHeight=n,this.scrollHeight=Math.max(i,n)}equals(e){return this.width===e.width&&this.contentWidth===e.contentWidth&&this.height===e.height&&this.contentHeight===e.contentHeight}}class SL extends Oe{constructor(e,t){super(),this._onDidContentSizeChange=this._register(new Ve),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._dimensions=new yL(0,0,0,0),this._scrollable=this._register(new vS(e,t)),this.onDidScroll=this._scrollable.onScroll}getScrollable(){return this._scrollable}setSmoothScrollDuration(e){this._scrollable.setSmoothScrollDuration(e)}validateScrollPosition(e){return this._scrollable.validateScrollPosition(e)}getScrollDimensions(){return this._dimensions}setScrollDimensions(e){if(this._dimensions.equals(e))return;const t=this._dimensions;this._dimensions=e,this._scrollable.setScrollDimensions({width:e.width,scrollWidth:e.scrollWidth,height:e.height,scrollHeight:e.scrollHeight},!0);const i=t.contentWidth!==e.contentWidth,n=t.contentHeight!==e.contentHeight;(i||n)&&this._onDidContentSizeChange.fire(new sL(t.contentWidth,t.contentHeight,e.contentWidth,e.contentHeight))}getFutureScrollPosition(){return this._scrollable.getFutureScrollPosition()}getCurrentScrollPosition(){return this._scrollable.getCurrentScrollPosition()}setScrollPositionNow(e){this._scrollable.setScrollPositionNow(e)}setScrollPositionSmooth(e){this._scrollable.setScrollPositionSmooth(e)}}class xL extends Oe{constructor(e,t,i){super(),this._configuration=e;const n=this._configuration.options,o=n.get(117),r=n.get(66);this._linesLayout=new wL(t,n.get(51),r.top,r.bottom),this._scrollable=this._register(new SL(0,i)),this._configureSmoothScrollDuration(),this._scrollable.setScrollDimensions(new yL(o.contentWidth,0,o.height,0)),this.onDidScroll=this._scrollable.onDidScroll,this.onDidContentSizeChange=this._scrollable.onDidContentSizeChange,this._updateHeight()}dispose(){super.dispose()}getScrollable(){return this._scrollable.getScrollable()}onHeightMaybeChanged(){this._updateHeight()}_configureSmoothScrollDuration(){this._scrollable.setSmoothScrollDuration(this._configuration.options.get(94)?CL:0)}onConfigurationChanged(e){const t=this._configuration.options;if(e.hasChanged(51)&&this._linesLayout.setLineHeight(t.get(51)),e.hasChanged(66)){const e=t.get(66);this._linesLayout.setPadding(e.top,e.bottom)}if(e.hasChanged(117)){const e=t.get(117),i=e.contentWidth,n=e.height,o=this._scrollable.getScrollDimensions(),r=o.contentWidth;this._scrollable.setScrollDimensions(new yL(i,o.contentWidth,n,this._getContentHeight(i,n,r)))}else this._updateHeight();e.hasChanged(94)&&this._configureSmoothScrollDuration()}onFlushed(e){this._linesLayout.onFlushed(e)}onLinesDeleted(e,t){this._linesLayout.onLinesDeleted(e,t)}onLinesInserted(e,t){this._linesLayout.onLinesInserted(e,t)}_getHorizontalScrollbarHeight(e,t){const i=this._configuration.options,n=i.get(84);return 2===n.horizontal||e>=t?0:n.horizontalScrollbarSize}_getContentHeight(e,t,i){const n=this._configuration.options;let o=this._linesLayout.getLinesTotalHeight();return n.get(86)?o+=t-n.get(51):o+=this._getHorizontalScrollbarHeight(e,i),o}_updateHeight(){const e=this._scrollable.getScrollDimensions(),t=e.width,i=e.height,n=e.contentWidth;this._scrollable.setScrollDimensions(new yL(t,e.contentWidth,i,this._getContentHeight(t,i,n)))}getCurrentViewport(){const e=this._scrollable.getScrollDimensions(),t=this._scrollable.getCurrentScrollPosition();return new kd(t.scrollTop,t.scrollLeft,e.width,e.height)}getFutureViewport(){const e=this._scrollable.getScrollDimensions(),t=this._scrollable.getFutureScrollPosition();return new kd(t.scrollTop,t.scrollLeft,e.width,e.height)}_computeContentWidth(e){const t=this._configuration.options,i=t.get(118),n=t.get(36);if(i.isViewportWrapping){const i=t.get(117),o=t.get(56);return e>i.contentWidth+n.typicalHalfwidthCharacterWidth&&o.enabled&&"right"===o.side?e+i.verticalScrollbarWidth:e}{const i=t.get(85)*n.typicalHalfwidthCharacterWidth,o=this._linesLayout.getWhitespaceMinWidth();return Math.max(e+i,o)}}setMaxLineWidth(e){const t=this._scrollable.getScrollDimensions();this._scrollable.setScrollDimensions(new yL(t.width,this._computeContentWidth(e),t.height,t.contentHeight)),this._updateHeight()}saveState(){const e=this._scrollable.getFutureScrollPosition();let t=e.scrollTop,i=this._linesLayout.getLineNumberAtOrAfterVerticalOffset(t),n=this._linesLayout.getWhitespaceAccumulatedHeightBeforeLineNumber(i);return{scrollTop:t,scrollTopWithoutViewZones:t-n,scrollLeft:e.scrollLeft}}changeWhitespace(e){const t=this._linesLayout.changeWhitespace(e);return t&&this.onHeightMaybeChanged(),t}getVerticalOffsetForLineNumber(e){return this._linesLayout.getVerticalOffsetForLineNumber(e)}isAfterLines(e){return this._linesLayout.isAfterLines(e)}getLineNumberAtVerticalOffset(e){return this._linesLayout.getLineNumberAtOrAfterVerticalOffset(e)}getWhitespaceAtVerticalOffset(e){return this._linesLayout.getWhitespaceAtVerticalOffset(e)}getLinesViewportData(){const e=this.getCurrentViewport();return this._linesLayout.getLinesViewportData(e.top,e.top+e.height)}getLinesViewportDataAtScrollTop(e){const t=this._scrollable.getScrollDimensions();return e+t.height>t.scrollHeight&&(e=t.scrollHeight-t.height),e<0&&(e=0),this._linesLayout.getLinesViewportData(e,e+t.height)}getWhitespaceViewportData(){const e=this.getCurrentViewport();return this._linesLayout.getWhitespaceViewportData(e.top,e.top+e.height)}getWhitespaces(){return this._linesLayout.getWhitespaces()}getContentWidth(){const e=this._scrollable.getScrollDimensions();return e.contentWidth}getScrollWidth(){const e=this._scrollable.getScrollDimensions();return e.scrollWidth}getContentHeight(){const e=this._scrollable.getScrollDimensions();return e.contentHeight}getScrollHeight(){const e=this._scrollable.getScrollDimensions();return e.scrollHeight}getCurrentScrollLeft(){const e=this._scrollable.getCurrentScrollPosition();return e.scrollLeft}getCurrentScrollTop(){const e=this._scrollable.getCurrentScrollPosition();return e.scrollTop}validateScrollPosition(e){return this._scrollable.validateScrollPosition(e)}setScrollPosition(e,t){1===t?this._scrollable.setScrollPositionNow(e):this._scrollable.setScrollPositionSmooth(e)}deltaScrollNow(e,t){const i=this._scrollable.getCurrentScrollPosition();this._scrollable.setScrollPositionNow({scrollLeft:i.scrollLeft+e,scrollTop:i.scrollTop+t})}}class LL{constructor(e,t){this.outputLineIndex=e,this.outputOffset=t}}class kL{constructor(e,t,i){this.breakOffsets=e,this.breakOffsetsVisibleColumn=t,this.wrappedTextIndentLength=i}static getInputOffsetOfOutputPosition(e,t,i){return 0===t?i:e[t-1]+i}static getOutputPositionOfInputOffset(e,t){let i=0,n=e.length-1,o=0,r=0;while(i<=n){o=i+(n-i)/2|0;const s=e[o];if(r=o>0?e[o-1]:0,t<r)n=o-1;else{if(!(t>=s))break;i=o+1}}return new LL(o,t-r)}}class EL{constructor(e){this._lines=e}convertViewPositionToModelPosition(e){return this._lines.convertViewPositionToModelPosition(e.lineNumber,e.column)}convertViewRangeToModelRange(e){return this._lines.convertViewRangeToModelRange(e)}validateViewPosition(e,t){return this._lines.validateViewPosition(e.lineNumber,e.column,t)}validateViewRange(e,t){return this._lines.validateViewRange(e,t)}convertModelPositionToViewPosition(e){return this._lines.convertModelPositionToViewPosition(e.lineNumber,e.column)}convertModelRangeToViewRange(e){return this._lines.convertModelRangeToViewRange(e)}modelPositionIsVisible(e){return this._lines.modelPositionIsVisible(e.lineNumber,e.column)}}class DL{constructor(e){this._counts=e,this._isValid=!1,this._validEndIndex=-1,this._modelToView=[],this._viewToModel=[]}_invalidate(e){this._isValid=!1,this._validEndIndex=Math.min(this._validEndIndex,e-1)}_ensureValid(){if(!this._isValid){for(let e=this._validEndIndex+1,t=this._counts.length;e<t;e++){const t=this._counts[e],i=e>0?this._modelToView[e-1]:0;this._modelToView[e]=i+t;for(let n=0;n<t;n++)this._viewToModel[i+n]=e}this._modelToView.length=this._counts.length,this._viewToModel.length=this._modelToView[this._modelToView.length-1],this._isValid=!0,this._validEndIndex=this._counts.length-1}}changeValue(e,t){this._counts[e]!==t&&(this._counts[e]=t,this._invalidate(e))}removeValues(e,t){this._counts.splice(e,t),this._invalidate(e)}insertValues(e,t){this._counts=Gn(this._counts,e,t),this._invalidate(e)}getTotalValue(){return this._ensureValid(),this._viewToModel.length}getAccumulatedValue(e){return this._ensureValid(),this._modelToView[e]}getIndexOf(e){this._ensureValid();const t=this._viewToModel[e],i=t>0?this._modelToView[t-1]:0;return new vh(t,e-i)}}class NL{constructor(e,t,i,n,o,r,s,a){this.model=e,this._validModelVersionId=-1,this._domLineBreaksComputerFactory=t,this._monospaceLineBreaksComputerFactory=i,this.fontInfo=n,this.tabSize=o,this.wrappingStrategy=r,this.wrappingColumn=s,this.wrappingIndent=a,this._constructLines(!0,null)}dispose(){this.hiddenAreasIds=this.model.deltaDecorations(this.hiddenAreasIds,[])}createCoordinatesConverter(){return new EL(this)}_constructLines(e,t){this.lines=[],e&&(this.hiddenAreasIds=[]);let i=this.model.getLinesContent();const n=i.length,o=this.createLineBreaksComputer();for(let u=0;u<n;u++)o.addRequest(i[u],t?t[u]:null);const r=o.finalize();let s=[],a=this.hiddenAreasIds.map(e=>this.model.getDecorationRange(e)).sort(Jt.compareRangesUsingStarts),l=1,c=0,h=-1,d=h+1<a.length?c+1:n+2;for(let u=0;u<n;u++){let e=u+1;e===d&&(h++,l=a[h].startLineNumber,c=a[h].endLineNumber,d=h+1<a.length?c+1:n+2);let t=e>=l&&e<=c,i=PL(r[u],!t);s[u]=i.getViewLineCount(),this.lines[u]=i}this._validModelVersionId=this.model.getVersionId(),this.prefixSumComputer=new DL(s)}getHiddenAreas(){return this.hiddenAreasIds.map(e=>this.model.getDecorationRange(e))}_reduceRanges(e){if(0===e.length)return[];let t=e.map(e=>this.model.validateRange(e)).sort(Jt.compareRangesUsingStarts),i=[],n=t[0].startLineNumber,o=t[0].endLineNumber;for(let r=1,s=t.length;r<s;r++){let e=t[r];e.startLineNumber>o+1?(i.push(new Jt(n,1,o,1)),n=e.startLineNumber,o=e.endLineNumber):e.endLineNumber>o&&(o=e.endLineNumber)}return i.push(new Jt(n,1,o,1)),i}setHiddenAreas(e){let t=this._reduceRanges(e),i=this.hiddenAreasIds.map(e=>this.model.getDecorationRange(e)).sort(Jt.compareRangesUsingStarts);if(t.length===i.length){let e=!1;for(let n=0;n<t.length;n++)if(!t[n].equalsRange(i[n])){e=!0;break}if(!e)return!1}let n=[];for(const h of t)n.push({range:h,options:qb.EMPTY});this.hiddenAreasIds=this.model.deltaDecorations(this.hiddenAreasIds,n);let o=t,r=1,s=0,a=-1,l=a+1<o.length?s+1:this.lines.length+2,c=!1;for(let h=0;h<this.lines.length;h++){let e=h+1;e===l&&(a++,r=o[a].startLineNumber,s=o[a].endLineNumber,l=a+1<o.length?s+1:this.lines.length+2);let t=!1;if(e>=r&&e<=s?this.lines[h].isVisible()&&(this.lines[h]=this.lines[h].setVisible(!1),t=!0):(c=!0,this.lines[h].isVisible()||(this.lines[h]=this.lines[h].setVisible(!0),t=!0)),t){let e=this.lines[h].getViewLineCount();this.prefixSumComputer.changeValue(h,e)}}return c||this.setHiddenAreas([]),!0}modelPositionIsVisible(e,t){return!(e<1||e>this.lines.length)&&this.lines[e-1].isVisible()}setTabSize(e){return this.tabSize!==e&&(this.tabSize=e,this._constructLines(!1,null),!0)}setWrappingSettings(e,t,i,n){const o=this.fontInfo.equals(e),r=this.wrappingStrategy===t,s=this.wrappingColumn===i,a=this.wrappingIndent===n;if(o&&r&&s&&a)return!1;const l=o&&r&&!s&&a;this.fontInfo=e,this.wrappingStrategy=t,this.wrappingColumn=i,this.wrappingIndent=n;let c=null;if(l){c=[];for(let e=0,t=this.lines.length;e<t;e++)c[e]=this.lines[e].getLineBreakData()}return this._constructLines(!1,c),!0}createLineBreaksComputer(){const e="advanced"===this.wrappingStrategy?this._domLineBreaksComputerFactory:this._monospaceLineBreaksComputerFactory;return e.createLineBreaksComputer(this.fontInfo,this.tabSize,this.wrappingColumn,this.wrappingIndent)}onModelFlushed(){this._constructLines(!0,null)}onModelLinesDeleted(e,t,i){if(e<=this._validModelVersionId)return null;let n=1===t?1:this.prefixSumComputer.getAccumulatedValue(t-2)+1,o=this.prefixSumComputer.getAccumulatedValue(i-1);return this.lines.splice(t-1,i-t+1),this.prefixSumComputer.removeValues(t-1,i-t+1),new Xx(n,o)}onModelLinesInserted(e,t,i,n){if(e<=this._validModelVersionId)return null;let o=this.getHiddenAreas(),r=!1,s=new Qt(t,1);for(const d of o)if(d.containsPosition(s)){r=!0;break}let a=1===t?1:this.prefixSumComputer.getAccumulatedValue(t-2)+1,l=0,c=[],h=[];for(let d=0,u=n.length;d<u;d++){let e=PL(n[d],!r);c.push(e);let t=e.getViewLineCount();l+=t,h[d]=t}return this.lines=this.lines.slice(0,t-1).concat(c).concat(this.lines.slice(t-1)),this.prefixSumComputer.insertValues(t-1,h),new Zx(a,a+l-1)}onModelLineChanged(e,t,i){if(e<=this._validModelVersionId)return[!1,null,null,null];let n=t-1,o=this.lines[n].getViewLineCount(),r=this.lines[n].isVisible(),s=PL(i,r);this.lines[n]=s;let a=this.lines[n].getViewLineCount(),l=!1,c=0,h=-1,d=0,u=-1,g=0,f=-1;o>a?(c=1===t?1:this.prefixSumComputer.getAccumulatedValue(t-2)+1,h=c+a-1,g=h+1,f=g+(o-a)-1,l=!0):o<a?(c=1===t?1:this.prefixSumComputer.getAccumulatedValue(t-2)+1,h=c+o-1,d=h+1,u=d+(a-o)-1,l=!0):(c=1===t?1:this.prefixSumComputer.getAccumulatedValue(t-2)+1,h=c+a-1),this.prefixSumComputer.changeValue(n,a);const m=c<=h?new Yx(c,h):null,p=d<=u?new Zx(d,u):null,_=g<=f?new Xx(g,f):null;return[l,m,p,_]}acceptVersionId(e){this._validModelVersionId=e,1!==this.lines.length||this.lines[0].isVisible()||this.setHiddenAreas([])}getViewLineCount(){return this.prefixSumComputer.getTotalValue()}_toValidViewLineNumber(e){if(e<1)return 1;const t=this.getViewLineCount();return e>t?t:0|e}getActiveIndentGuide(e,t,i){e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t),i=this._toValidViewLineNumber(i);const n=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),o=this.convertViewPositionToModelPosition(t,this.getViewLineMinColumn(t)),r=this.convertViewPositionToModelPosition(i,this.getViewLineMinColumn(i)),s=this.model.getActiveIndentGuide(n.lineNumber,o.lineNumber,r.lineNumber),a=this.convertModelPositionToViewPosition(s.startLineNumber,1),l=this.convertModelPositionToViewPosition(s.endLineNumber,this.model.getLineMaxColumn(s.endLineNumber));return{startLineNumber:a.lineNumber,endLineNumber:l.lineNumber,indent:s.indent}}getViewLinesIndentGuides(e,t){e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t);const i=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),n=this.convertViewPositionToModelPosition(t,this.getViewLineMaxColumn(t));let o=[],r=[],s=[];const a=i.lineNumber-1,l=n.lineNumber-1;let c=null;for(let g=a;g<=l;g++){const e=this.lines[g];if(e.isVisible()){let t=e.getViewLineNumberOfModelPosition(0,g===a?i.column:1),n=e.getViewLineNumberOfModelPosition(0,this.model.getLineMaxColumn(g+1)),o=n-t+1,l=0;o>1&&1===e.getViewLineMinColumn(this.model,g+1,n)&&(l=0===t?1:2),r.push(o),s.push(l),null===c&&(c=new Qt(g+1,0))}else null!==c&&(o=o.concat(this.model.getLinesIndentGuides(c.lineNumber,g)),c=null)}null!==c&&(o=o.concat(this.model.getLinesIndentGuides(c.lineNumber,n.lineNumber)),c=null);const h=t-e+1;let d=new Array(h),u=0;for(let g=0,f=o.length;g<f;g++){let e,t=o[g],i=Math.min(h-u,r[g]),n=s[g];e=2===n?0:1===n?1:i;for(let o=0;o<i;o++)o===e&&(t=0),d[u++]=t}return d}getViewLineContent(e){e=this._toValidViewLineNumber(e);let t=this.prefixSumComputer.getIndexOf(e-1),i=t.index,n=t.remainder;return this.lines[i].getViewLineContent(this.model,i+1,n)}getViewLineLength(e){e=this._toValidViewLineNumber(e);let t=this.prefixSumComputer.getIndexOf(e-1),i=t.index,n=t.remainder;return this.lines[i].getViewLineLength(this.model,i+1,n)}getViewLineMinColumn(e){e=this._toValidViewLineNumber(e);let t=this.prefixSumComputer.getIndexOf(e-1),i=t.index,n=t.remainder;return this.lines[i].getViewLineMinColumn(this.model,i+1,n)}getViewLineMaxColumn(e){e=this._toValidViewLineNumber(e);let t=this.prefixSumComputer.getIndexOf(e-1),i=t.index,n=t.remainder;return this.lines[i].getViewLineMaxColumn(this.model,i+1,n)}getViewLineData(e){e=this._toValidViewLineNumber(e);let t=this.prefixSumComputer.getIndexOf(e-1),i=t.index,n=t.remainder;return this.lines[i].getViewLineData(this.model,i+1,n)}getViewLinesData(e,t,i){e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t);let n=this.prefixSumComputer.getIndexOf(e-1),o=e,r=n.index,s=n.remainder,a=[];for(let l=r,c=this.model.getLineCount();l<c;l++){let n=this.lines[l];if(!n.isVisible())continue;let c=l===r?s:0,h=n.getViewLineCount()-c,d=!1;o+h>t&&(d=!0,h=t-o+1);let u=c+h;if(n.getViewLinesData(this.model,l+1,c,u,o-e,i,a),o+=h,d)break}return a}validateViewPosition(e,t,i){e=this._toValidViewLineNumber(e);let n=this.prefixSumComputer.getIndexOf(e-1),o=n.index,r=n.remainder,s=this.lines[o],a=s.getViewLineMinColumn(this.model,o+1,r),l=s.getViewLineMaxColumn(this.model,o+1,r);t<a&&(t=a),t>l&&(t=l);let c=s.getModelColumnOfViewPosition(r,t),h=this.model.validatePosition(new Qt(o+1,c));return h.equals(i)?new Qt(e,t):this.convertModelPositionToViewPosition(i.lineNumber,i.column)}validateViewRange(e,t){const i=this.validateViewPosition(e.startLineNumber,e.startColumn,t.getStartPosition()),n=this.validateViewPosition(e.endLineNumber,e.endColumn,t.getEndPosition());return new Jt(i.lineNumber,i.column,n.lineNumber,n.column)}convertViewPositionToModelPosition(e,t){e=this._toValidViewLineNumber(e);let i=this.prefixSumComputer.getIndexOf(e-1),n=i.index,o=i.remainder,r=this.lines[n].getModelColumnOfViewPosition(o,t);return this.model.validatePosition(new Qt(n+1,r))}convertViewRangeToModelRange(e){const t=this.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),i=this.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);return new Jt(t.lineNumber,t.column,i.lineNumber,i.column)}convertModelPositionToViewPosition(e,t){const i=this.model.validatePosition(new Qt(e,t)),n=i.lineNumber,o=i.column;let r=n-1,s=!1;while(r>0&&!this.lines[r].isVisible())r--,s=!0;if(0===r&&!this.lines[r].isVisible())return new Qt(1,1);const a=1+(0===r?0:this.prefixSumComputer.getAccumulatedValue(r-1));let l;return l=s?this.lines[r].getViewPositionOfModelPosition(a,this.model.getLineMaxColumn(r+1)):this.lines[n-1].getViewPositionOfModelPosition(a,o),l}convertModelRangeToViewRange(e){let t=this.convertModelPositionToViewPosition(e.startLineNumber,e.startColumn),i=this.convertModelPositionToViewPosition(e.endLineNumber,e.endColumn);return e.startLineNumber===e.endLineNumber&&t.lineNumber!==i.lineNumber&&i.column===this.getViewLineMinColumn(i.lineNumber)?new Jt(t.lineNumber,t.column,i.lineNumber-1,this.getViewLineMaxColumn(i.lineNumber-1)):new Jt(t.lineNumber,t.column,i.lineNumber,i.column)}_getViewLineNumberForModelPosition(e,t){let i=e-1;if(this.lines[i].isVisible()){const e=1+(0===i?0:this.prefixSumComputer.getAccumulatedValue(i-1));return this.lines[i].getViewLineNumberOfModelPosition(e,t)}while(i>0&&!this.lines[i].isVisible())i--;if(0===i&&!this.lines[i].isVisible())return 1;const n=1+(0===i?0:this.prefixSumComputer.getAccumulatedValue(i-1));return this.lines[i].getViewLineNumberOfModelPosition(n,this.model.getLineMaxColumn(i+1))}getAllOverviewRulerDecorations(e,t,i){const n=this.model.getOverviewRulerDecorations(e,t),o=new BL;for(const r of n){const e=r.options.overviewRuler,t=e?e.position:0;if(0===t)continue;const n=e.getColor(i),s=this._getViewLineNumberForModelPosition(r.range.startLineNumber,r.range.startColumn),a=this._getViewLineNumberForModelPosition(r.range.endLineNumber,r.range.endColumn);o.accept(n,s,a,t)}return o.result}getDecorationsInRange(e,t,i){const n=this.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),o=this.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);if(o.lineNumber-n.lineNumber<=e.endLineNumber-e.startLineNumber)return this.model.getDecorationsInRange(new Jt(n.lineNumber,1,o.lineNumber,o.column),t,i);let r=[];const s=n.lineNumber-1,a=o.lineNumber-1;let l=null;for(let u=s;u<=a;u++){const e=this.lines[u];if(e.isVisible())null===l&&(l=new Qt(u+1,u===s?n.column:1));else if(null!==l){const e=this.model.getLineMaxColumn(u);r=r.concat(this.model.getDecorationsInRange(new Jt(l.lineNumber,l.column,u,e),t,i)),l=null}}null!==l&&(r=r.concat(this.model.getDecorationsInRange(new Jt(l.lineNumber,l.column,o.lineNumber,o.column),t,i)),l=null),r.sort((e,t)=>{const i=Jt.compareRangesUsingStarts(e.range,t.range);return 0===i?e.id<t.id?-1:e.id>t.id?1:0:i});let c=[],h=0,d=null;for(const u of r){const e=u.id;d!==e&&(d=e,c[h++]=u)}return c}}class TL{constructor(){}isVisible(){return!0}setVisible(e){return e?this:ML.INSTANCE}getLineBreakData(){return null}getViewLineCount(){return 1}getViewLineContent(e,t,i){return e.getLineContent(t)}getViewLineLength(e,t,i){return e.getLineLength(t)}getViewLineMinColumn(e,t,i){return e.getLineMinColumn(t)}getViewLineMaxColumn(e,t,i){return e.getLineMaxColumn(t)}getViewLineData(e,t,i){let n=e.getLineTokens(t),o=n.getLineContent();return new Dd(o,!1,1,o.length+1,0,n.inflate())}getViewLinesData(e,t,i,n,o,r,s){r[o]?s[o]=this.getViewLineData(e,t,0):s[o]=null}getModelColumnOfViewPosition(e,t){return t}getViewPositionOfModelPosition(e,t){return new Qt(e,t)}getViewLineNumberOfModelPosition(e,t){return e}}TL.INSTANCE=new TL;class ML{constructor(){}isVisible(){return!1}setVisible(e){return e?TL.INSTANCE:this}getLineBreakData(){return null}getViewLineCount(){return 0}getViewLineContent(e,t,i){throw new Error("Not supported")}getViewLineLength(e,t,i){throw new Error("Not supported")}getViewLineMinColumn(e,t,i){throw new Error("Not supported")}getViewLineMaxColumn(e,t,i){throw new Error("Not supported")}getViewLineData(e,t,i){throw new Error("Not supported")}getViewLinesData(e,t,i,n,o,r,s){throw new Error("Not supported")}getModelColumnOfViewPosition(e,t){throw new Error("Not supported")}getViewPositionOfModelPosition(e,t){throw new Error("Not supported")}getViewLineNumberOfModelPosition(e,t){throw new Error("Not supported")}}ML.INSTANCE=new ML;class IL{constructor(e,t){this._lineBreakData=e,this._isVisible=t}isVisible(){return this._isVisible}setVisible(e){return this._isVisible=e,this}getLineBreakData(){return this._lineBreakData}getViewLineCount(){return this._isVisible?this._lineBreakData.breakOffsets.length:0}getInputStartOffsetOfOutputLineIndex(e){return kL.getInputOffsetOfOutputPosition(this._lineBreakData.breakOffsets,e,0)}getInputEndOffsetOfOutputLineIndex(e,t,i){return i+1===this._lineBreakData.breakOffsets.length?e.getLineMaxColumn(t)-1:kL.getInputOffsetOfOutputPosition(this._lineBreakData.breakOffsets,i+1,0)}getViewLineContent(e,t,i){if(!this._isVisible)throw new Error("Not supported");let n=this.getInputStartOffsetOfOutputLineIndex(i),o=this.getInputEndOffsetOfOutputLineIndex(e,t,i),r=e.getValueInRange({startLineNumber:t,startColumn:n+1,endLineNumber:t,endColumn:o+1});return i>0&&(r=AL(this._lineBreakData.wrappedTextIndentLength)+r),r}getViewLineLength(e,t,i){if(!this._isVisible)throw new Error("Not supported");let n=this.getInputStartOffsetOfOutputLineIndex(i),o=this.getInputEndOffsetOfOutputLineIndex(e,t,i),r=o-n;return i>0&&(r=this._lineBreakData.wrappedTextIndentLength+r),r}getViewLineMinColumn(e,t,i){if(!this._isVisible)throw new Error("Not supported");return i>0?this._lineBreakData.wrappedTextIndentLength+1:1}getViewLineMaxColumn(e,t,i){if(!this._isVisible)throw new Error("Not supported");return this.getViewLineContent(e,t,i).length+1}getViewLineData(e,t,i){if(!this._isVisible)throw new Error("Not supported");let n=this.getInputStartOffsetOfOutputLineIndex(i),o=this.getInputEndOffsetOfOutputLineIndex(e,t,i),r=e.getValueInRange({startLineNumber:t,startColumn:n+1,endLineNumber:t,endColumn:o+1});i>0&&(r=AL(this._lineBreakData.wrappedTextIndentLength)+r);let s=i>0?this._lineBreakData.wrappedTextIndentLength+1:1,a=r.length+1,l=i+1<this.getViewLineCount(),c=0;i>0&&(c=this._lineBreakData.wrappedTextIndentLength);let h=e.getLineTokens(t);const d=0===i?0:this._lineBreakData.breakOffsetsVisibleColumn[i-1];return new Dd(r,l,s,a,d,h.sliceAndInflate(n,o,c))}getViewLinesData(e,t,i,n,o,r,s){if(!this._isVisible)throw new Error("Not supported");for(let a=i;a<n;a++){let n=o+a-i;r[n]?s[n]=this.getViewLineData(e,t,a):s[n]=null}}getModelColumnOfViewPosition(e,t){if(!this._isVisible)throw new Error("Not supported");let i=t-1;return e>0&&(i<this._lineBreakData.wrappedTextIndentLength?i=0:i-=this._lineBreakData.wrappedTextIndentLength),kL.getInputOffsetOfOutputPosition(this._lineBreakData.breakOffsets,e,i)+1}getViewPositionOfModelPosition(e,t){if(!this._isVisible)throw new Error("Not supported");let i=kL.getOutputPositionOfInputOffset(this._lineBreakData.breakOffsets,t-1),n=i.outputLineIndex,o=i.outputOffset+1;return n>0&&(o+=this._lineBreakData.wrappedTextIndentLength),new Qt(e+n,o)}getViewLineNumberOfModelPosition(e,t){if(!this._isVisible)throw new Error("Not supported");const i=kL.getOutputPositionOfInputOffset(this._lineBreakData.breakOffsets,t-1);return e+i.outputLineIndex}}let OL=[""];function AL(e){if(e>=OL.length)for(let t=1;t<=e;t++)OL[t]=RL(t);return OL[e]}function RL(e){return new Array(e+1).join(" ")}function PL(e,t){return null===e?t?TL.INSTANCE:ML.INSTANCE:new IL(e,t)}class FL{constructor(e){this._lines=e}_validPosition(e){return this._lines.model.validatePosition(e)}_validRange(e){return this._lines.model.validateRange(e)}convertViewPositionToModelPosition(e){return this._validPosition(e)}convertViewRangeToModelRange(e){return this._validRange(e)}validateViewPosition(e,t){return this._validPosition(t)}validateViewRange(e,t){return this._validRange(t)}convertModelPositionToViewPosition(e){return this._validPosition(e)}convertModelRangeToViewRange(e){return this._validRange(e)}modelPositionIsVisible(e){const t=this._lines.model.getLineCount();return!(e.lineNumber<1||e.lineNumber>t)}}class WL{constructor(e){this.model=e}dispose(){}createCoordinatesConverter(){return new FL(this)}getHiddenAreas(){return[]}setHiddenAreas(e){return!1}setTabSize(e){return!1}setWrappingSettings(e,t,i,n){return!1}createLineBreaksComputer(){let e=[];return{addRequest:(t,i)=>{e.push(null)},finalize:()=>e}}onModelFlushed(){}onModelLinesDeleted(e,t,i){return new Xx(t,i)}onModelLinesInserted(e,t,i,n){return new Zx(t,i)}onModelLineChanged(e,t,i){return[!1,new Yx(t,t),null,null]}acceptVersionId(e){}getViewLineCount(){return this.model.getLineCount()}getActiveIndentGuide(e,t,i){return{startLineNumber:e,endLineNumber:e,indent:0}}getViewLinesIndentGuides(e,t){const i=t-e+1;let n=new Array(i);for(let o=0;o<i;o++)n[o]=0;return n}getViewLineContent(e){return this.model.getLineContent(e)}getViewLineLength(e){return this.model.getLineLength(e)}getViewLineMinColumn(e){return this.model.getLineMinColumn(e)}getViewLineMaxColumn(e){return this.model.getLineMaxColumn(e)}getViewLineData(e){let t=this.model.getLineTokens(e),i=t.getLineContent();return new Dd(i,!1,1,i.length+1,0,t.inflate())}getViewLinesData(e,t,i){const n=this.model.getLineCount();e=Math.min(Math.max(1,e),n),t=Math.min(Math.max(1,t),n);let o=[];for(let r=e;r<=t;r++){let t=r-e;i[t]||(o[t]=null),o[t]=this.getViewLineData(r)}return o}getAllOverviewRulerDecorations(e,t,i){const n=this.model.getOverviewRulerDecorations(e,t),o=new BL;for(const r of n){const e=r.options.overviewRuler,t=e?e.position:0;if(0===t)continue;const n=e.getColor(i),s=r.range.startLineNumber,a=r.range.endLineNumber;o.accept(n,s,a,t)}return o.result}getDecorationsInRange(e,t,i){return this.model.getDecorationsInRange(e,t,i)}}class BL{constructor(){this.result=Object.create(null)}accept(e,t,i,n){let o=this.result[e];if(o){const e=o[o.length-3],r=o[o.length-1];if(e===n&&r+1>=t)return void(i>r&&(o[o.length-1]=i));o.push(n,t,i)}else this.result[e]=[n,t,i]}}class VL{constructor(e,t,i,n,o){this.editorId=e,this.model=t,this.configuration=i,this._linesCollection=n,this._coordinatesConverter=o,this._decorationsCache=Object.create(null),this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null}_clearCachedModelDecorationsResolver(){this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null}dispose(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}reset(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}onModelDecorationsChanged(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}onLineMappingChanged(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}_getOrCreateViewModelDecoration(e){const t=e.id;let i=this._decorationsCache[t];if(!i){const n=e.range,o=e.options;let r;if(o.isWholeLine){const e=this._coordinatesConverter.convertModelPositionToViewPosition(new Qt(n.startLineNumber,1)),t=this._coordinatesConverter.convertModelPositionToViewPosition(new Qt(n.endLineNumber,this.model.getLineMaxColumn(n.endLineNumber)));r=new Jt(e.lineNumber,e.column,t.lineNumber,t.column)}else r=this._coordinatesConverter.convertModelRangeToViewRange(n);i=new Md(r,o),this._decorationsCache[t]=i}return i}getDecorationsViewportData(e){let t=null!==this._cachedModelDecorationsResolver;return t=t&&e.equalsRange(this._cachedModelDecorationsResolverViewRange),t||(this._cachedModelDecorationsResolver=this._getDecorationsViewportData(e),this._cachedModelDecorationsResolverViewRange=e),this._cachedModelDecorationsResolver}_getDecorationsViewportData(e){const t=this._linesCollection.getDecorationsInRange(e,this.editorId,Z(this.configuration.options)),i=e.startLineNumber,n=e.endLineNumber;let o=[],r=0,s=[];for(let a=i;a<=n;a++)s[a-i]=[];for(let a=0,l=t.length;a<l;a++){let e=t[a],l=e.options,c=this._getOrCreateViewModelDecoration(e),h=c.range;if(o[r++]=c,l.inlineClassName){let e=new Td(h,l.inlineClassName,l.inlineClassNameAffectsLetterSpacing?3:0),t=Math.max(i,h.startLineNumber),o=Math.min(n,h.endLineNumber);for(let n=t;n<=o;n++)s[n-i].push(e)}if(l.beforeContentClassName&&i<=h.startLineNumber&&h.startLineNumber<=n){let e=new Td(new Jt(h.startLineNumber,h.startColumn,h.startLineNumber,h.startColumn),l.beforeContentClassName,1);s[h.startLineNumber-i].push(e)}if(l.afterContentClassName&&i<=h.endLineNumber&&h.endLineNumber<=n){let e=new Td(new Jt(h.endLineNumber,h.endColumn,h.endLineNumber,h.endColumn),l.afterContentClassName,2);s[h.endLineNumber-i].push(e)}}return{decorations:o,inlineDecorations:s}}}const HL=!0;class zL extends Oe{constructor(e,t,i,n,o,r){if(super(),this._editorId=e,this._configuration=t,this.model=i,this._eventDispatcher=new oL,this.onEvent=this._eventDispatcher.onEvent,this.cursorConfig=new tv(this.model.getLanguageIdentifier(),this.model.getOptions(),this._configuration),this._tokenizeViewportSoon=this._register(new Tn(()=>this.tokenizeViewport(),50)),this._updateConfigurationViewLineCount=this._register(new Tn(()=>this._updateConfigurationViewLineCountNow(),0)),this._hasFocus=!1,this._viewportStartLine=-1,this._viewportStartLineTrackedRange=null,this._viewportStartLineDelta=0,HL&&this.model.isTooLargeForTokenization())this._lines=new WL(this.model);else{const e=this._configuration.options,t=e.get(36),i=e.get(112),r=e.get(118),s=e.get(111);this._lines=new NL(this.model,n,o,t,this.model.getOptions().tabSize,i,r.wrappingColumn,s)}this.coordinatesConverter=this._lines.createCoordinatesConverter(),this._cursor=this._register(new fL(i,this,this.coordinatesConverter,this.cursorConfig)),this.viewLayout=this._register(new xL(this._configuration,this.getLineCount(),r)),this._register(this.viewLayout.onDidScroll(e=>{e.scrollTopChanged&&this._tokenizeViewportSoon.schedule(),this._eventDispatcher.emitSingleViewEvent(new Jx(e)),this._eventDispatcher.emitOutgoingEvent(new lL(e.oldScrollWidth,e.oldScrollLeft,e.oldScrollHeight,e.oldScrollTop,e.scrollWidth,e.scrollLeft,e.scrollHeight,e.scrollTop))})),this._register(this.viewLayout.onDidContentSizeChange(e=>{this._eventDispatcher.emitOutgoingEvent(e)})),this._decorations=new VL(this._editorId,this.model,this._configuration,this._lines,this.coordinatesConverter),this._registerModelEvents(),this._register(this._configuration.onDidChangeFast(e=>{try{const t=this._eventDispatcher.beginEmitViewEvents();this._onConfigurationChanged(t,e)}finally{this._eventDispatcher.endEmitViewEvents()}})),this._register(GS.getInstance().onDidChange(()=>{this._eventDispatcher.emitSingleViewEvent(new iL)})),this._updateConfigurationViewLineCountNow()}dispose(){super.dispose(),this._decorations.dispose(),this._lines.dispose(),this.invalidateMinimapColorCache(),this._viewportStartLineTrackedRange=this.model._setTrackedRange(this._viewportStartLineTrackedRange,null,1),this._eventDispatcher.dispose()}addViewEventHandler(e){this._eventDispatcher.addViewEventHandler(e)}removeViewEventHandler(e){this._eventDispatcher.removeViewEventHandler(e)}_updateConfigurationViewLineCountNow(){this._configuration.setViewLineCount(this._lines.getViewLineCount())}tokenizeViewport(){const e=this.viewLayout.getLinesViewportData(),t=this.coordinatesConverter.convertViewPositionToModelPosition(new Qt(e.startLineNumber,1)),i=this.coordinatesConverter.convertViewPositionToModelPosition(new Qt(e.endLineNumber,1));this.model.tokenizeViewport(t.lineNumber,i.lineNumber)}setHasFocus(e){this._hasFocus=e,this._cursor.setHasFocus(e),this._eventDispatcher.emitSingleViewEvent(new qx(e)),this._eventDispatcher.emitOutgoingEvent(new aL(!e,e))}onDidColorThemeChange(){this._eventDispatcher.emitSingleViewEvent(new eL)}_onConfigurationChanged(e,t){let i=null;if(-1!==this._viewportStartLine){let e=new Qt(this._viewportStartLine,this.getLineMinColumn(this._viewportStartLine));i=this.coordinatesConverter.convertViewPositionToModelPosition(e)}let n=!1;const o=this._configuration.options,r=o.get(36),s=o.get(112),a=o.get(118),l=o.get(111);if(this._lines.setWrappingSettings(r,s,a.wrappingColumn,l)&&(e.emitViewEvent(new Kx),e.emitViewEvent(new Gx),e.emitViewEvent(new jx(null)),this._cursor.onLineMappingChanged(e),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),0!==this.viewLayout.getCurrentScrollTop()&&(n=!0),this._updateConfigurationViewLineCount.schedule()),t.hasChanged(72)&&(this._decorations.reset(),e.emitViewEvent(new jx(null))),e.emitViewEvent(new zx(t)),this.viewLayout.onConfigurationChanged(t),n&&i){const e=this.coordinatesConverter.convertModelPositionToViewPosition(i),t=this.viewLayout.getVerticalOffsetForLineNumber(e.lineNumber);this.viewLayout.setScrollPosition({scrollTop:t+this._viewportStartLineDelta},1)}tv.shouldRecreate(t)&&(this.cursorConfig=new tv(this.model.getLanguageIdentifier(),this.model.getOptions(),this._configuration),this._cursor.updateConfiguration(this.cursorConfig))}_registerModelEvents(){this._register(this.model.onDidChangeRawContentFast(e=>{try{const t=this._eventDispatcher.beginEmitViewEvents();let i=!1,n=!1;const o=e.changes,r=e.versionId,s=this._lines.createLineBreaksComputer();for(const e of o)switch(e.changeType){case 4:for(const t of e.detail)s.addRequest(t,null);break;case 2:s.addRequest(e.detail,null);break}const a=s.finalize();let l=0;for(const e of o)switch(e.changeType){case 1:this._lines.onModelFlushed(),t.emitViewEvent(new Kx),this._decorations.reset(),this.viewLayout.onFlushed(this.getLineCount()),i=!0;break;case 3:{const n=this._lines.onModelLinesDeleted(r,e.fromLineNumber,e.toLineNumber);null!==n&&(t.emitViewEvent(n),this.viewLayout.onLinesDeleted(n.fromLineNumber,n.toLineNumber)),i=!0;break}case 4:{const n=a.slice(l,l+e.detail.length);l+=e.detail.length;const o=this._lines.onModelLinesInserted(r,e.fromLineNumber,e.toLineNumber,n);null!==o&&(t.emitViewEvent(o),this.viewLayout.onLinesInserted(o.fromLineNumber,o.toLineNumber)),i=!0;break}case 2:{const i=a[l];l++;const[o,s,c,h]=this._lines.onModelLineChanged(r,e.lineNumber,i);n=o,s&&t.emitViewEvent(s),c&&(t.emitViewEvent(c),this.viewLayout.onLinesInserted(c.fromLineNumber,c.toLineNumber)),h&&(t.emitViewEvent(h),this.viewLayout.onLinesDeleted(h.fromLineNumber,h.toLineNumber));break}case 5:break}this._lines.acceptVersionId(r),this.viewLayout.onHeightMaybeChanged(),!i&&n&&(t.emitViewEvent(new Gx),t.emitViewEvent(new jx(null)),this._cursor.onLineMappingChanged(t),this._decorations.onLineMappingChanged())}finally{this._eventDispatcher.endEmitViewEvents()}if(this._viewportStartLine=-1,this._configuration.setMaxLineNumber(this.model.getLineCount()),this._updateConfigurationViewLineCountNow(),!this._hasFocus&&this.model.getAttachedEditorCount()>=2&&this._viewportStartLineTrackedRange){const e=this.model._getTrackedRange(this._viewportStartLineTrackedRange);if(e){const t=this.coordinatesConverter.convertModelPositionToViewPosition(e.getStartPosition()),i=this.viewLayout.getVerticalOffsetForLineNumber(t.lineNumber);this.viewLayout.setScrollPosition({scrollTop:i+this._viewportStartLineDelta},1)}}try{const t=this._eventDispatcher.beginEmitViewEvents();this._cursor.onModelContentChanged(t,e)}finally{this._eventDispatcher.endEmitViewEvents()}})),this._register(this.model.onDidChangeTokens(e=>{let t=[];for(let i=0,n=e.ranges.length;i<n;i++){const n=e.ranges[i],o=this.coordinatesConverter.convertModelPositionToViewPosition(new Qt(n.fromLineNumber,1)).lineNumber,r=this.coordinatesConverter.convertModelPositionToViewPosition(new Qt(n.toLineNumber,this.model.getLineMaxColumn(n.toLineNumber))).lineNumber;t[i]={fromLineNumber:o,toLineNumber:r}}this._eventDispatcher.emitSingleViewEvent(new tL(t)),e.tokenizationSupportChanged&&this._tokenizeViewportSoon.schedule()})),this._register(this.model.onDidChangeLanguageConfiguration(e=>{this._eventDispatcher.emitSingleViewEvent(new $x),this.cursorConfig=new tv(this.model.getLanguageIdentifier(),this.model.getOptions(),this._configuration),this._cursor.updateConfiguration(this.cursorConfig)})),this._register(this.model.onDidChangeLanguage(e=>{this.cursorConfig=new tv(this.model.getLanguageIdentifier(),this.model.getOptions(),this._configuration),this._cursor.updateConfiguration(this.cursorConfig)})),this._register(this.model.onDidChangeOptions(e=>{if(this._lines.setTabSize(this.model.getOptions().tabSize)){try{const e=this._eventDispatcher.beginEmitViewEvents();e.emitViewEvent(new Kx),e.emitViewEvent(new Gx),e.emitViewEvent(new jx(null)),this._cursor.onLineMappingChanged(e),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount())}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule()}this.cursorConfig=new tv(this.model.getLanguageIdentifier(),this.model.getOptions(),this._configuration),this._cursor.updateConfiguration(this.cursorConfig)})),this._register(this.model.onDidChangeDecorations(e=>{this._decorations.onModelDecorationsChanged(),this._eventDispatcher.emitSingleViewEvent(new jx(e))}))}setHiddenAreas(e){try{const t=this._eventDispatcher.beginEmitViewEvents();let i=this._lines.setHiddenAreas(e);i&&(t.emitViewEvent(new Kx),t.emitViewEvent(new Gx),t.emitViewEvent(new jx(null)),this._cursor.onLineMappingChanged(t),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),this.viewLayout.onHeightMaybeChanged())}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule()}getVisibleRangesPlusViewportAboveBelow(){const e=this._configuration.options.get(117),t=this._configuration.options.get(51),i=Math.max(20,Math.round(e.height/t)),n=this.viewLayout.getLinesViewportData(),o=Math.max(1,n.completelyVisibleStartLineNumber-i),r=Math.min(this.getLineCount(),n.completelyVisibleEndLineNumber+i);return this._toModelVisibleRanges(new Jt(o,this.getLineMinColumn(o),r,this.getLineMaxColumn(r)))}getVisibleRanges(){const e=this.getCompletelyVisibleViewRange();return this._toModelVisibleRanges(e)}_toModelVisibleRanges(e){const t=this.coordinatesConverter.convertViewRangeToModelRange(e),i=this._lines.getHiddenAreas();if(0===i.length)return[t];let n=[],o=0,r=t.startLineNumber,s=t.startColumn,a=t.endLineNumber,l=t.endColumn;for(let c=0,h=i.length;c<h;c++){const e=i[c].startLineNumber,t=i[c].endLineNumber;t<r||(e>a||(r<e&&(n[o++]=new Jt(r,s,e-1,this.model.getLineMaxColumn(e-1))),r=t+1,s=1))}return(r<a||r===a&&s<l)&&(n[o++]=new Jt(r,s,a,l)),n}getCompletelyVisibleViewRange(){const e=this.viewLayout.getLinesViewportData(),t=e.completelyVisibleStartLineNumber,i=e.completelyVisibleEndLineNumber;return new Jt(t,this.getLineMinColumn(t),i,this.getLineMaxColumn(i))}getCompletelyVisibleViewRangeAtScrollTop(e){const t=this.viewLayout.getLinesViewportDataAtScrollTop(e),i=t.completelyVisibleStartLineNumber,n=t.completelyVisibleEndLineNumber;return new Jt(i,this.getLineMinColumn(i),n,this.getLineMaxColumn(n))}saveState(){const e=this.viewLayout.saveState(),t=e.scrollTop,i=this.viewLayout.getLineNumberAtVerticalOffset(t),n=this.coordinatesConverter.convertViewPositionToModelPosition(new Qt(i,this.getLineMinColumn(i))),o=this.viewLayout.getVerticalOffsetForLineNumber(i)-t;return{scrollLeft:e.scrollLeft,firstPosition:n,firstPositionDeltaTop:o}}reduceRestoreState(e){if("undefined"===typeof e.firstPosition)return this._reduceRestoreStateCompatibility(e);const t=this.model.validatePosition(e.firstPosition),i=this.coordinatesConverter.convertModelPositionToViewPosition(t),n=this.viewLayout.getVerticalOffsetForLineNumber(i.lineNumber)-e.firstPositionDeltaTop;return{scrollLeft:e.scrollLeft,scrollTop:n}}_reduceRestoreStateCompatibility(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTopWithoutViewZones}}getTabSize(){return this.model.getOptions().tabSize}getTextModelOptions(){return this.model.getOptions()}getLineCount(){return this._lines.getViewLineCount()}setViewport(e,t,i){this._viewportStartLine=e;let n=this.coordinatesConverter.convertViewPositionToModelPosition(new Qt(e,this.getLineMinColumn(e)));this._viewportStartLineTrackedRange=this.model._setTrackedRange(this._viewportStartLineTrackedRange,new Jt(n.lineNumber,n.column,n.lineNumber,n.column),1);const o=this.viewLayout.getVerticalOffsetForLineNumber(e),r=this.viewLayout.getCurrentScrollTop();this._viewportStartLineDelta=r-o}getActiveIndentGuide(e,t,i){return this._lines.getActiveIndentGuide(e,t,i)}getLinesIndentGuides(e,t){return this._lines.getViewLinesIndentGuides(e,t)}getLineContent(e){return this._lines.getViewLineContent(e)}getLineLength(e){return this._lines.getViewLineLength(e)}getLineMinColumn(e){return this._lines.getViewLineMinColumn(e)}getLineMaxColumn(e){return this._lines.getViewLineMaxColumn(e)}getLineFirstNonWhitespaceColumn(e){const t=yr["u"](this.getLineContent(e));return-1===t?0:t+1}getLineLastNonWhitespaceColumn(e){const t=yr["H"](this.getLineContent(e));return-1===t?0:t+2}getDecorationsInViewport(e){return this._decorations.getDecorationsViewportData(e).decorations}getViewLineRenderingData(e,t){let i=this.model.mightContainRTL(),n=this.model.mightContainNonBasicASCII(),o=this.getTabSize(),r=this._lines.getViewLineData(t),s=this._decorations.getDecorationsViewportData(e).inlineDecorations,a=s[t-e.startLineNumber];return new Nd(r.minColumn,r.maxColumn,r.content,r.continuesWithWrappedLine,i,n,r.tokens,a,o,r.startVisibleColumn)}getViewLineData(e){return this._lines.getViewLineData(e)}getMinimapLinesRenderingData(e,t,i){let n=this._lines.getViewLinesData(e,t,i);return new Ed(this.getTabSize(),n)}getAllOverviewRulerDecorations(e){return this._lines.getAllOverviewRulerDecorations(this._editorId,Z(this._configuration.options),e)}invalidateOverviewRulerColorCache(){const e=this.model.getOverviewRulerDecorations();for(const t of e){const e=t.options.overviewRuler;e&&e.invalidateCachedColor()}}invalidateMinimapColorCache(){const e=this.model.getAllDecorations();for(const t of e){const e=t.options.minimap;e&&e.invalidateCachedColor()}}getValueInRange(e,t){const i=this.coordinatesConverter.convertViewRangeToModelRange(e);return this.model.getValueInRange(i,t)}getModelLineMaxColumn(e){return this.model.getLineMaxColumn(e)}validateModelPosition(e){return this.model.validatePosition(e)}validateModelRange(e){return this.model.validateRange(e)}deduceModelPositionRelativeToViewPosition(e,t,i){const n=this.coordinatesConverter.convertViewPositionToModelPosition(e);2===this.model.getEOL().length&&(t<0?t-=i:t+=i);const o=this.model.getOffsetAt(n),r=o+t;return this.model.getPositionAt(r)}getEOL(){return this.model.getEOL()}getPlainTextToCopy(e,t,i){const n=i?"\r\n":this.model.getEOL();e=e.slice(0),e.sort(Jt.compareRangesUsingStarts);let o=!1,r=!1;for(const a of e)a.isEmpty()?o=!0:r=!0;if(!r){if(!t)return"";const i=e.map(e=>e.startLineNumber);let o="";for(let e=0;e<i.length;e++)e>0&&i[e-1]===i[e]||(o+=this.model.getLineContent(i[e])+n);return o}if(o&&t){let t=[],n=0;for(const o of e){const e=o.startLineNumber;o.isEmpty()?e!==n&&t.push(this.model.getLineContent(e)):t.push(this.model.getValueInRange(o,i?2:0)),n=e}return 1===t.length?t[0]:t}let s=[];for(const a of e)a.isEmpty()||s.push(this.model.getValueInRange(a,i?2:0));return 1===s.length?s[0]:s}getRichTextToCopy(e,t){const i=this.model.getLanguageIdentifier();if(1===i.id)return null;if(1!==e.length)return null;let n=e[0];if(n.isEmpty()){if(!t)return null;const e=n.startLineNumber;n=new Jt(e,this.model.getLineMinColumn(e),e,this.model.getLineMaxColumn(e))}const o=this._configuration.options.get(36),r=this._getColorMap(),s=o.fontFamily===le.fontFamily?o.fontFamily:`'${o.fontFamily}', ${le.fontFamily}`;return{mode:i.language,html:`<div style="color: ${r[1]};background-color: ${r[2]};font-family: ${s};font-weight: ${o.fontWeight};font-size: ${o.fontSize}px;line-height: ${o.lineHeight}px;white-space: pre;">`+this._getHTMLToCopy(n,r)+"</div>"}}_getHTMLToCopy(e,t){const i=e.startLineNumber,n=e.startColumn,o=e.endLineNumber,s=e.endColumn,a=this.getTabSize();let l="";for(let c=i;c<=o;c++){const e=this.model.getLineTokens(c),h=e.getLineContent(),d=c===i?n-1:0,u=c===o?s-1:h.length;l+=""===h?"<br>":_L(h,e.inflate(),t,d,u,a,r["i"])}return l}_getColorMap(){let e=Kl.getColorMap(),t=["#000000"];if(e)for(let i=1,n=e.length;i<n;i++)t[i]=Nb.Format.CSS.formatHex(e[i]);return t}pushStackElement(){this.model.pushStackElement()}getPrimaryCursorState(){return this._cursor.getPrimaryCursorState()}getLastAddedCursorIndex(){return this._cursor.getLastAddedCursorIndex()}getCursorStates(){return this._cursor.getCursorStates()}setCursorStates(e,t,i){this._withViewEventsCollector(n=>this._cursor.setStates(n,e,t,i))}getCursorColumnSelectData(){return this._cursor.getCursorColumnSelectData()}setCursorColumnSelectData(e){this._cursor.setCursorColumnSelectData(e)}getPrevEditOperationType(){return this._cursor.getPrevEditOperationType()}setPrevEditOperationType(e){this._cursor.setPrevEditOperationType(e)}getSelection(){return this._cursor.getSelection()}getSelections(){return this._cursor.getSelections()}getPosition(){return this._cursor.getPrimaryCursorState().modelState.position}setSelections(e,t){this._withViewEventsCollector(i=>this._cursor.setSelections(i,e,t))}saveCursorState(){return this._cursor.saveState()}restoreCursorState(e){this._withViewEventsCollector(t=>this._cursor.restoreState(t,e))}_executeCursorEdit(e){this._cursor.context.cursorConfig.readOnly?this._eventDispatcher.emitOutgoingEvent(new dL):this._withViewEventsCollector(e)}executeEdits(e,t,i){this._executeCursorEdit(n=>this._cursor.executeEdits(n,e,t,i))}startComposition(){this._cursor.setIsDoingComposition(!0),this._executeCursorEdit(e=>this._cursor.startComposition(e))}endComposition(e){this._cursor.setIsDoingComposition(!1),this._executeCursorEdit(t=>this._cursor.endComposition(t,e))}type(e,t){this._executeCursorEdit(i=>this._cursor.type(i,e,t))}replacePreviousChar(e,t,i){this._executeCursorEdit(n=>this._cursor.replacePreviousChar(n,e,t,i))}paste(e,t,i,n){this._executeCursorEdit(o=>this._cursor.paste(o,e,t,i,n))}cut(e){this._executeCursorEdit(t=>this._cursor.cut(t,e))}executeCommand(e,t){this._executeCursorEdit(i=>this._cursor.executeCommand(i,e,t))}executeCommands(e,t){this._executeCursorEdit(i=>this._cursor.executeCommands(i,e,t))}revealPrimaryCursor(e,t){this._withViewEventsCollector(i=>this._cursor.revealPrimary(i,e,t,0))}revealTopMostCursor(e){const t=this._cursor.getTopMostViewPosition(),i=new Jt(t.lineNumber,t.column,t.lineNumber,t.column);this._withViewEventsCollector(t=>t.emitViewEvent(new Qx(e,i,null,0,!0,0)))}revealBottomMostCursor(e){const t=this._cursor.getBottomMostViewPosition(),i=new Jt(t.lineNumber,t.column,t.lineNumber,t.column);this._withViewEventsCollector(t=>t.emitViewEvent(new Qx(e,i,null,0,!0,0)))}revealRange(e,t,i,n,o){this._withViewEventsCollector(r=>r.emitViewEvent(new Qx(e,i,null,n,t,o)))}getVerticalOffsetForLineNumber(e){return this.viewLayout.getVerticalOffsetForLineNumber(e)}getScrollTop(){return this.viewLayout.getCurrentScrollTop()}setScrollTop(e,t){this.viewLayout.setScrollPosition({scrollTop:e},t)}setScrollPosition(e,t){this.viewLayout.setScrollPosition(e,t)}deltaScrollNow(e,t){this.viewLayout.deltaScrollNow(e,t)}changeWhitespace(e){const t=this.viewLayout.changeWhitespace(e);t&&(this._eventDispatcher.emitSingleViewEvent(new nL),this._eventDispatcher.emitOutgoingEvent(new cL))}setMaxLineWidth(e){this.viewLayout.setMaxLineWidth(e)}_withViewEventsCollector(e){try{const t=this._eventDispatcher.beginEmitViewEvents();e(t)}finally{this._eventDispatcher.endEmitViewEvents()}}}class UL{constructor(...e){this._entries=new Map;for(let[t,i]of e)this.set(t,i)}set(e,t){const i=this._entries.get(e);return this._entries.set(e,t),i}has(e){return this._entries.has(e)}get(e){return this._entries.get(e)}}const jL=zi("accessibilityService"),KL=new Zf("accessibilityModeEnabled",!1);class qL extends yh{constructor(e,t){super(0);for(let i=0;i<e.length;i++)this.set(e.charCodeAt(i),1);for(let i=0;i<t.length;i++)this.set(t.charCodeAt(i),2)}get(e){return e>=0&&e<256?this._asciiMap[e]:e>=12352&&e<=12543||e>=13312&&e<=19903||e>=19968&&e<=40959?3:this._map.get(e)||this._defaultValue}}let $L=[],GL=[];class YL{constructor(e,t){this.classifier=new qL(e,t)}static create(e){return new YL(e.get(108),e.get(107))}createLineBreaksComputer(e,t,i,n){t|=0,i=+i;let o=[],r=[];return{addRequest:(e,t)=>{o.push(e),r.push(t)},finalize:()=>{const s=e.typicalFullwidthCharacterWidth/e.typicalHalfwidthCharacterWidth;let a=[];for(let e=0,l=o.length;e<l;e++){const l=r[e];a[e]=l?XL(this.classifier,l,o[e],t,i,s,n):ZL(this.classifier,o[e],t,i,s,n)}return $L.length=0,GL.length=0,a}}}}function XL(e,t,i,n,o,r,s){if(-1===o)return null;const a=i.length;if(a<=1)return null;const l=t.breakOffsets,c=t.breakOffsetsVisibleColumn,h=tk(i,n,o,r,s),d=o-h;let u=$L,g=GL,f=0,m=0,p=0,_=o;const b=l.length;let v=0;if(v>=0){let e=Math.abs(c[v]-_);while(v+1<b){const t=Math.abs(c[v+1]-_);if(t>=e)break;e=t,v++}}while(v<b){let t=v<0?0:l[v],o=v<0?0:c[v];m>t&&(t=m,o=p);let s=0,h=0,w=0,C=0;if(o<=_){let p=o,b=0===t?0:i.charCodeAt(t-1),v=0===t?0:e.get(b),y=!0;for(let o=t;o<a;o++){const t=o,a=i.charCodeAt(o);let l,c;if(yr["D"](a)?(o++,l=0,c=2):(l=e.get(a),c=QL(a,p,n,r)),t>m&&ek(b,v,a,l)&&(s=t,h=p),p+=c,p>_){t>m?(w=t,C=p-c):(w=o+1,C=p),p-h>d&&(s=0),y=!1;break}b=a,v=l}if(y){f>0&&(u[f]=l[l.length-1],g[f]=c[l.length-1],f++);break}}if(0===s){let a=o,l=i.charCodeAt(t),c=e.get(l),u=!1;for(let n=t-1;n>=m;n--){const t=n+1,o=i.charCodeAt(n);if(9===o){u=!0;break}let g,f;if(yr["E"](o)?(n--,g=0,f=2):(g=e.get(o),f=yr["C"](o)?r:1),a<=_){if(0===w&&(w=t,C=a),a<=_-d)break;if(ek(o,g,l,c)){s=t,h=a;break}}a-=f,l=o,c=g}if(0!==s){const e=d-(C-h);if(e<=n){const t=i.charCodeAt(w);let o;o=yr["D"](t)?2:QL(t,C,n,r),e-o<0&&(s=0)}}if(u){v--;continue}}0===s&&(s=w,h=C),m=s,u[f]=s,p=h,g[f]=h,f++,_=h+d;while(v<0||v<b&&c[v]<h)v++;let y=Math.abs(c[v]-_);while(v+1<b){const e=Math.abs(c[v+1]-_);if(e>=y)break;y=e,v++}}return 0===f?null:(u.length=f,g.length=f,$L=t.breakOffsets,GL=t.breakOffsetsVisibleColumn,t.breakOffsets=u,t.breakOffsetsVisibleColumn=g,t.wrappedTextIndentLength=h,t)}function ZL(e,t,i,n,o,r){if(-1===n)return null;const s=t.length;if(s<=1)return null;const a=tk(t,i,n,o,r),l=n-a;let c=[],h=[],d=0,u=0,g=0,f=n,m=t.charCodeAt(0),p=e.get(m),_=QL(m,0,i,o),b=1;yr["D"](m)&&(_+=1,m=t.charCodeAt(1),p=e.get(m),b++);for(let v=b;v<s;v++){const n=v,r=t.charCodeAt(v);let s,a;yr["D"](r)?(v++,s=0,a=2):(s=e.get(r),a=QL(r,_,i,o)),ek(m,p,r,s)&&(u=n,g=_),_+=a,_>f&&((0===u||_-g>l)&&(u=n,g=_-a),c[d]=u,h[d]=g,d++,f=g+l,u=0),m=r,p=s}return 0===d?null:(c[d]=s,h[d]=_,new kL(c,h,a))}function QL(e,t,i,n){return 9===e?i-t%i:yr["C"](e)?n:1}function JL(e,t){return t-e%t}function ek(e,t,i,n){return 32!==i&&(2===t||3===t&&2!==n||1===n||3===n&&1!==t)}function tk(e,t,i,n,o){let r=0;if(0!==o){const s=yr["u"](e);if(-1!==s){for(let i=0;i<s;i++){const n=9===e.charCodeAt(i)?JL(r,t):1;r+=n}const a=3===o?2:2===o?1:0;for(let e=0;e<a;e++){const e=JL(r,t);r+=e}r+n>i&&(r=0)}}return r}class ik{static create(){return new ik}constructor(){}createLineBreaksComputer(e,t,i,n){t|=0,i=+i;let o=[];return{addRequest:(e,t)=>{o.push(e)},finalize:()=>nk(o,e,t,i,n)}}}function nk(e,t,i,n,o){if(-1===n){const t=[];for(let i=0,n=e.length;i<n;i++)t[i]=null;return t}const r=Math.round(n*t.typicalHalfwidthCharacterWidth);2!==o&&3!==o||(o=1);const s=document.createElement("div");Nf.applyFontInfoSlow(s,t);const a=vc(1e4),l=[],c=[],h=[],d=[],u=[];for(let p=0;p<e.length;p++){const n=e[p];let s=0,g=0,f=r;if(0!==o)if(s=yr["u"](n),-1===s)s=0;else{for(let t=0;t<s;t++){const e=9===n.charCodeAt(t)?i-g%i:1;g+=e}const e=Math.ceil(t.spaceWidth*g);e+t.typicalFullwidthCharacterWidth>r?(s=0,g=0):f=r-e}const m=n.substr(s),_=ok(m,g,i,f,a);l[p]=s,c[p]=g,h[p]=m,d[p]=_[0],u[p]=_[1]}s.innerHTML=a.build(),s.style.position="absolute",s.style.top="10000",s.style.wordWrap="break-word",document.body.appendChild(s);let g=document.createRange();const f=Array.prototype.slice.call(s.children,0);let m=[];for(let p=0;p<e.length;p++){const e=f[p],t=rk(g,e,h[p],d[p]);if(null===t){m[p]=null;continue}const i=l[p],n=c[p],o=u[p],r=[];for(let s=0,a=t.length;s<a;s++)r[s]=o[t[s]];if(0!==i)for(let s=0,a=t.length;s<a;s++)t[s]+=i;m[p]=new kL(t,r,n)}return document.body.removeChild(s),m}function ok(e,t,i,n,o){o.appendASCIIString('<div style="width:'),o.appendASCIIString(String(n)),o.appendASCIIString('px;">');const r=e.length;let s=t,a=0,l=[],c=[],h=0<r?e.charCodeAt(0):0;o.appendASCIIString("<span>");for(let d=0;d<r;d++){0!==d&&d%16384===0&&o.appendASCIIString("</span><span>"),l[d]=a,c[d]=s;const t=h;h=d+1<r?e.charCodeAt(d+1):0;let n=1,u=1;switch(t){case 9:n=i-s%i,u=n;for(let e=1;e<=n;e++)e<n?o.write1(160):o.appendASCII(32);break;case 32:32===h?o.write1(160):o.appendASCII(32);break;case 60:o.appendASCIIString("&lt;");break;case 62:o.appendASCIIString("&gt;");break;case 38:o.appendASCIIString("&amp;");break;case 0:o.appendASCIIString("&#00;");break;case 65279:case 8232:case 8233:case 133:o.write1(65533);break;default:yr["C"](t)&&u++,o.write1(t)}a+=n,s+=u}return o.appendASCIIString("</span>"),l[e.length]=a,c[e.length]=s,o.appendASCIIString("</div>"),[l,c]}function rk(e,t,i,n){if(i.length<=1)return null;const o=Array.prototype.slice.call(t.children,0),r=[];try{sk(e,o,n,0,null,i.length-1,null,r)}catch(s){return console.log(s),null}return 0===r.length?null:(r.push(i.length),r)}function sk(e,t,i,n,o,r,s,a){if(n===r)return;if(o=o||ak(e,t,i[n],i[n+1]),s=s||ak(e,t,i[r],i[r+1]),Math.abs(o[0].top-s[0].top)<=.1)return;if(n+1===r)return void a.push(r);const l=n+(r-n)/2|0,c=ak(e,t,i[l],i[l+1]);sk(e,t,i,n,o,l,c,a),sk(e,t,i,l,c,r,s,a)}function ak(e,t,i,n){return e.setStart(t[i/16384|0].firstChild,i%16384),e.setEnd(t[n/16384|0].firstChild,n%16384),e.getClientRects()}var lk=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},ck=function(e,t){return function(i,n){t(i,n,e)}};let hk=0;class dk{constructor(e,t,i,n,o){this.model=e,this.viewModel=t,this.view=i,this.hasRealView=n,this.listenersToRemove=o}dispose(){Ne(this.listenersToRemove),this.model.onBeforeDetached(),this.hasRealView&&this.view.dispose(),this.viewModel.dispose()}}let uk=class e extends Oe{constructor(e,t,i,n,o,r,s,a,l,c){let h;super(),this._onDidDispose=this._register(new Ve),this.onDidDispose=this._onDidDispose.event,this._onDidChangeModelContent=this._register(new Ve),this.onDidChangeModelContent=this._onDidChangeModelContent.event,this._onDidChangeModelLanguage=this._register(new Ve),this.onDidChangeModelLanguage=this._onDidChangeModelLanguage.event,this._onDidChangeModelLanguageConfiguration=this._register(new Ve),this.onDidChangeModelLanguageConfiguration=this._onDidChangeModelLanguageConfiguration.event,this._onDidChangeModelOptions=this._register(new Ve),this.onDidChangeModelOptions=this._onDidChangeModelOptions.event,this._onDidChangeModelDecorations=this._register(new Ve),this.onDidChangeModelDecorations=this._onDidChangeModelDecorations.event,this._onDidChangeConfiguration=this._register(new Ve),this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this._onDidChangeModel=this._register(new Ve),this.onDidChangeModel=this._onDidChangeModel.event,this._onDidChangeCursorPosition=this._register(new Ve),this.onDidChangeCursorPosition=this._onDidChangeCursorPosition.event,this._onDidChangeCursorSelection=this._register(new Ve),this.onDidChangeCursorSelection=this._onDidChangeCursorSelection.event,this._onDidAttemptReadOnlyEdit=this._register(new Ve),this.onDidAttemptReadOnlyEdit=this._onDidAttemptReadOnlyEdit.event,this._onDidLayoutChange=this._register(new Ve),this.onDidLayoutChange=this._onDidLayoutChange.event,this._editorTextFocus=this._register(new gk),this.onDidFocusEditorText=this._editorTextFocus.onDidChangeToTrue,this.onDidBlurEditorText=this._editorTextFocus.onDidChangeToFalse,this._editorWidgetFocus=this._register(new gk),this.onDidFocusEditorWidget=this._editorWidgetFocus.onDidChangeToTrue,this.onDidBlurEditorWidget=this._editorWidgetFocus.onDidChangeToFalse,this._onWillType=this._register(new Ve),this.onWillType=this._onWillType.event,this._onDidType=this._register(new Ve),this.onDidType=this._onDidType.event,this._onDidCompositionStart=this._register(new Ve),this.onDidCompositionStart=this._onDidCompositionStart.event,this._onDidCompositionEnd=this._register(new Ve),this.onDidCompositionEnd=this._onDidCompositionEnd.event,this._onDidPaste=this._register(new Ve),this.onDidPaste=this._onDidPaste.event,this._onMouseUp=this._register(new Ve),this.onMouseUp=this._onMouseUp.event,this._onMouseDown=this._register(new Ve),this.onMouseDown=this._onMouseDown.event,this._onMouseDrag=this._register(new Ve),this.onMouseDrag=this._onMouseDrag.event,this._onMouseDrop=this._register(new Ve),this.onMouseDrop=this._onMouseDrop.event,this._onContextMenu=this._register(new Ve),this.onContextMenu=this._onContextMenu.event,this._onMouseMove=this._register(new Ve),this.onMouseMove=this._onMouseMove.event,this._onMouseLeave=this._register(new Ve),this.onMouseLeave=this._onMouseLeave.event,this._onMouseWheel=this._register(new Ve),this.onMouseWheel=this._onMouseWheel.event,this._onKeyUp=this._register(new Ve),this.onKeyUp=this._onKeyUp.event,this._onKeyDown=this._register(new Ve),this.onKeyDown=this._onKeyDown.event,this._onDidContentSizeChange=this._register(new Ve),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._onDidScrollChange=this._register(new Ve),this.onDidScrollChange=this._onDidScrollChange.event,this._onDidChangeViewZones=this._register(new Ve),this.onDidChangeViewZones=this._onDidChangeViewZones.event,t=t||{},this._domElement=e,this._overflowWidgetsDomNode=t.overflowWidgetsDomNode,this._id=++hk,this._decorationTypeKeysToIds={},this._decorationTypeSubtypes={},this.isSimpleWidget=i.isSimpleWidget||!1,this._telemetryData=i.telemetryData,this._configuration=this._register(this._createConfiguration(t,c)),this._register(this._configuration.onDidChange(e=>{this._onDidChangeConfiguration.fire(e);const t=this._configuration.options;if(e.hasChanged(117)){const e=t.get(117);this._onDidLayoutChange.fire(e)}})),this._contextKeyService=this._register(s.createScoped(this._domElement)),this._notificationService=l,this._codeEditorService=o,this._commandService=r,this._themeService=a,this._register(new fk(this,this._contextKeyService)),this._register(new mk(this,this._contextKeyService)),this._instantiationService=n.createChild(new UL([Qf,this._contextKeyService])),this._modelData=null,this._contributions={},this._actions={},this._focusTracker=new pk(e),this._focusTracker.onChange(()=>{this._editorWidgetFocus.setValue(this._focusTracker.hasFocus())}),this._contentWidgets={},this._overlayWidgets={},h=Array.isArray(i.contributions)?i.contributions:bm.getEditorContributions();for(const u of h)try{const e=this._instantiationService.createInstance(u.ctor,this);this._contributions[u.id]=e}catch(d){me(d)}bm.getEditorActions().forEach(e=>{const t=new pL(e.id,e.label,e.alias,Kr(e.precondition),()=>this._instantiationService.invokeFunction(t=>Promise.resolve(e.runEditorCommand(t,this,null))),this._contextKeyService);this._actions[t.id]=t}),this._codeEditorService.addCodeEditor(this)}_createConfiguration(e,t){return new Nf(this.isSimpleWidget,e,this._domElement,t)}getId(){return this.getEditorType()+":"+this._id}getEditorType(){return ws.ICodeEditor}dispose(){this._codeEditorService.removeCodeEditor(this),this._focusTracker.dispose();const e=Object.keys(this._contributions);for(let t=0,i=e.length;t<i;t++){const i=e[t];this._contributions[i].dispose()}this._removeDecorationTypes(),this._postDetachModelCleanup(this._detachModel()),this._onDidDispose.fire(),super.dispose()}invokeWithinContext(e){return this._instantiationService.invokeFunction(e)}updateOptions(e){this._configuration.updateOptions(e)}getOptions(){return this._configuration.options}getOption(e){return this._configuration.options.get(e)}getRawOptions(){return this._configuration.getRawOptions()}getOverflowWidgetsDomNode(){return this._overflowWidgetsDomNode}getConfiguredWordAtPosition(e){return this._modelData?by.getWordAtPosition(this._modelData.model,this._configuration.options.get(105),e):null}getValue(e=null){if(!this._modelData)return"";const t=!(!e||!e.preserveBOM);let i=0;return e&&e.lineEnding&&"\n"===e.lineEnding?i=1:e&&e.lineEnding&&"\r\n"===e.lineEnding&&(i=2),this._modelData.model.getValue(i,t)}setValue(e){this._modelData&&this._modelData.model.setValue(e)}getModel(){return this._modelData?this._modelData.model:null}setModel(e=null){const t=e;if(null===this._modelData&&null===t)return;if(this._modelData&&this._modelData.model===t)return;const i=this.hasTextFocus(),n=this._detachModel();this._attachModel(t),i&&this.hasModel()&&this.focus();const o={oldModelUrl:n?n.uri:null,newModelUrl:t?t.uri:null};this._removeDecorationTypes(),this._onDidChangeModel.fire(o),this._postDetachModelCleanup(n)}_removeDecorationTypes(){if(this._decorationTypeKeysToIds={},this._decorationTypeSubtypes){for(let e in this._decorationTypeSubtypes){const t=this._decorationTypeSubtypes[e];for(let i in t)this._removeDecorationType(e+"-"+i)}this._decorationTypeSubtypes={}}}getVisibleRanges(){return this._modelData?this._modelData.viewModel.getVisibleRanges():[]}getVisibleRangesPlusViewportAboveBelow(){return this._modelData?this._modelData.viewModel.getVisibleRangesPlusViewportAboveBelow():[]}getWhitespaces(){return this._modelData?this._modelData.viewModel.viewLayout.getWhitespaces():[]}static _getVerticalOffsetForPosition(e,t,i){const n=e.model.validatePosition({lineNumber:t,column:i}),o=e.viewModel.coordinatesConverter.convertModelPositionToViewPosition(n);return e.viewModel.viewLayout.getVerticalOffsetForLineNumber(o.lineNumber)}getTopForLineNumber(t){return this._modelData?e._getVerticalOffsetForPosition(this._modelData,t,1):-1}getTopForPosition(t,i){return this._modelData?e._getVerticalOffsetForPosition(this._modelData,t,i):-1}setHiddenAreas(e){this._modelData&&this._modelData.viewModel.setHiddenAreas(e.map(e=>Jt.lift(e)))}getVisibleColumnFromPosition(e){if(!this._modelData)return e.column;const t=this._modelData.model.validatePosition(e),i=this._modelData.model.getOptions().tabSize;return lv.visibleColumnFromColumn(this._modelData.model.getLineContent(t.lineNumber),t.column,i)+1}getPosition(){return this._modelData?this._modelData.viewModel.getPosition():null}setPosition(e){if(this._modelData){if(!Qt.isIPosition(e))throw new Error("Invalid arguments");this._modelData.viewModel.setSelections("api",[{selectionStartLineNumber:e.lineNumber,selectionStartColumn:e.column,positionLineNumber:e.lineNumber,positionColumn:e.column}])}}_sendRevealRange(e,t,i,n){if(!this._modelData)return;if(!Jt.isIRange(e))throw new Error("Invalid arguments");const o=this._modelData.model.validateRange(e),r=this._modelData.viewModel.coordinatesConverter.convertModelRangeToViewRange(o);this._modelData.viewModel.revealRange("api",i,r,t,n)}revealLine(e,t=0){this._revealLine(e,0,t)}revealLineInCenter(e,t=0){this._revealLine(e,1,t)}revealLineInCenterIfOutsideViewport(e,t=0){this._revealLine(e,2,t)}revealLineNearTop(e,t=0){this._revealLine(e,5,t)}_revealLine(e,t,i){if("number"!==typeof e)throw new Error("Invalid arguments");this._sendRevealRange(new Jt(e,1,e,1),t,!1,i)}revealPosition(e,t=0){this._revealPosition(e,0,!0,t)}revealPositionInCenter(e,t=0){this._revealPosition(e,1,!0,t)}revealPositionInCenterIfOutsideViewport(e,t=0){this._revealPosition(e,2,!0,t)}revealPositionNearTop(e,t=0){this._revealPosition(e,5,!0,t)}_revealPosition(e,t,i,n){if(!Qt.isIPosition(e))throw new Error("Invalid arguments");this._sendRevealRange(new Jt(e.lineNumber,e.column,e.lineNumber,e.column),t,i,n)}getSelection(){return this._modelData?this._modelData.viewModel.getSelection():null}getSelections(){return this._modelData?this._modelData.viewModel.getSelections():null}setSelection(e){const t=ei.isISelection(e),i=Jt.isIRange(e);if(!t&&!i)throw new Error("Invalid arguments");if(t)this._setSelectionImpl(e);else if(i){const t={selectionStartLineNumber:e.startLineNumber,selectionStartColumn:e.startColumn,positionLineNumber:e.endLineNumber,positionColumn:e.endColumn};this._setSelectionImpl(t)}}_setSelectionImpl(e){if(!this._modelData)return;const t=new ei(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn);this._modelData.viewModel.setSelections("api",[t])}revealLines(e,t,i=0){this._revealLines(e,t,0,i)}revealLinesInCenter(e,t,i=0){this._revealLines(e,t,1,i)}revealLinesInCenterIfOutsideViewport(e,t,i=0){this._revealLines(e,t,2,i)}revealLinesNearTop(e,t,i=0){this._revealLines(e,t,5,i)}_revealLines(e,t,i,n){if("number"!==typeof e||"number"!==typeof t)throw new Error("Invalid arguments");this._sendRevealRange(new Jt(e,1,t,1),i,!1,n)}revealRange(e,t=0,i=!1,n=!0){this._revealRange(e,i?1:0,n,t)}revealRangeInCenter(e,t=0){this._revealRange(e,1,!0,t)}revealRangeInCenterIfOutsideViewport(e,t=0){this._revealRange(e,2,!0,t)}revealRangeNearTop(e,t=0){this._revealRange(e,5,!0,t)}revealRangeNearTopIfOutsideViewport(e,t=0){this._revealRange(e,6,!0,t)}revealRangeAtTop(e,t=0){this._revealRange(e,3,!0,t)}_revealRange(e,t,i,n){if(!Jt.isIRange(e))throw new Error("Invalid arguments");this._sendRevealRange(Jt.lift(e),t,i,n)}setSelections(e,t="api"){if(this._modelData){if(!e||0===e.length)throw new Error("Invalid arguments");for(let t=0,i=e.length;t<i;t++)if(!ei.isISelection(e[t]))throw new Error("Invalid arguments");this._modelData.viewModel.setSelections(t,e)}}getContentWidth(){return this._modelData?this._modelData.viewModel.viewLayout.getContentWidth():-1}getScrollWidth(){return this._modelData?this._modelData.viewModel.viewLayout.getScrollWidth():-1}getScrollLeft(){return this._modelData?this._modelData.viewModel.viewLayout.getCurrentScrollLeft():-1}getContentHeight(){return this._modelData?this._modelData.viewModel.viewLayout.getContentHeight():-1}getScrollHeight(){return this._modelData?this._modelData.viewModel.viewLayout.getScrollHeight():-1}getScrollTop(){return this._modelData?this._modelData.viewModel.viewLayout.getCurrentScrollTop():-1}setScrollLeft(e,t=1){if(this._modelData){if("number"!==typeof e)throw new Error("Invalid arguments");this._modelData.viewModel.setScrollPosition({scrollLeft:e},t)}}setScrollTop(e,t=1){if(this._modelData){if("number"!==typeof e)throw new Error("Invalid arguments");this._modelData.viewModel.setScrollPosition({scrollTop:e},t)}}setScrollPosition(e,t=1){this._modelData&&this._modelData.viewModel.setScrollPosition(e,t)}saveViewState(){if(!this._modelData)return null;const e={},t=Object.keys(this._contributions);for(const o of t){const t=this._contributions[o];"function"===typeof t.saveViewState&&(e[o]=t.saveViewState())}const i=this._modelData.viewModel.saveCursorState(),n=this._modelData.viewModel.saveState();return{cursorState:i,viewState:n,contributionsState:e}}restoreViewState(e){if(!this._modelData||!this._modelData.hasRealView)return;const t=e;if(t&&t.cursorState&&t.viewState){const e=t.cursorState;Array.isArray(e)?this._modelData.viewModel.restoreCursorState(e):this._modelData.viewModel.restoreCursorState([e]);const i=t.contributionsState||{},n=Object.keys(this._contributions);for(let t=0,r=n.length;t<r;t++){const e=n[t],o=this._contributions[e];"function"===typeof o.restoreViewState&&o.restoreViewState(i[e])}const o=this._modelData.viewModel.reduceRestoreState(t.viewState);this._modelData.view.restoreState(o)}}getContribution(e){return this._contributions[e]||null}getActions(){const e=[],t=Object.keys(this._actions);for(let i=0,n=t.length;i<n;i++){const n=t[i];e.push(this._actions[n])}return e}getSupportedActions(){let e=this.getActions();return e=e.filter(e=>e.isSupported()),e}getAction(e){return this._actions[e]||null}trigger(e,t,i){switch(i=i||{},t){case"compositionStart":return void this._startComposition();case"compositionEnd":return void this._endComposition(e);case"type":{const t=i;return void this._type(e,t.text||"")}case"replacePreviousChar":{const t=i;return void this._replacePreviousChar(e,t.text||"",t.replaceCharCnt||0)}case"paste":{const t=i;return void this._paste(e,t.text||"",t.pasteOnNewLine||!1,t.multicursorText||null,t.mode||null)}case"cut":return void this._cut(e)}const n=this.getAction(t);n?Promise.resolve(n.run()).then(void 0,me):this._modelData&&this._triggerEditorCommand(e,t,i)}_startComposition(){this._modelData&&(this._modelData.viewModel.startComposition(),this._onDidCompositionStart.fire())}_endComposition(e){this._modelData&&(this._modelData.viewModel.endComposition(e),this._onDidCompositionEnd.fire())}_type(e,t){this._modelData&&0!==t.length&&("keyboard"===e&&this._onWillType.fire(t),this._modelData.viewModel.type(t,e),"keyboard"===e&&this._onDidType.fire(t))}_replacePreviousChar(e,t,i){this._modelData&&this._modelData.viewModel.replacePreviousChar(t,i,e)}_paste(e,t,i,n,o){if(!this._modelData||0===t.length)return;const r=this._modelData.viewModel.getSelection().getStartPosition();this._modelData.viewModel.paste(t,i,n,e);const s=this._modelData.viewModel.getSelection().getStartPosition();"keyboard"===e&&this._onDidPaste.fire({range:new Jt(r.lineNumber,r.column,s.lineNumber,s.column),mode:o})}_cut(e){this._modelData&&this._modelData.viewModel.cut(e)}_triggerEditorCommand(e,t,i){const n=bm.getEditorCommand(t);return!!n&&(i=i||{},i.source=e,this._instantiationService.invokeFunction(e=>{Promise.resolve(n.runEditorCommand(e,this,i)).then(void 0,me)}),!0)}_getViewModel(){return this._modelData?this._modelData.viewModel:null}pushUndoStop(){return!!this._modelData&&(!this._configuration.options.get(72)&&(this._modelData.model.pushStackElement(),!0))}executeEdits(e,t,i){if(!this._modelData)return!1;if(this._configuration.options.get(72))return!1;let n;return n=i?Array.isArray(i)?()=>i:i:()=>null,this._modelData.viewModel.executeEdits(e,t,n),!0}executeCommand(e,t){this._modelData&&this._modelData.viewModel.executeCommand(t,e)}executeCommands(e,t){this._modelData&&this._modelData.viewModel.executeCommands(t,e)}changeDecorations(e){return this._modelData?this._modelData.model.changeDecorations(e,this._id):null}getLineDecorations(e){return this._modelData?this._modelData.model.getLineDecorations(e,this._id,Z(this._configuration.options)):null}deltaDecorations(e,t){return this._modelData?0===e.length&&0===t.length?e:this._modelData.model.deltaDecorations(e,t,this._id):[]}removeDecorations(e){const t=this._decorationTypeKeysToIds[e];t&&this.deltaDecorations(t,[]),this._decorationTypeKeysToIds.hasOwnProperty(e)&&delete this._decorationTypeKeysToIds[e],this._decorationTypeSubtypes.hasOwnProperty(e)&&delete this._decorationTypeSubtypes[e]}getLayoutInfo(){const e=this._configuration.options,t=e.get(117);return t}createOverviewRuler(e){return this._modelData&&this._modelData.hasRealView?this._modelData.view.createOverviewRuler(e):null}getContainerDomNode(){return this._domElement}getDomNode(){return this._modelData&&this._modelData.hasRealView?this._modelData.view.domNode.domNode:null}delegateVerticalScrollbarMouseDown(e){this._modelData&&this._modelData.hasRealView&&this._modelData.view.delegateVerticalScrollbarMouseDown(e)}layout(e){this._configuration.observeReferenceElement(e),this.render()}focus(){this._modelData&&this._modelData.hasRealView&&this._modelData.view.focus()}hasTextFocus(){return!(!this._modelData||!this._modelData.hasRealView)&&this._modelData.view.isFocused()}hasWidgetFocus(){return this._focusTracker&&this._focusTracker.hasFocus()}addContentWidget(e){const t={widget:e,position:e.getPosition()};this._contentWidgets.hasOwnProperty(e.getId())&&console.warn("Overwriting a content widget with the same id."),this._contentWidgets[e.getId()]=t,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addContentWidget(t)}layoutContentWidget(e){const t=e.getId();if(this._contentWidgets.hasOwnProperty(t)){const i=this._contentWidgets[t];i.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutContentWidget(i)}}removeContentWidget(e){const t=e.getId();if(this._contentWidgets.hasOwnProperty(t)){const e=this._contentWidgets[t];delete this._contentWidgets[t],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeContentWidget(e)}}addOverlayWidget(e){const t={widget:e,position:e.getPosition()};this._overlayWidgets.hasOwnProperty(e.getId())&&console.warn("Overwriting an overlay widget with the same id."),this._overlayWidgets[e.getId()]=t,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addOverlayWidget(t)}layoutOverlayWidget(e){const t=e.getId();if(this._overlayWidgets.hasOwnProperty(t)){const i=this._overlayWidgets[t];i.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutOverlayWidget(i)}}removeOverlayWidget(e){const t=e.getId();if(this._overlayWidgets.hasOwnProperty(t)){const e=this._overlayWidgets[t];delete this._overlayWidgets[t],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeOverlayWidget(e)}}changeViewZones(e){this._modelData&&this._modelData.hasRealView&&this._modelData.view.change(e)}getTargetAtClientPoint(e,t){return this._modelData&&this._modelData.hasRealView?this._modelData.view.getTargetAtClientPoint(e,t):null}getScrolledVisiblePosition(t){if(!this._modelData||!this._modelData.hasRealView)return null;const i=this._modelData.model.validatePosition(t),n=this._configuration.options,o=n.get(117),r=e._getVerticalOffsetForPosition(this._modelData,i.lineNumber,i.column)-this.getScrollTop(),s=this._modelData.view.getOffsetForColumn(i.lineNumber,i.column)+o.glyphMarginWidth+o.lineNumbersWidth+o.decorationsWidth-this.getScrollLeft();return{top:r,left:s,height:n.get(51)}}getOffsetForColumn(e,t){return this._modelData&&this._modelData.hasRealView?this._modelData.view.getOffsetForColumn(e,t):-1}render(e=!1){this._modelData&&this._modelData.hasRealView&&this._modelData.view.render(!0,e)}setAriaOptions(e){this._modelData&&this._modelData.hasRealView&&this._modelData.view.setAriaOptions(e)}applyFontInfo(e){Nf.applyFontInfoSlow(e,this._configuration.options.get(36))}_attachModel(e){if(!e)return void(this._modelData=null);const t=[];this._domElement.setAttribute("data-mode-id",e.getLanguageIdentifier().language),this._configuration.setIsDominatedByLongLines(e.isDominatedByLongLines()),this._configuration.setMaxLineNumber(e.getLineCount()),e.onBeforeAttached();const i=new zL(this._id,this._configuration,e,ik.create(),YL.create(this._configuration.options),e=>bo(e));t.push(e.onDidChangeDecorations(e=>this._onDidChangeModelDecorations.fire(e))),t.push(e.onDidChangeLanguage(t=>{this._domElement.setAttribute("data-mode-id",e.getLanguageIdentifier().language),this._onDidChangeModelLanguage.fire(t)})),t.push(e.onDidChangeLanguageConfiguration(e=>this._onDidChangeModelLanguageConfiguration.fire(e))),t.push(e.onDidChangeContent(e=>this._onDidChangeModelContent.fire(e))),t.push(e.onDidChangeOptions(e=>this._onDidChangeModelOptions.fire(e))),t.push(e.onWillDispose(()=>this.setModel(null))),t.push(i.onEvent(e=>{switch(e.kind){case 0:this._onDidContentSizeChange.fire(e);break;case 1:this._editorTextFocus.setValue(e.hasFocus);break;case 2:this._onDidScrollChange.fire(e);break;case 3:this._onDidChangeViewZones.fire();break;case 4:this._onDidAttemptReadOnlyEdit.fire();break;case 5:{e.reachedMaxCursorCount&&this._notificationService.warn(o("cursors.maximum","The number of cursors has been limited to {0}.",fL.MAX_CURSOR_COUNT));const t=[];for(let o=0,r=e.selections.length;o<r;o++)t[o]=e.selections[o].getPosition();const i={position:t[0],secondaryPositions:t.slice(1),reason:e.reason,source:e.source};this._onDidChangeCursorPosition.fire(i);const n={selection:e.selections[0],secondarySelections:e.selections.slice(1),modelVersionId:e.modelVersionId,oldSelections:e.oldSelections,oldModelVersionId:e.oldModelVersionId,source:e.source,reason:e.reason};this._onDidChangeCursorSelection.fire(n);break}}}));const[n,r]=this._createView(i);if(r){this._domElement.appendChild(n.domNode.domNode);let t=Object.keys(this._contentWidgets);for(let e=0,i=t.length;e<i;e++){const i=t[e];n.addContentWidget(this._contentWidgets[i])}t=Object.keys(this._overlayWidgets);for(let e=0,i=t.length;e<i;e++){const i=t[e];n.addOverlayWidget(this._overlayWidgets[i])}n.render(!1,!0),n.domNode.domNode.setAttribute("data-uri",e.uri.toString())}this._modelData=new dk(e,i,n,r,t)}_createView(e){let t;t=this.isSimpleWidget?{paste:(e,t,i,n)=>{this._paste("keyboard",e,t,i,n)},type:e=>{this._type("keyboard",e)},replacePreviousChar:(e,t)=>{this._replacePreviousChar("keyboard",e,t)},startComposition:()=>{this._startComposition()},endComposition:()=>{this._endComposition("keyboard")},cut:()=>{this._cut("keyboard")}}:{paste:(e,t,i,n)=>{const o={text:e,pasteOnNewLine:t,multicursorText:i,mode:n};this._commandService.executeCommand("paste",o)},type:e=>{const t={text:e};this._commandService.executeCommand("type",t)},replacePreviousChar:(e,t)=>{const i={text:e,replaceCharCnt:t};this._commandService.executeCommand("replacePreviousChar",i)},startComposition:()=>{this._commandService.executeCommand("compositionStart",{})},endComposition:()=>{this._commandService.executeCommand("compositionEnd",{})},cut:()=>{this._commandService.executeCommand("cut",{})}};const i=new Hy(e.coordinatesConverter);i.onKeyDown=e=>this._onKeyDown.fire(e),i.onKeyUp=e=>this._onKeyUp.fire(e),i.onContextMenu=e=>this._onContextMenu.fire(e),i.onMouseMove=e=>this._onMouseMove.fire(e),i.onMouseLeave=e=>this._onMouseLeave.fire(e),i.onMouseDown=e=>this._onMouseDown.fire(e),i.onMouseUp=e=>this._onMouseUp.fire(e),i.onMouseDrag=e=>this._onMouseDrag.fire(e),i.onMouseDrop=e=>this._onMouseDrop.fire(e),i.onMouseWheel=e=>this._onMouseWheel.fire(e);const n=new Wx(t,this._configuration,this._themeService,e,i,this._overflowWidgetsDomNode);return[n,!0]}_postDetachModelCleanup(e){e&&e.removeAllDecorationsWithOwnerId(this._id)}_detachModel(){if(!this._modelData)return null;const e=this._modelData.model,t=this._modelData.hasRealView?this._modelData.view.domNode.domNode:null;return this._modelData.dispose(),this._modelData=null,this._domElement.removeAttribute("data-mode-id"),t&&this._domElement.contains(t)&&this._domElement.removeChild(t),e}_removeDecorationType(e){this._codeEditorService.removeDecorationType(e)}hasModel(){return null!==this._modelData}};uk=lk([ck(3,Vi),ck(4,ji),ck(5,qr),ck(6,Qf),ck(7,ep),ck(8,Tg),ck(9,jL)],uk);class gk extends Oe{constructor(){super(),this._onDidChangeToTrue=this._register(new Ve),this.onDidChangeToTrue=this._onDidChangeToTrue.event,this._onDidChangeToFalse=this._register(new Ve),this.onDidChangeToFalse=this._onDidChangeToFalse.event,this._value=0}setValue(e){const t=e?2:1;this._value!==t&&(this._value=t,2===this._value?this._onDidChangeToTrue.fire():1===this._value&&this._onDidChangeToFalse.fire())}}class fk extends Oe{constructor(e,t){super(),this._editor=e,t.createKey("editorId",e.getId()),this._editorSimpleInput=Ey.editorSimpleInput.bindTo(t),this._editorFocus=Ey.focus.bindTo(t),this._textInputFocus=Ey.textInputFocus.bindTo(t),this._editorTextFocus=Ey.editorTextFocus.bindTo(t),this._editorTabMovesFocus=Ey.tabMovesFocus.bindTo(t),this._editorReadonly=Ey.readOnly.bindTo(t),this._editorColumnSelection=Ey.columnSelection.bindTo(t),this._hasMultipleSelections=Ey.hasMultipleSelections.bindTo(t),this._hasNonEmptySelection=Ey.hasNonEmptySelection.bindTo(t),this._canUndo=Ey.canUndo.bindTo(t),this._canRedo=Ey.canRedo.bindTo(t),this._register(this._editor.onDidChangeConfiguration(()=>this._updateFromConfig())),this._register(this._editor.onDidChangeCursorSelection(()=>this._updateFromSelection())),this._register(this._editor.onDidFocusEditorWidget(()=>this._updateFromFocus())),this._register(this._editor.onDidBlurEditorWidget(()=>this._updateFromFocus())),this._register(this._editor.onDidFocusEditorText(()=>this._updateFromFocus())),this._register(this._editor.onDidBlurEditorText(()=>this._updateFromFocus())),this._register(this._editor.onDidChangeModel(()=>this._updateFromModel())),this._register(this._editor.onDidChangeConfiguration(()=>this._updateFromModel())),this._updateFromConfig(),this._updateFromSelection(),this._updateFromFocus(),this._updateFromModel(),this._editorSimpleInput.set(this._editor.isSimpleWidget)}_updateFromConfig(){const e=this._editor.getOptions();this._editorTabMovesFocus.set(e.get(116)),this._editorReadonly.set(e.get(72)),this._editorColumnSelection.set(e.get(13))}_updateFromSelection(){const e=this._editor.getSelections();e?(this._hasMultipleSelections.set(e.length>1),this._hasNonEmptySelection.set(e.some(e=>!e.isEmpty()))):(this._hasMultipleSelections.reset(),this._hasNonEmptySelection.reset())}_updateFromFocus(){this._editorFocus.set(this._editor.hasWidgetFocus()&&!this._editor.isSimpleWidget),this._editorTextFocus.set(this._editor.hasTextFocus()&&!this._editor.isSimpleWidget),this._textInputFocus.set(this._editor.hasTextFocus())}_updateFromModel(){const e=this._editor.getModel();this._canUndo.set(Boolean(e&&e.canUndo())),this._canRedo.set(Boolean(e&&e.canRedo()))}}class mk extends Oe{constructor(e,t){super(),this._editor=e,this._contextKeyService=t,this._langId=Ey.languageId.bindTo(t),this._hasCompletionItemProvider=Ey.hasCompletionItemProvider.bindTo(t),this._hasCodeActionsProvider=Ey.hasCodeActionsProvider.bindTo(t),this._hasCodeLensProvider=Ey.hasCodeLensProvider.bindTo(t),this._hasDefinitionProvider=Ey.hasDefinitionProvider.bindTo(t),this._hasDeclarationProvider=Ey.hasDeclarationProvider.bindTo(t),this._hasImplementationProvider=Ey.hasImplementationProvider.bindTo(t),this._hasTypeDefinitionProvider=Ey.hasTypeDefinitionProvider.bindTo(t),this._hasHoverProvider=Ey.hasHoverProvider.bindTo(t),this._hasDocumentHighlightProvider=Ey.hasDocumentHighlightProvider.bindTo(t),this._hasDocumentSymbolProvider=Ey.hasDocumentSymbolProvider.bindTo(t),this._hasReferenceProvider=Ey.hasReferenceProvider.bindTo(t),this._hasRenameProvider=Ey.hasRenameProvider.bindTo(t),this._hasSignatureHelpProvider=Ey.hasSignatureHelpProvider.bindTo(t),this._hasDocumentFormattingProvider=Ey.hasDocumentFormattingProvider.bindTo(t),this._hasDocumentSelectionFormattingProvider=Ey.hasDocumentSelectionFormattingProvider.bindTo(t),this._hasMultipleDocumentFormattingProvider=Ey.hasMultipleDocumentFormattingProvider.bindTo(t),this._hasMultipleDocumentSelectionFormattingProvider=Ey.hasMultipleDocumentSelectionFormattingProvider.bindTo(t),this._isInWalkThrough=Ey.isInWalkThroughSnippet.bindTo(t);const i=()=>this._update();this._register(e.onDidChangeModel(i)),this._register(e.onDidChangeModelLanguage(i)),this._register(xl.onDidChange(i)),this._register(Rl.onDidChange(i)),this._register(Al.onDidChange(i)),this._register(Tl.onDidChange(i)),this._register(Ml.onDidChange(i)),this._register(Il.onDidChange(i)),this._register(Ol.onDidChange(i)),this._register(kl.onDidChange(i)),this._register(Dl.onDidChange(i)),this._register(El.onDidChange(i)),this._register(yl.onDidChange(i)),this._register(Sl.onDidChange(i)),this._register(Pl.onDidChange(i)),this._register(Fl.onDidChange(i)),this._register(Ll.onDidChange(i)),i()}dispose(){super.dispose()}reset(){this._contextKeyService.bufferChangeEvents(()=>{this._langId.reset(),this._hasCompletionItemProvider.reset(),this._hasCodeActionsProvider.reset(),this._hasCodeLensProvider.reset(),this._hasDefinitionProvider.reset(),this._hasDeclarationProvider.reset(),this._hasImplementationProvider.reset(),this._hasTypeDefinitionProvider.reset(),this._hasHoverProvider.reset(),this._hasDocumentHighlightProvider.reset(),this._hasDocumentSymbolProvider.reset(),this._hasReferenceProvider.reset(),this._hasRenameProvider.reset(),this._hasDocumentFormattingProvider.reset(),this._hasDocumentSelectionFormattingProvider.reset(),this._hasSignatureHelpProvider.reset(),this._isInWalkThrough.reset()})}_update(){const e=this._editor.getModel();e?this._contextKeyService.bufferChangeEvents(()=>{this._langId.set(e.getLanguageIdentifier().language),this._hasCompletionItemProvider.set(xl.has(e)),this._hasCodeActionsProvider.set(Rl.has(e)),this._hasCodeLensProvider.set(Al.has(e)),this._hasDefinitionProvider.set(Tl.has(e)),this._hasDeclarationProvider.set(Ml.has(e)),this._hasImplementationProvider.set(Il.has(e)),this._hasTypeDefinitionProvider.set(Ol.has(e)),this._hasHoverProvider.set(kl.has(e)),this._hasDocumentHighlightProvider.set(Dl.has(e)),this._hasDocumentSymbolProvider.set(El.has(e)),this._hasReferenceProvider.set(yl.has(e)),this._hasRenameProvider.set(Sl.has(e)),this._hasSignatureHelpProvider.set(Ll.has(e)),this._hasDocumentFormattingProvider.set(Pl.has(e)||Fl.has(e)),this._hasDocumentSelectionFormattingProvider.set(Fl.has(e)),this._hasMultipleDocumentFormattingProvider.set(Pl.all(e).length+Fl.all(e).length>1),this._hasMultipleDocumentSelectionFormattingProvider.set(Fl.all(e).length>1),this._isInWalkThrough.set(e.uri.scheme===Yn.walkThroughSnippet)}):this.reset()}}class pk extends Oe{constructor(e){super(),this._onChange=this._register(new Ve),this.onChange=this._onChange.event,this._hasFocus=!1,this._domFocusTracker=this._register(ir(e)),this._register(this._domFocusTracker.onDidFocus(()=>{this._hasFocus=!0,this._onChange.fire(void 0)})),this._register(this._domFocusTracker.onDidBlur(()=>{this._hasFocus=!1,this._onChange.fire(void 0)}))}hasFocus(){return this._hasFocus}}const _k=encodeURIComponent("<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 6 3' enable-background='new 0 0 6 3' height='3' width='6'><g fill='"),bk=encodeURIComponent("'><polygon points='5.5,0 2.5,3 1.1,3 4.1,0'/><polygon points='4,0 6,2 6,0.6 5.4,0'/><polygon points='0,2 1,3 2.4,3 0,0.6'/></g></svg>");function vk(e){return _k+encodeURIComponent(e.toString())+bk}const wk=encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" height="3" width="12"><g fill="'),Ck=encodeURIComponent('"><circle cx="1" cy="1" r="1"/><circle cx="5" cy="1" r="1"/><circle cx="9" cy="1" r="1"/></g></svg>');function yk(e){return wk+encodeURIComponent(e.toString())+Ck}cp((e,t)=>{const i=e.getColor(bw);i&&t.addRule(`.monaco-editor .squiggly-error { border-bottom: 4px double ${i}; }`);const n=e.getColor(_w);n&&t.addRule(`.monaco-editor .squiggly-error { background: url("data:image/svg+xml,${vk(n)}") repeat-x bottom left; }`);const o=e.getColor(ww);o&&t.addRule(`.monaco-editor .squiggly-warning { border-bottom: 4px double ${o}; }`);const r=e.getColor(vw);r&&t.addRule(`.monaco-editor .squiggly-warning { background: url("data:image/svg+xml,${vk(r)}") repeat-x bottom left; }`);const s=e.getColor(yw);s&&t.addRule(`.monaco-editor .squiggly-info { border-bottom: 4px double ${s}; }`);const a=e.getColor(Cw);a&&t.addRule(`.monaco-editor .squiggly-info { background: url("data:image/svg+xml,${vk(a)}") repeat-x bottom left; }`);const l=e.getColor(xw);l&&t.addRule(`.monaco-editor .squiggly-hint { border-bottom: 2px dotted ${l}; }`);const c=e.getColor(Sw);c&&t.addRule(`.monaco-editor .squiggly-hint { background: url("data:image/svg+xml,${yk(c)}") no-repeat bottom left; }`);const h=e.getColor(XC);h&&t.addRule(`.monaco-editor.showUnused .squiggly-inline-unnecessary { opacity: ${h.rgba.a}; }`);const d=e.getColor(YC);d&&t.addRule(`.monaco-editor.showUnused .squiggly-unnecessary { border-bottom: 2px dashed ${d}; }`);const u=e.getColor(kw)||"inherit";t.addRule(`.monaco-editor.showDeprecated .squiggly-inline-deprecated { text-decoration: line-through; text-decoration-color: ${u}}`)});i("7115"),i("c901");const Sk=!1;let xk=4;const Lk=new Ve;class kk extends Oe{constructor(e,t,i){super(),this._state=3,this._onDidEnablementChange=this._register(new Ve),this.onDidEnablementChange=this._onDidEnablementChange.event,this._onDidStart=this._register(new Ve),this.onDidStart=this._onDidStart.event,this._onDidChange=this._register(new Ve),this.onDidChange=this._onDidChange.event,this._onDidReset=this._register(new Ve),this.onDidReset=this._onDidReset.event,this._onDidEnd=this._register(new Ve),this.onDidEnd=this._onDidEnd.event,this.linkedSash=void 0,this.orthogonalStartSashDisposables=this._register(new Ie),this.orthogonalEndSashDisposables=this._register(new Ie),this.el=nr(e,lr(".monaco-sash")),r["f"]&&oo(this.el,"mac"),this._register(an(this.el,"mousedown")(this.onMouseDown,this)),this._register(an(this.el,"dblclick")(this.onMouseDoubleClick,this)),this._register(Im.addTarget(this.el)),this._register(an(this.el,Tm.Start)(this.onTouchStart,this)),"number"===typeof i.size?(this.size=i.size,0===i.orientation?this.el.style.width=this.size+"px":this.el.style.height=this.size+"px"):(this.size=xk,this._register(Lk.event(e=>{this.size=e,this.layout()}))),this.hidden=!1,this.layoutProvider=t,this.orthogonalStartSash=i.orthogonalStartSash,this.orthogonalEndSash=i.orthogonalEndSash,this.orientation=i.orientation||0,1===this.orientation?(oo(this.el,"horizontal"),so(this.el,"vertical")):(so(this.el,"horizontal"),oo(this.el,"vertical")),lo(this.el,"debug",Sk),this.layout()}get state(){return this._state}set state(e){this._state!==e&&(lo(this.el,"disabled",0===e),lo(this.el,"minimum",1===e),lo(this.el,"maximum",2===e),this._state=e,this._onDidEnablementChange.fire(e))}get orthogonalStartSash(){return this._orthogonalStartSash}set orthogonalStartSash(e){this.orthogonalStartSashDisposables.clear(),e?(this.orthogonalStartSashDisposables.add(e.onDidEnablementChange(this.onOrthogonalStartSashEnablementChange,this)),this.onOrthogonalStartSashEnablementChange(e.state)):this.onOrthogonalStartSashEnablementChange(0),this._orthogonalStartSash=e}get orthogonalEndSash(){return this._orthogonalEndSash}set orthogonalEndSash(e){this.orthogonalEndSashDisposables.clear(),e?(this.orthogonalEndSashDisposables.add(e.onDidEnablementChange(this.onOrthogonalEndSashEnablementChange,this)),this.onOrthogonalEndSashEnablementChange(e.state)):this.onOrthogonalEndSashEnablementChange(0),this._orthogonalEndSash=e}onMouseDown(e){Qo.stop(e,!1);let t=!1;if(!e.__orthogonalSashEvent){const i=this.getOrthogonalSash(e);i&&(t=!0,e.__orthogonalSashEvent=!0,i.onMouseDown(e))}if(this.linkedSash&&!e.__linkedSashEvent&&(e.__linkedSashEvent=!0,this.linkedSash.onMouseDown(e)),!this.state)return;const i=[...gr("iframe"),...gr("webview")];for(const r of i)r.style.pointerEvents="none";const n=new Cn(e),o=n.posx,s=n.posy,a=n.altKey,l={startX:o,currentX:o,startY:s,currentY:s,altKey:a};oo(this.el,"active"),this._onDidStart.fire(l);const c=jo(this.el),h=()=>{let e="";e=t?"all-scroll":1===this.orientation?1===this.state?"s-resize":2===this.state?"n-resize":r["f"]?"row-resize":"ns-resize":1===this.state?"e-resize":2===this.state?"w-resize":r["f"]?"col-resize":"ew-resize",c.innerHTML=`* { cursor: ${e} !important; }`},d=new Ie;h(),t||this.onDidEnablementChange(h,null,d);const u=e=>{Qo.stop(e,!1);const t=new Cn(e),i={startX:o,currentX:t.posx,startY:s,currentY:t.posy,altKey:a};this._onDidChange.fire(i)},g=e=>{Qo.stop(e,!1),this.el.removeChild(c),so(this.el,"active"),this._onDidEnd.fire(),d.dispose();for(const t of i)t.style.pointerEvents="auto"};an(window,"mousemove")(u,null,d),an(window,"mouseup")(g,null,d)}onMouseDoubleClick(e){const t=this.getOrthogonalSash(e);t&&t._onDidReset.fire(),this.linkedSash&&this.linkedSash._onDidReset.fire(),this._onDidReset.fire()}onTouchStart(e){Qo.stop(e);const t=[],i=e.pageX,n=e.pageY,o=e.altKey;this._onDidStart.fire({startX:i,currentX:i,startY:n,currentY:n,altKey:o}),t.push(ho(this.el,Tm.Change,e=>{Rr(e.pageX)&&Rr(e.pageY)&&this._onDidChange.fire({startX:i,currentX:e.pageX,startY:n,currentY:e.pageY,altKey:o})})),t.push(ho(this.el,Tm.End,e=>{this._onDidEnd.fire(),Ne(t)}))}layout(){if(0===this.orientation){const e=this.layoutProvider;this.el.style.left=e.getVerticalSashLeft(this)-this.size/2+"px",e.getVerticalSashTop&&(this.el.style.top=e.getVerticalSashTop(this)+"px"),e.getVerticalSashHeight&&(this.el.style.height=e.getVerticalSashHeight(this)+"px")}else{const e=this.layoutProvider;this.el.style.top=e.getHorizontalSashTop(this)-this.size/2+"px",e.getHorizontalSashLeft&&(this.el.style.left=e.getHorizontalSashLeft(this)+"px"),e.getHorizontalSashWidth&&(this.el.style.width=e.getHorizontalSashWidth(this)+"px")}}hide(){this.hidden=!0,this.el.style.display="none",this.el.setAttribute("aria-hidden","true")}onOrthogonalStartSashEnablementChange(e){lo(this.el,"orthogonal-start",0!==e)}onOrthogonalEndSashEnablementChange(e){lo(this.el,"orthogonal-end",0!==e)}getOrthogonalSash(e){if(0===this.orientation){if(e.offsetY<=this.size)return this.orthogonalStartSash;if(e.offsetY>=this.el.clientHeight-this.size)return this.orthogonalEndSash}else{if(e.offsetX<=this.size)return this.orthogonalStartSash;if(e.offsetX>=this.el.clientWidth-this.size)return this.orthogonalEndSash}}dispose(){super.dispose(),this.el.remove()}}class Ek{constructor(e,t=[],i=!1){this.ctor=e,this.staticArguments=t,this.supportsDelayedInstantiation=i}}const Dk=[];function Nk(e,t,i){Dk.push([e,new Ek(t,[],i)])}function Tk(){return Dk}const Mk=zi("IEditorCancelService"),Ik=new Zf("cancellableOperation",!1);Nk(Mk,class{constructor(){this._tokens=new WeakMap}add(e,t){let i,n=this._tokens.get(e);return n||(n=e.invokeWithinContext(e=>{const t=Ik.bindTo(e.get(Qf)),i=new Pe;return{key:t,tokens:i}}),this._tokens.set(e,n)),n.key.set(!0),i=n.tokens.push(t),()=>{i&&(i(),n.key.set(!n.tokens.isEmpty()),i=void 0)}}cancel(e){const t=this._tokens.get(e);if(!t)return;const i=t.tokens.pop();i&&(i.cancel(),t.key.set(!t.tokens.isEmpty()))}},!0);mm(new class extends gm{constructor(){super({id:"editor.cancelOperation",kbOpts:{weight:100,primary:9},precondition:Ik})}runEditorCommand(e,t){e.get(Mk).cancel(t)}});class Ok{constructor(e,t,i){this._visiblePosition=e,this._visiblePositionScrollDelta=t,this._cursorPosition=i}static capture(e){let t=null,i=0;if(0!==e.getScrollTop()){const n=e.getVisibleRanges();if(n.length>0){t=n[0].getStartPosition();const o=e.getTopForPosition(t.lineNumber,t.column);i=e.getScrollTop()-o}}return new Ok(t,i,e.getPosition())}restore(e){if(this._visiblePosition){const t=e.getTopForPosition(this._visiblePosition.lineNumber,this._visiblePosition.column);e.setScrollTop(t+this._visiblePositionScrollDelta)}}restoreRelativeVerticalPositionOfCursor(e){const t=e.getPosition();if(!this._cursorPosition||!t)return;const i=e.getTopForLineNumber(t.lineNumber)-e.getTopForLineNumber(this._cursorPosition.lineNumber);e.setScrollTop(e.getScrollTop()+i)}}i("c6b4"),i("154c");const Ak={RESOURCES:"ResourceURLs",DOWNLOAD_URL:"DownloadURL",FILES:"Files",TEXT:"text/plain"};class Rk{constructor(e){this.data=e}update(){}getData(){return this.data}}const Pk={CurrentDragAndDropData:void 0};class Fk extends Oe{constructor(e,t,i={}){super(),this.options=i,this._context=e||this,this._action=t,t instanceof Mf&&this._register(t.onDidChange(e=>{this.element&&this.handleActionChangeEvent(e)}))}handleActionChangeEvent(e){void 0!==e.enabled&&this.updateEnabled(),void 0!==e.checked&&this.updateChecked(),void 0!==e.class&&this.updateClass(),void 0!==e.label&&(this.updateLabel(),this.updateTooltip()),void 0!==e.tooltip&&this.updateTooltip()}get actionRunner(){return this._actionRunner||(this._actionRunner=this._register(new If)),this._actionRunner}set actionRunner(e){this._actionRunner=e}getAction(){return this._action}isEnabled(){return this._action.enabled}setActionContext(e){this._context=e}render(e){const t=this.element=e;this._register(Im.addTarget(e));const i=this.options&&this.options.draggable;i&&(e.draggable=!0,Ji&&this._register(ho(e,Zo.DRAG_START,e=>{var t;return null===(t=e.dataTransfer)||void 0===t?void 0:t.setData(Ak.TEXT,this._action.label)}))),this._register(ho(t,Tm.Tap,e=>this.onClick(e))),this._register(ho(t,Zo.MOUSE_DOWN,e=>{i||Qo.stop(e,!0),this._action.enabled&&0===e.button&&oo(t,"active")})),r["f"]&&this._register(ho(t,Zo.CONTEXT_MENU,e=>{0===e.button&&!0===e.ctrlKey&&this.onClick(e)})),this._register(ho(t,Zo.CLICK,e=>{Qo.stop(e,!0),this.options&&this.options.isMenu||r["j"](()=>this.onClick(e))})),this._register(ho(t,Zo.DBLCLICK,e=>{Qo.stop(e,!0)})),[Zo.MOUSE_UP,Zo.MOUSE_OUT].forEach(e=>{this._register(ho(t,e,e=>{Qo.stop(e),so(t,"active")}))})}onClick(e){var t;Qo.stop(e,!0);const i=Wr(this._context)?(null===(t=this.options)||void 0===t?void 0:t.useEventAsContext)?e:void 0:this._context;this.actionRunner.run(this._action,i)}focus(){this.element&&(this.element.focus(),oo(this.element,"focused"))}blur(){this.element&&(this.element.blur(),so(this.element,"focused"))}updateEnabled(){}updateLabel(){}updateTooltip(){}updateClass(){}updateChecked(){}dispose(){this.element&&(eo(this.element),this.element=void 0),super.dispose()}}class Wk extends Fk{constructor(e,t,i={}){super(e,t,i),this.options=i,this.options.icon=void 0!==i.icon&&i.icon,this.options.label=void 0===i.label||i.label,this.cssClass=""}render(e){super.render(e),this.element&&(this.label=nr(this.element,lr("a.action-label"))),this.label&&(this._action.id===Of.ID?this.label.setAttribute("role","presentation"):this.options.isMenu?this.label.setAttribute("role","menuitem"):this.label.setAttribute("role","button")),this.options.label&&this.options.keybinding&&this.element&&(nr(this.element,lr("span.keybinding")).textContent=this.options.keybinding),this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked()}focus(){super.focus(),this.label&&this.label.focus()}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this.getAction().label)}updateTooltip(){let e=null;this.getAction().tooltip?e=this.getAction().tooltip:!this.options.label&&this.getAction().label&&this.options.icon&&(e=this.getAction().label,this.options.keybinding&&(e=o({key:"titleLabel",comment:["action title","action keybinding"]},"{0} ({1})",e,this.options.keybinding))),e&&this.label&&(this.label.title=e)}updateClass(){this.cssClass&&this.label&&ao(this.label,this.cssClass),this.options.icon?(this.cssClass=this.getAction().class,this.label&&(oo(this.label,"codicon"),this.cssClass&&ro(this.label,this.cssClass)),this.updateEnabled()):this.label&&so(this.label,"codicon")}updateEnabled(){this.getAction().enabled?(this.label&&(this.label.removeAttribute("aria-disabled"),so(this.label,"disabled"),this.label.tabIndex=0),this.element&&so(this.element,"disabled")):(this.label&&(this.label.setAttribute("aria-disabled","true"),oo(this.label,"disabled"),ur(this.label)),this.element&&oo(this.element,"disabled"))}updateChecked(){this.label&&(this.getAction().checked?oo(this.label,"checked"):so(this.label,"checked"))}}class Bk extends Oe{constructor(e,t={}){var i,n,o;let r,s;switch(super(),this._onDidBlur=this._register(new Ve),this.onDidBlur=this._onDidBlur.event,this._onDidCancel=this._register(new Ve),this.onDidCancel=this._onDidCancel.event,this._onDidRun=this._register(new Ve),this.onDidRun=this._onDidRun.event,this._onDidBeforeRun=this._register(new Ve),this.onDidBeforeRun=this._onDidBeforeRun.event,this.options=t,this._context=null!==(i=t.context)&&void 0!==i?i:null,this._orientation=null!==(n=this.options.orientation)&&void 0!==n?n:0,this._triggerKeys=null!==(o=this.options.triggerKeys)&&void 0!==o?o:{keys:[3,10],keyDown:!1},this.options.actionRunner?this._actionRunner=this.options.actionRunner:(this._actionRunner=new If,this._register(this._actionRunner)),this._register(this._actionRunner.onDidRun(e=>this._onDidRun.fire(e))),this._register(this._actionRunner.onDidBeforeRun(e=>this._onDidBeforeRun.fire(e))),this.viewItems=[],this.focusedItem=void 0,this.domNode=document.createElement("div"),this.domNode.className="monaco-action-bar",!1!==t.animated&&oo(this.domNode,"animated"),this._orientation){case 0:r=15,s=17;break;case 1:r=17,s=15,this.domNode.className+=" reverse";break;case 2:r=16,s=18,this.domNode.className+=" vertical";break;case 3:r=18,s=16,this.domNode.className+=" vertical reverse";break}this._register(ho(this.domNode,Zo.KEY_DOWN,e=>{const t=new mn(e);let i=!0;t.equals(r)?i=this.focusPrevious():t.equals(s)?i=this.focusNext():t.equals(9)?this._onDidCancel.fire():this.isTriggerKeyEvent(t)?this._triggerKeys.keyDown&&this.doTrigger(t):i=!1,i&&(t.preventDefault(),t.stopPropagation())})),this._register(ho(this.domNode,Zo.KEY_UP,e=>{const t=new mn(e);this.isTriggerKeyEvent(t)?(this._triggerKeys.keyDown||this.doTrigger(t),t.preventDefault(),t.stopPropagation()):(t.equals(2)||t.equals(1026))&&this.updateFocusedItem()})),this.focusTracker=this._register(ir(this.domNode)),this._register(this.focusTracker.onDidBlur(()=>{Uo()!==this.domNode&&Fo(Uo(),this.domNode)||(this._onDidBlur.fire(),this.focusedItem=void 0)})),this._register(this.focusTracker.onDidFocus(()=>this.updateFocusedItem())),this.actionsList=document.createElement("ul"),this.actionsList.className="actions-container",this.actionsList.setAttribute("role","toolbar"),this.options.ariaLabel&&this.actionsList.setAttribute("aria-label",this.options.ariaLabel),this.domNode.appendChild(this.actionsList),e.appendChild(this.domNode)}isTriggerKeyEvent(e){let t=!1;return this._triggerKeys.keys.forEach(i=>{t=t||e.equals(i)}),t}updateFocusedItem(){for(let e=0;e<this.actionsList.children.length;e++){const t=this.actionsList.children[e];if(Fo(Uo(),t)){this.focusedItem=e;break}}}get context(){return this._context}set context(e){this._context=e,this.viewItems.forEach(t=>t.setActionContext(e))}get actionRunner(){return this._actionRunner}set actionRunner(e){e&&(this._actionRunner=e,this.viewItems.forEach(t=>t.actionRunner=e))}getContainer(){return this.domNode}push(e,t={}){const i=Array.isArray(e)?e:[e];let n=Rr(t.index)?t.index:null;i.forEach(e=>{const i=document.createElement("li");let o;i.className="action-item",i.setAttribute("role","presentation"),this.options.allowContextMenu||this._register(ho(i,Zo.CONTEXT_MENU,e=>{Qo.stop(e,!0)})),this.options.actionViewItemProvider&&(o=this.options.actionViewItemProvider(e)),o||(o=new Wk(this.context,e,t)),o.actionRunner=this._actionRunner,o.setActionContext(this.context),o.render(i),null===n||n<0||n>=this.actionsList.children.length?(this.actionsList.appendChild(i),this.viewItems.push(o)):(this.actionsList.insertBefore(i,this.actionsList.children[n]),this.viewItems.splice(n,0,o),n++)}),this.focusedItem&&this.focus(this.focusedItem)}clear(){Ne(this.viewItems),this.viewItems=[],Jn(this.actionsList)}focus(e){let t=!1,i=void 0;void 0===e?t=!0:"number"===typeof e?i=e:"boolean"===typeof e&&(t=e),t&&"undefined"===typeof this.focusedItem?(this.focusedItem=-1,this.focusNext()):(void 0!==i&&(this.focusedItem=i),this.updateFocus())}focusNext(){"undefined"===typeof this.focusedItem&&(this.focusedItem=this.viewItems.length-1);const e=this.focusedItem;let t;do{if(this.options.preventLoopNavigation&&this.focusedItem+1>=this.viewItems.length)return this.focusedItem=e,!1;this.focusedItem=(this.focusedItem+1)%this.viewItems.length,t=this.viewItems[this.focusedItem]}while(this.focusedItem!==e&&!t.isEnabled());return this.focusedItem!==e||t.isEnabled()||(this.focusedItem=void 0),this.updateFocus(),!0}focusPrevious(){"undefined"===typeof this.focusedItem&&(this.focusedItem=0);const e=this.focusedItem;let t;do{if(this.focusedItem=this.focusedItem-1,this.focusedItem<0){if(this.options.preventLoopNavigation)return this.focusedItem=e,!1;this.focusedItem=this.viewItems.length-1}t=this.viewItems[this.focusedItem]}while(this.focusedItem!==e&&!t.isEnabled());return this.focusedItem!==e||t.isEnabled()||(this.focusedItem=void 0),this.updateFocus(!0),!0}updateFocus(e,t){"undefined"===typeof this.focusedItem&&this.actionsList.focus({preventScroll:t});for(let i=0;i<this.viewItems.length;i++){const n=this.viewItems[i],o=n;i===this.focusedItem?Br(o.isEnabled)&&(o.isEnabled()&&Br(o.focus)?o.focus(e):this.actionsList.focus({preventScroll:t})):Br(o.blur)&&o.blur()}}doTrigger(e){if("undefined"===typeof this.focusedItem)return;const t=this.viewItems[this.focusedItem];if(t instanceof Fk){const i=null===t._context||void 0===t._context?e:t._context;this.run(t._action,i)}}run(e,t){return this._actionRunner.run(e,t)}dispose(){Ne(this.viewItems),this.viewItems=[],eo(this.getContainer()),super.dispose()}}const Vk=3;class Hk{constructor(e,t,i,n){this.originalLineStart=e,this.originalLineEnd=t,this.modifiedLineStart=i,this.modifiedLineEnd=n}getType(){return 0===this.originalLineStart?1:0===this.modifiedLineStart?2:0}}class zk{constructor(e){this.entries=e}}const Uk=hl("diff-review-insert",dl.add),jk=hl("diff-review-remove",dl.remove),Kk=hl("diff-review-close",dl.close);class qk extends Oe{constructor(e){super(),this._width=0,this._diffEditor=e,this._isVisible=!1,this.shadow=km(document.createElement("div")),this.shadow.setClassName("diff-review-shadow"),this.actionBarContainer=km(document.createElement("div")),this.actionBarContainer.setClassName("diff-review-actions"),this._actionBar=this._register(new Bk(this.actionBarContainer.domNode)),this._actionBar.push(new Mf("diffreview.close",o("label.close","Close"),"close-diff-review "+Kk.classNames,!0,()=>(this.hide(),Promise.resolve(null))),{label:!1,icon:!0}),this.domNode=km(document.createElement("div")),this.domNode.setClassName("diff-review monaco-editor-background"),this._content=km(document.createElement("div")),this._content.setClassName("diff-review-content"),this._content.setAttribute("role","code"),this.scrollbar=this._register(new AS(this._content.domNode,{})),this.domNode.domNode.appendChild(this.scrollbar.getDomNode()),this._register(e.onDidUpdateDiff(()=>{this._isVisible&&(this._diffs=this._compute(),this._render())})),this._register(e.getModifiedEditor().onDidChangeCursorPosition(()=>{this._isVisible&&this._render()})),this._register(fo(this.domNode.domNode,"click",e=>{e.preventDefault();let t=Wo(e.target,"diff-review-row");t&&this._goToRow(t)})),this._register(fo(this.domNode.domNode,"keydown",e=>{(e.equals(18)||e.equals(2066)||e.equals(530))&&(e.preventDefault(),this._goToRow(this._getNextRow())),(e.equals(16)||e.equals(2064)||e.equals(528))&&(e.preventDefault(),this._goToRow(this._getPrevRow())),(e.equals(9)||e.equals(2057)||e.equals(521)||e.equals(1033))&&(e.preventDefault(),this.hide()),(e.equals(10)||e.equals(3))&&(e.preventDefault(),this.accept())})),this._diffs=[],this._currentDiff=null}prev(){let e=0;if(this._isVisible||(this._diffs=this._compute()),this._isVisible){let t=-1;for(let e=0,i=this._diffs.length;e<i;e++)if(this._diffs[e]===this._currentDiff){t=e;break}e=this._diffs.length+t-1}else e=this._findDiffIndex(this._diffEditor.getPosition());if(0===this._diffs.length)return;e%=this._diffs.length;const t=this._diffs[e].entries;this._diffEditor.setPosition(new Qt(t[0].modifiedLineStart,1)),this._diffEditor.setSelection({startColumn:1,startLineNumber:t[0].modifiedLineStart,endColumn:1073741824,endLineNumber:t[t.length-1].modifiedLineEnd}),this._isVisible=!0,this._diffEditor.doLayout(),this._render(),this._goToRow(this._getNextRow())}next(){let e=0;if(this._isVisible||(this._diffs=this._compute()),this._isVisible){let t=-1;for(let e=0,i=this._diffs.length;e<i;e++)if(this._diffs[e]===this._currentDiff){t=e;break}e=t+1}else e=this._findDiffIndex(this._diffEditor.getPosition());if(0===this._diffs.length)return;e%=this._diffs.length;const t=this._diffs[e].entries;this._diffEditor.setPosition(new Qt(t[0].modifiedLineStart,1)),this._diffEditor.setSelection({startColumn:1,startLineNumber:t[0].modifiedLineStart,endColumn:1073741824,endLineNumber:t[t.length-1].modifiedLineEnd}),this._isVisible=!0,this._diffEditor.doLayout(),this._render(),this._goToRow(this._getNextRow())}accept(){let e=-1,t=this._getCurrentFocusedRow();if(t){let i=parseInt(t.getAttribute("data-line"),10);isNaN(i)||(e=i)}this.hide(),-1!==e&&(this._diffEditor.setPosition(new Qt(e,1)),this._diffEditor.revealPosition(new Qt(e,1),1))}hide(){this._isVisible=!1,this._diffEditor.updateOptions({readOnly:!1}),this._diffEditor.focus(),this._diffEditor.doLayout(),this._render()}_getPrevRow(){let e=this._getCurrentFocusedRow();return e?e.previousElementSibling?e.previousElementSibling:e:this._getFirstRow()}_getNextRow(){let e=this._getCurrentFocusedRow();return e?e.nextElementSibling?e.nextElementSibling:e:this._getFirstRow()}_getFirstRow(){return this.domNode.domNode.querySelector(".diff-review-row")}_getCurrentFocusedRow(){let e=document.activeElement;return e&&/diff-review-row/.test(e.className)?e:null}_goToRow(e){let t=this._getCurrentFocusedRow();e.tabIndex=0,e.focus(),t&&t!==e&&(t.tabIndex=-1),this.scrollbar.scanDomNode()}isVisible(){return this._isVisible}layout(e,t,i){this._width=t,this.shadow.setTop(e-6),this.shadow.setWidth(t),this.shadow.setHeight(this._isVisible?6:0),this.domNode.setTop(e),this.domNode.setWidth(t),this.domNode.setHeight(i),this._content.setHeight(i),this._content.setWidth(t),this._isVisible?(this.actionBarContainer.setAttribute("aria-hidden","false"),this.actionBarContainer.setDisplay("block")):(this.actionBarContainer.setAttribute("aria-hidden","true"),this.actionBarContainer.setDisplay("none"))}_compute(){const e=this._diffEditor.getLineChanges();if(!e||0===e.length)return[];const t=this._diffEditor.getOriginalEditor().getModel(),i=this._diffEditor.getModifiedEditor().getModel();return t&&i?qk._mergeAdjacent(e,t.getLineCount(),i.getLineCount()):[]}static _mergeAdjacent(e,t,i){if(!e||0===e.length)return[];let n=[],o=0;for(let l=0,c=e.length;l<c;l++){const r=e[l],s=r.originalStartLineNumber,a=r.originalEndLineNumber,h=r.modifiedStartLineNumber,d=r.modifiedEndLineNumber;let u=[],g=0;{const t=0===a?s:s-1,i=0===d?h:h-1;let n=1,o=1;if(l>0){const t=e[l-1];n=0===t.originalEndLineNumber?t.originalStartLineNumber+1:t.originalEndLineNumber+1,o=0===t.modifiedEndLineNumber?t.modifiedStartLineNumber+1:t.modifiedEndLineNumber+1}let r=t-Vk+1,c=i-Vk+1;if(r<n){const e=n-r;r+=e,c+=e}if(c<o){const e=o-c;r+=e,c+=e}u[g++]=new Hk(r,t,c,i)}0!==a&&(u[g++]=new Hk(s,a,0,0)),0!==d&&(u[g++]=new Hk(0,0,h,d));{const n=0===a?s+1:a+1,o=0===d?h+1:d+1;let r=t,f=i;if(l+1<c){const t=e[l+1];r=0===t.originalEndLineNumber?t.originalStartLineNumber:t.originalStartLineNumber-1,f=0===t.modifiedEndLineNumber?t.modifiedStartLineNumber:t.modifiedStartLineNumber-1}let m=n+Vk-1,p=o+Vk-1;if(m>r){const e=r-m;m+=e,p+=e}if(p>f){const e=f-p;m+=e,p+=e}u[g++]=new Hk(n,m,o,p)}n[o++]=new zk(u)}let r=n[0].entries,s=[],a=0;for(let l=1,c=n.length;l<c;l++){const e=n[l].entries,t=r[r.length-1],i=e[0];0===t.getType()&&0===i.getType()&&i.originalLineStart<=t.originalLineEnd?(r[r.length-1]=new Hk(t.originalLineStart,i.originalLineEnd,t.modifiedLineStart,i.modifiedLineEnd),r=r.concat(e.slice(1))):(s[a++]=new zk(r),r=e)}return s[a++]=new zk(r),s}_findDiffIndex(e){const t=e.lineNumber;for(let i=0,n=this._diffs.length;i<n;i++){const e=this._diffs[i].entries,n=e[e.length-1].modifiedLineEnd;if(t<=n)return i}return 0}_render(){const e=this._diffEditor.getOriginalEditor().getOptions(),t=this._diffEditor.getModifiedEditor().getOptions(),i=this._diffEditor.getOriginalEditor().getModel(),n=this._diffEditor.getModifiedEditor().getModel(),r=i.getOptions(),s=n.getOptions();if(!this._isVisible||!i||!n)return Jn(this._content.domNode),this._currentDiff=null,void this.scrollbar.scanDomNode();this._diffEditor.updateOptions({readOnly:!0});const a=this._findDiffIndex(this._diffEditor.getPosition());if(this._diffs[a]===this._currentDiff)return;this._currentDiff=this._diffs[a];const l=this._diffs[a].entries;let c=document.createElement("div");c.className="diff-review-table",c.setAttribute("role","list"),c.setAttribute("aria-label",'Difference review. Use "Stage | Unstage | Revert Selected Ranges" commands'),Nf.applyFontInfoSlow(c,t.get(36));let h=0,d=0,u=0,g=0;for(let o=0,S=l.length;o<S;o++){const e=l[o],t=e.originalLineStart,i=e.originalLineEnd,n=e.modifiedLineStart,r=e.modifiedLineEnd;0!==t&&(0===h||t<h)&&(h=t),0!==i&&(0===d||i>d)&&(d=i),0!==n&&(0===u||n<u)&&(u=n),0!==r&&(0===g||r>g)&&(g=r)}let f=document.createElement("div");f.className="diff-review-row";let m=document.createElement("div");m.className="diff-review-cell diff-review-summary";const p=d-h+1,_=g-u+1;m.appendChild(document.createTextNode(`${a+1}/${this._diffs.length}: @@ -${h},${p} +${u},${_} @@`)),f.setAttribute("data-line",String(u));const b=e=>0===e?o("no_lines_changed","no lines changed"):1===e?o("one_line_changed","1 line changed"):o("more_lines_changed","{0} lines changed",e),v=b(p),w=b(_);f.setAttribute("aria-label",o({key:"header",comment:["This is the ARIA label for a git diff header.","A git diff header looks like this: @@ -154,12 +159,39 @@.","That encodes that at original line 154 (which is now line 159), 12 lines were removed/changed with 39 lines.","Variables 0 and 1 refer to the diff index out of total number of diffs.","Variables 2 and 4 will be numbers (a line number).",'Variables 3 and 5 will be "no lines changed", "1 line changed" or "X lines changed", localized separately.']},"Difference {0} of {1}: original line {2}, {3}, modified line {4}, {5}",a+1,this._diffs.length,h,v,u,w)),f.appendChild(m),f.setAttribute("role","listitem"),c.appendChild(f);const C=t.get(51);let y=u;for(let o=0,S=l.length;o<S;o++){const a=l[o];qk._renderSection(c,a,y,C,this._width,e,i,r,t,n,s),0!==a.modifiedLineStart&&(y=a.modifiedLineEnd)}Jn(this._content.domNode),this._content.domNode.appendChild(c),this.scrollbar.scanDomNode()}static _renderSection(e,t,i,n,r,s,a,l,c,h,d){const u=t.getType();let g="diff-review-row",f="";const m="diff-review-spacer";let p=null;switch(u){case 1:g="diff-review-row line-insert",f=" char-insert",p=Uk;break;case 2:g="diff-review-row line-delete",f=" char-delete",p=jk;break}const _=t.originalLineStart,b=t.originalLineEnd,v=t.modifiedLineStart,w=t.modifiedLineEnd,C=Math.max(w-v,b-_),y=s.get(117),S=y.glyphMarginWidth+y.lineNumbersWidth,x=c.get(117),L=10+x.glyphMarginWidth+x.lineNumbersWidth;for(let k=0;k<=C;k++){const t=0===_?0:_+k,b=0===v?0:v+k,w=document.createElement("div");w.style.minWidth=r+"px",w.className=g,w.setAttribute("role","listitem"),0!==b&&(i=b),w.setAttribute("data-line",String(i));let C=document.createElement("div");C.className="diff-review-cell",C.style.height=n+"px",w.appendChild(C);const y=document.createElement("span");y.style.width=S+"px",y.style.minWidth=S+"px",y.className="diff-review-line-number"+f,0!==t?y.appendChild(document.createTextNode(String(t))):y.innerText=" ",C.appendChild(y);const x=document.createElement("span");x.style.width=L+"px",x.style.minWidth=L+"px",x.style.paddingRight="10px",x.className="diff-review-line-number"+f,0!==b?x.appendChild(document.createTextNode(String(b))):x.innerText=" ",C.appendChild(x);const E=document.createElement("span");if(E.className=m,p){const e=document.createElement("span");e.className=p.classNames,e.innerText="  ",E.appendChild(e)}else E.innerText="  ";let D;C.appendChild(E),0!==b?(C.insertAdjacentHTML("beforeend",this._renderLine(h,c,d.tabSize,b)),D=h.getLineContent(b)):(C.insertAdjacentHTML("beforeend",this._renderLine(a,s,l.tabSize,t)),D=a.getLineContent(t)),0===D.length&&(D=o("blankLine","blank"));let N="";switch(u){case 0:N=t===b?o({key:"unchangedLine",comment:["The placholders are contents of the line and should not be translated."]},"{0} unchanged line {1}",D,t):o("equalLine","{0} original line {1} modified line {2}",D,t,b);break;case 1:N=o("insertLine","+ {0} modified line {1}",D,b);break;case 2:N=o("deleteLine","- {0} original line {1}",D,t);break}w.setAttribute("aria-label",N),e.appendChild(w)}}static _renderLine(e,t,i,n){const o=e.getLineContent(n),r=t.get(36),s=16793600,a=new Uint32Array(2);a[0]=o.length,a[1]=s;const l=new rd(a,o),c=Nd.isBasicASCII(o,e.mightContainNonBasicASCII()),h=Nd.containsRTL(o,c,e.mightContainRTL()),d=bd(new gd(r.isMonospace&&!t.get(24),r.canUseHalfwidthRightwardsArrow,o,!1,c,h,0,l,[],i,0,r.spaceWidth,r.middotWidth,r.wsmiddotWidth,t.get(95),t.get(80),t.get(74),t.get(37)!==R.OFF,null));return d.html}}cp((e,t)=>{const i=e.getColor(zC);i&&t.addRule(`.monaco-diff-editor .diff-review-line-number { color: ${i}; }`);const n=e.getColor(uw);n&&t.addRule(`.monaco-diff-editor .diff-review-shadow { box-shadow: ${n} 0 -6px 6px -6px inset; }`)});class $k extends fm{constructor(){super({id:"editor.action.diffReview.next",label:o("editor.action.diffReview.next","Go to Next Difference"),alias:"Go to Next Difference",precondition:Ff.has("isInDiffEditor"),kbOpts:{kbExpr:null,primary:65,weight:100}})}run(e,t){const i=Yk(e);i&&i.diffReviewNext()}}class Gk extends fm{constructor(){super({id:"editor.action.diffReview.prev",label:o("editor.action.diffReview.prev","Go to Previous Difference"),alias:"Go to Previous Difference",precondition:Ff.has("isInDiffEditor"),kbOpts:{kbExpr:null,primary:1089,weight:100}})}run(e,t){const i=Yk(e);i&&i.diffReviewPrev()}}function Yk(e){const t=e.get(ji),i=t.listDiffEditors(),n=t.getActiveCodeEditor();if(!n)return null;for(let o=0,r=i.length;o<r;o++){const e=i[o];if(e.getModifiedEditor().getId()===n.getId()||e.getOriginalEditor().getId()===n.getId())return e}return null}pm($k),pm(Gk);const Xk=zi("contextViewService"),Zk=zi("contextMenuService");var Qk=function(e,t,i,n){function o(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,r){function s(e){try{l(n.next(e))}catch(t){r(t)}}function a(e){try{l(n["throw"](e))}catch(t){r(t)}}function l(e){e.done?i(e.value):o(e.value).then(s,a)}l((n=n.apply(e,t||[])).next())}))};class Jk extends Oe{constructor(e,t,i,n,r,s){super(),this._viewZoneId=e,this._marginDomNode=t,this.editor=i,this.diff=n,this._contextMenuService=r,this._clipboardService=s,this._visibility=!1,this._marginDomNode.style.zIndex="10",this._diffActions=document.createElement("div"),this._diffActions.className=dl.lightBulb.classNames+" lightbulb-glyph",this._diffActions.style.position="absolute";const a=i.getOption(51),l=i.getModel().getEOL();this._diffActions.style.right="0px",this._diffActions.style.visibility="hidden",this._diffActions.style.height=a+"px",this._diffActions.style.lineHeight=a+"px",this._marginDomNode.appendChild(this._diffActions);const c=[];c.push(new Mf("diff.clipboard.copyDeletedContent",n.originalEndLineNumber>n.modifiedStartLineNumber?o("diff.clipboard.copyDeletedLinesContent.label","Copy deleted lines"):o("diff.clipboard.copyDeletedLinesContent.single.label","Copy deleted line"),void 0,!0,()=>Qk(this,void 0,void 0,(function*(){yield this._clipboardService.writeText(n.originalContent.join(l)+l)}))));let h=0,d=void 0;n.originalEndLineNumber>n.modifiedStartLineNumber&&(d=new Mf("diff.clipboard.copyDeletedLineContent",o("diff.clipboard.copyDeletedLineContent.label","Copy deleted line ({0})",n.originalStartLineNumber),void 0,!0,()=>Qk(this,void 0,void 0,(function*(){yield this._clipboardService.writeText(n.originalContent[h])}))),c.push(d));const u=i.getOption(72);u||c.push(new Mf("diff.inline.revertChange",o("diff.inline.revertChange.label","Revert this change"),void 0,!0,()=>Qk(this,void 0,void 0,(function*(){if(0===n.modifiedEndLineNumber){const e=i.getModel().getLineMaxColumn(n.modifiedStartLineNumber);i.executeEdits("diffEditor",[{range:new Jt(n.modifiedStartLineNumber,e,n.modifiedStartLineNumber,e),text:l+n.originalContent.join(l)}])}else{const e=i.getModel().getLineMaxColumn(n.modifiedEndLineNumber);i.executeEdits("diffEditor",[{range:new Jt(n.modifiedStartLineNumber,1,n.modifiedEndLineNumber,e),text:n.originalContent.join(l)}])}}))));const g=(e,t)=>{this._contextMenuService.showContextMenu({getAnchor:()=>({x:e,y:t}),getActions:()=>(d&&(d.label=o("diff.clipboard.copyDeletedLineContent.label","Copy deleted line ({0})",n.originalStartLineNumber+h)),c),autoSelectFirstItem:!0})};this._register(fo(this._diffActions,"mousedown",e=>{const{top:t,height:i}=Mo(this._diffActions);let n=Math.floor(a/3);e.preventDefault(),g(e.posx,t+i+n)})),this._register(i.onMouseMove(e=>{if(8===e.target.type||5===e.target.type){const t=e.target.detail.viewZoneId;t===this._viewZoneId?(this.visibility=!0,h=this._updateLightBulbPosition(this._marginDomNode,e.event.browserEvent.y,a)):this.visibility=!1}else this.visibility=!1})),this._register(i.onMouseDown(e=>{if(e.event.rightButton&&(8===e.target.type||5===e.target.type)){const t=e.target.detail.viewZoneId;t===this._viewZoneId&&(e.event.preventDefault(),h=this._updateLightBulbPosition(this._marginDomNode,e.event.browserEvent.y,a),g(e.event.posx,e.event.posy+a))}}))}get visibility(){return this._visibility}set visibility(e){this._visibility!==e&&(this._visibility=e,this._diffActions.style.visibility=e?"visible":"hidden")}_updateLightBulbPosition(e,t,i){const{top:n}=Mo(e),o=t-n,r=Math.floor(o/i),s=r*i;return this._diffActions.style.top=s+"px",r}}const eE=zi("clipboardService");class tE{constructor(e){this.callback=e}report(e){this._value=e,this.callback(this._value)}}tE.None=Object.freeze({report(){}});const iE=zi("editorProgressService");var nE=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},oE=function(e,t){return function(i,n){t(i,n,e)}};class rE{constructor(e,t){this._contextMenuService=e,this._clipboardService=t,this._zones=[],this.inlineDiffMargins=[],this._zonesMap={},this._decorations=[]}getForeignViewZones(e){return e.filter(e=>!this._zonesMap[String(e.id)])}clean(e){this._zones.length>0&&e.changeViewZones(e=>{for(let t=0,i=this._zones.length;t<i;t++)e.removeZone(this._zones[t])}),this._zones=[],this._zonesMap={},this._decorations=e.deltaDecorations(this._decorations,[])}apply(e,t,i,n){const o=n?Ok.capture(e):null;e.changeViewZones(t=>{for(let e=0,i=this._zones.length;e<i;e++)t.removeZone(this._zones[e]);for(let e=0,i=this.inlineDiffMargins.length;e<i;e++)this.inlineDiffMargins[e].dispose();this._zones=[],this._zonesMap={},this.inlineDiffMargins=[];for(let n=0,o=i.zones.length;n<o;n++){const o=i.zones[n];o.suppressMouseDown=!0;let r=t.addZone(o);this._zones.push(r),this._zonesMap[String(r)]=!0,i.zones[n].diff&&o.marginDomNode&&(o.suppressMouseDown=!1,this.inlineDiffMargins.push(new Jk(r,o.marginDomNode,e,i.zones[n].diff,this._contextMenuService,this._clipboardService)))}}),o&&o.restore(e),this._decorations=e.deltaDecorations(this._decorations,i.decorations),t&&t.setZones(i.overviewZones)}}let sE=0;const aE=hl("diff-insert",dl.add),lE=hl("diff-remove",dl.remove);let cE=class e extends Oe{constructor(t,i,n,o,r,s,a,l,c,h,d){super(),this._editorProgressService=d,this._onDidDispose=this._register(new Ve),this.onDidDispose=this._onDidDispose.event,this._onDidUpdateDiff=this._register(new Ve),this.onDidUpdateDiff=this._onDidUpdateDiff.event,this._onDidContentSizeChange=this._register(new Ve),this._lastOriginalWarning=null,this._lastModifiedWarning=null,this._editorWorkerService=o,this._codeEditorService=a,this._contextKeyService=this._register(r.createScoped(t)),this._contextKeyService.createKey("isInDiffEditor",!0),this._themeService=l,this._notificationService=c,this.id=++sE,this._state=0,this._updatingDiffProgress=null,this._domElement=t,i=i||{},this._renderSideBySide=!0,"undefined"!==typeof i.renderSideBySide&&(this._renderSideBySide=i.renderSideBySide),this._maxComputationTime=5e3,"undefined"!==typeof i.maxComputationTime&&(this._maxComputationTime=i.maxComputationTime),this._ignoreTrimWhitespace=!0,"undefined"!==typeof i.ignoreTrimWhitespace&&(this._ignoreTrimWhitespace=i.ignoreTrimWhitespace),this._renderIndicators=!0,"undefined"!==typeof i.renderIndicators&&(this._renderIndicators=i.renderIndicators),this._originalIsEditable=!1,"undefined"!==typeof i.originalEditable&&(this._originalIsEditable=Boolean(i.originalEditable)),this._originalCodeLens=!1,"undefined"!==typeof i.originalCodeLens&&(this._originalCodeLens=Boolean(i.originalCodeLens)),this._modifiedCodeLens=!1,"undefined"!==typeof i.modifiedCodeLens&&(this._modifiedCodeLens=Boolean(i.modifiedCodeLens)),this._updateDecorationsRunner=this._register(new Tn(()=>this._updateDecorations(),0)),this._containerDomElement=document.createElement("div"),this._containerDomElement.className=e._getClassName(this._themeService.getColorTheme(),this._renderSideBySide),this._containerDomElement.style.position="relative",this._containerDomElement.style.height="100%",this._domElement.appendChild(this._containerDomElement),this._overviewViewportDomElement=km(document.createElement("div")),this._overviewViewportDomElement.setClassName("diffViewport"),this._overviewViewportDomElement.setPosition("absolute"),this._overviewDomElement=document.createElement("div"),this._overviewDomElement.className="diffOverview",this._overviewDomElement.style.position="absolute",this._overviewDomElement.appendChild(this._overviewViewportDomElement.domNode),this._register(fo(this._overviewDomElement,"mousedown",e=>{this.modifiedEditor.delegateVerticalScrollbarMouseDown(e)})),this._containerDomElement.appendChild(this._overviewDomElement),this._originalDomNode=document.createElement("div"),this._originalDomNode.className="editor original",this._originalDomNode.style.position="absolute",this._originalDomNode.style.height="100%",this._containerDomElement.appendChild(this._originalDomNode),this._modifiedDomNode=document.createElement("div"),this._modifiedDomNode.className="editor modified",this._modifiedDomNode.style.position="absolute",this._modifiedDomNode.style.height="100%",this._containerDomElement.appendChild(this._modifiedDomNode),this._beginUpdateDecorationsTimeout=-1,this._currentlyChangingViewZones=!1,this._diffComputationToken=0,this._originalEditorState=new rE(h,n),this._modifiedEditorState=new rE(h,n),this._isVisible=!0,this._isHandlingScrollEvent=!1,this._elementSizeObserver=this._register(new Lf(this._containerDomElement,void 0,()=>this._onDidContainerSizeChanged())),i.automaticLayout&&this._elementSizeObserver.startObserving(),this._diffComputationResult=null;const u=this._contextKeyService.createScoped(),g=new UL;g.set(Qf,u);const f=s.createChild(g),m=this._contextKeyService.createScoped(),p=new UL;p.set(Qf,m);const _=s.createChild(p);this.originalEditor=this._createLeftHandSideEditor(i,f,u),this.modifiedEditor=this._createRightHandSideEditor(i,_,m),this._originalOverviewRuler=null,this._modifiedOverviewRuler=null,this._reviewPane=new qk(this),this._containerDomElement.appendChild(this._reviewPane.domNode.domNode),this._containerDomElement.appendChild(this._reviewPane.shadow.domNode),this._containerDomElement.appendChild(this._reviewPane.actionBarContainer.domNode),this._enableSplitViewResizing=!0,"undefined"!==typeof i.enableSplitViewResizing&&(this._enableSplitViewResizing=i.enableSplitViewResizing),this._renderSideBySide?this._setStrategy(new mE(this._createDataSource(),this._enableSplitViewResizing)):this._setStrategy(new _E(this._createDataSource(),this._enableSplitViewResizing)),this._register(l.onDidColorThemeChange(t=>{this._strategy&&this._strategy.applyColors(t)&&this._updateDecorationsRunner.schedule(),this._containerDomElement.className=e._getClassName(this._themeService.getColorTheme(),this._renderSideBySide)}));const b=bm.getDiffEditorContributions();for(const e of b)try{this._register(s.createInstance(e.ctor,this))}catch(v){me(v)}this._codeEditorService.addDiffEditor(this)}_setState(e){this._state!==e&&(this._state=e,this._updatingDiffProgress&&(this._updatingDiffProgress.done(),this._updatingDiffProgress=null),1===this._state&&(this._updatingDiffProgress=this._editorProgressService.show(!0,1e3)))}diffReviewNext(){this._reviewPane.next()}diffReviewPrev(){this._reviewPane.prev()}static _getClassName(e,t){let i="monaco-diff-editor monaco-editor-background ";return t&&(i+="side-by-side "),i+=rp(e.type),i}_recreateOverviewRulers(){this._originalOverviewRuler&&(this._overviewDomElement.removeChild(this._originalOverviewRuler.getDomNode()),this._originalOverviewRuler.dispose()),this.originalEditor.hasModel()&&(this._originalOverviewRuler=this.originalEditor.createOverviewRuler("original diffOverviewRuler"),this._overviewDomElement.appendChild(this._originalOverviewRuler.getDomNode())),this._modifiedOverviewRuler&&(this._overviewDomElement.removeChild(this._modifiedOverviewRuler.getDomNode()),this._modifiedOverviewRuler.dispose()),this.modifiedEditor.hasModel()&&(this._modifiedOverviewRuler=this.modifiedEditor.createOverviewRuler("modified diffOverviewRuler"),this._overviewDomElement.appendChild(this._modifiedOverviewRuler.getDomNode())),this._layoutOverviewRulers()}_createLeftHandSideEditor(t,i,n){const o=this._createInnerEditor(i,this._originalDomNode,this._adjustOptionsForLeftHandSide(t,this._originalIsEditable,this._originalCodeLens));this._register(o.onDidScrollChange(e=>{this._isHandlingScrollEvent||(e.scrollTopChanged||e.scrollLeftChanged||e.scrollHeightChanged)&&(this._isHandlingScrollEvent=!0,this.modifiedEditor.setScrollPosition({scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}),this._isHandlingScrollEvent=!1,this._layoutOverviewViewport())})),this._register(o.onDidChangeViewZones(()=>{this._onViewZonesChanged()})),this._register(o.onDidChangeModelContent(()=>{this._isVisible&&this._beginUpdateDecorationsSoon()}));const r=n.createKey("isInDiffLeftEditor",void 0);return this._register(o.onDidFocusEditorWidget(()=>r.set(!0))),this._register(o.onDidBlurEditorWidget(()=>r.set(!1))),this._register(o.onDidContentSizeChange(t=>{const i=this.originalEditor.getContentWidth()+this.modifiedEditor.getContentWidth()+e.ONE_OVERVIEW_WIDTH,n=Math.max(this.modifiedEditor.getContentHeight(),this.originalEditor.getContentHeight());this._onDidContentSizeChange.fire({contentHeight:n,contentWidth:i,contentHeightChanged:t.contentHeightChanged,contentWidthChanged:t.contentWidthChanged})})),o}_createRightHandSideEditor(t,i,n){const o=this._createInnerEditor(i,this._modifiedDomNode,this._adjustOptionsForRightHandSide(t,this._modifiedCodeLens));this._register(o.onDidScrollChange(e=>{this._isHandlingScrollEvent||(e.scrollTopChanged||e.scrollLeftChanged||e.scrollHeightChanged)&&(this._isHandlingScrollEvent=!0,this.originalEditor.setScrollPosition({scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}),this._isHandlingScrollEvent=!1,this._layoutOverviewViewport())})),this._register(o.onDidChangeViewZones(()=>{this._onViewZonesChanged()})),this._register(o.onDidChangeConfiguration(e=>{e.hasChanged(36)&&o.getModel()&&this._onViewZonesChanged()})),this._register(o.onDidChangeModelContent(()=>{this._isVisible&&this._beginUpdateDecorationsSoon()})),this._register(o.onDidChangeModelOptions(e=>{e.tabSize&&this._updateDecorationsRunner.schedule()}));const r=n.createKey("isInDiffRightEditor",void 0);return this._register(o.onDidFocusEditorWidget(()=>r.set(!0))),this._register(o.onDidBlurEditorWidget(()=>r.set(!1))),this._register(o.onDidContentSizeChange(t=>{const i=this.originalEditor.getContentWidth()+this.modifiedEditor.getContentWidth()+e.ONE_OVERVIEW_WIDTH,n=Math.max(this.modifiedEditor.getContentHeight(),this.originalEditor.getContentHeight());this._onDidContentSizeChange.fire({contentHeight:n,contentWidth:i,contentHeightChanged:t.contentHeightChanged,contentWidthChanged:t.contentWidthChanged})})),o}_createInnerEditor(e,t,i){return e.createInstance(uk,t,i,{})}dispose(){this._codeEditorService.removeDiffEditor(this),-1!==this._beginUpdateDecorationsTimeout&&(window.clearTimeout(this._beginUpdateDecorationsTimeout),this._beginUpdateDecorationsTimeout=-1),this._cleanViewZonesAndDecorations(),this._originalOverviewRuler&&(this._overviewDomElement.removeChild(this._originalOverviewRuler.getDomNode()),this._originalOverviewRuler.dispose()),this._modifiedOverviewRuler&&(this._overviewDomElement.removeChild(this._modifiedOverviewRuler.getDomNode()),this._modifiedOverviewRuler.dispose()),this._overviewDomElement.removeChild(this._overviewViewportDomElement.domNode),this._containerDomElement.removeChild(this._overviewDomElement),this._containerDomElement.removeChild(this._originalDomNode),this.originalEditor.dispose(),this._containerDomElement.removeChild(this._modifiedDomNode),this.modifiedEditor.dispose(),this._strategy.dispose(),this._containerDomElement.removeChild(this._reviewPane.domNode.domNode),this._containerDomElement.removeChild(this._reviewPane.shadow.domNode),this._containerDomElement.removeChild(this._reviewPane.actionBarContainer.domNode),this._reviewPane.dispose(),this._domElement.removeChild(this._containerDomElement),this._onDidDispose.fire(),super.dispose()}getId(){return this.getEditorType()+":"+this.id}getEditorType(){return ws.IDiffEditor}getLineChanges(){return this._diffComputationResult?this._diffComputationResult.changes:null}getOriginalEditor(){return this.originalEditor}getModifiedEditor(){return this.modifiedEditor}updateOptions(t){let i=!1;"undefined"!==typeof t.renderSideBySide&&this._renderSideBySide!==t.renderSideBySide&&(this._renderSideBySide=t.renderSideBySide,i=!0),"undefined"!==typeof t.maxComputationTime&&(this._maxComputationTime=t.maxComputationTime,this._isVisible&&this._beginUpdateDecorationsSoon());let n=!1;"undefined"!==typeof t.ignoreTrimWhitespace&&this._ignoreTrimWhitespace!==t.ignoreTrimWhitespace&&(this._ignoreTrimWhitespace=t.ignoreTrimWhitespace,n=!0),"undefined"!==typeof t.renderIndicators&&this._renderIndicators!==t.renderIndicators&&(this._renderIndicators=t.renderIndicators,n=!0),n&&this._beginUpdateDecorations(),"undefined"!==typeof t.originalEditable&&(this._originalIsEditable=Boolean(t.originalEditable)),"undefined"!==typeof t.originalCodeLens&&(this._originalCodeLens=Boolean(t.originalCodeLens)),"undefined"!==typeof t.modifiedCodeLens&&(this._modifiedCodeLens=Boolean(t.modifiedCodeLens)),this.modifiedEditor.updateOptions(this._adjustOptionsForRightHandSide(t,this._modifiedCodeLens)),this.originalEditor.updateOptions(this._adjustOptionsForLeftHandSide(t,this._originalIsEditable,this._originalCodeLens)),"undefined"!==typeof t.enableSplitViewResizing&&(this._enableSplitViewResizing=t.enableSplitViewResizing),this._strategy.setEnableSplitViewResizing(this._enableSplitViewResizing),i&&(this._renderSideBySide?this._setStrategy(new mE(this._createDataSource(),this._enableSplitViewResizing)):this._setStrategy(new _E(this._createDataSource(),this._enableSplitViewResizing)),this._containerDomElement.className=e._getClassName(this._themeService.getColorTheme(),this._renderSideBySide))}getModel(){return{original:this.originalEditor.getModel(),modified:this.modifiedEditor.getModel()}}setModel(e){if(e&&(!e.original||!e.modified))throw new Error(e.original?"DiffEditorWidget.setModel: Modified model is null":"DiffEditorWidget.setModel: Original model is null");this._cleanViewZonesAndDecorations(),this.originalEditor.setModel(e?e.original:null),this.modifiedEditor.setModel(e?e.modified:null),this._updateDecorationsRunner.cancel(),e&&(this.originalEditor.setScrollTop(0),this.modifiedEditor.setScrollTop(0)),this._diffComputationResult=null,this._diffComputationToken++,this._setState(0),e&&(this._recreateOverviewRulers(),this._beginUpdateDecorations()),this._layoutOverviewViewport()}getDomNode(){return this._domElement}getVisibleColumnFromPosition(e){return this.modifiedEditor.getVisibleColumnFromPosition(e)}getPosition(){return this.modifiedEditor.getPosition()}setPosition(e){this.modifiedEditor.setPosition(e)}revealLine(e,t=0){this.modifiedEditor.revealLine(e,t)}revealLineInCenter(e,t=0){this.modifiedEditor.revealLineInCenter(e,t)}revealLineInCenterIfOutsideViewport(e,t=0){this.modifiedEditor.revealLineInCenterIfOutsideViewport(e,t)}revealLineNearTop(e,t=0){this.modifiedEditor.revealLineNearTop(e,t)}revealPosition(e,t=0){this.modifiedEditor.revealPosition(e,t)}revealPositionInCenter(e,t=0){this.modifiedEditor.revealPositionInCenter(e,t)}revealPositionInCenterIfOutsideViewport(e,t=0){this.modifiedEditor.revealPositionInCenterIfOutsideViewport(e,t)}revealPositionNearTop(e,t=0){this.modifiedEditor.revealPositionNearTop(e,t)}getSelection(){return this.modifiedEditor.getSelection()}getSelections(){return this.modifiedEditor.getSelections()}setSelection(e){this.modifiedEditor.setSelection(e)}setSelections(e){this.modifiedEditor.setSelections(e)}revealLines(e,t,i=0){this.modifiedEditor.revealLines(e,t,i)}revealLinesInCenter(e,t,i=0){this.modifiedEditor.revealLinesInCenter(e,t,i)}revealLinesInCenterIfOutsideViewport(e,t,i=0){this.modifiedEditor.revealLinesInCenterIfOutsideViewport(e,t,i)}revealLinesNearTop(e,t,i=0){this.modifiedEditor.revealLinesNearTop(e,t,i)}revealRange(e,t=0,i=!1,n=!0){this.modifiedEditor.revealRange(e,t,i,n)}revealRangeInCenter(e,t=0){this.modifiedEditor.revealRangeInCenter(e,t)}revealRangeInCenterIfOutsideViewport(e,t=0){this.modifiedEditor.revealRangeInCenterIfOutsideViewport(e,t)}revealRangeNearTop(e,t=0){this.modifiedEditor.revealRangeNearTop(e,t)}revealRangeNearTopIfOutsideViewport(e,t=0){this.modifiedEditor.revealRangeNearTopIfOutsideViewport(e,t)}revealRangeAtTop(e,t=0){this.modifiedEditor.revealRangeAtTop(e,t)}getSupportedActions(){return this.modifiedEditor.getSupportedActions()}saveViewState(){let e=this.originalEditor.saveViewState(),t=this.modifiedEditor.saveViewState();return{original:e,modified:t}}restoreViewState(e){if(e.original&&e.modified){let t=e;this.originalEditor.restoreViewState(t.original),this.modifiedEditor.restoreViewState(t.modified)}}layout(e){this._elementSizeObserver.observe(e)}focus(){this.modifiedEditor.focus()}hasTextFocus(){return this.originalEditor.hasTextFocus()||this.modifiedEditor.hasTextFocus()}trigger(e,t,i){this.modifiedEditor.trigger(e,t,i)}changeDecorations(e){return this.modifiedEditor.changeDecorations(e)}_onDidContainerSizeChanged(){this._doLayout()}_getReviewHeight(){return this._reviewPane.isVisible()?this._elementSizeObserver.getHeight():0}_layoutOverviewRulers(){if(!this._originalOverviewRuler||!this._modifiedOverviewRuler)return;const t=this._elementSizeObserver.getHeight(),i=this._getReviewHeight();let n=e.ENTIRE_DIFF_OVERVIEW_WIDTH-2*e.ONE_OVERVIEW_WIDTH,o=this.modifiedEditor.getLayoutInfo();o&&(this._originalOverviewRuler.setLayout({top:0,width:e.ONE_OVERVIEW_WIDTH,right:n+e.ONE_OVERVIEW_WIDTH,height:t-i}),this._modifiedOverviewRuler.setLayout({top:0,right:0,width:e.ONE_OVERVIEW_WIDTH,height:t-i}))}_onViewZonesChanged(){this._currentlyChangingViewZones||this._updateDecorationsRunner.schedule()}_beginUpdateDecorationsSoon(){-1!==this._beginUpdateDecorationsTimeout&&(window.clearTimeout(this._beginUpdateDecorationsTimeout),this._beginUpdateDecorationsTimeout=-1),this._beginUpdateDecorationsTimeout=window.setTimeout(()=>this._beginUpdateDecorations(),e.UPDATE_DIFF_DECORATIONS_DELAY)}static _equals(e,t){return!e&&!t||!(!e||!t)&&e.toString()===t.toString()}_beginUpdateDecorations(){this._beginUpdateDecorationsTimeout=-1;const t=this.originalEditor.getModel(),i=this.modifiedEditor.getModel();if(!t||!i)return;this._diffComputationToken++;let n=this._diffComputationToken;this._setState(1),this._editorWorkerService.canComputeDiff(t.uri,i.uri)?this._editorWorkerService.computeDiff(t.uri,i.uri,this._ignoreTrimWhitespace,this._maxComputationTime).then(e=>{n===this._diffComputationToken&&t===this.originalEditor.getModel()&&i===this.modifiedEditor.getModel()&&(this._setState(2),this._diffComputationResult=e,this._updateDecorationsRunner.schedule(),this._onDidUpdateDiff.fire())},e=>{n===this._diffComputationToken&&t===this.originalEditor.getModel()&&i===this.modifiedEditor.getModel()&&(this._setState(2),this._diffComputationResult=null,this._updateDecorationsRunner.schedule())}):e._equals(t.uri,this._lastOriginalWarning)&&e._equals(i.uri,this._lastModifiedWarning)||(this._lastOriginalWarning=t.uri,this._lastModifiedWarning=i.uri,this._notificationService.warn(o("diff.tooLarge","Cannot compare files because one file is too large.")))}_cleanViewZonesAndDecorations(){this._originalEditorState.clean(this.originalEditor),this._modifiedEditorState.clean(this.modifiedEditor)}_updateDecorations(){if(!this.originalEditor.getModel()||!this.modifiedEditor.getModel()||!this._originalOverviewRuler||!this._modifiedOverviewRuler)return;const e=this._diffComputationResult?this._diffComputationResult.changes:[];let t=this._originalEditorState.getForeignViewZones(this.originalEditor.getWhitespaces()),i=this._modifiedEditorState.getForeignViewZones(this.modifiedEditor.getWhitespaces()),n=this._strategy.getEditorsDiffDecorations(e,this._ignoreTrimWhitespace,this._renderIndicators,t,i,this.originalEditor,this.modifiedEditor);try{this._currentlyChangingViewZones=!0,this._originalEditorState.apply(this.originalEditor,this._originalOverviewRuler,n.original,!1),this._modifiedEditorState.apply(this.modifiedEditor,this._modifiedOverviewRuler,n.modified,!0)}finally{this._currentlyChangingViewZones=!1}}_adjustOptionsForSubEditor(e){let t=rs(e||{});return t.inDiffEditor=!0,t.wordWrap="off",t.wordWrapMinified=!1,t.automaticLayout=!1,t.scrollbar=t.scrollbar||{},t.scrollbar.vertical="visible",t.folding=!1,t.codeLens=!1,t.fixedOverflowWidgets=!0,t.overflowWidgetsDomNode=e.overflowWidgetsDomNode,t.minimap||(t.minimap={}),t.minimap.enabled=!1,t}_adjustOptionsForLeftHandSide(e,t,i){let n=this._adjustOptionsForSubEditor(e);return i&&(n.codeLens=!0),n.readOnly=!t,n.extraEditorClassName="original-in-monaco-diff-editor",n}_adjustOptionsForRightHandSide(t,i){let n=this._adjustOptionsForSubEditor(t);return i&&(n.codeLens=!0),n.revealHorizontalRightPadding=ue.revealHorizontalRightPadding.defaultValue+e.ENTIRE_DIFF_OVERVIEW_WIDTH,n.scrollbar.verticalHasArrows=!1,n.extraEditorClassName="modified-in-monaco-diff-editor",n}doLayout(){this._elementSizeObserver.observe(),this._doLayout()}_doLayout(){const t=this._elementSizeObserver.getWidth(),i=this._elementSizeObserver.getHeight(),n=this._getReviewHeight();let o=this._strategy.layout();this._originalDomNode.style.width=o+"px",this._originalDomNode.style.left="0px",this._modifiedDomNode.style.width=t-o+"px",this._modifiedDomNode.style.left=o+"px",this._overviewDomElement.style.top="0px",this._overviewDomElement.style.height=i-n+"px",this._overviewDomElement.style.width=e.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",this._overviewDomElement.style.left=t-e.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",this._overviewViewportDomElement.setWidth(e.ENTIRE_DIFF_OVERVIEW_WIDTH),this._overviewViewportDomElement.setHeight(30),this.originalEditor.layout({width:o,height:i-n}),this.modifiedEditor.layout({width:t-o-e.ENTIRE_DIFF_OVERVIEW_WIDTH,height:i-n}),(this._originalOverviewRuler||this._modifiedOverviewRuler)&&this._layoutOverviewRulers(),this._reviewPane.layout(i-n,t,n),this._layoutOverviewViewport()}_layoutOverviewViewport(){let e=this._computeOverviewViewport();e?(this._overviewViewportDomElement.setTop(e.top),this._overviewViewportDomElement.setHeight(e.height)):(this._overviewViewportDomElement.setTop(0),this._overviewViewportDomElement.setHeight(0))}_computeOverviewViewport(){let e=this.modifiedEditor.getLayoutInfo();if(!e)return null;let t=this.modifiedEditor.getScrollTop(),i=this.modifiedEditor.getScrollHeight(),n=Math.max(0,e.height),o=Math.max(0,n-0),r=i>0?o/i:0,s=Math.max(0,Math.floor(e.height*r)),a=Math.floor(t*r);return{height:s,top:a}}_createDataSource(){return{getWidth:()=>this._elementSizeObserver.getWidth(),getHeight:()=>this._elementSizeObserver.getHeight()-this._getReviewHeight(),getContainerDomNode:()=>this._containerDomElement,relayoutEditors:()=>{this._doLayout()},getOriginalEditor:()=>this.originalEditor,getModifiedEditor:()=>this.modifiedEditor}}_setStrategy(e){this._strategy&&this._strategy.dispose(),this._strategy=e,e.applyColors(this._themeService.getColorTheme()),this._diffComputationResult&&this._updateDecorations(),this._doLayout()}_getLineChangeAtOrBeforeLineNumber(e,t){const i=this._diffComputationResult?this._diffComputationResult.changes:[];if(0===i.length||e<t(i[0]))return null;let n=0,o=i.length-1;while(n<o){let r=Math.floor((n+o)/2),s=t(i[r]),a=r+1<=o?t(i[r+1]):1073741824;e<s?o=r-1:e>=a?n=r+1:(n=r,o=r)}return i[n]}_getEquivalentLineForOriginalLineNumber(e){let t=this._getLineChangeAtOrBeforeLineNumber(e,e=>e.originalStartLineNumber);if(!t)return e;let i=t.originalStartLineNumber+(t.originalEndLineNumber>0?-1:0),n=t.modifiedStartLineNumber+(t.modifiedEndLineNumber>0?-1:0),o=t.originalEndLineNumber>0?t.originalEndLineNumber-t.originalStartLineNumber+1:0,r=t.modifiedEndLineNumber>0?t.modifiedEndLineNumber-t.modifiedStartLineNumber+1:0,s=e-i;return s<=o?n+Math.min(s,r):n+r-o+s}_getEquivalentLineForModifiedLineNumber(e){let t=this._getLineChangeAtOrBeforeLineNumber(e,e=>e.modifiedStartLineNumber);if(!t)return e;let i=t.originalStartLineNumber+(t.originalEndLineNumber>0?-1:0),n=t.modifiedStartLineNumber+(t.modifiedEndLineNumber>0?-1:0),o=t.originalEndLineNumber>0?t.originalEndLineNumber-t.originalStartLineNumber+1:0,r=t.modifiedEndLineNumber>0?t.modifiedEndLineNumber-t.modifiedStartLineNumber+1:0,s=e-n;return s<=r?i+Math.min(s,o):i+o-r+s}getDiffLineInformationForOriginal(e){return this._diffComputationResult?{equivalentLineNumber:this._getEquivalentLineForOriginalLineNumber(e)}:null}getDiffLineInformationForModified(e){return this._diffComputationResult?{equivalentLineNumber:this._getEquivalentLineForModifiedLineNumber(e)}:null}};cE.ONE_OVERVIEW_WIDTH=15,cE.ENTIRE_DIFF_OVERVIEW_WIDTH=30,cE.UPDATE_DIFF_DECORATIONS_DELAY=200,cE=nE([oE(2,eE),oE(3,Jl),oE(4,Qf),oE(5,Vi),oE(6,ji),oE(7,ep),oE(8,Tg),oE(9,Zk),oE(10,iE)],cE);class hE extends Oe{constructor(e){super(),this._dataSource=e,this._insertColor=null,this._removeColor=null}applyColors(e){let t=(e.getColor(Uw)||Hw).transparent(2),i=(e.getColor(jw)||zw).transparent(2),n=!t.equals(this._insertColor)||!i.equals(this._removeColor);return this._insertColor=t,this._removeColor=i,n}getEditorsDiffDecorations(e,t,i,n,o,r,s){o=o.sort((e,t)=>e.afterLineNumber-t.afterLineNumber),n=n.sort((e,t)=>e.afterLineNumber-t.afterLineNumber);let a=this._getViewZones(e,n,o,r,s,i),l=this._getOriginalEditorDecorations(e,t,i,r,s),c=this._getModifiedEditorDecorations(e,t,i,r,s);return{original:{decorations:l.decorations,overviewZones:l.overviewZones,zones:a.original},modified:{decorations:c.decorations,overviewZones:c.overviewZones,zones:a.modified}}}}class dE{constructor(e){this._source=e,this._index=-1,this.current=null,this.advance()}advance(){this._index++,this._index<this._source.length?this.current=this._source[this._index]:this.current=null}}class uE{constructor(e,t,i,n,o){this.lineChanges=e,this.originalForeignVZ=t,this.originalLineHeight=i,this.modifiedForeignVZ=n,this.modifiedLineHeight=o}getViewZones(){let e={original:[],modified:[]},t=0,i=0,n=0,o=0,r=0,s=0,a=(e,t)=>e.afterLineNumber-t.afterLineNumber,l=(e,t)=>{if(null===t.domNode&&e.length>0){let i=e[e.length-1];if(i.afterLineNumber===t.afterLineNumber&&null===i.domNode)return void(i.heightInLines+=t.heightInLines)}e.push(t)},c=new dE(this.modifiedForeignVZ),h=new dE(this.originalForeignVZ);for(let d=0,u=this.lineChanges.length;d<=u;d++){let g=d<u?this.lineChanges[d]:null;null!==g?(n=g.originalStartLineNumber+(g.originalEndLineNumber>0?-1:0),o=g.modifiedStartLineNumber+(g.modifiedEndLineNumber>0?-1:0),i=g.originalEndLineNumber>0?g.originalEndLineNumber-g.originalStartLineNumber+1:0,t=g.modifiedEndLineNumber>0?g.modifiedEndLineNumber-g.modifiedStartLineNumber+1:0,r=Math.max(g.originalStartLineNumber,g.originalEndLineNumber),s=Math.max(g.modifiedStartLineNumber,g.modifiedEndLineNumber)):(n+=1e7+i,o+=1e7+t,r=n,s=o);let f=[],m=[];while(c.current&&c.current.afterLineNumber<=s){let e;e=c.current.afterLineNumber<=o?n-o+c.current.afterLineNumber:r;let t=null;g&&g.modifiedStartLineNumber<=c.current.afterLineNumber&&c.current.afterLineNumber<=g.modifiedEndLineNumber&&(t=this._createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion()),f.push({afterLineNumber:e,heightInLines:c.current.height/this.modifiedLineHeight,domNode:null,marginDomNode:t}),c.advance()}while(h.current&&h.current.afterLineNumber<=r){let e;e=h.current.afterLineNumber<=n?o-n+h.current.afterLineNumber:s,m.push({afterLineNumber:e,heightInLines:h.current.height/this.originalLineHeight,domNode:null}),h.advance()}if(null!==g&&vE(g)){let e=this._produceOriginalFromDiff(g,i,t);e&&f.push(e)}if(null!==g&&wE(g)){let e=this._produceModifiedFromDiff(g,i,t);e&&m.push(e)}let p=0,_=0;f=f.sort(a),m=m.sort(a);while(p<f.length&&_<m.length){let t=f[p],i=m[_],r=t.afterLineNumber-n,s=i.afterLineNumber-o;r<s?(l(e.original,t),p++):s<r?(l(e.modified,i),_++):t.shouldNotShrink?(l(e.original,t),p++):i.shouldNotShrink?(l(e.modified,i),_++):t.heightInLines>=i.heightInLines?(t.heightInLines-=i.heightInLines,_++):(i.heightInLines-=t.heightInLines,p++)}while(p<f.length)l(e.original,f[p]),p++;while(_<m.length)l(e.modified,m[_]),_++}return{original:uE._ensureDomNodes(e.original),modified:uE._ensureDomNodes(e.modified)}}static _ensureDomNodes(e){return e.map(e=>(e.domNode||(e.domNode=CE()),e))}}function gE(e,t,i,n,o){return{range:new Jt(e,t,i,n),options:o}}const fE={charDelete:qb.register({className:"char-delete"}),charDeleteWholeLine:qb.register({className:"char-delete",isWholeLine:!0}),charInsert:qb.register({className:"char-insert"}),charInsertWholeLine:qb.register({className:"char-insert",isWholeLine:!0}),lineInsert:qb.register({className:"line-insert",marginClassName:"line-insert",isWholeLine:!0}),lineInsertWithSign:qb.register({className:"line-insert",linesDecorationsClassName:"insert-sign "+aE.classNames,marginClassName:"line-insert",isWholeLine:!0}),lineDelete:qb.register({className:"line-delete",marginClassName:"line-delete",isWholeLine:!0}),lineDeleteWithSign:qb.register({className:"line-delete",linesDecorationsClassName:"delete-sign "+lE.classNames,marginClassName:"line-delete",isWholeLine:!0}),lineDeleteMargin:qb.register({marginClassName:"line-delete"})};class mE extends hE{constructor(e,t){super(e),this._disableSash=!1===t,this._sashRatio=null,this._sashPosition=null,this._startSashPosition=null,this._sash=this._register(new kk(this._dataSource.getContainerDomNode(),this,{orientation:0})),this._disableSash&&(this._sash.state=0),this._sash.onDidStart(()=>this.onSashDragStart()),this._sash.onDidChange(e=>this.onSashDrag(e)),this._sash.onDidEnd(()=>this.onSashDragEnd()),this._sash.onDidReset(()=>this.onSashReset())}setEnableSplitViewResizing(e){let t=!1===e;this._disableSash!==t&&(this._disableSash=t,this._sash.state=this._disableSash?0:3)}layout(e=this._sashRatio){let t=this._dataSource.getWidth(),i=t-cE.ENTIRE_DIFF_OVERVIEW_WIDTH,n=Math.floor((e||.5)*i),o=Math.floor(.5*i);return n=this._disableSash?o:n||o,i>2*mE.MINIMUM_EDITOR_WIDTH?(n<mE.MINIMUM_EDITOR_WIDTH&&(n=mE.MINIMUM_EDITOR_WIDTH),n>i-mE.MINIMUM_EDITOR_WIDTH&&(n=i-mE.MINIMUM_EDITOR_WIDTH)):n=o,this._sashPosition!==n&&(this._sashPosition=n,this._sash.layout()),this._sashPosition}onSashDragStart(){this._startSashPosition=this._sashPosition}onSashDrag(e){let t=this._dataSource.getWidth(),i=t-cE.ENTIRE_DIFF_OVERVIEW_WIDTH,n=this.layout((this._startSashPosition+(e.currentX-e.startX))/i);this._sashRatio=n/i,this._dataSource.relayoutEditors()}onSashDragEnd(){this._sash.layout()}onSashReset(){this._sashRatio=.5,this._dataSource.relayoutEditors(),this._sash.layout()}getVerticalSashTop(e){return 0}getVerticalSashLeft(e){return this._sashPosition}getVerticalSashHeight(e){return this._dataSource.getHeight()}_getViewZones(e,t,i,n,o){let r=new pE(e,t,n.getOption(51),i,o.getOption(51));return r.getViewZones()}_getOriginalEditorDecorations(e,t,i,n,o){const r=String(this._removeColor);let s={decorations:[],overviewZones:[]},a=n.getModel();for(let l=0,c=e.length;l<c;l++){let n=e[l];if(wE(n)&&(s.decorations.push({range:new Jt(n.originalStartLineNumber,1,n.originalEndLineNumber,1073741824),options:i?fE.lineDeleteWithSign:fE.lineDelete}),vE(n)&&n.charChanges||s.decorations.push(gE(n.originalStartLineNumber,1,n.originalEndLineNumber,1073741824,fE.charDeleteWholeLine)),s.overviewZones.push(new _x(n.originalStartLineNumber,n.originalEndLineNumber,r)),n.charChanges))for(let e=0,i=n.charChanges.length;e<i;e++){let i=n.charChanges[e];if(wE(i))if(t)for(let e=i.originalStartLineNumber;e<=i.originalEndLineNumber;e++){let t,n;t=e===i.originalStartLineNumber?i.originalStartColumn:a.getLineFirstNonWhitespaceColumn(e),n=e===i.originalEndLineNumber?i.originalEndColumn:a.getLineLastNonWhitespaceColumn(e),s.decorations.push(gE(e,t,e,n,fE.charDelete))}else s.decorations.push(gE(i.originalStartLineNumber,i.originalStartColumn,i.originalEndLineNumber,i.originalEndColumn,fE.charDelete))}}return s}_getModifiedEditorDecorations(e,t,i,n,o){const r=String(this._insertColor);let s={decorations:[],overviewZones:[]},a=o.getModel();for(let l=0,c=e.length;l<c;l++){let n=e[l];if(vE(n)&&(s.decorations.push({range:new Jt(n.modifiedStartLineNumber,1,n.modifiedEndLineNumber,1073741824),options:i?fE.lineInsertWithSign:fE.lineInsert}),wE(n)&&n.charChanges||s.decorations.push(gE(n.modifiedStartLineNumber,1,n.modifiedEndLineNumber,1073741824,fE.charInsertWholeLine)),s.overviewZones.push(new _x(n.modifiedStartLineNumber,n.modifiedEndLineNumber,r)),n.charChanges))for(let e=0,i=n.charChanges.length;e<i;e++){let i=n.charChanges[e];if(vE(i))if(t)for(let e=i.modifiedStartLineNumber;e<=i.modifiedEndLineNumber;e++){let t,n;t=e===i.modifiedStartLineNumber?i.modifiedStartColumn:a.getLineFirstNonWhitespaceColumn(e),n=e===i.modifiedEndLineNumber?i.modifiedEndColumn:a.getLineLastNonWhitespaceColumn(e),s.decorations.push(gE(e,t,e,n,fE.charInsert))}else s.decorations.push(gE(i.modifiedStartLineNumber,i.modifiedStartColumn,i.modifiedEndLineNumber,i.modifiedEndColumn,fE.charInsert))}}return s}}mE.MINIMUM_EDITOR_WIDTH=100;class pE extends uE{constructor(e,t,i,n,o){super(e,t,i,n,o)}_createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion(){return null}_produceOriginalFromDiff(e,t,i){return i>t?{afterLineNumber:Math.max(e.originalStartLineNumber,e.originalEndLineNumber),heightInLines:i-t,domNode:null}:null}_produceModifiedFromDiff(e,t,i){return t>i?{afterLineNumber:Math.max(e.modifiedStartLineNumber,e.modifiedEndLineNumber),heightInLines:t-i,domNode:null}:null}}class _E extends hE{constructor(e,t){super(e),this.decorationsLeft=e.getOriginalEditor().getLayoutInfo().decorationsLeft,this._register(e.getOriginalEditor().onDidLayoutChange(t=>{this.decorationsLeft!==t.decorationsLeft&&(this.decorationsLeft=t.decorationsLeft,e.relayoutEditors())}))}setEnableSplitViewResizing(e){}_getViewZones(e,t,i,n,o,r){let s=new bE(e,t,i,n,o,r);return s.getViewZones()}_getOriginalEditorDecorations(e,t,i,n,o){const r=String(this._removeColor);let s={decorations:[],overviewZones:[]};for(let a=0,l=e.length;a<l;a++){let t=e[a];wE(t)&&(s.decorations.push({range:new Jt(t.originalStartLineNumber,1,t.originalEndLineNumber,1073741824),options:fE.lineDeleteMargin}),s.overviewZones.push(new _x(t.originalStartLineNumber,t.originalEndLineNumber,r)))}return s}_getModifiedEditorDecorations(e,t,i,n,o){const r=String(this._insertColor);let s={decorations:[],overviewZones:[]},a=o.getModel();for(let l=0,c=e.length;l<c;l++){let n=e[l];if(vE(n))if(s.decorations.push({range:new Jt(n.modifiedStartLineNumber,1,n.modifiedEndLineNumber,1073741824),options:i?fE.lineInsertWithSign:fE.lineInsert}),s.overviewZones.push(new _x(n.modifiedStartLineNumber,n.modifiedEndLineNumber,r)),n.charChanges)for(let e=0,i=n.charChanges.length;e<i;e++){let i=n.charChanges[e];if(vE(i))if(t)for(let e=i.modifiedStartLineNumber;e<=i.modifiedEndLineNumber;e++){let t,n;t=e===i.modifiedStartLineNumber?i.modifiedStartColumn:a.getLineFirstNonWhitespaceColumn(e),n=e===i.modifiedEndLineNumber?i.modifiedEndColumn:a.getLineLastNonWhitespaceColumn(e),s.decorations.push(gE(e,t,e,n,fE.charInsert))}else s.decorations.push(gE(i.modifiedStartLineNumber,i.modifiedStartColumn,i.modifiedEndLineNumber,i.modifiedEndColumn,fE.charInsert))}else s.decorations.push(gE(n.modifiedStartLineNumber,1,n.modifiedEndLineNumber,1073741824,fE.charInsertWholeLine))}return s}layout(){return Math.max(5,this.decorationsLeft)}}class bE extends uE{constructor(e,t,i,n,o,r){super(e,t,n.getOption(51),i,o.getOption(51)),this.originalModel=n.getModel(),this.modifiedEditorOptions=o.getOptions(),this.modifiedEditorTabSize=o.getModel().getOptions().tabSize,this.renderIndicators=r}_createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion(){let e=document.createElement("div");return e.className="inline-added-margin-view-zone",e}_produceOriginalFromDiff(e,t,i){let n=document.createElement("div");return n.className="inline-added-margin-view-zone",{afterLineNumber:Math.max(e.originalStartLineNumber,e.originalEndLineNumber),heightInLines:i,domNode:document.createElement("div"),marginDomNode:n}}_produceModifiedFromDiff(e,t,i){let n=[];if(e.charChanges)for(let m=0,p=e.charChanges.length;m<p;m++){let t=e.charChanges[m];wE(t)&&n.push(new Td(new Jt(t.originalStartLineNumber,t.originalStartColumn,t.originalEndLineNumber,t.originalEndColumn),"char-delete",0))}let o=vc(1e4),r=[];const s=this.modifiedEditorOptions.get(117),a=this.modifiedEditorOptions.get(36),l=s.decorationsWidth;let c=this.modifiedEditorOptions.get(51);const h=a.typicalHalfwidthCharacterWidth;let d=0;const u=[];for(let m=e.originalStartLineNumber;m<=e.originalEndLineNumber;m++)if(d=Math.max(d,this._renderOriginalLine(m-e.originalStartLineNumber,this.originalModel,this.modifiedEditorOptions,this.modifiedEditorTabSize,m,n,o)),u.push(this.originalModel.getLineContent(m)),this.renderIndicators){let t=m-e.originalStartLineNumber;r=r.concat([`<div class="delete-sign ${lE.classNames}" style="position:absolute;top:${t*c}px;width:${l}px;height:${c}px;right:0;"></div>`])}d+=this.modifiedEditorOptions.get(85);let g=document.createElement("div");g.className="view-lines line-delete "+ny,g.innerHTML=o.build(),Nf.applyFontInfoSlow(g,a);let f=document.createElement("div");return f.className="inline-deleted-margin-view-zone",f.innerHTML=r.join(""),Nf.applyFontInfoSlow(f,a),{shouldNotShrink:!0,afterLineNumber:0===e.modifiedEndLineNumber?e.modifiedStartLineNumber:e.modifiedStartLineNumber-1,heightInLines:t,minWidthInPx:d*h,domNode:g,marginDomNode:f,diff:{originalStartLineNumber:e.originalStartLineNumber,originalEndLineNumber:e.originalEndLineNumber,modifiedStartLineNumber:e.modifiedStartLineNumber,modifiedEndLineNumber:e.modifiedEndLineNumber,originalContent:u}}}_renderOriginalLine(e,t,i,n,o,r,s){const a=t.getLineTokens(o),l=a.getLineContent(),c=i.get(36),h=ad.filter(r,o,1,l.length+1);s.appendASCIIString('<div class="view-line'),0===r.length&&s.appendASCIIString(" char-delete"),s.appendASCIIString('" style="top:'),s.appendASCIIString(String(e*i.get(51))),s.appendASCIIString('px;width:1000000px;">');const d=Nd.isBasicASCII(l,t.mightContainNonBasicASCII()),u=Nd.containsRTL(l,d,t.mightContainRTL()),g=pd(new gd(c.isMonospace&&!i.get(24),c.canUseHalfwidthRightwardsArrow,l,!1,d,u,0,a,h,n,0,c.spaceWidth,c.middotWidth,c.wsmiddotWidth,i.get(95),i.get(80),i.get(74),i.get(37)!==R.OFF,null),s);s.appendASCIIString("</div>");const f=g.characterMapping.getAbsoluteOffsets();return f.length>0?f[f.length-1]:0}}function vE(e){return e.modifiedEndLineNumber>0}function wE(e){return e.originalEndLineNumber>0}function CE(){let e=document.createElement("div");return e.className="diagonal-fill",e}cp((e,t)=>{const i=e.getColor(Uw);i&&(t.addRule(`.monaco-editor .line-insert, .monaco-editor .char-insert { background-color: ${i}; }`),t.addRule(`.monaco-diff-editor .line-insert, .monaco-diff-editor .char-insert { background-color: ${i}; }`),t.addRule(`.monaco-editor .inline-added-margin-view-zone { background-color: ${i}; }`));const n=e.getColor(jw);n&&(t.addRule(`.monaco-editor .line-delete, .monaco-editor .char-delete { background-color: ${n}; }`),t.addRule(`.monaco-diff-editor .line-delete, .monaco-diff-editor .char-delete { background-color: ${n}; }`),t.addRule(`.monaco-editor .inline-deleted-margin-view-zone { background-color: ${n}; }`));const o=e.getColor(Kw);o&&t.addRule(`.monaco-editor .line-insert, .monaco-editor .char-insert { border: 1px ${"hc"===e.type?"dashed":"solid"} ${o}; }`);const r=e.getColor(qw);r&&t.addRule(`.monaco-editor .line-delete, .monaco-editor .char-delete { border: 1px ${"hc"===e.type?"dashed":"solid"} ${r}; }`);const s=e.getColor(uw);s&&t.addRule(`.monaco-diff-editor.side-by-side .editor.modified { box-shadow: -6px 0 5px -5px ${s}; }`);const a=e.getColor($w);a&&t.addRule(`.monaco-diff-editor.side-by-side .editor.modified { border-left: 1px solid ${a}; }`);const l=e.getColor(gw);l&&t.addRule(`\n\t\t\t.monaco-diff-editor .diffViewport {\n\t\t\t\tbackground: ${l};\n\t\t\t}\n\t\t`);const c=e.getColor(fw);c&&t.addRule(`\n\t\t\t.monaco-diff-editor .diffViewport:hover {\n\t\t\t\tbackground: ${c};\n\t\t\t}\n\t\t`);const h=e.getColor(mw);h&&t.addRule(`\n\t\t\t.monaco-diff-editor .diffViewport:active {\n\t\t\t\tbackground: ${h};\n\t\t\t}\n\t\t`);const d=e.getColor(Gw);t.addRule(`\n\t.monaco-editor .diagonal-fill {\n\t\tbackground-image: linear-gradient(\n\t\t\t-45deg,\n\t\t\t${d} 12.5%,\n\t\t\t#0000 12.5%, #0000 50%,\n\t\t\t${d} 50%, ${d} 62.5%,\n\t\t\t#0000 62.5%, #0000 100%\n\t\t);\n\t\tbackground-size: 8px 8px;\n\t}\n\t`)});const yE=zi("themeService"),SE=zi("keybindingService");var xE=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},LE=function(e,t){return function(i,n){t(i,n,e)}};let kE=0,EE=!1;function DE(){EE||(EE=!0,vf(document.body))}let NE=class extends uk{constructor(e,t,i,n,o,r,s,a,l,c){t=t||{},t.ariaLabel=t.ariaLabel||Hg.editorViewAccessibleLabel,t.ariaLabel=t.ariaLabel+";"+Hg.accessibilityHelpMessage,super(e,t,{},i,n,o,r,a,l,c),this._standaloneKeybindingService=s instanceof tf?s:null,DE()}addCommand(e,t,i){if(!this._standaloneKeybindingService)return console.warn("Cannot add command because the editor is configured with an unrecognized KeybindingService"),null;let n="DYNAMIC_"+ ++kE,o=Ff.deserialize(i);return this._standaloneKeybindingService.addDynamicKeybinding(n,e,t,o),n}createContextKey(e,t){return this._contextKeyService.createKey(e,t)}addAction(e){if("string"!==typeof e.id||"string"!==typeof e.label||"function"!==typeof e.run)throw new Error("Invalid action descriptor, `id`, `label` and `run` are required properties!");if(!this._standaloneKeybindingService)return console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService"),Oe.None;const t=e.id,i=e.label,n=Ff.and(Ff.equals("editorId",this.getId()),Ff.deserialize(e.precondition)),o=e.keybindings,r=Ff.and(n,Ff.deserialize(e.keybindingContext)),s=e.contextMenuGroupId||null,a=e.contextMenuOrder||0,l=(t,...i)=>Promise.resolve(e.run(this,...i)),c=new Ie,h=this.getId()+":"+t;if(c.add($r.registerCommand(h,l)),s){let e={command:{id:h,title:i},when:n,group:s,order:a};c.add(rm.appendMenuItem(nm.EditorContext,e))}if(Array.isArray(o))for(const u of o)c.add(this._standaloneKeybindingService.addDynamicKeybinding(h,u,l,r));let d=new pL(h,i,i,n,l,this._contextKeyService);return this._actions[t]=d,c.add(Me(()=>{delete this._actions[t]})),c}};NE=xE([LE(2,Vi),LE(3,ji),LE(4,qr),LE(5,Qf),LE(6,SE),LE(7,ep),LE(8,Tg),LE(9,jL)],NE);let TE=class extends NE{constructor(e,t,i,n,o,r,s,a,l,c,h,d,u){cf(d,t,!1);const g=c.registerEditorContainer(e);t=t||{},"string"===typeof t.theme&&c.setTheme(t.theme);let f,m=t.model;if(delete t.model,super(e,t,n,o,r,s,a,c,h,u),this._contextViewService=l,this._configurationService=d,this._standaloneThemeService=c,this._register(i),this._register(g),"undefined"===typeof m?(f=self.monaco.editor.createModel(t.value||"",t.language||"text/plain"),this._ownsModel=!0):(f=m,this._ownsModel=!1),this._attachModel(f),f){let e={oldModelUrl:null,newModelUrl:f.uri};this._onDidChangeModel.fire(e)}}dispose(){super.dispose()}updateOptions(e){cf(this._configurationService,e,!1),"string"===typeof e.theme&&this._standaloneThemeService.setTheme(e.theme),super.updateOptions(e)}_attachModel(e){super._attachModel(e),this._modelData&&this._contextViewService.setContainer(this._modelData.view.domNode.domNode)}_postDetachModelCleanup(e){super._postDetachModelCleanup(e),e&&this._ownsModel&&(e.dispose(),this._ownsModel=!1)}};TE=xE([LE(3,Vi),LE(4,ji),LE(5,qr),LE(6,Qf),LE(7,SE),LE(8,Xk),LE(9,yE),LE(10,Tg),LE(11,ig),LE(12,jL)],TE);let ME=class extends cE{constructor(e,t,i,n,o,r,s,a,l,c,h,d,u,g,f){cf(d,t,!0);const m=c.registerEditorContainer(e);t=t||{},"string"===typeof t.theme&&(t.theme=c.setTheme(t.theme)),super(e,t,f,a,o,n,l,c,h,u,g),this._contextViewService=s,this._configurationService=d,this._standaloneThemeService=c,this._register(i),this._register(m),this._contextViewService.setContainer(this._containerDomElement)}dispose(){super.dispose()}updateOptions(e){cf(this._configurationService,e,!0),"string"===typeof e.theme&&this._standaloneThemeService.setTheme(e.theme),super.updateOptions(e)}_createInnerEditor(e,t,i){return e.createInstance(NE,t,i)}getOriginalEditor(){return super.getOriginalEditor()}getModifiedEditor(){return super.getModifiedEditor()}addCommand(e,t,i){return this.getModifiedEditor().addCommand(e,t,i)}createContextKey(e,t){return this.getModifiedEditor().createContextKey(e,t)}addAction(e){return this.getModifiedEditor().addAction(e)}};ME=xE([LE(3,Vi),LE(4,Qf),LE(5,SE),LE(6,Xk),LE(7,Jl),LE(8,ji),LE(9,yE),LE(10,Tg),LE(11,ig),LE(12,Zk),LE(13,iE),LE(14,eE)],ME);const IE=zi("modeService");class OE{constructor(e){this._languageIdentifier=e}getId(){return this._languageIdentifier.language}}const AE="text/plain",RE="application/unknown";let PE=[],FE=[],WE=[];function BE(e,t=!1){const i=VE(e);PE.push(i),i.userConfigured?WE.push(i):FE.push(i),t&&!i.userConfigured&&PE.forEach(e=>{e.mime===i.mime||e.userConfigured||(i.extension&&e.extension===i.extension&&console.warn(`Overwriting extension <<${i.extension}>> to now point to mime <<${i.mime}>>`),i.filename&&e.filename===i.filename&&console.warn(`Overwriting filename <<${i.filename}>> to now point to mime <<${i.mime}>>`),i.filepattern&&e.filepattern===i.filepattern&&console.warn(`Overwriting filepattern <<${i.filepattern}>> to now point to mime <<${i.mime}>>`),i.firstline&&e.firstline===i.firstline&&console.warn(`Overwriting firstline <<${i.firstline}>> to now point to mime <<${i.mime}>>`))})}function VE(e){return{id:e.id,mime:e.mime,filename:e.filename,extension:e.extension,filepattern:e.filepattern,firstline:e.firstline,userConfigured:e.userConfigured,filenameLowercase:e.filename?e.filename.toLowerCase():void 0,extensionLowercase:e.extension?e.extension.toLowerCase():void 0,filepatternLowercase:e.filepattern?e.filepattern.toLowerCase():void 0,filepatternOnPath:!!e.filepattern&&e.filepattern.indexOf(xt.sep)>=0}}function HE(e,t){let i;if(e)switch(e.scheme){case Yn.file:i=e.fsPath;break;case Yn.data:const t=Ir.parseMetaData(e);i=t.get(Ir.META_DATA_LABEL);break;default:i=e.path}if(!i)return[RE];i=i.toLowerCase();const n=Nt(i),o=zE(i,n,WE);if(o)return[o,AE];const r=zE(i,n,FE);if(r)return[r,AE];if(t){const e=UE(t);if(e)return[e,AE]}return[RE]}function zE(e,t,i){let n=null,o=null,r=null;for(let s=i.length-1;s>=0;s--){const a=i[s];if(t===a.filenameLowercase){n=a;break}if(a.filepattern&&(!o||a.filepattern.length>o.filepattern.length)){const i=a.filepatternOnPath?e:t;ea(a.filepatternLowercase,i)&&(o=a)}a.extension&&(!r||a.extension.length>r.extension.length)&&t.endsWith(a.extensionLowercase)&&(r=a)}return n?n.mime:o?o.mime:r?r.mime:null}function UE(e){if(Object(yr["R"])(e)&&(e=e.substr(1)),e.length>0)for(let t=PE.length-1;t>=0;t--){const i=PE[t];if(!i.firstline)continue;const n=e.match(i.firstline);if(n&&n.length>0)return i.mime}return null}const jE={ModesRegistry:"editor.modesRegistry"};class KE{constructor(){this._onDidChangeLanguages=new Ve,this.onDidChangeLanguages=this._onDidChangeLanguages.event,this._languages=[],this._dynamicLanguages=[]}registerLanguage(e){return this._languages.push(e),this._onDidChangeLanguages.fire(void 0),{dispose:()=>{for(let t=0,i=this._languages.length;t<i;t++)if(this._languages[t]===e)return void this._languages.splice(t,1)}}}getLanguages(){return[].concat(this._languages).concat(this._dynamicLanguages)}}const qE=new KE;mu.add(jE.ModesRegistry,qE);const $E="plaintext",GE=new pl($E,1);qE.registerLanguage({id:$E,extensions:[".txt"],aliases:[o("plainText.alias","Plain Text"),"text"],mimetypes:["text/plain"]}),Kc.register(GE,{brackets:[["(",")"],["[","]"],["{","}"]],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}],folding:{offSide:!0}});const YE=Object.prototype.hasOwnProperty;class XE extends Oe{constructor(e=!0,t=!1){super(),this._onDidChange=this._register(new Ve),this.onDidChange=this._onDidChange.event,this._warnOnOverwrite=t,this._nextLanguageId2=1,this._languageIdToLanguage=[],this._languageToLanguageId=Object.create(null),this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},e&&(this._initializeFromRegistry(),this._register(qE.onDidChangeLanguages(e=>this._initializeFromRegistry())))}_initializeFromRegistry(){this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={};const e=qE.getLanguages();this._registerLanguages(e)}_registerLanguages(e){for(const t of e)this._registerLanguage(t);this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},Object.keys(this._languages).forEach(e=>{let t=this._languages[e];t.name&&(this._nameMap[t.name]=t.identifier),t.aliases.forEach(e=>{this._lowercaseNameMap[e.toLowerCase()]=t.identifier}),t.mimetypes.forEach(e=>{this._mimeTypesMap[e]=t.identifier})}),mu.as(wu.Configuration).registerOverrideIdentifiers(qE.getLanguages().map(e=>e.id)),this._onDidChange.fire()}_getLanguageId(e){if(this._languageToLanguageId[e])return this._languageToLanguageId[e];const t=this._nextLanguageId2++;return this._languageIdToLanguage[t]=e,this._languageToLanguageId[e]=t,t}_registerLanguage(e){const t=e.id;let i;if(YE.call(this._languages,t))i=this._languages[t];else{const e=this._getLanguageId(t);i={identifier:new pl(t,e),name:null,mimetypes:[],aliases:[],extensions:[],filenames:[],configurationFiles:[]},this._languages[t]=i}this._mergeLanguage(i,e)}_mergeLanguage(e,t){const i=t.id;let n=null;if(Array.isArray(t.mimetypes)&&t.mimetypes.length>0&&(e.mimetypes.push(...t.mimetypes),n=t.mimetypes[0]),n||(n="text/x-"+i,e.mimetypes.push(n)),Array.isArray(t.extensions)){t.configuration?e.extensions=t.extensions.concat(e.extensions):e.extensions=e.extensions.concat(t.extensions);for(let e of t.extensions)BE({id:i,mime:n,extension:e},this._warnOnOverwrite)}if(Array.isArray(t.filenames))for(let a of t.filenames)BE({id:i,mime:n,filename:a},this._warnOnOverwrite),e.filenames.push(a);if(Array.isArray(t.filenamePatterns))for(let a of t.filenamePatterns)BE({id:i,mime:n,filepattern:a},this._warnOnOverwrite);if("string"===typeof t.firstLine&&t.firstLine.length>0){let e=t.firstLine;"^"!==e.charAt(0)&&(e="^"+e);try{let t=new RegExp(e);yr["M"](t)||BE({id:i,mime:n,firstline:t},this._warnOnOverwrite)}catch(s){me(s)}}e.aliases.push(i);let o=null;if("undefined"!==typeof t.aliases&&Array.isArray(t.aliases)&&(o=0===t.aliases.length?[null]:t.aliases),null!==o)for(const a of o)a&&0!==a.length&&e.aliases.push(a);let r=null!==o&&o.length>0;if(r&&null===o[0]);else{let t=(r?o[0]:null)||i;!r&&e.name||(e.name=t)}t.configuration&&e.configurationFiles.push(t.configuration)}isRegisteredMode(e){return!!YE.call(this._mimeTypesMap,e)||YE.call(this._languages,e)}getModeIdForLanguageNameLowercase(e){return YE.call(this._lowercaseNameMap,e)?this._lowercaseNameMap[e].language:null}extractModeIds(e){return e?e.split(",").map(e=>e.trim()).map(e=>YE.call(this._mimeTypesMap,e)?this._mimeTypesMap[e].language:e).filter(e=>YE.call(this._languages,e)):[]}getLanguageIdentifier(e){if(e===Gl||0===e)return Yl;let t;if("string"===typeof e)t=e;else if(t=this._languageIdToLanguage[e],!t)return null;return YE.call(this._languages,t)?this._languages[t].identifier:null}getModeIdsFromFilepathOrFirstLine(e,t){if(!e&&!t)return[];let i=HE(e,t);return this.extractModeIds(i.join(","))}}class ZE extends Oe{constructor(e,t){super(),this._onDidChange=this._register(new Ve),this.onDidChange=this._onDidChange.event,this._selector=t,this.languageIdentifier=this._selector(),this._register(e(()=>this._evaluate()))}_evaluate(){let e=this._selector();e.id!==this.languageIdentifier.id&&(this.languageIdentifier=e,this._onDidChange.fire(this.languageIdentifier))}}class QE{constructor(e=!1){this._onDidCreateMode=new Ve,this.onDidCreateMode=this._onDidCreateMode.event,this._onLanguagesMaybeChanged=new Ve,this.onLanguagesMaybeChanged=this._onLanguagesMaybeChanged.event,this._instantiatedModes={},this._registry=new XE(!0,e),this._registry.onDidChange(()=>this._onLanguagesMaybeChanged.fire())}isRegisteredMode(e){return this._registry.isRegisteredMode(e)}getModeIdForLanguageName(e){return this._registry.getModeIdForLanguageNameLowercase(e)}getModeIdByFilepathOrFirstLine(e,t){const i=this._registry.getModeIdsFromFilepathOrFirstLine(e,t);return qn(i,null)}getModeId(e){const t=this._registry.extractModeIds(e);return qn(t,null)}getLanguageIdentifier(e){return this._registry.getLanguageIdentifier(e)}create(e){return new ZE(this.onLanguagesMaybeChanged,()=>{const t=this.getModeId(e);return this._createModeAndGetLanguageIdentifier(t)})}createByFilepathOrFirstLine(e,t){return new ZE(this.onLanguagesMaybeChanged,()=>{const i=this.getModeIdByFilepathOrFirstLine(e,t);return this._createModeAndGetLanguageIdentifier(i)})}_createModeAndGetLanguageIdentifier(e){const t=this.getLanguageIdentifier(e||"plaintext")||Yl;return this._getOrCreateMode(t.language),t}triggerMode(e){const t=this.getModeId(e);this._getOrCreateMode(t||"plaintext")}_getOrCreateMode(e){if(!this._instantiatedModes.hasOwnProperty(e)){let t=this.getLanguageIdentifier(e)||Yl;this._instantiatedModes[e]=new OE(t),this._onDidCreateMode.fire(this._instantiatedModes[e])}return this._instantiatedModes[e]}}const JE=zi("undoRedoService");class eD{constructor(e,t){this.resource=e,this.elements=t}}class tD{constructor(e,t,i){this._legend=e,this._themeService=t,this._logService=i,this._hashTable=new oD}getMetadata(e,t,i){const n=this._hashTable.get(e,t,i.id);let o;if(n)o=n.metadata,this._logService.getLevel()===Wh.Trace&&this._logService.trace(`SemanticTokensProviderStyling [CACHED] ${e} / ${t}: foreground ${_l.getForeground(o)}, fontStyle ${_l.getFontStyle(o).toString(2)}`);else{let n=this._legend.tokenTypes[e];const r=[];if(n){let e=t;for(let t=0;e>0&&t<this._legend.tokenModifiers.length;t++)1&e&&r.push(this._legend.tokenModifiers[t]),e>>=1;e>0&&this._logService.getLevel()===Wh.Trace&&(this._logService.trace(`SemanticTokensProviderStyling: unknown token modifier index: ${t.toString(2)} for legend: ${JSON.stringify(this._legend.tokenModifiers)}`),r.push("not-in-legend"));const s=this._themeService.getColorTheme().getTokenStyleMetadata(n,r,i.language);if("undefined"===typeof s)o=2147483647;else{if(o=0,"undefined"!==typeof s.italic){const e=(s.italic?1:0)<<11;o|=1|e}if("undefined"!==typeof s.bold){const e=(s.bold?2:0)<<11;o|=2|e}if("undefined"!==typeof s.underline){const e=(s.underline?4:0)<<11;o|=4|e}if(s.foreground){const e=s.foreground<<14;o|=8|e}0===o&&(o=2147483647)}}else this._logService.getLevel()===Wh.Trace&&this._logService.trace(`SemanticTokensProviderStyling: unknown token type index: ${e} for legend: ${JSON.stringify(this._legend.tokenTypes)}`),o=2147483647,n="not-in-legend";this._hashTable.add(e,t,i.id,o),this._logService.getLevel()===Wh.Trace&&this._logService.trace(`SemanticTokensProviderStyling ${e} (${n}) / ${t} (${r.join(" ")}): foreground ${_l.getForeground(o)}, fontStyle ${_l.getFontStyle(o).toString(2)}`)}return o}}function iD(e,t,i){const n=e.data,o=e.data.length/5|0,r=Math.max(Math.ceil(o/1024),400),s=[];let a=0,l=1,c=0;while(a<o){const e=a;let h=Math.min(e+r,o);if(h<o){let t=h;while(t-1>e&&0===n[5*t])t--;if(t-1===e){let e=h;while(e+1<o&&0===n[5*e])e++;h=e}else h=t}let d=new Uint32Array(4*(h-e)),u=0,g=0;while(a<h){const e=5*a,o=n[e],r=n[e+1],s=l+o,h=0===o?c+r:r,f=n[e+2],m=n[e+3],p=n[e+4],_=t.getMetadata(m,p,i);2147483647!==_&&(0===g&&(g=s),d[u]=s-g,d[u+1]=h,d[u+2]=h+f,d[u+3]=_,u+=4),l=s,c=h,a++}u!==d.length&&(d=d.subarray(0,u));const f=new sb(g,new ob(d));s.push(f)}return s}class nD{constructor(e,t,i,n){this.tokenTypeIndex=e,this.tokenModifierSet=t,this.languageId=i,this.metadata=n,this.next=null}}class oD{constructor(){this._elementsCount=0,this._currentLengthIndex=0,this._currentLength=oD._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1<oD._SIZES.length?2/3*this._currentLength:0),this._elements=[],oD._nullOutEntries(this._elements,this._currentLength)}static _nullOutEntries(e,t){for(let i=0;i<t;i++)e[i]=null}_hash2(e,t){return(e<<5)-e+t|0}_hashFunc(e,t,i){return this._hash2(this._hash2(e,t),i)%this._currentLength}get(e,t,i){const n=this._hashFunc(e,t,i);let o=this._elements[n];while(o){if(o.tokenTypeIndex===e&&o.tokenModifierSet===t&&o.languageId===i)return o;o=o.next}return null}add(e,t,i,n){if(this._elementsCount++,0!==this._growCount&&this._elementsCount>=this._growCount){const e=this._elements;this._currentLengthIndex++,this._currentLength=oD._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1<oD._SIZES.length?2/3*this._currentLength:0),this._elements=[],oD._nullOutEntries(this._elements,this._currentLength);for(const t of e){let e=t;while(e){const t=e.next;e.next=null,this._add(e),e=t}}}this._add(new nD(e,t,i,n))}_add(e){const t=this._hashFunc(e.tokenTypeIndex,e.tokenModifierSet,e.languageId);e.next=this._elements[t],this._elements[t]=e}}oD._SIZES=[3,7,13,31,61,127,251,509,1021,2039,4093,8191,16381,32749,65521,131071,262139,524287,1048573,2097143];var rD=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},sD=function(e,t){return function(i,n){t(i,n,e)}};function aD(e){return e.toString()}function lD(e){const t=new Jc,i=e.createSnapshot();let n;while(n=i.read())t.update(n);return t.digest()}class cD{constructor(e,t,i){this._modelEventListeners=new Ie,this.model=e,this._languageSelection=null,this._languageSelectionListener=null,this._modelEventListeners.add(e.onWillDispose(()=>t(e))),this._modelEventListeners.add(e.onDidChangeLanguage(t=>i(e,t)))}_disposeLanguageSelection(){this._languageSelectionListener&&(this._languageSelectionListener.dispose(),this._languageSelectionListener=null),this._languageSelection&&(this._languageSelection.dispose(),this._languageSelection=null)}dispose(){this._modelEventListeners.dispose(),this._disposeLanguageSelection()}setLanguage(e){this._disposeLanguageSelection(),this._languageSelection=e,this._languageSelectionListener=this._languageSelection.onDidChange(()=>this.model.setMode(e.languageIdentifier)),this.model.setMode(e.languageIdentifier)}}const hD=r["d"]||r["f"]?1:2;let dD=class e extends Oe{constructor(e,t,i,n,o){super(),this._configurationService=e,this._resourcePropertiesService=t,this._themeService=i,this._logService=n,this._undoRedoService=o,this._onModelAdded=this._register(new Ve),this.onModelAdded=this._onModelAdded.event,this._onModelRemoved=this._register(new Ve),this.onModelRemoved=this._onModelRemoved.event,this._onModelModeChanged=this._register(new Ve),this.onModelModeChanged=this._onModelModeChanged.event,this._modelCreationOptionsByLanguageAndResource=Object.create(null),this._models={},this._disposedModels=new Map,this._disposedModelsHeapSize=0,this._semanticStyling=this._register(new mD(this._themeService,this._logService)),this._register(this._configurationService.onDidChangeConfiguration(()=>this._updateModelOptions())),this._updateModelOptions(),this._register(new fD(this,this._themeService,this._configurationService,this._semanticStyling))}static _readModelOptions(e,t){let i=ce.tabSize;if(e.editor&&"undefined"!==typeof e.editor.tabSize){const t=parseInt(e.editor.tabSize,10);isNaN(t)||(i=t),i<1&&(i=1)}let n=i;if(e.editor&&"undefined"!==typeof e.editor.indentSize&&"tabSize"!==e.editor.indentSize){const t=parseInt(e.editor.indentSize,10);isNaN(t)||(n=t),n<1&&(n=1)}let o=ce.insertSpaces;e.editor&&"undefined"!==typeof e.editor.insertSpaces&&(o="false"!==e.editor.insertSpaces&&Boolean(e.editor.insertSpaces));let r=hD;const s=e.eol;"\r\n"===s?r=2:"\n"===s&&(r=1);let a=ce.trimAutoWhitespace;e.editor&&"undefined"!==typeof e.editor.trimAutoWhitespace&&(a="false"!==e.editor.trimAutoWhitespace&&Boolean(e.editor.trimAutoWhitespace));let l=ce.detectIndentation;e.editor&&"undefined"!==typeof e.editor.detectIndentation&&(l="false"!==e.editor.detectIndentation&&Boolean(e.editor.detectIndentation));let c=ce.largeFileOptimizations;return e.editor&&"undefined"!==typeof e.editor.largeFileOptimizations&&(c="false"!==e.editor.largeFileOptimizations&&Boolean(e.editor.largeFileOptimizations)),{isForSimpleWidget:t,tabSize:i,indentSize:n,insertSpaces:o,detectIndentation:l,defaultEOL:r,trimAutoWhitespace:a,largeFileOptimizations:c}}_getEOL(e,t){if(e)return this._resourcePropertiesService.getEOL(e,t);const i=this._configurationService.getValue("files.eol",{overrideIdentifier:t});return i&&"auto"!==i?i:3===r["a"]||2===r["a"]?"\n":"\r\n"}getCreationOptions(t,i,n){let o=this._modelCreationOptionsByLanguageAndResource[t+i];if(!o){const r=this._configurationService.getValue("editor",{overrideIdentifier:t,resource:i}),s=this._getEOL(i,t);o=e._readModelOptions({editor:r,eol:s},n),this._modelCreationOptionsByLanguageAndResource[t+i]=o}return o}_updateModelOptions(){const t=this._modelCreationOptionsByLanguageAndResource;this._modelCreationOptionsByLanguageAndResource=Object.create(null);const i=Object.keys(this._models);for(let n=0,o=i.length;n<o;n++){const o=i[n],r=this._models[o],s=r.model.getLanguageIdentifier().language,a=r.model.uri,l=t[s+a],c=this.getCreationOptions(s,a,r.model.isForSimpleWidget);e._setModelOptionsForModel(r.model,c,l)}}static _setModelOptionsForModel(e,t,i){i&&i.defaultEOL!==t.defaultEOL&&1===e.getLineCount()&&e.setEOL(1===t.defaultEOL?0:1),i&&i.detectIndentation===t.detectIndentation&&i.insertSpaces===t.insertSpaces&&i.tabSize===t.tabSize&&i.indentSize===t.indentSize&&i.trimAutoWhitespace===t.trimAutoWhitespace||(t.detectIndentation?(e.detectIndentation(t.insertSpaces,t.tabSize),e.updateOptions({trimAutoWhitespace:t.trimAutoWhitespace})):e.updateOptions({insertSpaces:t.insertSpaces,tabSize:t.tabSize,indentSize:t.indentSize,trimAutoWhitespace:t.trimAutoWhitespace}))}_removeDisposedModel(e){const t=this._disposedModels.get(aD(e));return t&&(this._disposedModelsHeapSize-=t.heapSize),this._disposedModels.delete(aD(e)),t}_createModelData(e,t,i,n){const o=this.getCreationOptions(t.language,i,n),r=new Vb(e,o,t,i,this._undoRedoService);if(i&&this._disposedModels.has(aD(i))){const e=this._removeDisposedModel(i),t=this._undoRedoService.getElements(i),n=lD(r)===e.sha1;if(n||e.sharesUndoRedoStack){for(const e of t.past)Mp(e)&&e.matchesResource(i)&&e.setModel(r);for(const e of t.future)Mp(e)&&e.matchesResource(i)&&e.setModel(r);this._undoRedoService.setElementsValidFlag(i,!0,e=>Mp(e)&&e.matchesResource(i)),n&&(r._overwriteVersionId(e.versionId),r._overwriteAlternativeVersionId(e.alternativeVersionId),r._overwriteInitialUndoRedoSnapshot(e.initialUndoRedoSnapshot))}else null!==e.initialUndoRedoSnapshot&&this._undoRedoService.restoreSnapshot(e.initialUndoRedoSnapshot)}const s=aD(r.uri);if(this._models[s])throw new Error("ModelService: Cannot add model because it already exists!");const a=new cD(r,e=>this._onWillDispose(e),(e,t)=>this._onDidChangeLanguage(e,t));return this._models[s]=a,a}createModel(e,t,i,n=!1){let o;return t?(o=this._createModelData(e,t.languageIdentifier,i,n),this.setMode(o.model,t)):o=this._createModelData(e,GE,i,n),this._onModelAdded.fire(o.model),o.model}setMode(e,t){if(!t)return;const i=this._models[aD(e.uri)];i&&i.setLanguage(t)}getModels(){const e=[],t=Object.keys(this._models);for(let i=0,n=t.length;i<n;i++){const n=t[i];e.push(this._models[n].model)}return e}getModel(e){const t=aD(e),i=this._models[t];return i?i.model:null}getSemanticTokensProviderStyling(e){return this._semanticStyling.get(e)}_onWillDispose(e){const t=aD(e.uri),i=this._models[t];delete this._models[t],i.dispose(),delete this._modelCreationOptionsByLanguageAndResource[e.getLanguageIdentifier().language+e.uri],this._onModelRemoved.fire(e)}_onDidChangeLanguage(t,i){const n=i.oldLanguage,o=t.getLanguageIdentifier().language,r=this.getCreationOptions(n,t.uri,t.isForSimpleWidget),s=this.getCreationOptions(o,t.uri,t.isForSimpleWidget);e._setModelOptionsForModel(t,s,r),this._onModelModeChanged.fire({model:t,oldModeId:n})}};dD=rD([sD(0,ig),sD(1,Ph),sD(2,ep),sD(3,Fh),sD(4,JE)],dD);const uD="editor.semanticHighlighting";function gD(e,t,i){var n;const o=null===(n=i.getValue(uD,{overrideIdentifier:e.getLanguageIdentifier().language,resource:e.uri}))||void 0===n?void 0:n.enabled;return"boolean"===typeof o?o:t.getColorTheme().semanticHighlighting}class fD extends Oe{constructor(e,t,i,n){super(),this._watchers=Object.create(null),this._semanticStyling=n;const o=e=>{this._watchers[e.uri.toString()]=new _D(e,t,this._semanticStyling)},r=(e,t)=>{t.dispose(),delete this._watchers[e.uri.toString()]},s=()=>{for(let n of e.getModels()){const e=this._watchers[n.uri.toString()];gD(n,t,i)?e||o(n):e&&r(n,e)}};this._register(e.onModelAdded(e=>{gD(e,t,i)&&o(e)})),this._register(e.onModelRemoved(e=>{const t=this._watchers[e.uri.toString()];t&&r(e,t)})),this._register(i.onDidChangeConfiguration(e=>{e.affectsConfiguration(uD)&&s()})),this._register(t.onDidColorThemeChange(s))}}class mD extends Oe{constructor(e,t){super(),this._themeService=e,this._logService=t,this._caches=new WeakMap,this._register(this._themeService.onDidColorThemeChange(()=>{this._caches=new WeakMap}))}get(e){return this._caches.has(e)||this._caches.set(e,new tD(e.getLegend(),this._themeService,this._logService)),this._caches.get(e)}}class pD{constructor(e,t,i){this._provider=e,this.resultId=t,this.data=i}dispose(){this._provider.releaseDocumentSemanticTokens(this.resultId)}}class _D extends Oe{constructor(e,t,i){super(),this._isDisposed=!1,this._model=e,this._semanticStyling=i,this._fetchDocumentSemanticTokens=this._register(new Tn(()=>this._fetchDocumentSemanticTokensNow(),300)),this._currentDocumentResponse=null,this._currentDocumentRequestCancellationTokenSource=null,this._documentProvidersChangeListeners=[],this._register(this._model.onDidChangeContent(()=>{this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule()}));const n=()=>{Ne(this._documentProvidersChangeListeners),this._documentProvidersChangeListeners=[];for(const t of Ul.all(e))"function"===typeof t.onDidChange&&this._documentProvidersChangeListeners.push(t.onDidChange(()=>this._fetchDocumentSemanticTokens.schedule(0)))};n(),this._register(Ul.onDidChange(()=>{n(),this._fetchDocumentSemanticTokens.schedule()})),this._register(t.onDidColorThemeChange(e=>{this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule()})),this._fetchDocumentSemanticTokens.schedule(0)}dispose(){this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),this._setDocumentSemanticTokens(null,null,null,[]),this._isDisposed=!0,super.dispose()}_fetchDocumentSemanticTokensNow(){if(this._currentDocumentRequestCancellationTokenSource)return;const e=this._getSemanticColoringProvider();if(!e)return;this._currentDocumentRequestCancellationTokenSource=new $e;const t=[],i=this._model.onDidChangeContent(e=>{t.push(e)}),n=this._semanticStyling.get(e),o=this._currentDocumentResponse&&this._currentDocumentResponse.resultId||null,r=Promise.resolve(e.provideDocumentSemanticTokens(this._model,o,this._currentDocumentRequestCancellationTokenSource.token));r.then(o=>{this._currentDocumentRequestCancellationTokenSource=null,i.dispose(),this._setDocumentSemanticTokens(e,o||null,n,t)},e=>{e&&"string"===typeof e.message&&-1!==e.message.indexOf("busy")||me(e),this._currentDocumentRequestCancellationTokenSource=null,i.dispose(),t.length>0&&(this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule())})}static _isSemanticTokens(e){return e&&!!e.data}static _isSemanticTokensEdits(e){return e&&Array.isArray(e.edits)}static _copy(e,t,i,n,o){for(let r=0;r<o;r++)i[n+r]=e[t+r]}_setDocumentSemanticTokens(e,t,i,n){const o=this._currentDocumentResponse;if(this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._isDisposed)e&&t&&e.releaseDocumentSemanticTokens(t.resultId);else if(e&&i)if(t){if(_D._isSemanticTokensEdits(t)){if(!o)return void this._model.setSemanticTokens(null,!0);if(0===t.edits.length)t={resultId:t.resultId,data:o.data};else{let e=0;for(const o of t.edits)e+=(o.data?o.data.length:0)-o.deleteCount;const i=o.data,n=new Uint32Array(i.length+e);let r=i.length,s=n.length;for(let o=t.edits.length-1;o>=0;o--){const e=t.edits[o],a=r-(e.start+e.deleteCount);a>0&&(_D._copy(i,r-a,n,s-a,a),s-=a),e.data&&(_D._copy(e.data,0,n,s-e.data.length,e.data.length),s-=e.data.length),r=e.start}r>0&&_D._copy(i,0,n,0,r),t={resultId:t.resultId,data:n}}}if(_D._isSemanticTokens(t)){this._currentDocumentResponse=new pD(e,t.resultId,t.data);const o=iD(t,i,this._model.getLanguageIdentifier());if(n.length>0){for(const e of n)for(const t of o)for(const i of e.changes)t.applyEdit(i.range,i.text);this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule()}this._model.setSemanticTokens(o,!0)}else this._model.setSemanticTokens(null,!0)}else this._model.setSemanticTokens(null,!0);else this._model.setSemanticTokens(null,!1)}_getSemanticColoringProvider(){const e=Ul.ordered(this._model);return e.length>0?e[0]:null}}class bD extends Oe{constructor(){super(),this._onCodeEditorAdd=this._register(new Ve),this.onCodeEditorAdd=this._onCodeEditorAdd.event,this._onCodeEditorRemove=this._register(new Ve),this.onCodeEditorRemove=this._onCodeEditorRemove.event,this._onDiffEditorAdd=this._register(new Ve),this._onDiffEditorRemove=this._register(new Ve),this._modelProperties=new Map,this._codeEditors=Object.create(null),this._diffEditors=Object.create(null)}addCodeEditor(e){this._codeEditors[e.getId()]=e,this._onCodeEditorAdd.fire(e)}removeCodeEditor(e){delete this._codeEditors[e.getId()]&&this._onCodeEditorRemove.fire(e)}listCodeEditors(){return Object.keys(this._codeEditors).map(e=>this._codeEditors[e])}addDiffEditor(e){this._diffEditors[e.getId()]=e,this._onDiffEditorAdd.fire(e)}removeDiffEditor(e){delete this._diffEditors[e.getId()]&&this._onDiffEditorRemove.fire(e)}listDiffEditors(){return Object.keys(this._diffEditors).map(e=>this._diffEditors[e])}getFocusedCodeEditor(){let e=null;const t=this.listCodeEditors();for(const i of t){if(i.hasTextFocus())return i;i.hasWidgetFocus()&&(e=i)}return e}setModelProperty(e,t,i){const n=e.toString();let o;this._modelProperties.has(n)?o=this._modelProperties.get(n):(o=new Map,this._modelProperties.set(n,o)),o.set(t,i)}getModelProperty(e,t){const i=e.toString();if(this._modelProperties.has(i)){const e=this._modelProperties.get(i);return e.get(t)}}}var vD=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},wD=function(e,t){return function(i,n){t(i,n,e)}};class CD{constructor(e,t,i){this._parent=e,this._editorId=t,this._styleSheet=i,this._refCount=0}ref(){this._refCount++}unref(){var e;this._refCount--,0===this._refCount&&(null===(e=this._styleSheet.parentNode)||void 0===e||e.removeChild(this._styleSheet),this._parent._removeEditorStyleSheets(this._editorId))}insertRule(e,t){const i=this._styleSheet.sheet;i.insertRule(e,t)}removeRulesContainingSelector(e){Yo(e,this._styleSheet)}}class yD{constructor(e){this._styleSheet=e}ref(){}unref(){}insertRule(e,t){const i=this._styleSheet.sheet;i.insertRule(e,t)}removeRulesContainingSelector(e){Yo(e,this._styleSheet)}}let SD=class extends bD{constructor(e,t=null){super(),this._decorationOptionProviders=new Map,this._editorStyleSheets=new Map,this._globalStyleSheet=t||null,this._themeService=e}_getOrCreateGlobalStyleSheet(){return this._globalStyleSheet||(this._globalStyleSheet=new yD(jo())),this._globalStyleSheet}_getOrCreateStyleSheet(e){if(!e)return this._getOrCreateGlobalStyleSheet();const t=e.getContainerDomNode();if(!Ho(t))return this._getOrCreateGlobalStyleSheet();const i=e.getId();if(!this._editorStyleSheets.has(i)){const e=new CD(this,i,jo(t));this._editorStyleSheets.set(i,e)}return this._editorStyleSheets.get(i)}_removeEditorStyleSheets(e){this._editorStyleSheets.delete(e)}registerDecorationType(e,t,i,n){let o=this._decorationOptionProviders.get(e);if(!o){const r=this._getOrCreateStyleSheet(n),s={styleSheet:r,key:e,parentTypeKey:i,options:t||Object.create(null)};o=i?new xD(this._themeService,r,s):new LD(this._themeService,r,s),this._decorationOptionProviders.set(e,o)}o.refCount++}removeDecorationType(e){const t=this._decorationOptionProviders.get(e);t&&(t.refCount--,t.refCount<=0&&(this._decorationOptionProviders.delete(e),t.dispose(),this.listCodeEditors().forEach(t=>t.removeDecorations(e))))}resolveDecorationOptions(e,t){const i=this._decorationOptionProviders.get(e);if(!i)throw new Error("Unknown decoration type key: "+e);return i.getOptions(this,t)}};SD=vD([wD(0,ep)],SD);class xD{constructor(e,t,i){this._styleSheet=t,this._styleSheet.ref(),this._parentTypeKey=i.parentTypeKey,this.refCount=0,this._beforeContentRules=new ED(3,i,e),this._afterContentRules=new ED(4,i,e)}getOptions(e,t){const i=e.resolveDecorationOptions(this._parentTypeKey,!0);return this._beforeContentRules&&(i.beforeContentClassName=this._beforeContentRules.className),this._afterContentRules&&(i.afterContentClassName=this._afterContentRules.className),i}dispose(){this._beforeContentRules&&(this._beforeContentRules.dispose(),this._beforeContentRules=null),this._afterContentRules&&(this._afterContentRules.dispose(),this._afterContentRules=null),this._styleSheet.unref()}}class LD{constructor(e,t,i){this._disposables=new Ie,this._styleSheet=t,this._styleSheet.ref(),this.refCount=0;const n=t=>{const n=new ED(t,i,e);if(this._disposables.add(n),n.hasContent)return n.className},o=t=>{const n=new ED(t,i,e);return this._disposables.add(n),n.hasContent?{className:n.className,hasLetterSpacing:n.hasLetterSpacing}:null};this.className=n(0);const r=o(1);r&&(this.inlineClassName=r.className,this.inlineClassNameAffectsLetterSpacing=r.hasLetterSpacing),this.beforeContentClassName=n(3),this.afterContentClassName=n(4),this.glyphMarginClassName=n(2);const s=i.options;this.isWholeLine=Boolean(s.isWholeLine),this.stickiness=s.rangeBehavior;const a=s.light&&s.light.overviewRulerColor||s.overviewRulerColor,l=s.dark&&s.dark.overviewRulerColor||s.overviewRulerColor;"undefined"===typeof a&&"undefined"===typeof l||(this.overviewRuler={color:a||l,darkColor:l||a,position:s.overviewRulerLane||Cs.Center})}getOptions(e,t){return t?{inlineClassName:this.inlineClassName,beforeContentClassName:this.beforeContentClassName,afterContentClassName:this.afterContentClassName,className:this.className,glyphMarginClassName:this.glyphMarginClassName,isWholeLine:this.isWholeLine,overviewRuler:this.overviewRuler,stickiness:this.stickiness}:this}dispose(){this._disposables.dispose(),this._styleSheet.unref()}}const kD={color:"color:{0} !important;",opacity:"opacity:{0};",backgroundColor:"background-color:{0};",outline:"outline:{0};",outlineColor:"outline-color:{0};",outlineStyle:"outline-style:{0};",outlineWidth:"outline-width:{0};",border:"border:{0};",borderColor:"border-color:{0};",borderRadius:"border-radius:{0};",borderSpacing:"border-spacing:{0};",borderStyle:"border-style:{0};",borderWidth:"border-width:{0};",fontStyle:"font-style:{0};",fontWeight:"font-weight:{0};",textDecoration:"text-decoration:{0};",cursor:"cursor:{0};",letterSpacing:"letter-spacing:{0};",gutterIconPath:"background:{0} center center no-repeat;",gutterIconSize:"background-size:{0};",contentText:"content:'{0}';",contentIconPath:"content:{0};",margin:"margin:{0};",width:"width:{0};",height:"height:{0};"};class ED{constructor(e,t,i){this._theme=i.getColorTheme(),this._ruleType=e,this._providerArgs=t,this._usesThemeColors=!1,this._hasContent=!1,this._hasLetterSpacing=!1;let n=DD.getClassName(this._providerArgs.key,e);this._providerArgs.parentTypeKey&&(n=n+" "+DD.getClassName(this._providerArgs.parentTypeKey,e)),this._className=n,this._unThemedSelector=DD.getSelector(this._providerArgs.key,this._providerArgs.parentTypeKey,e),this._buildCSS(),this._usesThemeColors?this._themeListener=i.onDidColorThemeChange(e=>{this._theme=i.getColorTheme(),this._removeCSS(),this._buildCSS()}):this._themeListener=null}dispose(){this._hasContent&&(this._removeCSS(),this._hasContent=!1),this._themeListener&&(this._themeListener.dispose(),this._themeListener=null)}get hasContent(){return this._hasContent}get hasLetterSpacing(){return this._hasLetterSpacing}get className(){return this._className}_buildCSS(){const e=this._providerArgs.options;let t,i,n;switch(this._ruleType){case 0:t=this.getCSSTextForModelDecorationClassName(e),i=this.getCSSTextForModelDecorationClassName(e.light),n=this.getCSSTextForModelDecorationClassName(e.dark);break;case 1:t=this.getCSSTextForModelDecorationInlineClassName(e),i=this.getCSSTextForModelDecorationInlineClassName(e.light),n=this.getCSSTextForModelDecorationInlineClassName(e.dark);break;case 2:t=this.getCSSTextForModelDecorationGlyphMarginClassName(e),i=this.getCSSTextForModelDecorationGlyphMarginClassName(e.light),n=this.getCSSTextForModelDecorationGlyphMarginClassName(e.dark);break;case 3:t=this.getCSSTextForModelDecorationContentClassName(e.before),i=this.getCSSTextForModelDecorationContentClassName(e.light&&e.light.before),n=this.getCSSTextForModelDecorationContentClassName(e.dark&&e.dark.before);break;case 4:t=this.getCSSTextForModelDecorationContentClassName(e.after),i=this.getCSSTextForModelDecorationContentClassName(e.light&&e.light.after),n=this.getCSSTextForModelDecorationContentClassName(e.dark&&e.dark.after);break;default:throw new Error("Unknown rule type: "+this._ruleType)}const o=this._providerArgs.styleSheet;let r=!1;t.length>0&&(o.insertRule(`${this._unThemedSelector} {${t}}`,0),r=!0),i.length>0&&(o.insertRule(`.vs${this._unThemedSelector} {${i}}`,0),r=!0),n.length>0&&(o.insertRule(`.vs-dark${this._unThemedSelector}, .hc-black${this._unThemedSelector} {${n}}`,0),r=!0),this._hasContent=r}_removeCSS(){this._providerArgs.styleSheet.removeRulesContainingSelector(this._unThemedSelector)}getCSSTextForModelDecorationClassName(e){if(!e)return"";const t=[];return this.collectCSSText(e,["backgroundColor"],t),this.collectCSSText(e,["outline","outlineColor","outlineStyle","outlineWidth"],t),this.collectBorderSettingsCSSText(e,t),t.join("")}getCSSTextForModelDecorationInlineClassName(e){if(!e)return"";const t=[];return this.collectCSSText(e,["fontStyle","fontWeight","textDecoration","cursor","color","opacity","letterSpacing"],t),e.letterSpacing&&(this._hasLetterSpacing=!0),t.join("")}getCSSTextForModelDecorationContentClassName(e){if(!e)return"";const t=[];if("undefined"!==typeof e){if(this.collectBorderSettingsCSSText(e,t),"undefined"!==typeof e.contentIconPath&&t.push(yr["v"](kD.contentIconPath,br(Ht.revive(e.contentIconPath)))),"string"===typeof e.contentText){const i=e.contentText.match(/^.*$/m)[0],n=i.replace(/['\\]/g,"\\$&");t.push(yr["v"](kD.contentText,n))}this.collectCSSText(e,["fontStyle","fontWeight","textDecoration","color","opacity","backgroundColor","margin"],t),this.collectCSSText(e,["width","height"],t)&&t.push("display:inline-block;")}return t.join("")}getCSSTextForModelDecorationGlyphMarginClassName(e){if(!e)return"";const t=[];return"undefined"!==typeof e.gutterIconPath&&(t.push(yr["v"](kD.gutterIconPath,br(Ht.revive(e.gutterIconPath)))),"undefined"!==typeof e.gutterIconSize&&t.push(yr["v"](kD.gutterIconSize,e.gutterIconSize))),t.join("")}collectBorderSettingsCSSText(e,t){return!!this.collectCSSText(e,["border","borderColor","borderRadius","borderSpacing","borderStyle","borderWidth"],t)&&(t.push(yr["v"]("box-sizing: border-box;")),!0)}collectCSSText(e,t,i){const n=i.length;for(let o of t){const t=this.resolveValue(e[o]);"string"===typeof t&&i.push(yr["v"](kD[o],t))}return i.length!==n}resolveValue(e){if(vs(e)){this._usesThemeColors=!0;const t=this._theme.getColor(e.id);return t?t.toString():"transparent"}return e}}class DD{static getClassName(e,t){return"ced-"+e+"-"+t}static getSelector(e,t,i){let n=".monaco-editor ."+this.getClassName(e,i);return t&&(n=n+"."+this.getClassName(t,i)),3===i?n+="::before":4===i&&(n+="::after"),n}}class ND extends SD{getActiveCodeEditor(){return null}openCodeEditor(e,t,i){return t?Promise.resolve(this.doOpenEditor(t,e)):Promise.resolve(null)}doOpenEditor(e,t){const i=this.findModel(e,t.resource);if(!i){if(t.resource){const i=t.resource.scheme;if(i===Yn.http||i===Yn.https)return mr(t.resource.toString()),e}return null}const n=t.options?t.options.selection:null;if(n)if("number"===typeof n.endLineNumber&&"number"===typeof n.endColumn)e.setSelection(n),e.revealRangeInCenter(n,1);else{const t={lineNumber:n.startLineNumber,column:n.startColumn};e.setPosition(t),e.revealPositionInCenter(t,1)}return e}findModel(e,t){const i=e.getModel();return i&&i.uri.toString()!==t.toString()?null:i}}class TD{constructor(e,t,i,n,o){this.token=e,this.index=t,this.fontStyle=i,this.foreground=n,this.background=o}}function MD(e){if(!e||!Array.isArray(e))return[];let t=[],i=0;for(let n=0,o=e.length;n<o;n++){let o=e[n],r=-1;if("string"===typeof o.fontStyle){r=0;let e=o.fontStyle.split(" ");for(let t=0,i=e.length;t<i;t++){let i=e[t];switch(i){case"italic":r|=1;break;case"bold":r|=2;break;case"underline":r|=4;break}}}let s=null;"string"===typeof o.foreground&&(s=o.foreground);let a=null;"string"===typeof o.background&&(a=o.background),t[i++]=new TD(o.token||"",n,r,s,a)}return t}function ID(e,t){e.sort((e,t)=>{let i=WD(e.token,t.token);return 0!==i?i:e.index-t.index});let i=0,n="000000",o="ffffff";while(e.length>=1&&""===e[0].token){let t=e.shift();-1!==t.fontStyle&&(i=t.fontStyle),null!==t.foreground&&(n=t.foreground),null!==t.background&&(o=t.background)}let r=new AD;for(let h of t)r.getId(h);let s=r.getId(n),a=r.getId(o),l=new BD(i,s,a),c=new VD(l);for(let h=0,d=e.length;h<d;h++){let t=e[h];c.insert(t.token,t.fontStyle,r.getId(t.foreground),r.getId(t.background))}return new RD(r,c)}const OD=/^#?([0-9A-Fa-f]{6})([0-9A-Fa-f]{2})?$/;class AD{constructor(){this._lastColorId=0,this._id2color=[],this._color2id=new Map}getId(e){if(null===e)return 0;const t=e.match(OD);if(!t)throw new Error("Illegal value for token color: "+e);e=t[1].toUpperCase();let i=this._color2id.get(e);return i||(i=++this._lastColorId,this._color2id.set(e,i),this._id2color[i]=Nb.fromHex("#"+e),i)}getColorMap(){return this._id2color.slice(0)}}class RD{constructor(e,t){this._colorMap=e,this._root=t,this._cache=new Map}static createFromRawTokenTheme(e,t){return this.createFromParsedTokenTheme(MD(e),t)}static createFromParsedTokenTheme(e,t){return ID(e,t)}getColorMap(){return this._colorMap.getColorMap()}_match(e){return this._root.match(e)}match(e,t){let i=this._cache.get(t);if("undefined"===typeof i){let e=this._match(t),n=FD(t);i=(e.metadata|n<<8)>>>0,this._cache.set(t,i)}return(i|e<<0)>>>0}}const PD=/\b(comment|string|regex|regexp)\b/;function FD(e){let t=e.match(PD);if(!t)return 0;switch(t[1]){case"comment":return 1;case"string":return 2;case"regex":return 4;case"regexp":return 4}throw new Error("Unexpected match for standard token type!")}function WD(e,t){return e<t?-1:e>t?1:0}class BD{constructor(e,t,i){this._fontStyle=e,this._foreground=t,this._background=i,this.metadata=(this._fontStyle<<11|this._foreground<<14|this._background<<23)>>>0}clone(){return new BD(this._fontStyle,this._foreground,this._background)}acceptOverwrite(e,t,i){-1!==e&&(this._fontStyle=e),0!==t&&(this._foreground=t),0!==i&&(this._background=i),this.metadata=(this._fontStyle<<11|this._foreground<<14|this._background<<23)>>>0}}class VD{constructor(e){this._mainRule=e,this._children=new Map}match(e){if(""===e)return this._mainRule;let t,i,n=e.indexOf(".");-1===n?(t=e,i=""):(t=e.substring(0,n),i=e.substring(n+1));let o=this._children.get(t);return"undefined"!==typeof o?o.match(i):this._mainRule}insert(e,t,i,n){if(""===e)return void this._mainRule.acceptOverwrite(t,i,n);let o,r,s=e.indexOf(".");-1===s?(o=e,r=""):(o=e.substring(0,s),r=e.substring(s+1));let a=this._children.get(o);"undefined"===typeof a&&(a=new VD(this._mainRule.clone()),this._children.set(o,a)),a.insert(r,t,i,n)}}function HD(e){let t=[];for(let i=1,n=e.length;i<n;i++){let n=e[i];t[i]=`.mtk${i} { color: ${n}; }`}return t.push(".mtki { font-style: italic; }"),t.push(".mtkb { font-weight: bold; }"),t.push(".mtku { text-decoration: underline; text-underline-position: under; }"),t.join("\n")}const zD={base:"vs",inherit:!1,rules:[{token:"",foreground:"000000",background:"fffffe"},{token:"invalid",foreground:"cd3131"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"001188"},{token:"variable.predefined",foreground:"4864AA"},{token:"constant",foreground:"dd0000"},{token:"comment",foreground:"008000"},{token:"number",foreground:"098658"},{token:"number.hex",foreground:"3030c0"},{token:"regexp",foreground:"800000"},{token:"annotation",foreground:"808080"},{token:"type",foreground:"008080"},{token:"delimiter",foreground:"000000"},{token:"delimiter.html",foreground:"383838"},{token:"delimiter.xml",foreground:"0000FF"},{token:"tag",foreground:"800000"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta.scss",foreground:"800000"},{token:"metatag",foreground:"e00000"},{token:"metatag.content.html",foreground:"FF0000"},{token:"metatag.html",foreground:"808080"},{token:"metatag.xml",foreground:"808080"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"863B00"},{token:"string.key.json",foreground:"A31515"},{token:"string.value.json",foreground:"0451A5"},{token:"attribute.name",foreground:"FF0000"},{token:"attribute.value",foreground:"0451A5"},{token:"attribute.value.number",foreground:"098658"},{token:"attribute.value.unit",foreground:"098658"},{token:"attribute.value.html",foreground:"0000FF"},{token:"attribute.value.xml",foreground:"0000FF"},{token:"string",foreground:"A31515"},{token:"string.html",foreground:"0000FF"},{token:"string.sql",foreground:"FF0000"},{token:"string.yaml",foreground:"0451A5"},{token:"keyword",foreground:"0000FF"},{token:"keyword.json",foreground:"0451A5"},{token:"keyword.flow",foreground:"AF00DB"},{token:"keyword.flow.scss",foreground:"0000FF"},{token:"operator.scss",foreground:"666666"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"666666"},{token:"predefined.sql",foreground:"FF00FF"}],colors:{[Lw]:"#FFFFFE",[kw]:"#000000",[Fw]:"#E5EBF1",[VC]:"#D3D3D3",[HC]:"#939393",[Ww]:"#ADD6FF4D"}},UD={base:"vs-dark",inherit:!1,rules:[{token:"",foreground:"D4D4D4",background:"1E1E1E"},{token:"invalid",foreground:"f44747"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"74B0DF"},{token:"variable.predefined",foreground:"4864AA"},{token:"variable.parameter",foreground:"9CDCFE"},{token:"constant",foreground:"569CD6"},{token:"comment",foreground:"608B4E"},{token:"number",foreground:"B5CEA8"},{token:"number.hex",foreground:"5BB498"},{token:"regexp",foreground:"B46695"},{token:"annotation",foreground:"cc6666"},{token:"type",foreground:"3DC9B0"},{token:"delimiter",foreground:"DCDCDC"},{token:"delimiter.html",foreground:"808080"},{token:"delimiter.xml",foreground:"808080"},{token:"tag",foreground:"569CD6"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta.scss",foreground:"A79873"},{token:"meta.tag",foreground:"CE9178"},{token:"metatag",foreground:"DD6A6F"},{token:"metatag.content.html",foreground:"9CDCFE"},{token:"metatag.html",foreground:"569CD6"},{token:"metatag.xml",foreground:"569CD6"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"9CDCFE"},{token:"string.key.json",foreground:"9CDCFE"},{token:"string.value.json",foreground:"CE9178"},{token:"attribute.name",foreground:"9CDCFE"},{token:"attribute.value",foreground:"CE9178"},{token:"attribute.value.number.css",foreground:"B5CEA8"},{token:"attribute.value.unit.css",foreground:"B5CEA8"},{token:"attribute.value.hex.css",foreground:"D4D4D4"},{token:"string",foreground:"CE9178"},{token:"string.sql",foreground:"FF0000"},{token:"keyword",foreground:"569CD6"},{token:"keyword.flow",foreground:"C586C0"},{token:"keyword.json",foreground:"CE9178"},{token:"keyword.flow.scss",foreground:"569CD6"},{token:"operator.scss",foreground:"909090"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"909090"},{token:"predefined.sql",foreground:"FF00FF"}],colors:{[Lw]:"#1E1E1E",[kw]:"#D4D4D4",[Fw]:"#3A3D41",[VC]:"#404040",[HC]:"#707070",[Ww]:"#ADD6FF26"}},jD={base:"hc-black",inherit:!1,rules:[{token:"",foreground:"FFFFFF",background:"000000"},{token:"invalid",foreground:"f44747"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"1AEBFF"},{token:"variable.parameter",foreground:"9CDCFE"},{token:"constant",foreground:"569CD6"},{token:"comment",foreground:"608B4E"},{token:"number",foreground:"FFFFFF"},{token:"regexp",foreground:"C0C0C0"},{token:"annotation",foreground:"569CD6"},{token:"type",foreground:"3DC9B0"},{token:"delimiter",foreground:"FFFF00"},{token:"delimiter.html",foreground:"FFFF00"},{token:"tag",foreground:"569CD6"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta",foreground:"D4D4D4"},{token:"meta.tag",foreground:"CE9178"},{token:"metatag",foreground:"569CD6"},{token:"metatag.content.html",foreground:"1AEBFF"},{token:"metatag.html",foreground:"569CD6"},{token:"metatag.xml",foreground:"569CD6"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"9CDCFE"},{token:"string.key",foreground:"9CDCFE"},{token:"string.value",foreground:"CE9178"},{token:"attribute.name",foreground:"569CD6"},{token:"attribute.value",foreground:"3FF23F"},{token:"string",foreground:"CE9178"},{token:"string.sql",foreground:"FF0000"},{token:"keyword",foreground:"569CD6"},{token:"keyword.flow",foreground:"C586C0"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"909090"},{token:"predefined.sql",foreground:"FF00FF"}],colors:{[Lw]:"#000000",[kw]:"#FFFFFF",[VC]:"#FFFFFF",[HC]:"#FFFFFF"}};i("c3b4"),i("8ece"),i("1613");const KD=new class{constructor(){this.onDidChange=cl.onDidRegister}getCSS(){const e=[];for(let t of cl.all)e.push(qD(t));return e.join("\n")}};function qD(e){let t=e.definition;while(t instanceof dl)t=t.definition;return`.codicon-${e.id}:before { content: '${t.character}'; }`}const $D="vs",GD="vs-dark",YD="hc-black",XD=mu.as(Wv.ColorContribution),ZD=mu.as(sp.ThemingContribution);class QD{constructor(e,t){this.semanticHighlighting=!1,this.themeData=t;let i=t.base;e.length>0?(this.id=i+" "+e,this.themeName=e):(this.id=i,this.themeName=i),this.colors=null,this.defaultColors=Object.create(null),this._tokenTheme=null}get base(){return this.themeData.base}notifyBaseUpdated(){this.themeData.inherit&&(this.colors=null,this._tokenTheme=null)}getColors(){if(!this.colors){const e=new Map;for(let t in this.themeData.colors)e.set(t,Nb.fromHex(this.themeData.colors[t]));if(this.themeData.inherit){let t=eN(this.themeData.base);for(let i in t.colors)e.has(i)||e.set(i,Nb.fromHex(t.colors[i]))}this.colors=e}return this.colors}getColor(e,t){const i=this.getColors().get(e);return i||(!1!==t?this.getDefault(e):void 0)}getDefault(e){let t=this.defaultColors[e];return t||(t=XD.resolveDefaultColor(e,this),this.defaultColors[e]=t,t)}defines(e){return Object.prototype.hasOwnProperty.call(this.getColors(),e)}get type(){switch(this.base){case $D:return"light";case YD:return"hc";default:return"dark"}}get tokenTheme(){if(!this._tokenTheme){let e=[],t=[];if(this.themeData.inherit){let i=eN(this.themeData.base);e=i.rules,i.encodedTokensColors&&(t=i.encodedTokensColors)}e=e.concat(this.themeData.rules),this.themeData.encodedTokensColors&&(t=this.themeData.encodedTokensColors),this._tokenTheme=RD.createFromRawTokenTheme(e,t)}return this._tokenTheme}getTokenStyleMetadata(e,t,i){const n=this.tokenTheme._match([e].concat(t).join(".")),o=n.metadata,r=_l.getForeground(o),s=_l.getFontStyle(o);return{foreground:r,italic:Boolean(1&s),bold:Boolean(2&s),underline:Boolean(4&s)}}}function JD(e){return e===$D||e===GD||e===YD}function eN(e){switch(e){case $D:return zD;case GD:return UD;case YD:return jD}}function tN(e){let t=eN(e);return new QD(e,t)}class iN extends Oe{constructor(){super(),this._onColorThemeChange=this._register(new Ve),this.onDidColorThemeChange=this._onColorThemeChange.event,this._environment=Object.create(null),this._knownThemes=new Map,this._knownThemes.set($D,tN($D)),this._knownThemes.set(GD,tN(GD)),this._knownThemes.set(YD,tN(YD)),this._codiconCSS=KD.getCSS(),this._themeCSS="",this._allCSS=`${this._codiconCSS}\n${this._themeCSS}`,this._globalStyleElement=null,this._styleElements=[],this.setTheme($D),KD.onDidChange(()=>{this._codiconCSS=KD.getCSS(),this._updateCSS()})}registerEditorContainer(e){return Ho(e)?this._registerShadowDomContainer(e):this._registerRegularEditorContainer()}_registerRegularEditorContainer(){return this._globalStyleElement||(this._globalStyleElement=jo(),this._globalStyleElement.className="monaco-colors",this._globalStyleElement.innerHTML=this._allCSS,this._styleElements.push(this._globalStyleElement)),Oe.None}_registerShadowDomContainer(e){const t=jo(e);return t.className="monaco-colors",t.innerHTML=this._allCSS,this._styleElements.push(t),{dispose:()=>{for(let e=0;e<this._styleElements.length;e++)if(this._styleElements[e]===t)return void this._styleElements.splice(e,1)}}}defineTheme(e,t){if(!/^[a-z0-9\-]+$/i.test(e))throw new Error("Illegal theme name!");if(!JD(t.base)&&!JD(e))throw new Error("Illegal theme base!");this._knownThemes.set(e,new QD(e,t)),JD(e)&&this._knownThemes.forEach(t=>{t.base===e&&t.notifyBaseUpdated()}),this._theme&&this._theme.themeName===e&&this.setTheme(e)}getColorTheme(){return this._theme}setTheme(e){let t;if(t=this._knownThemes.has(e)?this._knownThemes.get(e):this._knownThemes.get($D),this._theme===t)return t.id;this._theme=t;let i=[],n={},o={addRule:e=>{n[e]||(i.push(e),n[e]=!0)}};ZD.getThemingParticipants().forEach(e=>e(t,o,this._environment));let r=t.tokenTheme,s=r.getColorMap();return o.addRule(HD(s)),this._themeCSS=i.join("\n"),this._updateCSS(),Kl.setColorMap(s),this._onColorThemeChange.fire(t),t.id}_updateCSS(){this._allCSS=`${this._codiconCSS}\n${this._themeCSS}`,this._styleElements.forEach(e=>e.innerHTML=this._allCSS)}getFileIconTheme(){return{hasFileIcons:!1,hasFolderIcons:!1,hidesExplorerArrows:!1}}}var nN=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},oN=function(e,t){return function(i,n){t(i,n,e)}};const rN="data-keybinding-context";class sN{constructor(e,t){this._id=e,this._parent=t,this._value=Object.create(null),this._value["_contextId"]=e}setValue(e,t){return this._value[e]!==t&&(this._value[e]=t,!0)}removeValue(e){return e in this._value&&(delete this._value[e],!0)}getValue(e){const t=this._value[e];return"undefined"===typeof t&&this._parent?this._parent.getValue(e):t}}class aN extends sN{constructor(){super(-1,null)}setValue(e,t){return!1}removeValue(e){return!1}getValue(e){}}aN.INSTANCE=new aN;class lN extends sN{constructor(e,t,i){super(e,null),this._configurationService=t,this._values=new Map,this._listener=this._configurationService.onDidChangeConfiguration(e=>{if(6===e.source){const e=Array.from(this._values.keys());this._values.clear(),i.fire(new dN(e))}else{const t=[];for(const i of e.affectedKeys){const e="config."+i;this._values.has(e)&&(this._values.delete(e),t.push(e))}i.fire(new dN(t))}})}dispose(){this._listener.dispose()}getValue(e){if(0!==e.indexOf(lN._keyPrefix))return super.getValue(e);if(this._values.has(e))return this._values.get(e);const t=e.substr(lN._keyPrefix.length),i=this._configurationService.getValue(t);let n=void 0;switch(typeof i){case"number":case"boolean":case"string":n=i;break;default:Array.isArray(i)&&(n=JSON.stringify(i))}return this._values.set(e,n),n}setValue(e,t){return super.setValue(e,t)}removeValue(e){return super.removeValue(e)}}lN._keyPrefix="config.";class cN{constructor(e,t,i){this._service=e,this._key=t,this._defaultValue=i,this.reset()}set(e){this._service.setContext(this._key,e)}reset(){"undefined"===typeof this._defaultValue?this._service.removeContext(this._key):this._service.setContext(this._key,this._defaultValue)}get(){return this._service.getContextKeyValue(this._key)}}class hN{constructor(e){this.key=e}affectsSome(e){return e.has(this.key)}}class dN{constructor(e){this.keys=e}affectsSome(e){for(const t of this.keys)if(e.has(t))return!0;return!1}}class uN{constructor(e){this.events=e}affectsSome(e){for(const t of this.events)if(t.affectsSome(e))return!0;return!1}}class gN{constructor(e){this._onDidChangeContext=new He({merge:e=>new uN(e)}),this._isDisposed=!1,this._myContextId=e}createKey(e,t){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new cN(this,e,t)}get onDidChangeContext(){return this._onDidChangeContext.event}bufferChangeEvents(e){this._onDidChangeContext.pause();try{e()}finally{this._onDidChangeContext.resume()}}createScoped(e){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new mN(this,e)}contextMatchesRules(e){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");const t=this.getContextValuesContainer(this._myContextId),i=mg.contextMatchesRules(t,e);return i}getContextKeyValue(e){if(!this._isDisposed)return this.getContextValuesContainer(this._myContextId).getValue(e)}setContext(e,t){if(this._isDisposed)return;const i=this.getContextValuesContainer(this._myContextId);i&&i.setValue(e,t)&&this._onDidChangeContext.fire(new hN(e))}removeContext(e){this._isDisposed||this.getContextValuesContainer(this._myContextId).removeValue(e)&&this._onDidChangeContext.fire(new hN(e))}getContext(e){return this._isDisposed?aN.INSTANCE:this.getContextValuesContainer(pN(e))}}let fN=class extends gN{constructor(e){super(0),this._contexts=new Map,this._toDispose=new Ie,this._lastContextId=0;const t=new lN(this._myContextId,e,this._onDidChangeContext);this._contexts.set(this._myContextId,t),this._toDispose.add(t)}dispose(){this._isDisposed=!0,this._toDispose.dispose()}getContextValuesContainer(e){return this._isDisposed?aN.INSTANCE:this._contexts.get(e)||aN.INSTANCE}createChildContext(e=this._myContextId){if(this._isDisposed)throw new Error("ContextKeyService has been disposed");let t=++this._lastContextId;return this._contexts.set(t,new sN(t,this.getContextValuesContainer(e))),t}disposeContext(e){this._isDisposed||this._contexts.delete(e)}};fN=nN([oN(0,ig)],fN);class mN extends gN{constructor(e,t){super(e.createChildContext()),this._parent=e,t&&(this._domNode=t,this._domNode.setAttribute(rN,String(this._myContextId)))}dispose(){this._isDisposed=!0,this._parent.disposeContext(this._myContextId),this._domNode&&(this._domNode.removeAttribute(rN),this._domNode=void 0)}get onDidChangeContext(){return Fe.any(this._parent.onDidChangeContext,this._onDidChangeContext.event)}getContextValuesContainer(e){return this._isDisposed?aN.INSTANCE:this._parent.getContextValuesContainer(e)}createChildContext(e=this._myContextId){if(this._isDisposed)throw new Error("ScopedContextKeyService has been disposed");return this._parent.createChildContext(e)}disposeContext(e){this._isDisposed||this._parent.disposeContext(e)}}function pN(e){while(e){if(e.hasAttribute(rN)){const t=e.getAttribute(rN);return t?parseInt(t,10):NaN}e=e.parentElement}return 0}$r.registerCommand(Jf,(function(e,t,i){e.get(Qf).createKey(String(t),i)}));var _N;i("1a7b"),i("f743");function bN(e,t,i){const n=i.offset+i.size;return 0===i.position?t<=e-n?n:t<=i.offset?i.offset-t:Math.max(e-t,0):t<=i.offset?i.offset-t:t<=e-n?n:0}(function(e){function t(e,t){if(e.start>=t.end||t.start>=e.end)return{start:0,end:0};const i=Math.max(e.start,t.start),n=Math.min(e.end,t.end);return n-i<=0?{start:0,end:0}:{start:i,end:n}}function i(e){return e.end-e.start<=0}function n(e,n){return!i(t(e,n))}function o(e,t){const n=[],o={start:e.start,end:Math.min(t.start,e.end)},r={start:Math.max(t.end,e.start),end:e.end};return i(o)||n.push(o),i(r)||n.push(r),n}e.intersect=t,e.isEmpty=i,e.intersects=n,e.relativeComplement=o})(_N||(_N={}));class vN extends Oe{constructor(e,t){super(),this.container=null,this.delegate=null,this.toDisposeOnClean=Oe.None,this.toDisposeOnSetContainer=Oe.None,this.shadowRoot=null,this.shadowRootHostElement=null,this.view=lr(".context-view"),this.useFixedPosition=!1,this.useShadowDOM=!1,hr(this.view),this.setContainer(e,t),this._register(Me(()=>this.setContainer(null,1)))}setContainer(e,t){if(this.container&&(this.toDisposeOnSetContainer.dispose(),this.shadowRoot?(this.shadowRoot.removeChild(this.view),this.shadowRoot=null,eo(this.shadowRootHostElement),this.shadowRootHostElement=null):this.container.removeChild(this.view),this.container=null),e){this.container=e,this.useFixedPosition=1!==t,this.useShadowDOM=3===t,this.useShadowDOM?(this.shadowRootHostElement=lr(".shadow-root-host"),this.container.appendChild(this.shadowRootHostElement),this.shadowRoot=this.shadowRootHostElement.attachShadow({mode:"open"}),this.shadowRoot.innerHTML=`\n\t\t\t\t\t<style>\n\t\t\t\t\t\t${wN}\n\t\t\t\t\t</style>\n\t\t\t\t`,this.shadowRoot.appendChild(this.view),this.shadowRoot.appendChild(lr("slot"))):this.container.appendChild(this.view);const i=new Ie;vN.BUBBLE_UP_EVENTS.forEach(e=>{i.add(fo(this.container,e,e=>{this.onDOMEvent(e,!1)}))}),vN.BUBBLE_DOWN_EVENTS.forEach(e=>{i.add(fo(this.container,e,e=>{this.onDOMEvent(e,!0)},!0))}),this.toDisposeOnSetContainer=i}}show(e){this.isVisible()&&this.hide(),Jn(this.view),this.view.className="context-view",this.view.style.top="0px",this.view.style.left="0px",this.view.style.zIndex="2500",this.view.style.position=this.useFixedPosition?"fixed":"absolute",cr(this.view),this.toDisposeOnClean=e.render(this.view)||Oe.None,this.delegate=e,this.doLayout(),this.delegate.focus&&this.delegate.focus()}getViewElement(){return this.view}layout(){this.isVisible()&&(!1!==this.delegate.canRelayout||r["c"]&&Qn.pointerEvents?(this.delegate.layout&&this.delegate.layout(),this.doLayout()):this.hide())}doLayout(){if(!this.isVisible())return;let e,t=this.delegate.getAnchor();if(Xo(t)){let i=Mo(t);e={top:i.top,left:i.left,width:i.width,height:i.height}}else e={top:t.y,left:t.x,width:t.width||1,height:t.height||2};const i=Oo(this.view),n=Po(this.view),o=this.delegate.anchorPosition||0,r=this.delegate.anchorAlignment||0,s={offset:e.top-window.pageYOffset,size:e.height,position:0===o?0:1};let a;a=0===r?{offset:e.left,size:0,position:0}:{offset:e.left+e.width,size:0,position:1};const l=bN(window.innerHeight,n,s)+window.pageYOffset;_N.intersects({start:l,end:l+n},{start:s.offset,end:s.offset+s.size})&&(a.size=e.width,1===r&&(a.offset=e.left));const c=bN(window.innerWidth,i,a);ao(this.view,"top","bottom","left","right"),oo(this.view,0===o?"bottom":"top"),oo(this.view,0===r?"left":"right"),lo(this.view,"fixed",this.useFixedPosition);const h=Mo(this.container);this.view.style.top=l-(this.useFixedPosition?Mo(this.view).top:h.top)+"px",this.view.style.left=c-(this.useFixedPosition?Mo(this.view).left:h.left)+"px",this.view.style.width="initial"}hide(e){const t=this.delegate;this.delegate=null,(null===t||void 0===t?void 0:t.onHide)&&t.onHide(e),this.toDisposeOnClean.dispose(),hr(this.view)}isVisible(){return!!this.delegate}onDOMEvent(e,t){this.delegate&&(this.delegate.onDOMEvent?this.delegate.onDOMEvent(e,document.activeElement):t&&!Fo(e.target,this.container)&&this.hide())}dispose(){this.hide(),super.dispose()}}vN.BUBBLE_UP_EVENTS=["click","keydown","focus","blur"],vN.BUBBLE_DOWN_EVENTS=["click"];let wN='\n\t:host {\n\t\tall: initial; /* 1st rule so subsequent properties are reset. */\n\t}\n\n\t@font-face {\n\t\tfont-family: "codicon";\n\t\tsrc: url("./codicon.ttf?5d4d76ab2ce5108968ad644d591a16a6") format("truetype");\n\t}\n\n\t.codicon[class*=\'codicon-\'] {\n\t\tfont: normal normal normal 16px/1 codicon;\n\t\tdisplay: inline-block;\n\t\ttext-decoration: none;\n\t\ttext-rendering: auto;\n\t\ttext-align: center;\n\t\t-webkit-font-smoothing: antialiased;\n\t\t-moz-osx-font-smoothing: grayscale;\n\t\tuser-select: none;\n\t\t-webkit-user-select: none;\n\t\t-ms-user-select: none;\n\t}\n\n\t:host {\n\t\tfont-family: -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", system-ui, "Ubuntu", "Droid Sans", sans-serif;\n\t}\n\n\t:host-context(.mac) { font-family: -apple-system, BlinkMacSystemFont, sans-serif; }\n\t:host-context(.mac:lang(zh-Hans)) { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", sans-serif; }\n\t:host-context(.mac:lang(zh-Hant)) { font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", sans-serif; }\n\t:host-context(.mac:lang(ja)) { font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic Pro", sans-serif; }\n\t:host-context(.mac:lang(ko)) { font-family: -apple-system, BlinkMacSystemFont, "Nanum Gothic", "Apple SD Gothic Neo", "AppleGothic", sans-serif; }\n\n\t:host-context(.windows) { font-family: "Segoe WPC", "Segoe UI", sans-serif; }\n\t:host-context(.windows:lang(zh-Hans)) { font-family: "Segoe WPC", "Segoe UI", "Microsoft YaHei", sans-serif; }\n\t:host-context(.windows:lang(zh-Hant)) { font-family: "Segoe WPC", "Segoe UI", "Microsoft Jhenghei", sans-serif; }\n\t:host-context(.windows:lang(ja)) { font-family: "Segoe WPC", "Segoe UI", "Yu Gothic UI", "Meiryo UI", sans-serif; }\n\t:host-context(.windows:lang(ko)) { font-family: "Segoe WPC", "Segoe UI", "Malgun Gothic", "Dotom", sans-serif; }\n\n\t:host-context(.linux) { font-family: system-ui, "Ubuntu", "Droid Sans", sans-serif; }\n\t:host-context(.linux:lang(zh-Hans)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans SC", "Source Han Sans CN", "Source Han Sans", sans-serif; }\n\t:host-context(.linux:lang(zh-Hant)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans TC", "Source Han Sans TW", "Source Han Sans", sans-serif; }\n\t:host-context(.linux:lang(ja)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans J", "Source Han Sans JP", "Source Han Sans", sans-serif; }\n\t:host-context(.linux:lang(ko)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans K", "Source Han Sans JR", "Source Han Sans", "UnDotum", "FBaekmuk Gulim", sans-serif; }\n';const CN=/\(&([^\s&])\)|(^|[^&])&([^\s&])/,yN=/(&amp;)?(&amp;)([^\s&])/g,SN=hl("menu-selection",dl.check),xN=hl("menu-submenu",dl.chevronRight);var LN;(function(e){e[e["Right"]=0]="Right",e[e["Left"]=1]="Left"})(LN||(LN={}));class kN extends Bk{constructor(e,t,i={}){oo(e,"monaco-menu-container"),e.setAttribute("role","presentation");const n=document.createElement("div");oo(n,"monaco-menu"),n.setAttribute("role","presentation"),super(n,{orientation:2,actionViewItemProvider:e=>this.doGetActionViewItem(e,i,o),context:i.context,actionRunner:i.actionRunner,ariaLabel:i.ariaLabel,triggerKeys:{keys:[3,...r["f"]||r["d"]?[10]:[]],keyDown:!0}}),this.menuElement=n,this.actionsList.setAttribute("role","menu"),this.actionsList.tabIndex=0,this.menuDisposables=this._register(new Ie),this.initializeStyleSheet(e),ho(n,Zo.KEY_DOWN,e=>{const t=new mn(e);t.equals(2)&&e.preventDefault()}),i.enableMnemonics&&this.menuDisposables.add(ho(n,Zo.KEY_DOWN,e=>{const t=e.key.toLocaleLowerCase();if(this.mnemonics.has(t)){Qo.stop(e,!0);const i=this.mnemonics.get(t);if(1===i.length&&(i[0]instanceof DN&&i[0].container&&this.focusItemByElement(i[0].container),i[0].onClick(e)),i.length>1){const e=i.shift();e&&e.container&&(this.focusItemByElement(e.container),i.push(e)),this.mnemonics.set(t,i)}}})),r["d"]&&this._register(ho(n,Zo.KEY_DOWN,e=>{const t=new mn(e);t.equals(14)||t.equals(11)?(this.focusedItem=this.viewItems.length-1,this.focusNext(),Qo.stop(e,!0)):(t.equals(13)||t.equals(12))&&(this.focusedItem=0,this.focusPrevious(),Qo.stop(e,!0))})),this._register(ho(this.domNode,Zo.MOUSE_OUT,e=>{let t=e.relatedTarget;Fo(t,this.domNode)||(this.focusedItem=void 0,this.updateFocus(),e.stopPropagation())})),this._register(ho(this.actionsList,Zo.MOUSE_OVER,e=>{let t=e.target;if(t&&Fo(t,this.actionsList)&&t!==this.actionsList){while(t.parentElement!==this.actionsList&&null!==t.parentElement)t=t.parentElement;if(no(t,"action-item")){const e=this.focusedItem;this.setFocusedItem(t),e!==this.focusedItem&&this.updateFocus()}}}));let o={parent:this};this.mnemonics=new Map,this.scrollableElement=this._register(new AS(n,{alwaysConsumeMouseWheel:!0,horizontal:2,vertical:3,verticalScrollbarSize:7,handleMouseWheel:!0,useShadows:!0}));const s=this.scrollableElement.getDomNode();s.style.position="",this._register(ho(s,Zo.MOUSE_UP,e=>{e.preventDefault()})),n.style.maxHeight=Math.max(10,window.innerHeight-e.getBoundingClientRect().top-35)+"px",t=t.filter(e=>{var t;return!(null===(t=i.submenuIds)||void 0===t?void 0:t.has(e.id))||(console.warn("Found submenu cycle: "+e.id),!1)}),this.push(t,{icon:!0,label:!0,isMenu:!0}),e.appendChild(this.scrollableElement.getDomNode()),this.scrollableElement.scanDomNode(),this.viewItems.filter(e=>!(e instanceof NN)).forEach((e,t,i)=>{e.updatePositionInSet(t+1,i.length)})}initializeStyleSheet(e){Ho(e)?(this.styleSheet=jo(e),this.styleSheet.innerHTML=MN):(kN.globalStyleSheet||(kN.globalStyleSheet=jo(),kN.globalStyleSheet.innerHTML=MN),this.styleSheet=kN.globalStyleSheet)}style(e){const t=this.getContainer(),i=e.foregroundColor?""+e.foregroundColor:"",n=e.backgroundColor?""+e.backgroundColor:"",o=e.borderColor?"1px solid "+e.borderColor:"",r=e.shadowColor?"0 2px 4px "+e.shadowColor:"";t.style.border=o,this.domNode.style.color=i,this.domNode.style.backgroundColor=n,t.style.boxShadow=r,this.viewItems&&this.viewItems.forEach(t=>{(t instanceof EN||t instanceof NN)&&t.style(e)})}getContainer(){return this.scrollableElement.getDomNode()}get onScroll(){return this.scrollableElement.onScroll}focusItemByElement(e){const t=this.focusedItem;this.setFocusedItem(e),t!==this.focusedItem&&this.updateFocus()}setFocusedItem(e){for(let t=0;t<this.actionsList.children.length;t++){let i=this.actionsList.children[t];if(e===i){this.focusedItem=t;break}}}updateFocus(e){super.updateFocus(e,!0),"undefined"!==typeof this.focusedItem&&this.scrollableElement.setScrollPosition({scrollTop:Math.round(this.menuElement.scrollTop)})}doGetActionViewItem(e,t,i){if(e instanceof Of)return new NN(t.context,e,{icon:!0});if(e instanceof Af){const n=new DN(e,e.actions,i,Object.assign(Object.assign({},t),{submenuIds:new Set([...t.submenuIds||[],e.id])}));if(t.enableMnemonics){const e=n.getMnemonic();if(e&&n.isEnabled()){let t=[];this.mnemonics.has(e)&&(t=this.mnemonics.get(e)),t.push(n),this.mnemonics.set(e,t)}}return n}{const i={enableMnemonics:t.enableMnemonics,useEventAsContext:t.useEventAsContext};if(t.getKeyBinding){const n=t.getKeyBinding(e);if(n){const e=n.getLabel();e&&(i.keybinding=e)}}const n=new EN(t.context,e,i);if(t.enableMnemonics){const e=n.getMnemonic();if(e&&n.isEnabled()){let t=[];this.mnemonics.has(e)&&(t=this.mnemonics.get(e)),t.push(n),this.mnemonics.set(e,t)}}return n}}}class EN extends Fk{constructor(e,t,i={}){if(i.isMenu=!0,super(t,t,i),this.options=i,this.options.icon=void 0!==i.icon&&i.icon,this.options.label=void 0===i.label||i.label,this.cssClass="",this.options.label&&i.enableMnemonics){let e=this.getAction().label;if(e){let t=CN.exec(e);t&&(this.mnemonic=(t[1]?t[1]:t[3]).toLocaleLowerCase())}}this.runOnceToEnableMouseUp=new Tn(()=>{this.element&&(this._register(ho(this.element,Zo.MOUSE_UP,e=>{if(Qo.stop(e,!0),Ji){const t=new Cn(e);if(t.rightButton)return;this.onClick(e)}setTimeout(()=>{this.onClick(e)},0)})),this._register(ho(this.element,Zo.CONTEXT_MENU,e=>{Qo.stop(e,!0)})))},100),this._register(this.runOnceToEnableMouseUp)}render(e){super.render(e),this.element&&(this.container=e,this.item=nr(this.element,lr("a.action-menu-item")),this._action.id===Of.ID?this.item.setAttribute("role","presentation"):(this.item.setAttribute("role","menuitem"),this.mnemonic&&this.item.setAttribute("aria-keyshortcuts",""+this.mnemonic)),this.check=nr(this.item,lr("span.menu-item-check"+SN.cssSelector)),this.check.setAttribute("role","none"),this.label=nr(this.item,lr("span.action-label")),this.options.label&&this.options.keybinding&&(nr(this.item,lr("span.keybinding")).textContent=this.options.keybinding),this.runOnceToEnableMouseUp.schedule(),this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked())}blur(){super.blur(),this.applyStyle()}focus(){super.focus(),this.item&&this.item.focus(),this.applyStyle()}updatePositionInSet(e,t){this.item&&(this.item.setAttribute("aria-posinset",""+e),this.item.setAttribute("aria-setsize",""+t))}updateLabel(){if(this.label&&this.options.label){Jn(this.label);let e=ml(this.getAction().label);if(e){const t=TN(e);this.options.enableMnemonics||(e=t),this.label.setAttribute("aria-label",t.replace(/&&/g,"&"));const i=CN.exec(e);if(i){e=yr["s"](e),yN.lastIndex=0;let t=yN.exec(e);while(t&&t[1])t=yN.exec(e);const n=e=>e.replace(/&amp;&amp;/g,"&amp;");t?this.label.append(yr["I"](n(e.substr(0,t.index))," "),lr("u",{"aria-hidden":"true"},t[3]),yr["N"](n(e.substr(t.index+t[0].length))," ")):this.label.innerText=n(e).trim(),this.item&&this.item.setAttribute("aria-keyshortcuts",(i[1]?i[1]:i[3]).toLocaleLowerCase())}else this.label.innerText=e.replace(/&&/g,"&").trim()}}}updateTooltip(){let e=null;this.getAction().tooltip?e=this.getAction().tooltip:!this.options.label&&this.getAction().label&&this.options.icon&&(e=this.getAction().label,this.options.keybinding&&(e=o({key:"titleLabel",comment:["action title","action keybinding"]},"{0} ({1})",e,this.options.keybinding))),e&&this.item&&(this.item.title=e)}updateClass(){this.cssClass&&this.item&&ao(this.item,this.cssClass),this.options.icon&&this.label?(this.cssClass=this.getAction().class||"",oo(this.label,"icon"),this.cssClass&&ro(this.label,this.cssClass),this.updateEnabled()):this.label&&so(this.label,"icon")}updateEnabled(){this.getAction().enabled?(this.element&&so(this.element,"disabled"),this.item&&(so(this.item,"disabled"),this.item.tabIndex=0)):(this.element&&oo(this.element,"disabled"),this.item&&(oo(this.item,"disabled"),ur(this.item)))}updateChecked(){this.item&&(this.getAction().checked?(oo(this.item,"checked"),this.item.setAttribute("role","menuitemcheckbox"),this.item.setAttribute("aria-checked","true")):(so(this.item,"checked"),this.item.setAttribute("role","menuitem"),this.item.setAttribute("aria-checked","false")))}getMnemonic(){return this.mnemonic}applyStyle(){if(!this.menuStyle)return;const e=this.element&&no(this.element,"focused"),t=e&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor,i=e&&this.menuStyle.selectionBackgroundColor?this.menuStyle.selectionBackgroundColor:void 0,n=e&&this.menuStyle.selectionBorderColor?"thin solid "+this.menuStyle.selectionBorderColor:"";this.item&&(this.item.style.color=t?t.toString():"",this.item.style.backgroundColor=i?i.toString():""),this.check&&(this.check.style.color=t?t.toString():""),this.container&&(this.container.style.border=n)}style(e){this.menuStyle=e,this.applyStyle()}}class DN extends EN{constructor(e,t,i,n){super(e,e,n),this.submenuActions=t,this.parentData=i,this.submenuOptions=n,this.mysubmenu=null,this.submenuDisposables=this._register(new Ie),this.mouseOver=!1,this.expandDirection=n&&void 0!==n.expandDirection?n.expandDirection:LN.Right,this.showScheduler=new Tn(()=>{this.mouseOver&&(this.cleanupExistingSubmenu(!1),this.createSubmenu(!1))},250),this.hideScheduler=new Tn(()=>{this.element&&!Fo(Uo(),this.element)&&this.parentData.submenu===this.mysubmenu&&(this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!0))},750)}render(e){super.render(e),this.element&&(this.item&&(oo(this.item,"monaco-submenu-item"),this.item.setAttribute("aria-haspopup","true"),this.updateAriaExpanded("false"),this.submenuIndicator=nr(this.item,lr("span.submenu-indicator"+xN.cssSelector)),this.submenuIndicator.setAttribute("aria-hidden","true")),this._register(ho(this.element,Zo.KEY_UP,e=>{let t=new mn(e);(t.equals(17)||t.equals(3))&&(Qo.stop(e,!0),this.createSubmenu(!0))})),this._register(ho(this.element,Zo.KEY_DOWN,e=>{let t=new mn(e);Uo()===this.item&&(t.equals(17)||t.equals(3))&&Qo.stop(e,!0)})),this._register(ho(this.element,Zo.MOUSE_OVER,e=>{this.mouseOver||(this.mouseOver=!0,this.showScheduler.schedule())})),this._register(ho(this.element,Zo.MOUSE_LEAVE,e=>{this.mouseOver=!1})),this._register(ho(this.element,Zo.FOCUS_OUT,e=>{this.element&&!Fo(Uo(),this.element)&&this.hideScheduler.schedule()})),this._register(this.parentData.parent.onScroll(()=>{this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!1)})))}onClick(e){Qo.stop(e,!0),this.cleanupExistingSubmenu(!1),this.createSubmenu(!0)}cleanupExistingSubmenu(e){if(this.parentData.submenu&&(e||this.parentData.submenu!==this.mysubmenu)){try{this.parentData.submenu.dispose()}catch(t){}this.parentData.submenu=void 0,this.updateAriaExpanded("false"),this.submenuContainer&&(this.submenuDisposables.clear(),this.submenuContainer=void 0)}}calculateSubmenuMenuLayout(e,t,i,n){const o={top:0,left:0};return o.left=bN(e.width,t.width,{position:n===LN.Right?0:1,offset:i.left,size:i.width}),o.left>=i.left&&o.left<i.left+i.width&&(i.left+10+t.width<=e.width&&(o.left=i.left+10),i.top+=10,i.height=0),o.top=bN(e.height,t.height,{position:0,offset:i.top,size:0}),o.top+t.height===i.top&&o.top+i.height+t.height<=e.height&&(o.top+=i.height),o}createSubmenu(e=!0){if(this.element)if(this.parentData.submenu)this.parentData.submenu.focus(!1);else{this.updateAriaExpanded("true"),this.submenuContainer=nr(this.element,lr("div.monaco-submenu")),ro(this.submenuContainer,"menubar-menu-items-holder","context-view");const t=getComputedStyle(this.parentData.parent.domNode),i=parseFloat(t.paddingTop||"0")||0;this.submenuContainer.style.zIndex="1",this.submenuContainer.style.position="fixed",this.submenuContainer.style.top="0",this.submenuContainer.style.left="0",this.parentData.submenu=new kN(this.submenuContainer,this.submenuActions,this.submenuOptions),this.menuStyle&&this.parentData.submenu.style(this.menuStyle);const n=this.element.getBoundingClientRect(),o={top:n.top-i,left:n.left,height:n.height+2*i,width:n.width},r=this.submenuContainer.getBoundingClientRect(),{top:s,left:a}=this.calculateSubmenuMenuLayout({height:window.innerHeight,width:window.innerWidth},r,o,this.expandDirection);this.submenuContainer.style.left=a+"px",this.submenuContainer.style.top=s+"px",this.submenuDisposables.add(ho(this.submenuContainer,Zo.KEY_UP,e=>{let t=new mn(e);t.equals(15)&&(Qo.stop(e,!0),this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0))})),this.submenuDisposables.add(ho(this.submenuContainer,Zo.KEY_DOWN,e=>{let t=new mn(e);t.equals(15)&&Qo.stop(e,!0)})),this.submenuDisposables.add(this.parentData.submenu.onDidCancel(()=>{this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0)})),this.parentData.submenu.focus(e),this.mysubmenu=this.parentData.submenu}}updateAriaExpanded(e){var t;this.item&&(null===(t=this.item)||void 0===t||t.setAttribute("aria-expanded",e))}applyStyle(){if(super.applyStyle(),!this.menuStyle)return;const e=this.element&&no(this.element,"focused"),t=e&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor;this.submenuIndicator&&(this.submenuIndicator.style.color=t?""+t:""),this.parentData.submenu&&this.parentData.submenu.style(this.menuStyle)}dispose(){super.dispose(),this.hideScheduler.dispose(),this.mysubmenu&&(this.mysubmenu.dispose(),this.mysubmenu=null),this.submenuContainer&&(this.submenuContainer=void 0)}}class NN extends Wk{style(e){this.label&&(this.label.style.borderBottomColor=e.separatorColor?""+e.separatorColor:"")}}function TN(e){const t=CN,i=t.exec(e);if(!i)return e;const n=!i[1];return e.replace(t,n?"$2$3":"").trim()}let MN=`\n.monaco-menu {\n\tfont-size: 13px;\n\n}\n\n${qD(SN)}\n${qD(xN)}\n\n.monaco-menu .monaco-action-bar {\n\ttext-align: right;\n\toverflow: hidden;\n\twhite-space: nowrap;\n}\n\n.monaco-menu .monaco-action-bar .actions-container {\n\tdisplay: flex;\n\tmargin: 0 auto;\n\tpadding: 0;\n\twidth: 100%;\n\tjustify-content: flex-end;\n}\n\n.monaco-menu .monaco-action-bar.vertical .actions-container {\n\tdisplay: inline-block;\n}\n\n.monaco-menu .monaco-action-bar.reverse .actions-container {\n\tflex-direction: row-reverse;\n}\n\n.monaco-menu .monaco-action-bar .action-item {\n\tcursor: pointer;\n\tdisplay: inline-block;\n\ttransition: transform 50ms ease;\n\tposition: relative; /* DO NOT REMOVE - this is the key to preventing the ghosting icon bug in Chrome 42 */\n}\n\n.monaco-menu .monaco-action-bar .action-item.disabled {\n\tcursor: default;\n}\n\n.monaco-menu .monaco-action-bar.animated .action-item.active {\n\ttransform: scale(1.272019649, 1.272019649); /* 1.272019649 = √φ */\n}\n\n.monaco-menu .monaco-action-bar .action-item .icon,\n.monaco-menu .monaco-action-bar .action-item .codicon {\n\tdisplay: inline-block;\n}\n\n.monaco-menu .monaco-action-bar .action-item .codicon {\n\tdisplay: flex;\n\talign-items: center;\n}\n\n.monaco-menu .monaco-action-bar .action-label {\n\tfont-size: 11px;\n\tmargin-right: 4px;\n}\n\n.monaco-menu .monaco-action-bar .action-item.disabled .action-label,\n.monaco-menu .monaco-action-bar .action-item.disabled .action-label:hover {\n\topacity: 0.4;\n}\n\n/* Vertical actions */\n\n.monaco-menu .monaco-action-bar.vertical {\n\ttext-align: left;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item {\n\tdisplay: block;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label.separator {\n\tdisplay: block;\n\tborder-bottom: 1px solid #bbb;\n\tpadding-top: 1px;\n\tmargin-left: .8em;\n\tmargin-right: .8em;\n}\n\n.monaco-menu .secondary-actions .monaco-action-bar .action-label {\n\tmargin-left: 6px;\n}\n\n/* Action Items */\n.monaco-menu .monaco-action-bar .action-item.select-container {\n\toverflow: hidden; /* somehow the dropdown overflows its container, we prevent it here to not push */\n\tflex: 1;\n\tmax-width: 170px;\n\tmin-width: 60px;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tmargin-right: 10px;\n}\n\n.monaco-menu .monaco-action-bar.vertical {\n\tmargin-left: 0;\n\toverflow: visible;\n}\n\n.monaco-menu .monaco-action-bar.vertical .actions-container {\n\tdisplay: block;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item {\n\tpadding: 0;\n\ttransform: none;\n\tdisplay: flex;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item.active {\n\ttransform: none;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-menu-item {\n\tflex: 1 1 auto;\n\tdisplay: flex;\n\theight: 2em;\n\talign-items: center;\n\tposition: relative;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label {\n\tflex: 1 1 auto;\n\ttext-decoration: none;\n\tpadding: 0 1em;\n\tbackground: none;\n\tfont-size: 12px;\n\tline-height: 1;\n}\n\n.monaco-menu .monaco-action-bar.vertical .keybinding,\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator {\n\tdisplay: inline-block;\n\tflex: 2 1 auto;\n\tpadding: 0 1em;\n\ttext-align: right;\n\tfont-size: 12px;\n\tline-height: 1;\n}\n\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator {\n\theight: 100%;\n}\n\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator.codicon {\n\tfont-size: 16px !important;\n\tdisplay: flex;\n\talign-items: center;\n}\n\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator.codicon::before {\n\tmargin-left: auto;\n\tmargin-right: -20px;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item.disabled .keybinding,\n.monaco-menu .monaco-action-bar.vertical .action-item.disabled .submenu-indicator {\n\topacity: 0.4;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label:not(.separator) {\n\tdisplay: inline-block;\n\tbox-sizing: border-box;\n\tmargin: 0;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item {\n\tposition: static;\n\toverflow: visible;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item .monaco-submenu {\n\tposition: absolute;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label.separator {\n\tpadding: 0.5em 0 0 0;\n\tmargin-bottom: 0.5em;\n\twidth: 100%;\n\theight: 0px !important;\n\tmargin-left: .8em !important;\n\tmargin-right: .8em !important;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label.separator.text {\n\tpadding: 0.7em 1em 0.1em 1em;\n\tfont-weight: bold;\n\topacity: 1;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label:hover {\n\tcolor: inherit;\n}\n\n.monaco-menu .monaco-action-bar.vertical .menu-item-check {\n\tposition: absolute;\n\tvisibility: hidden;\n\twidth: 1em;\n\theight: 100%;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-menu-item.checked .menu-item-check {\n\tvisibility: visible;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n}\n\n/* Context Menu */\n\n.context-view.monaco-menu-container {\n\toutline: 0;\n\tborder: none;\n\tanimation: fadeIn 0.083s linear;\n}\n\n.context-view.monaco-menu-container :focus,\n.context-view.monaco-menu-container .monaco-action-bar.vertical:focus,\n.context-view.monaco-menu-container .monaco-action-bar.vertical :focus {\n\toutline: 0;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item {\n\tborder: thin solid transparent; /* prevents jumping behaviour on hover or focus */\n}\n\n\n/* High Contrast Theming */\n:host-context(.hc-black) .context-view.monaco-menu-container {\n\tbox-shadow: none;\n}\n\n:host-context(.hc-black) .monaco-menu .monaco-action-bar.vertical .action-item.focused {\n\tbackground: none;\n}\n\n/* Vertical Action Bar Styles */\n\n.monaco-menu .monaco-action-bar.vertical {\n\tpadding: .5em 0;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-menu-item {\n\theight: 1.8em;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label:not(.separator),\n.monaco-menu .monaco-action-bar.vertical .keybinding {\n\tfont-size: inherit;\n\tpadding: 0 2em;\n}\n\n.monaco-menu .monaco-action-bar.vertical .menu-item-check {\n\tfont-size: inherit;\n\twidth: 2em;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label.separator {\n\tfont-size: inherit;\n\tpadding: 0.2em 0 0 0;\n\tmargin-bottom: 0.2em;\n}\n\n:host-context(.linux) .monaco-menu .monaco-action-bar.vertical .action-label.separator {\n\tmargin-left: 0;\n\tmargin-right: 0;\n}\n\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator {\n\tfont-size: 60%;\n\tpadding: 0 1.8em;\n}\n\n:host-context(.linux) .monaco-menu .monaco-action-bar.vertical .submenu-indicator {\n\theight: 100%;\n\tmask-size: 10px 10px;\n\t-webkit-mask-size: 10px 10px;\n}\n\n.monaco-menu .action-item {\n\tcursor: default;\n}\n\n/* Arrows */\n.monaco-scrollable-element > .scrollbar > .scra {\n\tcursor: pointer;\n\tfont-size: 11px !important;\n}\n\n.monaco-scrollable-element > .visible {\n\topacity: 1;\n\n\t/* Background rule added for IE9 - to allow clicks on dom node */\n\tbackground:rgba(0,0,0,0);\n\n\ttransition: opacity 100ms linear;\n}\n.monaco-scrollable-element > .invisible {\n\topacity: 0;\n\tpointer-events: none;\n}\n.monaco-scrollable-element > .invisible.fade {\n\ttransition: opacity 800ms linear;\n}\n\n/* Scrollable Content Inset Shadow */\n.monaco-scrollable-element > .shadow {\n\tposition: absolute;\n\tdisplay: none;\n}\n.monaco-scrollable-element > .shadow.top {\n\tdisplay: block;\n\ttop: 0;\n\tleft: 3px;\n\theight: 3px;\n\twidth: 100%;\n\tbox-shadow: #DDD 0 6px 6px -6px inset;\n}\n.monaco-scrollable-element > .shadow.left {\n\tdisplay: block;\n\ttop: 3px;\n\tleft: 0;\n\theight: 100%;\n\twidth: 3px;\n\tbox-shadow: #DDD 6px 0 6px -6px inset;\n}\n.monaco-scrollable-element > .shadow.top-left-corner {\n\tdisplay: block;\n\ttop: 0;\n\tleft: 0;\n\theight: 3px;\n\twidth: 3px;\n}\n.monaco-scrollable-element > .shadow.top.left {\n\tbox-shadow: #DDD 6px 6px 6px -6px inset;\n}\n\n/* ---------- Default Style ---------- */\n\n:host-context(.vs) .monaco-scrollable-element > .scrollbar > .slider {\n\tbackground: rgba(100, 100, 100, .4);\n}\n:host-context(.vs-dark) .monaco-scrollable-element > .scrollbar > .slider {\n\tbackground: rgba(121, 121, 121, .4);\n}\n:host-context(.hc-black) .monaco-scrollable-element > .scrollbar > .slider {\n\tbackground: rgba(111, 195, 223, .6);\n}\n\n.monaco-scrollable-element > .scrollbar > .slider:hover {\n\tbackground: rgba(100, 100, 100, .7);\n}\n:host-context(.hc-black) .monaco-scrollable-element > .scrollbar > .slider:hover {\n\tbackground: rgba(111, 195, 223, .8);\n}\n\n.monaco-scrollable-element > .scrollbar > .slider.active {\n\tbackground: rgba(0, 0, 0, .6);\n}\n:host-context(.vs-dark) .monaco-scrollable-element > .scrollbar > .slider.active {\n\tbackground: rgba(191, 191, 191, .4);\n}\n:host-context(.hc-black) .monaco-scrollable-element > .scrollbar > .slider.active {\n\tbackground: rgba(111, 195, 223, 1);\n}\n\n:host-context(.vs-dark) .monaco-scrollable-element .shadow.top {\n\tbox-shadow: none;\n}\n\n:host-context(.vs-dark) .monaco-scrollable-element .shadow.left {\n\tbox-shadow: #000 6px 0 6px -6px inset;\n}\n\n:host-context(.vs-dark) .monaco-scrollable-element .shadow.top.left {\n\tbox-shadow: #000 6px 6px 6px -6px inset;\n}\n\n:host-context(.hc-black) .monaco-scrollable-element .shadow.top {\n\tbox-shadow: none;\n}\n\n:host-context(.hc-black) .monaco-scrollable-element .shadow.left {\n\tbox-shadow: none;\n}\n\n:host-context(.hc-black) .monaco-scrollable-element .shadow.top.left {\n\tbox-shadow: none;\n}\n`;function IN(e,t){const i=Object.create(null);for(let n in t){const o=t[n];o&&(i[n]=EC(o,e))}return i}function ON(e,t,i){function n(n){const o=IN(e.getColorTheme(),t);"function"===typeof i?i(o):i.style(o)}return n(e.getColorTheme()),e.onDidColorThemeChange(n)}function AN(e,t,i){return ON(t,Object.assign(Object.assign({},RN),i||{}),e)}const RN={listFocusBackground:Yw,listFocusForeground:Xw,listActiveSelectionBackground:SC(Zw,.1),listActiveSelectionForeground:Qw,listFocusAndSelectionBackground:Zw,listFocusAndSelectionForeground:Qw,listInactiveSelectionBackground:Jw,listInactiveSelectionForeground:eC,listInactiveFocusBackground:tC,listHoverBackground:iC,listHoverForeground:nC,listDropBackground:oC,listFocusOutline:Kv,listSelectionOutline:Kv,listHoverOutline:Kv,listFilterWidgetBackground:rC,listFilterWidgetOutline:sC,listFilterWidgetNoMatchesOutline:aC,listMatchesShadow:qv,treeIndentGuidesStroke:lC},PN={shadowColor:qv,borderColor:cC,foregroundColor:hC,backgroundColor:dC,selectionForegroundColor:uC,selectionBackgroundColor:gC,selectionBorderColor:fC,separatorColor:mC};function FN(e,t,i){return ON(t,Object.assign(Object.assign({},PN),i),e)}class WN{constructor(e,t,i,n,o){this.contextViewService=e,this.telemetryService=t,this.notificationService=i,this.keybindingService=n,this.themeService=o,this.focusToReturn=null,this.block=null,this.options={blockMouse:!0}}configure(e){this.options=e}showContextMenu(e){const t=e.getActions();if(!t.length)return;let i;this.focusToReturn=document.activeElement;let n=Xo(e.domForShadowRoot)?e.domForShadowRoot:void 0;this.contextViewService.showContextView({getAnchor:()=>e.getAnchor(),canRelayout:!1,anchorAlignment:e.anchorAlignment,render:n=>{let o=e.getMenuClassName?e.getMenuClassName():"";o&&(n.className+=" "+o),this.options.blockMouse&&(this.block=n.appendChild(lr(".context-view-block")),this.block.style.position="fixed",this.block.style.cursor="initial",this.block.style.left="0",this.block.style.top="0",this.block.style.width="100%",this.block.style.height="100%",this.block.style.zIndex="-1",an(this.block,Zo.MOUSE_DOWN)(e=>e.stopPropagation()));const r=new Ie,s=e.actionRunner||new If;return s.onDidBeforeRun(this.onActionRun,this,r),s.onDidRun(this.onDidActionRun,this,r),i=new kN(n,t,{actionViewItemProvider:e.getActionViewItem,context:e.getActionsContext?e.getActionsContext():null,actionRunner:s,getKeyBinding:e.getKeyBinding?e.getKeyBinding:e=>this.keybindingService.lookupKeybinding(e.id)}),r.add(FN(i,this.themeService)),i.onDidCancel(()=>this.contextViewService.hideContextView(!0),null,r),i.onDidBlur(()=>this.contextViewService.hideContextView(!0),null,r),an(window,Zo.BLUR)(()=>{this.contextViewService.hideContextView(!0)},null,r),an(window,Zo.MOUSE_DOWN)(e=>{if(e.defaultPrevented)return;let t=new Cn(e),i=t.target;if(!t.rightButton){while(i){if(i===n)return;i=i.parentElement}this.contextViewService.hideContextView(!0)}},null,r),Te(r,i)},focus:()=>{i&&i.focus(!!e.autoSelectFirstItem)},onHide:t=>{e.onHide&&e.onHide(!!t),this.block&&(eo(this.block),this.block=null),this.focusToReturn&&this.focusToReturn.focus()}},n,!!n)}onActionRun(e){this.telemetryService&&this.telemetryService.publicLog2("workbenchActionExecuted",{id:e.action.id,from:"contextMenu"}),this.contextViewService.hideContextView(!1),this.focusToReturn&&this.focusToReturn.focus()}onDidActionRun(e){e.error&&this.notificationService&&this.notificationService.error(e.error)}}var BN=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},VN=function(e,t){return function(i,n){t(i,n,e)}};let HN=class extends Oe{constructor(e,t,i,n,o){super(),this._onDidContextMenu=this._register(new Ve),this.onDidContextMenu=this._onDidContextMenu.event,this.contextMenuHandler=new WN(i,e,t,n,o)}configure(e){this.contextMenuHandler.configure(e)}showContextMenu(e){this.contextMenuHandler.showContextMenu(e),this._onDidContextMenu.fire()}};HN=BN([VN(0,cm),VN(1,Tg),VN(2,Xk),VN(3,SE),VN(4,ep)],HN);const zN=zi("layoutService");var UN=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},jN=function(e,t){return function(i,n){t(i,n,e)}};let KN=class extends Oe{constructor(e){super(),this.layoutService=e,this.currentViewDisposable=Oe.None,this.container=e.container,this.contextView=this._register(new vN(this.container,1)),this.layout(),this._register(e.onLayout(()=>this.layout()))}setContainer(e,t){this.contextView.setContainer(e,t||1)}showContextView(e,t,i){t?t!==this.container&&(this.container=t,this.setContainer(t,i?3:2)):this.container!==this.layoutService.container&&(this.container=this.layoutService.container,this.setContainer(this.container,1)),this.contextView.show(e);const n=Me(()=>{this.currentViewDisposable===n&&this.hideContextView()});return this.currentViewDisposable=n,n}getContextViewElement(){return this.contextView.getViewElement()}layout(){this.contextView.layout()}hideContextView(e){this.contextView.hide(e)}};KN=UN([jN(0,zN)],KN);const qN=zi("dialogService");class $N{constructor(e){this.incoming=new Map,this.outgoing=new Map,this.data=e}}class GN{constructor(e){this._hashFn=e,this._nodes=new Map}roots(){const e=[];for(let t of this._nodes.values())0===t.outgoing.size&&e.push(t);return e}insertEdge(e,t){const i=this.lookupOrInsertNode(e),n=this.lookupOrInsertNode(t);i.outgoing.set(this._hashFn(t),n),n.incoming.set(this._hashFn(e),i)}removeNode(e){const t=this._hashFn(e);this._nodes.delete(t);for(let i of this._nodes.values())i.outgoing.delete(t),i.incoming.delete(t)}lookupOrInsertNode(e){const t=this._hashFn(e);let i=this._nodes.get(t);return i||(i=new $N(e),this._nodes.set(t,i)),i}isEmpty(){return 0===this._nodes.size}toString(){let e=[];for(let[t,i]of this._nodes)e.push(`${t}, (incoming)[${[...i.incoming.keys()].join(", ")}], (outgoing)[${[...i.outgoing.keys()].join(",")}]`);return e.join("\n")}}const YN=!1;class XN extends Error{constructor(e){super("cyclic dependency between services"),this.message=e.toString()}}class ZN{constructor(e=new UL,t=!1,i){this._services=e,this._strict=t,this._parent=i,this._services.set(Vi,this)}createChild(e){return new ZN(e,this._strict,this)}invokeFunction(e,...t){let i=QN.traceInvocation(e),n=!1;try{const o={get:(e,t)=>{if(n)throw Ce("service accessor is only valid during the invocation of its target method");const o=this._getOrCreateServiceInstance(e,i);if(!o&&t!==Ui)throw new Error(`[invokeFunction] unknown service '${e}'`);return o}};return e(o,...t)}finally{n=!0,i.stop()}}createInstance(e,...t){let i,n;return e instanceof Ek?(i=QN.traceCreation(e.ctor),n=this._createInstance(e.ctor,e.staticArguments.concat(t),i)):(i=QN.traceCreation(e),n=this._createInstance(e,t,i)),i.stop(),n}_createInstance(e,t=[],i){let n=Bi.getServiceDependencies(e).sort((e,t)=>e.index-t.index),o=[];for(const s of n){let t=this._getOrCreateServiceInstance(s.id,i);if(!t&&this._strict&&!s.optional)throw new Error(`[createInstance] ${e.name} depends on UNKNOWN service ${s.id}.`);o.push(t)}let r=n.length>0?n[0].index:t.length;if(t.length!==r){console.warn(`[createInstance] First service dependency of ${e.name} at position ${r+1} conflicts with ${t.length} static arguments`);let i=r-t.length;t=i>0?t.concat(new Array(i)):t.slice(0,r)}return new e(...[...t,...o])}_setServiceInstance(e,t){if(this._services.get(e)instanceof Ek)this._services.set(e,t);else{if(!this._parent)throw new Error("illegalState - setting UNKNOWN service instance");this._parent._setServiceInstance(e,t)}}_getServiceInstanceOrDescriptor(e){let t=this._services.get(e);return!t&&this._parent?this._parent._getServiceInstanceOrDescriptor(e):t}_getOrCreateServiceInstance(e,t){let i=this._getServiceInstanceOrDescriptor(e);return i instanceof Ek?this._createAndCacheServiceInstance(e,i,t.branch(e,!0)):(t.branch(e,!1),i)}_createAndCacheServiceInstance(e,t,i){const n=new GN(e=>e.id.toString());let o=0;const r=[{id:e,desc:t,_trace:i}];while(r.length){const t=r.pop();if(n.lookupOrInsertNode(t),o++>1e3)throw new XN(n);for(let i of Bi.getServiceDependencies(t.desc.ctor)){let o=this._getServiceInstanceOrDescriptor(i.id);if(o||i.optional||console.warn(`[createInstance] ${e} depends on ${i.id} which is NOT registered.`),o instanceof Ek){const e={id:i.id,desc:o,_trace:t._trace.branch(i.id,!0)};n.insertEdge(t,e),r.push(e)}}}while(1){const e=n.roots();if(0===e.length){if(!n.isEmpty())throw new XN(n);break}for(const{data:t}of e){const e=this._createServiceInstanceWithOwner(t.id,t.desc.ctor,t.desc.staticArguments,t.desc.supportsDelayedInstantiation,t._trace);this._setServiceInstance(t.id,e),n.removeNode(t)}}return this._getServiceInstanceOrDescriptor(e)}_createServiceInstanceWithOwner(e,t,i=[],n,o){if(this._services.get(e)instanceof Ek)return this._createServiceInstance(t,i,n,o);if(this._parent)return this._parent._createServiceInstanceWithOwner(e,t,i,n,o);throw new Error("illegalState - creating UNKNOWN service instance "+t.name)}_createServiceInstance(e,t=[],i,n){if(i){const i=new Mn(()=>this._createInstance(e,t,n));return new Proxy(Object.create(null),{get(e,t){if(t in e)return e[t];let n=i.value,o=n[t];return"function"!==typeof o||(o=o.bind(n),e[t]=o),o},set(e,t,n){return i.value[t]=n,!0}})}return this._createInstance(e,t,n)}}class QN{constructor(e,t){this.type=e,this.name=t,this._start=Date.now(),this._dep=[]}static traceInvocation(e){return YN?new QN(1,e.name||e.toString().substring(0,42).replace(/\n/g,"")):QN._None}static traceCreation(e){return YN?new QN(0,e.name):QN._None}branch(e,t){let i=new QN(2,e.toString());return this._dep.push([e,t,i]),i}stop(){let e=Date.now()-this._start;QN._totals+=e;let t=!1;function i(e,n){let o=[],r=new Array(e+1).join("\t");for(const[s,a,l]of n._dep)if(a&&l){t=!0,o.push(`${r}CREATES -> ${s}`);let n=i(e+1,l);n&&o.push(n)}else o.push(`${r}uses -> ${s}`);return o.join("\n")}let n=[`${0===this.type?"CREATE":"CALL"} ${this.name}`,""+i(1,this),`DONE, took ${e.toFixed(2)}ms (grand total ${QN._totals.toFixed(2)}ms)`];(e>2||t)&&console.log(n.join("\n"))}}QN._None=new class extends QN{constructor(){super(-1,null)}stop(){}branch(){return this}},QN._totals=0;const JN=zi("labelService");i("dff0");class eT extends Error{constructor(e,t){super(`ListError [${e}] ${t}`)}}function tT(e,t){const i=[];for(let n of t){if(e.start>=n.range.end)continue;if(e.end<n.range.start)break;const t=_N.intersect(e,n.range);_N.isEmpty(t)||i.push({range:t,size:n.size})}return i}function iT({start:e,end:t},i){return{start:e+i,end:t+i}}function nT(e){const t=[];let i=null;for(let n of e){const e=n.range.start,o=n.range.end,r=n.size;i&&r===i.size?i.range.end=o:(i={range:{start:e,end:o},size:r},t.push(i))}return t}function oT(...e){return nT(e.reduce((e,t)=>e.concat(t),[]))}class rT{constructor(){this.groups=[],this._size=0}splice(e,t,i=[]){const n=i.length-t,o=tT({start:0,end:e},this.groups),r=tT({start:e+t,end:Number.POSITIVE_INFINITY},this.groups).map(e=>({range:iT(e.range,n),size:e.size})),s=i.map((t,i)=>({range:{start:e+i,end:e+i+1},size:t.size}));this.groups=oT(o,s,r),this._size=this.groups.reduce((e,t)=>e+t.size*(t.range.end-t.range.start),0)}get count(){const e=this.groups.length;return e?this.groups[e-1].range.end:0}get size(){return this._size}indexAt(e){if(e<0)return-1;let t=0,i=0;for(let n of this.groups){const o=n.range.end-n.range.start,r=i+o*n.size;if(e<r)return t+Math.floor((e-i)/n.size);t+=o,i=r}return t}indexAfter(e){return Math.min(this.indexAt(e)+1,this.count)}positionAt(e){if(e<0)return-1;let t=0,i=0;for(let n of this.groups){const o=n.range.end-n.range.start,r=i+o;if(e<r)return t+(e-i)*n.size;t+=o*n.size,i=r}return-1}}function sT(e){try{e.parentElement&&e.parentElement.removeChild(e)}catch(t){}}class aT{constructor(e){this.renderers=e,this.cache=new Map}alloc(e){let t=this.getTemplateCache(e).pop();if(!t){const i=lr(".monaco-list-row"),n=this.getRenderer(e),o=n.renderTemplate(i);t={domNode:i,templateId:e,templateData:o}}return t}release(e){e&&this.releaseRow(e)}releaseRow(e){const{domNode:t,templateId:i}=e;t&&(so(t,"scrolling"),sT(t));const n=this.getTemplateCache(i);n.push(e)}getTemplateCache(e){let t=this.cache.get(e);return t||(t=[],this.cache.set(e,t)),t}dispose(){this.cache.forEach((e,t)=>{for(const i of e){const e=this.getRenderer(t);e.disposeTemplate(i.templateData),i.domNode=null,i.templateData=null}}),this.cache.clear()}getRenderer(e){const t=this.renderers.get(e);if(!t)throw new Error("No renderer found for "+e);return t}}var lT=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};const cT={useShadows:!0,verticalScrollMode:1,setRowLineHeight:!0,setRowHeight:!0,supportDynamicHeights:!1,dnd:{getDragElements(e){return[e]},getDragURI(){return null},onDragStart(){},onDragOver(){return!1},drop(){}},horizontalScrolling:!1,transformOptimization:!0};class hT{constructor(e){this.elements=e}update(){}getData(){return this.elements}}class dT{constructor(e){this.elements=e}update(){}getData(){return this.elements}}class uT{constructor(){this.types=[],this.files=[]}update(e){if(e.types&&this.types.splice(0,this.types.length,...e.types),e.files){this.files.splice(0,this.files.length);for(let t=0;t<e.files.length;t++){const i=e.files.item(t);i&&(i.size||i.type)&&this.files.push(i)}}}getData(){return{types:this.types,files:this.files}}}function gT(e,t){return Array.isArray(e)&&Array.isArray(t)?An(e,t):e===t}class fT{constructor(e){(null===e||void 0===e?void 0:e.getSetSize)?this.getSetSize=e.getSetSize.bind(e):this.getSetSize=(e,t,i)=>i,(null===e||void 0===e?void 0:e.getPosInSet)?this.getPosInSet=e.getPosInSet.bind(e):this.getPosInSet=(e,t)=>t+1,(null===e||void 0===e?void 0:e.getRole)?this.getRole=e.getRole.bind(e):this.getRole=e=>"listitem",(null===e||void 0===e?void 0:e.isChecked)?this.isChecked=e.isChecked.bind(e):this.isChecked=e=>{}}}class mT{constructor(e,t,i,n=cT){if(this.virtualDelegate=t,this.domId="list_id_"+ ++mT.InstanceCount,this.renderers=new Map,this.renderWidth=0,this._scrollHeight=0,this.scrollableElementUpdateDisposable=null,this.scrollableElementWidthDelayer=new Ln(50),this.splicing=!1,this.dragOverAnimationStopDisposable=Oe.None,this.dragOverMouseY=0,this.canDrop=!1,this.currentDragFeedbackDisposable=Oe.None,this.onDragLeaveTimeout=Oe.None,this.disposables=new Ie,this._onDidChangeContentHeight=new Ve,this._horizontalScrolling=!1,n.horizontalScrolling&&n.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");this.items=[],this.itemId=0,this.rangeMap=new rT;for(const r of i)this.renderers.set(r.templateId,r);this.cache=this.disposables.add(new aT(this.renderers)),this.lastRenderTop=0,this.lastRenderHeight=0,this.domNode=document.createElement("div"),this.domNode.className="monaco-list",oo(this.domNode,this.domId),this.domNode.tabIndex=0,lo(this.domNode,"mouse-support","boolean"!==typeof n.mouseSupport||n.mouseSupport),this._horizontalScrolling=ds(n,e=>e.horizontalScrolling,cT.horizontalScrolling),lo(this.domNode,"horizontal-scrolling",this._horizontalScrolling),this.additionalScrollHeight="undefined"===typeof n.additionalScrollHeight?0:n.additionalScrollHeight,this.accessibilityProvider=new fT(n.accessibilityProvider),this.rowsContainer=document.createElement("div"),this.rowsContainer.className="monaco-list-rows";const o=ds(n,e=>e.transformOptimization,cT.transformOptimization);o&&(this.rowsContainer.style.transform="translate3d(0px, 0px, 0px)"),this.disposables.add(Im.addTarget(this.rowsContainer)),this.scrollable=new vS(ds(n,e=>e.smoothScrolling,!1)?125:0,e=>bo(e)),this.scrollableElement=this.disposables.add(new OS(this.rowsContainer,{alwaysConsumeMouseWheel:!0,horizontal:1,vertical:ds(n,e=>e.verticalScrollMode,cT.verticalScrollMode),useShadows:ds(n,e=>e.useShadows,cT.useShadows)},this.scrollable)),this.domNode.appendChild(this.scrollableElement.getDomNode()),e.appendChild(this.domNode),this.scrollableElement.onScroll(this.onScroll,this,this.disposables),an(this.rowsContainer,Tm.Change)(this.onTouchChange,this,this.disposables),an(this.scrollableElement.getDomNode(),"scroll")(e=>e.target.scrollTop=0,null,this.disposables),Fe.map(an(this.domNode,"dragover"),e=>this.toDragEvent(e))(this.onDragOver,this,this.disposables),Fe.map(an(this.domNode,"drop"),e=>this.toDragEvent(e))(this.onDrop,this,this.disposables),an(this.domNode,"dragleave")(this.onDragLeave,this,this.disposables),an(window,"dragend")(this.onDragEnd,this,this.disposables),this.setRowLineHeight=ds(n,e=>e.setRowLineHeight,cT.setRowLineHeight),this.setRowHeight=ds(n,e=>e.setRowHeight,cT.setRowHeight),this.supportDynamicHeights=ds(n,e=>e.supportDynamicHeights,cT.supportDynamicHeights),this.dnd=ds(n,e=>e.dnd,cT.dnd),this.layout()}get contentHeight(){return this.rangeMap.size}get horizontalScrolling(){return this._horizontalScrolling}set horizontalScrolling(e){if(e!==this._horizontalScrolling){if(e&&this.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");if(this._horizontalScrolling=e,lo(this.domNode,"horizontal-scrolling",this._horizontalScrolling),this._horizontalScrolling){for(const e of this.items)this.measureItemWidth(e);this.updateScrollWidth(),this.scrollableElement.setScrollDimensions({width:Ao(this.domNode)}),this.rowsContainer.style.width=Math.max(this.scrollWidth||0,this.renderWidth)+"px"}else this.scrollableElementWidthDelayer.cancel(),this.scrollableElement.setScrollDimensions({width:this.renderWidth,scrollWidth:this.renderWidth}),this.rowsContainer.style.width=""}}updateOptions(e){void 0!==e.additionalScrollHeight&&(this.additionalScrollHeight=e.additionalScrollHeight),void 0!==e.smoothScrolling&&this.scrollable.setSmoothScrollDuration(e.smoothScrolling?125:0),void 0!==e.horizontalScrolling&&(this.horizontalScrolling=e.horizontalScrolling)}splice(e,t,i=[]){if(this.splicing)throw new Error("Can't run recursive splices.");this.splicing=!0;try{return this._splice(e,t,i)}finally{this.splicing=!1,this._onDidChangeContentHeight.fire(this.contentHeight)}}_splice(e,t,i=[]){const n=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),o={start:e,end:e+t},r=_N.intersect(n,o);for(let w=r.start;w<r.end;w++)this.removeItemFromDOM(w);const s={start:e+t,end:this.items.length},a=_N.intersect(s,n),l=_N.relativeComplement(s,n),c=i.map(e=>({id:String(this.itemId++),element:e,templateId:this.virtualDelegate.getTemplateId(e),size:this.virtualDelegate.getHeight(e),width:void 0,hasDynamicHeight:!!this.virtualDelegate.hasDynamicHeight&&this.virtualDelegate.hasDynamicHeight(e),lastDynamicHeightWidth:void 0,row:null,uri:void 0,dropTarget:!1,dragStartDisposable:Oe.None}));let h;0===e&&t>=this.items.length?(this.rangeMap=new rT,this.rangeMap.splice(0,0,c),this.items=c,h=[]):(this.rangeMap.splice(e,t,c),h=this.items.splice(e,t,...c));const d=i.length-t,u=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),g=iT(a,d),f=_N.intersect(u,g);for(let w=f.start;w<f.end;w++)this.updateItemInDOM(this.items[w],w);const m=_N.relativeComplement(g,u);for(const w of m)for(let e=w.start;e<w.end;e++)this.removeItemFromDOM(e);const p=l.map(e=>iT(e,d)),_={start:e,end:e+i.length},b=[_,...p].map(e=>_N.intersect(u,e)),v=this.getNextToLastElement(b);for(const w of b)for(let e=w.start;e<w.end;e++)this.insertItemInDOM(e,v);return this.eventuallyUpdateScrollDimensions(),this.supportDynamicHeights&&this._rerender(this.scrollTop,this.renderHeight),h.map(e=>e.element)}eventuallyUpdateScrollDimensions(){this._scrollHeight=this.contentHeight,this.rowsContainer.style.height=this._scrollHeight+"px",this.scrollableElementUpdateDisposable||(this.scrollableElementUpdateDisposable=bo(()=>{this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight}),this.updateScrollWidth(),this.scrollableElementUpdateDisposable=null}))}eventuallyUpdateScrollWidth(){this.horizontalScrolling?this.scrollableElementWidthDelayer.trigger(()=>this.updateScrollWidth()):this.scrollableElementWidthDelayer.cancel()}updateScrollWidth(){if(!this.horizontalScrolling)return;let e=0;for(const t of this.items)"undefined"!==typeof t.width&&(e=Math.max(e,t.width));this.scrollWidth=e,this.scrollableElement.setScrollDimensions({scrollWidth:0===e?0:e+10})}rerender(){if(this.supportDynamicHeights){for(const e of this.items)e.lastDynamicHeightWidth=void 0;this._rerender(this.lastRenderTop,this.lastRenderHeight)}}get length(){return this.items.length}get renderHeight(){const e=this.scrollableElement.getScrollDimensions();return e.height}element(e){return this.items[e].element}domElement(e){const t=this.items[e].row;return t&&t.domNode}elementHeight(e){return this.items[e].size}elementTop(e){return this.rangeMap.positionAt(e)}indexAt(e){return this.rangeMap.indexAt(e)}indexAfter(e){return this.rangeMap.indexAfter(e)}layout(e,t){let i={height:"number"===typeof e?e:Ro(this.domNode)};this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,i.scrollHeight=this.scrollHeight),this.scrollableElement.setScrollDimensions(i),"undefined"!==typeof t&&(this.renderWidth=t,this.supportDynamicHeights&&this._rerender(this.scrollTop,this.renderHeight),this.horizontalScrolling&&this.scrollableElement.setScrollDimensions({width:"number"===typeof t?t:Ao(this.domNode)}))}render(e,t,i,n,o,r=!1){const s=this.getRenderRange(t,i),a=_N.relativeComplement(s,e),l=_N.relativeComplement(e,s),c=this.getNextToLastElement(a);if(r){const t=_N.intersect(e,s);for(let e=t.start;e<t.end;e++)this.updateItemInDOM(this.items[e],e)}for(const h of a)for(let e=h.start;e<h.end;e++)this.insertItemInDOM(e,c);for(const h of l)for(let e=h.start;e<h.end;e++)this.removeItemFromDOM(e);void 0!==n&&(this.rowsContainer.style.left=`-${n}px`),this.rowsContainer.style.top=`-${t}px`,this.horizontalScrolling&&void 0!==o&&(this.rowsContainer.style.width=Math.max(o,this.renderWidth)+"px"),this.lastRenderTop=t,this.lastRenderHeight=i}insertItemInDOM(e,t){const i=this.items[e];if(!i.row){i.row=this.cache.alloc(i.templateId);const e=this.accessibilityProvider.getRole(i.element)||"listitem";i.row.domNode.setAttribute("role",e);const t=this.accessibilityProvider.isChecked(i.element);"undefined"!==typeof t&&i.row.domNode.setAttribute("aria-checked",String(!!t))}i.row.domNode.parentElement||(t?this.rowsContainer.insertBefore(i.row.domNode,t):this.rowsContainer.appendChild(i.row.domNode)),this.updateItemInDOM(i,e);const n=this.renderers.get(i.templateId);if(!n)throw new Error("No renderer found for template id "+i.templateId);n&&n.renderElement(i.element,e,i.row.templateData,i.size);const o=this.dnd.getDragURI(i.element);if(i.dragStartDisposable.dispose(),i.row.domNode.draggable=!!o,o){const e=an(i.row.domNode,"dragstart");i.dragStartDisposable=e(e=>this.onDragStart(i.element,o,e))}this.horizontalScrolling&&(this.measureItemWidth(i),this.eventuallyUpdateScrollWidth())}measureItemWidth(e){if(!e.row||!e.row.domNode)return;e.row.domNode.style.width=Ji?"-moz-fit-content":"fit-content",e.width=Ao(e.row.domNode);const t=window.getComputedStyle(e.row.domNode);t.paddingLeft&&(e.width+=parseFloat(t.paddingLeft)),t.paddingRight&&(e.width+=parseFloat(t.paddingRight)),e.row.domNode.style.width=""}updateItemInDOM(e,t){e.row.domNode.style.top=this.elementTop(t)+"px",this.setRowHeight&&(e.row.domNode.style.height=e.size+"px"),this.setRowLineHeight&&(e.row.domNode.style.lineHeight=e.size+"px"),e.row.domNode.setAttribute("data-index",""+t),e.row.domNode.setAttribute("data-last-element",t===this.length-1?"true":"false"),e.row.domNode.setAttribute("aria-setsize",String(this.accessibilityProvider.getSetSize(e.element,t,this.length))),e.row.domNode.setAttribute("aria-posinset",String(this.accessibilityProvider.getPosInSet(e.element,t))),e.row.domNode.setAttribute("id",this.getElementDomId(t)),lo(e.row.domNode,"drop-target",e.dropTarget)}removeItemFromDOM(e){const t=this.items[e];t.dragStartDisposable.dispose();const i=this.renderers.get(t.templateId);t.row&&i&&i.disposeElement&&i.disposeElement(t.element,e,t.row.templateData,t.size),this.cache.release(t.row),t.row=null,this.horizontalScrolling&&this.eventuallyUpdateScrollWidth()}getScrollTop(){const e=this.scrollableElement.getScrollPosition();return e.scrollTop}setScrollTop(e){this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),this.scrollableElement.setScrollPosition({scrollTop:e})}get scrollTop(){return this.getScrollTop()}set scrollTop(e){this.setScrollTop(e)}get scrollHeight(){return this._scrollHeight+(this.horizontalScrolling?10:0)+this.additionalScrollHeight}get onMouseClick(){return Fe.map(an(this.domNode,"click"),e=>this.toMouseEvent(e))}get onMouseDblClick(){return Fe.map(an(this.domNode,"dblclick"),e=>this.toMouseEvent(e))}get onMouseMiddleClick(){return Fe.filter(Fe.map(an(this.domNode,"auxclick"),e=>this.toMouseEvent(e)),e=>1===e.browserEvent.button)}get onMouseDown(){return Fe.map(an(this.domNode,"mousedown"),e=>this.toMouseEvent(e))}get onContextMenu(){return Fe.map(an(this.domNode,"contextmenu"),e=>this.toMouseEvent(e))}get onTouchStart(){return Fe.map(an(this.domNode,"touchstart"),e=>this.toTouchEvent(e))}get onTap(){return Fe.map(an(this.rowsContainer,Tm.Tap),e=>this.toGestureEvent(e))}toMouseEvent(e){const t=this.getItemIndexFromEventTarget(e.target||null),i="undefined"===typeof t?void 0:this.items[t],n=i&&i.element;return{browserEvent:e,index:t,element:n}}toTouchEvent(e){const t=this.getItemIndexFromEventTarget(e.target||null),i="undefined"===typeof t?void 0:this.items[t],n=i&&i.element;return{browserEvent:e,index:t,element:n}}toGestureEvent(e){const t=this.getItemIndexFromEventTarget(e.initialTarget||null),i="undefined"===typeof t?void 0:this.items[t],n=i&&i.element;return{browserEvent:e,index:t,element:n}}toDragEvent(e){const t=this.getItemIndexFromEventTarget(e.target||null),i="undefined"===typeof t?void 0:this.items[t],n=i&&i.element;return{browserEvent:e,index:t,element:n}}onScroll(e){try{const t=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight);this.render(t,e.scrollTop,e.height,e.scrollLeft,e.scrollWidth),this.supportDynamicHeights&&this._rerender(e.scrollTop,e.height)}catch(t){throw console.error("Got bad scroll event:",e),t}}onTouchChange(e){e.preventDefault(),e.stopPropagation(),this.scrollTop-=e.translationY}onDragStart(e,t,i){if(!i.dataTransfer)return;const n=this.dnd.getDragElements(e);if(i.dataTransfer.effectAllowed="copyMove",i.dataTransfer.setData(Ak.RESOURCES,JSON.stringify([t])),i.dataTransfer.setDragImage){let e;this.dnd.getDragLabel&&(e=this.dnd.getDragLabel(n,i)),"undefined"===typeof e&&(e=String(n.length));const t=lr(".monaco-drag-image");t.textContent=e,document.body.appendChild(t),i.dataTransfer.setDragImage(t,-10,-10),setTimeout(()=>document.body.removeChild(t),0)}this.currentDragData=new hT(n),Pk.CurrentDragAndDropData=new dT(n),this.dnd.onDragStart&&this.dnd.onDragStart(this.currentDragData,i)}onDragOver(e){if(e.browserEvent.preventDefault(),this.onDragLeaveTimeout.dispose(),Pk.CurrentDragAndDropData&&"vscode-ui"===Pk.CurrentDragAndDropData.getData())return!1;if(this.setupDragAndDropScrollTopAnimation(e.browserEvent),!e.browserEvent.dataTransfer)return!1;if(!this.currentDragData)if(Pk.CurrentDragAndDropData)this.currentDragData=Pk.CurrentDragAndDropData;else{if(!e.browserEvent.dataTransfer.types)return!1;this.currentDragData=new uT}const t=this.dnd.onDragOver(this.currentDragData,e.element,e.index,e.browserEvent);if(this.canDrop="boolean"===typeof t?t:t.accept,!this.canDrop)return this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),!1;let i;if(e.browserEvent.dataTransfer.dropEffect="boolean"!==typeof t&&0===t.effect?"copy":"move",i="boolean"!==typeof t&&t.feedback?t.feedback:"undefined"===typeof e.index?[-1]:[e.index],i=zn(i).filter(e=>e>=-1&&e<this.length).sort((e,t)=>e-t),i=-1===i[0]?[-1]:i,gT(this.currentDragFeedback,i))return!0;if(this.currentDragFeedback=i,this.currentDragFeedbackDisposable.dispose(),-1===i[0])oo(this.domNode,"drop-target"),oo(this.rowsContainer,"drop-target"),this.currentDragFeedbackDisposable=Me(()=>{so(this.domNode,"drop-target"),so(this.rowsContainer,"drop-target")});else{for(const e of i){const t=this.items[e];t.dropTarget=!0,t.row&&t.row.domNode&&oo(t.row.domNode,"drop-target")}this.currentDragFeedbackDisposable=Me(()=>{for(const e of i){const t=this.items[e];t.dropTarget=!1,t.row&&t.row.domNode&&so(t.row.domNode,"drop-target")}})}return!0}onDragLeave(){this.onDragLeaveTimeout.dispose(),this.onDragLeaveTimeout=En(()=>this.clearDragOverFeedback(),100)}onDrop(e){if(!this.canDrop)return;const t=this.currentDragData;this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.currentDragData=void 0,Pk.CurrentDragAndDropData=void 0,t&&e.browserEvent.dataTransfer&&(e.browserEvent.preventDefault(),t.update(e.browserEvent.dataTransfer),this.dnd.drop(t,e.element,e.index,e.browserEvent))}onDragEnd(e){this.canDrop=!1,this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.currentDragData=void 0,Pk.CurrentDragAndDropData=void 0,this.dnd.onDragEnd&&this.dnd.onDragEnd(e)}clearDragOverFeedback(){this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),this.currentDragFeedbackDisposable=Oe.None}setupDragAndDropScrollTopAnimation(e){if(!this.dragOverAnimationDisposable){const e=To(this.domNode).top;this.dragOverAnimationDisposable=pr(this.animateDragAndDropScrollTop.bind(this,e))}this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationStopDisposable=En(()=>{this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)},1e3),this.dragOverMouseY=e.pageY}animateDragAndDropScrollTop(e){if(void 0===this.dragOverMouseY)return;const t=this.dragOverMouseY-e,i=this.renderHeight-35;t<35?this.scrollTop+=Math.max(-14,Math.floor(.3*(t-35))):t>i&&(this.scrollTop+=Math.min(14,Math.floor(.3*(t-i))))}teardownDragAndDropScrollTopAnimation(){this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)}getItemIndexFromEventTarget(e){const t=this.scrollableElement.getDomNode();let i=e;while(i instanceof HTMLElement&&i!==this.rowsContainer&&t.contains(i)){const e=i.getAttribute("data-index");if(e){const t=Number(e);if(!isNaN(t))return t}i=i.parentElement}}getRenderRange(e,t){return{start:this.rangeMap.indexAt(e),end:this.rangeMap.indexAfter(e+t-1)}}_rerender(e,t){const i=this.getRenderRange(e,t);let n,o;e===this.elementTop(i.start)?(n=i.start,o=0):i.end-i.start>1&&(n=i.start+1,o=this.elementTop(n)-e);let r=0;while(1){const s=this.getRenderRange(e,t);let a=!1;for(let e=s.start;e<s.end;e++){const t=this.probeDynamicHeight(e);0!==t&&this.rangeMap.splice(e,1,[this.items[e]]),r+=t,a=a||0!==t}if(!a){0!==r&&this.eventuallyUpdateScrollDimensions();const e=_N.relativeComplement(i,s);for(const i of e)for(let e=i.start;e<i.end;e++)this.items[e].row&&this.removeItemFromDOM(e);const t=_N.relativeComplement(s,i);for(const i of t)for(let e=i.start;e<i.end;e++){const t=e+1,i=t<this.items.length?this.items[t].row:null,n=i?i.domNode:null;this.insertItemInDOM(e,n)}for(let i=s.start;i<s.end;i++)this.items[i].row&&this.updateItemInDOM(this.items[i],i);return"number"===typeof n&&(this.scrollTop=this.elementTop(n)-o),void this._onDidChangeContentHeight.fire(this.contentHeight)}}}probeDynamicHeight(e){const t=this.items[e];if(!t.hasDynamicHeight||t.lastDynamicHeightWidth===this.renderWidth)return 0;if(this.virtualDelegate.hasDynamicHeight&&!this.virtualDelegate.hasDynamicHeight(t.element))return 0;const i=t.size;if(!this.setRowHeight&&t.row&&t.row.domNode){let e=t.row.domNode.offsetHeight;return t.size=e,t.lastDynamicHeightWidth=this.renderWidth,e-i}const n=this.cache.alloc(t.templateId);n.domNode.style.height="",this.rowsContainer.appendChild(n.domNode);const o=this.renderers.get(t.templateId);return o&&(o.renderElement(t.element,e,n.templateData,void 0),o.disposeElement&&o.disposeElement(t.element,e,n.templateData,void 0)),t.size=n.domNode.offsetHeight,this.virtualDelegate.setDynamicHeight&&this.virtualDelegate.setDynamicHeight(t.element,t.size),t.lastDynamicHeightWidth=this.renderWidth,this.rowsContainer.removeChild(n.domNode),this.cache.release(n),t.size-i}getNextToLastElement(e){const t=e[e.length-1];if(!t)return null;const i=this.items[t.end];return i&&i.row?i.row.domNode:null}getElementDomId(e){return`${this.domId}_${e}`}dispose(){if(this.items){for(const e of this.items)if(e.row){const t=this.renderers.get(e.row.templateId);t&&t.disposeTemplate(e.row.templateData)}this.items=[]}this.domNode&&this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),Ne(this.disposables)}}mT.InstanceCount=0,lT([Nm],mT.prototype,"onMouseClick",null),lT([Nm],mT.prototype,"onMouseDblClick",null),lT([Nm],mT.prototype,"onMouseMiddleClick",null),lT([Nm],mT.prototype,"onMouseDown",null),lT([Nm],mT.prototype,"onContextMenu",null),lT([Nm],mT.prototype,"onTouchStart",null),lT([Nm],mT.prototype,"onTap",null);class pT{constructor(e){this.spliceables=e}splice(e,t,i){this.spliceables.forEach(n=>n.splice(e,t,i))}}function _T(e,t,i){return Math.min(Math.max(e,t),i)}var bT,vT=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class wT{constructor(e){this.trait=e,this.renderedElements=[]}get templateId(){return"template:"+this.trait.trait}renderTemplate(e){return e}renderElement(e,t,i){const n=jn(this.renderedElements,e=>e.templateData===i);if(n>=0){const e=this.renderedElements[n];this.trait.unrender(i),e.index=t}else{const e={index:t,templateData:i};this.renderedElements.push(e)}this.trait.renderIndex(t,i)}splice(e,t,i){const n=[];for(const o of this.renderedElements)o.index<e?n.push(o):o.index>=e+t&&n.push({index:o.index+i-t,templateData:o.templateData});this.renderedElements=n}renderIndexes(e){for(const{index:t,templateData:i}of this.renderedElements)e.indexOf(t)>-1&&this.trait.renderIndex(t,i)}disposeTemplate(e){const t=jn(this.renderedElements,t=>t.templateData===e);t<0||this.renderedElements.splice(t,1)}}class CT{constructor(e){this._trait=e,this.indexes=[],this.sortedIndexes=[],this._onChange=new Ve,this.onChange=this._onChange.event}get trait(){return this._trait}get renderer(){return new wT(this)}splice(e,t,i){const n=i.length-t,o=e+t,r=[...this.sortedIndexes.filter(t=>t<e),...i.map((t,i)=>t?i+e:-1).filter(e=>-1!==e),...this.sortedIndexes.filter(e=>e>=o).map(e=>e+n)];this.renderer.splice(e,t,i.length),this._set(r,r)}renderIndex(e,t){lo(t,this._trait,this.contains(e))}unrender(e){so(e,this._trait)}set(e,t){return this._set(e,[...e].sort(HT),t)}_set(e,t,i){const n=this.indexes,o=this.sortedIndexes;this.indexes=e,this.sortedIndexes=t;const r=BT(o,e);return this.renderer.renderIndexes(r),this._onChange.fire({indexes:e,browserEvent:i}),n}get(){return this.indexes}contains(e){return Rn(this.sortedIndexes,e,HT)>=0}dispose(){Ne(this._onChange)}}vT([Nm],CT.prototype,"renderer",null);class yT extends CT{constructor(e){super("selected"),this.setAriaSelected=e}renderIndex(e,t){super.renderIndex(e,t),this.setAriaSelected&&(this.contains(e)?t.setAttribute("aria-selected","true"):t.setAttribute("aria-selected","false"))}}class ST{constructor(e,t,i){this.trait=e,this.view=t,this.identityProvider=i}splice(e,t,i){if(!this.identityProvider)return this.trait.splice(e,t,i.map(()=>!1));const n=this.trait.get().map(e=>this.identityProvider.getId(this.view.element(e)).toString()),o=i.map(e=>n.indexOf(this.identityProvider.getId(e).toString())>-1);this.trait.splice(e,t,o)}}function xT(e){return"INPUT"===e.tagName||"TEXTAREA"===e.tagName}function LT(e){return!!no(e,"monaco-editor")||!no(e,"monaco-list")&&(!!e.parentElement&&LT(e.parentElement))}class kT{constructor(e,t,i){this.list=e,this.view=t,this.disposables=new Ie;const n=!1!==i.multipleSelectionSupport,o=Fe.chain(an(t.domNode,"keydown")).filter(e=>!xT(e.target)).map(e=>new mn(e));o.filter(e=>3===e.keyCode).on(this.onEnter,this,this.disposables),o.filter(e=>16===e.keyCode).on(this.onUpArrow,this,this.disposables),o.filter(e=>18===e.keyCode).on(this.onDownArrow,this,this.disposables),o.filter(e=>11===e.keyCode).on(this.onPageUpArrow,this,this.disposables),o.filter(e=>12===e.keyCode).on(this.onPageDownArrow,this,this.disposables),o.filter(e=>9===e.keyCode).on(this.onEscape,this,this.disposables),n&&o.filter(e=>(r["f"]?e.metaKey:e.ctrlKey)&&31===e.keyCode).on(this.onCtrlA,this,this.disposables)}onEnter(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection(this.list.getFocus(),e.browserEvent)}onUpArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusPrevious(1,!1,e.browserEvent),this.list.reveal(this.list.getFocus()[0]),this.view.domNode.focus()}onDownArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusNext(1,!1,e.browserEvent),this.list.reveal(this.list.getFocus()[0]),this.view.domNode.focus()}onPageUpArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusPreviousPage(e.browserEvent),this.list.reveal(this.list.getFocus()[0]),this.view.domNode.focus()}onPageDownArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusNextPage(e.browserEvent),this.list.reveal(this.list.getFocus()[0]),this.view.domNode.focus()}onCtrlA(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection($n(this.list.length),e.browserEvent),this.view.domNode.focus()}onEscape(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection([],e.browserEvent),this.view.domNode.focus()}dispose(){this.disposables.dispose()}}(function(e){e[e["Idle"]=0]="Idle",e[e["Typing"]=1]="Typing"})(bT||(bT={}));const ET=new class{mightProducePrintableCharacter(e){return!(e.ctrlKey||e.metaKey||e.altKey)&&(e.keyCode>=31&&e.keyCode<=56||e.keyCode>=21&&e.keyCode<=30||e.keyCode>=93&&e.keyCode<=102||e.keyCode>=80&&e.keyCode<=90)}};class DT{constructor(e,t,i,n){this.list=e,this.view=t,this.keyboardNavigationLabelProvider=i,this.delegate=n,this.enabled=!1,this.state=bT.Idle,this.automaticKeyboardNavigation=!0,this.triggered=!1,this.previouslyFocused=-1,this.enabledDisposables=new Ie,this.disposables=new Ie,this.updateOptions(e.options)}updateOptions(e){const t="undefined"===typeof e.enableKeyboardNavigation||!!e.enableKeyboardNavigation;t?this.enable():this.disable(),"undefined"!==typeof e.automaticKeyboardNavigation&&(this.automaticKeyboardNavigation=e.automaticKeyboardNavigation)}enable(){if(this.enabled)return;const e=Fe.chain(an(this.view.domNode,"keydown")).filter(e=>!xT(e.target)).filter(()=>this.automaticKeyboardNavigation||this.triggered).map(e=>new mn(e)).filter(e=>this.delegate.mightProducePrintableCharacter(e)).forEach(e=>{e.stopPropagation(),e.preventDefault()}).map(e=>e.browserEvent.key).event,t=Fe.debounce(e,()=>null,800),i=Fe.reduce(Fe.any(e,t),(e,t)=>null===t?null:(e||"")+t);i(this.onInput,this,this.enabledDisposables),t(this.onClear,this,this.enabledDisposables),this.enabled=!0,this.triggered=!1}disable(){this.enabled&&(this.enabledDisposables.clear(),this.enabled=!1,this.triggered=!1)}onClear(){var e;const t=this.list.getFocus();if(t.length>0&&t[0]===this.previouslyFocused){const i=null===(e=this.list.options.accessibilityProvider)||void 0===e?void 0:e.getAriaLabel(this.list.element(t[0]));i&&wf(i)}this.previouslyFocused=-1}onInput(e){if(!e)return this.state=bT.Idle,void(this.triggered=!1);const t=this.list.getFocus(),i=t.length>0?t[0]:0,n=this.state===bT.Idle?1:0;this.state=bT.Typing;for(let o=0;o<this.list.length;o++){const t=(i+o+n)%this.list.length,r=this.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(this.view.element(t)),s=r&&r.toString();if("undefined"===typeof s||ga(e,s))return this.previouslyFocused=i,this.list.setFocus([t]),void this.list.reveal(t)}}dispose(){this.disable(),this.enabledDisposables.dispose(),this.disposables.dispose()}}class NT{constructor(e,t){this.list=e,this.view=t,this.disposables=new Ie;const i=Fe.chain(an(t.domNode,"keydown")).filter(e=>!xT(e.target)).map(e=>new mn(e));i.filter(e=>2===e.keyCode&&!e.ctrlKey&&!e.metaKey&&!e.shiftKey&&!e.altKey).on(this.onTab,this,this.disposables)}onTab(e){if(e.target!==this.view.domNode)return;const t=this.list.getFocus();if(0===t.length)return;const i=this.view.domElement(t[0]);if(!i)return;const n=i.querySelector("[tabIndex]");if(!n||!(n instanceof HTMLElement)||-1===n.tabIndex)return;const o=window.getComputedStyle(n);"hidden"!==o.visibility&&"none"!==o.display&&(e.preventDefault(),e.stopPropagation(),n.focus())}dispose(){this.disposables.dispose()}}function TT(e){return r["f"]?e.browserEvent.metaKey:e.browserEvent.ctrlKey}function MT(e){return e.browserEvent.shiftKey}function IT(e){return e instanceof MouseEvent&&2===e.button}const OT={isSelectionSingleChangeEvent:TT,isSelectionRangeChangeEvent:MT};class AT{constructor(e){this.list=e,this.disposables=new Ie,this._onPointer=new Ve,this.onPointer=this._onPointer.event,this.multipleSelectionSupport=!(!1===e.options.multipleSelectionSupport),this.multipleSelectionSupport&&(this.multipleSelectionController=e.options.multipleSelectionController||OT),this.mouseSupport="undefined"===typeof e.options.mouseSupport||!!e.options.mouseSupport,this.mouseSupport&&(e.onMouseDown(this.onMouseDown,this,this.disposables),e.onContextMenu(this.onContextMenu,this,this.disposables),e.onMouseDblClick(this.onDoubleClick,this,this.disposables),e.onTouchStart(this.onMouseDown,this,this.disposables),this.disposables.add(Im.addTarget(e.getHTMLElement()))),Fe.any(e.onMouseClick,e.onMouseMiddleClick,e.onTap)(this.onViewPointer,this,this.disposables)}isSelectionSingleChangeEvent(e){return this.multipleSelectionController?this.multipleSelectionController.isSelectionSingleChangeEvent(e):r["f"]?e.browserEvent.metaKey:e.browserEvent.ctrlKey}isSelectionRangeChangeEvent(e){return this.multipleSelectionController?this.multipleSelectionController.isSelectionRangeChangeEvent(e):e.browserEvent.shiftKey}isSelectionChangeEvent(e){return this.isSelectionSingleChangeEvent(e)||this.isSelectionRangeChangeEvent(e)}onMouseDown(e){LT(e.browserEvent.target)||document.activeElement!==e.browserEvent.target&&this.list.domFocus()}onContextMenu(e){if(LT(e.browserEvent.target))return;const t="undefined"===typeof e.index?[]:[e.index];this.list.setFocus(t,e.browserEvent)}onViewPointer(e){if(!this.mouseSupport)return;if(xT(e.browserEvent.target)||LT(e.browserEvent.target))return;let t=this.list.getFocus()[0];const i=this.list.getSelection();t=void 0===t?i[0]:t;const n=e.index;return"undefined"===typeof n?(this.list.setFocus([],e.browserEvent),void this.list.setSelection([],e.browserEvent)):this.multipleSelectionSupport&&this.isSelectionRangeChangeEvent(e)||this.multipleSelectionSupport&&this.isSelectionChangeEvent(e)?this.changeSelection(e,t):(this.list.setFocus([n],e.browserEvent),IT(e.browserEvent)||this.list.setSelection([n],e.browserEvent),void this._onPointer.fire(e))}onDoubleClick(e){if(xT(e.browserEvent.target)||LT(e.browserEvent.target))return;if(this.multipleSelectionSupport&&this.isSelectionChangeEvent(e))return;const t=this.list.getFocus();this.list.setSelection(t,e.browserEvent)}changeSelection(e,t){const i=e.index;if(this.isSelectionRangeChangeEvent(e)&&void 0!==t){const n=Math.min(t,i),o=Math.max(t,i),r=$n(n,o+1),s=this.list.getSelection(),a=WT(BT(s,[t]),t);if(0===a.length)return;const l=BT(r,VT(s,a));this.list.setSelection(l,e.browserEvent)}else if(this.isSelectionSingleChangeEvent(e)){const t=this.list.getSelection(),n=t.filter(e=>e!==i);this.list.setFocus([i]),t.length===n.length?this.list.setSelection([...n,i],e.browserEvent):this.list.setSelection(n,e.browserEvent)}}dispose(){this.disposables.dispose()}}class RT{constructor(e,t){this.styleElement=e,this.selectorSuffix=t}style(e){const t=this.selectorSuffix&&"."+this.selectorSuffix,i=[];e.listBackground&&(e.listBackground.isOpaque()?i.push(`.monaco-list${t} .monaco-list-rows { background: ${e.listBackground}; }`):r["f"]||console.warn(`List with id '${this.selectorSuffix}' was styled with a non-opaque background color. This will break sub-pixel antialiasing.`)),e.listFocusBackground&&(i.push(`.monaco-list${t}:focus .monaco-list-row.focused { background-color: ${e.listFocusBackground}; }`),i.push(`.monaco-list${t}:focus .monaco-list-row.focused:hover { background-color: ${e.listFocusBackground}; }`)),e.listFocusForeground&&i.push(`.monaco-list${t}:focus .monaco-list-row.focused { color: ${e.listFocusForeground}; }`),e.listActiveSelectionBackground&&(i.push(`.monaco-list${t}:focus .monaco-list-row.selected { background-color: ${e.listActiveSelectionBackground}; }`),i.push(`.monaco-list${t}:focus .monaco-list-row.selected:hover { background-color: ${e.listActiveSelectionBackground}; }`)),e.listActiveSelectionForeground&&i.push(`.monaco-list${t}:focus .monaco-list-row.selected { color: ${e.listActiveSelectionForeground}; }`),e.listFocusAndSelectionBackground&&i.push(`\n\t\t\t\t.monaco-drag-image,\n\t\t\t\t.monaco-list${t}:focus .monaco-list-row.selected.focused { background-color: ${e.listFocusAndSelectionBackground}; }\n\t\t\t`),e.listFocusAndSelectionForeground&&i.push(`\n\t\t\t\t.monaco-drag-image,\n\t\t\t\t.monaco-list${t}:focus .monaco-list-row.selected.focused { color: ${e.listFocusAndSelectionForeground}; }\n\t\t\t`),e.listInactiveFocusBackground&&(i.push(`.monaco-list${t} .monaco-list-row.focused { background-color: ${e.listInactiveFocusBackground}; }`),i.push(`.monaco-list${t} .monaco-list-row.focused:hover { background-color: ${e.listInactiveFocusBackground}; }`)),e.listInactiveSelectionBackground&&(i.push(`.monaco-list${t} .monaco-list-row.selected { background-color: ${e.listInactiveSelectionBackground}; }`),i.push(`.monaco-list${t} .monaco-list-row.selected:hover { background-color: ${e.listInactiveSelectionBackground}; }`)),e.listInactiveSelectionForeground&&i.push(`.monaco-list${t} .monaco-list-row.selected { color: ${e.listInactiveSelectionForeground}; }`),e.listHoverBackground&&i.push(`.monaco-list${t}:not(.drop-target) .monaco-list-row:hover:not(.selected):not(.focused) { background-color: ${e.listHoverBackground}; }`),e.listHoverForeground&&i.push(`.monaco-list${t} .monaco-list-row:hover:not(.selected):not(.focused) { color: ${e.listHoverForeground}; }`),e.listSelectionOutline&&i.push(`.monaco-list${t} .monaco-list-row.selected { outline: 1px dotted ${e.listSelectionOutline}; outline-offset: -1px; }`),e.listFocusOutline&&i.push(`\n\t\t\t\t.monaco-drag-image,\n\t\t\t\t.monaco-list${t}:focus .monaco-list-row.focused { outline: 1px solid ${e.listFocusOutline}; outline-offset: -1px; }\n\t\t\t`),e.listInactiveFocusOutline&&i.push(`.monaco-list${t} .monaco-list-row.focused { outline: 1px dotted ${e.listInactiveFocusOutline}; outline-offset: -1px; }`),e.listHoverOutline&&i.push(`.monaco-list${t} .monaco-list-row:hover { outline: 1px dashed ${e.listHoverOutline}; outline-offset: -1px; }`),e.listDropBackground&&i.push(`\n\t\t\t\t.monaco-list${t}.drop-target,\n\t\t\t\t.monaco-list${t} .monaco-list-rows.drop-target,\n\t\t\t\t.monaco-list${t} .monaco-list-row.drop-target { background-color: ${e.listDropBackground} !important; color: inherit !important; }\n\t\t\t`),e.listFilterWidgetBackground&&i.push(`.monaco-list-type-filter { background-color: ${e.listFilterWidgetBackground} }`),e.listFilterWidgetOutline&&i.push(`.monaco-list-type-filter { border: 1px solid ${e.listFilterWidgetOutline}; }`),e.listFilterWidgetNoMatchesOutline&&i.push(`.monaco-list-type-filter.no-matches { border: 1px solid ${e.listFilterWidgetNoMatchesOutline}; }`),e.listMatchesShadow&&i.push(`.monaco-list-type-filter { box-shadow: 1px 1px 1px ${e.listMatchesShadow}; }`);const n=i.join("\n");n!==this.styleElement.innerHTML&&(this.styleElement.innerHTML=n)}}const PT={listFocusBackground:Nb.fromHex("#7FB0D0"),listActiveSelectionBackground:Nb.fromHex("#0E639C"),listActiveSelectionForeground:Nb.fromHex("#FFFFFF"),listFocusAndSelectionBackground:Nb.fromHex("#094771"),listFocusAndSelectionForeground:Nb.fromHex("#FFFFFF"),listInactiveSelectionBackground:Nb.fromHex("#3F3F46"),listHoverBackground:Nb.fromHex("#2A2D2E"),listDropBackground:Nb.fromHex("#383B3D"),treeIndentGuidesStroke:Nb.fromHex("#a9a9a9")},FT={keyboardSupport:!0,mouseSupport:!0,multipleSelectionSupport:!0,dnd:{getDragURI(){return null},onDragStart(){},onDragOver(){return!1},drop(){}}};function WT(e,t){const i=e.indexOf(t);if(-1===i)return[];const n=[];let o=i-1;while(o>=0&&e[o]===t-(i-o))n.push(e[o--]);n.reverse(),o=i;while(o<e.length&&e[o]===t+(o-i))n.push(e[o++]);return n}function BT(e,t){const i=[];let n=0,o=0;while(n<e.length||o<t.length)if(n>=e.length)i.push(t[o++]);else if(o>=t.length)i.push(e[n++]);else{if(e[n]===t[o]){i.push(e[n]),n++,o++;continue}e[n]<t[o]?i.push(e[n++]):i.push(t[o++])}return i}function VT(e,t){const i=[];let n=0,o=0;while(n<e.length||o<t.length)if(n>=e.length)i.push(t[o++]);else if(o>=t.length)i.push(e[n++]);else{if(e[n]===t[o]){n++,o++;continue}e[n]<t[o]?i.push(e[n++]):o++}return i}const HT=(e,t)=>e-t;class zT{constructor(e,t){this._templateId=e,this.renderers=t}get templateId(){return this._templateId}renderTemplate(e){return this.renderers.map(t=>t.renderTemplate(e))}renderElement(e,t,i,n){let o=0;for(const r of this.renderers)r.renderElement(e,t,i[o++],n)}disposeElement(e,t,i,n){let o=0;for(const r of this.renderers)r.disposeElement&&r.disposeElement(e,t,i[o],n),o+=1}disposeTemplate(e){let t=0;for(const i of this.renderers)i.disposeTemplate(e[t++])}}class UT{constructor(e){this.accessibilityProvider=e,this.templateId="a18n"}renderTemplate(e){return e}renderElement(e,t,i){const n=this.accessibilityProvider.getAriaLabel(e);n?i.setAttribute("aria-label",n):i.removeAttribute("aria-label");const o=this.accessibilityProvider.getAriaLevel&&this.accessibilityProvider.getAriaLevel(e);"number"===typeof o?i.setAttribute("aria-level",""+o):i.removeAttribute("aria-level")}disposeTemplate(e){}}class jT{constructor(e,t){this.list=e,this.dnd=t}getDragElements(e){const t=this.list.getSelectedElements(),i=t.indexOf(e)>-1?t:[e];return i}getDragURI(e){return this.dnd.getDragURI(e)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e,t)}onDragStart(e,t){this.dnd.onDragStart&&this.dnd.onDragStart(e,t)}onDragOver(e,t,i,n){return this.dnd.onDragOver(e,t,i,n)}onDragEnd(e){this.dnd.onDragEnd&&this.dnd.onDragEnd(e)}drop(e,t,i,n){this.dnd.drop(e,t,i,n)}}class KT{constructor(e,t,i,n,o=FT){var r;this.user=e,this._options=o,this.eventBufferer=new ze,this._ariaLabel="",this.disposables=new Ie,this.didJustPressContextMenuKey=!1,this._onDidDispose=new Ve,this.onDidDispose=this._onDidDispose.event;const s=this._options.accessibilityProvider&&this._options.accessibilityProvider.getWidgetRole?null===(r=this._options.accessibilityProvider)||void 0===r?void 0:r.getWidgetRole():"list";this.selection=new yT("listbox"!==s),this.focus=new CT("focused"),ls(o,PT,!1);const a=[this.focus.renderer,this.selection.renderer];this.accessibilityProvider=o.accessibilityProvider,this.accessibilityProvider&&(a.push(new UT(this.accessibilityProvider)),this.accessibilityProvider.onDidChangeActiveDescendant&&this.accessibilityProvider.onDidChangeActiveDescendant(this.onDidChangeActiveDescendant,this,this.disposables)),n=n.map(e=>new zT(e.templateId,[...a,e]));const l=Object.assign(Object.assign({},o),{dnd:o.dnd&&new jT(this,o.dnd)});if(this.view=new mT(t,i,n,l),this.view.domNode.setAttribute("role",s),o.styleController)this.styleController=o.styleController(this.view.domId);else{const e=jo(this.view.domNode);this.styleController=new RT(e,this.view.domId)}if(this.spliceable=new pT([new ST(this.focus,this.view,o.identityProvider),new ST(this.selection,this.view,o.identityProvider),this.view]),this.disposables.add(this.focus),this.disposables.add(this.selection),this.disposables.add(this.view),this.disposables.add(this._onDidDispose),this.onDidFocus=Fe.map(an(this.view.domNode,"focus",!0),()=>null),this.onDidBlur=Fe.map(an(this.view.domNode,"blur",!0),()=>null),this.disposables.add(new NT(this,this.view)),"boolean"!==typeof o.keyboardSupport||o.keyboardSupport){const e=new kT(this,this.view,o);this.disposables.add(e)}if(o.keyboardNavigationLabelProvider){const e=o.keyboardNavigationDelegate||ET;this.typeLabelController=new DT(this,this.view,o.keyboardNavigationLabelProvider,e),this.disposables.add(this.typeLabelController)}this.mouseController=this.createMouseController(o),this.disposables.add(this.mouseController),this.onDidChangeFocus(this._onFocusChange,this,this.disposables),this.onDidChangeSelection(this._onSelectionChange,this,this.disposables),this.accessibilityProvider&&(this.ariaLabel=this.accessibilityProvider.getWidgetAriaLabel()),o.multipleSelectionSupport&&this.view.domNode.setAttribute("aria-multiselectable","true")}get onDidChangeFocus(){return Fe.map(this.eventBufferer.wrapEvent(this.focus.onChange),e=>this.toListEvent(e))}get onDidChangeSelection(){return Fe.map(this.eventBufferer.wrapEvent(this.selection.onChange),e=>this.toListEvent(e))}get domId(){return this.view.domId}get onMouseClick(){return this.view.onMouseClick}get onMouseDblClick(){return this.view.onMouseDblClick}get onMouseMiddleClick(){return this.view.onMouseMiddleClick}get onPointer(){return this.mouseController.onPointer}get onMouseDown(){return this.view.onMouseDown}get onTouchStart(){return this.view.onTouchStart}get onTap(){return this.view.onTap}get onContextMenu(){const e=Fe.chain(an(this.view.domNode,"keydown")).map(e=>new mn(e)).filter(e=>this.didJustPressContextMenuKey=58===e.keyCode||e.shiftKey&&68===e.keyCode).filter(e=>(e.preventDefault(),e.stopPropagation(),!1)).event,t=Fe.chain(an(this.view.domNode,"keyup")).filter(()=>{const e=this.didJustPressContextMenuKey;return this.didJustPressContextMenuKey=!1,e}).filter(()=>this.getFocus().length>0&&!!this.view.domElement(this.getFocus()[0])).map(e=>{const t=this.getFocus()[0],i=this.view.element(t),n=this.view.domElement(t);return{index:t,element:i,anchor:n,browserEvent:e}}).event,i=Fe.chain(this.view.onContextMenu).filter(()=>!this.didJustPressContextMenuKey).map(({element:e,index:t,browserEvent:i})=>({element:e,index:t,anchor:{x:i.clientX+1,y:i.clientY},browserEvent:i})).event;return Fe.any(e,t,i)}get onKeyDown(){return an(this.view.domNode,"keydown")}createMouseController(e){return new AT(this)}updateOptions(e={}){this._options=Object.assign(Object.assign({},this._options),e),this.typeLabelController&&this.typeLabelController.updateOptions(this._options),this.view.updateOptions(e)}get options(){return this._options}splice(e,t,i=[]){if(e<0||e>this.view.length)throw new eT(this.user,"Invalid start index: "+e);if(t<0)throw new eT(this.user,"Invalid delete count: "+t);0===t&&0===i.length||this.eventBufferer.bufferEvents(()=>this.spliceable.splice(e,t,i))}rerender(){this.view.rerender()}element(e){return this.view.element(e)}get length(){return this.view.length}get contentHeight(){return this.view.contentHeight}get scrollTop(){return this.view.getScrollTop()}set scrollTop(e){this.view.setScrollTop(e)}get ariaLabel(){return this._ariaLabel}set ariaLabel(e){this._ariaLabel=e,this.view.domNode.setAttribute("aria-label",e)}domFocus(){this.view.domNode.focus()}layout(e,t){this.view.layout(e,t)}setSelection(e,t){for(const i of e)if(i<0||i>=this.length)throw new eT(this.user,"Invalid index "+i);this.selection.set(e,t)}getSelection(){return this.selection.get()}getSelectedElements(){return this.getSelection().map(e=>this.view.element(e))}setFocus(e,t){for(const i of e)if(i<0||i>=this.length)throw new eT(this.user,"Invalid index "+i);this.focus.set(e,t)}focusNext(e=1,t=!1,i,n){if(0===this.length)return;const o=this.focus.get(),r=this.findNextIndex(o.length>0?o[0]+e:0,t,n);r>-1&&this.setFocus([r],i)}focusPrevious(e=1,t=!1,i,n){if(0===this.length)return;const o=this.focus.get(),r=this.findPreviousIndex(o.length>0?o[0]-e:0,t,n);r>-1&&this.setFocus([r],i)}focusNextPage(e,t){let i=this.view.indexAt(this.view.getScrollTop()+this.view.renderHeight);i=0===i?0:i-1;const n=this.view.element(i),o=this.getFocusedElements()[0];if(o!==n){const n=this.findPreviousIndex(i,!1,t);n>-1&&o!==this.view.element(n)?this.setFocus([n],e):this.setFocus([i],e)}else{const n=this.view.getScrollTop();this.view.setScrollTop(n+this.view.renderHeight-this.view.elementHeight(i)),this.view.getScrollTop()!==n&&setTimeout(()=>this.focusNextPage(e,t),0)}}focusPreviousPage(e,t){let i;const n=this.view.getScrollTop();i=0===n?this.view.indexAt(n):this.view.indexAfter(n-1);const o=this.view.element(i),r=this.getFocusedElements()[0];if(r!==o){const n=this.findNextIndex(i,!1,t);n>-1&&r!==this.view.element(n)?this.setFocus([n],e):this.setFocus([i],e)}else{const i=n;this.view.setScrollTop(n-this.view.renderHeight),this.view.getScrollTop()!==i&&setTimeout(()=>this.focusPreviousPage(e,t),0)}}focusLast(e,t){if(0===this.length)return;const i=this.findPreviousIndex(this.length-1,!1,t);i>-1&&this.setFocus([i],e)}focusFirst(e,t){this.focusNth(0,e,t)}focusNth(e,t,i){if(0===this.length)return;const n=this.findNextIndex(e,!1,i);n>-1&&this.setFocus([n],t)}findNextIndex(e,t=!1,i){for(let n=0;n<this.length;n++){if(e>=this.length&&!t)return-1;if(e%=this.length,!i||i(this.element(e)))return e;e++}return-1}findPreviousIndex(e,t=!1,i){for(let n=0;n<this.length;n++){if(e<0&&!t)return-1;if(e=(this.length+e%this.length)%this.length,!i||i(this.element(e)))return e;e--}return-1}getFocus(){return this.focus.get()}getFocusedElements(){return this.getFocus().map(e=>this.view.element(e))}reveal(e,t){if(e<0||e>=this.length)throw new eT(this.user,"Invalid index "+e);const i=this.view.getScrollTop(),n=this.view.elementTop(e),o=this.view.elementHeight(e);if(Rr(t)){const e=o-this.view.renderHeight;this.view.setScrollTop(e*_T(t,0,1)+n)}else{const e=n+o,t=i+this.view.renderHeight;n<i&&e>=t||(n<i?this.view.setScrollTop(n):e>=t&&this.view.setScrollTop(e-this.view.renderHeight))}}getRelativeTop(e){if(e<0||e>=this.length)throw new eT(this.user,"Invalid index "+e);const t=this.view.getScrollTop(),i=this.view.elementTop(e),n=this.view.elementHeight(e);if(i<t||i+n>t+this.view.renderHeight)return null;const o=n-this.view.renderHeight;return Math.abs((t-i)/o)}getHTMLElement(){return this.view.domNode}style(e){this.styleController.style(e)}toListEvent({indexes:e,browserEvent:t}){return{indexes:e,elements:e.map(e=>this.view.element(e)),browserEvent:t}}_onFocusChange(){const e=this.focus.get();lo(this.view.domNode,"element-focused",e.length>0),this.onDidChangeActiveDescendant()}onDidChangeActiveDescendant(){var e;const t=this.focus.get();if(t.length>0){let i;(null===(e=this.accessibilityProvider)||void 0===e?void 0:e.getActiveDescendantId)&&(i=this.accessibilityProvider.getActiveDescendantId(this.view.element(t[0]))),this.view.domNode.setAttribute("aria-activedescendant",i||this.view.getElementDomId(t[0]))}else this.view.domNode.removeAttribute("aria-activedescendant")}_onSelectionChange(){const e=this.selection.get();lo(this.view.domNode,"selection-none",0===e.length),lo(this.view.domNode,"selection-single",1===e.length),lo(this.view.domNode,"selection-multiple",e.length>1)}dispose(){this._onDidDispose.fire(),this.disposables.dispose(),this._onDidDispose.dispose()}}vT([Nm],KT.prototype,"onDidChangeFocus",null),vT([Nm],KT.prototype,"onDidChangeSelection",null),vT([Nm],KT.prototype,"onContextMenu",null);class qT{constructor(e,t){this.renderer=e,this.modelProvider=t}get templateId(){return this.renderer.templateId}renderTemplate(e){const t=this.renderer.renderTemplate(e);return{data:t,disposable:Oe.None}}renderElement(e,t,i,n){if(i.disposable&&i.disposable.dispose(),!i.data)return;const o=this.modelProvider();if(o.isResolved(e))return this.renderer.renderElement(o.get(e),e,i.data,n);const r=new $e,s=o.resolve(e,r.token);i.disposable={dispose:()=>r.cancel()},this.renderer.renderPlaceholder(e,i.data),s.then(t=>this.renderer.renderElement(t,e,i.data,n))}disposeTemplate(e){e.disposable&&(e.disposable.dispose(),e.disposable=void 0),e.data&&(this.renderer.disposeTemplate(e.data),e.data=void 0)}}class $T{constructor(e,t){this.modelProvider=e,this.accessibilityProvider=t}getWidgetAriaLabel(){return this.accessibilityProvider.getWidgetAriaLabel()}getAriaLabel(e){const t=this.modelProvider();return t.isResolved(e)?this.accessibilityProvider.getAriaLabel(t.get(e)):null}}function GT(e,t){return Object.assign(Object.assign({},t),{accessibilityProvider:t.accessibilityProvider&&new $T(e,t.accessibilityProvider)})}class YT{constructor(e,t,i,n,o={}){const r=()=>this.model,s=n.map(e=>new qT(e,r));this.list=new KT(e,t,i,s,GT(r,o))}updateOptions(e){this.list.updateOptions(e)}getHTMLElement(){return this.list.getHTMLElement()}get onDidFocus(){return this.list.onDidFocus}get onDidDispose(){return this.list.onDidDispose}get onMouseDblClick(){return Fe.map(this.list.onMouseDblClick,({element:e,index:t,browserEvent:i})=>({element:void 0===e?void 0:this._model.get(e),index:t,browserEvent:i}))}get onPointer(){return Fe.map(this.list.onPointer,({element:e,index:t,browserEvent:i})=>({element:void 0===e?void 0:this._model.get(e),index:t,browserEvent:i}))}get onDidChangeFocus(){return Fe.map(this.list.onDidChangeFocus,({elements:e,indexes:t,browserEvent:i})=>({elements:e.map(e=>this._model.get(e)),indexes:t,browserEvent:i}))}get onDidChangeSelection(){return Fe.map(this.list.onDidChangeSelection,({elements:e,indexes:t,browserEvent:i})=>({elements:e.map(e=>this._model.get(e)),indexes:t,browserEvent:i}))}get model(){return this._model}set model(e){this._model=e,this.list.splice(0,this.list.length,$n(e.length))}getFocus(){return this.list.getFocus()}setSelection(e,t){this.list.setSelection(e,t)}getSelection(){return this.list.getSelection()}style(e){this.list.style(e)}dispose(){this.list.dispose()}}const XT="inputFocus";var ZT;i("72b1");(function(e){e[e["Unknown"]=0]="Unknown",e[e["Twistie"]=1]="Twistie",e[e["Element"]=2]="Element"})(ZT||(ZT={}));class QT extends Error{constructor(e,t){super(`TreeError [${e}] ${t}`)}}class JT{constructor(e){this.fn=e,this._map=new WeakMap}map(e){let t=this._map.get(e);return t||(t=this.fn(e),this._map.set(e,t)),t}}function eM(e){return"object"===typeof e&&"visibility"in e&&"data"in e}function tM(e){switch(e){case!0:return 1;case!1:return 0;default:return e}}function iM(e){return"boolean"===typeof e.collapsible}class nM{constructor(e,t,i,n={}){this.user=e,this.list=t,this.rootRef=[],this.eventBufferer=new ze,this._onDidChangeCollapseState=new Ve,this.onDidChangeCollapseState=this.eventBufferer.wrapEvent(this._onDidChangeCollapseState.event),this._onDidChangeRenderNodeCount=new Ve,this.onDidChangeRenderNodeCount=this.eventBufferer.wrapEvent(this._onDidChangeRenderNodeCount.event),this._onDidSplice=new Ve,this.onDidSplice=this._onDidSplice.event,this.collapseByDefault="undefined"!==typeof n.collapseByDefault&&n.collapseByDefault,this.filter=n.filter,this.autoExpandSingleChildren="undefined"!==typeof n.autoExpandSingleChildren&&n.autoExpandSingleChildren,this.root={parent:void 0,element:i,children:[],depth:0,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:!1,collapsed:!1,renderNodeCount:0,visibility:1,visible:!0,filterData:void 0}}splice(e,t,i=ye.empty(),n,o){if(0===e.length)throw new QT(this.user,"Invalid tree location");const{parentNode:r,listIndex:s,revealed:a,visible:l}=this.getParentNodeWithListIndex(e),c=[],h=ye.map(i,e=>this.createTreeNode(e,r,r.visible?1:0,a,c,n)),d=e[e.length-1];let u=0;for(let v=d;v>=0&&v<r.children.length;v--){const e=r.children[v];if(e.visible){u=e.visibleChildIndex;break}}const g=[];let f=0,m=0;for(const v of h)g.push(v),m+=v.renderNodeCount,v.visible&&(v.visibleChildIndex=u+f++);const p=r.children.splice(d,t,...g);let _=0;for(const v of p)v.visible&&_++;if(0!==_)for(let v=d+g.length;v<r.children.length;v++){const e=r.children[v];e.visible&&(e.visibleChildIndex-=_)}if(r.visibleChildrenCount+=f-_,a&&l){const e=p.reduce((e,t)=>e+(t.visible?t.renderNodeCount:0),0);this._updateAncestorsRenderNodeCount(r,m-e),this.list.splice(s,e,c)}if(p.length>0&&o){const e=t=>{o(t),t.children.forEach(e)};p.forEach(e)}this._onDidSplice.fire({insertedNodes:g,deletedNodes:p});let b=r;while(b){if(2===b.visibility){this.refilter();break}b=b.parent}}rerender(e){if(0===e.length)throw new QT(this.user,"Invalid tree location");const{node:t,listIndex:i,revealed:n}=this.getTreeNodeWithListIndex(e);t.visible&&n&&this.list.splice(i,1,[t])}has(e){return this.hasTreeNode(e)}getListIndex(e){const{listIndex:t,visible:i,revealed:n}=this.getTreeNodeWithListIndex(e);return i&&n?t:-1}getListRenderCount(e){return this.getTreeNode(e).renderNodeCount}isCollapsible(e){return this.getTreeNode(e).collapsible}setCollapsible(e,t){const i=this.getTreeNode(e);"undefined"===typeof t&&(t=!i.collapsible);const n={collapsible:t};return this.eventBufferer.bufferEvents(()=>this._setCollapseState(e,n))}isCollapsed(e){return this.getTreeNode(e).collapsed}setCollapsed(e,t,i){const n=this.getTreeNode(e);"undefined"===typeof t&&(t=!n.collapsed);const o={collapsed:t,recursive:i||!1};return this.eventBufferer.bufferEvents(()=>this._setCollapseState(e,o))}_setCollapseState(e,t){const{node:i,listIndex:n,revealed:o}=this.getTreeNodeWithListIndex(e),r=this._setListNodeCollapseState(i,n,o,t);if(i!==this.root&&this.autoExpandSingleChildren&&r&&!iM(t)&&i.collapsible&&!i.collapsed&&!t.recursive){let n=-1;for(let e=0;e<i.children.length;e++){const t=i.children[e];if(t.visible){if(n>-1){n=-1;break}n=e}}n>-1&&this._setCollapseState([...e,n],t)}return r}_setListNodeCollapseState(e,t,i,n){const o=this._setNodeCollapseState(e,n,!1);if(!i||!e.visible||!o)return o;const r=e.renderNodeCount,s=this.updateNodeAfterCollapseChange(e),a=r-(-1===t?0:1);return this.list.splice(t+1,a,s.slice(1)),o}_setNodeCollapseState(e,t,i){let n;if(e===this.root?n=!1:(iM(t)?(n=e.collapsible!==t.collapsible,e.collapsible=t.collapsible):e.collapsible?(n=e.collapsed!==t.collapsed,e.collapsed=t.collapsed):n=!1,n&&this._onDidChangeCollapseState.fire({node:e,deep:i})),!iM(t)&&t.recursive)for(const o of e.children)n=this._setNodeCollapseState(o,t,!0)||n;return n}expandTo(e){this.eventBufferer.bufferEvents(()=>{let t=this.getTreeNode(e);while(t.parent)t=t.parent,e=e.slice(0,e.length-1),t.collapsed&&this._setCollapseState(e,{collapsed:!1,recursive:!1})})}refilter(){const e=this.root.renderNodeCount,t=this.updateNodeAfterFilterChange(this.root);this.list.splice(0,e,t)}createTreeNode(e,t,i,n,o,r){const s={parent:t,element:e.element,children:[],depth:t.depth+1,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:"boolean"===typeof e.collapsible?e.collapsible:"undefined"!==typeof e.collapsed,collapsed:"undefined"===typeof e.collapsed?this.collapseByDefault:e.collapsed,renderNodeCount:1,visibility:1,visible:!0,filterData:void 0},a=this._filterNode(s,i);s.visibility=a,n&&o.push(s);const l=e.children||ye.empty(),c=n&&0!==a&&!s.collapsed,h=ye.map(l,e=>this.createTreeNode(e,s,a,c,o,r));let d=0,u=1;for(const g of h)s.children.push(g),u+=g.renderNodeCount,g.visible&&(g.visibleChildIndex=d++);return s.collapsible=s.collapsible||s.children.length>0,s.visibleChildrenCount=d,s.visible=2===a?d>0:1===a,s.visible?s.collapsed||(s.renderNodeCount=u):(s.renderNodeCount=0,n&&o.pop()),r&&r(s),s}updateNodeAfterCollapseChange(e){const t=e.renderNodeCount,i=[];return this._updateNodeAfterCollapseChange(e,i),this._updateAncestorsRenderNodeCount(e.parent,i.length-t),i}_updateNodeAfterCollapseChange(e,t){if(!1===e.visible)return 0;if(t.push(e),e.renderNodeCount=1,!e.collapsed)for(const i of e.children)e.renderNodeCount+=this._updateNodeAfterCollapseChange(i,t);return this._onDidChangeRenderNodeCount.fire(e),e.renderNodeCount}updateNodeAfterFilterChange(e){const t=e.renderNodeCount,i=[];return this._updateNodeAfterFilterChange(e,e.visible?1:0,i),this._updateAncestorsRenderNodeCount(e.parent,i.length-t),i}_updateNodeAfterFilterChange(e,t,i,n=!0){let o;if(e!==this.root){if(o=this._filterNode(e,t),0===o)return e.visible=!1,e.renderNodeCount=0,!1;n&&i.push(e)}const r=i.length;e.renderNodeCount=e===this.root?0:1;let s=!1;if(e.collapsed&&0===o)e.visibleChildrenCount=0;else{let t=0;for(const r of e.children)s=this._updateNodeAfterFilterChange(r,o,i,n&&!e.collapsed)||s,r.visible&&(r.visibleChildIndex=t++);e.visibleChildrenCount=t}return e!==this.root&&(e.visible=2===o?s:1===o),e.visible?e.collapsed||(e.renderNodeCount+=i.length-r):(e.renderNodeCount=0,n&&i.pop()),this._onDidChangeRenderNodeCount.fire(e),e.visible}_updateAncestorsRenderNodeCount(e,t){if(0!==t)while(e)e.renderNodeCount+=t,this._onDidChangeRenderNodeCount.fire(e),e=e.parent}_filterNode(e,t){const i=this.filter?this.filter.filter(e.element,t):1;return"boolean"===typeof i?(e.filterData=void 0,i?1:0):eM(i)?(e.filterData=i.data,tM(i.visibility)):(e.filterData=void 0,tM(i))}hasTreeNode(e,t=this.root){if(!e||0===e.length)return!0;const[i,...n]=e;return!(i<0||i>t.children.length)&&this.hasTreeNode(n,t.children[i])}getTreeNode(e,t=this.root){if(!e||0===e.length)return t;const[i,...n]=e;if(i<0||i>t.children.length)throw new QT(this.user,"Invalid tree location");return this.getTreeNode(n,t.children[i])}getTreeNodeWithListIndex(e){if(0===e.length)return{node:this.root,listIndex:-1,revealed:!0,visible:!1};const{parentNode:t,listIndex:i,revealed:n,visible:o}=this.getParentNodeWithListIndex(e),r=e[e.length-1];if(r<0||r>t.children.length)throw new QT(this.user,"Invalid tree location");const s=t.children[r];return{node:s,listIndex:i,revealed:n,visible:o&&s.visible}}getParentNodeWithListIndex(e,t=this.root,i=0,n=!0,o=!0){const[r,...s]=e;if(r<0||r>t.children.length)throw new QT(this.user,"Invalid tree location");for(let a=0;a<r;a++)i+=t.children[a].renderNodeCount;return n=n&&!t.collapsed,o=o&&t.visible,0===s.length?{parentNode:t,listIndex:i,revealed:n,visible:o}:this.getParentNodeWithListIndex(s,t.children[r],i+1,n,o)}getNode(e=[]){return this.getTreeNode(e)}getNodeLocation(e){const t=[];let i=e;while(i.parent)t.push(i.parent.children.indexOf(i)),i=i.parent;return t.reverse()}getParentNodeLocation(e){return 0===e.length?void 0:1===e.length?[]:On(e)[0]}}const oM=hl("tree-item-expanded",dl.chevronDown),rM=hl("tree-filter-on-type-on",dl.listFilter),sM=hl("tree-filter-on-type-off",dl.listSelection),aM=hl("tree-filter-clear",dl.close),lM=hl("tree-item-loading",dl.loading);class cM extends hT{constructor(e){super(e.elements.map(e=>e.element)),this.data=e}}function hM(e){return e instanceof hT?new cM(e):e}class dM{constructor(e,t){this.modelProvider=e,this.dnd=t,this.autoExpandDisposable=Oe.None}getDragURI(e){return this.dnd.getDragURI(e.element)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e.map(e=>e.element),t)}onDragStart(e,t){this.dnd.onDragStart&&this.dnd.onDragStart(hM(e),t)}onDragOver(e,t,i,n,o=!0){const r=this.dnd.onDragOver(hM(e),t&&t.element,i,n),s=this.autoExpandNode!==t;if(s&&(this.autoExpandDisposable.dispose(),this.autoExpandNode=t),"undefined"===typeof t)return r;if(s&&"boolean"!==typeof r&&r.autoExpand&&(this.autoExpandDisposable=En(()=>{const e=this.modelProvider(),i=e.getNodeLocation(t);e.isCollapsed(i)&&e.setCollapsed(i,!1),this.autoExpandNode=void 0},500)),"boolean"===typeof r||!r.accept||"undefined"===typeof r.bubble||r.feedback){if(!o){const e="boolean"===typeof r?r:r.accept,t="boolean"===typeof r?void 0:r.effect;return{accept:e,effect:t,feedback:[i]}}return r}if(1===r.bubble){const i=this.modelProvider(),o=i.getNodeLocation(t),r=i.getParentNodeLocation(o),s=i.getNode(r),a=r&&i.getListIndex(r);return this.onDragOver(e,s,a,n,!1)}const a=this.modelProvider(),l=a.getNodeLocation(t),c=a.getListIndex(l),h=a.getListRenderCount(l);return Object.assign(Object.assign({},r),{feedback:$n(c,c+h)})}drop(e,t,i,n){this.autoExpandDisposable.dispose(),this.autoExpandNode=void 0,this.dnd.drop(hM(e),t&&t.element,i,n)}onDragEnd(e){this.dnd.onDragEnd&&this.dnd.onDragEnd(e)}}function uM(e,t){return t&&Object.assign(Object.assign({},t),{identityProvider:t.identityProvider&&{getId(e){return t.identityProvider.getId(e.element)}},dnd:t.dnd&&new dM(e,t.dnd),multipleSelectionController:t.multipleSelectionController&&{isSelectionSingleChangeEvent(e){return t.multipleSelectionController.isSelectionSingleChangeEvent(Object.assign(Object.assign({},e),{element:e.element}))},isSelectionRangeChangeEvent(e){return t.multipleSelectionController.isSelectionRangeChangeEvent(Object.assign(Object.assign({},e),{element:e.element}))}},accessibilityProvider:t.accessibilityProvider&&Object.assign(Object.assign({},t.accessibilityProvider),{getSetSize(t){const i=e(),n=i.getNodeLocation(t),o=i.getParentNodeLocation(n),r=i.getNode(o);return r.visibleChildrenCount},getPosInSet(e){return e.visibleChildIndex+1},isChecked:t.accessibilityProvider&&t.accessibilityProvider.isChecked?e=>t.accessibilityProvider.isChecked(e.element):void 0,getRole:t.accessibilityProvider&&t.accessibilityProvider.getRole?e=>t.accessibilityProvider.getRole(e.element):()=>"treeitem",getAriaLabel(e){return t.accessibilityProvider.getAriaLabel(e.element)},getWidgetAriaLabel(){return t.accessibilityProvider.getWidgetAriaLabel()},getWidgetRole:t.accessibilityProvider&&t.accessibilityProvider.getWidgetRole?()=>t.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel(e){return e.depth},getActiveDescendantId:t.accessibilityProvider.getActiveDescendantId&&(e=>t.accessibilityProvider.getActiveDescendantId(e.element))}),keyboardNavigationLabelProvider:t.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},t.keyboardNavigationLabelProvider),{getKeyboardNavigationLabel(e){return t.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e.element)}}),enableKeyboardNavigation:t.simpleKeyboardNavigation})}class gM{constructor(e){this.delegate=e}getHeight(e){return this.delegate.getHeight(e.element)}getTemplateId(e){return this.delegate.getTemplateId(e.element)}hasDynamicHeight(e){return!!this.delegate.hasDynamicHeight&&this.delegate.hasDynamicHeight(e.element)}setDynamicHeight(e,t){this.delegate.setDynamicHeight&&this.delegate.setDynamicHeight(e.element,t)}}var fM;(function(e){e["None"]="none",e["OnHover"]="onHover",e["Always"]="always"})(fM||(fM={}));class mM{constructor(e,t=[]){this._elements=t,this.onDidChange=Fe.forEach(e,e=>this._elements=e)}get elements(){return this._elements}}class pM{constructor(e,t,i,n,o={}){this.renderer=e,this.modelProvider=t,this.activeNodes=n,this.renderedElements=new Map,this.renderedNodes=new Map,this.indent=pM.DefaultIndent,this.hideTwistiesOfChildlessElements=!1,this.shouldRenderIndentGuides=!1,this.renderedIndentGuides=new Wu,this.activeIndentNodes=new Set,this.indentGuidesDisposable=Oe.None,this.disposables=new Ie,this.templateId=e.templateId,this.updateOptions(o),Fe.map(i,e=>e.node)(this.onDidChangeNodeTwistieState,this,this.disposables),e.onDidChangeTwistieState&&e.onDidChangeTwistieState(this.onDidChangeTwistieState,this,this.disposables)}updateOptions(e={}){if("undefined"!==typeof e.indent&&(this.indent=_T(e.indent,0,40)),"undefined"!==typeof e.renderIndentGuides){const t=e.renderIndentGuides!==fM.None;if(t!==this.shouldRenderIndentGuides&&(this.shouldRenderIndentGuides=t,this.indentGuidesDisposable.dispose(),t)){const e=new Ie;this.activeNodes.onDidChange(this._onDidChangeActiveNodes,this,e),this.indentGuidesDisposable=e,this._onDidChangeActiveNodes(this.activeNodes.elements)}}"undefined"!==typeof e.hideTwistiesOfChildlessElements&&(this.hideTwistiesOfChildlessElements=e.hideTwistiesOfChildlessElements)}renderTemplate(e){const t=nr(e,lr(".monaco-tl-row")),i=nr(t,lr(".monaco-tl-indent")),n=nr(t,lr(".monaco-tl-twistie")),o=nr(t,lr(".monaco-tl-contents")),r=this.renderer.renderTemplate(o);return{container:e,indent:i,twistie:n,indentGuidesDisposable:Oe.None,templateData:r}}renderElement(e,t,i,n){"number"===typeof n&&(this.renderedNodes.set(e,{templateData:i,height:n}),this.renderedElements.set(e.element,e));const o=pM.DefaultIndent+(e.depth-1)*this.indent;i.twistie.style.paddingLeft=o+"px",i.indent.style.width=o+this.indent-16+"px",this.renderTwistie(e,i),"number"===typeof n&&this.renderIndentGuides(e,i),this.renderer.renderElement(e,t,i.templateData,n)}disposeElement(e,t,i,n){i.indentGuidesDisposable.dispose(),this.renderer.disposeElement&&this.renderer.disposeElement(e,t,i.templateData,n),"number"===typeof n&&(this.renderedNodes.delete(e),this.renderedElements.delete(e.element))}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}onDidChangeTwistieState(e){const t=this.renderedElements.get(e);t&&this.onDidChangeNodeTwistieState(t)}onDidChangeNodeTwistieState(e){const t=this.renderedNodes.get(e);t&&(this.renderTwistie(e,t.templateData),this._onDidChangeActiveNodes(this.activeNodes.elements),this.renderIndentGuides(e,t.templateData))}renderTwistie(e,t){this.renderer.renderTwistie&&this.renderer.renderTwistie(e.element,t.twistie),e.collapsible&&(!this.hideTwistiesOfChildlessElements||e.visibleChildrenCount>0)?(ro(t.twistie,oM.classNames,"collapsible"),lo(t.twistie,"collapsed",e.collapsed)):ao(t.twistie,oM.classNames,"collapsible","collapsed"),e.collapsible?t.container.setAttribute("aria-expanded",String(!e.collapsed)):t.container.removeAttribute("aria-expanded")}renderIndentGuides(e,t){if(Jn(t.indent),t.indentGuidesDisposable.dispose(),!this.shouldRenderIndentGuides)return;const i=new Ie,n=this.modelProvider();let o=e;while(1){const e=n.getNodeLocation(o),r=n.getParentNodeLocation(e);if(!r)break;const s=n.getNode(r),a=lr(".indent-guide",{style:`width: ${this.indent}px`});this.activeIndentNodes.has(s)&&oo(a,"active"),0===t.indent.childElementCount?t.indent.appendChild(a):t.indent.insertBefore(a,t.indent.firstElementChild),this.renderedIndentGuides.add(s,a),i.add(Me(()=>this.renderedIndentGuides.delete(s,a))),o=s}t.indentGuidesDisposable=i}_onDidChangeActiveNodes(e){if(!this.shouldRenderIndentGuides)return;const t=new Set,i=this.modelProvider();e.forEach(e=>{const n=i.getNodeLocation(e);try{const o=i.getParentNodeLocation(n);e.collapsible&&e.children.length>0&&!e.collapsed?t.add(e):o&&t.add(i.getNode(o))}catch(o){}}),this.activeIndentNodes.forEach(e=>{t.has(e)||this.renderedIndentGuides.forEach(e,e=>so(e,"active"))}),t.forEach(e=>{this.activeIndentNodes.has(e)||this.renderedIndentGuides.forEach(e,e=>oo(e,"active"))}),this.activeIndentNodes=t}dispose(){this.renderedNodes.clear(),this.renderedElements.clear(),this.indentGuidesDisposable.dispose(),Ne(this.disposables)}}pM.DefaultIndent=8;class _M{constructor(e,t,i){this.tree=e,this.keyboardNavigationLabelProvider=t,this._filter=i,this._totalCount=0,this._matchCount=0,this._pattern="",this._lowercasePattern="",this.disposables=new Ie,e.onWillRefilter(this.reset,this,this.disposables)}get totalCount(){return this._totalCount}get matchCount(){return this._matchCount}set pattern(e){this._pattern=e,this._lowercasePattern=e.toLowerCase()}filter(e,t){if(this._filter){const i=this._filter.filter(e,t);if(this.tree.options.simpleKeyboardNavigation)return i;let n;if(n="boolean"===typeof i?i?1:0:eM(i)?tM(i.visibility):i,0===n)return!1}if(this._totalCount++,this.tree.options.simpleKeyboardNavigation||!this._pattern)return this._matchCount++,{data:Ga.Default,visibility:!0};const i=this.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e),n=i&&i.toString();if("undefined"===typeof n)return{data:Ga.Default,visibility:!0};const o=Ya(this._pattern,this._lowercasePattern,0,n,n.toLowerCase(),0,!0);return o?(this._matchCount++,{data:o,visibility:!0}):this.tree.options.filterOnType?2:{data:Ga.Default,visibility:!0}}reset(){this._totalCount=0,this._matchCount=0}dispose(){Ne(this.disposables)}}class bM{constructor(e,t,i,n,r){this.tree=e,this.view=i,this.filter=n,this.keyboardNavigationDelegate=r,this._enabled=!1,this._pattern="",this._empty=!1,this._onDidChangeEmptyState=new Ve,this.positionClassName="ne",this.automaticKeyboardNavigation=!0,this.triggered=!1,this._onDidChangePattern=new Ve,this.enabledDisposables=new Ie,this.disposables=new Ie,this.domNode=lr(".monaco-list-type-filter."+this.positionClassName),this.domNode.draggable=!0,an(this.domNode,"dragstart")(this.onDragStart,this,this.disposables),this.messageDomNode=nr(i.getHTMLElement(),lr(".monaco-list-type-filter-message")),this.labelDomNode=nr(this.domNode,lr("span.label"));const s=nr(this.domNode,lr(".controls"));this._filterOnType=!!e.options.filterOnType,this.filterOnTypeDomNode=nr(s,lr("input.filter")),this.filterOnTypeDomNode.type="checkbox",this.filterOnTypeDomNode.checked=this._filterOnType,this.filterOnTypeDomNode.tabIndex=-1,this.updateFilterOnTypeTitleAndIcon(),an(this.filterOnTypeDomNode,"input")(this.onDidChangeFilterOnType,this,this.disposables),this.clearDomNode=nr(s,lr("button.clear"+aM.cssSelector)),this.clearDomNode.tabIndex=-1,this.clearDomNode.title=o("clear","Clear"),this.keyboardNavigationEventFilter=e.options.keyboardNavigationEventFilter,t.onDidSplice(this.onDidSpliceModel,this,this.disposables),this.updateOptions(e.options)}get enabled(){return this._enabled}get pattern(){return this._pattern}get filterOnType(){return this._filterOnType}updateOptions(e){e.simpleKeyboardNavigation?this.disable():this.enable(),"undefined"!==typeof e.filterOnType&&(this._filterOnType=!!e.filterOnType,this.filterOnTypeDomNode.checked=this._filterOnType),"undefined"!==typeof e.automaticKeyboardNavigation&&(this.automaticKeyboardNavigation=e.automaticKeyboardNavigation),this.tree.refilter(),this.render(),this.automaticKeyboardNavigation||this.onEventOrInput("")}enable(){if(this._enabled)return;const e=Fe.chain(an(this.view.getHTMLElement(),"keydown")).filter(e=>!xT(e.target)||e.target===this.filterOnTypeDomNode).filter(e=>"Dead"!==e.key&&!/^Media/.test(e.key)).map(e=>new mn(e)).filter(this.keyboardNavigationEventFilter||(()=>!0)).filter(()=>this.automaticKeyboardNavigation||this.triggered).filter(e=>this.keyboardNavigationDelegate.mightProducePrintableCharacter(e)&&!(18===e.keyCode||16===e.keyCode||15===e.keyCode||17===e.keyCode)||(this.pattern.length>0||this.triggered)&&(9===e.keyCode||1===e.keyCode)&&!e.altKey&&!e.ctrlKey&&!e.metaKey||1===e.keyCode&&(r["f"]?e.altKey&&!e.metaKey:e.ctrlKey)&&!e.shiftKey).forEach(e=>{e.stopPropagation(),e.preventDefault()}).event,t=an(this.clearDomNode,"click");Fe.chain(Fe.any(e,t)).event(this.onEventOrInput,this,this.enabledDisposables),this.filter.pattern="",this.tree.refilter(),this.render(),this._enabled=!0,this.triggered=!1}disable(){this._enabled&&(this.domNode.remove(),this.enabledDisposables.clear(),this.tree.refilter(),this.render(),this._enabled=!1,this.triggered=!1)}onEventOrInput(e){"string"===typeof e?this.onInput(e):e instanceof MouseEvent||9===e.keyCode||1===e.keyCode&&(r["f"]?e.altKey:e.ctrlKey)?this.onInput(""):1===e.keyCode?this.onInput(0===this.pattern.length?"":this.pattern.substr(0,this.pattern.length-1)):this.onInput(this.pattern+e.browserEvent.key)}onInput(e){const t=this.view.getHTMLElement();e&&!this.domNode.parentElement?t.append(this.domNode):!e&&this.domNode.parentElement&&(this.domNode.remove(),this.tree.domFocus()),this._pattern=e,this._onDidChangePattern.fire(e),this.filter.pattern=e,this.tree.refilter(),e&&this.tree.focusNext(0,!0,void 0,e=>!Ga.isDefault(e.filterData));const i=this.tree.getFocus();if(i.length>0){const e=i[0];null===this.tree.getRelativeTop(e)&&this.tree.reveal(e,.5)}this.render(),e||(this.triggered=!1)}onDragStart(){const e=this.view.getHTMLElement(),{left:t}=Mo(e),i=e.clientWidth,n=i/2,o=this.domNode.clientWidth,r=new Ie;let s=this.positionClassName;const a=()=>{switch(s){case"nw":this.domNode.style.top="4px",this.domNode.style.left="4px";break;case"ne":this.domNode.style.top="4px",this.domNode.style.left=i-o-6+"px";break}},l=e=>{e.preventDefault();const i=e.screenX-t;e.dataTransfer&&(e.dataTransfer.dropEffect="none"),s=i<n?"nw":"ne",a()},c=()=>{this.positionClassName=s,this.domNode.className="monaco-list-type-filter "+this.positionClassName,this.domNode.style.top="",this.domNode.style.left="",Ne(r)};a(),so(this.domNode,s),oo(this.domNode,"dragging"),r.add(Me(()=>so(this.domNode,"dragging"))),an(document,"dragover")(l,null,r),an(this.domNode,"dragend")(c,null,r),Pk.CurrentDragAndDropData=new Rk("vscode-ui"),r.add(Me(()=>Pk.CurrentDragAndDropData=void 0))}onDidSpliceModel(){this._enabled&&0!==this.pattern.length&&(this.tree.refilter(),this.render())}onDidChangeFilterOnType(){this.tree.updateOptions({filterOnType:this.filterOnTypeDomNode.checked}),this.tree.refilter(),this.tree.domFocus(),this.render(),this.updateFilterOnTypeTitleAndIcon()}updateFilterOnTypeTitleAndIcon(){this.filterOnType?(ao(this.filterOnTypeDomNode,sM.classNames),ro(this.filterOnTypeDomNode,rM.classNames),this.filterOnTypeDomNode.title=o("disable filter on type","Disable Filter on Type")):(ao(this.filterOnTypeDomNode,rM.classNames),ro(this.filterOnTypeDomNode,sM.classNames),this.filterOnTypeDomNode.title=o("enable filter on type","Enable Filter on Type"))}render(){const e=this.filter.totalCount>0&&0===this.filter.matchCount;this.pattern&&this.tree.options.filterOnType&&e?(this.messageDomNode.textContent=o("empty","No elements found"),this._empty=!0):(this.messageDomNode.innerText="",this._empty=!1),lo(this.domNode,"no-matches",e),this.domNode.title=o("found","Matched {0} out of {1} elements",this.filter.matchCount,this.filter.totalCount),this.labelDomNode.textContent=this.pattern.length>16?"…"+this.pattern.substr(this.pattern.length-16):this.pattern,this._onDidChangeEmptyState.fire(this._empty)}shouldAllowFocus(e){return!(this.enabled&&this.pattern&&!this.filterOnType)||(this.filter.totalCount>0&&this.filter.matchCount<=1||!Ga.isDefault(e.filterData))}dispose(){this._enabled&&(this.domNode.remove(),this.enabledDisposables.dispose(),this._enabled=!1,this.triggered=!1),this._onDidChangePattern.dispose(),Ne(this.disposables)}}function vM(e){let t=ZT.Unknown;return Bo(e.browserEvent.target,"monaco-tl-twistie","monaco-tl-row")?t=ZT.Twistie:Bo(e.browserEvent.target,"monaco-tl-contents","monaco-tl-row")&&(t=ZT.Element),{browserEvent:e.browserEvent,element:e.element?e.element.element:null,target:t}}function wM(e,t){t(e),e.children.forEach(e=>wM(e,t))}class CM{constructor(e){this.identityProvider=e,this.nodes=[],this._onDidChange=new Ve,this.onDidChange=this._onDidChange.event}get nodeSet(){return this._nodeSet||(this._nodeSet=this.createNodeSet()),this._nodeSet}set(e,t){An(this.nodes,e)||this._set(e,!1,t)}_set(e,t,i){if(this.nodes=[...e],this.elements=void 0,this._nodeSet=void 0,!t){const e=this;this._onDidChange.fire({get elements(){return e.get()},browserEvent:i})}}get(){return this.elements||(this.elements=this.nodes.map(e=>e.element)),[...this.elements]}getNodes(){return this.nodes}has(e){return this.nodeSet.has(e)}onDidModelSplice({insertedNodes:e,deletedNodes:t}){if(!this.identityProvider){const e=this.createNodeSet(),i=t=>e.delete(t);return t.forEach(e=>wM(e,i)),void this.set([...e.values()])}const i=new Set,n=e=>i.add(this.identityProvider.getId(e.element).toString());t.forEach(e=>wM(e,n));const o=new Map,r=e=>o.set(this.identityProvider.getId(e.element).toString(),e);e.forEach(e=>wM(e,r));const s=[];for(const a of this.nodes){const e=this.identityProvider.getId(a.element).toString(),t=i.has(e);if(t){const t=o.get(e);t&&s.push(t)}else s.push(a)}this._set(s,!0)}createNodeSet(){const e=new Set;for(const t of this.nodes)e.add(t);return e}}class yM extends AT{constructor(e,t){super(e),this.tree=t}onViewPointer(e){if(xT(e.browserEvent.target)||LT(e.browserEvent.target))return;const t=e.element;if(!t)return super.onViewPointer(e);if(this.isSelectionRangeChangeEvent(e)||this.isSelectionSingleChangeEvent(e))return super.onViewPointer(e);const i=e.browserEvent.target,n=no(i,"monaco-tl-twistie")||no(i,"monaco-icon-label")&&no(i,"folder-icon")&&e.browserEvent.offsetX<16;let o=!1;if(o="function"===typeof this.tree.expandOnlyOnTwistieClick?this.tree.expandOnlyOnTwistieClick(t.element):!!this.tree.expandOnlyOnTwistieClick,o&&!n)return super.onViewPointer(e);if(this.tree.expandOnlyOnDoubleClick&&2!==e.browserEvent.detail&&!n)return super.onViewPointer(e);if(t.collapsible){const i=this.tree.model,r=i.getNodeLocation(t),s=e.browserEvent.altKey;if(i.setCollapsed(r,void 0,s),o&&n)return}super.onViewPointer(e)}onDoubleClick(e){const t=no(e.browserEvent.target,"monaco-tl-twistie");t||super.onDoubleClick(e)}}class SM extends KT{constructor(e,t,i,n,o,r,s){super(e,t,i,n,s),this.focusTrait=o,this.selectionTrait=r}createMouseController(e){return new yM(this,e.tree)}splice(e,t,i=[]){if(super.splice(e,t,i),0===i.length)return;const n=[],o=[];i.forEach((t,i)=>{this.focusTrait.has(t)&&n.push(e+i),this.selectionTrait.has(t)&&o.push(e+i)}),n.length>0&&super.setFocus(Un([...super.getFocus(),...n])),o.length>0&&super.setSelection(Un([...super.getSelection(),...o]))}setFocus(e,t,i=!1){super.setFocus(e,t),i||this.focusTrait.set(e.map(e=>this.element(e)),t)}setSelection(e,t,i=!1){super.setSelection(e,t),i||this.selectionTrait.set(e.map(e=>this.element(e)),t)}}class xM{constructor(e,t,i,n,o={}){this._options=o,this.eventBufferer=new ze,this.disposables=new Ie,this._onWillRefilter=new Ve,this.onWillRefilter=this._onWillRefilter.event,this._onDidUpdateOptions=new Ve;const r=new gM(i),s=new Ue,a=new Ue,l=new mM(a.event);this.renderers=n.map(e=>new pM(e,()=>this.model,s.event,l,o));for(let d of this.renderers)this.disposables.add(d);let c;o.keyboardNavigationLabelProvider&&(c=new _M(this,o.keyboardNavigationLabelProvider,o.filter),o=Object.assign(Object.assign({},o),{filter:c}),this.disposables.add(c)),this.focus=new CM(o.identityProvider),this.selection=new CM(o.identityProvider),this.view=new SM(e,t,r,this.renderers,this.focus,this.selection,Object.assign(Object.assign({},uM(()=>this.model,o)),{tree:this})),this.model=this.createModel(e,this.view,o),s.input=this.model.onDidChangeCollapseState;const h=Fe.forEach(this.model.onDidSplice,e=>{this.eventBufferer.bufferEvents(()=>{this.focus.onDidModelSplice(e),this.selection.onDidModelSplice(e)})});if(h(()=>null,null,this.disposables),a.input=Fe.chain(Fe.any(h,this.focus.onDidChange,this.selection.onDidChange)).debounce(()=>null,0).map(()=>{const e=new Set;for(const t of this.focus.getNodes())e.add(t);for(const t of this.selection.getNodes())e.add(t);return[...e.values()]}).event,!1!==o.keyboardSupport){const e=Fe.chain(this.view.onKeyDown).filter(e=>!xT(e.target)).map(e=>new mn(e));e.filter(e=>15===e.keyCode).on(this.onLeftArrow,this,this.disposables),e.filter(e=>17===e.keyCode).on(this.onRightArrow,this,this.disposables),e.filter(e=>10===e.keyCode).on(this.onSpace,this,this.disposables)}if(o.keyboardNavigationLabelProvider){const e=o.keyboardNavigationDelegate||ET;this.typeFilterController=new bM(this,this.model,this.view,c,e),this.focusNavigationFilter=e=>this.typeFilterController.shouldAllowFocus(e),this.disposables.add(this.typeFilterController)}this.styleElement=jo(this.view.getHTMLElement()),lo(this.getHTMLElement(),"always",this._options.renderIndentGuides===fM.Always)}get onDidChangeFocus(){return this.eventBufferer.wrapEvent(this.focus.onDidChange)}get onDidChangeSelection(){return this.eventBufferer.wrapEvent(this.selection.onDidChange)}get onMouseDblClick(){return Fe.map(this.view.onMouseDblClick,vM)}get onPointer(){return Fe.map(this.view.onPointer,vM)}get onDidFocus(){return this.view.onDidFocus}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get expandOnlyOnDoubleClick(){var e;return null!==(e=this._options.expandOnlyOnDoubleClick)&&void 0!==e&&e}get expandOnlyOnTwistieClick(){return"undefined"!==typeof this._options.expandOnlyOnTwistieClick&&this._options.expandOnlyOnTwistieClick}get onDidDispose(){return this.view.onDidDispose}updateOptions(e={}){this._options=Object.assign(Object.assign({},this._options),e);for(const t of this.renderers)t.updateOptions(e);this.view.updateOptions({enableKeyboardNavigation:this._options.simpleKeyboardNavigation,automaticKeyboardNavigation:this._options.automaticKeyboardNavigation,smoothScrolling:this._options.smoothScrolling,horizontalScrolling:this._options.horizontalScrolling}),this.typeFilterController&&this.typeFilterController.updateOptions(this._options),this._onDidUpdateOptions.fire(this._options),lo(this.getHTMLElement(),"always",this._options.renderIndentGuides===fM.Always)}get options(){return this._options}getHTMLElement(){return this.view.getHTMLElement()}get scrollTop(){return this.view.scrollTop}set scrollTop(e){this.view.scrollTop=e}domFocus(){this.view.domFocus()}layout(e,t){this.view.layout(e,t)}style(e){const t="."+this.view.domId,i=[];e.treeIndentGuidesStroke&&(i.push(`.monaco-list${t}:hover .monaco-tl-indent > .indent-guide, .monaco-list${t}.always .monaco-tl-indent > .indent-guide { border-color: ${e.treeIndentGuidesStroke.transparent(.4)}; }`),i.push(`.monaco-list${t} .monaco-tl-indent > .indent-guide.active { border-color: ${e.treeIndentGuidesStroke}; }`));const n=i.join("\n");n!==this.styleElement.innerHTML&&(this.styleElement.innerHTML=n),this.view.style(e)}collapse(e,t=!1){return this.model.setCollapsed(e,!0,t)}expand(e,t=!1){return this.model.setCollapsed(e,!1,t)}isCollapsible(e){return this.model.isCollapsible(e)}setCollapsible(e,t){return this.model.setCollapsible(e,t)}isCollapsed(e){return this.model.isCollapsed(e)}refilter(){this._onWillRefilter.fire(void 0),this.model.refilter()}setSelection(e,t){const i=e.map(e=>this.model.getNode(e));this.selection.set(i,t);const n=e.map(e=>this.model.getListIndex(e)).filter(e=>e>-1);this.view.setSelection(n,t,!0)}getSelection(){return this.selection.get()}setFocus(e,t){const i=e.map(e=>this.model.getNode(e));this.focus.set(i,t);const n=e.map(e=>this.model.getListIndex(e)).filter(e=>e>-1);this.view.setFocus(n,t,!0)}focusNext(e=1,t=!1,i,n=this.focusNavigationFilter){this.view.focusNext(e,t,i,n)}getFocus(){return this.focus.get()}reveal(e,t){this.model.expandTo(e);const i=this.model.getListIndex(e);-1!==i&&this.view.reveal(i,t)}getRelativeTop(e){const t=this.model.getListIndex(e);return-1===t?null:this.view.getRelativeTop(t)}onLeftArrow(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(0===t.length)return;const i=t[0],n=this.model.getNodeLocation(i),o=this.model.setCollapsed(n,!0);if(!o){const e=this.model.getParentNodeLocation(n);if(!e)return;const t=this.model.getListIndex(e);this.view.reveal(t),this.view.setFocus([t])}}onRightArrow(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(0===t.length)return;const i=t[0],n=this.model.getNodeLocation(i),o=this.model.setCollapsed(n,!1);if(!o){if(!i.children.some(e=>e.visible))return;const[e]=this.view.getFocus(),t=e+1;this.view.reveal(t),this.view.setFocus([t])}}onSpace(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(0===t.length)return;const i=t[0],n=this.model.getNodeLocation(i),o=e.browserEvent.altKey;this.model.setCollapsed(n,void 0,o)}dispose(){Ne(this.disposables),this.view.dispose()}}class LM{constructor(e,t,i={}){this.user=e,this.rootRef=null,this.nodes=new Map,this.nodesByIdentity=new Map,this.model=new nM(e,t,null,i),this.onDidSplice=this.model.onDidSplice,this.onDidChangeCollapseState=this.model.onDidChangeCollapseState,this.onDidChangeRenderNodeCount=this.model.onDidChangeRenderNodeCount,i.sorter&&(this.sorter={compare(e,t){return i.sorter.compare(e.element,t.element)}}),this.identityProvider=i.identityProvider}setChildren(e,t=ye.empty(),i,n){const o=this.getElementLocation(e);this._setChildren(o,this.preserveCollapseState(t),i,n)}_setChildren(e,t=ye.empty(),i,n){const o=new Set,r=new Set,s=e=>{if(null===e.element)return;const t=e;if(o.add(t.element),this.nodes.set(t.element,t),this.identityProvider){const e=this.identityProvider.getId(t.element).toString();r.add(e),this.nodesByIdentity.set(e,t)}i&&i(t)},a=e=>{if(null===e.element)return;const t=e;if(o.has(t.element)||this.nodes.delete(t.element),this.identityProvider){const e=this.identityProvider.getId(t.element).toString();r.has(e)||this.nodesByIdentity.delete(e)}n&&n(t)};this.model.splice([...e,0],Number.MAX_VALUE,t,s,a)}preserveCollapseState(e=ye.empty()){return this.sorter&&(e=Pn([...e],this.sorter.compare.bind(this.sorter))),ye.map(e,e=>{let t=this.nodes.get(e.element);if(!t&&this.identityProvider){const i=this.identityProvider.getId(e.element).toString();t=this.nodesByIdentity.get(i)}if(!t)return Object.assign(Object.assign({},e),{children:this.preserveCollapseState(e.children)});const i="boolean"===typeof e.collapsible?e.collapsible:t.collapsible,n="undefined"!==typeof e.collapsed?e.collapsed:t.collapsed;return Object.assign(Object.assign({},e),{collapsible:i,collapsed:n,children:this.preserveCollapseState(e.children)})})}rerender(e){const t=this.getElementLocation(e);this.model.rerender(t)}has(e){return this.nodes.has(e)}getListIndex(e){const t=this.getElementLocation(e);return this.model.getListIndex(t)}getListRenderCount(e){const t=this.getElementLocation(e);return this.model.getListRenderCount(t)}isCollapsible(e){const t=this.getElementLocation(e);return this.model.isCollapsible(t)}setCollapsible(e,t){const i=this.getElementLocation(e);return this.model.setCollapsible(i,t)}isCollapsed(e){const t=this.getElementLocation(e);return this.model.isCollapsed(t)}setCollapsed(e,t,i){const n=this.getElementLocation(e);return this.model.setCollapsed(n,t,i)}expandTo(e){const t=this.getElementLocation(e);this.model.expandTo(t)}refilter(){this.model.refilter()}getNode(e=null){if(null===e)return this.model.getNode(this.model.rootRef);const t=this.nodes.get(e);if(!t)throw new QT(this.user,"Tree element not found: "+e);return t}getNodeLocation(e){return e.element}getParentNodeLocation(e){if(null===e)throw new QT(this.user,"Invalid getParentNodeLocation call");const t=this.nodes.get(e);if(!t)throw new QT(this.user,"Tree element not found: "+e);const i=this.model.getNodeLocation(t),n=this.model.getParentNodeLocation(i),o=this.model.getNode(n);return o.element}getElementLocation(e){if(null===e)return[];const t=this.nodes.get(e);if(!t)throw new QT(this.user,"Tree element not found: "+e);return this.model.getNodeLocation(t)}}function kM(e){const t=[e.element],i=e.incompressible||!1;return{element:{elements:t,incompressible:i},children:ye.map(ye.from(e.children),kM),collapsible:e.collapsible,collapsed:e.collapsed}}function EM(e){const t=[e.element],i=e.incompressible||!1;let n,o;while(1){if([o,n]=ye.consume(ye.from(e.children),2),1!==o.length)break;if(e=o[0],e.incompressible)break;t.push(e.element)}return{element:{elements:t,incompressible:i},children:ye.map(ye.concat(o,n),EM),collapsible:e.collapsible,collapsed:e.collapsed}}function DM(e,t=0){let i;return i=t<e.element.elements.length-1?[DM(e,t+1)]:ye.map(ye.from(e.children),e=>DM(e,0)),0===t&&e.element.incompressible?{element:e.element.elements[t],children:i,incompressible:!0,collapsible:e.collapsible,collapsed:e.collapsed}:{element:e.element.elements[t],children:i,collapsible:e.collapsible,collapsed:e.collapsed}}function NM(e){return DM(e,0)}function TM(e,t,i){return e.element===t?Object.assign(Object.assign({},e),{children:i}):Object.assign(Object.assign({},e),{children:ye.map(ye.from(e.children),e=>TM(e,t,i))})}class MM{constructor(e,t,i={}){this.user=e,this.rootRef=null,this.nodes=new Map,this.model=new LM(e,t,i),this.enabled="undefined"===typeof i.compressionEnabled||i.compressionEnabled}get onDidSplice(){return this.model.onDidSplice}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get onDidChangeRenderNodeCount(){return this.model.onDidChangeRenderNodeCount}setChildren(e,t=ye.empty()){if(null===e){const e=ye.map(t,this.enabled?EM:kM);return void this._setChildren(null,e)}const i=this.nodes.get(e);if(!i)throw new Error("Unknown compressed tree node");const n=this.model.getNode(i),o=this.model.getParentNodeLocation(i),r=this.model.getNode(o),s=NM(n),a=TM(s,e,t),l=(this.enabled?EM:kM)(a),c=r.children.map(e=>e===n?l:e);this._setChildren(r.element,c)}setCompressionEnabled(e){if(e===this.enabled)return;this.enabled=e;const t=this.model.getNode(),i=t.children,n=ye.map(i,NM),o=ye.map(n,e?EM:kM);this._setChildren(null,o)}_setChildren(e,t){const i=new Set,n=e=>{for(const t of e.element.elements)i.add(t),this.nodes.set(t,e.element)},o=e=>{for(const t of e.element.elements)i.has(t)||this.nodes.delete(t)};this.model.setChildren(e,t,n,o)}has(e){return this.nodes.has(e)}getListIndex(e){const t=this.getCompressedNode(e);return this.model.getListIndex(t)}getListRenderCount(e){const t=this.getCompressedNode(e);return this.model.getListRenderCount(t)}getNode(e){if("undefined"===typeof e)return this.model.getNode();const t=this.getCompressedNode(e);return this.model.getNode(t)}getNodeLocation(e){const t=this.model.getNodeLocation(e);return null===t?null:t.elements[t.elements.length-1]}getParentNodeLocation(e){const t=this.getCompressedNode(e),i=this.model.getParentNodeLocation(t);return null===i?null:i.elements[i.elements.length-1]}isCollapsible(e){const t=this.getCompressedNode(e);return this.model.isCollapsible(t)}setCollapsible(e,t){const i=this.getCompressedNode(e);return this.model.setCollapsible(i,t)}isCollapsed(e){const t=this.getCompressedNode(e);return this.model.isCollapsed(t)}setCollapsed(e,t,i){const n=this.getCompressedNode(e);return this.model.setCollapsed(n,t,i)}expandTo(e){const t=this.getCompressedNode(e);this.model.expandTo(t)}rerender(e){const t=this.getCompressedNode(e);this.model.rerender(t)}refilter(){this.model.refilter()}getCompressedNode(e){if(null===e)return null;const t=this.nodes.get(e);if(!t)throw new QT(this.user,"Tree element not found: "+e);return t}}const IM=e=>e[e.length-1];class OM{constructor(e,t){this.unwrapper=e,this.node=t}get element(){return null===this.node.element?null:this.unwrapper(this.node.element)}get children(){return this.node.children.map(e=>new OM(this.unwrapper,e))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}}function AM(e,t){return{splice(i,n,o){t.splice(i,n,o.map(t=>e.map(t)))},updateElementHeight(e,i){t.updateElementHeight(e,i)}}}function RM(e,t){return Object.assign(Object.assign({},t),{sorter:t.sorter&&{compare(e,i){return t.sorter.compare(e.elements[0],i.elements[0])}},identityProvider:t.identityProvider&&{getId(i){return t.identityProvider.getId(e(i))}},filter:t.filter&&{filter(i,n){return t.filter.filter(e(i),n)}}})}class PM{constructor(e,t,i={}){this.rootRef=null,this.elementMapper=i.elementMapper||IM;const n=e=>this.elementMapper(e.elements);this.nodeMapper=new JT(e=>new OM(n,e)),this.model=new MM(e,AM(this.nodeMapper,t),RM(n,i))}get onDidSplice(){return Fe.map(this.model.onDidSplice,({insertedNodes:e,deletedNodes:t})=>({insertedNodes:e.map(e=>this.nodeMapper.map(e)),deletedNodes:t.map(e=>this.nodeMapper.map(e))}))}get onDidChangeCollapseState(){return Fe.map(this.model.onDidChangeCollapseState,({node:e,deep:t})=>({node:this.nodeMapper.map(e),deep:t}))}get onDidChangeRenderNodeCount(){return Fe.map(this.model.onDidChangeRenderNodeCount,e=>this.nodeMapper.map(e))}setChildren(e,t=ye.empty()){this.model.setChildren(e,t)}setCompressionEnabled(e){this.model.setCompressionEnabled(e)}has(e){return this.model.has(e)}getListIndex(e){return this.model.getListIndex(e)}getListRenderCount(e){return this.model.getListRenderCount(e)}getNode(e){return this.nodeMapper.map(this.model.getNode(e))}getNodeLocation(e){return e.element}getParentNodeLocation(e){return this.model.getParentNodeLocation(e)}isCollapsible(e){return this.model.isCollapsible(e)}setCollapsible(e,t){return this.model.setCollapsible(e,t)}isCollapsed(e){return this.model.isCollapsed(e)}setCollapsed(e,t,i){return this.model.setCollapsed(e,t,i)}expandTo(e){return this.model.expandTo(e)}rerender(e){return this.model.rerender(e)}refilter(){return this.model.refilter()}getCompressedTreeNode(e=null){return this.model.getNode(e)}}var FM=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class WM extends xM{constructor(e,t,i,n,o={}){super(e,t,i,n,o)}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}setChildren(e,t=ye.empty()){this.model.setChildren(e,t)}rerender(e){void 0!==e?this.model.rerender(e):this.view.rerender()}hasElement(e){return this.model.has(e)}createModel(e,t,i){return new LM(e,t,i)}}class BM{constructor(e,t){this._compressedTreeNodeProvider=e,this.renderer=t,this.templateId=t.templateId,t.onDidChangeTwistieState&&(this.onDidChangeTwistieState=t.onDidChangeTwistieState)}get compressedTreeNodeProvider(){return this._compressedTreeNodeProvider()}renderTemplate(e){const t=this.renderer.renderTemplate(e);return{compressedTreeNode:void 0,data:t}}renderElement(e,t,i,n){const o=this.compressedTreeNodeProvider.getCompressedTreeNode(e.element);1===o.element.elements.length?(i.compressedTreeNode=void 0,this.renderer.renderElement(e,t,i.data,n)):(i.compressedTreeNode=o,this.renderer.renderCompressedElements(o,t,i.data,n))}disposeElement(e,t,i,n){i.compressedTreeNode?this.renderer.disposeCompressedElements&&this.renderer.disposeCompressedElements(i.compressedTreeNode,t,i.data,n):this.renderer.disposeElement&&this.renderer.disposeElement(e,t,i.data,n)}disposeTemplate(e){this.renderer.disposeTemplate(e.data)}renderTwistie(e,t){this.renderer.renderTwistie&&this.renderer.renderTwistie(e,t)}}function VM(e,t){return t&&Object.assign(Object.assign({},t),{keyboardNavigationLabelProvider:t.keyboardNavigationLabelProvider&&{getKeyboardNavigationLabel(i){let n;try{n=e().getCompressedTreeNode(i)}catch(o){return t.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(i)}return 1===n.element.elements.length?t.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(i):t.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(n.element.elements)}}})}FM([Nm],BM.prototype,"compressedTreeNodeProvider",null);class HM extends WM{constructor(e,t,i,n,o={}){const r=()=>this,s=n.map(e=>new BM(r,e));super(e,t,i,s,VM(r,o))}setChildren(e,t=ye.empty()){this.model.setChildren(e,t)}createModel(e,t,i){return new PM(e,t,i)}updateOptions(e={}){super.updateOptions(e),"undefined"!==typeof e.compressionEnabled&&this.model.setCompressionEnabled(e.compressionEnabled)}getCompressedTreeNode(e=null){return this.model.getCompressedTreeNode(e)}}var zM=function(e,t,i,n){function o(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,r){function s(e){try{l(n.next(e))}catch(t){r(t)}}function a(e){try{l(n["throw"](e))}catch(t){r(t)}}function l(e){e.done?i(e.value):o(e.value).then(s,a)}l((n=n.apply(e,t||[])).next())}))};function UM(e){return Object.assign(Object.assign({},e),{children:[],refreshPromise:void 0,stale:!0,slow:!1,collapsedByDefault:void 0})}function jM(e,t){return!!t.parent&&(t.parent===e||jM(e,t.parent))}function KM(e,t){return e===t||jM(e,t)||jM(t,e)}class qM{constructor(e){this.node=e}get element(){return this.node.element.element}get children(){return this.node.children.map(e=>new qM(e))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}}class $M{constructor(e,t,i){this.renderer=e,this.nodeMapper=t,this.onDidChangeTwistieState=i,this.renderedNodes=new Map,this.templateId=e.templateId}renderTemplate(e){const t=this.renderer.renderTemplate(e);return{templateData:t}}renderElement(e,t,i,n){this.renderer.renderElement(this.nodeMapper.map(e),t,i.templateData,n)}renderTwistie(e,t){return e.slow?ro(t,lM.classNames):ao(t,lM.classNames),!1}disposeElement(e,t,i,n){this.renderer.disposeElement&&this.renderer.disposeElement(this.nodeMapper.map(e),t,i.templateData,n)}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}dispose(){this.renderedNodes.clear()}}function GM(e){return{browserEvent:e.browserEvent,elements:e.elements.map(e=>e.element)}}function YM(e){return{browserEvent:e.browserEvent,element:e.element&&e.element.element,target:e.target}}class XM extends hT{constructor(e){super(e.elements.map(e=>e.element)),this.data=e}}function ZM(e){return e instanceof hT?new XM(e):e}class QM{constructor(e){this.dnd=e}getDragURI(e){return this.dnd.getDragURI(e.element)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e.map(e=>e.element),t)}onDragStart(e,t){this.dnd.onDragStart&&this.dnd.onDragStart(ZM(e),t)}onDragOver(e,t,i,n,o=!0){return this.dnd.onDragOver(ZM(e),t&&t.element,i,n)}drop(e,t,i,n){this.dnd.drop(ZM(e),t&&t.element,i,n)}onDragEnd(e){this.dnd.onDragEnd&&this.dnd.onDragEnd(e)}}function JM(e){return e&&Object.assign(Object.assign({},e),{collapseByDefault:!0,identityProvider:e.identityProvider&&{getId(t){return e.identityProvider.getId(t.element)}},dnd:e.dnd&&new QM(e.dnd),multipleSelectionController:e.multipleSelectionController&&{isSelectionSingleChangeEvent(t){return e.multipleSelectionController.isSelectionSingleChangeEvent(Object.assign(Object.assign({},t),{element:t.element}))},isSelectionRangeChangeEvent(t){return e.multipleSelectionController.isSelectionRangeChangeEvent(Object.assign(Object.assign({},t),{element:t.element}))}},accessibilityProvider:e.accessibilityProvider&&Object.assign(Object.assign({},e.accessibilityProvider),{getPosInSet:void 0,getSetSize:void 0,getRole:e.accessibilityProvider.getRole?t=>e.accessibilityProvider.getRole(t.element):()=>"treeitem",isChecked:e.accessibilityProvider.isChecked?t=>{var i;return!!(null===(i=e.accessibilityProvider)||void 0===i?void 0:i.isChecked(t.element))}:void 0,getAriaLabel(t){return e.accessibilityProvider.getAriaLabel(t.element)},getWidgetAriaLabel(){return e.accessibilityProvider.getWidgetAriaLabel()},getWidgetRole:e.accessibilityProvider.getWidgetRole?()=>e.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:e.accessibilityProvider.getAriaLevel&&(t=>e.accessibilityProvider.getAriaLevel(t.element)),getActiveDescendantId:e.accessibilityProvider.getActiveDescendantId&&(t=>e.accessibilityProvider.getActiveDescendantId(t.element))}),filter:e.filter&&{filter(t,i){return e.filter.filter(t.element,i)}},keyboardNavigationLabelProvider:e.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},e.keyboardNavigationLabelProvider),{getKeyboardNavigationLabel(t){return e.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(t.element)}}),sorter:void 0,expandOnlyOnTwistieClick:"undefined"===typeof e.expandOnlyOnTwistieClick?void 0:"function"!==typeof e.expandOnlyOnTwistieClick?e.expandOnlyOnTwistieClick:t=>e.expandOnlyOnTwistieClick(t.element),additionalScrollHeight:e.additionalScrollHeight})}function eI(e,t){t(e),e.children.forEach(e=>eI(e,t))}class tI{constructor(e,t,i,n,o,r={}){this.user=e,this.dataSource=o,this.nodes=new Map,this.subTreeRefreshPromises=new Map,this.refreshPromises=new Map,this._onDidRender=new Ve,this._onDidChangeNodeSlowState=new Ve,this.nodeMapper=new JT(e=>new qM(e)),this.disposables=new Ie,this.identityProvider=r.identityProvider,this.autoExpandSingleChildren="undefined"!==typeof r.autoExpandSingleChildren&&r.autoExpandSingleChildren,this.sorter=r.sorter,this.collapseByDefault=r.collapseByDefault,this.tree=this.createTree(e,t,i,n,r),this.root=UM({element:void 0,parent:null,hasChildren:!0}),this.identityProvider&&(this.root=Object.assign(Object.assign({},this.root),{id:null})),this.nodes.set(null,this.root),this.tree.onDidChangeCollapseState(this._onDidChangeCollapseState,this,this.disposables)}get onDidChangeFocus(){return Fe.map(this.tree.onDidChangeFocus,GM)}get onDidChangeSelection(){return Fe.map(this.tree.onDidChangeSelection,GM)}get onMouseDblClick(){return Fe.map(this.tree.onMouseDblClick,YM)}get onPointer(){return Fe.map(this.tree.onPointer,YM)}get onDidFocus(){return this.tree.onDidFocus}get onDidDispose(){return this.tree.onDidDispose}createTree(e,t,i,n,o){const r=new gM(i),s=n.map(e=>new $M(e,this.nodeMapper,this._onDidChangeNodeSlowState.event)),a=JM(o)||{};return new WM(e,t,r,s,a)}updateOptions(e={}){this.tree.updateOptions(e)}getHTMLElement(){return this.tree.getHTMLElement()}get scrollTop(){return this.tree.scrollTop}set scrollTop(e){this.tree.scrollTop=e}domFocus(){this.tree.domFocus()}layout(e,t){this.tree.layout(e,t)}style(e){this.tree.style(e)}getInput(){return this.root.element}setInput(e,t){return zM(this,void 0,void 0,(function*(){this.refreshPromises.forEach(e=>e.cancel()),this.refreshPromises.clear(),this.root.element=e;const i=t&&{viewState:t,focus:[],selection:[]};yield this._updateChildren(e,!0,!1,i),i&&(this.tree.setFocus(i.focus),this.tree.setSelection(i.selection)),t&&"number"===typeof t.scrollTop&&(this.scrollTop=t.scrollTop)}))}_updateChildren(e=this.root.element,t=!0,i=!1,n){return zM(this,void 0,void 0,(function*(){if("undefined"===typeof this.root.element)throw new QT(this.user,"Tree input not set");this.root.refreshPromise&&(yield this.root.refreshPromise,yield Fe.toPromise(this._onDidRender.event));const o=this.getDataNode(e);if(yield this.refreshAndRenderNode(o,t,n),i)try{this.tree.rerender(o)}catch(r){}}))}rerender(e){if(void 0===e||e===this.root.element)return void this.tree.rerender();const t=this.getDataNode(e);this.tree.rerender(t)}collapse(e,t=!1){const i=this.getDataNode(e);return this.tree.collapse(i===this.root?null:i,t)}expand(e,t=!1){return zM(this,void 0,void 0,(function*(){if("undefined"===typeof this.root.element)throw new QT(this.user,"Tree input not set");this.root.refreshPromise&&(yield this.root.refreshPromise,yield Fe.toPromise(this._onDidRender.event));const i=this.getDataNode(e);if(this.tree.hasElement(i)&&!this.tree.isCollapsible(i))return!1;if(i.refreshPromise&&(yield this.root.refreshPromise,yield Fe.toPromise(this._onDidRender.event)),i!==this.root&&!i.refreshPromise&&!this.tree.isCollapsed(i))return!1;const n=this.tree.expand(i===this.root?null:i,t);return i.refreshPromise&&(yield this.root.refreshPromise,yield Fe.toPromise(this._onDidRender.event)),n}))}setSelection(e,t){const i=e.map(e=>this.getDataNode(e));this.tree.setSelection(i,t)}getSelection(){const e=this.tree.getSelection();return e.map(e=>e.element)}setFocus(e,t){const i=e.map(e=>this.getDataNode(e));this.tree.setFocus(i,t)}getFocus(){const e=this.tree.getFocus();return e.map(e=>e.element)}reveal(e,t){this.tree.reveal(this.getDataNode(e),t)}getDataNode(e){const t=this.nodes.get(e===this.root.element?null:e);if(!t)throw new QT(this.user,"Data tree node not found: "+e);return t}refreshAndRenderNode(e,t,i){return zM(this,void 0,void 0,(function*(){yield this.refreshNode(e,t,i),this.render(e,i)}))}refreshNode(e,t,i){return zM(this,void 0,void 0,(function*(){let n;return this.subTreeRefreshPromises.forEach((o,r)=>{!n&&KM(r,e)&&(n=o.then(()=>this.refreshNode(e,t,i)))}),n||this.doRefreshSubTree(e,t,i)}))}doRefreshSubTree(e,t,i){return zM(this,void 0,void 0,(function*(){let n;e.refreshPromise=new Promise(e=>n=e),this.subTreeRefreshPromises.set(e,e.refreshPromise),e.refreshPromise.finally(()=>{e.refreshPromise=void 0,this.subTreeRefreshPromises.delete(e)});try{const o=yield this.doRefreshNode(e,t,i);e.stale=!1,yield Promise.all(o.map(e=>this.doRefreshSubTree(e,t,i)))}finally{n()}}))}doRefreshNode(e,t,i){return zM(this,void 0,void 0,(function*(){let n;if(e.hasChildren=!!this.dataSource.hasChildren(e.element),e.hasChildren){const t=kn(800);t.then(()=>{e.slow=!0,this._onDidChangeNodeSlowState.fire(e)},e=>null),n=this.doGetChildren(e).finally(()=>t.cancel())}else n=Promise.resolve(ye.empty());try{const o=yield n;return this.setChildren(e,o,t,i)}catch(o){if(e!==this.root&&this.tree.collapse(e===this.root?null:e),be(o))return[];throw o}finally{e.slow&&(e.slow=!1,this._onDidChangeNodeSlowState.fire(e))}}))}doGetChildren(e){let t=this.refreshPromises.get(e);return t||(t=xn(()=>zM(this,void 0,void 0,(function*(){const t=yield this.dataSource.getChildren(e.element);return this.processChildren(t)}))),this.refreshPromises.set(e,t),t.finally(()=>{this.refreshPromises.delete(e)}))}_onDidChangeCollapseState({node:e,deep:t}){null!==e.element&&!e.collapsed&&e.element.stale&&(t?this.collapse(e.element.element):this.refreshAndRenderNode(e.element,!1).catch(me))}setChildren(e,t,i,n){const o=[...t];if(0===e.children.length&&0===o.length)return[];const r=new Map,s=new Map;for(const c of e.children)if(r.set(c.element,c),this.identityProvider){const e=this.tree.isCollapsed(c);s.set(c.id,{node:c,collapsed:e})}const a=[],l=o.map(t=>{const o=!!this.dataSource.hasChildren(t);if(!this.identityProvider){const i=UM({element:t,parent:e,hasChildren:o});return o&&this.collapseByDefault&&!this.collapseByDefault(t)&&(i.collapsedByDefault=!1,a.push(i)),i}const l=this.identityProvider.getId(t).toString(),c=s.get(l);if(c){const e=c.node;return r.delete(e.element),this.nodes.delete(e.element),this.nodes.set(t,e),e.element=t,e.hasChildren=o,i?c.collapsed?(e.children.forEach(e=>eI(e,e=>this.nodes.delete(e.element))),e.children.splice(0,e.children.length),e.stale=!0):a.push(e):o&&this.collapseByDefault&&!this.collapseByDefault(t)&&(e.collapsedByDefault=!1,a.push(e)),e}const h=UM({element:t,parent:e,id:l,hasChildren:o});return n&&n.viewState.focus&&n.viewState.focus.indexOf(l)>-1&&n.focus.push(h),n&&n.viewState.selection&&n.viewState.selection.indexOf(l)>-1&&n.selection.push(h),n&&n.viewState.expanded&&n.viewState.expanded.indexOf(l)>-1?a.push(h):o&&this.collapseByDefault&&!this.collapseByDefault(t)&&(h.collapsedByDefault=!1,a.push(h)),h});for(const c of r.values())eI(c,e=>this.nodes.delete(e.element));for(const c of l)this.nodes.set(c.element,c);return e.children.splice(0,e.children.length,...l),e!==this.root&&this.autoExpandSingleChildren&&1===l.length&&0===a.length&&(l[0].collapsedByDefault=!1,a.push(l[0])),a}render(e,t){const i=e.children.map(e=>this.asTreeElement(e,t));this.tree.setChildren(e===this.root?null:e,i),e!==this.root&&this.tree.setCollapsible(e,e.hasChildren),this._onDidRender.fire()}asTreeElement(e,t){if(e.stale)return{element:e,collapsible:e.hasChildren,collapsed:!0};let i;return i=!(t&&t.viewState.expanded&&e.id&&t.viewState.expanded.indexOf(e.id)>-1)&&e.collapsedByDefault,e.collapsedByDefault=void 0,{element:e,children:e.hasChildren?ye.map(e.children,e=>this.asTreeElement(e,t)):[],collapsible:e.hasChildren,collapsed:i}}processChildren(e){return this.sorter&&(e=[...e].sort(this.sorter.compare.bind(this.sorter))),e}dispose(){this.disposables.dispose()}}class iI{constructor(e){this.node=e}get element(){return{elements:this.node.element.elements.map(e=>e.element),incompressible:this.node.element.incompressible}}get children(){return this.node.children.map(e=>new iI(e))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}}class nI{constructor(e,t,i,n){this.renderer=e,this.nodeMapper=t,this.compressibleNodeMapperProvider=i,this.onDidChangeTwistieState=n,this.renderedNodes=new Map,this.disposables=[],this.templateId=e.templateId}renderTemplate(e){const t=this.renderer.renderTemplate(e);return{templateData:t}}renderElement(e,t,i,n){this.renderer.renderElement(this.nodeMapper.map(e),t,i.templateData,n)}renderCompressedElements(e,t,i,n){this.renderer.renderCompressedElements(this.compressibleNodeMapperProvider().map(e),t,i.templateData,n)}renderTwistie(e,t){return e.slow?ro(t,lM.classNames):ao(t,lM.classNames),!1}disposeElement(e,t,i,n){this.renderer.disposeElement&&this.renderer.disposeElement(this.nodeMapper.map(e),t,i.templateData,n)}disposeCompressedElements(e,t,i,n){this.renderer.disposeCompressedElements&&this.renderer.disposeCompressedElements(this.compressibleNodeMapperProvider().map(e),t,i.templateData,n)}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}dispose(){this.renderedNodes.clear(),this.disposables=Ne(this.disposables)}}function oI(e){const t=e&&JM(e);return t&&Object.assign(Object.assign({},t),{keyboardNavigationLabelProvider:t.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},t.keyboardNavigationLabelProvider),{getCompressedNodeKeyboardNavigationLabel(t){return e.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(t.map(e=>e.element))}})})}class rI extends tI{constructor(e,t,i,n,o,r,s={}){super(e,t,i,o,r,s),this.compressionDelegate=n,this.compressibleNodeMapper=new JT(e=>new iI(e)),this.filter=s.filter}createTree(e,t,i,n,o){const r=new gM(i),s=n.map(e=>new nI(e,this.nodeMapper,()=>this.compressibleNodeMapper,this._onDidChangeNodeSlowState.event)),a=oI(o)||{};return new HM(e,t,r,s,a)}asTreeElement(e,t){return Object.assign({incompressible:this.compressionDelegate.isIncompressible(e.element)},super.asTreeElement(e,t))}updateOptions(e={}){this.tree.updateOptions(e)}render(e,t){if(!this.identityProvider)return super.render(e,t);const i=e=>this.identityProvider.getId(e).toString(),n=e=>{const t=new Set;for(const n of e){const e=this.tree.getCompressedTreeNode(n===this.root?null:n);if(e.element)for(const n of e.element.elements)t.add(i(n.element))}return t},o=n(this.tree.getSelection()),r=n(this.tree.getFocus());super.render(e,t);const s=this.getSelection();let a=!1;const l=this.getFocus();let c=!1;const h=e=>{const t=e.element;if(t)for(let n=0;n<t.elements.length;n++){const e=i(t.elements[n].element),h=t.elements[t.elements.length-1].element;o.has(e)&&-1===s.indexOf(h)&&(s.push(h),a=!0),r.has(e)&&-1===l.indexOf(h)&&(l.push(h),c=!0)}e.children.forEach(h)};h(this.tree.getCompressedTreeNode(e===this.root?null:e)),a&&this.setSelection(s),c&&this.setFocus(l)}processChildren(e){return this.filter&&(e=ye.filter(e,e=>{const t=this.filter.filter(e,1),i=sI(t);if(2===i)throw new Error("Recursive tree visibility not supported in async data compressed trees");return 1===i})),super.processChildren(e)}}function sI(e){return"boolean"===typeof e?e?1:0:eM(e)?tM(e.visibility):tM(e)}class aI extends xM{constructor(e,t,i,n,o,r={}){super(e,t,i,n,r),this.user=e,this.dataSource=o,this.identityProvider=r.identityProvider}createModel(e,t,i){return new LM(e,t,i)}}var lI=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},cI=function(e,t){return function(i,n){t(i,n,e)}};const hI=zi("listService");let dI=class{constructor(e){this._themeService=e,this.disposables=new Ie,this.lists=[],this._lastFocusedWidget=void 0,this._hasCreatedStyleController=!1}get lastFocusedList(){return this._lastFocusedWidget}register(e,t){if(!this._hasCreatedStyleController){this._hasCreatedStyleController=!0;const e=new RT(jo(),"");this.disposables.add(AN(e,this._themeService))}if(this.lists.some(t=>t.widget===e))throw new Error("Cannot register the same widget multiple times");const i={widget:e,extraContextKeys:t};return this.lists.push(i),e.getHTMLElement()===document.activeElement&&(this._lastFocusedWidget=e),Te(e.onDidFocus(()=>this._lastFocusedWidget=e),Me(()=>this.lists.splice(this.lists.indexOf(i),1)),e.onDidDispose(()=>{this.lists=this.lists.filter(e=>e!==i),this._lastFocusedWidget===e&&(this._lastFocusedWidget=void 0)}))}dispose(){this.disposables.dispose()}};dI=lI([cI(0,ep)],dI);const uI=new Zf("listFocus",!0),gI=new Zf("listSupportsMultiselect",!0),fI=(Ff.and(uI,Ff.not(XT)),new Zf("listHasSelectionOrFocus",!1)),mI=new Zf("listDoubleSelection",!1),pI=new Zf("listMultiSelection",!1),_I=new Zf("listSupportsKeyboardNavigation",!0),bI="listAutomaticKeyboardNavigation",vI=new Zf(bI,!0);let wI=!1;function CI(e,t){const i=e.createScoped(t.getHTMLElement());return uI.bindTo(i),i}const yI="workbench.list.multiSelectModifier",SI="workbench.list.openMode",xI="workbench.list.horizontalScrolling",LI="workbench.list.keyboardNavigation",kI="workbench.list.automaticKeyboardNavigation",EI="workbench.tree.indent",DI="workbench.tree.renderIndentGuides",NI="workbench.list.smoothScrolling";function TI(e){return"alt"===e.getValue(yI)}class MI extends Oe{constructor(e){super(),this.configurationService=e,this.useAltAsMultipleSelectionModifier=TI(e),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(e=>{e.affectsConfiguration(yI)&&(this.useAltAsMultipleSelectionModifier=TI(this.configurationService))}))}isSelectionSingleChangeEvent(e){return this.useAltAsMultipleSelectionModifier?e.browserEvent.altKey:TT(e)}isSelectionRangeChangeEvent(e){return MT(e)}}function II(e,t,i){const n=new Ie,o=Object.assign({},e);if(!1!==e.multipleSelectionSupport&&!e.multipleSelectionController){const e=new MI(t);o.multipleSelectionController=e,n.add(e)}return o.keyboardNavigationDelegate={mightProducePrintableCharacter(e){return i.mightProducePrintableCharacter(e)}},o.smoothScrolling=t.getValue(NI),[o,n]}let OI=class extends KT{constructor(e,t,i,n,o,r,s,a,l,c){const h="undefined"!==typeof o.horizontalScrolling?o.horizontalScrolling:l.getValue(xI),[d,u]=II(o,l,c);super(e,t,i,n,Object.assign(Object.assign(Object.assign({keyboardSupport:!1},IN(a.getColorTheme(),RN)),d),{horizontalScrolling:h})),this.disposables.add(u),this.contextKeyService=CI(r,this),this.themeService=a;const g=gI.bindTo(this.contextKeyService);g.set(!(!1===o.multipleSelectionSupport)),this.listHasSelectionOrFocus=fI.bindTo(this.contextKeyService),this.listDoubleSelection=mI.bindTo(this.contextKeyService),this.listMultiSelection=pI.bindTo(this.contextKeyService),this.horizontalScrolling=o.horizontalScrolling,this._useAltAsMultipleSelectionModifier=TI(l),this.disposables.add(this.contextKeyService),this.disposables.add(s.register(this)),o.overrideStyles&&this.updateStyles(o.overrideStyles),this.disposables.add(this.onDidChangeSelection(()=>{const e=this.getSelection(),t=this.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.listHasSelectionOrFocus.set(e.length>0||t.length>0),this.listMultiSelection.set(e.length>1),this.listDoubleSelection.set(2===e.length)})})),this.disposables.add(this.onDidChangeFocus(()=>{const e=this.getSelection(),t=this.getFocus();this.listHasSelectionOrFocus.set(e.length>0||t.length>0)})),this.disposables.add(l.onDidChangeConfiguration(e=>{e.affectsConfiguration(yI)&&(this._useAltAsMultipleSelectionModifier=TI(l));let t={};if(e.affectsConfiguration(xI)&&void 0===this.horizontalScrolling){const e=l.getValue(xI);t=Object.assign(Object.assign({},t),{horizontalScrolling:e})}if(e.affectsConfiguration(NI)){const e=l.getValue(NI);t=Object.assign(Object.assign({},t),{smoothScrolling:e})}Object.keys(t).length>0&&this.updateOptions(t)}))}updateOptions(e){super.updateOptions(e),e.overrideStyles&&this.updateStyles(e.overrideStyles)}dispose(){super.dispose(),this._styler&&this._styler.dispose()}updateStyles(e){this._styler&&this._styler.dispose(),this._styler=AN(this,this.themeService,e)}};OI=lI([cI(5,Qf),cI(6,hI),cI(7,ep),cI(8,ig),cI(9,SE)],OI);let AI=class extends YT{constructor(e,t,i,n,o,r,s,a,l,c){const h="undefined"!==typeof o.horizontalScrolling?o.horizontalScrolling:l.getValue(xI),[d,u]=II(o,l,c);super(e,t,i,n,Object.assign(Object.assign(Object.assign({keyboardSupport:!1},IN(a.getColorTheme(),RN)),d),{horizontalScrolling:h})),this.disposables=new Ie,this.disposables.add(u),this.contextKeyService=CI(r,this),this.horizontalScrolling=o.horizontalScrolling;const g=gI.bindTo(this.contextKeyService);g.set(!(!1===o.multipleSelectionSupport)),this._useAltAsMultipleSelectionModifier=TI(l),this.disposables.add(this.contextKeyService),this.disposables.add(s.register(this)),o.overrideStyles&&this.disposables.add(AN(this,a,o.overrideStyles)),this.disposables.add(l.onDidChangeConfiguration(e=>{e.affectsConfiguration(yI)&&(this._useAltAsMultipleSelectionModifier=TI(l));let t={};if(e.affectsConfiguration(xI)&&void 0===this.horizontalScrolling){const e=l.getValue(xI);t=Object.assign(Object.assign({},t),{horizontalScrolling:e})}if(e.affectsConfiguration(NI)){const e=l.getValue(NI);t=Object.assign(Object.assign({},t),{smoothScrolling:e})}Object.keys(t).length>0&&this.updateOptions(t)}))}dispose(){super.dispose(),this.disposables.dispose()}};AI=lI([cI(5,Qf),cI(6,hI),cI(7,ep),cI(8,ig),cI(9,SE)],AI);class RI extends Oe{constructor(e,t){var i,n;super(),this.widget=e,this._onDidOpen=new Ve,this.onDidOpen=this._onDidOpen.event,this.openOnFocus=null!==(i=null===t||void 0===t?void 0:t.openOnFocus)&&void 0!==i&&i,this._register(Fe.filter(this.widget.onDidChangeSelection,e=>e.browserEvent instanceof KeyboardEvent)(e=>this.onSelectionFromKeyboard(e))),this._register(this.widget.onPointer(e=>this.onPointer(e.browserEvent))),this._register(this.widget.onMouseDblClick(e=>this.onMouseDblClick(e.browserEvent))),this.openOnFocus&&this._register(Fe.filter(this.widget.onDidChangeFocus,e=>e.browserEvent instanceof KeyboardEvent)(e=>this.onFocusFromKeyboard(e))),"boolean"!==typeof(null===t||void 0===t?void 0:t.openOnSingleClick)&&(null===t||void 0===t?void 0:t.configurationService)?(this.openOnSingleClick="doubleClick"!==(null===t||void 0===t?void 0:t.configurationService.getValue(SI)),this._register(null===t||void 0===t?void 0:t.configurationService.onDidChangeConfiguration(()=>{this.openOnSingleClick="doubleClick"!==(null===t||void 0===t?void 0:t.configurationService.getValue(SI))}))):this.openOnSingleClick=null===(n=null===t||void 0===t?void 0:t.openOnSingleClick)||void 0===n||n}onFocusFromKeyboard(e){const t=this.widget.getFocus();this.widget.setSelection(t,e.browserEvent);const i="boolean"!==typeof e.browserEvent.preserveFocus||e.browserEvent.preserveFocus,n=!1,o=!1;this._open(i,n,o,e.browserEvent)}onSelectionFromKeyboard(e){if(1!==e.elements.length)return;const t="boolean"!==typeof e.browserEvent.preserveFocus||e.browserEvent.preserveFocus,i=!1,n=!1;this._open(t,i,n,e.browserEvent)}onPointer(e){if(!this.openOnSingleClick)return;const t=2===e.detail;if(t)return;const i=1===e.button,n=!0,o=i,r=e.ctrlKey||e.metaKey||e.altKey;this._open(n,o,r,e)}onMouseDblClick(e){if(!e)return;const t=!1,i=!0,n=e.ctrlKey||e.metaKey||e.altKey;this._open(t,i,n,e)}_open(e,t,i,n){this._onDidOpen.fire({editorOptions:{preserveFocus:e,pinned:t,revealIfVisible:!0},sideBySide:i,element:this.widget.getSelection()[0],browserEvent:n})}}class PI extends RI{constructor(e,t){super(e,t)}}function FI(e,t){let i=!1;return n=>{if(i)return i=!1,!1;const o=t.softDispatch(n,e);return o&&o.enterChord?(i=!0,!1):(i=!1,!0)}}let WI=class extends WM{constructor(e,t,i,n,o,r,s,a,l,c,h){const{options:d,getAutomaticKeyboardNavigation:u,disposable:g}=UI(t,o,r,l,c,h);super(e,t,i,n,d),this.disposables.add(g),this.internals=new jI(this,o,u,o.overrideStyles,r,s,a,l,h),this.disposables.add(this.internals)}};WI=lI([cI(5,Qf),cI(6,hI),cI(7,ep),cI(8,ig),cI(9,SE),cI(10,jL)],WI);let BI=class extends HM{constructor(e,t,i,n,o,r,s,a,l,c,h){const{options:d,getAutomaticKeyboardNavigation:u,disposable:g}=UI(t,o,r,l,c,h);super(e,t,i,n,d),this.disposables.add(g),this.internals=new jI(this,o,u,o.overrideStyles,r,s,a,l,h),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles)}};BI=lI([cI(5,Qf),cI(6,hI),cI(7,ep),cI(8,ig),cI(9,SE),cI(10,jL)],BI);let VI=class extends aI{constructor(e,t,i,n,o,r,s,a,l,c,h,d){const{options:u,getAutomaticKeyboardNavigation:g,disposable:f}=UI(t,r,s,c,h,d);super(e,t,i,n,o,u),this.disposables.add(f),this.internals=new jI(this,r,g,r.overrideStyles,s,a,l,c,d),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles)}};VI=lI([cI(6,Qf),cI(7,hI),cI(8,ep),cI(9,ig),cI(10,SE),cI(11,jL)],VI);let HI=class extends tI{constructor(e,t,i,n,o,r,s,a,l,c,h,d){const{options:u,getAutomaticKeyboardNavigation:g,disposable:f}=UI(t,r,s,c,h,d);super(e,t,i,n,o,u),this.disposables.add(f),this.internals=new jI(this,r,g,r.overrideStyles,s,a,l,c,d),this.disposables.add(this.internals)}get onDidOpen(){return this.internals.onDidOpen}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles)}};HI=lI([cI(6,Qf),cI(7,hI),cI(8,ep),cI(9,ig),cI(10,SE),cI(11,jL)],HI);let zI=class extends rI{constructor(e,t,i,n,o,r,s,a,l,c,h,d,u){const{options:g,getAutomaticKeyboardNavigation:f,disposable:m}=UI(t,s,a,h,d,u);super(e,t,i,n,o,r,g),this.disposables.add(m),this.internals=new jI(this,s,f,s.overrideStyles,a,l,c,h,u),this.disposables.add(this.internals)}};function UI(e,t,i,n,o,r){_I.bindTo(i),wI||(vI.bindTo(i),wI=!0);const s=()=>{let e=i.getContextKeyValue(bI);return e&&(e=n.getValue(kI)),e},a=r.isScreenReaderOptimized(),l=a?"simple":n.getValue(LI),c=void 0!==t.horizontalScrolling?t.horizontalScrolling:n.getValue(xI),[h,d]=II(t,n,o),u=t.additionalScrollHeight;return{getAutomaticKeyboardNavigation:s,disposable:d,options:Object.assign(Object.assign({keyboardSupport:!1},h),{indent:n.getValue(EI),renderIndentGuides:n.getValue(DI),smoothScrolling:n.getValue(NI),automaticKeyboardNavigation:s(),simpleKeyboardNavigation:"simple"===l,filterOnType:"filter"===l,horizontalScrolling:c,keyboardNavigationEventFilter:FI(e,o),additionalScrollHeight:u,hideTwistiesOfChildlessElements:t.hideTwistiesOfChildlessElements,expandOnlyOnDoubleClick:"doubleClick"===n.getValue(SI)})}}zI=lI([cI(7,Qf),cI(8,hI),cI(9,ep),cI(10,ig),cI(11,SE),cI(12,jL)],zI);let jI=class{constructor(e,t,i,n,o,r,s,a,l){this.tree=e,this.themeService=s,this.disposables=[],this.contextKeyService=CI(o,e);const c=gI.bindTo(this.contextKeyService);c.set(!(!1===t.multipleSelectionSupport)),this.hasSelectionOrFocus=fI.bindTo(this.contextKeyService),this.hasDoubleSelection=mI.bindTo(this.contextKeyService),this.hasMultiSelection=pI.bindTo(this.contextKeyService),this._useAltAsMultipleSelectionModifier=TI(a);const h=new Set;h.add(bI);const d=()=>{const t=l.isScreenReaderOptimized(),i=t?"simple":a.getValue(LI);e.updateOptions({simpleKeyboardNavigation:"simple"===i,filterOnType:"filter"===i})};this.updateStyleOverrides(n),this.disposables.push(this.contextKeyService,r.register(e),e.onDidChangeSelection(()=>{const t=e.getSelection(),i=e.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.hasSelectionOrFocus.set(t.length>0||i.length>0),this.hasMultiSelection.set(t.length>1),this.hasDoubleSelection.set(2===t.length)})}),e.onDidChangeFocus(()=>{const t=e.getSelection(),i=e.getFocus();this.hasSelectionOrFocus.set(t.length>0||i.length>0)}),a.onDidChangeConfiguration(n=>{let o={};if(n.affectsConfiguration(yI)&&(this._useAltAsMultipleSelectionModifier=TI(a)),n.affectsConfiguration(EI)){const e=a.getValue(EI);o=Object.assign(Object.assign({},o),{indent:e})}if(n.affectsConfiguration(DI)){const e=a.getValue(DI);o=Object.assign(Object.assign({},o),{renderIndentGuides:e})}if(n.affectsConfiguration(NI)){const e=a.getValue(NI);o=Object.assign(Object.assign({},o),{smoothScrolling:e})}if(n.affectsConfiguration(LI)&&d(),n.affectsConfiguration(kI)&&(o=Object.assign(Object.assign({},o),{automaticKeyboardNavigation:i()})),n.affectsConfiguration(xI)&&void 0===t.horizontalScrolling){const e=a.getValue(xI);o=Object.assign(Object.assign({},o),{horizontalScrolling:e})}n.affectsConfiguration(SI)&&(o=Object.assign(Object.assign({},o),{expandOnlyOnDoubleClick:"doubleClick"===a.getValue(SI)})),Object.keys(o).length>0&&e.updateOptions(o)}),this.contextKeyService.onDidChangeContext(t=>{t.affectsSome(h)&&e.updateOptions({automaticKeyboardNavigation:i()})}),l.onDidChangeScreenReaderOptimized(()=>d())),this.navigator=new PI(e,Object.assign({configurationService:a},t)),this.disposables.push(this.navigator)}get onDidOpen(){return this.navigator.onDidOpen}updateStyleOverrides(e){Ne(this.styler),this.styler=e?AN(this.tree,this.themeService,e):Oe.None}dispose(){this.disposables=Ne(this.disposables),Ne(this.styler),this.styler=void 0}};jI=lI([cI(4,Qf),cI(5,hI),cI(6,ep),cI(7,ig),cI(8,jL)],jI);const KI=mu.as(wu.Configuration);var qI,$I;KI.registerConfiguration({id:"workbench",order:7,title:o("workbenchConfigurationTitle","Workbench"),type:"object",properties:{[yI]:{type:"string",enum:["ctrlCmd","alt"],enumDescriptions:[o("multiSelectModifier.ctrlCmd","Maps to `Control` on Windows and Linux and to `Command` on macOS."),o("multiSelectModifier.alt","Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],default:"ctrlCmd",description:o({key:"multiSelectModifier",comment:["- `ctrlCmd` refers to a value the setting can take and should not be localized.","- `Control` and `Command` refer to the modifier keys Ctrl or Cmd on the keyboard and can be localized."]},"The modifier to be used to add an item in trees and lists to a multi-selection with the mouse (for example in the explorer, open editors and scm view). The 'Open to Side' mouse gestures - if supported - will adapt such that they do not conflict with the multiselect modifier.")},[SI]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:o({key:"openModeModifier",comment:["`singleClick` and `doubleClick` refers to a value the setting can take and should not be localized."]},"Controls how to open items in trees and lists using the mouse (if supported). For parents with children in trees, this setting will control if a single click expands the parent or a double click. Note that some trees and lists might choose to ignore this setting if it is not applicable. ")},[xI]:{type:"boolean",default:!1,description:o("horizontalScrolling setting","Controls whether lists and trees support horizontal scrolling in the workbench. Warning: turning on this setting has a performance implication.")},[EI]:{type:"number",default:8,minimum:0,maximum:40,description:o("tree indent setting","Controls tree indentation in pixels.")},[DI]:{type:"string",enum:["none","onHover","always"],default:"onHover",description:o("render tree indent guides","Controls whether the tree should render indent guides.")},[NI]:{type:"boolean",default:!1,description:o("list smoothScrolling setting","Controls whether lists and trees have smooth scrolling.")},[LI]:{type:"string",enum:["simple","highlight","filter"],enumDescriptions:[o("keyboardNavigationSettingKey.simple","Simple keyboard navigation focuses elements which match the keyboard input. Matching is done only on prefixes."),o("keyboardNavigationSettingKey.highlight","Highlight keyboard navigation highlights elements which match the keyboard input. Further up and down navigation will traverse only the highlighted elements."),o("keyboardNavigationSettingKey.filter","Filter keyboard navigation will filter out and hide all the elements which do not match the keyboard input.")],default:"highlight",description:o("keyboardNavigationSettingKey","Controls the keyboard navigation style for lists and trees in the workbench. Can be simple, highlight and filter.")},[kI]:{type:"boolean",default:!0,markdownDescription:o("automatic keyboard navigation setting","Controls whether keyboard navigation in lists and trees is automatically triggered simply by typing. If set to `false`, keyboard navigation is only triggered when executing the `list.toggleKeyboardNavigation` command, for which you can assign a keyboard shortcut.")}}}),function(e){e[e["Hint"]=1]="Hint",e[e["Info"]=2]="Info",e[e["Warning"]=4]="Warning",e[e["Error"]=8]="Error"}(qI||(qI={})),function(e){function t(e,t){return t-e}e.compare=t;const i=Object.create(null);function n(e){return i[e]||""}function r(t){switch(t){case su.Error:return e.Error;case su.Warning:return e.Warning;case su.Info:return e.Info;case su.Ignore:return e.Hint}}function s(t){switch(t){case e.Error:return su.Error;case e.Warning:return su.Warning;case e.Info:return su.Info;case e.Hint:return su.Ignore}}i[e.Error]=o("sev.error","Error"),i[e.Warning]=o("sev.warning","Warning"),i[e.Info]=o("sev.info","Info"),e.toString=n,e.fromSeverity=r,e.toSeverity=s}(qI||(qI={})),function(e){const t="";function i(e){return n(e,!0)}function n(e,i){let n=[t];return e.source?n.push(e.source.replace("¦","\\¦")):n.push(t),e.code?"string"===typeof e.code?n.push(e.code.replace("¦","\\¦")):n.push(e.code.value.replace("¦","\\¦")):n.push(t),void 0!==e.severity&&null!==e.severity?n.push(qI.toString(e.severity)):n.push(t),e.message&&i?n.push(e.message.replace("¦","\\¦")):n.push(t),void 0!==e.startLineNumber&&null!==e.startLineNumber?n.push(e.startLineNumber.toString()):n.push(t),void 0!==e.startColumn&&null!==e.startColumn?n.push(e.startColumn.toString()):n.push(t),void 0!==e.endLineNumber&&null!==e.endLineNumber?n.push(e.endLineNumber.toString()):n.push(t),void 0!==e.endColumn&&null!==e.endColumn?n.push(e.endColumn.toString()):n.push(t),n.push(t),n.join("¦")}e.makeKey=i,e.makeKeyOptionalMessage=n}($I||($I={}));const GI=zi("markerService");class YI{constructor(){this._byResource=new Es,this._byOwner=new Map}set(e,t,i){let n=this._byResource.get(e);n||(n=new Map,this._byResource.set(e,n)),n.set(t,i);let o=this._byOwner.get(t);o||(o=new Es,this._byOwner.set(t,o)),o.set(e,i)}get(e,t){let i=this._byResource.get(e);return null===i||void 0===i?void 0:i.get(t)}delete(e,t){let i=!1,n=!1,o=this._byResource.get(e);o&&(i=o.delete(t));let r=this._byOwner.get(t);if(r&&(n=r.delete(e)),i!==n)throw new Error("illegal state");return i&&n}values(e){var t,i,n,o;return"string"===typeof e?null!==(i=null===(t=this._byOwner.get(e))||void 0===t?void 0:t.values())&&void 0!==i?i:ye.empty():Ht.isUri(e)?null!==(o=null===(n=this._byResource.get(e))||void 0===n?void 0:n.values())&&void 0!==o?o:ye.empty():ye.map(ye.concat(...this._byOwner.values()),e=>e[1])}}class XI{constructor(e){this.errors=0,this.infos=0,this.warnings=0,this.unknowns=0,this._data=new Es,this._service=e,this._subscription=e.onMarkerChanged(this._update,this)}dispose(){this._subscription.dispose()}_update(e){for(const t of e){const e=this._data.get(t);e&&this._substract(e);const i=this._resourceStats(t);this._add(i),this._data.set(t,i)}}_resourceStats(e){const t={errors:0,warnings:0,infos:0,unknowns:0};if(e.scheme===Yn.inMemory||e.scheme===Yn.walkThrough||e.scheme===Yn.walkThroughSnippet)return t;for(const{severity:i}of this._service.read({resource:e}))i===qI.Error?t.errors+=1:i===qI.Warning?t.warnings+=1:i===qI.Info?t.infos+=1:t.unknowns+=1;return t}_substract(e){this.errors-=e.errors,this.warnings-=e.warnings,this.infos-=e.infos,this.unknowns-=e.unknowns}_add(e){this.errors+=e.errors,this.warnings+=e.warnings,this.infos+=e.infos,this.unknowns+=e.unknowns}}class ZI{constructor(){this._onMarkerChanged=new Ve,this.onMarkerChanged=Fe.debounce(this._onMarkerChanged.event,ZI._debouncer,0),this._data=new YI,this._stats=new XI(this)}dispose(){this._stats.dispose()}remove(e,t){for(const i of t||[])this.changeOne(e,i,[])}changeOne(e,t,i){if(Vn(i)){const i=this._data.delete(t,e);i&&this._onMarkerChanged.fire([t])}else{const n=[];for(const o of i){const i=ZI._toMarker(e,t,o);i&&n.push(i)}this._data.set(t,e,n),this._onMarkerChanged.fire([t])}}static _toMarker(e,t,i){let{code:n,severity:o,message:r,source:s,startLineNumber:a,startColumn:l,endLineNumber:c,endColumn:h,relatedInformation:d,tags:u}=i;if(r)return a=a>0?a:1,l=l>0?l:1,c=c>=a?c:a,h=h>0?h:l,{resource:t,owner:e,code:n,severity:o,message:r,source:s,startLineNumber:a,startColumn:l,endLineNumber:c,endColumn:h,relatedInformation:d,tags:u}}read(e=Object.create(null)){let{owner:t,resource:i,severities:n,take:o}=e;if((!o||o<0)&&(o=-1),t&&i){const e=this._data.get(i,t);if(e){const t=[];for(const i of e)if(ZI._accept(i,n)){const e=t.push(i);if(o>0&&e===o)break}return t}return[]}if(t||i){const e=this._data.values(null!==i&&void 0!==i?i:t),r=[];for(const t of e)for(const e of t)if(ZI._accept(e,n)){const t=r.push(e);if(o>0&&t===o)return r}return r}{const e=[];for(let t of this._data.values())for(let i of t)if(ZI._accept(i,n)){const t=e.push(i);if(o>0&&t===o)return e}return e}}static _accept(e,t){return void 0===t||(t&e.severity)===e.severity}static _debouncer(e,t){e||(ZI._dedupeMap=new Es,e=[]);for(const i of t)ZI._dedupeMap.has(i)||(ZI._dedupeMap.set(i,!0),e.push(i));return e}}const QI=zi("storageService");var JI;(function(e){e[e["NONE"]=0]="NONE",e[e["SHUTDOWN"]=1]="SHUTDOWN"})(JI||(JI={}));class eO extends Oe{constructor(){super(...arguments),this._onDidChangeStorage=this._register(new Ve),this._onWillSaveState=this._register(new Ve),this.onWillSaveState=this._onWillSaveState.event,this.globalCache=new Map,this.workspaceCache=new Map}getCache(e){return 0===e?this.globalCache:this.workspaceCache}get(e,t,i){const n=this.getCache(t).get(e);return Wr(n)?i:n}getBoolean(e,t,i){const n=this.getCache(t).get(e);return Wr(n)?i:"true"===n}getNumber(e,t,i){const n=this.getCache(t).get(e);return Wr(n)?i:parseInt(n,10)}store(e,t,i){if(Wr(t))return this.remove(e,i);const n=String(t),o=this.getCache(i).get(e);return o===n||(this.getCache(i).set(e,n),this._onDidChangeStorage.fire({scope:i,key:e})),Promise.resolve()}remove(e,t){const i=this.getCache(t).delete(e);return i?(this._onDidChangeStorage.fire({scope:t,key:e}),Promise.resolve()):Promise.resolve()}}var tO=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},iO=function(e,t){return function(i,n){t(i,n,e)}};let nO=class{constructor(e){this._commandService=e}createMenu(e,t){return new oO(e,this._commandService,t,this)}};nO=tO([iO(0,qr)],nO);let oO=class e{constructor(e,t,i,n){this._id=e,this._commandService=t,this._contextKeyService=i,this._menuService=n,this._onDidChange=new Ve,this._dispoables=new Ie,this._menuGroups=[],this._contextKeys=new Set,this._build(),this._dispoables.add(Fe.debounce(Fe.filter(rm.onDidChangeMenu,e=>e.has(this._id)),()=>{},50)(this._build,this)),this._dispoables.add(Fe.debounce(this._contextKeyService.onDidChangeContext,(e,t)=>e||t.affectsSome(this._contextKeys),50)(e=>e&&this._onDidChange.fire(void 0),this))}dispose(){this._dispoables.dispose(),this._onDidChange.dispose()}_build(){this._menuGroups.length=0,this._contextKeys.clear();const t=rm.getMenuItems(this._id);let i;t.sort(e._compareMenuItems);for(let n of t){const t=n.group||"";if(i&&i[0]===t||(i=[t,[]],this._menuGroups.push(i)),i[1].push(n),e._fillInKbExprKeys(n.when,this._contextKeys),im(n)&&n.command.precondition&&e._fillInKbExprKeys(n.command.precondition,this._contextKeys),im(n)&&n.command.toggled){const t=n.command.toggled.condition||n.command.toggled;e._fillInKbExprKeys(t,this._contextKeys)}}this._onDidChange.fire(this)}get onDidChange(){return this._onDidChange.event}getActions(e){const t=[];for(let i of this._menuGroups){const[n,o]=i,r=[];for(const t of o)if(this._contextKeyService.contextMatchesRules(t.when)){const i=im(t)?new lm(t.command,t.alt,e,this._contextKeyService,this._commandService):new am(t,this._menuService,this._contextKeyService,e);r.push(i)}r.length>0&&t.push([n,r])}return t}static _fillInKbExprKeys(e,t){if(e)for(let i of e.keys())t.add(i)}static _compareMenuItems(t,i){let n=t.group,o=i.group;if(n!==o){if(!n)return 1;if(!o)return-1;if("navigation"===n)return-1;if("navigation"===o)return 1;let e=n.localeCompare(o);if(0!==e)return e}let r=t.order||0,s=i.order||0;return r<s?-1:r>s?1:e._compareTitles(im(t)?t.command.title:t.title,im(i)?i.command.title:i.title)}static _compareTitles(e,t){const i="string"===typeof e?e:e.value,n="string"===typeof t?t:t.value;return i.localeCompare(n)}};oO=tO([iO(1,qr),iO(2,Qf),iO(3,om)],oO);const rO=zi("markerDecorationsService");var sO=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},aO=function(e,t){return function(i,n){t(i,n,e)}};function lO(e){return e.toString()}class cO extends Oe{constructor(e){super(),this.model=e,this._markersData=new Map,this._register(Me(()=>{this.model.deltaDecorations([...this._markersData.keys()],[]),this._markersData.clear()}))}update(e,t){const i=[...this._markersData.keys()];this._markersData.clear();const n=this.model.deltaDecorations(i,t);for(let o=0;o<n.length;o++)this._markersData.set(n[o],e[o]);return 0!==i.length||0!==n.length}getMarker(e){return this._markersData.get(e.id)}}let hO=class extends Oe{constructor(e,t){super(),this._markerService=t,this._onDidChangeMarker=this._register(new Ve),this._markerDecorations=new Map,e.getModels().forEach(e=>this._onModelAdded(e)),this._register(e.onModelAdded(this._onModelAdded,this)),this._register(e.onModelRemoved(this._onModelRemoved,this)),this._register(this._markerService.onMarkerChanged(this._handleMarkerChange,this))}dispose(){super.dispose(),this._markerDecorations.forEach(e=>e.dispose()),this._markerDecorations.clear()}getMarker(e,t){const i=this._markerDecorations.get(lO(e.uri));return i&&i.getMarker(t)||null}_handleMarkerChange(e){e.forEach(e=>{const t=this._markerDecorations.get(lO(e));t&&this._updateDecorations(t)})}_onModelAdded(e){const t=new cO(e);this._markerDecorations.set(lO(e.uri),t),this._updateDecorations(t)}_onModelRemoved(e){const t=this._markerDecorations.get(lO(e.uri));t&&(t.dispose(),this._markerDecorations.delete(lO(e.uri))),e.uri.scheme!==Yn.inMemory&&e.uri.scheme!==Yn.internal&&e.uri.scheme!==Yn.vscode||this._markerService&&this._markerService.read({resource:e.uri}).map(e=>e.owner).forEach(t=>this._markerService.remove(t,[e.uri]))}_updateDecorations(e){const t=this._markerService.read({resource:e.model.uri,take:500});let i=t.map(t=>({range:this._createDecorationRange(e.model,t),options:this._createDecorationOption(t)}));e.update(t,i)&&this._onDidChangeMarker.fire(e.model)}_createDecorationRange(e,t){let i=Jt.lift(t);if(t.severity!==qI.Hint||this._hasMarkerTag(t,1)||this._hasMarkerTag(t,2)||(i=i.setEndPosition(i.startLineNumber,i.startColumn+2)),i=e.validateRange(i),i.isEmpty()){let t=e.getWordAtPosition(i.getStartPosition());if(t)i=new Jt(i.startLineNumber,t.startColumn,i.endLineNumber,t.endColumn);else{let t=e.getLineLastNonWhitespaceColumn(i.startLineNumber)||e.getLineMaxColumn(i.startLineNumber);1===t||(i=i.endColumn>=t?new Jt(i.startLineNumber,t-1,i.endLineNumber,t):new Jt(i.startLineNumber,i.startColumn,i.endLineNumber,i.endColumn+1))}}else if(t.endColumn===Number.MAX_VALUE&&1===t.startColumn&&i.startLineNumber===i.endLineNumber){let n=e.getLineFirstNonWhitespaceColumn(t.startLineNumber);n<i.endColumn&&(i=new Jt(i.startLineNumber,n,i.endLineNumber,i.endColumn),t.startColumn=n)}return i}_createDecorationOption(e){let t,i,n,o=void 0,r=void 0;switch(e.severity){case qI.Hint:t=this._hasMarkerTag(e,2)?void 0:this._hasMarkerTag(e,1)?"squiggly-unnecessary":"squiggly-hint",i=0;break;case qI.Warning:t="squiggly-warning",o=tp(JC),i=20,n={color:tp(bC),position:ys.Inline};break;case qI.Info:t="squiggly-info",o=tp(ey),i=10;break;case qI.Error:default:t="squiggly-error",o=tp(QC),i=30,n={color:tp(_C),position:ys.Inline};break}return e.tags&&(-1!==e.tags.indexOf(1)&&(r="squiggly-inline-unnecessary"),-1!==e.tags.indexOf(2)&&(r="squiggly-inline-deprecated")),{stickiness:1,className:t,showIfCollapsed:!0,overviewRuler:{color:o,position:Cs.Right},minimap:n,zIndex:i,inlineClassName:r}}_hasMarkerTag(e,t){return!!e.tags&&e.tags.indexOf(t)>=0}};hO=sO([aO(0,aa),aO(1,GI)],hO);var dO=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},uO=function(e,t){return function(i,n){t(i,n,e)}};let gO=class extends Oe{constructor(e,t){super(),this._contextKeyService=e,this._configurationService=t,this._accessibilitySupport=0,this._onDidChangeScreenReaderOptimized=new Ve,this._accessibilityModeEnabledContext=KL.bindTo(this._contextKeyService);const i=()=>this._accessibilityModeEnabledContext.set(this.isScreenReaderOptimized());this._register(this._configurationService.onDidChangeConfiguration(e=>{e.affectsConfiguration("editor.accessibilitySupport")&&(i(),this._onDidChangeScreenReaderOptimized.fire())})),i(),this.onDidChangeScreenReaderOptimized(()=>i())}get onDidChangeScreenReaderOptimized(){return this._onDidChangeScreenReaderOptimized.event}isScreenReaderOptimized(){const e=this._configurationService.getValue("editor.accessibilitySupport");return"on"===e||"auto"===e&&2===this._accessibilitySupport}getAccessibilitySupport(){return this._accessibilitySupport}};gO=dO([uO(0,Qf),uO(1,ig)],gO);var fO=function(e,t,i,n){function o(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,r){function s(e){try{l(n.next(e))}catch(t){r(t)}}function a(e){try{l(n["throw"](e))}catch(t){r(t)}}function l(e){e.done?i(e.value):o(e.value).then(s,a)}l((n=n.apply(e,t||[])).next())}))};class mO{constructor(){this.mapTextToType=new Map,this.findText=""}writeText(e,t){return fO(this,void 0,void 0,(function*(){if(t)return void this.mapTextToType.set(t,e);try{return yield navigator.clipboard.writeText(e)}catch(o){console.error(o)}const i=document.activeElement,n=document.body.appendChild(lr("textarea",{"aria-hidden":!0}));n.style.height="1px",n.style.width="1px",n.style.position="absolute",n.value=e,n.focus(),n.select(),document.execCommand("copy"),i instanceof HTMLElement&&i.focus(),document.body.removeChild(n)}))}readText(e){return fO(this,void 0,void 0,(function*(){if(e)return this.mapTextToType.get(e)||"";try{return yield navigator.clipboard.readText()}catch(t){return console.error(t),""}}))}readFindText(){return fO(this,void 0,void 0,(function*(){return this.findText}))}writeFindText(e){return fO(this,void 0,void 0,(function*(){this.findText=e}))}}var pO=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},_O=function(e,t){return function(i,n){t(i,n,e)}},bO=function(e,t,i,n){function o(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,r){function s(e){try{l(n.next(e))}catch(t){r(t)}}function a(e){try{l(n["throw"](e))}catch(t){r(t)}}function l(e){e.done?i(e.value):o(e.value).then(s,a)}l((n=n.apply(e,t||[])).next())}))};const vO=!1;function wO(e){return e.scheme===Yn.file?e.fsPath:e.path}let CO=0;class yO{constructor(e,t,i){this.id=++CO,this.type=0,this.actual=e,this.label=e.label,this.resourceLabel=t,this.strResource=i,this.resourceLabels=[this.resourceLabel],this.strResources=[this.strResource],this.isValid=!0}setValid(e){this.isValid=e}toString(){return`[${this.id}] [${this.isValid?"VALID":"INVALID"}] ${this.actual}`}}class SO{constructor(e,t){this.resourceLabel=e,this.reason=t}}class xO{constructor(){this.elements=new Map}createMessage(){const e=[],t=[];for(const[,n]of this.elements){const i=0===n.reason?e:t;i.push(n.resourceLabel)}let i=[];return e.length>0&&i.push(o({key:"externalRemoval",comment:["{0} is a list of filenames"]},"The following files have been closed and modified on disk: {0}.",e.join(", "))),t.length>0&&i.push(o({key:"noParallelUniverses",comment:["{0} is a list of filenames"]},"The following files have been modified in an incompatible way: {0}.",t.join(", "))),i.join("\n")}get size(){return this.elements.size}has(e){return this.elements.has(e)}set(e,t){this.elements.set(e,t)}delete(e){return this.elements.delete(e)}}class LO{constructor(e,t,i){this.id=++CO,this.type=1,this.actual=e,this.label=e.label,this.resourceLabels=t,this.strResources=i,this.removedResources=null,this.invalidatedResources=null}canSplit(){return"function"===typeof this.actual.split}removeResource(e,t,i){this.removedResources||(this.removedResources=new xO),this.removedResources.has(t)||this.removedResources.set(t,new SO(e,i))}setValid(e,t,i){i?this.invalidatedResources&&(this.invalidatedResources.delete(t),0===this.invalidatedResources.size&&(this.invalidatedResources=null)):(this.invalidatedResources||(this.invalidatedResources=new xO),this.invalidatedResources.has(t)||this.invalidatedResources.set(t,new SO(e,0)))}toString(){return`[${this.id}] [${this.invalidatedResources?"INVALID":"VALID"}] ${this.actual}`}}class kO{constructor(e,t){this.resourceLabel=e,this.strResource=t,this._past=[],this._future=[],this.locked=!1,this.versionId=1}dispose(){for(const e of this._past)1===e.type&&e.removeResource(this.resourceLabel,this.strResource,0);for(const e of this._future)1===e.type&&e.removeResource(this.resourceLabel,this.strResource,0);this.versionId++}toString(){let e=[];e.push(`* ${this.strResource}:`);for(let t=0;t<this._past.length;t++)e.push(" * [UNDO] "+this._past[t]);for(let t=this._future.length-1;t>=0;t--)e.push(" * [REDO] "+this._future[t]);return e.join("\n")}flushAllElements(){this._past=[],this._future=[],this.versionId++}_setElementValidFlag(e,t){1===e.type?e.setValid(this.resourceLabel,this.strResource,t):e.setValid(t)}setElementsValidFlag(e,t){for(const i of this._past)t(i.actual)&&this._setElementValidFlag(i,e);for(const i of this._future)t(i.actual)&&this._setElementValidFlag(i,e)}pushElement(e){for(const t of this._future)1===t.type&&t.removeResource(this.resourceLabel,this.strResource,1);if(this._future=[],this._past.length>0){const e=this._past[this._past.length-1];0!==e.type||e.isValid||(this._past=[])}this._past.push(e),this.versionId++}createSnapshot(e){const t=[];for(let i=0,n=this._past.length;i<n;i++)t.push(this._past[i].id);for(let i=this._future.length-1;i>=0;i--)t.push(this._future[i].id);return new eD(e,t)}restoreSnapshot(e){const t=e.elements.length;let i=!0,n=0,o=-1;for(let s=0,a=this._past.length;s<a;s++,n++){const r=this._past[s];i&&(n>=t||r.id!==e.elements[n])&&(i=!1,o=0),i||1!==r.type||r.removeResource(this.resourceLabel,this.strResource,0)}let r=-1;for(let s=this._future.length-1;s>=0;s--,n++){const o=this._future[s];i&&(n>=t||o.id!==e.elements[n])&&(i=!1,r=s),i||1!==o.type||o.removeResource(this.resourceLabel,this.strResource,0)}-1!==o&&(this._past=this._past.slice(0,o)),-1!==r&&(this._future=this._future.slice(r+1)),this.versionId++}getElements(){const e=[],t=[];for(const i of this._past)e.push(i.actual);for(const i of this._future)t.push(i.actual);return{past:e,future:t}}getClosestPastElement(){return 0===this._past.length?null:this._past[this._past.length-1]}getClosestFutureElement(){return 0===this._future.length?null:this._future[this._future.length-1]}hasPastElements(){return this._past.length>0}hasFutureElements(){return this._future.length>0}splitPastWorkspaceElement(e,t){for(let i=this._past.length-1;i>=0;i--)if(this._past[i]===e){t.has(this.strResource)?this._past[i]=t.get(this.strResource):this._past.splice(i,1);break}this.versionId++}splitFutureWorkspaceElement(e,t){for(let i=this._future.length-1;i>=0;i--)if(this._future[i]===e){t.has(this.strResource)?this._future[i]=t.get(this.strResource):this._future.splice(i,1);break}this.versionId++}moveBackward(e){this._past.pop(),this._future.push(e),this.versionId++}moveForward(e){this._future.pop(),this._past.push(e),this.versionId++}}class EO{constructor(e){this.editStacks=e,this._versionIds=[];for(let t=0,i=this.editStacks.length;t<i;t++)this._versionIds[t]=this.editStacks[t].versionId}isValid(){for(let e=0,t=this.editStacks.length;e<t;e++)if(this._versionIds[e]!==this.editStacks[e].versionId)return!1;return!0}}const DO=new kO("","");DO.locked=!0;let NO=class{constructor(e,t){this._dialogService=e,this._notificationService=t,this._editStacks=new Map,this._uriComparisonKeyComputers=[]}getUriComparisonKey(e){for(const t of this._uriComparisonKeyComputers)if(t[0]===e.scheme)return t[1].getComparisonKey(e);return e.toString()}_print(e){console.log("------------------------------------"),console.log(`AFTER ${e}: `);let t=[];for(const i of this._editStacks)t.push(i[1].toString());console.log(t.join("\n"))}pushElement(e){if(0===e.type){const t=wO(e.resource),i=this.getUriComparisonKey(e.resource);this._pushElement(new yO(e,t,i))}else{const t=new Set,i=[],n=[];for(const o of e.resources){const e=wO(o),r=this.getUriComparisonKey(o);t.has(r)||(t.add(r),i.push(e),n.push(r))}1===i.length?this._pushElement(new yO(e,i[0],n[0])):this._pushElement(new LO(e,i,n))}vO&&this._print("pushElement")}_pushElement(e){for(let t=0,i=e.strResources.length;t<i;t++){const i=e.resourceLabels[t],n=e.strResources[t];let o;this._editStacks.has(n)?o=this._editStacks.get(n):(o=new kO(i,n),this._editStacks.set(n,o)),o.pushElement(e)}}getLastElement(e){const t=this.getUriComparisonKey(e);if(this._editStacks.has(t)){const e=this._editStacks.get(t);if(e.hasFutureElements())return null;const i=e.getClosestPastElement();return i?i.actual:null}return null}_splitPastWorkspaceElement(e,t){const i=e.actual.split(),n=new Map;for(const o of i){const e=wO(o.resource),t=this.getUriComparisonKey(o.resource),i=new yO(o,e,t);n.set(i.strResource,i)}for(const o of e.strResources){if(t&&t.has(o))continue;const i=this._editStacks.get(o);i.splitPastWorkspaceElement(e,n)}}_splitFutureWorkspaceElement(e,t){const i=e.actual.split(),n=new Map;for(const o of i){const e=wO(o.resource),t=this.getUriComparisonKey(o.resource),i=new yO(o,e,t);n.set(i.strResource,i)}for(const o of e.strResources){if(t&&t.has(o))continue;const i=this._editStacks.get(o);i.splitFutureWorkspaceElement(e,n)}}removeElements(e){const t="string"===typeof e?e:this.getUriComparisonKey(e);if(this._editStacks.has(t)){const e=this._editStacks.get(t);e.dispose(),this._editStacks.delete(t)}vO&&this._print("removeElements")}setElementsValidFlag(e,t,i){const n=this.getUriComparisonKey(e);if(this._editStacks.has(n)){const e=this._editStacks.get(n);e.setElementsValidFlag(t,i)}vO&&this._print("setElementsValidFlag")}createSnapshot(e){const t=this.getUriComparisonKey(e);if(this._editStacks.has(t)){const i=this._editStacks.get(t);return i.createSnapshot(e)}return new eD(e,[])}restoreSnapshot(e){const t=this.getUriComparisonKey(e.resource);if(this._editStacks.has(t)){const i=this._editStacks.get(t);i.restoreSnapshot(e),i.hasPastElements()||i.hasFutureElements()||(i.dispose(),this._editStacks.delete(t))}vO&&this._print("restoreSnapshot")}getElements(e){const t=this.getUriComparisonKey(e);if(this._editStacks.has(t)){const e=this._editStacks.get(t);return e.getElements()}return{past:[],future:[]}}canUndo(e){const t=this.getUriComparisonKey(e);if(this._editStacks.has(t)){const e=this._editStacks.get(t);return e.hasPastElements()}return!1}_onError(e,t){me(e);for(const i of t.strResources)this.removeElements(i);this._notificationService.error(e)}_acquireLocks(e){for(const t of e.editStacks)if(t.locked)throw new Error("Cannot acquire edit stack lock");for(const t of e.editStacks)t.locked=!0;return()=>{for(const t of e.editStacks)t.locked=!1}}_safeInvokeWithLocks(e,t,i,n=Oe.None){const o=this._acquireLocks(i);let r;try{r=t()}catch(s){return o(),n.dispose(),this._onError(s,e)}if(r)return r.then(()=>{o(),n.dispose()},t=>(o(),n.dispose(),this._onError(t,e)));o(),n.dispose()}_invokeWorkspacePrepare(e){return bO(this,void 0,void 0,(function*(){if("undefined"===typeof e.actual.prepareUndoRedo)return Oe.None;const t=e.actual.prepareUndoRedo();return"undefined"===typeof t?Oe.None:t}))}_invokeResourcePrepare(e,t){if(1!==e.actual.type||"undefined"===typeof e.actual.prepareUndoRedo)return void t(Oe.None);const i=e.actual.prepareUndoRedo();if(i){if(!De(i))return i.then(e=>{t(e)});t(i)}else t(Oe.None)}_getAffectedEditStacks(e){const t=[];for(const i of e.strResources)t.push(this._editStacks.get(i)||DO);return new EO(t)}_tryToSplitAndUndo(e,t,i,n){if(t.canSplit())return this._splitPastWorkspaceElement(t,i),this._notificationService.info(n),new TO(this.undo(e));for(const o of t.strResources)this.removeElements(o);return this._notificationService.info(n),new TO}_checkWorkspaceUndo(e,t,i,n){if(t.removedResources)return this._tryToSplitAndUndo(e,t,t.removedResources,o({key:"cannotWorkspaceUndo",comment:["{0} is a label for an operation. {1} is another message."]},"Could not undo '{0}' across all files. {1}",t.label,t.removedResources.createMessage()));if(n&&t.invalidatedResources)return this._tryToSplitAndUndo(e,t,t.invalidatedResources,o({key:"cannotWorkspaceUndo",comment:["{0} is a label for an operation. {1} is another message."]},"Could not undo '{0}' across all files. {1}",t.label,t.invalidatedResources.createMessage()));const r=[];for(const o of i.editStacks)o.getClosestPastElement()!==t&&r.push(o.resourceLabel);if(r.length>0)return this._tryToSplitAndUndo(e,t,null,o({key:"cannotWorkspaceUndoDueToChanges",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not undo '{0}' across all files because changes were made to {1}",t.label,r.join(", ")));const s=[];for(const o of i.editStacks)o.locked&&s.push(o.resourceLabel);return s.length>0?this._tryToSplitAndUndo(e,t,null,o({key:"cannotWorkspaceUndoDueToInProgressUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not undo '{0}' across all files because there is already an undo or redo operation running on {1}",t.label,s.join(", "))):i.isValid()?null:this._tryToSplitAndUndo(e,t,null,o({key:"cannotWorkspaceUndoDueToInMeantimeUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not undo '{0}' across all files because an undo or redo operation occurred in the meantime",t.label))}_workspaceUndo(e,t){const i=this._getAffectedEditStacks(t),n=this._checkWorkspaceUndo(e,t,i,!1);return n?n.returnValue:this._confirmAndExecuteWorkspaceUndo(e,t,i)}_confirmAndExecuteWorkspaceUndo(e,t,i){return bO(this,void 0,void 0,(function*(){if(t.canSplit()){const n=yield this._dialogService.show(su.Info,o("confirmWorkspace","Would you like to undo '{0}' across all files?",t.label),[o({key:"ok",comment:["{0} denotes a number that is > 1"]},"Undo in {0} Files",i.editStacks.length),o("nok","Undo this File"),o("cancel","Cancel")],{cancelId:2});if(2===n.choice)return;if(1===n.choice)return this._splitPastWorkspaceElement(t,null),this.undo(e);const r=this._checkWorkspaceUndo(e,t,i,!1);if(r)return r.returnValue}let n;try{n=yield this._invokeWorkspacePrepare(t)}catch(s){return this._onError(s,t)}const r=this._checkWorkspaceUndo(e,t,i,!0);if(r)return n.dispose(),r.returnValue;for(const e of i.editStacks)e.moveBackward(t);return this._safeInvokeWithLocks(t,()=>t.actual.undo(),i,n)}))}_resourceUndo(e,t){if(t.isValid){if(!e.locked)return this._invokeResourcePrepare(t,i=>(e.moveBackward(t),this._safeInvokeWithLocks(t,()=>t.actual.undo(),new EO([e]),i)));{const e=o({key:"cannotResourceUndoDueToInProgressUndoRedo",comment:["{0} is a label for an operation."]},"Could not undo '{0}' because there is already an undo or redo operation running.",t.label);this._notificationService.info(e)}}else e.flushAllElements()}undo(e){const t="string"===typeof e?e:this.getUriComparisonKey(e);if(!this._editStacks.has(t))return;const i=this._editStacks.get(t),n=i.getClosestPastElement();if(n)try{return 1===n.type?this._workspaceUndo(t,n):this._resourceUndo(i,n)}finally{vO&&this._print("undo")}}canRedo(e){const t=this.getUriComparisonKey(e);if(this._editStacks.has(t)){const e=this._editStacks.get(t);return e.hasFutureElements()}return!1}_tryToSplitAndRedo(e,t,i,n){if(t.canSplit())return this._splitFutureWorkspaceElement(t,i),this._notificationService.info(n),new TO(this.redo(e));for(const o of t.strResources)this.removeElements(o);return this._notificationService.info(n),new TO}_checkWorkspaceRedo(e,t,i,n){if(t.removedResources)return this._tryToSplitAndRedo(e,t,t.removedResources,o({key:"cannotWorkspaceRedo",comment:["{0} is a label for an operation. {1} is another message."]},"Could not redo '{0}' across all files. {1}",t.label,t.removedResources.createMessage()));if(n&&t.invalidatedResources)return this._tryToSplitAndRedo(e,t,t.invalidatedResources,o({key:"cannotWorkspaceRedo",comment:["{0} is a label for an operation. {1} is another message."]},"Could not redo '{0}' across all files. {1}",t.label,t.invalidatedResources.createMessage()));const r=[];for(const o of i.editStacks)o.getClosestFutureElement()!==t&&r.push(o.resourceLabel);if(r.length>0)return this._tryToSplitAndRedo(e,t,null,o({key:"cannotWorkspaceRedoDueToChanges",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not redo '{0}' across all files because changes were made to {1}",t.label,r.join(", ")));const s=[];for(const o of i.editStacks)o.locked&&s.push(o.resourceLabel);return s.length>0?this._tryToSplitAndRedo(e,t,null,o({key:"cannotWorkspaceRedoDueToInProgressUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not redo '{0}' across all files because there is already an undo or redo operation running on {1}",t.label,s.join(", "))):i.isValid()?null:this._tryToSplitAndRedo(e,t,null,o({key:"cannotWorkspaceRedoDueToInMeantimeUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not redo '{0}' across all files because an undo or redo operation occurred in the meantime",t.label))}_workspaceRedo(e,t){const i=this._getAffectedEditStacks(t),n=this._checkWorkspaceRedo(e,t,i,!1);return n?n.returnValue:this._executeWorkspaceRedo(e,t,i)}_executeWorkspaceRedo(e,t,i){return bO(this,void 0,void 0,(function*(){let n;try{n=yield this._invokeWorkspacePrepare(t)}catch(r){return this._onError(r,t)}const o=this._checkWorkspaceRedo(e,t,i,!0);if(o)return n.dispose(),o.returnValue;for(const e of i.editStacks)e.moveForward(t);return this._safeInvokeWithLocks(t,()=>t.actual.redo(),i,n)}))}_resourceRedo(e,t){if(t.isValid){if(!e.locked)return this._invokeResourcePrepare(t,i=>(e.moveForward(t),this._safeInvokeWithLocks(t,()=>t.actual.redo(),new EO([e]),i)));{const e=o({key:"cannotResourceRedoDueToInProgressUndoRedo",comment:["{0} is a label for an operation."]},"Could not redo '{0}' because there is already an undo or redo operation running.",t.label);this._notificationService.info(e)}}else e.flushAllElements()}redo(e){const t="string"===typeof e?e:this.getUriComparisonKey(e);if(!this._editStacks.has(t))return;const i=this._editStacks.get(t),n=i.getClosestFutureElement();if(n)try{return 1===n.type?this._workspaceRedo(t,n):this._resourceRedo(i,n)}finally{vO&&this._print("redo")}}};NO=pO([_O(0,qN),_O(1,Tg)],NO);class TO{constructor(e){this.returnValue=e}}Nk(JE,NO);i("88cb"),i("358f");const MO={ctrlCmd:!1,alt:!1};var IO;(function(e){e[e["NONE"]=0]="NONE",e[e["FIRST"]=1]="FIRST",e[e["SECOND"]=2]="SECOND",e[e["LAST"]=3]="LAST"})(IO||(IO={}));const OO=new Mn(()=>{const e=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"});return{collator:e,collatorIsNumeric:e.resolvedOptions().numeric}});function AO(e,t,i=!1){const n=e||"",o=t||"",r=OO.value.collator.compare(n,o);return OO.value.collatorIsNumeric&&0===r&&n!==o?n<o?-1:1:r}function RO(e,t,i){const n=e.toLowerCase(),o=t.toLowerCase(),r=PO(e,t,i);if(r)return r;const s=n.endsWith(i),a=o.endsWith(i);if(s!==a)return s?-1:1;const l=AO(n,o);return 0!==l?l:n.localeCompare(o)}function PO(e,t,i){const n=e.toLowerCase(),o=t.toLowerCase(),r=n.startsWith(i),s=o.startsWith(i);if(r!==s)return r?-1:1;if(r&&s){if(n.length<o.length)return-1;if(n.length>o.length)return 1}return 0}i("8c32");class FO{constructor(e,t){this.supportCodicons=t,this.text="",this.title="",this.highlights=[],this.didEverRender=!1,this.domNode=document.createElement("span"),this.domNode.className="monaco-highlighted-label",e.appendChild(this.domNode)}get element(){return this.domNode}set(e,t=[],i="",n){e||(e=""),n&&(e=FO.escapeNewLines(e,t)),this.didEverRender&&this.text===e&&this.title===i&&hs(this.highlights,t)||(Array.isArray(t)||(t=[]),this.text=e,this.title=i,this.highlights=t,this.render())}render(){let e="",t=0;for(const i of this.highlights){if(i.end===i.start)continue;if(t<i.start){e+="<span>";const n=this.text.substring(t,i.start);e+=this.supportCodicons?gl(Object(yr["s"])(n)):Object(yr["s"])(n),e+="</span>",t=i.end}i.extraClasses?e+=`<span class="highlight ${i.extraClasses}">`:e+='<span class="highlight">';const n=this.text.substring(i.start,i.end);e+=this.supportCodicons?gl(Object(yr["s"])(n)):Object(yr["s"])(n),e+="</span>",t=i.end}if(t<this.text.length){e+="<span>";const i=this.text.substring(t);e+=this.supportCodicons?gl(Object(yr["s"])(i)):Object(yr["s"])(i),e+="</span>"}this.domNode.innerHTML=e,this.title?this.domNode.title=this.title:this.domNode.removeAttribute("title"),this.didEverRender=!0}static escapeNewLines(e,t){let i=0,n=0;return e.replace(/\r\n|\r|\n/g,(e,o)=>{n="\r\n"===e?-1:0,o+=i;for(const i of t)i.end<=o||(i.start>=o&&(i.start+=n),i.end>=o&&(i.end+=n));return i+=n,"⏎"})}}class WO{constructor(e){this._element=e}get element(){return this._element}set textContent(e){this.disposed||e===this._textContent||(this._textContent=e,this._element.textContent=e)}set className(e){this.disposed||e===this._className||(this._className=e,this._element.className=e)}set title(e){this.disposed||e===this._title||(this._title=e,this._title?this._element.title=e:this._element.removeAttribute("title"))}set empty(e){this.disposed||e===this._empty||(this._empty=e,this._element.style.marginLeft=e?"0":"")}dispose(){this.disposed=!0}}class BO extends Oe{constructor(e,t){super(),this.domNode=this._register(new WO(nr(e,lr(".monaco-icon-label"))));const i=nr(this.domNode.element,lr(".monaco-icon-label-container")),n=nr(i,lr("span.monaco-icon-name-container"));this.descriptionContainer=this._register(new WO(nr(i,lr("span.monaco-icon-description-container")))),(null===t||void 0===t?void 0:t.supportHighlights)?this.nameNode=new zO(n,!!t.supportCodicons):this.nameNode=new VO(n),(null===t||void 0===t?void 0:t.supportDescriptionHighlights)?this.descriptionNodeFactory=()=>new FO(nr(this.descriptionContainer.element,lr("span.label-description")),!!t.supportCodicons):this.descriptionNodeFactory=()=>this._register(new WO(nr(this.descriptionContainer.element,lr("span.label-description"))))}setLabel(e,t,i){const n=["monaco-icon-label"];i&&(i.extraClasses&&n.push(...i.extraClasses),i.italic&&n.push("italic"),i.strikethrough&&n.push("strikethrough")),this.domNode.className=n.join(" "),this.domNode.title=(null===i||void 0===i?void 0:i.title)||"",this.nameNode.setLabel(e,i),(t||this.descriptionNode)&&(this.descriptionNode||(this.descriptionNode=this.descriptionNodeFactory()),this.descriptionNode instanceof FO?(this.descriptionNode.set(t||"",i?i.descriptionMatches:void 0),(null===i||void 0===i?void 0:i.descriptionTitle)?this.descriptionNode.element.title=i.descriptionTitle:this.descriptionNode.element.removeAttribute("title")):(this.descriptionNode.textContent=t||"",this.descriptionNode.title=(null===i||void 0===i?void 0:i.descriptionTitle)||"",this.descriptionNode.empty=!t))}}class VO{constructor(e){this.container=e,this.label=void 0,this.singleLabel=void 0}setLabel(e,t){if(this.label!==e||!hs(this.options,t))if(this.label=e,this.options=t,"string"===typeof e)this.singleLabel||(this.container.innerText="",so(this.container,"multiple"),this.singleLabel=nr(this.container,lr("a.label-name",{id:null===t||void 0===t?void 0:t.domId}))),this.singleLabel.textContent=e;else{this.container.innerText="",oo(this.container,"multiple"),this.singleLabel=void 0;for(let i=0;i<e.length;i++){const n=e[i],o=(null===t||void 0===t?void 0:t.domId)&&`${null===t||void 0===t?void 0:t.domId}_${i}`;nr(this.container,lr("a.label-name",{id:o,"data-icon-label-count":e.length,"data-icon-label-index":i,role:"treeitem"},n)),i<e.length-1&&nr(this.container,lr("span.label-separator",void 0,(null===t||void 0===t?void 0:t.separator)||"/"))}}}}function HO(e,t,i){if(!i)return;let n=0;return e.map(e=>{const o={start:n,end:n+e.length},r=i.map(e=>_N.intersect(o,e)).filter(e=>!_N.isEmpty(e)).map(({start:e,end:t})=>({start:e-n,end:t-n}));return n=o.end+t.length,r})}class zO{constructor(e,t){this.container=e,this.supportCodicons=t,this.label=void 0,this.singleLabel=void 0}setLabel(e,t){if(this.label!==e||!hs(this.options,t))if(this.label=e,this.options=t,"string"===typeof e)this.singleLabel||(this.container.innerText="",so(this.container,"multiple"),this.singleLabel=new FO(nr(this.container,lr("a.label-name",{id:null===t||void 0===t?void 0:t.domId})),this.supportCodicons)),this.singleLabel.set(e,null===t||void 0===t?void 0:t.matches,null===t||void 0===t?void 0:t.title,null===t||void 0===t?void 0:t.labelEscapeNewLines);else{this.container.innerText="",oo(this.container,"multiple"),this.singleLabel=void 0;const i=(null===t||void 0===t?void 0:t.separator)||"/",n=HO(e,i,null===t||void 0===t?void 0:t.matches);for(let o=0;o<e.length;o++){const r=e[o],s=n?n[o]:void 0,a=(null===t||void 0===t?void 0:t.domId)&&`${null===t||void 0===t?void 0:t.domId}_${o}`,l=lr("a.label-name",{id:a,"data-icon-label-count":e.length,"data-icon-label-index":o,role:"treeitem"}),c=new FO(nr(this.container,l),this.supportCodicons);c.set(r,s,null===t||void 0===t?void 0:t.title,null===t||void 0===t?void 0:t.labelEscapeNewLines),o<e.length-1&&nr(l,lr("span.label-separator",void 0,i))}}}}class UO{constructor(e){this._prefix=e,this._lastId=0}nextId(){return this._prefix+ ++this._lastId}}new UO("id#");const jO={},KO=new UO("quick-input-button-icon-");function qO(e){if(!e)return;let t;const i=e.dark.toString();return jO[i]?t=jO[i]:(t=KO.nextId(),Go("."+t,"background-image: "+br(e.light||e.dark)),Go(`.vs-dark .${t}, .hc-black .${t}`,"background-image: "+br(e.dark)),jO[i]=t),t}i("d557");const $O=lr;class GO{constructor(e,t,i){this.os=t,this.options=i,this.domNode=nr(e,$O(".monaco-keybinding")),this.didEverRender=!1,e.appendChild(this.domNode)}set(e,t){this.didEverRender&&this.keybinding===e&&GO.areSame(this.matches,t)||(this.keybinding=e,this.matches=t,this.render())}render(){if(Jn(this.domNode),this.keybinding){let[e,t]=this.keybinding.getParts();e&&this.renderPart(this.domNode,e,this.matches?this.matches.firstPart:null),t&&(nr(this.domNode,$O("span.monaco-keybinding-key-chord-separator",void 0," ")),this.renderPart(this.domNode,t,this.matches?this.matches.chordPart:null)),this.domNode.title=this.keybinding.getAriaLabel()||""}else this.options&&this.options.renderUnboundKeybindings&&this.renderUnbound(this.domNode);this.didEverRender=!0}renderPart(e,t,i){const n=Lg.modifierLabels[this.os];t.ctrlKey&&this.renderKey(e,n.ctrlKey,Boolean(null===i||void 0===i?void 0:i.ctrlKey),n.separator),t.shiftKey&&this.renderKey(e,n.shiftKey,Boolean(null===i||void 0===i?void 0:i.shiftKey),n.separator),t.altKey&&this.renderKey(e,n.altKey,Boolean(null===i||void 0===i?void 0:i.altKey),n.separator),t.metaKey&&this.renderKey(e,n.metaKey,Boolean(null===i||void 0===i?void 0:i.metaKey),n.separator);const o=t.keyLabel;o&&this.renderKey(e,o,Boolean(null===i||void 0===i?void 0:i.keyCode),"")}renderKey(e,t,i,n){nr(e,$O("span.monaco-keybinding-key"+(i?".highlight":""),void 0,t)),n&&nr(e,$O("span.monaco-keybinding-key-separator",void 0,n))}renderUnbound(e){nr(e,$O("span.monaco-keybinding-key",void 0,o("unbound","Unbound")))}static areSame(e,t){return e===t||!e&&!t||!!e&&!!t&&hs(e.firstPart,t.firstPart)&&hs(e.chordPart,t.chordPart)}}var YO=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};const XO=lr;class ZO{constructor(e){this.hidden=!1,this._onChecked=new Ve,this.onChecked=this._onChecked.event,cs(this,e)}get checked(){return!!this._checked}set checked(e){e!==this._checked&&(this._checked=e,this._onChecked.fire(e))}dispose(){this._onChecked.dispose()}}class QO{get templateId(){return QO.ID}renderTemplate(e){const t=Object.create(null);t.toDisposeElement=[],t.toDisposeTemplate=[],t.entry=nr(e,XO(".quick-input-list-entry"));const i=nr(t.entry,XO("label.quick-input-list-label"));t.toDisposeTemplate.push(fo(i,Zo.CLICK,e=>{t.checkbox.offsetParent||e.preventDefault()})),t.checkbox=nr(i,XO("input.quick-input-list-checkbox")),t.checkbox.type="checkbox",t.toDisposeTemplate.push(fo(t.checkbox,Zo.CHANGE,e=>{t.element.checked=t.checkbox.checked}));const n=nr(i,XO(".quick-input-list-rows")),o=nr(n,XO(".quick-input-list-row")),s=nr(n,XO(".quick-input-list-row"));t.label=new BO(o,{supportHighlights:!0,supportDescriptionHighlights:!0,supportCodicons:!0});const a=nr(o,XO(".quick-input-list-entry-keybinding"));t.keybinding=new GO(a,r["a"]);const l=nr(s,XO(".quick-input-list-label-meta"));return t.detail=new FO(l,!0),t.separator=nr(t.entry,XO(".quick-input-list-separator")),t.actionBar=new Bk(t.entry),t.actionBar.domNode.classList.add("quick-input-list-entry-action-bar"),t.toDisposeTemplate.push(t.actionBar),t}renderElement(e,t,i){i.toDisposeElement=Ne(i.toDisposeElement),i.element=e,i.checkbox.checked=e.checked,i.toDisposeElement.push(e.onChecked(e=>i.checkbox.checked=e));const{labelHighlights:n,descriptionHighlights:o,detailHighlights:r}=e,s=Object.create(null);s.matches=n||[],s.descriptionTitle=e.saneDescription,s.descriptionMatches=o||[],s.extraClasses=e.item.iconClasses,s.italic=e.item.italic,s.strikethrough=e.item.strikethrough,i.label.setLabel(e.saneLabel,e.saneDescription,s),i.keybinding.set(e.item.keybinding),i.detail.set(e.saneDetail,r),e.separator&&e.separator.label?(i.separator.textContent=e.separator.label,i.separator.style.display=""):i.separator.style.display="none",e.separator?oo(i.entry,"quick-input-list-separator-border"):so(i.entry,"quick-input-list-separator-border"),i.actionBar.clear();const a=e.item.buttons;a&&a.length?(i.actionBar.push(a.map((t,i)=>{let n=t.iconClass||(t.iconPath?qO(t.iconPath):void 0);t.alwaysVisible&&(n=n?n+" always-visible":"always-visible");const o=new Mf("id-"+i,"",n,!0,()=>(e.fireButtonTriggered({button:t,item:e.item}),Promise.resolve()));return o.tooltip=t.tooltip||"",o}),{icon:!0,label:!1}),oo(i.entry,"has-actions")):so(i.entry,"has-actions")}disposeElement(e,t,i){i.toDisposeElement=Ne(i.toDisposeElement)}disposeTemplate(e){e.toDisposeElement=Ne(e.toDisposeElement),e.toDisposeTemplate=Ne(e.toDisposeTemplate)}}QO.ID="listelement";class JO{getHeight(e){return e.saneDetail?44:22}getTemplateId(e){return QO.ID}}var eA;(function(e){e[e["First"]=1]="First",e[e["Second"]=2]="Second",e[e["Last"]=3]="Last",e[e["Next"]=4]="Next",e[e["Previous"]=5]="Previous",e[e["NextPage"]=6]="NextPage",e[e["PreviousPage"]=7]="PreviousPage"})(eA||(eA={}));class tA{constructor(e,t,i){this.parent=e,this.inputElements=[],this.elements=[],this.elementsToIndexes=new Map,this.matchOnDescription=!1,this.matchOnDetail=!1,this.matchOnLabel=!0,this.sortByLabel=!0,this._onChangedAllVisibleChecked=new Ve,this.onChangedAllVisibleChecked=this._onChangedAllVisibleChecked.event,this._onChangedCheckedCount=new Ve,this.onChangedCheckedCount=this._onChangedCheckedCount.event,this._onChangedVisibleCount=new Ve,this.onChangedVisibleCount=this._onChangedVisibleCount.event,this._onChangedCheckedElements=new Ve,this.onChangedCheckedElements=this._onChangedCheckedElements.event,this._onButtonTriggered=new Ve,this.onButtonTriggered=this._onButtonTriggered.event,this._onKeyDown=new Ve,this.onKeyDown=this._onKeyDown.event,this._onLeave=new Ve,this.onLeave=this._onLeave.event,this._fireCheckedEvents=!0,this.elementDisposables=[],this.disposables=[],this.id=t,this.container=nr(this.parent,XO(".quick-input-list"));const n=new JO,o=new nA;this.list=i.createList("QuickInput",this.container,n,[new QO],{identityProvider:{getId:e=>e.saneLabel},setRowLineHeight:!1,multipleSelectionSupport:!1,horizontalScrolling:!1,accessibilityProvider:o}),this.list.getHTMLElement().id=t,this.disposables.push(this.list),this.disposables.push(this.list.onKeyDown(e=>{const t=new mn(e);switch(t.keyCode){case 10:this.toggleCheckbox();break;case 31:(r["f"]?e.metaKey:e.ctrlKey)&&this.list.setFocus($n(this.list.length));break;case 16:const t=this.list.getFocus();1===t.length&&0===t[0]&&this._onLeave.fire();break;case 18:const i=this.list.getFocus();1===i.length&&i[0]===this.list.length-1&&this._onLeave.fire();break}this._onKeyDown.fire(t)})),this.disposables.push(this.list.onMouseDown(e=>{2!==e.browserEvent.button&&e.browserEvent.preventDefault()})),this.disposables.push(ho(this.container,Zo.CLICK,e=>{(e.x||e.y)&&this._onLeave.fire()})),this.disposables.push(this.list.onMouseMiddleClick(e=>{this._onLeave.fire()})),this.disposables.push(this.list.onContextMenu(e=>{"number"===typeof e.index&&(e.browserEvent.preventDefault(),this.list.setSelection([e.index]))})),this.disposables.push(this._onChangedAllVisibleChecked,this._onChangedCheckedCount,this._onChangedVisibleCount,this._onChangedCheckedElements,this._onButtonTriggered,this._onLeave,this._onKeyDown)}get onDidChangeFocus(){return Fe.map(this.list.onDidChangeFocus,e=>e.elements.map(e=>e.item))}get onDidChangeSelection(){return Fe.map(this.list.onDidChangeSelection,e=>({items:e.elements.map(e=>e.item),event:e.browserEvent}))}getAllVisibleChecked(){return this.allVisibleChecked(this.elements,!1)}allVisibleChecked(e,t=!0){for(let i=0,n=e.length;i<n;i++){const n=e[i];if(!n.hidden){if(!n.checked)return!1;t=!0}}return t}getCheckedCount(){let e=0;const t=this.elements;for(let i=0,n=t.length;i<n;i++)t[i].checked&&e++;return e}getVisibleCount(){let e=0;const t=this.elements;for(let i=0,n=t.length;i<n;i++)t[i].hidden||e++;return e}setAllVisibleChecked(e){try{this._fireCheckedEvents=!1,this.elements.forEach(t=>{t.hidden||(t.checked=e)})}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}setElements(e){this.elementDisposables=Ne(this.elementDisposables);const t=e=>this.fireButtonTriggered(e);this.inputElements=e,this.elements=e.reduce((i,n,o)=>{var r,s,a;if("separator"!==n.type){const l=o&&e[o-1],c=n.label&&n.label.replace(/\r?\n/g," "),h=n.description&&n.description.replace(/\r?\n/g," "),d=n.detail&&n.detail.replace(/\r?\n/g," "),u=n.ariaLabel||[c,h,d].map(e=>e&&ol(e).text).filter(e=>!!e).join(", ");i.push(new ZO({index:o,item:n,saneLabel:c,saneAriaLabel:u,saneDescription:h,saneDetail:d,labelHighlights:null===(r=n.highlights)||void 0===r?void 0:r.label,descriptionHighlights:null===(s=n.highlights)||void 0===s?void 0:s.description,detailHighlights:null===(a=n.highlights)||void 0===a?void 0:a.detail,checked:!1,separator:l&&"separator"===l.type?l:void 0,fireButtonTriggered:t}))}return i},[]),this.elementDisposables.push(...this.elements),this.elementDisposables.push(...this.elements.map(e=>e.onChecked(()=>this.fireCheckedEvents()))),this.elementsToIndexes=this.elements.reduce((e,t,i)=>(e.set(t.item,i),e),new Map),this.list.splice(0,this.list.length),this.list.splice(0,this.list.length,this.elements),this._onChangedVisibleCount.fire(this.elements.length)}getFocusedElements(){return this.list.getFocusedElements().map(e=>e.item)}setFocusedElements(e){if(this.list.setFocus(e.filter(e=>this.elementsToIndexes.has(e)).map(e=>this.elementsToIndexes.get(e))),e.length>0){const e=this.list.getFocus()[0];"number"===typeof e&&this.list.reveal(e)}}getActiveDescendant(){return this.list.getHTMLElement().getAttribute("aria-activedescendant")}setSelectedElements(e){this.list.setSelection(e.filter(e=>this.elementsToIndexes.has(e)).map(e=>this.elementsToIndexes.get(e)))}getCheckedElements(){return this.elements.filter(e=>e.checked).map(e=>e.item)}setCheckedElements(e){try{this._fireCheckedEvents=!1;const t=new Set;for(const i of e)t.add(i);for(const e of this.elements)e.checked=t.has(e.item)}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}set enabled(e){this.list.getHTMLElement().style.pointerEvents=e?"":"none"}focus(e){if(!this.list.length)return;switch(e===eA.Next&&this.list.getFocus()[0]===this.list.length-1&&(e=eA.First),e===eA.Previous&&0===this.list.getFocus()[0]&&(e=eA.Last),e===eA.Second&&this.list.length<2&&(e=eA.First),e){case eA.First:this.list.focusFirst();break;case eA.Second:this.list.focusNth(1);break;case eA.Last:this.list.focusLast();break;case eA.Next:this.list.focusNext();break;case eA.Previous:this.list.focusPrevious();break;case eA.NextPage:this.list.focusNextPage();break;case eA.PreviousPage:this.list.focusPreviousPage();break}const t=this.list.getFocus()[0];"number"===typeof t&&this.list.reveal(t)}clearFocus(){this.list.setFocus([])}domFocus(){this.list.domFocus()}layout(e){this.list.getHTMLElement().style.maxHeight=e?`calc(${44*Math.floor(e/44)}px)`:"",this.list.layout()}filter(e){if(!(this.sortByLabel||this.matchOnLabel||this.matchOnDescription||this.matchOnDetail))return this.list.layout(),!1;e=e.trim(),e&&(this.matchOnLabel||this.matchOnDescription||this.matchOnDetail)?this.elements.forEach(t=>{const i=this.matchOnLabel?Kr(sl(e,ol(t.saneLabel))):void 0,n=this.matchOnDescription?Kr(sl(e,ol(t.saneDescription||""))):void 0,o=this.matchOnDetail?Kr(sl(e,ol(t.saneDetail||""))):void 0;i||n||o?(t.labelHighlights=i,t.descriptionHighlights=n,t.detailHighlights=o,t.hidden=!1):(t.labelHighlights=void 0,t.descriptionHighlights=void 0,t.detailHighlights=void 0,t.hidden=!t.item.alwaysShow),t.separator=void 0}):this.elements.forEach(e=>{e.labelHighlights=void 0,e.descriptionHighlights=void 0,e.detailHighlights=void 0,e.hidden=!1;const t=e.index&&this.inputElements[e.index-1];e.separator=t&&"separator"===t.type?t:void 0});const t=this.elements.filter(e=>!e.hidden);if(this.sortByLabel&&e){const i=e.toLowerCase();t.sort((e,t)=>iA(e,t,i))}return this.elementsToIndexes=t.reduce((e,t,i)=>(e.set(t.item,i),e),new Map),this.list.splice(0,this.list.length,t),this.list.setFocus([]),this.list.layout(),this._onChangedAllVisibleChecked.fire(this.getAllVisibleChecked()),this._onChangedVisibleCount.fire(t.length),!0}toggleCheckbox(){try{this._fireCheckedEvents=!1;const e=this.list.getFocusedElements(),t=this.allVisibleChecked(e);for(const i of e)i.checked=!t}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}display(e){this.container.style.display=e?"":"none"}isDisplayed(){return"none"!==this.container.style.display}dispose(){this.elementDisposables=Ne(this.elementDisposables),this.disposables=Ne(this.disposables)}fireCheckedEvents(){this._fireCheckedEvents&&(this._onChangedAllVisibleChecked.fire(this.getAllVisibleChecked()),this._onChangedCheckedCount.fire(this.getCheckedCount()),this._onChangedCheckedElements.fire(this.getCheckedElements()))}fireButtonTriggered(e){this._onButtonTriggered.fire(e)}style(e){this.list.style(e)}}function iA(e,t,i){const n=e.labelHighlights||[],o=t.labelHighlights||[];return n.length&&!o.length?-1:!n.length&&o.length?1:0===n.length&&0===o.length?0:RO(e.saneLabel,t.saneLabel,i)}YO([Nm],tA.prototype,"onDidChangeFocus",null),YO([Nm],tA.prototype,"onDidChangeSelection",null);class nA{getWidgetAriaLabel(){return o("quickInput","Quick Input")}getAriaLabel(e){return e.saneAriaLabel}getWidgetRole(){return"listbox"}getRole(){return"option"}}i("eba9");function oA(e,t={}){const i=sA(t);return i.textContent=e,i}function rA(e,t={}){const i=sA(t);return lA(i,cA(e),t.actionHandler),i}function sA(e){const t=e.inline?"span":"div",i=document.createElement(t);return e.className&&(i.className=e.className),i}class aA{constructor(e){this.source=e,this.index=0}eos(){return this.index>=this.source.length}next(){const e=this.peek();return this.advance(),e}peek(){return this.source[this.index]}advance(){this.index++}}function lA(e,t,i){let n;if(2===t.type)n=document.createTextNode(t.content||"");else if(3===t.type)n=document.createElement("b");else if(4===t.type)n=document.createElement("i");else if(5===t.type&&i){const e=document.createElement("a");e.href="#",i.disposeables.add(fo(e,"click",e=>{i.callback(String(t.index),e)})),n=e}else 7===t.type?n=document.createElement("br"):1===t.type&&(n=e);n&&e!==n&&e.appendChild(n),n&&Array.isArray(t.children)&&t.children.forEach(e=>{lA(n,e,i)})}function cA(e){const t={type:1,children:[]};let i=0,n=t;const o=[],r=new aA(e);while(!r.eos()){let e=r.next();const t="\\"===e&&0!==dA(r.peek());if(t&&(e=r.next()),!t&&hA(e)&&e===r.peek()){r.advance(),2===n.type&&(n=o.pop());const t=dA(e);if(n.type===t||5===n.type&&6===t)n=o.pop();else{const e={type:t,children:[]};5===t&&(e.index=i,i++),n.children.push(e),o.push(n),n=e}}else if("\n"===e)2===n.type&&(n=o.pop()),n.children.push({type:7});else if(2!==n.type){const t={type:2,content:e};n.children.push(t),o.push(n),n=t}else n.content+=e}return 2===n.type&&(n=o.pop()),o.length,t}function hA(e){return 0!==dA(e)}function dA(e){switch(e){case"*":return 3;case"_":return 4;case"[":return 5;case"]":return 6;default:return 0}}const uA=lr,gA={inputBackground:Nb.fromHex("#3C3C3C"),inputForeground:Nb.fromHex("#CCCCCC"),inputValidationInfoBorder:Nb.fromHex("#55AAFF"),inputValidationInfoBackground:Nb.fromHex("#063B49"),inputValidationWarningBorder:Nb.fromHex("#B89500"),inputValidationWarningBackground:Nb.fromHex("#352A05"),inputValidationErrorBorder:Nb.fromHex("#BE1100"),inputValidationErrorBackground:Nb.fromHex("#5A1D1D")};class fA extends oS{constructor(e,t,i){super(),this.state="idle",this.maxHeight=Number.POSITIVE_INFINITY,this._onDidChange=this._register(new Ve),this.onDidChange=this._onDidChange.event,this._onDidHeightChange=this._register(new Ve),this.onDidHeightChange=this._onDidHeightChange.event,this.contextViewProvider=t,this.options=i||Object.create(null),ls(this.options,gA,!1),this.message=null,this.placeholder=this.options.placeholder||"",this.ariaLabel=this.options.ariaLabel||"",this.inputBackground=this.options.inputBackground,this.inputForeground=this.options.inputForeground,this.inputBorder=this.options.inputBorder,this.inputValidationInfoBorder=this.options.inputValidationInfoBorder,this.inputValidationInfoBackground=this.options.inputValidationInfoBackground,this.inputValidationInfoForeground=this.options.inputValidationInfoForeground,this.inputValidationWarningBorder=this.options.inputValidationWarningBorder,this.inputValidationWarningBackground=this.options.inputValidationWarningBackground,this.inputValidationWarningForeground=this.options.inputValidationWarningForeground,this.inputValidationErrorBorder=this.options.inputValidationErrorBorder,this.inputValidationErrorBackground=this.options.inputValidationErrorBackground,this.inputValidationErrorForeground=this.options.inputValidationErrorForeground,this.options.validationOptions&&(this.validation=this.options.validationOptions.validation),this.element=nr(e,uA(".monaco-inputbox.idle"));let n=this.options.flexibleHeight?"textarea":"input",o=nr(this.element,uA(".wrapper"));if(this.input=nr(o,uA(n+".input.empty")),this.input.setAttribute("autocorrect","off"),this.input.setAttribute("autocapitalize","off"),this.input.setAttribute("spellcheck","false"),this.onfocus(this.input,()=>this.element.classList.add("synthetic-focus")),this.onblur(this.input,()=>this.element.classList.remove("synthetic-focus")),this.options.flexibleHeight){this.maxHeight="number"===typeof this.options.flexibleMaxHeight?this.options.flexibleMaxHeight:Number.POSITIVE_INFINITY,this.mirror=nr(o,uA("div.mirror")),this.mirror.innerText=" ",this.scrollableElement=new IS(this.element,{vertical:1}),this.options.flexibleWidth&&(this.input.setAttribute("wrap","off"),this.mirror.style.whiteSpace="pre",this.mirror.style.wordWrap="initial"),nr(e,this.scrollableElement.getDomNode()),this._register(this.scrollableElement),this._register(this.scrollableElement.onScroll(e=>this.input.scrollTop=e.scrollTop));const t=Fe.filter(an(document,"selectionchange"),()=>{const e=document.getSelection();return(null===e||void 0===e?void 0:e.anchorNode)===o});this._register(t(this.updateScrollDimensions,this)),this._register(this.onDidHeightChange(this.updateScrollDimensions,this))}else this.input.type=this.options.type||"text",this.input.setAttribute("wrap","off");this.ariaLabel&&this.input.setAttribute("aria-label",this.ariaLabel),this.placeholder&&this.setPlaceHolder(this.placeholder),this.oninput(this.input,()=>this.onValueChange()),this.onblur(this.input,()=>this.onBlur()),this.onfocus(this.input,()=>this.onFocus()),this.ignoreGesture(this.input),setTimeout(()=>this.updateMirror(),0),this.options.actions&&(this.actionbar=this._register(new Bk(this.element)),this.actionbar.push(this.options.actions,{icon:!0,label:!1})),this.applyStyles()}onBlur(){this._hideMessage()}onFocus(){this._showMessage()}setPlaceHolder(e){this.placeholder=e,this.input.setAttribute("placeholder",e),this.input.title=e}setAriaLabel(e){this.ariaLabel=e,e?this.input.setAttribute("aria-label",this.ariaLabel):this.input.removeAttribute("aria-label")}getAriaLabel(){return this.ariaLabel}get inputElement(){return this.input}get value(){return this.input.value}set value(e){this.input.value!==e&&(this.input.value=e,this.onValueChange())}get height(){return"number"===typeof this.cachedHeight?this.cachedHeight:Po(this.element)}focus(){this.input.focus()}blur(){this.input.blur()}hasFocus(){return document.activeElement===this.input}select(e=null){this.input.select(),e&&this.input.setSelectionRange(e.start,e.end)}isSelectionAtEnd(){return this.input.selectionEnd===this.input.value.length&&this.input.selectionStart===this.input.selectionEnd}enable(){this.input.removeAttribute("disabled")}disable(){this.blur(),this.input.disabled=!0,this._hideMessage()}get width(){return Oo(this.input)}set width(e){if(this.options.flexibleHeight&&this.options.flexibleWidth){let t=0;if(this.mirror){const e=parseFloat(this.mirror.style.paddingLeft||"")||0,i=parseFloat(this.mirror.style.paddingRight||"")||0;t=e+i}this.input.style.width=e-t+"px"}else this.input.style.width=e+"px";this.mirror&&(this.mirror.style.width=e+"px")}set paddingRight(e){this.options.flexibleHeight&&this.options.flexibleWidth?this.input.style.width=`calc(100% - ${e}px)`:this.input.style.paddingRight=e+"px",this.mirror&&(this.mirror.style.paddingRight=e+"px")}updateScrollDimensions(){if("number"!==typeof this.cachedContentHeight||"number"!==typeof this.cachedHeight||!this.scrollableElement)return;const e=this.cachedContentHeight,t=this.cachedHeight,i=this.input.scrollTop;this.scrollableElement.setScrollDimensions({scrollHeight:e,height:t}),this.scrollableElement.setScrollPosition({scrollTop:i})}showMessage(e,t){this.message=e,this.element.classList.remove("idle"),this.element.classList.remove("info"),this.element.classList.remove("warning"),this.element.classList.remove("error"),this.element.classList.add(this.classForType(e.type));const i=this.stylesForType(this.message.type);this.element.style.border=i.border?"1px solid "+i.border:"",(this.hasFocus()||t)&&this._showMessage()}hideMessage(){this.message=null,this.element.classList.remove("info"),this.element.classList.remove("warning"),this.element.classList.remove("error"),this.element.classList.add("idle"),this._hideMessage(),this.applyStyles()}validate(){let e=null;return this.validation&&(e=this.validation(this.value),e?(this.inputElement.setAttribute("aria-invalid","true"),this.showMessage(e)):this.inputElement.hasAttribute("aria-invalid")&&(this.inputElement.removeAttribute("aria-invalid"),this.hideMessage())),!e}stylesForType(e){switch(e){case 1:return{border:this.inputValidationInfoBorder,background:this.inputValidationInfoBackground,foreground:this.inputValidationInfoForeground};case 2:return{border:this.inputValidationWarningBorder,background:this.inputValidationWarningBackground,foreground:this.inputValidationWarningForeground};default:return{border:this.inputValidationErrorBorder,background:this.inputValidationErrorBackground,foreground:this.inputValidationErrorForeground}}}classForType(e){switch(e){case 1:return"info";case 2:return"warning";default:return"error"}}_showMessage(){if(!this.contextViewProvider||!this.message)return;let e,t,i=()=>e.style.width=Oo(this.element)+"px";this.contextViewProvider.showContextView({getAnchor:()=>this.element,anchorAlignment:1,render:t=>{if(!this.message)return null;e=nr(t,uA(".monaco-inputbox-container")),i();const n={inline:!0,className:"monaco-inputbox-message"},o=this.message.formatContent?rA(this.message.content,n):oA(this.message.content,n);o.classList.add(this.classForType(this.message.type));const r=this.stylesForType(this.message.type);return o.style.backgroundColor=r.background?r.background.toString():"",o.style.color=r.foreground?r.foreground.toString():"",o.style.border=r.border?"1px solid "+r.border:"",nr(e,o),null},onHide:()=>{this.state="closed"},layout:i}),t=3===this.message.type?o("alertErrorMessage","Error: {0}",this.message.content):2===this.message.type?o("alertWarningMessage","Warning: {0}",this.message.content):o("alertInfoMessage","Info: {0}",this.message.content),wf(t),this.state="open"}_hideMessage(){this.contextViewProvider&&("open"===this.state&&this.contextViewProvider.hideContextView(),this.state="idle")}onValueChange(){this._onDidChange.fire(this.value),this.validate(),this.updateMirror(),this.input.classList.toggle("empty",!this.value),"open"===this.state&&this.contextViewProvider&&this.contextViewProvider.layout()}updateMirror(){if(!this.mirror)return;const e=this.value,t=e.charCodeAt(e.length-1),i=10===t?" ":"",n=e+i;n?this.mirror.textContent=e+i:this.mirror.innerText=" ",this.layout()}style(e){this.inputBackground=e.inputBackground,this.inputForeground=e.inputForeground,this.inputBorder=e.inputBorder,this.inputValidationInfoBackground=e.inputValidationInfoBackground,this.inputValidationInfoForeground=e.inputValidationInfoForeground,this.inputValidationInfoBorder=e.inputValidationInfoBorder,this.inputValidationWarningBackground=e.inputValidationWarningBackground,this.inputValidationWarningForeground=e.inputValidationWarningForeground,this.inputValidationWarningBorder=e.inputValidationWarningBorder,this.inputValidationErrorBackground=e.inputValidationErrorBackground,this.inputValidationErrorForeground=e.inputValidationErrorForeground,this.inputValidationErrorBorder=e.inputValidationErrorBorder,this.applyStyles()}applyStyles(){const e=this.inputBackground?this.inputBackground.toString():"",t=this.inputForeground?this.inputForeground.toString():"",i=this.inputBorder?this.inputBorder.toString():"";this.element.style.backgroundColor=e,this.element.style.color=t,this.input.style.backgroundColor="inherit",this.input.style.color=t,this.element.style.borderWidth=i?"1px":"",this.element.style.borderStyle=i?"solid":"",this.element.style.borderColor=i}layout(){if(!this.mirror)return;const e=this.cachedContentHeight;this.cachedContentHeight=Po(this.mirror),e!==this.cachedContentHeight&&(this.cachedHeight=Math.min(this.cachedContentHeight,this.maxHeight),this.input.style.height=this.cachedHeight+"px",this._onDidHeightChange.fire(this.cachedContentHeight))}insertAtCursor(e){const t=this.inputElement,i=t.selectionStart,n=t.selectionEnd,o=t.value;null!==i&&null!==n&&(this.value=o.substr(0,i)+e+o.substr(n),t.setSelectionRange(i+1,i+1),this.layout())}dispose(){this._hideMessage(),this.message=null,this.actionbar&&this.actionbar.dispose(),super.dispose()}}const mA=lr;class pA extends Oe{constructor(e){super(),this.parent=e,this.onKeyDown=e=>ho(this.inputBox.inputElement,Zo.KEY_DOWN,t=>{e(new mn(t))}),this.onMouseDown=e=>ho(this.inputBox.inputElement,Zo.MOUSE_DOWN,t=>{e(new Cn(t))}),this.onDidChange=e=>this.inputBox.onDidChange(e),this.container=nr(this.parent,mA(".quick-input-box")),this.inputBox=this._register(new fA(this.container,void 0))}get value(){return this.inputBox.value}set value(e){this.inputBox.value=e}select(e=null){this.inputBox.select(e)}isSelectionAtEnd(){return this.inputBox.isSelectionAtEnd()}get placeholder(){return this.inputBox.inputElement.getAttribute("placeholder")||""}set placeholder(e){this.inputBox.setPlaceHolder(e)}get ariaLabel(){return this.inputBox.getAriaLabel()}set ariaLabel(e){this.inputBox.setAriaLabel(e)}get password(){return"password"===this.inputBox.inputElement.type}set password(e){this.inputBox.inputElement.type=e?"password":"text"}setAttribute(e,t){this.inputBox.inputElement.setAttribute(e,t)}removeAttribute(e){this.inputBox.inputElement.removeAttribute(e)}showDecoration(e){e===su.Ignore?this.inputBox.hideMessage():this.inputBox.showMessage({type:e===su.Info?1:e===su.Warning?2:3,content:""})}stylesForType(e){return this.inputBox.stylesForType(e===su.Info?1:e===su.Warning?2:3)}setFocus(){this.inputBox.focus()}layout(){this.inputBox.layout()}style(e){this.inputBox.style(e)}}i("f5ab");const _A={badgeBackground:Nb.fromHex("#4D4D4D"),badgeForeground:Nb.fromHex("#FFFFFF")};class bA{constructor(e,t){this.count=0,this.options=t||Object.create(null),ls(this.options,_A,!1),this.badgeBackground=this.options.badgeBackground,this.badgeForeground=this.options.badgeForeground,this.badgeBorder=this.options.badgeBorder,this.element=nr(e,lr(".monaco-count-badge")),this.countFormat=this.options.countFormat||"{0}",this.titleFormat=this.options.titleFormat||"",this.setCount(this.options.count||0)}setCount(e){this.count=e,this.render()}setTitleFormat(e){this.titleFormat=e,this.render()}render(){this.element.textContent=Object(yr["v"])(this.countFormat,this.count),this.element.title=Object(yr["v"])(this.titleFormat,this.count),this.applyStyles()}style(e){this.badgeBackground=e.badgeBackground,this.badgeForeground=e.badgeForeground,this.badgeBorder=e.badgeBorder,this.applyStyles()}applyStyles(){if(this.element){const e=this.badgeBackground?this.badgeBackground.toString():"",t=this.badgeForeground?this.badgeForeground.toString():"",i=this.badgeBorder?this.badgeBorder.toString():"";this.element.style.backgroundColor=e,this.element.style.color=t,this.element.style.borderWidth=i?"1px":"",this.element.style.borderStyle=i?"solid":"",this.element.style.borderColor=i}}}i("2adc");const vA="done",wA="active",CA="infinite",yA="discrete",SA="monaco-progress-container",xA="progress-bit",LA={progressBarBackground:Nb.fromHex("#0E70C0")};class kA extends Oe{constructor(e,t){super(),this.options=t||Object.create(null),ls(this.options,LA,!1),this.workedVal=0,this.progressBarBackground=this.options.progressBarBackground,this._register(this.showDelayedScheduler=new Tn(()=>cr(this.element),0)),this.create(e)}create(e){this.element=document.createElement("div"),oo(this.element,SA),e.appendChild(this.element),this.bit=document.createElement("div"),oo(this.bit,xA),this.element.appendChild(this.bit),this.applyStyles()}off(){this.bit.style.width="inherit",this.bit.style.opacity="1",ao(this.element,wA,CA,yA),this.workedVal=0,this.totalWork=void 0}stop(){return this.doDone(!1)}doDone(e){return oo(this.element,vA),no(this.element,CA)?(this.bit.style.opacity="0",e?setTimeout(()=>this.off(),200):this.off()):(this.bit.style.width="inherit",e?setTimeout(()=>this.off(),200):this.off()),this}infinite(){return this.bit.style.width="2%",this.bit.style.opacity="1",ao(this.element,yA,vA),ro(this.element,wA,CA),this}getContainer(){return this.element}style(e){this.progressBarBackground=e.progressBarBackground,this.applyStyles()}applyStyles(){if(this.bit){const e=this.progressBarBackground?this.progressBarBackground.toString():"";this.bit.style.backgroundColor=e}}}i("e635");function EA(e){const t=new Array;let i,n=0,o=0;while(null!==(i=ul.exec(e))){o=i.index||0,t.push(e.substring(n,o)),n=(i.index||0)+i[0].length;const[,r,s,a,l]=i;t.push(r?`$(${s})`:lr(`span.codicon.codicon-${a}${l?".codicon-animation-"+l:""}`))}return n<e.length&&t.push(e.substring(n)),t}const DA={buttonBackground:Nb.fromHex("#0E639C"),buttonHoverBackground:Nb.fromHex("#006BB3"),buttonForeground:Nb.white};class NA extends Oe{constructor(e,t){super(),this._onDidClick=this._register(new Ve),this.options=t||Object.create(null),ls(this.options,DA,!1),this.buttonForeground=this.options.buttonForeground,this.buttonBackground=this.options.buttonBackground,this.buttonHoverBackground=this.options.buttonHoverBackground,this.buttonSecondaryForeground=this.options.buttonSecondaryForeground,this.buttonSecondaryBackground=this.options.buttonSecondaryBackground,this.buttonSecondaryHoverBackground=this.options.buttonSecondaryHoverBackground,this.buttonBorder=this.options.buttonBorder,this._element=document.createElement("a"),oo(this._element,"monaco-button"),this._element.tabIndex=0,this._element.setAttribute("role","button"),e.appendChild(this._element),this._register(Im.addTarget(this._element)),[Zo.CLICK,Tm.Tap].forEach(e=>{this._register(ho(this._element,e,e=>{this.enabled?this._onDidClick.fire(e):Qo.stop(e)}))}),this._register(ho(this._element,Zo.KEY_DOWN,e=>{const t=new mn(e);let i=!1;this.enabled&&(t.equals(3)||t.equals(10))?(this._onDidClick.fire(e),i=!0):t.equals(9)&&(this._element.blur(),i=!0),i&&Qo.stop(t,!0)})),this._register(ho(this._element,Zo.MOUSE_OVER,e=>{no(this._element,"disabled")||this.setHoverBackground()})),this._register(ho(this._element,Zo.MOUSE_OUT,e=>{this.applyStyles()})),this.focusTracker=this._register(ir(this._element)),this._register(this.focusTracker.onDidFocus(()=>this.setHoverBackground())),this._register(this.focusTracker.onDidBlur(()=>this.applyStyles())),this.applyStyles()}get onDidClick(){return this._onDidClick.event}setHoverBackground(){let e;e=this.options.secondary?this.buttonSecondaryHoverBackground?this.buttonSecondaryHoverBackground.toString():null:this.buttonHoverBackground?this.buttonHoverBackground.toString():null,e&&(this._element.style.backgroundColor=e)}style(e){this.buttonForeground=e.buttonForeground,this.buttonBackground=e.buttonBackground,this.buttonHoverBackground=e.buttonHoverBackground,this.buttonSecondaryForeground=e.buttonSecondaryForeground,this.buttonSecondaryBackground=e.buttonSecondaryBackground,this.buttonSecondaryHoverBackground=e.buttonSecondaryHoverBackground,this.buttonBorder=e.buttonBorder,this.applyStyles()}applyStyles(){if(this._element){let e,t;this.options.secondary?(t=this.buttonSecondaryForeground?this.buttonSecondaryForeground.toString():"",e=this.buttonSecondaryBackground?this.buttonSecondaryBackground.toString():""):(t=this.buttonForeground?this.buttonForeground.toString():"",e=this.buttonBackground?this.buttonBackground.toString():"");const i=this.buttonBorder?this.buttonBorder.toString():"";this._element.style.color=t,this._element.style.backgroundColor=e,this._element.style.borderWidth=i?"1px":"",this._element.style.borderStyle=i?"solid":"",this._element.style.borderColor=i}}get element(){return this._element}set label(e){no(this._element,"monaco-text-button")||oo(this._element,"monaco-text-button"),this.options.supportCodicons?rr(this._element,...EA(e)):this._element.textContent=e,"string"===typeof this.options.title?this._element.title=this.options.title:this.options.title&&(this._element.title=e)}set enabled(e){e?(so(this._element,"disabled"),this._element.setAttribute("aria-disabled",String(!1)),this._element.tabIndex=0):(oo(this._element,"disabled"),this._element.setAttribute("aria-disabled",String(!0)),ur(this._element))}get enabled(){return!no(this._element,"disabled")}}var TA=function(e,t,i,n){function o(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,r){function s(e){try{l(n.next(e))}catch(t){r(t)}}function a(e){try{l(n["throw"](e))}catch(t){r(t)}}function l(e){e.done?i(e.value):o(e.value).then(s,a)}l((n=n.apply(e,t||[])).next())}))};const MA=lr,IA=hl("quick-input-back",dl.arrowLeft),OA={iconClass:IA.classNames,tooltip:o("quickInput.back","Back"),handle:-1};class AA extends Oe{constructor(e){super(),this.ui=e,this.visible=!1,this._enabled=!0,this._busy=!1,this._ignoreFocusOut=!1,this._buttons=[],this.buttonsUpdated=!1,this.onDidTriggerButtonEmitter=this._register(new Ve),this.onDidHideEmitter=this._register(new Ve),this.onDisposeEmitter=this._register(new Ve),this.visibleDisposables=this._register(new Ie),this.onDidHide=this.onDidHideEmitter.event}get title(){return this._title}set title(e){this._title=e,this.update()}get description(){return this._description}set description(e){this._description=e,this.update()}get step(){return this._steps}set step(e){this._steps=e,this.update()}get totalSteps(){return this._totalSteps}set totalSteps(e){this._totalSteps=e,this.update()}get enabled(){return this._enabled}set enabled(e){this._enabled=e,this.update()}get contextKey(){return this._contextKey}set contextKey(e){this._contextKey=e,this.update()}get busy(){return this._busy}set busy(e){this._busy=e,this.update()}get ignoreFocusOut(){return this._ignoreFocusOut}set ignoreFocusOut(e){this._ignoreFocusOut=e,this.update()}get buttons(){return this._buttons}set buttons(e){this._buttons=e,this.buttonsUpdated=!0,this.update()}show(){this.visible||(this.visibleDisposables.add(this.ui.onDidTriggerButton(e=>{-1!==this.buttons.indexOf(e)&&this.onDidTriggerButtonEmitter.fire(e)})),this.ui.show(this),this.visible=!0,this.update())}hide(){this.visible&&this.ui.hide()}didHide(){this.visible=!1,this.visibleDisposables.clear(),this.onDidHideEmitter.fire()}update(){if(!this.visible)return;const e=this.getTitle();e&&this.ui.title.textContent!==e?this.ui.title.textContent=e:e||"&nbsp;"===this.ui.title.innerHTML||(this.ui.title.innerText=" ;");const t=this.getDescription();if(this.ui.description.textContent!==t&&(this.ui.description.textContent=t),this.busy&&!this.busyDelay&&(this.busyDelay=new Dn,this.busyDelay.setIfNotSet(()=>{this.visible&&this.ui.progressBar.infinite()},800)),!this.busy&&this.busyDelay&&(this.ui.progressBar.stop(),this.busyDelay.cancel(),this.busyDelay=void 0),this.buttonsUpdated){this.buttonsUpdated=!1,this.ui.leftActionBar.clear();const e=this.buttons.filter(e=>e===OA);this.ui.leftActionBar.push(e.map((e,t)=>{const i=new Mf("id-"+t,"",e.iconClass||qO(e.iconPath),!0,()=>TA(this,void 0,void 0,(function*(){this.onDidTriggerButtonEmitter.fire(e)})));return i.tooltip=e.tooltip||"",i}),{icon:!0,label:!1}),this.ui.rightActionBar.clear();const t=this.buttons.filter(e=>e!==OA);this.ui.rightActionBar.push(t.map((e,t)=>{const i=new Mf("id-"+t,"",e.iconClass||qO(e.iconPath),!0,()=>TA(this,void 0,void 0,(function*(){this.onDidTriggerButtonEmitter.fire(e)})));return i.tooltip=e.tooltip||"",i}),{icon:!0,label:!1})}this.ui.ignoreFocusOut=this.ignoreFocusOut,this.ui.setEnabled(this.enabled),this.ui.setContextKey(this.contextKey)}getTitle(){return this.title&&this.step?`${this.title} (${this.getSteps()})`:this.title?this.title:this.step?this.getSteps():""}getDescription(){return this.description||""}getSteps(){return this.step&&this.totalSteps?o("quickInput.steps","{0}/{1}",this.step,this.totalSteps):this.step?String(this.step):""}showMessageDecoration(e){if(this.ui.inputBox.showDecoration(e),e===su.Error){const t=this.ui.inputBox.stylesForType(e);this.ui.message.style.color=t.foreground?""+t.foreground:"",this.ui.message.style.backgroundColor=t.background?""+t.background:"",this.ui.message.style.border=t.border?"1px solid "+t.border:"",this.ui.message.style.paddingBottom="4px"}else this.ui.message.style.color="",this.ui.message.style.backgroundColor="",this.ui.message.style.border="",this.ui.message.style.paddingBottom=""}dispose(){this.hide(),this.onDisposeEmitter.fire(),super.dispose()}}class RA extends AA{constructor(){super(...arguments),this._value="",this.onDidChangeValueEmitter=this._register(new Ve),this.onDidAcceptEmitter=this._register(new Ve),this.onDidCustomEmitter=this._register(new Ve),this._items=[],this.itemsUpdated=!1,this._canSelectMany=!1,this._canAcceptInBackground=!1,this._matchOnDescription=!1,this._matchOnDetail=!1,this._matchOnLabel=!0,this._sortByLabel=!0,this._autoFocusOnList=!0,this._itemActivation=this.ui.isScreenReaderOptimized()?IO.NONE:IO.FIRST,this._activeItems=[],this.activeItemsUpdated=!1,this.activeItemsToConfirm=[],this.onDidChangeActiveEmitter=this._register(new Ve),this._selectedItems=[],this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=[],this.onDidChangeSelectionEmitter=this._register(new Ve),this.onDidTriggerItemButtonEmitter=this._register(new Ve),this.valueSelectionUpdated=!0,this._ok="default",this._customButton=!1,this.filterValue=e=>e,this.onDidChangeValue=this.onDidChangeValueEmitter.event,this.onDidAccept=this.onDidAcceptEmitter.event,this.onDidChangeActive=this.onDidChangeActiveEmitter.event,this.onDidChangeSelection=this.onDidChangeSelectionEmitter.event,this.onDidTriggerItemButton=this.onDidTriggerItemButtonEmitter.event}get quickNavigate(){return this._quickNavigate}set quickNavigate(e){this._quickNavigate=e,this.update()}get value(){return this._value}set value(e){this._value=e||"",this.update()}set ariaLabel(e){this._ariaLabel=e,this.update()}get ariaLabel(){return this._ariaLabel}get placeholder(){return this._placeholder}set placeholder(e){this._placeholder=e,this.update()}get items(){return this._items}set items(e){this._items=e,this.itemsUpdated=!0,this.update()}get canSelectMany(){return this._canSelectMany}set canSelectMany(e){this._canSelectMany=e,this.update()}get canAcceptInBackground(){return this._canAcceptInBackground}set canAcceptInBackground(e){this._canAcceptInBackground=e}get matchOnDescription(){return this._matchOnDescription}set matchOnDescription(e){this._matchOnDescription=e,this.update()}get matchOnDetail(){return this._matchOnDetail}set matchOnDetail(e){this._matchOnDetail=e,this.update()}get matchOnLabel(){return this._matchOnLabel}set matchOnLabel(e){this._matchOnLabel=e,this.update()}get sortByLabel(){return this._sortByLabel}set sortByLabel(e){this._sortByLabel=e,this.update()}get autoFocusOnList(){return this._autoFocusOnList}set autoFocusOnList(e){this._autoFocusOnList=e,this.update()}get itemActivation(){return this._itemActivation}set itemActivation(e){this._itemActivation=e}get activeItems(){return this._activeItems}set activeItems(e){this._activeItems=e,this.activeItemsUpdated=!0,this.update()}get selectedItems(){return this._selectedItems}set selectedItems(e){this._selectedItems=e,this.selectedItemsUpdated=!0,this.update()}get keyMods(){return this._quickNavigate?MO:this.ui.keyMods}set valueSelection(e){this._valueSelection=e,this.valueSelectionUpdated=!0,this.update()}get validationMessage(){return this._validationMessage}set validationMessage(e){this._validationMessage=e,this.update()}get customButton(){return this._customButton}set customButton(e){this._customButton=e,this.update()}get customLabel(){return this._customButtonLabel}set customLabel(e){this._customButtonLabel=e,this.update()}get customHover(){return this._customButtonHover}set customHover(e){this._customButtonHover=e,this.update()}get ok(){return this._ok}set ok(e){this._ok=e,this.update()}get hideInput(){return!!this._hideInput}set hideInput(e){this._hideInput=e,this.update()}trySelectFirst(){this.autoFocusOnList&&(this.canSelectMany||this.ui.list.focus(eA.First))}show(){this.visible||(this.visibleDisposables.add(this.ui.inputBox.onDidChange(e=>{if(e===this.value)return;this._value=e;const t=this.ui.list.filter(this.filterValue(this.ui.inputBox.value));t&&this.trySelectFirst(),this.onDidChangeValueEmitter.fire(e)})),this.visibleDisposables.add(this.ui.inputBox.onMouseDown(e=>{this.autoFocusOnList||this.ui.list.clearFocus()})),this.visibleDisposables.add((this._hideInput?this.ui.list:this.ui.inputBox).onKeyDown(e=>{switch(e.keyCode){case 18:this.ui.list.focus(eA.Next),this.canSelectMany&&this.ui.list.domFocus(),Qo.stop(e,!0);break;case 16:this.ui.list.getFocusedElements().length?this.ui.list.focus(eA.Previous):this.ui.list.focus(eA.Last),this.canSelectMany&&this.ui.list.domFocus(),Qo.stop(e,!0);break;case 12:this.ui.list.focus(eA.NextPage),this.canSelectMany&&this.ui.list.domFocus(),Qo.stop(e,!0);break;case 11:this.ui.list.focus(eA.PreviousPage),this.canSelectMany&&this.ui.list.domFocus(),Qo.stop(e,!0);break;case 17:if(!this._canAcceptInBackground)return;if(!this.ui.inputBox.isSelectionAtEnd())return;this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems),this.onDidAcceptEmitter.fire({inBackground:!0}));break;case 14:!e.ctrlKey&&!e.metaKey||e.shiftKey||e.altKey||(this.ui.list.focus(eA.First),Qo.stop(e,!0));break;case 13:!e.ctrlKey&&!e.metaKey||e.shiftKey||e.altKey||(this.ui.list.focus(eA.Last),Qo.stop(e,!0));break}})),this.visibleDisposables.add(this.ui.onDidAccept(()=>{!this.canSelectMany&&this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems)),this.onDidAcceptEmitter.fire({inBackground:!1})})),this.visibleDisposables.add(this.ui.onDidCustom(()=>{this.onDidCustomEmitter.fire()})),this.visibleDisposables.add(this.ui.list.onDidChangeFocus(e=>{this.activeItemsUpdated||this.activeItemsToConfirm!==this._activeItems&&An(e,this._activeItems,(e,t)=>e===t)||(this._activeItems=e,this.onDidChangeActiveEmitter.fire(e))})),this.visibleDisposables.add(this.ui.list.onDidChangeSelection(({items:e,event:t})=>{this.canSelectMany?e.length&&this.ui.list.setSelectedElements([]):this.selectedItemsToConfirm!==this._selectedItems&&An(e,this._selectedItems,(e,t)=>e===t)||(this._selectedItems=e,this.onDidChangeSelectionEmitter.fire(e),e.length&&this.onDidAcceptEmitter.fire({inBackground:t instanceof MouseEvent&&1===t.button}))})),this.visibleDisposables.add(this.ui.list.onChangedCheckedElements(e=>{this.canSelectMany&&(this.selectedItemsToConfirm!==this._selectedItems&&An(e,this._selectedItems,(e,t)=>e===t)||(this._selectedItems=e,this.onDidChangeSelectionEmitter.fire(e)))})),this.visibleDisposables.add(this.ui.list.onButtonTriggered(e=>this.onDidTriggerItemButtonEmitter.fire(e))),this.visibleDisposables.add(this.registerQuickNavigation()),this.valueSelectionUpdated=!0),super.show()}registerQuickNavigation(){return ho(this.ui.container,Zo.KEY_UP,e=>{if(this.canSelectMany||!this._quickNavigate)return;const t=new mn(e),i=t.keyCode,n=this._quickNavigate.keybindings,o=n.some(e=>{const[n,o]=e.getParts();return!o&&(n.shiftKey&&4===i?!(t.ctrlKey||t.altKey||t.metaKey):!(!n.altKey||6!==i)||(!(!n.ctrlKey||5!==i)||!(!n.metaKey||57!==i)))});o&&(this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems),this.onDidAcceptEmitter.fire({inBackground:!1})),this._quickNavigate=void 0)})}update(){if(!this.visible)return;let e=!1,t=!1;this._hideInput&&this._items.length>0&&(this.ui.isScreenReaderOptimized()?t=!0:e=!0),lo(this.ui.container,"hidden-input",e);const i={title:!!this.title||!!this.step||!!this.buttons.length,description:!!this.description,checkAll:this.canSelectMany,inputBox:!e,progressBar:!e,visibleCount:!0,count:this.canSelectMany,ok:"default"===this.ok?this.canSelectMany:this.ok,list:!0,message:!!this.validationMessage,customButton:this.customButton};if(this.ui.setVisibilities(i),super.update(),this.ui.inputBox.value!==this.value&&(this.ui.inputBox.value=this.value),this.valueSelectionUpdated&&(this.valueSelectionUpdated=!1,this.ui.inputBox.select(this._valueSelection&&{start:this._valueSelection[0],end:this._valueSelection[1]})),this.ui.inputBox.placeholder!==(this.placeholder||"")&&(this.ui.inputBox.placeholder=this.placeholder||""),t)this.ui.inputBox.ariaLabel="";else{const e=this.ariaLabel||this.placeholder||RA.DEFAULT_ARIA_LABEL;this.ui.inputBox.ariaLabel!==e&&(this.ui.inputBox.ariaLabel=e)}if(this.ui.list.matchOnDescription=this.matchOnDescription,this.ui.list.matchOnDetail=this.matchOnDetail,this.ui.list.matchOnLabel=this.matchOnLabel,this.ui.list.sortByLabel=this.sortByLabel,this.itemsUpdated)switch(this.itemsUpdated=!1,this.ui.list.setElements(this.items),this.ui.list.filter(this.filterValue(this.ui.inputBox.value)),this.ui.checkAll.checked=this.ui.list.getAllVisibleChecked(),this.ui.visibleCount.setCount(this.ui.list.getVisibleCount()),this.ui.count.setCount(this.ui.list.getCheckedCount()),this._itemActivation){case IO.NONE:this._itemActivation=IO.FIRST;break;case IO.SECOND:this.ui.list.focus(eA.Second),this._itemActivation=IO.FIRST;break;case IO.LAST:this.ui.list.focus(eA.Last),this._itemActivation=IO.FIRST;break;default:this.trySelectFirst();break}this.ui.container.classList.contains("show-checkboxes")!==!!this.canSelectMany&&(this.canSelectMany?this.ui.list.clearFocus():this.trySelectFirst()),this.activeItemsUpdated&&(this.activeItemsUpdated=!1,this.activeItemsToConfirm=this._activeItems,this.ui.list.setFocusedElements(this.activeItems),this.activeItemsToConfirm===this._activeItems&&(this.activeItemsToConfirm=null)),this.selectedItemsUpdated&&(this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=this._selectedItems,this.canSelectMany?this.ui.list.setCheckedElements(this.selectedItems):this.ui.list.setSelectedElements(this.selectedItems),this.selectedItemsToConfirm===this._selectedItems&&(this.selectedItemsToConfirm=null)),this.validationMessage?(this.ui.message.textContent=this.validationMessage,this.showMessageDecoration(su.Error)):(this.ui.message.textContent=null,this.showMessageDecoration(su.Ignore)),this.ui.customButton.label=this.customLabel||"",this.ui.customButton.element.title=this.customHover||"",this.ui.setComboboxAccessibility(!0),i.inputBox||this.ui.list.domFocus()}}RA.DEFAULT_ARIA_LABEL=o("quickInputBox.ariaLabel","Type to narrow down results.");class PA extends Oe{constructor(e){super(),this.options=e,this.comboboxAccessibility=!1,this.enabled=!0,this.onDidAcceptEmitter=this._register(new Ve),this.onDidCustomEmitter=this._register(new Ve),this.onDidTriggerButtonEmitter=this._register(new Ve),this.keyMods={ctrlCmd:!1,alt:!1},this.controller=null,this.onShowEmitter=this._register(new Ve),this.onShow=this.onShowEmitter.event,this.onHideEmitter=this._register(new Ve),this.onHide=this.onHideEmitter.event,this.idPrefix=e.idPrefix,this.parentElement=e.container,this.styles=e.styles,this.registerKeyModsListeners()}registerKeyModsListeners(){const e=e=>{this.keyMods.ctrlCmd=e.ctrlKey||e.metaKey,this.keyMods.alt=e.altKey};this._register(ho(window,Zo.KEY_DOWN,e,!0)),this._register(ho(window,Zo.KEY_UP,e,!0)),this._register(ho(window,Zo.MOUSE_DOWN,e,!0))}getUI(){if(this.ui)return this.ui;const e=nr(this.parentElement,MA(".quick-input-widget.show-file-icons"));e.tabIndex=-1,e.style.display="none";const t=jo(e),i=nr(e,MA(".quick-input-titlebar")),n=this._register(new Bk(i));n.domNode.classList.add("quick-input-left-action-bar");const r=nr(i,MA(".quick-input-title")),s=this._register(new Bk(i));s.domNode.classList.add("quick-input-right-action-bar");const a=nr(e,MA(".quick-input-description")),l=nr(e,MA(".quick-input-header")),c=nr(l,MA("input.quick-input-check-all"));c.type="checkbox",this._register(fo(c,Zo.CHANGE,e=>{const t=c.checked;S.setAllVisibleChecked(t)})),this._register(ho(c,Zo.CLICK,e=>{(e.x||e.y)&&u.setFocus()}));const h=nr(l,MA(".quick-input-and-message")),d=nr(h,MA(".quick-input-filter")),u=this._register(new pA(d));u.setAttribute("aria-describedby",this.idPrefix+"message");const g=nr(d,MA(".quick-input-visible-count"));g.setAttribute("aria-live","polite"),g.setAttribute("aria-atomic","true");const f=new bA(g,{countFormat:o({key:"quickInput.visibleCount",comment:["This tells the user how many items are shown in a list of items to select from. The items can be anything. Currently not visible, but read by screen readers."]},"{0} Results")}),m=nr(d,MA(".quick-input-count"));m.setAttribute("aria-live","polite");const p=new bA(m,{countFormat:o({key:"quickInput.countSelected",comment:["This tells the user how many items are selected in a list of items to select from. The items can be anything."]},"{0} Selected")}),_=nr(l,MA(".quick-input-action")),b=new NA(_);b.label=o("ok","OK"),this._register(b.onDidClick(e=>{this.onDidAcceptEmitter.fire()}));const v=nr(l,MA(".quick-input-action")),w=new NA(v);w.label=o("custom","Custom"),this._register(w.onDidClick(e=>{this.onDidCustomEmitter.fire()}));const C=nr(h,MA(`#${this.idPrefix}message.quick-input-message`)),y=new kA(e);oo(y.getContainer(),"quick-input-progress");const S=this._register(new tA(e,this.idPrefix+"list",this.options));this._register(S.onChangedAllVisibleChecked(e=>{c.checked=e})),this._register(S.onChangedVisibleCount(e=>{f.setCount(e)})),this._register(S.onChangedCheckedCount(e=>{p.setCount(e)})),this._register(S.onLeave(()=>{setTimeout(()=>{u.setFocus(),this.controller instanceof RA&&this.controller.canSelectMany&&S.clearFocus()},0)})),this._register(S.onDidChangeFocus(()=>{this.comboboxAccessibility&&this.getUI().inputBox.setAttribute("aria-activedescendant",this.getUI().list.getActiveDescendant()||"")}));const x=ir(e);return this._register(x),this._register(ho(e,Zo.FOCUS,e=>{this.previousFocusElement=e.relatedTarget instanceof HTMLElement?e.relatedTarget:void 0},!0)),this._register(x.onDidBlur(()=>{this.getUI().ignoreFocusOut||this.options.ignoreFocusOut()||this.hide(),this.previousFocusElement=void 0})),this._register(ho(e,Zo.FOCUS,e=>{u.setFocus()})),this._register(ho(e,Zo.KEY_DOWN,t=>{const i=new mn(t);switch(i.keyCode){case 3:Qo.stop(t,!0),this.onDidAcceptEmitter.fire();break;case 9:Qo.stop(t,!0),this.hide();break;case 2:if(!i.altKey&&!i.ctrlKey&&!i.metaKey){const n=[".action-label.codicon"];e.classList.contains("show-checkboxes")?n.push("input"):n.push("input[type=text]"),this.getUI().list.isDisplayed()&&n.push(".monaco-list");const o=e.querySelectorAll(n.join(", "));i.shiftKey&&i.target===o[0]?(Qo.stop(t,!0),o[o.length-1].focus()):i.shiftKey||i.target!==o[o.length-1]||(Qo.stop(t,!0),o[0].focus())}break}})),this.ui={container:e,styleSheet:t,leftActionBar:n,titleBar:i,title:r,description:a,rightActionBar:s,checkAll:c,filterContainer:d,inputBox:u,visibleCountContainer:g,visibleCount:f,countContainer:m,count:p,okContainer:_,ok:b,message:C,customButtonContainer:v,customButton:w,progressBar:y,list:S,onDidAccept:this.onDidAcceptEmitter.event,onDidCustom:this.onDidCustomEmitter.event,onDidTriggerButton:this.onDidTriggerButtonEmitter.event,ignoreFocusOut:!1,keyMods:this.keyMods,isScreenReaderOptimized:()=>this.options.isScreenReaderOptimized(),show:e=>this.show(e),hide:()=>this.hide(),setVisibilities:e=>this.setVisibilities(e),setComboboxAccessibility:e=>this.setComboboxAccessibility(e),setEnabled:e=>this.setEnabled(e),setContextKey:e=>this.options.setContextKey(e)},this.updateStyles(),this.ui}pick(e,t={},i=Ke.None){return new Promise((n,o)=>{let r=e=>{r=n,t.onKeyMods&&t.onKeyMods(s.keyMods),n(e)};if(i.isCancellationRequested)return void r(void 0);const s=this.createQuickPick();let a;const l=[s,s.onDidAccept(()=>{if(s.canSelectMany)r(s.selectedItems.slice()),s.hide();else{const e=s.activeItems[0];e&&(r(e),s.hide())}}),s.onDidChangeActive(e=>{const i=e[0];i&&t.onDidFocus&&t.onDidFocus(i)}),s.onDidChangeSelection(e=>{if(!s.canSelectMany){const t=e[0];t&&(r(t),s.hide())}}),s.onDidTriggerItemButton(e=>t.onDidTriggerItemButton&&t.onDidTriggerItemButton(Object.assign(Object.assign({},e),{removeItem:()=>{const t=s.items.indexOf(e.item);if(-1!==t){const e=s.items.slice();e.splice(t,1),s.items=e}}}))),s.onDidChangeValue(e=>{!a||e||1===s.activeItems.length&&s.activeItems[0]===a||(s.activeItems=[a])}),i.onCancellationRequested(()=>{s.hide()}),s.onDidHide(()=>{Ne(l),r(void 0)})];s.canSelectMany=!!t.canPickMany,s.placeholder=t.placeHolder,s.ignoreFocusOut=!!t.ignoreFocusLost,s.matchOnDescription=!!t.matchOnDescription,s.matchOnDetail=!!t.matchOnDetail,s.matchOnLabel=void 0===t.matchOnLabel||t.matchOnLabel,s.autoFocusOnList=void 0===t.autoFocusOnList||t.autoFocusOnList,s.quickNavigate=t.quickNavigate,s.contextKey=t.contextKey,s.busy=!0,Promise.all([e,t.activeItem]).then(([e,t])=>{a=t,s.busy=!1,s.items=e,s.canSelectMany&&(s.selectedItems=e.filter(e=>"separator"!==e.type&&e.picked)),a&&(s.activeItems=[a])}),s.show(),Promise.resolve(e).then(void 0,e=>{o(e),s.hide()})})}createQuickPick(){const e=this.getUI();return new RA(e)}show(e){const t=this.getUI();this.onShowEmitter.fire();const i=this.controller;this.controller=e,i&&i.didHide(),this.setEnabled(!0),t.leftActionBar.clear(),t.title.textContent="",t.description.textContent="",t.rightActionBar.clear(),t.checkAll.checked=!1,t.inputBox.placeholder="",t.inputBox.password=!1,t.inputBox.showDecoration(su.Ignore),t.visibleCount.setCount(0),t.count.setCount(0),t.message.textContent="",t.progressBar.stop(),t.list.setElements([]),t.list.matchOnDescription=!1,t.list.matchOnDetail=!1,t.list.matchOnLabel=!0,t.list.sortByLabel=!0,t.ignoreFocusOut=!1,this.setComboboxAccessibility(!1),t.inputBox.ariaLabel="";const n=this.options.backKeybindingLabel();OA.tooltip=n?o("quickInput.backWithKeybinding","Back ({0})",n):o("quickInput.back","Back"),t.container.style.display="",this.updateLayout(),t.inputBox.setFocus()}setVisibilities(e){const t=this.getUI();t.title.style.display=e.title?"":"none",t.description.style.display=e.description?"":"none",t.checkAll.style.display=e.checkAll?"":"none",t.filterContainer.style.display=e.inputBox?"":"none",t.visibleCountContainer.style.display=e.visibleCount?"":"none",t.countContainer.style.display=e.count?"":"none",t.okContainer.style.display=e.ok?"":"none",t.customButtonContainer.style.display=e.customButton?"":"none",t.message.style.display=e.message?"":"none",t.progressBar.getContainer().style.display=e.progressBar?"":"none",t.list.display(!!e.list),t.container.classList[e.checkAll?"add":"remove"]("show-checkboxes"),this.updateLayout()}setComboboxAccessibility(e){if(e!==this.comboboxAccessibility){const t=this.getUI();this.comboboxAccessibility=e,this.comboboxAccessibility?(t.inputBox.setAttribute("role","combobox"),t.inputBox.setAttribute("aria-haspopup","true"),t.inputBox.setAttribute("aria-autocomplete","list"),t.inputBox.setAttribute("aria-activedescendant",t.list.getActiveDescendant()||"")):(t.inputBox.removeAttribute("role"),t.inputBox.removeAttribute("aria-haspopup"),t.inputBox.removeAttribute("aria-autocomplete"),t.inputBox.removeAttribute("aria-activedescendant"))}}setEnabled(e){if(e!==this.enabled){this.enabled=e;for(const t of this.getUI().leftActionBar.viewItems)t.getAction().enabled=e;for(const t of this.getUI().rightActionBar.viewItems)t.getAction().enabled=e;this.getUI().checkAll.disabled=!e,this.getUI().ok.enabled=e,this.getUI().list.enabled=e}}hide(){var e;const t=this.controller;if(t){const i=!(null===(e=this.ui)||void 0===e?void 0:e.container.contains(document.activeElement));this.controller=null,this.onHideEmitter.fire(),this.getUI().container.style.display="none",i||(this.previousFocusElement&&this.previousFocusElement.offsetParent?(this.previousFocusElement.focus(),this.previousFocusElement=void 0):this.options.returnFocus()),t.didHide()}}layout(e,t){this.dimension=e,this.titleBarOffset=t,this.updateLayout()}updateLayout(){if(this.ui){this.ui.container.style.top=this.titleBarOffset+"px";const e=this.ui.container.style,t=Math.min(.62*this.dimension.width,PA.MAX_WIDTH);e.width=t+"px",e.marginLeft="-"+t/2+"px",this.ui.inputBox.layout(),this.ui.list.layout(this.dimension&&.4*this.dimension.height)}}applyStyles(e){this.styles=e,this.updateStyles()}updateStyles(){if(this.ui){const{quickInputTitleBackground:e,quickInputBackground:t,quickInputForeground:i,contrastBorder:n,widgetShadow:o}=this.styles.widget;this.ui.titleBar.style.backgroundColor=e?e.toString():"",this.ui.container.style.backgroundColor=t?t.toString():"",this.ui.container.style.color=i?i.toString():"",this.ui.container.style.border=n?"1px solid "+n:"",this.ui.container.style.boxShadow=o?"0 5px 8px "+o:"",this.ui.inputBox.style(this.styles.inputBox),this.ui.count.style(this.styles.countBadge),this.ui.ok.style(this.styles.button),this.ui.customButton.style(this.styles.button),this.ui.progressBar.style(this.styles.progressBar),this.ui.list.style(this.styles.list);const r=[];this.styles.list.listInactiveFocusForeground&&(r.push(`.monaco-list .monaco-list-row.focused { color: ${this.styles.list.listInactiveFocusForeground}; }`),r.push(`.monaco-list .monaco-list-row.focused:hover { color: ${this.styles.list.listInactiveFocusForeground}; }`)),this.styles.list.pickerGroupBorder&&r.push(`.quick-input-list .quick-input-list-entry { border-top-color: ${this.styles.list.pickerGroupBorder}; }`),this.styles.list.pickerGroupForeground&&r.push(`.quick-input-list .quick-input-list-separator { color: ${this.styles.list.pickerGroupForeground}; }`);const s=r.join("\n");s!==this.ui.styleSheet.innerHTML&&(this.ui.styleSheet.innerHTML=s)}}}PA.MAX_WIDTH=600;const FA=zi("quickInputService");var WA;(function(e){e[e["PRESERVE"]=0]="PRESERVE",e[e["LAST"]=1]="LAST"})(WA||(WA={}));const BA={Quickaccess:"workbench.contributions.quickaccess"};class VA{constructor(){this.providers=[],this.defaultProvider=void 0}registerQuickAccessProvider(e){return 0===e.prefix.length?this.defaultProvider=e:this.providers.push(e),this.providers.sort((e,t)=>t.prefix.length-e.prefix.length),Me(()=>{this.providers.splice(this.providers.indexOf(e),1),this.defaultProvider===e&&(this.defaultProvider=void 0)})}getQuickAccessProviders(){return Bn([this.defaultProvider,...this.providers])}getQuickAccessProvider(e){const t=e&&this.providers.find(t=>e.startsWith(t.prefix))||void 0;return t||this.defaultProvider}}mu.add(BA.Quickaccess,new VA);var HA=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},zA=function(e,t){return function(i,n){t(i,n,e)}};let UA=class extends Oe{constructor(e,t){super(),this.quickInputService=e,this.instantiationService=t,this.registry=mu.as(BA.Quickaccess),this.mapProviderToDescriptor=new Map,this.lastAcceptedPickerValues=new Map,this.visibleQuickAccess=void 0}show(e="",t){var i;const[n,o]=this.getOrInstantiateProvider(e),r=this.visibleQuickAccess,s=null===r||void 0===r?void 0:r.descriptor;if(r&&o&&s===o)return e===o.prefix||(null===t||void 0===t?void 0:t.preserveValue)||(r.picker.value=e),void this.adjustValueSelection(r.picker,o,t);if(o&&!(null===t||void 0===t?void 0:t.preserveValue)){let t=void 0;if(r&&s&&s!==o){const e=r.value.substr(s.prefix.length);e&&(t=`${o.prefix}${e}`)}if(!t){const e=null===n||void 0===n?void 0:n.defaultFilterValue;e===WA.LAST?t=this.lastAcceptedPickerValues.get(o):"string"===typeof e&&(t=`${o.prefix}${e}`)}"string"===typeof t&&(e=t)}const a=new Ie,l=a.add(this.quickInputService.createQuickPick());l.value=e,this.adjustValueSelection(l,o,t),l.placeholder=null===o||void 0===o?void 0:o.placeholder,l.quickNavigate=null===t||void 0===t?void 0:t.quickNavigateConfiguration,l.hideInput=!!l.quickNavigate&&!r,("number"===typeof(null===t||void 0===t?void 0:t.itemActivation)||(null===t||void 0===t?void 0:t.quickNavigateConfiguration))&&(l.itemActivation=null!==(i=null===t||void 0===t?void 0:t.itemActivation)&&void 0!==i?i:IO.SECOND),l.contextKey=null===o||void 0===o?void 0:o.contextKey,l.filterValue=e=>e.substring(o?o.prefix.length:0),(null===o||void 0===o?void 0:o.placeholder)&&(l.ariaLabel=null===o||void 0===o?void 0:o.placeholder);const c=this.registerPickerListeners(l,n,o,e,a);n&&a.add(n.provide(l,c)),l.show()}adjustValueSelection(e,t,i){var n;let o;o=(null===i||void 0===i?void 0:i.preserveValue)?[e.value.length,e.value.length]:[null!==(n=null===t||void 0===t?void 0:t.prefix.length)&&void 0!==n?n:0,e.value.length],e.valueSelection=o}registerPickerListeners(e,t,i,n,o){const r=this.visibleQuickAccess={picker:e,descriptor:i,value:n};o.add(Me(()=>{r===this.visibleQuickAccess&&(this.visibleQuickAccess=void 0)})),o.add(e.onDidChangeValue(e=>{const[i]=this.getOrInstantiateProvider(e);i!==t?this.show(e,{preserveValue:!0}):r.value=e})),i&&o.add(e.onDidAccept(()=>{this.lastAcceptedPickerValues.set(i,e.value)}));const s=o.add(new $e);return QS(e.onDidHide)(()=>{0===e.selectedItems.length&&s.cancel(),o.dispose()}),s.token}getOrInstantiateProvider(e){const t=this.registry.getQuickAccessProvider(e);if(!t)return[void 0,void 0];let i=this.mapProviderToDescriptor.get(t);return i||(i=this.instantiationService.createInstance(t.ctor),this.mapProviderToDescriptor.set(t,i)),[i,t]}};UA=HA([zA(0,FA),zA(1,Vi)],UA);var jA=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},KA=function(e,t){return function(i,n){t(i,n,e)}};let qA=class extends hp{constructor(e,t,i,n,o){super(i),this.instantiationService=e,this.contextKeyService=t,this.accessibilityService=n,this.layoutService=o,this.contexts=new Map}get controller(){return this._controller||(this._controller=this._register(this.createController())),this._controller}get quickAccess(){return this._quickAccess||(this._quickAccess=this._register(this.instantiationService.createInstance(UA))),this._quickAccess}createController(e=this.layoutService,t){var i,n;const o={idPrefix:"quickInput_",container:e.container,ignoreFocusOut:()=>!1,isScreenReaderOptimized:()=>this.accessibilityService.isScreenReaderOptimized(),backKeybindingLabel:()=>{},setContextKey:e=>this.setContextKey(e),returnFocus:()=>e.focus(),createList:(e,t,i,n,o)=>this.instantiationService.createInstance(OI,e,t,i,n,o),styles:this.computeStyles()},r=this._register(new PA(Object.assign(Object.assign({},o),t)));return r.layout(e.dimension,null!==(n=null===(i=e.offset)||void 0===i?void 0:i.top)&&void 0!==n?n:0),this._register(e.onLayout(t=>{var i,n;return r.layout(t,null!==(n=null===(i=e.offset)||void 0===i?void 0:i.top)&&void 0!==n?n:0)})),this._register(r.onShow(()=>this.resetContextKeys())),this._register(r.onHide(()=>this.resetContextKeys())),r}setContextKey(e){let t;e&&(t=this.contexts.get(e),t||(t=new Zf(e,!1).bindTo(this.contextKeyService),this.contexts.set(e,t))),t&&t.get()||(this.resetContextKeys(),t&&t.set(!0))}resetContextKeys(){this.contexts.forEach(e=>{e.get()&&e.reset()})}pick(e,t={},i=Ke.None){return this.controller.pick(e,t,i)}createQuickPick(){return this.controller.createQuickPick()}updateStyles(){this.controller.applyStyles(this.computeStyles())}computeStyles(){return{widget:Object.assign({},IN(this.theme,{quickInputBackground:Tw,quickInputForeground:Mw,quickInputTitleBackground:Iw,contrastBorder:jv,widgetShadow:qv})),inputBox:IN(this.theme,{inputForeground:Gv,inputBackground:$v,inputBorder:Yv,inputValidationInfoBackground:Xv,inputValidationInfoForeground:Zv,inputValidationInfoBorder:Qv,inputValidationWarningBackground:Jv,inputValidationWarningForeground:ew,inputValidationWarningBorder:tw,inputValidationErrorBackground:iw,inputValidationErrorForeground:nw,inputValidationErrorBorder:ow}),countBadge:IN(this.theme,{badgeBackground:hw,badgeForeground:dw,badgeBorder:jv}),button:IN(this.theme,{buttonForeground:aw,buttonBackground:lw,buttonHoverBackground:cw,buttonBorder:jv}),progressBar:IN(this.theme,{progressBarBackground:pw}),list:IN(this.theme,{listBackground:Tw,listInactiveFocusForeground:Xw,listInactiveFocusBackground:Yw,listFocusOutline:Kv,listInactiveFocusOutline:Kv,pickerGroupBorder:Aw,pickerGroupForeground:Ow})}}};qA=jA([KA(0,Vi),KA(1,Qf),KA(2,ep),KA(3,jL),KA(4,zN)],qA);var $A=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},GA=function(e,t){return function(i,n){t(i,n,e)}};let YA=class extends qA{constructor(e,t,i,n,o,r){super(t,i,n,o,r),this.host=void 0;const s=ZA.get(e);this.host={_serviceBrand:void 0,get container(){return s.widget.getDomNode()},get dimension(){return e.getLayoutInfo()},get onLayout(){return e.onDidLayoutChange},focus:()=>e.focus()}}createController(){return super.createController(this.host)}};YA=$A([GA(1,Vi),GA(2,Qf),GA(3,ep),GA(4,jL),GA(5,zN)],YA);let XA=class{constructor(e,t){this.instantiationService=e,this.codeEditorService=t,this.mapEditorToService=new Map}get activeService(){const e=this.codeEditorService.getFocusedCodeEditor();if(!e)throw new Error("Quick input service needs a focused editor to work.");let t=this.mapEditorToService.get(e);if(!t){const i=t=this.instantiationService.createInstance(YA,e);this.mapEditorToService.set(e,t),QS(e.onDidDispose)(()=>{i.dispose(),this.mapEditorToService.delete(e)})}return t}get quickAccess(){return this.activeService.quickAccess}pick(e,t={},i=Ke.None){return this.activeService.pick(e,t,i)}createQuickPick(){return this.activeService.createQuickPick()}};XA=$A([GA(0,Vi),GA(1,ji)],XA);class ZA{constructor(e){this.editor=e,this.widget=new QA(this.editor)}static get(e){return e.getContribution(ZA.ID)}dispose(){this.widget.dispose()}}ZA.ID="editor.controller.quickInput";class QA{constructor(e){this.codeEditor=e,this.domNode=document.createElement("div"),this.codeEditor.addOverlayWidget(this)}getId(){return QA.ID}getDomNode(){return this.domNode}getPosition(){return{preference:2}}dispose(){this.codeEditor.removeOverlayWidget(this)}}QA.ID="editor.contrib.quickInputWidget",_m(ZA.ID,ZA);const JA=zi("IStorageKeysSyncRegistryService");class eR extends Oe{constructor(){super(),this._storageKeys=new Map,this._onDidChangeStorageKeys=this._register(new Ve),this._register(Me(()=>this._storageKeys.clear()))}get storageKeys(){return[...this._storageKeys.values()]}registerStorageKey(e){this._storageKeys.has(e.key)||(this._storageKeys.set(e.key,e),this._onDidChangeStorageKeys.fire(this.storageKeys))}}var tR;(function(e){const t=new UL;class i{constructor(e,t){this._serviceId=e,this._factory=t,this._value=null}get id(){return this._serviceId}get(e){if(!this._value){if(e&&(this._value=e[this._serviceId.toString()]),this._value||(this._value=this._factory(e)),!this._value)throw new Error("Service "+this._serviceId+" is missing!");t.set(this._serviceId,this._value)}return this._value}}e.LazyStaticService=i;let n=[];function o(e,t){let o=new i(e,t);return n.push(o),o}function r(e){let t=new UL;for(const[n,o]of Tk())t.set(n,o);for(let n in e)e.hasOwnProperty(n)&&t.set(zi(n),e[n]);n.forEach(i=>t.set(i.id,i.get(e)));let i=new ZN(t,!0);return t.set(Vi,i),[t,i]}e.init=r,e.instantiationService=o(Vi,()=>new ZN(t,!0));const s=new of;e.configurationService=o(ig,()=>s),e.resourceConfigurationService=o(Rh,()=>new rf(s)),e.resourcePropertiesService=o(Ph,()=>new sf(s)),e.contextService=o(Ig,()=>new lf),e.labelService=o(JN,()=>new df),e.telemetryService=o(cm,()=>new af),e.dialogService=o(qN,()=>new Qg),e.notificationService=o(Tg,()=>new Jg),e.markerService=o(GI,()=>new ZI),e.modeService=o(IE,e=>new QE),e.standaloneThemeService=o(yE,()=>new iN),e.logService=o(Fh,()=>new Hh),e.undoRedoService=o(JE,t=>new NO(e.dialogService.get(t),e.notificationService.get(t))),e.modelService=o(aa,t=>new dD(e.configurationService.get(t),e.resourcePropertiesService.get(t),e.standaloneThemeService.get(t),e.logService.get(t),e.undoRedoService.get(t))),e.markerDecorationsService=o(rO,t=>new hO(e.modelService.get(t),e.markerService.get(t))),e.codeEditorService=o(ji,t=>new ND(e.standaloneThemeService.get(t))),e.editorProgressService=o(iE,()=>new Zg),e.storageService=o(QI,()=>new eO),e.storageSyncService=o(JA,()=>new eR),e.editorWorkerService=o(Jl,t=>new Xh(e.modelService.get(t),e.resourceConfigurationService.get(t),e.logService.get(t)))})(tR||(tR={}));class iR extends Oe{constructor(e,t){super();const[i,n]=tR.init(t);this._serviceCollection=i,this._instantiationService=n;const o=this.get(ig),r=this.get(Tg),s=this.get(cm),a=this.get(ep),l=this.get(Fh);let c=(e,i)=>{let n=null;return t&&(n=t[e.toString()]),n||(n=i()),this._serviceCollection.set(e,n),n},h=c(Qf,()=>this._register(new fN(o)));c(jL,()=>new gO(h,o)),c(hI,()=>new dI(a));let d=c(qr,()=>new ef(this._instantiationService)),u=c(SE,()=>this._register(new tf(h,d,s,r,l,e))),g=c(zN,()=>new uf(tR.codeEditorService.get(ji),e));c(FA,()=>new XA(n,tR.codeEditorService.get(ji)));let f=c(Xk,()=>this._register(new KN(g)));c(eE,()=>new mO),c(Zk,()=>{const e=new HN(s,r,f,u,a);return e.configure({blockMouse:!1}),this._register(e)}),c(om,()=>new nO(d)),c(lu,()=>new hf(tR.modelService.get(aa)))}get(e){let t=this._serviceCollection.get(e);if(!t)throw new Error("Missing service "+e);return t}set(e,t){this._serviceCollection.set(e,t)}has(e){return this._serviceCollection.has(e)}}function nR(e,t,i){let n=new iR(e,t),o=null;n.has(ec)||(o=new Xg(tR.modelService.get()),n.set(ec,o)),n.has(Yr)||n.set(Yr,new ns(n.get(ji),n.get(qr)));let r=i(n);return o&&o.setEditor(r),r}function oR(e,t,i){return nR(e,i||{},i=>new TE(e,t,i,i.get(Vi),i.get(ji),i.get(qr),i.get(Qf),i.get(SE),i.get(Xk),i.get(yE),i.get(Tg),i.get(ig),i.get(jL)))}function rR(e){return tR.codeEditorService.get().onCodeEditorAdd(t=>{e(t)})}function sR(e,t,i){return nR(e,i||{},i=>new ME(e,t,i,i.get(Vi),i.get(Qf),i.get(SE),i.get(Xk),i.get(Jl),i.get(ji),i.get(yE),i.get(Tg),i.get(ig),i.get(Zk),i.get(iE),i.get(eE)))}function aR(e,t){return new gs(e,t)}function lR(e,t,i){return tR.modelService.get().createModel(e,t,i)}function cR(e,t,i){if(e=e||"",!t){let t=e.indexOf("\n"),n=e;return-1!==t&&(n=e.substring(0,t)),lR(e,tR.modeService.get().createByFilepathOrFirstLine(i||null,n),i)}return lR(e,tR.modeService.get().create(t),i)}function hR(e,t){tR.modelService.get().setMode(e,tR.modeService.get().create(t))}function dR(e,t,i){e&&tR.markerService.get().changeOne(t,e.uri,i)}function uR(e){return tR.markerService.get().read(e)}function gR(e){return tR.modelService.get().getModel(e)}function fR(){return tR.modelService.get().getModels()}function mR(e){return tR.modelService.get().onModelAdded(e)}function pR(e){return tR.modelService.get().onModelRemoved(e)}function _R(e){return tR.modelService.get().onModelModeChanged(t=>{e({model:t.model,oldLanguage:t.oldModeId})})}function bR(e){return nd(tR.modelService.get(),e)}function vR(e,t){const i=tR.standaloneThemeService.get();return i.registerEditorContainer(e),tu.colorizeElement(i,tR.modeService.get(),e,t)}function wR(e,t,i){const n=tR.standaloneThemeService.get();return n.registerEditorContainer(document.body),tu.colorize(tR.modeService.get(),e,t,i)}function CR(e,t,i=4){const n=tR.standaloneThemeService.get();return n.registerEditorContainer(document.body),tu.colorizeModelLine(e,t,i)}function yR(e){let t=Kl.get(e);return t||{getInitialState:()=>$l,tokenize:(t,i,n)=>Xl(e,t,i,n)}}function SR(e,t){let i=tR.modeService.get();i.triggerMode(t);let n=yR(t),o=e.split(/\r\n|\r|\n/),r=[],s=n.getInitialState();for(let a=0,l=o.length;a<l;a++){let e=o[a],t=n.tokenize(e,s,0);r[a]=t.tokens,s=t.endState}return r}function xR(e,t){tR.standaloneThemeService.get().defineTheme(e,t)}function LR(e){tR.standaloneThemeService.get().setTheme(e)}function kR(){Ef()}function ER(){return{create:oR,onDidCreateEditor:rR,createDiffEditor:sR,createDiffNavigator:aR,createModel:cR,setModelLanguage:hR,setModelMarkers:dR,getModelMarkers:uR,getModels:fR,getModel:gR,onDidCreateModel:mR,onWillDisposeModel:pR,onDidChangeModelLanguage:_R,createWebWorker:bR,colorizeElement:vR,colorize:wR,colorizeModelLine:CR,tokenize:SR,defineTheme:xR,setTheme:LR,remeasureFonts:kR,AccessibilitySupport:oi,ContentWidgetPositionPreference:ci,CursorChangeReason:hi,DefaultEndOfLine:di,EditorAutoIndentStrategy:gi,EditorOption:fi,EndOfLinePreference:mi,EndOfLineSequence:pi,MinimapPosition:Ci,MouseTargetType:yi,OverlayWidgetPositionPreference:Si,OverviewRulerLane:xi,RenderLineNumbersType:Li,RenderMinimap:ki,ScrollbarVisibility:Di,ScrollType:Ei,TextEditorCursorBlinkingStyle:Oi,TextEditorCursorStyle:Ai,TrackedRangeStickiness:Ri,WrappingIndent:Pi,ConfigurationChangedEvent:f,BareFontInfo:_s,FontInfo:bs,TextModelResolvedOptions:Ss,FindMatch:xs,EditorType:ws,EditorOptions:ue}}function DR(e,t){if(!t)return!1;if(!Array.isArray(t))return!1;for(const i of t)if(!e(i))return!1;return!0}function NR(e,t){return"boolean"===typeof e?e:t}function TR(e,t){return"string"===typeof e?e:t}function MR(e){const t={};for(const i of e)t[i]=!0;return t}function IR(e,t=!1){t&&(e=e.map((function(e){return e.toLowerCase()})));const i=MR(e);return t?function(e){return void 0!==i[e.toLowerCase()]&&i.hasOwnProperty(e.toLowerCase())}:function(e){return void 0!==i[e]&&i.hasOwnProperty(e)}}function OR(e,t){let i=0;while(t.indexOf("@")>=0&&i<5)i++,t=t.replace(/@(\w+)/g,(function(i,n){let o="";if("string"===typeof e[n])o=e[n];else{if(!(e[n]&&e[n]instanceof RegExp))throw void 0===e[n]?Vd(e,"language definition does not contain attribute '"+n+"', used at: "+t):Vd(e,"attribute reference '"+n+"' must be a string, used at: "+t);o=e[n].source}return Pd(o)?"":"(?:"+o+")"}));let n=(e.ignoreCase?"i":"")+(e.unicode?"u":"");return new RegExp(t,n)}function AR(e,t,i,n){if(n<0)return e;if(n<t.length)return t[n];if(n>=100){n-=100;let e=i.split(".");if(e.unshift(i),n<e.length)return e[n]}return null}function RR(e,t,i,n){let o=-1,r=i,s=i.match(/^\$(([sS]?)(\d\d?)|#)(.*)$/);s&&(s[3]&&(o=parseInt(s[3]),s[2]&&(o+=100)),r=s[4]);let a,l="~",c=r;if(r&&0!==r.length?/^\w*$/.test(c)?l="==":(s=r.match(/^(@|!@|~|!~|==|!=)(.*)$/),s&&(l=s[1],c=s[2])):(l="!=",c=""),"~"!==l&&"!~"!==l||!/^(\w|\|)*$/.test(c))if("@"===l||"!@"===l){let i=e[c];if(!i)throw Vd(e,"the @ match target '"+c+"' is not defined, in rule: "+t);if(!DR((function(e){return"string"===typeof e}),i))throw Vd(e,"the @ match target '"+c+"' must be an array of strings, in rule: "+t);let n=IR(i,e.ignoreCase);a=function(e){return"@"===l?n(e):!n(e)}}else if("~"===l||"!~"===l)if(c.indexOf("$")<0){let t=OR(e,"^"+c+"$");a=function(e){return"~"===l?t.test(e):!t.test(e)}}else a=function(t,i,n,o){let r=OR(e,"^"+Hd(e,c,i,n,o)+"$");return r.test(t)};else if(c.indexOf("$")<0){let t=Fd(e,c);a=function(e){return"=="===l?e===t:e!==t}}else{let t=Fd(e,c);a=function(i,n,o,r,s){let a=Hd(e,t,n,o,r);return"=="===l?i===a:i!==a}}else{let t=IR(c.split("|"),e.ignoreCase);a=function(e){return"~"===l?t(e):!t(e)}}return-1===o?{name:i,value:n,test:function(e,t,i,n){return a(e,e,t,i,n)}}:{name:i,value:n,test:function(e,t,i,n){let r=AR(e,t,i,o);return a(r||"",e,t,i,n)}}}function PR(e,t,i){if(i){if("string"===typeof i)return i;if(i.token||""===i.token){if("string"!==typeof i.token)throw Vd(e,"a 'token' attribute must be of type string, in rule: "+t);{let n={token:i.token};if(i.token.indexOf("$")>=0&&(n.tokenSubst=!0),"string"===typeof i.bracket)if("@open"===i.bracket)n.bracket=1;else{if("@close"!==i.bracket)throw Vd(e,"a 'bracket' attribute must be either '@open' or '@close', in rule: "+t);n.bracket=-1}if(i.next){if("string"!==typeof i.next)throw Vd(e,"the next state must be a string value in rule: "+t);{let o=i.next;if(!/^(@pop|@push|@popall)$/.test(o)&&("@"===o[0]&&(o=o.substr(1)),o.indexOf("$")<0&&!Ud(e,Hd(e,o,"",[],""))))throw Vd(e,"the next state '"+i.next+"' is not defined in rule: "+t);n.next=o}}return"number"===typeof i.goBack&&(n.goBack=i.goBack),"string"===typeof i.switchTo&&(n.switchTo=i.switchTo),"string"===typeof i.log&&(n.log=i.log),"string"===typeof i.nextEmbedded&&(n.nextEmbedded=i.nextEmbedded,e.usesEmbedded=!0),n}}if(Array.isArray(i)){let n=[];for(let o=0,r=i.length;o<r;o++)n[o]=PR(e,t,i[o]);return{group:n}}if(i.cases){let n=[];for(let r in i.cases)if(i.cases.hasOwnProperty(r)){const o=PR(e,t,i.cases[r]);"@default"===r||"@"===r||""===r?n.push({test:void 0,value:o,name:r}):"@eos"===r?n.push({test:function(e,t,i,n){return n},value:o,name:r}):n.push(RR(e,t,r,o))}const o=e.defaultToken;return{test:function(e,t,i,r){for(const o of n){const n=!o.test||o.test(e,t,i,r);if(n)return o.value}return o}}}throw Vd(e,"an action must be a string, an object with a 'token' or 'cases' attribute, or an array of actions; in rule: "+t)}return{token:""}}class FR{constructor(e){this.regex=new RegExp(""),this.action={token:""},this.matchOnlyAtLineStart=!1,this.name="",this.name=e}setRegex(e,t){let i;if("string"===typeof t)i=t;else{if(!(t instanceof RegExp))throw Vd(e,"rules must start with a match string or regular expression: "+this.name);i=t.source}this.matchOnlyAtLineStart=i.length>0&&"^"===i[0],this.name=this.name+": "+i,this.regex=OR(e,"^(?:"+(this.matchOnlyAtLineStart?i.substr(1):i)+")")}setAction(e,t){this.action=PR(e,this.name,t)}}function WR(e,t){if(!t||"object"!==typeof t)throw new Error("Monarch: expecting a language definition object");let i={};i.languageId=e,i.noThrow=!1,i.maxStack=100,i.start="string"===typeof t.start?t.start:null,i.ignoreCase=NR(t.ignoreCase,!1),i.unicode=NR(t.unicode,!1),i.tokenPostfix=TR(t.tokenPostfix,"."+i.languageId),i.defaultToken=TR(t.defaultToken,"source"),i.usesEmbedded=!1;let n=t;function o(e,r,s){for(const a of s){let s=a.include;if(s){if("string"!==typeof s)throw Vd(i,"an 'include' attribute must be a string at: "+e);if("@"===s[0]&&(s=s.substr(1)),!t.tokenizer[s])throw Vd(i,"include target '"+s+"' is not defined at: "+e);o(e+"."+s,r,t.tokenizer[s])}else{const t=new FR(e);if(Array.isArray(a)&&a.length>=1&&a.length<=3)if(t.setRegex(n,a[0]),a.length>=3)if("string"===typeof a[1])t.setAction(n,{token:a[1],next:a[2]});else{if("object"!==typeof a[1])throw Vd(i,"a next state as the last element of a rule can only be given if the action is either an object or a string, at: "+e);{const e=a[1];e.next=a[2],t.setAction(n,e)}}else t.setAction(n,a[1]);else{if(!a.regex)throw Vd(i,"a rule must either be an array, or an object with a 'regex' or 'include' field at: "+e);a.name&&"string"===typeof a.name&&(t.name=a.name),a.matchOnlyAtStart&&(t.matchOnlyAtLineStart=NR(a.matchOnlyAtLineStart,!1)),t.setRegex(n,a.regex),t.setAction(n,a.action)}r.push(t)}}}if(n.languageId=e,n.ignoreCase=i.ignoreCase,n.unicode=i.unicode,n.noThrow=i.noThrow,n.usesEmbedded=i.usesEmbedded,n.stateNames=t.tokenizer,n.defaultToken=i.defaultToken,!t.tokenizer||"object"!==typeof t.tokenizer)throw Vd(i,"a language definition must define the 'tokenizer' attribute as an object");i.tokenizer=[];for(let s in t.tokenizer)if(t.tokenizer.hasOwnProperty(s)){i.start||(i.start=s);const e=t.tokenizer[s];i.tokenizer[s]=new Array,o("tokenizer."+s,i.tokenizer[s],e)}if(i.usesEmbedded=n.usesEmbedded,t.brackets){if(!Array.isArray(t.brackets))throw Vd(i,"the 'brackets' attribute must be defined as an array")}else t.brackets=[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}];let r=[];for(let s of t.brackets){let e=s;if(e&&Array.isArray(e)&&3===e.length&&(e={token:e[2],open:e[0],close:e[1]}),e.open===e.close)throw Vd(i,"open and close brackets in a 'brackets' attribute must be different: "+e.open+"\n hint: use the 'bracket' attribute if matching on equal brackets is required.");if("string"!==typeof e.open||"string"!==typeof e.token||"string"!==typeof e.close)throw Vd(i,"every element in the 'brackets' array must be a '{open,close,token}' object or array");r.push({token:e.token+i.tokenPostfix,open:Fd(i,e.open),close:Fd(i,e.close)})}return i.brackets=r,i.noThrow=!0,i}function BR(e){qE.registerLanguage(e)}function VR(){let e=[];return e=e.concat(qE.getLanguages()),e}function HR(e){let t=tR.modeService.get().getLanguageIdentifier(e);return t?t.id:0}function zR(e,t){let i=tR.modeService.get().onDidCreateMode(n=>{n.getId()===e&&(i.dispose(),t())});return i}function UR(e,t){let i=tR.modeService.get().getLanguageIdentifier(e);if(!i)throw new Error("Cannot set configuration for unknown language "+e);return Kc.register(i,t)}class jR{constructor(e){this._actual=e}getInitialState(){return this._actual.getInitialState()}tokenize(e,t,i){throw new Error("Not supported!")}tokenize2(e,t){let i=this._actual.tokenizeEncoded(e,t);return new ni(i.tokens,i.endState)}}class KR{constructor(e,t,i){this._standaloneThemeService=e,this._languageIdentifier=t,this._actual=i}getInitialState(){return this._actual.getInitialState()}_toClassicTokens(e,t,i){let n=[],o=0;for(let r=0,s=e.length;r<s;r++){const s=e[r];let a=s.startIndex;0===r?a=0:a<o&&(a=o),n[r]=new ti(a+i,s.scopes,t),o=a}return n}tokenize(e,t,i){let n,o=this._actual.tokenize(e,t),r=this._toClassicTokens(o.tokens,this._languageIdentifier.language,i);return n=o.endState.equals(t)?t:o.endState,new ii(r,n)}_toBinaryTokens(e,t){const i=this._languageIdentifier.id,n=this._standaloneThemeService.getColorTheme().tokenTheme;let o=[],r=0,s=0;for(let l=0,c=e.length;l<c;l++){const a=e[l],c=n.match(i,a.scopes);if(r>0&&o[r-1]===c)continue;let h=a.startIndex;0===l?h=0:h<s&&(h=s),o[r++]=h+t,o[r++]=c,s=h}let a=new Uint32Array(r);for(let l=0;l<r;l++)a[l]=o[l];return a}tokenize2(e,t,i){let n,o=this._actual.tokenize(e,t),r=this._toBinaryTokens(o.tokens,i);return n=o.endState.equals(t)?t:o.endState,new ni(r,n)}}function qR(e){return"tokenizeEncoded"in e}function $R(e){return e&&"function"===typeof e.then}function GR(e,t){let i=tR.modeService.get().getLanguageIdentifier(e);if(!i)throw new Error("Cannot set tokens provider for unknown language "+e);const n=e=>qR(e)?new jR(e):new KR(tR.standaloneThemeService.get(),i,e);return $R(t)?Kl.registerPromise(e,t.then(e=>n(e))):Kl.register(e,n(t))}function YR(e,t){const i=t=>eu(tR.modeService.get(),tR.standaloneThemeService.get(),e,WR(e,t));return $R(t)?Kl.registerPromise(e,t.then(e=>i(e))):Kl.register(e,i(t))}function XR(e,t){return yl.register(e,t)}function ZR(e,t){return Sl.register(e,t)}function QR(e,t){return Ll.register(e,t)}function JR(e,t){return kl.register(e,{provideHover:(e,i,n)=>{let o=e.getWordAtPosition(i);return Promise.resolve(t.provideHover(e,i,n)).then(e=>{if(e)return!e.range&&o&&(e.range=new Jt(i.lineNumber,o.startColumn,i.lineNumber,o.endColumn)),e.range||(e.range=new Jt(i.lineNumber,i.column,i.lineNumber,i.column)),e})}})}function eP(e,t){return El.register(e,t)}function tP(e,t){return Dl.register(e,t)}function iP(e,t){return Nl.register(e,t)}function nP(e,t){return Tl.register(e,t)}function oP(e,t){return Il.register(e,t)}function rP(e,t){return Ol.register(e,t)}function sP(e,t){return Al.register(e,t)}function aP(e,t){return Rl.register(e,{provideCodeActions:(e,i,n,o)=>{let r=tR.markerService.get().read({resource:e.uri}).filter(e=>Jt.areIntersectingOrTouching(e,i));return t.provideCodeActions(e,i,{markers:r,only:n.only},o)}})}function lP(e,t){return Pl.register(e,t)}function cP(e,t){return Fl.register(e,t)}function hP(e,t){return Wl.register(e,t)}function dP(e,t){return Bl.register(e,t)}function uP(e,t){return xl.register(e,t)}function gP(e,t){return Vl.register(e,t)}function fP(e,t){return zl.register(e,t)}function mP(e,t){return Ml.register(e,t)}function pP(e,t){return Hl.register(e,t)}function _P(e,t){return Ul.register(e,t)}function bP(e,t){return jl.register(e,t)}function vP(){return{register:BR,getLanguages:VR,onLanguage:zR,getEncodedLanguageId:HR,setLanguageConfiguration:UR,setTokensProvider:GR,setMonarchTokensProvider:YR,registerReferenceProvider:XR,registerRenameProvider:ZR,registerCompletionItemProvider:uP,registerSignatureHelpProvider:QR,registerHoverProvider:JR,registerDocumentSymbolProvider:eP,registerDocumentHighlightProvider:tP,registerOnTypeRenameProvider:iP,registerDefinitionProvider:nP,registerImplementationProvider:oP,registerTypeDefinitionProvider:rP,registerCodeLensProvider:sP,registerCodeActionProvider:aP,registerDocumentFormattingEditProvider:lP,registerDocumentRangeFormattingEditProvider:cP,registerOnTypeFormattingEditProvider:hP,registerLinkProvider:dP,registerColorProvider:gP,registerFoldingRangeProvider:fP,registerDeclarationProvider:mP,registerSelectionRangeProvider:pP,registerDocumentSemanticTokensProvider:_P,registerDocumentRangeSemanticTokensProvider:bP,DocumentHighlightKind:ui,CompletionItemKind:si,CompletionItemTag:ai,CompletionItemInsertTextRule:ri,SymbolKind:Mi,SymbolTag:Ii,IndentAction:_i,CompletionTriggerKind:li,SignatureHelpTriggerKind:Ti,FoldingRangeKind:Cl}}const wP=self;ue.wrappingIndent.defaultValue=0,ue.glyphMargin.defaultValue=!1,ue.autoIndent.defaultValue=3,ue.overviewRulerLanes.defaultValue=2;const CP=Wi();CP.editor=ER(),CP.languages=vP();const yP=CP.CancellationTokenSource,SP=CP.Emitter,xP=CP.KeyCode,LP=CP.KeyMod,kP=CP.Position,EP=CP.Range,DP=CP.Selection,NP=CP.SelectionDirection,TP=CP.MarkerSeverity,MP=CP.MarkerTag,IP=CP.Uri,OP=CP.Token,AP=CP.editor,RP=CP.languages;wP.monaco=CP,"undefined"!==typeof wP.require&&"function"===typeof wP.require.config&&wP.require.config({ignoreDuplicateModules:["vscode-languageserver-types","vscode-languageserver-types/main","vscode-languageserver-textdocument","vscode-languageserver-textdocument/main","vscode-nls","vscode-nls/vscode-nls","jsonc-parser","jsonc-parser/main","vscode-uri","vscode-uri/index","vs/basic-languages/typescript/typescript"]})},"7f17":function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}},"7f36":function(e,t,i){"use strict";var n=i("7eca");i.d(t,"a",(function(){return n["languages"]}))},"7f82":function(e,t,i){var n=i("eee7");e.exports=function(e,t){if(!n(e))return e;var i,o;if(t&&"function"==typeof(i=e.toString)&&!n(o=i.call(e)))return o;if("function"==typeof(i=e.valueOf)&&!n(o=i.call(e)))return o;if(!t&&"function"==typeof(i=e.toString)&&!n(o=i.call(e)))return o;throw TypeError("Can't convert object to primitive value")}},"80db":function(e,t){var i=Math.ceil,n=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?n:i)(e)}},8120:function(e,t,i){"use strict";var n=i("83ec"),o=i("3395").trim,r=i("c55c");n({target:"String",proto:!0,forced:r("trim")},{trim:function(){return o(this)}})},"826e":function(e,t,i){"use strict";i.d(t,"a",(function(){return h}));i("eb46"),i("2c50"),i("9bf1"),i("d927"),i("ef61"),i("fa89"),i("2eb0"),i("f05e"),i("b485"),i("a8de"),i("7352"),i("8120"),i("f96e"),i("b13d");var n,o,r,s=i("5491"),a=/[\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,l=/^[a-zA-Z_$][0-9a-zA-Z_$]*$/,c={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"'":"\\'","\\":"\\\\"};function h(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t.space||2,n=0!=t.dropQuotesOnKeys,o=t.dropQuotesOnNumbers||!1,r=t.inlineShortArrays||!1,s=t.inlineShortArraysDepth||1,a=t.quoteType||"single",l=t.minify||!1;o&&d(e);var c=f(e,null,l?void 0:i,n,a);if(r&&!l){var h=g(c);if(s>1)for(var u=1;u<s;u++)if(c=h,h=g(c),h==c)break;c=h}return c}function d(e){if(u(e)){var t=Object.keys(e);t&&t.forEach((function(t){var i=e[t];if("string"==typeof i){var n=i-0;e[t]=isNaN(n)?i:n}else(u(i)||Array.isArray(i))&&d(i)}))}}function u(e){return e&&"object"==Object(s["a"])(e)}function g(e,t){if(t||(t=80),"number"!=typeof t||t<20)throw"Invalid width '"+t+"'. Expecting number equal or larger than 20.";var i=e.split("\n"),n=0,o=null,r=[];while(n<i.length){var s=!!i[n].match(/\[/),a=!!i[n].match(/\],?/);if(s&&!a)r=[i[n]],o=n;else if(a&&!s&&o){r.push((i[n]||"").trim());var l=r.join(" ");l.length<t&&(i.splice(o,n-o+1,l),n=o),o=null,r=[]}else o&&r.push((i[n]||"").trim());n+=1}return i.join("\n")}function f(e,t,i,a,l){var c;if(n="",o="","number"===typeof i)for(c=0;c<i;c+=1)o+=" ";else"string"===typeof i&&(o=i);if(r=t,t&&"function"!==typeof t&&("object"!==Object(s["a"])(t)||"number"!==typeof t.length))throw new Error("JSON.stringify");return m("",{"":e},a,l)}function m(e,t,i,a){var l,c,h,d,u,g=n,f=t[e];switch(f&&"object"===Object(s["a"])(f)&&"function"===typeof f.toJSON&&(f=f.toJSON(e)),"function"===typeof r&&(f=r.call(t,e,f)),Object(s["a"])(f)){case"function":return f;case"string":return p(f,a);case"number":return isFinite(f)?String(f):"null";case"boolean":case"null":return String(f);case"object":if(!f)return"null";if(n+=o,u=[],"[object Array]"===Object.prototype.toString.apply(f)){for(d=f.length,l=0;l<d;l+=1)u[l]=m(l,f,i,a)||"null";return h=0===u.length?"[]":n?"[\n"+n+u.join(",\n"+n)+"\n"+g+"]":"["+u.join(",")+"]",n=g,h}if(r&&"object"===Object(s["a"])(r))for(d=r.length,l=0;l<d;l+=1)"string"===typeof r[l]&&(c=r[l],h=m(c,f,i,a),h&&u.push((i?_(c,a):p(c,a))+(n?": ":":")+h));else for(c in f)Object.prototype.hasOwnProperty.call(f,c)&&(h=m(c,f,i,a),h&&u.push((i?_(c,a):p(c,a))+(n?": ":":")+h));return h=0===u.length?"{}":n?"{\n"+n+u.join(",\n"+n)+"\n"+g+"}":"{"+u.join(",")+"}",n=g,h}}function p(e,t){a.lastIndex=0;var i='"';return"single"===t&&(i="'"),a.test(e)?i+e.replace(a,(function(e){var t=c[e];return"string"===typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)}))+i:i+e+i}function _(e,t){return l.test(e)?e:p(e,t)}},"83ec":function(e,t,i){var n=i("e244"),o=i("42b1").f,r=i("69f1"),s=i("7d86"),a=i("72c7"),l=i("8c42"),c=i("a056");e.exports=function(e,t){var i,h,d,u,g,f,m=e.target,p=e.global,_=e.stat;if(h=p?n:_?n[m]||a(m,{}):(n[m]||{}).prototype,h)for(d in t){if(g=t[d],e.noTargetGet?(f=o(h,d),u=f&&f.value):u=h[d],i=c(p?d:m+(_?".":"#")+d,e.forced),!i&&void 0!==u){if(typeof g===typeof u)continue;l(g,u)}(e.sham||u&&u.sham)&&r(g,"sham",!0),s(h,d,g,e)}}},"84f7":function(e,t,i){var n=i("55ab"),o=i("b896").f,r=Function.prototype,s=r.toString,a=/^\s*function ([^ (]*)/,l="name";n&&!(l in r)&&o(r,l,{configurable:!0,get:function(){try{return s.call(this).match(a)[1]}catch(e){return""}}})},"863c":function(e,t,i){"use strict";i.d(t,"a",(function(){return r}));i("c225"),i("37fd"),i("eb46"),i("7e50"),i("2c69"),i("ef61"),i("f96e");function n(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function o(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function r(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?o(Object(i),!0).forEach((function(t){n(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):o(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}},"88cb":function(e,t,i){var n=i("1ffd");"string"===typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);var o=i("4974").default;o("58a21d71",n,!0,{sourceMap:!1,shadowMode:!1})},"8a56":function(e,t,i){var n=i("c0db");"string"===typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);var o=i("4974").default;o("c96a2cea",n,!0,{sourceMap:!1,shadowMode:!1})},"8aa3":function(e,t,i){var n=i("d6ed"),o=i("b4fd"),r=i("c673"),s=i("ce47"),a=i("f152"),l=[].push,c=function(e){var t=1==e,i=2==e,c=3==e,h=4==e,d=6==e,u=5==e||d;return function(g,f,m,p){for(var _,b,v=r(g),w=o(v),C=n(f,m,3),y=s(w.length),S=0,x=p||a,L=t?x(g,y):i?x(g,0):void 0;y>S;S++)if((u||S in w)&&(_=w[S],b=C(_,S,v),e))if(t)L[S]=b;else if(b)switch(e){case 3:return!0;case 5:return _;case 6:return S;case 2:l.call(L,_)}else if(h)return!1;return d?-1:c||h?h:L}};e.exports={forEach:c(0),map:c(1),filter:c(2),some:c(3),every:c(4),find:c(5),findIndex:c(6)}},"8c32":function(e,t,i){var n=i("e09a");"string"===typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);var o=i("4974").default;o("bbcfab50",n,!0,{sourceMap:!1,shadowMode:!1})},"8c42":function(e,t,i){var n=i("fe32"),o=i("c1ca"),r=i("42b1"),s=i("b896");e.exports=function(e,t){for(var i=o(t),a=s.f,l=r.f,c=0;c<i.length;c++){var h=i[c];n(e,h)||a(e,h,l(t,h))}}},"8d60":function(e,t,i){"use strict";var n=i("83ec"),o=i("8aa3").map,r=i("72d4"),s=i("9f1e"),a=r("map"),l=s("map");n({target:"Array",proto:!0,forced:!a||!l},{map:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}})},"8dab":function(e,t,i){var n=i("53c2");t=n(!1),t.push([e.i,".monaco-list{position:relative;height:100%;width:100%;white-space:nowrap}.monaco-list.mouse-support{-moz-user-select:none;user-select:none;-webkit-user-select:none;-ms-user-select:none}.monaco-list>.monaco-scrollable-element{height:100%}.monaco-list-rows{position:relative;width:100%;height:100%}.monaco-list.horizontal-scrolling .monaco-list-rows{width:auto;min-width:100%}.monaco-list-row{position:absolute;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden;width:100%}.monaco-list.mouse-support .monaco-list-row{cursor:pointer;-ms-touch-action:none;touch-action:none}.monaco-list-row.scrolling{display:none!important}.monaco-list.element-focused,.monaco-list.selection-multiple,.monaco-list.selection-single{outline:0!important}.monaco-list:focus .monaco-list-row.selected .codicon{color:inherit}.monaco-drag-image{display:inline-block;padding:1px 7px;border-radius:10px;font-size:12px;position:absolute}.monaco-list-type-filter{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;position:absolute;border-radius:2px;padding:0 3px;max-width:calc(100% - 10px);text-overflow:ellipsis;overflow:hidden;text-align:right;-webkit-box-sizing:border-box;box-sizing:border-box;cursor:all-scroll;font-size:13px;line-height:18px;height:20px;z-index:1;top:4px}.monaco-list-type-filter.dragging{-webkit-transition:top .2s,left .2s;transition:top .2s,left .2s}.monaco-list-type-filter.ne{right:4px}.monaco-list-type-filter.nw{left:4px}.monaco-list-type-filter>.controls{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-transition:width .2s;transition:width .2s;width:0}.monaco-list-type-filter.dragging>.controls,.monaco-list-type-filter:hover>.controls{width:36px}.monaco-list-type-filter>.controls>*{border:none;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-appearance:none;-moz-appearance:none;background:none;width:16px;height:16px;-ms-flex-negative:0;flex-shrink:0;margin:0;padding:0;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;cursor:pointer}.monaco-list-type-filter>.controls>.filter{margin-left:4px}.monaco-list-type-filter-message{position:absolute;-webkit-box-sizing:border-box;box-sizing:border-box;width:100%;height:100%;top:0;left:0;padding:40px 1em 1em 1em;text-align:center;white-space:normal;opacity:.7;pointer-events:none}.monaco-list-type-filter-message:empty{display:none}.monaco-list-type-filter{cursor:-webkit-grab;cursor:grab}.monaco-list-type-filter.dragging{cursor:-webkit-grabbing;cursor:grabbing}",""]),e.exports=t},"8ece":function(e,t,i){var n=i("5a37");"string"===typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);var o=i("4974").default;o("32d786fc",n,!0,{sourceMap:!1,shadowMode:!1})},"8fed":function(e,t,i){var n=i("ac97");e.exports=!!Object.getOwnPropertySymbols&&!n((function(){return!String(Symbol())}))},9368:function(e,t,i){var n=i("3c82");"string"===typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);var o=i("4974").default;o("3e21d075",n,!0,{sourceMap:!1,shadowMode:!1})},9550:function(e,t,i){var n=i("2f6c"),o=Function.toString;"function"!=typeof n.inspectSource&&(n.inspectSource=function(e){return o.call(e)}),e.exports=n.inspectSource},"95d1":function(e,t,i){var n=i("e244"),o=i("a909"),r=i("e2da"),s=i("69f1"),a=i("1810"),l=a("iterator"),c=a("toStringTag"),h=r.values;for(var d in o){var u=n[d],g=u&&u.prototype;if(g){if(g[l]!==h)try{s(g,l,h)}catch(m){g[l]=h}if(g[c]||s(g,c,d),o[d])for(var f in r)if(g[f]!==r[f])try{s(g,f,r[f])}catch(m){g[f]=r[f]}}}},"986e":function(e,t,i){var n=i("f0db"),o=i("2f6c");(e.exports=function(e,t){return o[e]||(o[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.7.0",mode:n?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},"99ab":function(e,t,i){var n=i("83ec"),o=i("d362");n({target:"Object",stat:!0,forced:Object.assign!==o},{assign:o})},"9b09":function(e,t,i){var n=i("0952");"string"===typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);var o=i("4974").default;o("668d59b8",n,!0,{sourceMap:!1,shadowMode:!1})},"9bf1":function(e,t,i){"use strict";var n=i("83ec"),o=i("eee7"),r=i("5a43"),s=i("3352"),a=i("ce47"),l=i("45ad"),c=i("acd4"),h=i("1810"),d=i("72d4"),u=i("9f1e"),g=d("slice"),f=u("slice",{ACCESSORS:!0,0:0,1:2}),m=h("species"),p=[].slice,_=Math.max;n({target:"Array",proto:!0,forced:!g||!f},{slice:function(e,t){var i,n,h,d=l(this),u=a(d.length),g=s(e,u),f=s(void 0===t?u:t,u);if(r(d)&&(i=d.constructor,"function"!=typeof i||i!==Array&&!r(i.prototype)?o(i)&&(i=i[m],null===i&&(i=void 0)):i=void 0,i===Array||void 0===i))return p.call(d,g,f);for(n=new(void 0===i?Array:i)(_(f-g,0)),h=0;g<f;g++,h++)g in d&&c(n,h,d[g]);return n.length=h,n}})},"9c85":function(e,t,i){var n=i("eca0");"string"===typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);var o=i("4974").default;o("46bf518f",n,!0,{sourceMap:!1,shadowMode:!1})},"9d6f":function(e,t,i){var n=i("53c2");t=n(!1),t.push([e.i,".monaco-editor.no-user-select .lines-content,.monaco-editor.no-user-select .view-line,.monaco-editor.no-user-select .view-lines{-moz-user-select:none;user-select:none;-webkit-user-select:none;-ms-user-select:none}.monaco-editor .view-lines{white-space:nowrap}.monaco-editor .view-line{position:absolute;width:100%}.monaco-editor .mtkz{display:inline-block}",""]),e.exports=t},"9f1e":function(e,t,i){var n=i("55ab"),o=i("ac97"),r=i("fe32"),s=Object.defineProperty,a={},l=function(e){throw e};e.exports=function(e,t){if(r(a,e))return a[e];t||(t={});var i=[][e],c=!!r(t,"ACCESSORS")&&t.ACCESSORS,h=r(t,0)?t[0]:l,d=r(t,1)?t[1]:void 0;return a[e]=!!i&&!o((function(){if(c&&!n)return!0;var e={length:-1};c?s(e,1,{enumerable:!0,get:l}):e[1]=1,i.call(e,h,d)}))}},a056:function(e,t,i){var n=i("ac97"),o=/#|\.prototype\./,r=function(e,t){var i=a[s(e)];return i==c||i!=l&&("function"==typeof t?n(t):!!t)},s=r.normalize=function(e){return String(e).replace(o,".").toLowerCase()},a=r.data={},l=r.NATIVE="N",c=r.POLYFILL="P";e.exports=r},a078:function(e,t,i){"use strict";var n=i("4eaf").charAt,o=i("35d6"),r=i("325d"),s="String Iterator",a=o.set,l=o.getterFor(s);r(String,"String",(function(e){a(this,{type:s,string:String(e),index:0})}),(function(){var e,t=l(this),i=t.string,o=t.index;return o>=i.length?{value:void 0,done:!0}:(e=n(i,o),t.index+=e.length,{value:e,done:!1})}))},a0c9:function(e,t,i){"use strict";e.exports=function(e,t){return t||(t={}),e=e&&e.__esModule?e.default:e,"string"!==typeof e?e:(/^['"].*['"]$/.test(e)&&(e=e.slice(1,-1)),t.hash&&(e+=t.hash),/["'() \t\n]/.test(e)||t.needQuotes?'"'.concat(e.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):e)}},a23c:function(e,t,i){var n=i("e263");"string"===typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);var o=i("4974").default;o("f22d8072",n,!0,{sourceMap:!1,shadowMode:!1})},a2e5:function(e,t,i){var n=i("3f13");"string"===typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);var o=i("4974").default;o("b6bc25aa",n,!0,{sourceMap:!1,shadowMode:!1})},a52d:function(e,t,i){var n=i("53c2");t=n(!1),t.push([e.i,".monaco-editor .lines-content .cslr{position:absolute}.monaco-editor .top-left-radius{border-top-left-radius:3px}.monaco-editor .bottom-left-radius{border-bottom-left-radius:3px}.monaco-editor .top-right-radius{border-top-right-radius:3px}.monaco-editor .bottom-right-radius{border-bottom-right-radius:3px}.monaco-editor.hc-black .top-left-radius{border-top-left-radius:0}.monaco-editor.hc-black .bottom-left-radius{border-bottom-left-radius:0}.monaco-editor.hc-black .top-right-radius{border-top-right-radius:0}.monaco-editor.hc-black .bottom-right-radius{border-bottom-right-radius:0}",""]),e.exports=t},a53d:function(e,t,i){var n=i("1810"),o=i("d85b"),r=n("iterator"),s=Array.prototype;e.exports=function(e){return void 0!==e&&(o.Array===e||s[r]===e)}},a55b:function(e,t,i){var n=i("fbcf"),o=i("7f17"),r=i("1810"),s=r("species");e.exports=function(e,t){var i,r=n(e).constructor;return void 0===r||void 0==(i=n(r)[s])?t:o(i)}},a5f6:function(e,t,i){"use strict";var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"form-config-container"},[i("el-form",{attrs:{"label-position":"left","label-suffix":":","label-width":"130px",size:"small"}},[i("el-form-item",{attrs:{label:"标签对齐方式"}},[i("el-select",{attrs:{placeholder:"标签对齐方式"},model:{value:e.data.labelPosition,callback:function(t){e.$set(e.data,"labelPosition",t)},expression:"data.labelPosition"}},[i("el-option",{attrs:{label:"左对齐",value:"left"}}),i("el-option",{attrs:{label:"右对齐",value:"right"}}),i("el-option",{attrs:{label:"顶部对齐",value:"top"}})],1)],1),i("el-form-item",{attrs:{label:"标签宽度"}},[i("el-input-number",{staticStyle:{width:"100%"},attrs:{min:80,max:200,step:10,"controls-position":"right",placeholder:"标签宽度"},model:{value:e.data.labelWidth,callback:function(t){e.$set(e.data,"labelWidth",t)},expression:"data.labelWidth"}})],1),i("el-form-item",{attrs:{label:"标签后缀"}},[i("el-input",{attrs:{placeholder:"标签后缀"},model:{value:e.data.labelSuffix,callback:function(t){e.$set(e.data,"labelSuffix",t)},expression:"data.labelSuffix"}})],1),i("el-form-item",{attrs:{label:"项之间的间隔"}},[i("el-input-number",{staticStyle:{width:"100%"},attrs:{min:0,max:60,step:5,"controls-position":"right",placeholder:"项之间的间隔"},model:{value:e.data.gutter,callback:function(t){e.$set(e.data,"gutter",t)},expression:"data.gutter"}})],1),i("el-form-item",{attrs:{label:"多分组转标签"}},[i("el-switch",{attrs:{"active-color":"#409EFF"},model:{value:e.data.tabs,callback:function(t){e.$set(e.data,"tabs",t)},expression:"data.tabs"}})],1),i("el-form-item",{attrs:{label:"详情模式"}},[i("el-switch",{model:{value:e.data.detail,callback:function(t){e.$set(e.data,"detail",t)},expression:"data.detail"}})],1),i("el-form-item",{attrs:{label:"显示按钮"}},[i("el-switch",{attrs:{"active-color":"#409EFF"},model:{value:e.data.menuBtn,callback:function(t){e.$set(e.data,"menuBtn",t)},expression:"data.menuBtn"}})],1),e.data.menuBtn?i("el-form-item",{attrs:{label:"显示提交按钮"}},[i("el-switch",{attrs:{"active-color":"#409EFF"},model:{value:e.data.submitBtn,callback:function(t){e.$set(e.data,"submitBtn",t)},expression:"data.submitBtn"}})],1):e._e(),e.data.menuBtn&&e.data.submitBtn?i("el-form-item",{attrs:{label:"提交按钮的文字"}},[i("el-input",{attrs:{placeholder:"提交按钮的文字"},model:{value:e.data.submitText,callback:function(t){e.$set(e.data,"submitText",t)},expression:"data.submitText"}})],1):e._e(),e.data.menuBtn?i("el-form-item",{attrs:{label:"显示清空按钮"}},[i("el-switch",{attrs:{"active-color":"#409EFF"},model:{value:e.data.emptyBtn,callback:function(t){e.$set(e.data,"emptyBtn",t)},expression:"data.emptyBtn"}})],1):e._e(),e.data.menuBtn&&e.data.emptyBtn?i("el-form-item",{attrs:{label:"清空按钮的文字"}},[i("el-input",{attrs:{placeholder:"提交按钮的文字"},model:{value:e.data.emptyText,callback:function(t){e.$set(e.data,"emptyText",t)},expression:"data.emptyText"}})],1):e._e(),i("el-form-item",{attrs:{label:"全局只读"}},[i("el-switch",{model:{value:e.data.readonly,callback:function(t){e.$set(e.data,"readonly",t)},expression:"data.readonly"}})],1),i("el-form-item",{attrs:{label:"全局禁用"}},[i("el-switch",{model:{value:e.data.disabled,callback:function(t){e.$set(e.data,"disabled",t)},expression:"data.disabled"}})],1)],1)],1)},o=[],r={name:"form-config",props:["data"]},s=r,a=i("e3d4"),l=Object(a["a"])(s,n,o,!1,null,null,null);t["a"]=l.exports},a73f:function(e,t,i){var n=i("53c2");t=n(!1),t.push([e.i,".custom-tree-node[data-v-77c43025]{-webkit-box-flex:1;-ms-flex:1;flex:1;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;font-size:14px;padding-right:8px}",""]),e.exports=t},a780:function(e,t,i){var n=i("6043");e.exports=n("document","documentElement")},a7f7:function(e,t,i){var n=i("fe32"),o=i("c673"),r=i("5350"),s=i("4467"),a=r("IE_PROTO"),l=Object.prototype;e.exports=s?Object.getPrototypeOf:function(e){return e=o(e),n(e,a)?e[a]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?l:null}},a8de:function(e,t,i){"use strict";var n=i("e820"),o=i("fbcf"),r=i("c673"),s=i("ce47"),a=i("80db"),l=i("0874"),c=i("61c0"),h=i("ec23"),d=Math.max,u=Math.min,g=Math.floor,f=/\$([$&'`]|\d\d?|<[^>]*>)/g,m=/\$([$&'`]|\d\d?)/g,p=function(e){return void 0===e?e:String(e)};n("replace",2,(function(e,t,i,n){var _=n.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,b=n.REPLACE_KEEPS_$0,v=_?"$":"$0";return[function(i,n){var o=l(this),r=void 0==i?void 0:i[e];return void 0!==r?r.call(i,o,n):t.call(String(o),i,n)},function(e,n){if(!_&&b||"string"===typeof n&&-1===n.indexOf(v)){var r=i(t,e,this,n);if(r.done)return r.value}var l=o(e),g=String(this),f="function"===typeof n;f||(n=String(n));var m=l.global;if(m){var C=l.unicode;l.lastIndex=0}var y=[];while(1){var S=h(l,g);if(null===S)break;if(y.push(S),!m)break;var x=String(S[0]);""===x&&(l.lastIndex=c(g,s(l.lastIndex),C))}for(var L="",k=0,E=0;E<y.length;E++){S=y[E];for(var D=String(S[0]),N=d(u(a(S.index),g.length),0),T=[],M=1;M<S.length;M++)T.push(p(S[M]));var I=S.groups;if(f){var O=[D].concat(T,N,g);void 0!==I&&O.push(I);var A=String(n.apply(void 0,O))}else A=w(D,g,N,T,I,n);N>=k&&(L+=g.slice(k,N)+A,k=N+D.length)}return L+g.slice(k)}];function w(e,i,n,o,s,a){var l=n+e.length,c=o.length,h=m;return void 0!==s&&(s=r(s),h=f),t.call(a,h,(function(t,r){var a;switch(r.charAt(0)){case"$":return"$";case"&":return e;case"`":return i.slice(0,n);case"'":return i.slice(l);case"<":a=s[r.slice(1,-1)];break;default:var h=+r;if(0===h)return t;if(h>c){var d=g(h/10);return 0===d?t:d<=c?void 0===o[d-1]?r.charAt(1):o[d-1]+r.charAt(1):t}a=o[h-1]}return void 0===a?"":a}))}}))},a909:function(e,t){e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},ac97:function(e,t){e.exports=function(e){try{return!!e()}catch(t){return!0}}},aca4:function(e,t,i){var n=i("1810");t.f=n},acd4:function(e,t,i){"use strict";var n=i("7f82"),o=i("b896"),r=i("4d82");e.exports=function(e,t,i){var s=n(t);s in e?o.f(e,s,r(0,i)):e[s]=i}},ad2f:function(e,t,i){var n=i("53c2");t=n(!1),t.push([e.i,".monaco-count-badge{padding:3px 6px;border-radius:11px;font-size:11px;min-width:18px;min-height:18px;line-height:11px;font-weight:400;text-align:center;display:inline-block;-webkit-box-sizing:border-box;box-sizing:border-box}.monaco-count-badge.long{padding:2px 3px;border-radius:2px;min-height:auto;line-height:normal}",""]),e.exports=t},adf0:function(e,t,i){var n=i("a52d");"string"===typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);var o=i("4974").default;o("44843bab",n,!0,{sourceMap:!1,shadowMode:!1})},b012:function(e,t,i){var n=i("53c2");t=n(!1),t.push([e.i,".monaco-editor .cursors-layer{position:absolute;top:0}.monaco-editor .cursors-layer>.cursor{position:absolute;overflow:hidden}.monaco-editor .cursors-layer.cursor-smooth-caret-animation>.cursor{-webkit-transition:all 80ms;transition:all 80ms}.monaco-editor .cursors-layer.cursor-block-outline-style>.cursor{-webkit-box-sizing:border-box;box-sizing:border-box;background:transparent!important;border-style:solid;border-width:1px}.monaco-editor .cursors-layer.cursor-underline-style>.cursor{border-bottom-width:2px;border-bottom-style:solid;background:transparent!important;-webkit-box-sizing:border-box;box-sizing:border-box}.monaco-editor .cursors-layer.cursor-underline-thin-style>.cursor{border-bottom-width:1px;border-bottom-style:solid;background:transparent!important;-webkit-box-sizing:border-box;box-sizing:border-box}@-webkit-keyframes monaco-cursor-smooth{0%,20%{opacity:1}60%,to{opacity:0}}@keyframes monaco-cursor-smooth{0%,20%{opacity:1}60%,to{opacity:0}}@-webkit-keyframes monaco-cursor-phase{0%,20%{opacity:1}90%,to{opacity:0}}@keyframes monaco-cursor-phase{0%,20%{opacity:1}90%,to{opacity:0}}@-webkit-keyframes monaco-cursor-expand{0%,20%{-webkit-transform:scaleY(1);transform:scaleY(1)}80%,to{-webkit-transform:scaleY(0);transform:scaleY(0)}}@keyframes monaco-cursor-expand{0%,20%{-webkit-transform:scaleY(1);transform:scaleY(1)}80%,to{-webkit-transform:scaleY(0);transform:scaleY(0)}}.cursor-smooth{-webkit-animation:monaco-cursor-smooth .5s ease-in-out 0s 20 alternate;animation:monaco-cursor-smooth .5s ease-in-out 0s 20 alternate}.cursor-phase{-webkit-animation:monaco-cursor-phase .5s ease-in-out 0s 20 alternate;animation:monaco-cursor-phase .5s ease-in-out 0s 20 alternate}.cursor-expand>.cursor{-webkit-animation:monaco-cursor-expand .5s ease-in-out 0s 20 alternate;animation:monaco-cursor-expand .5s ease-in-out 0s 20 alternate}",""]),e.exports=t},b042:function(e,t,i){var n=i("e4f5");"string"===typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);var o=i("4974").default;o("7223b90e",n,!0,{sourceMap:!1,shadowMode:!1})},b105:function(e,t,i){"use strict";var n=i("83ec"),o=i("8aa3").findIndex,r=i("6e10"),s=i("9f1e"),a="findIndex",l=!0,c=s(a);a in[]&&Array(1)[a]((function(){l=!1})),n({target:"Array",proto:!0,forced:l||!c},{findIndex:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}}),r(a)},b13d:function(e,t,i){"use strict";var n=i("83ec");n({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return URL.prototype.toString.call(this)}})},b1b6:function(e,t,i){"use strict";var n=i("8a56"),o=i.n(n);o.a},b485:function(e,t,i){"use strict";var n=i("e820"),o=i("fbcf"),r=i("ce47"),s=i("0874"),a=i("61c0"),l=i("ec23");n("match",1,(function(e,t,i){return[function(t){var i=s(this),n=void 0==t?void 0:t[e];return void 0!==n?n.call(t,i):new RegExp(t)[e](String(i))},function(e){var n=i(t,e,this);if(n.done)return n.value;var s=o(e),c=String(this);if(!s.global)return l(s,c);var h=s.unicode;s.lastIndex=0;var d,u=[],g=0;while(null!==(d=l(s,c))){var f=String(d[0]);u[g]=f,""===f&&(s.lastIndex=a(c,r(s.lastIndex),h)),g++}return 0===g?null:u}]}))},b4fd:function(e,t,i){var n=i("ac97"),o=i("c401"),r="".split;e.exports=n((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==o(e)?r.call(e,""):Object(e)}:Object},b856:function(e,t,i){var n=i("b012");"string"===typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);var o=i("4974").default;o("6a89fb2a",n,!0,{sourceMap:!1,shadowMode:!1})},b896:function(e,t,i){var n=i("55ab"),o=i("bf6f"),r=i("fbcf"),s=i("7f82"),a=Object.defineProperty;t.f=n?a:function(e,t,i){if(r(e),t=s(t,!0),r(i),o)try{return a(e,t,i)}catch(n){}if("get"in i||"set"in i)throw TypeError("Accessors not supported");return"value"in i&&(e[t]=i.value),e}},bd77:function(e,t,i){var n=i("8fed");e.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},bf1d:function(e,t,i){var n=i("45ad"),o=i("f0f1").f,r={}.toString,s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],a=function(e){try{return o(e)}catch(t){return s.slice()}};e.exports.f=function(e){return s&&"[object Window]"==r.call(e)?a(e):o(n(e))}},bf6f:function(e,t,i){var n=i("55ab"),o=i("ac97"),r=i("f146");e.exports=!n&&!o((function(){return 7!=Object.defineProperty(r("div"),"a",{get:function(){return 7}}).a}))},c09a:function(e,t,i){var n=i("53c2");t=n(!1),t.push([e.i,".monaco-diff-editor .diffOverview{z-index:9}.monaco-diff-editor .diffOverview .diffViewport{z-index:10}.monaco-diff-editor.vs .diffOverview{background:rgba(0,0,0,.03)}.monaco-diff-editor.vs-dark .diffOverview{background:hsla(0,0%,100%,.01)}.monaco-scrollable-element.modified-in-monaco-diff-editor.vs-dark .scrollbar,.monaco-scrollable-element.modified-in-monaco-diff-editor.vs .scrollbar{background:transparent}.monaco-scrollable-element.modified-in-monaco-diff-editor.hc-black .scrollbar{background:none}.monaco-scrollable-element.modified-in-monaco-diff-editor .slider{z-index:10}.modified-in-monaco-diff-editor .slider.active{background:hsla(0,0%,67.1%,.4)}.modified-in-monaco-diff-editor.hc-black .slider.active{background:none}.monaco-diff-editor .delete-sign,.monaco-diff-editor .insert-sign,.monaco-editor .delete-sign,.monaco-editor .insert-sign{font-size:11px!important;opacity:.7!important;display:-webkit-box!important;display:-ms-flexbox!important;display:flex!important;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.monaco-diff-editor.hc-black .delete-sign,.monaco-diff-editor.hc-black .insert-sign,.monaco-editor.hc-black .delete-sign,.monaco-editor.hc-black .insert-sign{opacity:1}.monaco-editor .inline-added-margin-view-zone,.monaco-editor .inline-deleted-margin-view-zone{text-align:right}.monaco-editor .view-zones .view-lines .view-line span{display:inline-block}.monaco-editor .margin-view-zones .lightbulb-glyph:hover{cursor:pointer}",""]),e.exports=t},c0db:function(e,t,i){var n=i("53c2");t=n(!1),t.push([e.i,".el-tag[data-v-ccc30782]{vertical-align:top}.el-tag+.el-tag[data-v-ccc30782],.input-new-tag[data-v-ccc30782]{margin-left:5px}.input-new-tag[data-v-ccc30782]{width:90px;vertical-align:bottom}.color-picker[data-v-ccc30782]{left:10px;vertical-align:top}",""]),e.exports=t},c1ca:function(e,t,i){var n=i("6043"),o=i("f0f1"),r=i("0ef1"),s=i("fbcf");e.exports=n("Reflect","ownKeys")||function(e){var t=o.f(s(e)),i=r.f;return i?t.concat(i(e)):t}},c223:function(e,t,i){"use strict";(function(e){i.d(t,"a",(function(){return a})),i.d(t,"b",(function(){return l})),i.d(t,"e",(function(){return c})),i.d(t,"c",(function(){return h})),i.d(t,"f",(function(){return d})),i.d(t,"d",(function(){return u})),i.d(t,"g",(function(){return g}));var n=i("3fa4");const o="undefined"!==typeof e,r="undefined"!==typeof TextDecoder;let s;class a{constructor(e){this.buffer=e,this.byteLength=this.buffer.byteLength}toString(){return o?this.buffer.toString():r?(s||(s=new TextDecoder),s.decode(this.buffer)):n["p"](this.buffer)}}function l(e,t){return e[t+0]<<0>>>0|e[t+1]<<8>>>0}function c(e,t,i){e[i+0]=255&t,t>>>=8,e[i+1]=255&t}function h(e,t){return e[t]*Math.pow(2,24)+e[t+1]*Math.pow(2,16)+e[t+2]*Math.pow(2,8)+e[t+3]}function d(e,t,i){e[i+3]=t,t>>>=8,e[i+2]=t,t>>>=8,e[i+1]=t,t>>>=8,e[i]=t}function u(e,t){return e[t]}function g(e,t,i){e[i]=t}}).call(this,i("f20c").Buffer)},c225:function(e,t,i){"use strict";var n=i("83ec"),o=i("e244"),r=i("6043"),s=i("f0db"),a=i("55ab"),l=i("8fed"),c=i("bd77"),h=i("ac97"),d=i("fe32"),u=i("5a43"),g=i("eee7"),f=i("fbcf"),m=i("c673"),p=i("45ad"),_=i("7f82"),b=i("4d82"),v=i("ca2b"),w=i("3e1a"),C=i("f0f1"),y=i("bf1d"),S=i("0ef1"),x=i("42b1"),L=i("b896"),k=i("11b0"),E=i("69f1"),D=i("7d86"),N=i("986e"),T=i("5350"),M=i("fd3f"),I=i("76b2"),O=i("1810"),A=i("aca4"),R=i("6baf"),P=i("63ef"),F=i("35d6"),W=i("8aa3").forEach,B=T("hidden"),V="Symbol",H="prototype",z=O("toPrimitive"),U=F.set,j=F.getterFor(V),K=Object[H],q=o.Symbol,$=r("JSON","stringify"),G=x.f,Y=L.f,X=y.f,Z=k.f,Q=N("symbols"),J=N("op-symbols"),ee=N("string-to-symbol-registry"),te=N("symbol-to-string-registry"),ie=N("wks"),ne=o.QObject,oe=!ne||!ne[H]||!ne[H].findChild,re=a&&h((function(){return 7!=v(Y({},"a",{get:function(){return Y(this,"a",{value:7}).a}})).a}))?function(e,t,i){var n=G(K,t);n&&delete K[t],Y(e,t,i),n&&e!==K&&Y(K,t,n)}:Y,se=function(e,t){var i=Q[e]=v(q[H]);return U(i,{type:V,tag:e,description:t}),a||(i.description=t),i},ae=c?function(e){return"symbol"==typeof e}:function(e){return Object(e)instanceof q},le=function(e,t,i){e===K&&le(J,t,i),f(e);var n=_(t,!0);return f(i),d(Q,n)?(i.enumerable?(d(e,B)&&e[B][n]&&(e[B][n]=!1),i=v(i,{enumerable:b(0,!1)})):(d(e,B)||Y(e,B,b(1,{})),e[B][n]=!0),re(e,n,i)):Y(e,n,i)},ce=function(e,t){f(e);var i=p(t),n=w(i).concat(fe(i));return W(n,(function(t){a&&!de.call(i,t)||le(e,t,i[t])})),e},he=function(e,t){return void 0===t?v(e):ce(v(e),t)},de=function(e){var t=_(e,!0),i=Z.call(this,t);return!(this===K&&d(Q,t)&&!d(J,t))&&(!(i||!d(this,t)||!d(Q,t)||d(this,B)&&this[B][t])||i)},ue=function(e,t){var i=p(e),n=_(t,!0);if(i!==K||!d(Q,n)||d(J,n)){var o=G(i,n);return!o||!d(Q,n)||d(i,B)&&i[B][n]||(o.enumerable=!0),o}},ge=function(e){var t=X(p(e)),i=[];return W(t,(function(e){d(Q,e)||d(M,e)||i.push(e)})),i},fe=function(e){var t=e===K,i=X(t?J:p(e)),n=[];return W(i,(function(e){!d(Q,e)||t&&!d(K,e)||n.push(Q[e])})),n};if(l||(q=function(){if(this instanceof q)throw TypeError("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?String(arguments[0]):void 0,t=I(e),i=function(e){this===K&&i.call(J,e),d(this,B)&&d(this[B],t)&&(this[B][t]=!1),re(this,t,b(1,e))};return a&&oe&&re(K,t,{configurable:!0,set:i}),se(t,e)},D(q[H],"toString",(function(){return j(this).tag})),D(q,"withoutSetter",(function(e){return se(I(e),e)})),k.f=de,L.f=le,x.f=ue,C.f=y.f=ge,S.f=fe,A.f=function(e){return se(O(e),e)},a&&(Y(q[H],"description",{configurable:!0,get:function(){return j(this).description}}),s||D(K,"propertyIsEnumerable",de,{unsafe:!0}))),n({global:!0,wrap:!0,forced:!l,sham:!l},{Symbol:q}),W(w(ie),(function(e){R(e)})),n({target:V,stat:!0,forced:!l},{for:function(e){var t=String(e);if(d(ee,t))return ee[t];var i=q(t);return ee[t]=i,te[i]=t,i},keyFor:function(e){if(!ae(e))throw TypeError(e+" is not a symbol");if(d(te,e))return te[e]},useSetter:function(){oe=!0},useSimple:function(){oe=!1}}),n({target:"Object",stat:!0,forced:!l,sham:!a},{create:he,defineProperty:le,defineProperties:ce,getOwnPropertyDescriptor:ue}),n({target:"Object",stat:!0,forced:!l},{getOwnPropertyNames:ge,getOwnPropertySymbols:fe}),n({target:"Object",stat:!0,forced:h((function(){S.f(1)}))},{getOwnPropertySymbols:function(e){return S.f(m(e))}}),$){var me=!l||h((function(){var e=q();return"[null]"!=$([e])||"{}"!=$({a:e})||"{}"!=$(Object(e))}));n({target:"JSON",stat:!0,forced:me},{stringify:function(e,t,i){var n,o=[e],r=1;while(arguments.length>r)o.push(arguments[r++]);if(n=t,(g(t)||void 0!==e)&&!ae(e))return u(t)||(t=function(e,t){if("function"==typeof n&&(t=n.call(this,e,t)),!ae(t))return t}),o[1]=t,$.apply(null,o)}})}q[H][z]||E(q[H],z,q[H].valueOf),P(q,V),M[B]=!0},c293:function(module,__webpack_exports__,__webpack_require__){"use strict";var _utils_monaco_editor__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("d895");__webpack_exports__["a"]={name:"config-custom",components:{MonacoEditor:_utils_monaco_editor__WEBPACK_IMPORTED_MODULE_0__["a"]},props:["data"],data:function(){return{params:this.data.params||{},event:this.data.event||{},options:{minimap:{enabled:!1}}}},methods:{},watch:{"data.params":function(e){this.params=e||{}},"data.event":function(e){this.event=e||{}},params:function params(val){try{this.data.params=eval("("+val+")")}catch(e){}},event:function event(val){try{this.data.event=eval("("+val+")")}catch(e){}}}}},c3b4:function(e,t,i){var n=i("10b1");"string"===typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);var o=i("4974").default;o("77038fc2",n,!0,{sourceMap:!1,shadowMode:!1})},c401:function(e,t){var i={}.toString;e.exports=function(e){return i.call(e).slice(8,-1)}},c55c:function(e,t,i){var n=i("ac97"),o=i("d554"),r="​…᠎";e.exports=function(e){return n((function(){return!!o[e]()||r[e]()!=r||o[e].name!==e}))}},c673:function(e,t,i){var n=i("0874");e.exports=function(e){return Object(n(e))}},c6b4:function(e,t,i){var n=i("6aad");"string"===typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);var o=i("4974").default;o("1a9cb28d",n,!0,{sourceMap:!1,shadowMode:!1})},c732:function(e,t,i){var n=i("55ab"),o=i("b896"),r=i("fbcf"),s=i("3e1a");e.exports=n?Object.defineProperties:function(e,t){r(e);var i,n=s(t),a=n.length,l=0;while(a>l)o.f(e,i=n[l++],t[i]);return e}},c8ed:function(e,t){var i;i=function(){return this}();try{i=i||new Function("return this")()}catch(n){"object"===typeof window&&(i=window)}e.exports=i},c901:function(e,t,i){var n=i("f39a");"string"===typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);var o=i("4974").default;o("635cd606",n,!0,{sourceMap:!1,shadowMode:!1})},c91b:function(e,t,i){var n=i("53c2");t=n(!1),t.push([e.i,".monaco-text-button{-webkit-box-sizing:border-box;box-sizing:border-box;display:-webkit-box;display:-ms-flexbox;display:flex;width:100%;padding:4px;text-align:center;cursor:pointer;outline-offset:2px!important;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.monaco-text-button:hover{text-decoration:none!important}.monaco-button.disabled{opacity:.4;cursor:default}.monaco-button>.codicon{margin:0 .2em;color:inherit!important}",""]),e.exports=t},ca23:function(e,t,i){var n=i("eee7"),o=i("13a8");e.exports=function(e,t,i){var r,s;return o&&"function"==typeof(r=t.constructor)&&r!==i&&n(s=r.prototype)&&s!==i.prototype&&o(e,s),e}},ca2b:function(e,t,i){var n,o=i("fbcf"),r=i("c732"),s=i("e629"),a=i("fd3f"),l=i("a780"),c=i("f146"),h=i("5350"),d=">",u="<",g="prototype",f="script",m=h("IE_PROTO"),p=function(){},_=function(e){return u+f+d+e+u+"/"+f+d},b=function(e){e.write(_("")),e.close();var t=e.parentWindow.Object;return e=null,t},v=function(){var e,t=c("iframe"),i="java"+f+":";return t.style.display="none",l.appendChild(t),t.src=String(i),e=t.contentWindow.document,e.open(),e.write(_("document.F=Object")),e.close(),e.F},w=function(){try{n=document.domain&&new ActiveXObject("htmlfile")}catch(t){}w=n?b(n):v();var e=s.length;while(e--)delete w[g][s[e]];return w()};a[m]=!0,e.exports=Object.create||function(e,t){var i;return null!==e?(p[g]=o(e),i=new p,p[g]=null,i[m]=e):i=w(),void 0===t?i:r(i,t)}},cc1a:function(e,t,i){var n=i("11e2");"string"===typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);var o=i("4974").default;o("52b97b55",n,!0,{sourceMap:!1,shadowMode:!1})},ce47:function(e,t,i){var n=i("80db"),o=Math.min;e.exports=function(e){return e>0?o(n(e),9007199254740991):0}},d30c:function(e,t,i){"use strict";var n=i("6043"),o=i("b896"),r=i("1810"),s=i("55ab"),a=r("species");e.exports=function(e){var t=n(e),i=o.f;s&&t&&!t[a]&&i(t,a,{configurable:!0,get:function(){return this}})}},d31d:function(e,t,i){"use strict";var n,o,r,s,a=i("83ec"),l=i("f0db"),c=i("e244"),h=i("6043"),d=i("fc9a"),u=i("7d86"),g=i("6161"),f=i("63ef"),m=i("d30c"),p=i("eee7"),_=i("7f17"),b=i("d6e4"),v=i("9550"),w=i("d75f"),C=i("59cf"),y=i("a55b"),S=i("59e5").set,x=i("f652"),L=i("3073"),k=i("4fe1"),E=i("fc01"),D=i("53ff"),N=i("35d6"),T=i("a056"),M=i("1810"),I=i("f79e"),O=i("2c21"),A=M("species"),R="Promise",P=N.get,F=N.set,W=N.getterFor(R),B=d,V=c.TypeError,H=c.document,z=c.process,U=h("fetch"),j=E.f,K=j,q=!!(H&&H.createEvent&&c.dispatchEvent),$="function"==typeof PromiseRejectionEvent,G="unhandledrejection",Y="rejectionhandled",X=0,Z=1,Q=2,J=1,ee=2,te=T(R,(function(){var e=v(B)!==String(B);if(!e){if(66===O)return!0;if(!I&&!$)return!0}if(l&&!B.prototype["finally"])return!0;if(O>=51&&/native code/.test(B))return!1;var t=B.resolve(1),i=function(e){e((function(){}),(function(){}))},n=t.constructor={};return n[A]=i,!(t.then((function(){}))instanceof i)})),ie=te||!C((function(e){B.all(e)["catch"]((function(){}))})),ne=function(e){var t;return!(!p(e)||"function"!=typeof(t=e.then))&&t},oe=function(e,t){if(!e.notified){e.notified=!0;var i=e.reactions;x((function(){var n=e.value,o=e.state==Z,r=0;while(i.length>r){var s,a,l,c=i[r++],h=o?c.ok:c.fail,d=c.resolve,u=c.reject,g=c.domain;try{h?(o||(e.rejection===ee&&le(e),e.rejection=J),!0===h?s=n:(g&&g.enter(),s=h(n),g&&(g.exit(),l=!0)),s===c.promise?u(V("Promise-chain cycle")):(a=ne(s))?a.call(s,d,u):d(s)):u(n)}catch(f){g&&!l&&g.exit(),u(f)}}e.reactions=[],e.notified=!1,t&&!e.rejection&&se(e)}))}},re=function(e,t,i){var n,o;q?(n=H.createEvent("Event"),n.promise=t,n.reason=i,n.initEvent(e,!1,!0),c.dispatchEvent(n)):n={promise:t,reason:i},!$&&(o=c["on"+e])?o(n):e===G&&k("Unhandled promise rejection",i)},se=function(e){S.call(c,(function(){var t,i=e.facade,n=e.value,o=ae(e);if(o&&(t=D((function(){I?z.emit("unhandledRejection",n,i):re(G,i,n)})),e.rejection=I||ae(e)?ee:J,t.error))throw t.value}))},ae=function(e){return e.rejection!==J&&!e.parent},le=function(e){S.call(c,(function(){var t=e.facade;I?z.emit("rejectionHandled",t):re(Y,t,e.value)}))},ce=function(e,t,i){return function(n){e(t,n,i)}},he=function(e,t,i){e.done||(e.done=!0,i&&(e=i),e.value=t,e.state=Q,oe(e,!0))},de=function(e,t,i){if(!e.done){e.done=!0,i&&(e=i);try{if(e.facade===t)throw V("Promise can't be resolved itself");var n=ne(t);n?x((function(){var i={done:!1};try{n.call(t,ce(de,i,e),ce(he,i,e))}catch(o){he(i,o,e)}})):(e.value=t,e.state=Z,oe(e,!1))}catch(o){he({done:!1},o,e)}}};te&&(B=function(e){b(this,B,R),_(e),n.call(this);var t=P(this);try{e(ce(de,t),ce(he,t))}catch(i){he(t,i)}},n=function(e){F(this,{type:R,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:X,value:void 0})},n.prototype=g(B.prototype,{then:function(e,t){var i=W(this),n=j(y(this,B));return n.ok="function"!=typeof e||e,n.fail="function"==typeof t&&t,n.domain=I?z.domain:void 0,i.parent=!0,i.reactions.push(n),i.state!=X&&oe(i,!1),n.promise},catch:function(e){return this.then(void 0,e)}}),o=function(){var e=new n,t=P(e);this.promise=e,this.resolve=ce(de,t),this.reject=ce(he,t)},E.f=j=function(e){return e===B||e===r?new o(e):K(e)},l||"function"!=typeof d||(s=d.prototype.then,u(d.prototype,"then",(function(e,t){var i=this;return new B((function(e,t){s.call(i,e,t)})).then(e,t)}),{unsafe:!0}),"function"==typeof U&&a({global:!0,enumerable:!0,forced:!0},{fetch:function(e){return L(B,U.apply(c,arguments))}}))),a({global:!0,wrap:!0,forced:te},{Promise:B}),f(B,R,!1,!0),m(R),r=h(R),a({target:R,stat:!0,forced:te},{reject:function(e){var t=j(this);return t.reject.call(void 0,e),t.promise}}),a({target:R,stat:!0,forced:l||te},{resolve:function(e){return L(l&&this===r?B:this,e)}}),a({target:R,stat:!0,forced:ie},{all:function(e){var t=this,i=j(t),n=i.resolve,o=i.reject,r=D((function(){var i=_(t.resolve),r=[],s=0,a=1;w(e,(function(e){var l=s++,c=!1;r.push(void 0),a++,i.call(t,e).then((function(e){c||(c=!0,r[l]=e,--a||n(r))}),o)})),--a||n(r)}));return r.error&&o(r.value),i.promise},race:function(e){var t=this,i=j(t),n=i.reject,o=D((function(){var o=_(t.resolve);w(e,(function(e){o.call(t,e).then(i.resolve,n)}))}));return o.error&&n(o.value),i.promise}})},d362:function(e,t,i){"use strict";var n=i("55ab"),o=i("ac97"),r=i("3e1a"),s=i("0ef1"),a=i("11b0"),l=i("c673"),c=i("b4fd"),h=Object.assign,d=Object.defineProperty;e.exports=!h||o((function(){if(n&&1!==h({b:1},h(d({},"a",{enumerable:!0,get:function(){d(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},i=Symbol(),o="abcdefghijklmnopqrst";return e[i]=7,o.split("").forEach((function(e){t[e]=e})),7!=h({},e)[i]||r(h({},t)).join("")!=o}))?function(e,t){var i=l(e),o=arguments.length,h=1,d=s.f,u=a.f;while(o>h){var g,f=c(arguments[h++]),m=d?r(f).concat(d(f)):r(f),p=m.length,_=0;while(p>_)g=m[_++],n&&!u.call(f,g)||(i[g]=f[g])}return i}:h},d53b:function(e,t,i){var n=i("6965"),o=i("c401"),r=i("1810"),s=r("toStringTag"),a="Arguments"==o(function(){return arguments}()),l=function(e,t){try{return e[t]}catch(i){}};e.exports=n?o:function(e){var t,i,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(i=l(t=Object(e),s))?i:a?o(t):"Object"==(n=o(t))&&"function"==typeof t.callee?"Arguments":n}},d543:function(e,t,i){"use strict";i.d(t,"a",(function(){return o}));i("fa89"),i("d31d");function n(e,t,i,n,o,r,s){try{var a=e[r](s),l=a.value}catch(c){return void i(c)}a.done?t(l):Promise.resolve(l).then(n,o)}function o(e){return function(){var t=this,i=arguments;return new Promise((function(o,r){var s=e.apply(t,i);function a(e){n(s,o,r,a,l,"next",e)}function l(e){n(s,o,r,a,l,"throw",e)}a(void 0)}))}}},d554:function(e,t){e.exports="\t\n\v\f\r                 \u2028\u2029\ufeff"},d557:function(e,t,i){var n=i("312a");"string"===typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);var o=i("4974").default;o("7bb72351",n,!0,{sourceMap:!1,shadowMode:!1})},d6e4:function(e,t){e.exports=function(e,t,i){if(!(e instanceof t))throw TypeError("Incorrect "+(i?i+" ":"")+"invocation");return e}},d6ed:function(e,t,i){var n=i("7f17");e.exports=function(e,t,i){if(n(e),void 0===t)return e;switch(i){case 0:return function(){return e.call(t)};case 1:return function(i){return e.call(t,i)};case 2:return function(i,n){return e.call(t,i,n)};case 3:return function(i,n,o){return e.call(t,i,n,o)}}return function(){return e.apply(t,arguments)}}},d75f:function(e,t,i){var n=i("fbcf"),o=i("a53d"),r=i("ce47"),s=i("d6ed"),a=i("6023"),l=i("dc8c"),c=function(e,t){this.stopped=e,this.result=t};e.exports=function(e,t,i){var h,d,u,g,f,m,p,_=i&&i.that,b=!(!i||!i.AS_ENTRIES),v=!(!i||!i.IS_ITERATOR),w=!(!i||!i.INTERRUPTED),C=s(t,_,1+b+w),y=function(e){return h&&l(h),new c(!0,e)},S=function(e){return b?(n(e),w?C(e[0],e[1],y):C(e[0],e[1])):w?C(e,y):C(e)};if(v)h=e;else{if(d=a(e),"function"!=typeof d)throw TypeError("Target is not iterable");if(o(d)){for(u=0,g=r(e.length);g>u;u++)if(f=S(e[u]),f&&f instanceof c)return f;return new c(!1)}h=d.call(e)}m=h.next;while(!(p=m.call(h)).done){try{f=S(p.value)}catch(x){throw l(h),x}if("object"==typeof f&&f&&f instanceof c)return f}return new c(!1)}},d80d:function(e,t,i){"use strict";var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"widget-config"},[this.data&&Object.keys(this.data).length>0?i("el-form",{attrs:{"label-suffix":":",size:"small"}},[i("el-collapse",{model:{value:e.collapse,callback:function(t){e.collapse=t},expression:"collapse"}},[i("el-collapse-item",{attrs:{name:"1",title:"基本属性"}},[e.data.type&&!e.data.component?i("el-form-item",{attrs:{label:"类型"}},[i("el-select",{attrs:{placeholder:"请选择类型"},on:{change:e.handleChangeType},model:{value:e.data.type,callback:function(t){e.$set(e.data,"type",t)},expression:"data.type"}},e._l(e.fields,(function(t){return i("el-option-group",{key:t.title,attrs:{label:t.title}},e._l(t.list,(function(e){return i("el-option",{key:e.type,attrs:{label:e.label,value:e.type}})})),1)})),1)],1):e._e(),i("el-form-item",{attrs:{label:"属性值"}},[i("el-input",{attrs:{clearable:"",placeholder:"属性值"},model:{value:e.data.prop,callback:function(t){e.$set(e.data,"prop",t)},expression:"data.prop"}})],1),i("el-form-item",{attrs:{label:"标题"}},[i("el-input",{attrs:{clearable:"",placeholder:"标题"},model:{value:e.data.label,callback:function(t){e.$set(e.data,"label",t)},expression:"data.label"}})],1),e.data.subfield?i("el-form-item",{attrs:{label:"宽度"}},[i("el-input-number",{attrs:{"controls-position":"right",placeholder:"宽度",min:100},model:{value:e.data.width,callback:function(t){e.$set(e.data,"width",t)},expression:"data.width"}})],1):e._e(),e.data.subfield||["group"].includes(e.data.type)?e._e():i("el-form-item",{attrs:{label:"表单栅格"}},[i("el-input-number",{attrs:{"controls-position":"right",placeholder:"表单栅格",min:8,max:24},model:{value:e.data.span,callback:function(t){e.$set(e.data,"span",t)},expression:"data.span"}})],1),["cascader","checkbox","radio","select","tree","upload","img","array"].includes(e.data.type)?i("el-form-item",{attrs:{label:"数据类型"}},[i("el-select",{attrs:{placeholder:"数据类型",clearable:""},model:{value:e.data.dataType,callback:function(t){e.$set(e.data,"dataType",t)},expression:"data.dataType"}},[i("el-option",{attrs:{label:"String",value:"string"}}),i("el-option",{attrs:{label:"Number",value:"number"}}),i("el-option",{attrs:{label:"Array",value:"array"}})],1),e._v(" "),i("a",{staticStyle:{color:"#409EFF"},attrs:{href:"https://avuejs.com/doc/dataType",target:"_blank"}},[e._v("详情")]),i("br")],1):e._e(),e.data.type&&!e.data.component?i("el-form-item",{attrs:{label:"深结构"}},[i("a",{staticStyle:{color:"#409EFF"},attrs:{href:"https://avuejs.com/doc/form/form-bind",target:"_blank"}},[e._v("详情")]),i("br"),i("el-input",{attrs:{placeholder:"深结构"},model:{value:e.data.bind,callback:function(t){e.$set(e.data,"bind",t)},expression:"data.bind"}})],1):e._e(),i(e.getComponent,{tag:"component",attrs:{data:e.data}})],1),["group","dynamic"].includes(e.data.type)?e._e():i("el-collapse-item",{attrs:{name:"2",title:"事件属性"}},[i("el-form-item",{attrs:{label:"change"}},[i("avue-input",{attrs:{type:"textarea",placeholder:"改变事件",rows:"5",clearable:""},model:{value:e.data.change,callback:function(t){e.$set(e.data,"change",t)},expression:"data.change"}})],1),i("el-form-item",{attrs:{label:"click"}},[i("el-input",{attrs:{type:"textarea",placeholder:"点击事件",rows:"5"},model:{value:e.data.click,callback:function(t){e.$set(e.data,"click",t)},expression:"data.click"}})],1),i("el-form-item",{attrs:{label:"focus"}},[i("el-input",{attrs:{type:"textarea",placeholder:"获取焦点事件",rows:"5"},model:{value:e.data.focus,callback:function(t){e.$set(e.data,"focus",t)},expression:"data.focus"}})],1),i("el-form-item",{attrs:{label:"blur"}},[i("el-input",{attrs:{type:"textarea",placeholder:"失去焦点事件",rows:"5"},model:{value:e.data.blur,callback:function(t){e.$set(e.data,"blur",t)},expression:"data.blur"}})],1)],1)],1)],1):i("avue-empty",{staticStyle:{"margin-top":"100%"},attrs:{desc:"拖拽字段进行配置"}})],1)},o=[],r=(i("eb46"),i("2f62"),i("fa89"),i("d31d"),i("f96e"),i("fc08"),i("d543")),s=i("1e33"),a=["year","month","week","date","datetime","time","daterange","timerange","datetimerange","dates"],l={name:"widget-config",props:["data"],computed:{getComponent:function(){var e="config-",t=this.data,i=t.type,n=t.component;if(!i||n)return e+"custom";var o="input";return o=[void 0,"input","password","url"].includes(i)?"input":a.includes(i)?"date":["array","img"].includes(i)?"array":i,e+o}},data:function(){return{fields:s["a"],collapse:"1"}},methods:{handleChangeType:function(e){var t=this;return Object(r["a"])(regeneratorRuntime.mark((function i(){var n,o,r;return regeneratorRuntime.wrap((function(i){while(1)switch(i.prev=i.next){case 0:if(!e){i.next=6;break}return i.next=3,t.getConfigByType(e);case 3:for(o in n=i.sent,n.prop=t.data.prop,n)n&&Object.prototype.hasOwnProperty.call(n,o)&&!["icon","label","span"].includes(o)&&(r=n[o],t.$set(t.data,o,r));case 6:case"end":return i.stop()}}),i)})))()},getConfigByType:function(e){return new Promise((function(t,i){s["a"].forEach((function(i){i.list.forEach((function(i){i.type==e&&t(i)}))})),i()}))}}},c=l,h=i("e3d4"),d=Object(h["a"])(c,n,o,!1,null,null,null);t["a"]=d.exports},d85b:function(e,t){e.exports={}},d895:function(e,t,i){"use strict";i("085b"),i("99ab");var n=i("863c"),o=i("5491"),r=i("7eca"),s=i("7f36"),a={},l={},c=function(){function e(e){var t=this;this._languageId=e,this._loadingTriggered=!1,this._lazyLoadPromise=new Promise((function(e,i){t._lazyLoadPromiseResolve=e,t._lazyLoadPromiseReject=i}))}return e.getOrCreate=function(t){return l[t]||(l[t]=new e(t)),l[t]},e.prototype.whenLoaded=function(){return this._lazyLoadPromise},e.prototype.load=function(){var e=this;return this._loadingTriggered||(this._loadingTriggered=!0,a[this._languageId].loader().then((function(t){return e._lazyLoadPromiseResolve(t)}),(function(t){return e._lazyLoadPromiseReject(t)}))),this._lazyLoadPromise},e}();function h(e){var t=e.id;a[t]=e,s["a"].register(e);var i=c.getOrCreate(t);s["a"].setMonarchTokensProvider(t,i.whenLoaded().then((function(e){return e.language}))),s["a"].onLanguage(t,(function(){i.load().then((function(e){s["a"].setLanguageConfiguration(t,e.conf)}))}))}h({id:"javascript",extensions:[".js",".es6",".jsx",".mjs"],firstLine:"^#!.*\\bnode",filenames:["jakefile"],aliases:["JavaScript","javascript","js"],mimetypes:["text/javascript"],loader:function(){return i.e(1).then(i.bind(null,"f8f9"))}});var d=i("826e");function u(){}t["a"]={name:"MonacoEditor",props:{diffEditor:{type:Boolean,default:!1},width:{type:[String,Number],default:"100%"},height:{type:[String,Number],default:"100%"},original:String,value:[String,Object],language:{type:String,default:"javascript"},theme:{type:String,default:"vs"},readOnly:{type:Boolean,default:!1},options:{type:Object,default:function(){return{}}},editorMounted:{type:Function,default:u},editorBeforeMount:{type:Function,default:u},keyIndex:{type:String}},watch:{options:{deep:!0,handler:function(e){this.editor&&this.editor.updateOptions(e)}},keyIndex:function(){var e=this.value;"object"==Object(o["a"])(e)&&(e=Object(d["a"])(e),this.editor&&e!==this._getValue()&&this._setValue(e))},language:function(){if(this.editor)if(this.diffEditor){var e=this.editor.getModel(),t=e.original,i=e.modified;r["editor"].setModelLanguage(t,this.language),r["editor"].setModelLanguage(i,this.language)}else r["editor"].setModelLanguage(this.editor.getModel(),this.language)},theme:function(){this.editor&&r["editor"].setTheme(this.theme)},style:function(){var e=this;this.editor&&this.$nextTick((function(){e.editor.layout()}))}},computed:{style:function(){return{width:/^\d+$/.test(this.width)?"".concat(this.width,"px"):this.width,height:/^\d+$/.test(this.height)?"".concat(this.height,"px"):this.height}}},mounted:function(){this.initMonaco()},beforeDestroy:function(){this.editor&&this.editor.dispose()},render:function(){var e=arguments[0];return e("div",{class:"monaco_editor_container",style:this.style})},methods:{initMonaco:function(){var e=this.value,t=this.language,i=this.theme,o=this.readOnly,s=this.options;Object.assign(s,this._editorBeforeMount()),this.editor=r["editor"][this.diffEditor?"createDiffEditor":"create"](this.$el,Object(n["a"])({value:"string"==typeof e?e:Object(d["a"])(e),language:t,theme:i,readOnly:o},s)),this.diffEditor&&this._setModel(this.value,this.original),this._editorMounted(this.editor)},_getEditor:function(){return this.editor?this.diffEditor?this.editor.modifiedEditor:this.editor:null},_setModel:function(e,t){var i=this.language,n=r["editor"].createModel(t,i),o=r["editor"].createModel(e,i);this.editor.setModel({original:n,modified:o})},_setValue:function(e){var t=this._getEditor();if(t)return t.setValue(e)},_getValue:function(){var e=this._getEditor();return e?e.getValue():""},_editorBeforeMount:function(){var e=this.editorBeforeMount(r);return e||{}},_editorMounted:function(e){var t=this;this.editorMounted(e,r),this.diffEditor?e.onDidUpdateDiff((function(e){var i=t._getValue();t._emitChange(i,e)})):e.onDidChangeModelContent((function(e){var i=t._getValue();t._emitChange(i,e)}))},_emitChange:function(e,t){this.$emit("change",e,t),this.$emit("input",e)}}}},d927:function(e,t,i){"use strict";var n=i("83ec"),o=i("3352"),r=i("80db"),s=i("ce47"),a=i("c673"),l=i("f152"),c=i("acd4"),h=i("72d4"),d=i("9f1e"),u=h("splice"),g=d("splice",{ACCESSORS:!0,0:0,1:2}),f=Math.max,m=Math.min,p=9007199254740991,_="Maximum allowed length exceeded";n({target:"Array",proto:!0,forced:!u||!g},{splice:function(e,t){var i,n,h,d,u,g,b=a(this),v=s(b.length),w=o(e,v),C=arguments.length;if(0===C?i=n=0:1===C?(i=0,n=v-w):(i=C-2,n=m(f(r(t),0),v-w)),v+i-n>p)throw TypeError(_);for(h=l(b,n),d=0;d<n;d++)u=w+d,u in b&&c(h,d,b[u]);if(h.length=n,i<n){for(d=w;d<v-n;d++)u=d+n,g=d+i,u in b?b[g]=b[u]:delete b[g];for(d=v;d>v-n+i;d--)delete b[d-1]}else if(i>n)for(d=v-n;d>w;d--)u=d+n-1,g=d+i-1,u in b?b[g]=b[u]:delete b[g];for(d=0;d<i;d++)b[d+w]=arguments[d+2];return b.length=v-n+i,h}})},d958:function(e,t,i){(function(t,n){e.exports=n(i("76d1"))})("undefined"!==typeof self&&self,(function(e){return function(e){var t={};function i(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,i),o.l=!0,o.exports}return i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)i.d(n,o,function(t){return e[t]}.bind(null,o));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s="fb15")}({"01f9":function(e,t,i){"use strict";var n=i("2d00"),o=i("5ca1"),r=i("2aba"),s=i("32e9"),a=i("84f2"),l=i("41a0"),c=i("7f20"),h=i("38fd"),d=i("2b4c")("iterator"),u=!([].keys&&"next"in[].keys()),g="@@iterator",f="keys",m="values",p=function(){return this};e.exports=function(e,t,i,_,b,v,w){l(i,t,_);var C,y,S,x=function(e){if(!u&&e in D)return D[e];switch(e){case f:return function(){return new i(this,e)};case m:return function(){return new i(this,e)}}return function(){return new i(this,e)}},L=t+" Iterator",k=b==m,E=!1,D=e.prototype,N=D[d]||D[g]||b&&D[b],T=N||x(b),M=b?k?x("entries"):T:void 0,I="Array"==t&&D.entries||N;if(I&&(S=h(I.call(new e)),S!==Object.prototype&&S.next&&(c(S,L,!0),n||"function"==typeof S[d]||s(S,d,p))),k&&N&&N.name!==m&&(E=!0,T=function(){return N.call(this)}),n&&!w||!u&&!E&&D[d]||s(D,d,T),a[t]=T,a[L]=p,b)if(C={values:k?T:x(m),keys:v?T:x(f),entries:M},w)for(y in C)y in D||r(D,y,C[y]);else o(o.P+o.F*(u||E),t,C);return C}},"02f4":function(e,t,i){var n=i("4588"),o=i("be13");e.exports=function(e){return function(t,i){var r,s,a=String(o(t)),l=n(i),c=a.length;return l<0||l>=c?e?"":void 0:(r=a.charCodeAt(l),r<55296||r>56319||l+1===c||(s=a.charCodeAt(l+1))<56320||s>57343?e?a.charAt(l):r:e?a.slice(l,l+2):s-56320+(r-55296<<10)+65536)}}},"0390":function(e,t,i){"use strict";var n=i("02f4")(!0);e.exports=function(e,t,i){return t+(i?n(e,t).length:1)}},"0bfb":function(e,t,i){"use strict";var n=i("cb7c");e.exports=function(){var e=n(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},"0d58":function(e,t,i){var n=i("ce10"),o=i("e11e");e.exports=Object.keys||function(e){return n(e,o)}},1495:function(e,t,i){var n=i("86cc"),o=i("cb7c"),r=i("0d58");e.exports=i("9e1e")?Object.defineProperties:function(e,t){o(e);var i,s=r(t),a=s.length,l=0;while(a>l)n.f(e,i=s[l++],t[i]);return e}},"214f":function(e,t,i){"use strict";i("b0c5");var n=i("2aba"),o=i("32e9"),r=i("79e5"),s=i("be13"),a=i("2b4c"),l=i("520a"),c=a("species"),h=!r((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")})),d=function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var i="ab".split(e);return 2===i.length&&"a"===i[0]&&"b"===i[1]}();e.exports=function(e,t,i){var u=a(e),g=!r((function(){var t={};return t[u]=function(){return 7},7!=""[e](t)})),f=g?!r((function(){var t=!1,i=/a/;return i.exec=function(){return t=!0,null},"split"===e&&(i.constructor={},i.constructor[c]=function(){return i}),i[u](""),!t})):void 0;if(!g||!f||"replace"===e&&!h||"split"===e&&!d){var m=/./[u],p=i(s,u,""[e],(function(e,t,i,n,o){return t.exec===l?g&&!o?{done:!0,value:m.call(t,i,n)}:{done:!0,value:e.call(i,t,n)}:{done:!1}})),_=p[0],b=p[1];n(String.prototype,e,_),o(RegExp.prototype,u,2==t?function(e,t){return b.call(e,this,t)}:function(e){return b.call(e,this)})}}},"230e":function(e,t,i){var n=i("d3f4"),o=i("7726").document,r=n(o)&&n(o.createElement);e.exports=function(e){return r?o.createElement(e):{}}},"23c6":function(e,t,i){var n=i("2d95"),o=i("2b4c")("toStringTag"),r="Arguments"==n(function(){return arguments}()),s=function(e,t){try{return e[t]}catch(i){}};e.exports=function(e){var t,i,a;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(i=s(t=Object(e),o))?i:r?n(t):"Object"==(a=n(t))&&"function"==typeof t.callee?"Arguments":a}},2621:function(e,t){t.f=Object.getOwnPropertySymbols},"2aba":function(e,t,i){var n=i("7726"),o=i("32e9"),r=i("69a8"),s=i("ca5a")("src"),a=i("fa5b"),l="toString",c=(""+a).split(l);i("8378").inspectSource=function(e){return a.call(e)},(e.exports=function(e,t,i,a){var l="function"==typeof i;l&&(r(i,"name")||o(i,"name",t)),e[t]!==i&&(l&&(r(i,s)||o(i,s,e[t]?""+e[t]:c.join(String(t)))),e===n?e[t]=i:a?e[t]?e[t]=i:o(e,t,i):(delete e[t],o(e,t,i)))})(Function.prototype,l,(function(){return"function"==typeof this&&this[s]||a.call(this)}))},"2aeb":function(e,t,i){var n=i("cb7c"),o=i("1495"),r=i("e11e"),s=i("613b")("IE_PROTO"),a=function(){},l="prototype",c=function(){var e,t=i("230e")("iframe"),n=r.length,o="<",s=">";t.style.display="none",i("fab2").appendChild(t),t.src="javascript:",e=t.contentWindow.document,e.open(),e.write(o+"script"+s+"document.F=Object"+o+"/script"+s),e.close(),c=e.F;while(n--)delete c[l][r[n]];return c()};e.exports=Object.create||function(e,t){var i;return null!==e?(a[l]=n(e),i=new a,a[l]=null,i[s]=e):i=c(),void 0===t?i:o(i,t)}},"2b4c":function(e,t,i){var n=i("5537")("wks"),o=i("ca5a"),r=i("7726").Symbol,s="function"==typeof r,a=e.exports=function(e){return n[e]||(n[e]=s&&r[e]||(s?r:o)("Symbol."+e))};a.store=n},"2d00":function(e,t){e.exports=!1},"2d95":function(e,t){var i={}.toString;e.exports=function(e){return i.call(e).slice(8,-1)}},"2fdb":function(e,t,i){"use strict";var n=i("5ca1"),o=i("d2c8"),r="includes";n(n.P+n.F*i("5147")(r),"String",{includes:function(e){return!!~o(this,e,r).indexOf(e,arguments.length>1?arguments[1]:void 0)}})},"32e9":function(e,t,i){var n=i("86cc"),o=i("4630");e.exports=i("9e1e")?function(e,t,i){return n.f(e,t,o(1,i))}:function(e,t,i){return e[t]=i,e}},"38fd":function(e,t,i){var n=i("69a8"),o=i("4bf8"),r=i("613b")("IE_PROTO"),s=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=o(e),n(e,r)?e[r]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?s:null}},"41a0":function(e,t,i){"use strict";var n=i("2aeb"),o=i("4630"),r=i("7f20"),s={};i("32e9")(s,i("2b4c")("iterator"),(function(){return this})),e.exports=function(e,t,i){e.prototype=n(s,{next:o(1,i)}),r(e,t+" Iterator")}},"456d":function(e,t,i){var n=i("4bf8"),o=i("0d58");i("5eda")("keys",(function(){return function(e){return o(n(e))}}))},4588:function(e,t){var i=Math.ceil,n=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?n:i)(e)}},4630:function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},"4bf8":function(e,t,i){var n=i("be13");e.exports=function(e){return Object(n(e))}},5147:function(e,t,i){var n=i("2b4c")("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(i){try{return t[n]=!1,!"/./"[e](t)}catch(o){}}return!0}},"520a":function(e,t,i){"use strict";var n=i("0bfb"),o=RegExp.prototype.exec,r=String.prototype.replace,s=o,a="lastIndex",l=function(){var e=/a/,t=/b*/g;return o.call(e,"a"),o.call(t,"a"),0!==e[a]||0!==t[a]}(),c=void 0!==/()??/.exec("")[1],h=l||c;h&&(s=function(e){var t,i,s,h,d=this;return c&&(i=new RegExp("^"+d.source+"$(?!\\s)",n.call(d))),l&&(t=d[a]),s=o.call(d,e),l&&s&&(d[a]=d.global?s.index+s[0].length:t),c&&s&&s.length>1&&r.call(s[0],i,(function(){for(h=1;h<arguments.length-2;h++)void 0===arguments[h]&&(s[h]=void 0)})),s}),e.exports=s},"52a7":function(e,t){t.f={}.propertyIsEnumerable},5537:function(e,t,i){var n=i("8378"),o=i("7726"),r="__core-js_shared__",s=o[r]||(o[r]={});(e.exports=function(e,t){return s[e]||(s[e]=void 0!==t?t:{})})("versions",[]).push({version:n.version,mode:i("2d00")?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},"5ca1":function(e,t,i){var n=i("7726"),o=i("8378"),r=i("32e9"),s=i("2aba"),a=i("9b43"),l="prototype",c=function(e,t,i){var h,d,u,g,f=e&c.F,m=e&c.G,p=e&c.S,_=e&c.P,b=e&c.B,v=m?n:p?n[t]||(n[t]={}):(n[t]||{})[l],w=m?o:o[t]||(o[t]={}),C=w[l]||(w[l]={});for(h in m&&(i=t),i)d=!f&&v&&void 0!==v[h],u=(d?v:i)[h],g=b&&d?a(u,n):_&&"function"==typeof u?a(Function.call,u):u,v&&s(v,h,u,e&c.U),w[h]!=u&&r(w,h,g),_&&C[h]!=u&&(C[h]=u)};n.core=o,c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,e.exports=c},"5eda":function(e,t,i){var n=i("5ca1"),o=i("8378"),r=i("79e5");e.exports=function(e,t){var i=(o.Object||{})[e]||Object[e],s={};s[e]=t(i),n(n.S+n.F*r((function(){i(1)})),"Object",s)}},"5f1b":function(e,t,i){"use strict";var n=i("23c6"),o=RegExp.prototype.exec;e.exports=function(e,t){var i=e.exec;if("function"===typeof i){var r=i.call(e,t);if("object"!==typeof r)throw new TypeError("RegExp exec method returned something other than an Object or null");return r}if("RegExp"!==n(e))throw new TypeError("RegExp#exec called on incompatible receiver");return o.call(e,t)}},"613b":function(e,t,i){var n=i("5537")("keys"),o=i("ca5a");e.exports=function(e){return n[e]||(n[e]=o(e))}},"626a":function(e,t,i){var n=i("2d95");e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==n(e)?e.split(""):Object(e)}},6762:function(e,t,i){"use strict";var n=i("5ca1"),o=i("c366")(!0);n(n.P,"Array",{includes:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}}),i("9c6c")("includes")},6821:function(e,t,i){var n=i("626a"),o=i("be13");e.exports=function(e){return n(o(e))}},"69a8":function(e,t){var i={}.hasOwnProperty;e.exports=function(e,t){return i.call(e,t)}},"6a99":function(e,t,i){var n=i("d3f4");e.exports=function(e,t){if(!n(e))return e;var i,o;if(t&&"function"==typeof(i=e.toString)&&!n(o=i.call(e)))return o;if("function"==typeof(i=e.valueOf)&&!n(o=i.call(e)))return o;if(!t&&"function"==typeof(i=e.toString)&&!n(o=i.call(e)))return o;throw TypeError("Can't convert object to primitive value")}},7333:function(e,t,i){"use strict";var n=i("0d58"),o=i("2621"),r=i("52a7"),s=i("4bf8"),a=i("626a"),l=Object.assign;e.exports=!l||i("79e5")((function(){var e={},t={},i=Symbol(),n="abcdefghijklmnopqrst";return e[i]=7,n.split("").forEach((function(e){t[e]=e})),7!=l({},e)[i]||Object.keys(l({},t)).join("")!=n}))?function(e,t){var i=s(e),l=arguments.length,c=1,h=o.f,d=r.f;while(l>c){var u,g=a(arguments[c++]),f=h?n(g).concat(h(g)):n(g),m=f.length,p=0;while(m>p)d.call(g,u=f[p++])&&(i[u]=g[u])}return i}:l},7726:function(e,t){var i=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=i)},"77f1":function(e,t,i){var n=i("4588"),o=Math.max,r=Math.min;e.exports=function(e,t){return e=n(e),e<0?o(e+t,0):r(e,t)}},"79e5":function(e,t){e.exports=function(e){try{return!!e()}catch(t){return!0}}},"7f20":function(e,t,i){var n=i("86cc").f,o=i("69a8"),r=i("2b4c")("toStringTag");e.exports=function(e,t,i){e&&!o(e=i?e:e.prototype,r)&&n(e,r,{configurable:!0,value:t})}},8378:function(e,t){var i=e.exports={version:"2.6.5"};"number"==typeof __e&&(__e=i)},"84f2":function(e,t){e.exports={}},"86cc":function(e,t,i){var n=i("cb7c"),o=i("c69a"),r=i("6a99"),s=Object.defineProperty;t.f=i("9e1e")?Object.defineProperty:function(e,t,i){if(n(e),t=r(t,!0),n(i),o)try{return s(e,t,i)}catch(a){}if("get"in i||"set"in i)throw TypeError("Accessors not supported!");return"value"in i&&(e[t]=i.value),e}},"9b43":function(e,t,i){var n=i("d8e8");e.exports=function(e,t,i){if(n(e),void 0===t)return e;switch(i){case 1:return function(i){return e.call(t,i)};case 2:return function(i,n){return e.call(t,i,n)};case 3:return function(i,n,o){return e.call(t,i,n,o)}}return function(){return e.apply(t,arguments)}}},"9c6c":function(e,t,i){var n=i("2b4c")("unscopables"),o=Array.prototype;void 0==o[n]&&i("32e9")(o,n,{}),e.exports=function(e){o[n][e]=!0}},"9def":function(e,t,i){var n=i("4588"),o=Math.min;e.exports=function(e){return e>0?o(n(e),9007199254740991):0}},"9e1e":function(e,t,i){e.exports=!i("79e5")((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},a352:function(t,i){t.exports=e},a481:function(e,t,i){"use strict";var n=i("cb7c"),o=i("4bf8"),r=i("9def"),s=i("4588"),a=i("0390"),l=i("5f1b"),c=Math.max,h=Math.min,d=Math.floor,u=/\$([$&`']|\d\d?|<[^>]*>)/g,g=/\$([$&`']|\d\d?)/g,f=function(e){return void 0===e?e:String(e)};i("214f")("replace",2,(function(e,t,i,m){return[function(n,o){var r=e(this),s=void 0==n?void 0:n[t];return void 0!==s?s.call(n,r,o):i.call(String(r),n,o)},function(e,t){var o=m(i,e,this,t);if(o.done)return o.value;var d=n(e),u=String(this),g="function"===typeof t;g||(t=String(t));var _=d.global;if(_){var b=d.unicode;d.lastIndex=0}var v=[];while(1){var w=l(d,u);if(null===w)break;if(v.push(w),!_)break;var C=String(w[0]);""===C&&(d.lastIndex=a(u,r(d.lastIndex),b))}for(var y="",S=0,x=0;x<v.length;x++){w=v[x];for(var L=String(w[0]),k=c(h(s(w.index),u.length),0),E=[],D=1;D<w.length;D++)E.push(f(w[D]));var N=w.groups;if(g){var T=[L].concat(E,k,u);void 0!==N&&T.push(N);var M=String(t.apply(void 0,T))}else M=p(L,u,k,E,N,t);k>=S&&(y+=u.slice(S,k)+M,S=k+L.length)}return y+u.slice(S)}];function p(e,t,n,r,s,a){var l=n+e.length,c=r.length,h=g;return void 0!==s&&(s=o(s),h=u),i.call(a,h,(function(i,o){var a;switch(o.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,n);case"'":return t.slice(l);case"<":a=s[o.slice(1,-1)];break;default:var h=+o;if(0===h)return i;if(h>c){var u=d(h/10);return 0===u?i:u<=c?void 0===r[u-1]?o.charAt(1):r[u-1]+o.charAt(1):i}a=r[h-1]}return void 0===a?"":a}))}}))},aae3:function(e,t,i){var n=i("d3f4"),o=i("2d95"),r=i("2b4c")("match");e.exports=function(e){var t;return n(e)&&(void 0!==(t=e[r])?!!t:"RegExp"==o(e))}},ac6a:function(e,t,i){for(var n=i("cadf"),o=i("0d58"),r=i("2aba"),s=i("7726"),a=i("32e9"),l=i("84f2"),c=i("2b4c"),h=c("iterator"),d=c("toStringTag"),u=l.Array,g={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},f=o(g),m=0;m<f.length;m++){var p,_=f[m],b=g[_],v=s[_],w=v&&v.prototype;if(w&&(w[h]||a(w,h,u),w[d]||a(w,d,_),l[_]=u,b))for(p in n)w[p]||r(w,p,n[p],!0)}},b0c5:function(e,t,i){"use strict";var n=i("520a");i("5ca1")({target:"RegExp",proto:!0,forced:n!==/./.exec},{exec:n})},be13:function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},c366:function(e,t,i){var n=i("6821"),o=i("9def"),r=i("77f1");e.exports=function(e){return function(t,i,s){var a,l=n(t),c=o(l.length),h=r(s,c);if(e&&i!=i){while(c>h)if(a=l[h++],a!=a)return!0}else for(;c>h;h++)if((e||h in l)&&l[h]===i)return e||h||0;return!e&&-1}}},c649:function(e,t,i){"use strict";(function(e){i.d(t,"c",(function(){return c})),i.d(t,"a",(function(){return a})),i.d(t,"b",(function(){return o})),i.d(t,"d",(function(){return l}));i("a481");function n(){return"undefined"!==typeof window?window.console:e.console}var o=n();function r(e){var t=Object.create(null);return function(i){var n=t[i];return n||(t[i]=e(i))}}var s=/-(\w)/g,a=r((function(e){return e.replace(s,(function(e,t){return t?t.toUpperCase():""}))}));function l(e){null!==e.parentElement&&e.parentElement.removeChild(e)}function c(e,t,i){var n=0===i?e.children[0]:e.children[i-1].nextSibling;e.insertBefore(t,n)}}).call(this,i("c8ba"))},c69a:function(e,t,i){e.exports=!i("9e1e")&&!i("79e5")((function(){return 7!=Object.defineProperty(i("230e")("div"),"a",{get:function(){return 7}}).a}))},c8ba:function(e,t){var i;i=function(){return this}();try{i=i||new Function("return this")()}catch(n){"object"===typeof window&&(i=window)}e.exports=i},ca5a:function(e,t){var i=0,n=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++i+n).toString(36))}},cadf:function(e,t,i){"use strict";var n=i("9c6c"),o=i("d53b"),r=i("84f2"),s=i("6821");e.exports=i("01f9")(Array,"Array",(function(e,t){this._t=s(e),this._i=0,this._k=t}),(function(){var e=this._t,t=this._k,i=this._i++;return!e||i>=e.length?(this._t=void 0,o(1)):o(0,"keys"==t?i:"values"==t?e[i]:[i,e[i]])}),"values"),r.Arguments=r.Array,n("keys"),n("values"),n("entries")},cb7c:function(e,t,i){var n=i("d3f4");e.exports=function(e){if(!n(e))throw TypeError(e+" is not an object!");return e}},ce10:function(e,t,i){var n=i("69a8"),o=i("6821"),r=i("c366")(!1),s=i("613b")("IE_PROTO");e.exports=function(e,t){var i,a=o(e),l=0,c=[];for(i in a)i!=s&&n(a,i)&&c.push(i);while(t.length>l)n(a,i=t[l++])&&(~r(c,i)||c.push(i));return c}},d2c8:function(e,t,i){var n=i("aae3"),o=i("be13");e.exports=function(e,t,i){if(n(t))throw TypeError("String#"+i+" doesn't accept regex!");return String(o(e))}},d3f4:function(e,t){e.exports=function(e){return"object"===typeof e?null!==e:"function"===typeof e}},d53b:function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},d8e8:function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},e11e:function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},f559:function(e,t,i){"use strict";var n=i("5ca1"),o=i("9def"),r=i("d2c8"),s="startsWith",a=""[s];n(n.P+n.F*i("5147")(s),"String",{startsWith:function(e){var t=r(this,e,s),i=o(Math.min(arguments.length>1?arguments[1]:void 0,t.length)),n=String(e);return a?a.call(t,n,i):t.slice(i,i+n.length)===n}})},f6fd:function(e,t){(function(e){var t="currentScript",i=e.getElementsByTagName("script");t in e||Object.defineProperty(e,t,{get:function(){try{throw new Error}catch(n){var e,t=(/.*at [^\(]*\((.*):.+:.+\)$/gi.exec(n.stack)||[!1])[1];for(e in i)if(i[e].src==t||"interactive"==i[e].readyState)return i[e];return null}}})})(document)},f751:function(e,t,i){var n=i("5ca1");n(n.S+n.F,"Object",{assign:i("7333")})},fa5b:function(e,t,i){e.exports=i("5537")("native-function-to-string",Function.toString)},fab2:function(e,t,i){var n=i("7726").document;e.exports=n&&n.documentElement},fb15:function(e,t,i){"use strict";var n;(i.r(t),"undefined"!==typeof window)&&(i("f6fd"),(n=window.document.currentScript)&&(n=n.src.match(/(.+\/)[^/]+\.js(\?.*)?$/))&&(i.p=n[1]));i("f751"),i("f559"),i("ac6a"),i("cadf"),i("456d");function o(e){if(Array.isArray(e))return e}function r(e,t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e)){var i=[],n=!0,o=!1,r=void 0;try{for(var s,a=e[Symbol.iterator]();!(n=(s=a.next()).done);n=!0)if(i.push(s.value),t&&i.length===t)break}catch(l){o=!0,r=l}finally{try{n||null==a["return"]||a["return"]()}finally{if(o)throw r}}return i}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}function a(e,t){if(e){if("string"===typeof e)return s(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?s(e,t):void 0}}function l(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function c(e,t){return o(e)||r(e,t)||a(e,t)||l()}i("6762"),i("2fdb");function h(e){if(Array.isArray(e))return s(e)}function d(e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}function u(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function g(e){return h(e)||d(e)||a(e)||u()}var f=i("a352"),m=i.n(f),p=i("c649");function _(e,t,i){return void 0===i||(e=e||{},e[t]=i),e}function b(e,t){return e.map((function(e){return e.elm})).indexOf(t)}function v(e,t,i,n){if(!e)return[];var o=e.map((function(e){return e.elm})),r=t.length-n,s=g(t).map((function(e,t){return t>=r?o.length:o.indexOf(e)}));return i?s.filter((function(e){return-1!==e})):s}function w(e,t){var i=this;this.$nextTick((function(){return i.$emit(e.toLowerCase(),t)}))}function C(e){var t=this;return function(i){null!==t.realList&&t["onDrag"+e](i),w.call(t,e,i)}}function y(e){return["transition-group","TransitionGroup"].includes(e)}function S(e){if(!e||1!==e.length)return!1;var t=c(e,1),i=t[0].componentOptions;return!!i&&y(i.tag)}function x(e,t,i){return e[i]||(t[i]?t[i]():void 0)}function L(e,t,i){var n=0,o=0,r=x(t,i,"header");r&&(n=r.length,e=e?[].concat(g(r),g(e)):g(r));var s=x(t,i,"footer");return s&&(o=s.length,e=e?[].concat(g(e),g(s)):g(s)),{children:e,headerOffset:n,footerOffset:o}}function k(e,t){var i=null,n=function(e,t){i=_(i,e,t)},o=Object.keys(e).filter((function(e){return"id"===e||e.startsWith("data-")})).reduce((function(t,i){return t[i]=e[i],t}),{});if(n("attrs",o),!t)return i;var r=t.on,s=t.props,a=t.attrs;return n("on",r),n("props",s),Object.assign(i.attrs,a),i}var E=["Start","Add","Remove","Update","End"],D=["Choose","Unchoose","Sort","Filter","Clone"],N=["Move"].concat(E,D).map((function(e){return"on"+e})),T=null,M={options:Object,list:{type:Array,required:!1,default:null},value:{type:Array,required:!1,default:null},noTransitionOnDrag:{type:Boolean,default:!1},clone:{type:Function,default:function(e){return e}},element:{type:String,default:"div"},tag:{type:String,default:null},move:{type:Function,default:null},componentData:{type:Object,required:!1,default:null}},I={name:"draggable",inheritAttrs:!1,props:M,data:function(){return{transitionMode:!1,noneFunctionalComponentMode:!1}},render:function(e){var t=this.$slots.default;this.transitionMode=S(t);var i=L(t,this.$slots,this.$scopedSlots),n=i.children,o=i.headerOffset,r=i.footerOffset;this.headerOffset=o,this.footerOffset=r;var s=k(this.$attrs,this.componentData);return e(this.getTag(),s,n)},created:function(){null!==this.list&&null!==this.value&&p["b"].error("Value and list props are mutually exclusive! Please set one or another."),"div"!==this.element&&p["b"].warn("Element props is deprecated please use tag props instead. See https://github.com/SortableJS/Vue.Draggable/blob/master/documentation/migrate.md#element-props"),void 0!==this.options&&p["b"].warn("Options props is deprecated, add sortable options directly as vue.draggable item, or use v-bind. See https://github.com/SortableJS/Vue.Draggable/blob/master/documentation/migrate.md#options-props")},mounted:function(){var e=this;if(this.noneFunctionalComponentMode=this.getTag().toLowerCase()!==this.$el.nodeName.toLowerCase()&&!this.getIsFunctional(),this.noneFunctionalComponentMode&&this.transitionMode)throw new Error("Transition-group inside component is not supported. Please alter tag value or remove transition-group. Current tag value: ".concat(this.getTag()));var t={};E.forEach((function(i){t["on"+i]=C.call(e,i)})),D.forEach((function(i){t["on"+i]=w.bind(e,i)}));var i=Object.keys(this.$attrs).reduce((function(t,i){return t[Object(p["a"])(i)]=e.$attrs[i],t}),{}),n=Object.assign({},this.options,i,t,{onMove:function(t,i){return e.onDragMove(t,i)}});!("draggable"in n)&&(n.draggable=">*"),this._sortable=new m.a(this.rootContainer,n),this.computeIndexes()},beforeDestroy:function(){void 0!==this._sortable&&this._sortable.destroy()},computed:{rootContainer:function(){return this.transitionMode?this.$el.children[0]:this.$el},realList:function(){return this.list?this.list:this.value}},watch:{options:{handler:function(e){this.updateOptions(e)},deep:!0},$attrs:{handler:function(e){this.updateOptions(e)},deep:!0},realList:function(){this.computeIndexes()}},methods:{getIsFunctional:function(){var e=this._vnode.fnOptions;return e&&e.functional},getTag:function(){return this.tag||this.element},updateOptions:function(e){for(var t in e){var i=Object(p["a"])(t);-1===N.indexOf(i)&&this._sortable.option(i,e[t])}},getChildrenNodes:function(){if(this.noneFunctionalComponentMode)return this.$children[0].$slots.default;var e=this.$slots.default;return this.transitionMode?e[0].child.$slots.default:e},computeIndexes:function(){var e=this;this.$nextTick((function(){e.visibleIndexes=v(e.getChildrenNodes(),e.rootContainer.children,e.transitionMode,e.footerOffset)}))},getUnderlyingVm:function(e){var t=b(this.getChildrenNodes()||[],e);if(-1===t)return null;var i=this.realList[t];return{index:t,element:i}},getUnderlyingPotencialDraggableComponent:function(e){var t=e.__vue__;return t&&t.$options&&y(t.$options._componentTag)?t.$parent:!("realList"in t)&&1===t.$children.length&&"realList"in t.$children[0]?t.$children[0]:t},emitChanges:function(e){var t=this;this.$nextTick((function(){t.$emit("change",e)}))},alterList:function(e){if(this.list)e(this.list);else{var t=g(this.value);e(t),this.$emit("input",t)}},spliceList:function(){var e=arguments,t=function(t){return t.splice.apply(t,g(e))};this.alterList(t)},updatePosition:function(e,t){var i=function(i){return i.splice(t,0,i.splice(e,1)[0])};this.alterList(i)},getRelatedContextFromMoveEvent:function(e){var t=e.to,i=e.related,n=this.getUnderlyingPotencialDraggableComponent(t);if(!n)return{component:n};var o=n.realList,r={list:o,component:n};if(t!==i&&o&&n.getUnderlyingVm){var s=n.getUnderlyingVm(i);if(s)return Object.assign(s,r)}return r},getVmIndex:function(e){var t=this.visibleIndexes,i=t.length;return e>i-1?i:t[e]},getComponent:function(){return this.$slots.default[0].componentInstance},resetTransitionData:function(e){if(this.noTransitionOnDrag&&this.transitionMode){var t=this.getChildrenNodes();t[e].data=null;var i=this.getComponent();i.children=[],i.kept=void 0}},onDragStart:function(e){this.context=this.getUnderlyingVm(e.item),e.item._underlying_vm_=this.clone(this.context.element),T=e.item},onDragAdd:function(e){var t=e.item._underlying_vm_;if(void 0!==t){Object(p["d"])(e.item);var i=this.getVmIndex(e.newIndex);this.spliceList(i,0,t),this.computeIndexes();var n={element:t,newIndex:i};this.emitChanges({added:n})}},onDragRemove:function(e){if(Object(p["c"])(this.rootContainer,e.item,e.oldIndex),"clone"!==e.pullMode){var t=this.context.index;this.spliceList(t,1);var i={element:this.context.element,oldIndex:t};this.resetTransitionData(t),this.emitChanges({removed:i})}else Object(p["d"])(e.clone)},onDragUpdate:function(e){Object(p["d"])(e.item),Object(p["c"])(e.from,e.item,e.oldIndex);var t=this.context.index,i=this.getVmIndex(e.newIndex);this.updatePosition(t,i);var n={element:this.context.element,oldIndex:t,newIndex:i};this.emitChanges({moved:n})},updateProperty:function(e,t){e.hasOwnProperty(t)&&(e[t]+=this.headerOffset)},computeFutureIndex:function(e,t){if(!e.element)return 0;var i=g(t.to.children).filter((function(e){return"none"!==e.style["display"]})),n=i.indexOf(t.related),o=e.component.getVmIndex(n),r=-1!==i.indexOf(T);return r||!t.willInsertAfter?o:o+1},onDragMove:function(e,t){var i=this.move;if(!i||!this.realList)return!0;var n=this.getRelatedContextFromMoveEvent(e),o=this.context,r=this.computeFutureIndex(n,e);Object.assign(o,{futureIndex:r});var s=Object.assign({},e,{relatedContext:n,draggedContext:o});return i(s,t)},onDragEnd:function(){this.computeIndexes(),T=null}}};"undefined"!==typeof window&&"Vue"in window&&window.Vue.component("draggable",I);var O=I;t["default"]=O}})["default"]}))},db65:function(e,t,i){var n=i("53c2");t=n(!1),t.push([e.i,".dic[data-v-727980f3]{display:-webkit-box;display:-ms-flexbox;display:flex;margin-bottom:5px}",""]),e.exports=t},dc8c:function(e,t,i){var n=i("fbcf");e.exports=function(e){var t=e["return"];if(void 0!==t)return n(t.call(e)).value}},df3c:function(e,t,i){var n=i("53c2");t=n(!1),t.push([e.i,".context-view{position:absolute;z-index:2500}.context-view.fixed{all:initial;font-family:inherit;font-size:13px;position:fixed;z-index:2500;color:inherit}",""]),e.exports=t},df70:function(e,t,i){var n=i("139d");"string"===typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);var o=i("4974").default;o("a4992a28",n,!0,{sourceMap:!1,shadowMode:!1})},df93:function(e,t,i){var n=i("e577");"string"===typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);var o=i("4974").default;o("0e249fd5",n,!0,{sourceMap:!1,shadowMode:!1})},dff0:function(e,t,i){var n=i("8dab");"string"===typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);var o=i("4974").default;o("24132abe",n,!0,{sourceMap:!1,shadowMode:!1})},e09a:function(e,t,i){var n=i("53c2");t=n(!1),t.push([e.i,".monaco-icon-label{display:-webkit-box;display:-ms-flexbox;display:flex;overflow:hidden;text-overflow:ellipsis}.monaco-icon-label:before{background-size:16px;background-position:0;background-repeat:no-repeat;padding-right:6px;width:16px;height:22px;line-height:inherit!important;display:inline-block;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;vertical-align:top;-ms-flex-negative:0;flex-shrink:0}.monaco-icon-label>.monaco-icon-label-container{min-width:0;overflow:hidden;text-overflow:ellipsis;-webkit-box-flex:1;-ms-flex:1;flex:1}.monaco-icon-label>.monaco-icon-label-container>.monaco-icon-name-container>.label-name{color:inherit;white-space:pre}.monaco-icon-label>.monaco-icon-label-container>.monaco-icon-name-container>.label-name>.label-separator{margin:0 2px;opacity:.5}.monaco-icon-label>.monaco-icon-label-container>.monaco-icon-description-container>.label-description{opacity:.7;margin-left:.5em;font-size:.9em;white-space:pre}.vs .monaco-icon-label>.monaco-icon-label-container>.monaco-icon-description-container>.label-description{opacity:.95}.monaco-icon-label.italic>.monaco-icon-description-container>.label-description,.monaco-icon-label.italic>.monaco-icon-label-container>.monaco-icon-name-container>.label-name{font-style:italic}.monaco-icon-label.strikethrough>.monaco-icon-description-container>.label-description,.monaco-icon-label.strikethrough>.monaco-icon-label-container>.monaco-icon-name-container>.label-name{text-decoration:line-through}.monaco-icon-label:after{opacity:.75;font-size:90%;font-weight:600;padding:0 16px 0 5px;text-align:center}.monaco-list:focus .selected .monaco-icon-label,.monaco-list:focus .selected .monaco-icon-label:after{color:inherit!important}.monaco-list-row.focused.selected .label-description,.monaco-list-row.selected .label-description{opacity:.8}",""]),e.exports=t},e0e0:function(e,t,i){"use strict";var n=i("15b2").IteratorPrototype,o=i("ca2b"),r=i("4d82"),s=i("63ef"),a=i("d85b"),l=function(){return this};e.exports=function(e,t,i){var c=t+" Iterator";return e.prototype=o(n,{next:r(1,i)}),s(e,c,!1,!0),a[c]=l,e}},e244:function(e,t,i){(function(t){var i=function(e){return e&&e.Math==Math&&e};e.exports=i("object"==typeof globalThis&&globalThis)||i("object"==typeof window&&window)||i("object"==typeof self&&self)||i("object"==typeof t&&t)||function(){return this}()||Function("return this")()}).call(this,i("c8ed"))},e248:function(e,t,i){var n=i("53c2");t=n(!1),t.push([e.i,".context-view .monaco-menu{min-width:130px}",""]),e.exports=t},e263:function(e,t,i){var n=i("53c2");t=n(!1),t.push([e.i,".monaco-editor .margin-view-overlays .cmdr{position:absolute;left:0;width:100%;height:100%}",""]),e.exports=t},e2da:function(e,t,i){"use strict";var n=i("45ad"),o=i("6e10"),r=i("d85b"),s=i("35d6"),a=i("325d"),l="Array Iterator",c=s.set,h=s.getterFor(l);e.exports=a(Array,"Array",(function(e,t){c(this,{type:l,target:n(e),index:0,kind:t})}),(function(){var e=h(this),t=e.target,i=e.kind,n=e.index++;return!t||n>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==i?{value:n,done:!1}:"values"==i?{value:t[n],done:!1}:{value:[n,t[n]],done:!1}}),"values"),r.Arguments=r.Array,o("keys"),o("values"),o("entries")},e3d4:function(e,t,i){"use strict";function n(e,t,i,n,o,r,s,a){var l,c="function"===typeof e?e.options:e;if(t&&(c.render=t,c.staticRenderFns=i,c._compiled=!0),n&&(c.functional=!0),r&&(c._scopeId="data-v-"+r),s?(l=function(e){e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,e||"undefined"===typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),o&&o.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(s)},c._ssrRegister=l):o&&(l=a?function(){o.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:o),l)if(c.functional){c._injectStyles=l;var h=c.render;c.render=function(e,t){return l.call(t),h(e,t)}}else{var d=c.beforeCreate;c.beforeCreate=d?[].concat(d,l):[l]}return{exports:e,options:c}}i.d(t,"a",(function(){return n}))},e3f4:function(e,t,i){(function(e){function i(e,t){for(var i=0,n=e.length-1;n>=0;n--){var o=e[n];"."===o?e.splice(n,1):".."===o?(e.splice(n,1),i++):i&&(e.splice(n,1),i--)}if(t)for(;i--;i)e.unshift("..");return e}function n(e){"string"!==typeof e&&(e+="");var t,i=0,n=-1,o=!0;for(t=e.length-1;t>=0;--t)if(47===e.charCodeAt(t)){if(!o){i=t+1;break}}else-1===n&&(o=!1,n=t+1);return-1===n?"":e.slice(i,n)}function o(e,t){if(e.filter)return e.filter(t);for(var i=[],n=0;n<e.length;n++)t(e[n],n,e)&&i.push(e[n]);return i}t.resolve=function(){for(var t="",n=!1,r=arguments.length-1;r>=-1&&!n;r--){var s=r>=0?arguments[r]:e.cwd();if("string"!==typeof s)throw new TypeError("Arguments to path.resolve must be strings");s&&(t=s+"/"+t,n="/"===s.charAt(0))}return t=i(o(t.split("/"),(function(e){return!!e})),!n).join("/"),(n?"/":"")+t||"."},t.normalize=function(e){var n=t.isAbsolute(e),s="/"===r(e,-1);return e=i(o(e.split("/"),(function(e){return!!e})),!n).join("/"),e||n||(e="."),e&&s&&(e+="/"),(n?"/":"")+e},t.isAbsolute=function(e){return"/"===e.charAt(0)},t.join=function(){var e=Array.prototype.slice.call(arguments,0);return t.normalize(o(e,(function(e,t){if("string"!==typeof e)throw new TypeError("Arguments to path.join must be strings");return e})).join("/"))},t.relative=function(e,i){function n(e){for(var t=0;t<e.length;t++)if(""!==e[t])break;for(var i=e.length-1;i>=0;i--)if(""!==e[i])break;return t>i?[]:e.slice(t,i-t+1)}e=t.resolve(e).substr(1),i=t.resolve(i).substr(1);for(var o=n(e.split("/")),r=n(i.split("/")),s=Math.min(o.length,r.length),a=s,l=0;l<s;l++)if(o[l]!==r[l]){a=l;break}var c=[];for(l=a;l<o.length;l++)c.push("..");return c=c.concat(r.slice(a)),c.join("/")},t.sep="/",t.delimiter=":",t.dirname=function(e){if("string"!==typeof e&&(e+=""),0===e.length)return".";for(var t=e.charCodeAt(0),i=47===t,n=-1,o=!0,r=e.length-1;r>=1;--r)if(t=e.charCodeAt(r),47===t){if(!o){n=r;break}}else o=!1;return-1===n?i?"/":".":i&&1===n?"/":e.slice(0,n)},t.basename=function(e,t){var i=n(e);return t&&i.substr(-1*t.length)===t&&(i=i.substr(0,i.length-t.length)),i},t.extname=function(e){"string"!==typeof e&&(e+="");for(var t=-1,i=0,n=-1,o=!0,r=0,s=e.length-1;s>=0;--s){var a=e.charCodeAt(s);if(47!==a)-1===n&&(o=!1,n=s+1),46===a?-1===t?t=s:1!==r&&(r=1):-1!==t&&(r=-1);else if(!o){i=s+1;break}}return-1===t||-1===n||0===r||1===r&&t===n-1&&t===i+1?"":e.slice(t,n)};var r="b"==="ab".substr(-1)?function(e,t,i){return e.substr(t,i)}:function(e,t,i){return t<0&&(t=e.length+t),e.substr(t,i)}}).call(this,i("2552"))},e4f5:function(e,t,i){var n=i("53c2");t=n(!1),t.push([e.i,".monaco-editor .lines-decorations{position:absolute;top:0;background:#fff}.monaco-editor .margin-view-overlays .cldr{position:absolute;height:100%}",""]),e.exports=t},e577:function(e,t,i){var n=i("53c2");t=n(!1),t.push([e.i,".monaco-editor .view-ruler{position:absolute;top:0}",""]),e.exports=t},e5d9:function(e,t,i){var n=i("53c2");t=n(!1),t.push([e.i,".monaco-scrollable-element>.scrollbar>.scra{cursor:pointer;font-size:11px!important}.monaco-scrollable-element>.visible{opacity:1;background:transparent;-webkit-transition:opacity .1s linear;transition:opacity .1s linear}.monaco-scrollable-element>.invisible{opacity:0;pointer-events:none}.monaco-scrollable-element>.invisible.fade{-webkit-transition:opacity .8s linear;transition:opacity .8s linear}.monaco-scrollable-element>.shadow{position:absolute;display:none}.monaco-scrollable-element>.shadow.top{display:block;top:0;left:3px;height:3px;width:100%;-webkit-box-shadow:#ddd 0 6px 6px -6px inset;box-shadow:inset 0 6px 6px -6px #ddd}.monaco-scrollable-element>.shadow.left{display:block;top:3px;left:0;height:100%;width:3px;-webkit-box-shadow:#ddd 6px 0 6px -6px inset;box-shadow:inset 6px 0 6px -6px #ddd}.monaco-scrollable-element>.shadow.top-left-corner{display:block;top:0;left:0;height:3px;width:3px}.monaco-scrollable-element>.shadow.top.left{-webkit-box-shadow:#ddd 6px 6px 6px -6px inset;box-shadow:inset 6px 6px 6px -6px #ddd}.vs .monaco-scrollable-element>.scrollbar>.slider{background:hsla(0,0%,39.2%,.4)}.vs-dark .monaco-scrollable-element>.scrollbar>.slider{background:hsla(0,0%,47.5%,.4)}.hc-black .monaco-scrollable-element>.scrollbar>.slider{background:rgba(111,195,223,.6)}.monaco-scrollable-element>.scrollbar>.slider:hover{background:hsla(0,0%,39.2%,.7)}.hc-black .monaco-scrollable-element>.scrollbar>.slider:hover{background:rgba(111,195,223,.8)}.monaco-scrollable-element>.scrollbar>.slider.active{background:rgba(0,0,0,.6)}.vs-dark .monaco-scrollable-element>.scrollbar>.slider.active{background:hsla(0,0%,74.9%,.4)}.hc-black .monaco-scrollable-element>.scrollbar>.slider.active{background:#6fc3df}.vs-dark .monaco-scrollable-element .shadow.top{-webkit-box-shadow:none;box-shadow:none}.vs-dark .monaco-scrollable-element .shadow.left{-webkit-box-shadow:#000 6px 0 6px -6px inset;box-shadow:inset 6px 0 6px -6px #000}.vs-dark .monaco-scrollable-element .shadow.top.left{-webkit-box-shadow:#000 6px 6px 6px -6px inset;box-shadow:inset 6px 6px 6px -6px #000}.hc-black .monaco-scrollable-element .shadow.left,.hc-black .monaco-scrollable-element .shadow.top,.hc-black .monaco-scrollable-element .shadow.top.left{-webkit-box-shadow:none;box-shadow:none}",""]),e.exports=t},e629:function(e,t){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},e635:function(e,t,i){var n=i("c91b");"string"===typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);var o=i("4974").default;o("0091cd35",n,!0,{sourceMap:!1,shadowMode:!1})},e669:function(module,__webpack_exports__,__webpack_require__){"use strict";var core_js_modules_es_array_find_index__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("b105"),core_js_modules_es_array_find_index__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(core_js_modules_es_array_find_index__WEBPACK_IMPORTED_MODULE_0__),core_js_modules_es_array_for_each__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("eb46"),core_js_modules_es_array_for_each__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(core_js_modules_es_array_for_each__WEBPACK_IMPORTED_MODULE_1__),core_js_modules_es_array_includes__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("2f62"),core_js_modules_es_array_includes__WEBPACK_IMPORTED_MODULE_2___default=__webpack_require__.n(core_js_modules_es_array_includes__WEBPACK_IMPORTED_MODULE_2__),core_js_modules_es_array_splice__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("d927"),core_js_modules_es_array_splice__WEBPACK_IMPORTED_MODULE_3___default=__webpack_require__.n(core_js_modules_es_array_splice__WEBPACK_IMPORTED_MODULE_3__),core_js_modules_es_number_constructor__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("085b"),core_js_modules_es_number_constructor__WEBPACK_IMPORTED_MODULE_4___default=__webpack_require__.n(core_js_modules_es_number_constructor__WEBPACK_IMPORTED_MODULE_4__),core_js_modules_es_object_to_string__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("fa89"),core_js_modules_es_object_to_string__WEBPACK_IMPORTED_MODULE_5___default=__webpack_require__.n(core_js_modules_es_object_to_string__WEBPACK_IMPORTED_MODULE_5__),core_js_modules_es_promise__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("d31d"),core_js_modules_es_promise__WEBPACK_IMPORTED_MODULE_6___default=__webpack_require__.n(core_js_modules_es_promise__WEBPACK_IMPORTED_MODULE_6__),core_js_modules_web_dom_collections_for_each__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("f96e"),core_js_modules_web_dom_collections_for_each__WEBPACK_IMPORTED_MODULE_7___default=__webpack_require__.n(core_js_modules_web_dom_collections_for_each__WEBPACK_IMPORTED_MODULE_7__),_Users_ssc_Documents_myProjects_avue_form_node_modules_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("5491"),regenerator_runtime_runtime__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("fc08"),regenerator_runtime_runtime__WEBPACK_IMPORTED_MODULE_9___default=__webpack_require__.n(regenerator_runtime_runtime__WEBPACK_IMPORTED_MODULE_9__),_Users_ssc_Documents_myProjects_avue_form_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__("d543"),_Users_ssc_Documents_myProjects_avue_form_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__("863c"),_fieldsConfig_js__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__("1e33"),_utils_json_beautifier__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__("826e"),_utils_monaco_editor__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__("d895"),_assets_widget_empty_png__WEBPACK_IMPORTED_MODULE_15__=__webpack_require__("3a5d"),_assets_widget_empty_png__WEBPACK_IMPORTED_MODULE_15___default=__webpack_require__.n(_assets_widget_empty_png__WEBPACK_IMPORTED_MODULE_15__),_mixins_history__WEBPACK_IMPORTED_MODULE_16__=__webpack_require__("2790"),vuedraggable__WEBPACK_IMPORTED_MODULE_17__=__webpack_require__("d958"),vuedraggable__WEBPACK_IMPORTED_MODULE_17___default=__webpack_require__.n(vuedraggable__WEBPACK_IMPORTED_MODULE_17__),_WidgetForm__WEBPACK_IMPORTED_MODULE_18__=__webpack_require__("17b9"),_FormConfig__WEBPACK_IMPORTED_MODULE_19__=__webpack_require__("a5f6"),_WidgetConfig__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__("d80d");__webpack_exports__["a"]={name:"FormDesign",components:{Draggable:vuedraggable__WEBPACK_IMPORTED_MODULE_17___default.a,MonacoEditor:_utils_monaco_editor__WEBPACK_IMPORTED_MODULE_14__["a"],WidgetForm:_WidgetForm__WEBPACK_IMPORTED_MODULE_18__["a"],FormConfig:_FormConfig__WEBPACK_IMPORTED_MODULE_19__["a"],WidgetConfig:_WidgetConfig__WEBPACK_IMPORTED_MODULE_20__["a"]},mixins:[_mixins_history__WEBPACK_IMPORTED_MODULE_16__["a"]],props:{options:{type:[Object,String],default:function(){return{column:[]}}},storage:{type:Boolean,default:!1},asideLeftWidth:{type:[String,Number],default:"270px"},asideRightWidth:{type:[String,Number],default:"380px"},showGithubStar:{type:Boolean,default:!0},toolbar:{type:Array,default:function(){return["import","generate","preview","clear"]}},undoRedo:{type:Boolean,default:!0},includeFields:{type:Array,default:function(){var e=[];return _fieldsConfig_js__WEBPACK_IMPORTED_MODULE_12__["a"].forEach((function(t){t.list.forEach((function(t){e.push(t.type)}))})),e}},customFields:{type:Array}},watch:{options:{handler:function handler(val){var _this=this,options=val;if("string"==typeof options)try{options=eval("("+options+")")}catch(e){console.error("非法配置"),options={column:[]}}this.transAvueOptionsToFormDesigner(options).then((function(e){_this.widgetForm=Object(_Users_ssc_Documents_myProjects_avue_form_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_11__["a"])(Object(_Users_ssc_Documents_myProjects_avue_form_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_11__["a"])({},_this.widgetForm),e)}))},deep:!0}},computed:{leftWidth:function(){return"string"==typeof this.asideLeftWidth?this.asideLeftWidth:"".concat(this.asideLeftWidth,"px")},rightWidth:function(){return"string"==typeof this.asideRightWidth?this.asideRightWidth:"".concat(this.asideRightWidth,"px")}},data:function(){return{widgetEmpty:_assets_widget_empty_png__WEBPACK_IMPORTED_MODULE_15___default.a,fields:_fieldsConfig_js__WEBPACK_IMPORTED_MODULE_12__["a"],widgetForm:{column:[],labelPosition:"left",labelSuffix:":",labelWidth:120,gutter:0,menuBtn:!0,submitBtn:!0,submitText:"提交",emptyBtn:!0,emptyText:"清空",menuPosition:"center"},widgetFormPreview:{},configTab:"widget",widgetFormSelect:{},previewVisible:!1,generateJsonVisible:!1,importJsonVisible:!1,importJson:{},widgetModels:{},configOption:{generateType:"json",space:2,quoteType:"single",dropQuotesOnKeys:!0},history:{index:0,maxStep:20,steps:[]}}},mounted:function(){this.handleLoadStorage(),this.handleLoadCss()},methods:{handleLoadStorage:function handleLoadStorage(){var _this2=this;return Object(_Users_ssc_Documents_myProjects_avue_form_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_10__["a"])(regeneratorRuntime.mark((function _callee(){var options;return regeneratorRuntime.wrap((function _callee$(_context){while(1)switch(_context.prev=_context.next){case 0:if(options=_this2.options,"string"==typeof options)try{options=eval("("+options+")")}catch(e){console.error("非法配置"),options={column:[]}}return options.column||(options.column=[]),_context.t0=_this2,_context.next=6,_this2.transAvueOptionsToFormDesigner(Object(_Users_ssc_Documents_myProjects_avue_form_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_11__["a"])(Object(_Users_ssc_Documents_myProjects_avue_form_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_11__["a"])({},_this2.widgetForm),options));case 6:_context.t1=_context.sent,_context.t2=[_context.t1],_context.t3=_this2.storage,_context.t4={index:0,maxStep:20,steps:_context.t2,storage:_context.t3},_this2.widgetForm=_context.t0.initHistory.call(_context.t0,_context.t4),_this2.undoRedo&&window.addEventListener("keydown",(function(e){(e.metaKey&&!e.shiftKey&&90==e.keyCode||e.ctrlKey&&!e.shiftKey&&90==e.keyCode)&&(_this2.widgetForm=_this2.handleUndo()),(e.metaKey&&e.shiftKey&&90==e.keyCode||e.ctrlKey&&e.shiftKey&&90==e.keyCode||e.ctrlKey&&89==e.keyCode)&&(_this2.widgetForm=_this2.handleRedo())}),!1);case 12:case"end":return _context.stop()}}),_callee)})))()},handleLoadCss:function(){var e=document.getElementsByTagName("head")[0],t=document.createElement("link");t.rel="stylesheet",t.type="text/css",t.href="https://at.alicdn.com/t/font_1254447_zc9iezc230c.css",e.appendChild(t)},handleAvueDoc:function(){window.open("https://avuejs.com/doc/form/form-doc","_blank")},handleFieldClick:function(e){var t=this,i=this.widgetForm.column.findIndex((function(e){return e.prop==t.widgetFormSelect.prop}))+1,n=0;-1==i?(this.widgetForm.column.push(e),n=this.widgetForm.column.length-1):(this.widgetForm.column.splice(i,0,e),n=i),this.$refs.widgetForm.handleWidgetAdd({newIndex:n})},handlePreview:function(){var e=this;this.widgetForm.column&&0!=this.widgetForm.column.length?this.transformToAvueOptions(this.widgetForm).then((function(t){e.widgetFormPreview=t,e.previewVisible=!0})):this.$message.error("没有需要展示的内容")},handleImportJsonSubmit:function(){var e=this;try{this.transAvueOptionsToFormDesigner(this.importJson).then((function(t){e.widgetForm=t,e.importJsonVisible=!1,e.handleHistoryChange(e.widgetForm)}))}catch(t){this.$message.error(t.message)}},handleGenerateJson:function(){var e=this;this.transformToAvueOptions(this.widgetForm).then((function(t){e.widgetFormPreview=t,e.generateJsonVisible=!0}))},handleGenerate:function(){var e=this;this.transformToAvueOptions(this.widgetForm).then((function(t){e.configOption.generateType&&"string"==e.configOption.generateType?e.$emit("submit",Object(_utils_json_beautifier__WEBPACK_IMPORTED_MODULE_13__["a"])(t,Object(_Users_ssc_Documents_myProjects_avue_form_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_11__["a"])({minify:!0},e.configOption))):e.$emit("submit",t)}))},handleCopy:function(){var e=this;this.transformToAvueOptions(this.widgetForm).then((function(t){e.$Clipboard({text:Object(_utils_json_beautifier__WEBPACK_IMPORTED_MODULE_13__["a"])(t,Object(_Users_ssc_Documents_myProjects_avue_form_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_11__["a"])({minify:!0},e.configOption))}).then((function(){e.$message.success("复制成功")})).catch((function(){e.$message.error("复制失败")}))}))},handlePreviewSubmit:function(e,t){var i=this;t?this.$alert(this.widgetModels).then((function(){t()})).catch((function(){t()})):this.$refs.form.validate((function(e,t){e&&i.$alert(i.widgetModels).then((function(){t()})).catch((function(){t()}))}))},handleBeforeClose:function(){this.$refs.form.resetForm(),this.widgetModels={},this.previewVisible=!1},handleClear:function(){var e=this;this.widgetForm&&this.widgetForm.column&&this.widgetForm.column.length>0?this.$confirm("确定要清空吗?","警告",{type:"warning"}).then((function(){e.$set(e.widgetForm,"column",[]),e.$set(e,"widgetModels",{}),e.$set(e,"widgetFormSelect",{}),e.handleHistoryChange(e.widgetForm)})).catch((function(){})):this.$message.error("没有需要清空的内容")},transformToAvueOptions:function transformToAvueOptions(obj){var _this11=this;return new Promise((function(resolve,reject){try{(function(){for(var data=_this11.deepClone(obj),_loop=function _loop(_i){var col=data.column[_i];if("dynamic"==col.type&&col.children&&col.children.column&&col.children.column.length>0){var c=col.children.column;c.forEach((function(e){delete e.subfield})),_this11.transformToAvueOptions(col.children).then((function(e){col.children=e}))}else if("group"==col.type){data.group||(data.group=[]);var group={label:col.label,icon:col.icon,prop:col.prop,arrow:col.arrow,collapse:col.collapse,display:col.display};_this11.transformToAvueOptions(col.children).then((function(e){group.column=e.column,data.group.push(group)})),data.column.splice(_i,1),_i--}else if(["checkbox","radio","tree","cascader","select"].includes(col.type)){if("static"==col.dicOption)delete col.dicUrl,delete col.dicMethod,delete col.dicQuery,delete col.dicQueryConfig;else if("remote"==col.dicOption)if(delete col.dicData,col.dicQueryConfig&&col.dicQueryConfig.length>0){var query={};col.dicQueryConfig.forEach((function(e){e.key&&e.value&&(query[e.key]=e.value)})),col.dicQuery=query,delete col.dicQueryConfig}else delete col.dicQueryConfig;delete col.dicOption}else if(["upload"].includes(col.type)){if(col.headersConfig&&col.headersConfig.length>0){var headers={};col.headersConfig.forEach((function(e){e.key&&e.value&&(headers[e.key]=e.value)})),col.headers=headers}else delete col.headers;if(delete col.headersConfig,col.dataConfig&&col.dataConfig.length>0){var _data={};col.dataConfig.forEach((function(e){e.key&&e.value&&(_data[e.key]=e.value)})),col.data=_data}else delete col.data;delete col.dataConfig}col.change?col.change=eval(col.change):delete col.change,col.click?col.click=eval(col.click):delete col.click,col.focus?col.focus=eval(col.focus):delete col.focus,col.blur?col.blur=eval(col.blur):delete col.blur,i=_i},i=0;i<data.column.length;i++)_loop(i);resolve(data)})()}catch(e){reject(e)}}))},transAvueOptionsToFormDesigner:function transAvueOptionsToFormDesigner(obj){var _this12=this;"string"==typeof obj&&(obj=eval("("+obj+")"));var data=this.deepClone(obj);return new Promise((function(e,t){try{if(data.column&&data.column.length>0&&data.column.forEach((function(e){if("dynamic"==e.type&&e.children&&e.children.column&&e.children.column.length>0){var t=e.children.column;t.forEach((function(e){e.subfield=!0})),_this12.transAvueOptionsToFormDesigner(e.children).then((function(t){e.children=t}))}else if(["checkbox","radio","tree","cascader","select"].includes(e.type)){if(!e.dicData&&e.dicQuery&&"object"==Object(_Users_ssc_Documents_myProjects_avue_form_node_modules_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_8__["a"])(e.dicQuery)){var i=[];for(var n in e.dicQuery)i.push({key:n,value:e.dicQuery[n],$cellEdit:!0});e.dicQueryConfig=i}e.dicUrl?e.dicOption="remote":e.dicOption="static",e.dicData||(e.dicData=[])}else if(["upload"].includes(e.type)){if(e.headers&&"object"==Object(_Users_ssc_Documents_myProjects_avue_form_node_modules_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_8__["a"])(e.headers)){var o=[];for(var r in e.headers)o.push({key:r,value:e.headers[r],$cellEdit:!0});e.headersConfig=o}else e.headersConfig=[];if(e.data&&"object"==Object(_Users_ssc_Documents_myProjects_avue_form_node_modules_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_8__["a"])(e.data)){var s=[];for(var a in e.data)s.push({key:a,value:e.data[a],$cellEdit:!0});e.dataConfig=s}else e.dataConfig=[]}})),data.group&&data.group.length>0){for(var i=function(e){data.column||(data.column=[]);var t=data.group[e],i={type:"group",label:t.label,icon:t.icon,prop:t.prop,arrow:t.arrow,collapse:t.collapse,display:t.display};_this12.transAvueOptionsToFormDesigner(t).then((function(e){i.children=e,data.column.push(i)}))},n=0;n<data.group.length;n++)i(n);delete data.group}e(data)}catch(o){t(o)}}))},getData:function(){var e=arguments,t=this;return Object(_Users_ssc_Documents_myProjects_avue_form_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_10__["a"])(regeneratorRuntime.mark((function i(){var n;return regeneratorRuntime.wrap((function(i){while(1)switch(i.prev=i.next){case 0:if(n=e.length>0&&void 0!==e[0]?e[0]:"json","string"!=n){i.next=10;break}return i.t0=_utils_json_beautifier__WEBPACK_IMPORTED_MODULE_13__["a"],i.next=5,t.transformToAvueOptions(t.widgetForm);case 5:return i.t1=i.sent,i.t2={minify:!0},i.abrupt("return",(0,i.t0)(i.t1,i.t2));case 10:return i.next=12,t.transformToAvueOptions(t.widgetForm);case 12:return i.abrupt("return",i.sent);case 13:case"end":return i.stop()}}),i)})))()}}}},e820:function(e,t,i){"use strict";i("2eb0");var n=i("7d86"),o=i("ac97"),r=i("1810"),s=i("6e1d"),a=i("69f1"),l=r("species"),c=!o((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")})),h=function(){return"$0"==="a".replace(/./,"$0")}(),d=r("replace"),u=function(){return!!/./[d]&&""===/./[d]("a","$0")}(),g=!o((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var i="ab".split(e);return 2!==i.length||"a"!==i[0]||"b"!==i[1]}));e.exports=function(e,t,i,d){var f=r(e),m=!o((function(){var t={};return t[f]=function(){return 7},7!=""[e](t)})),p=m&&!o((function(){var t=!1,i=/a/;return"split"===e&&(i={},i.constructor={},i.constructor[l]=function(){return i},i.flags="",i[f]=/./[f]),i.exec=function(){return t=!0,null},i[f](""),!t}));if(!m||!p||"replace"===e&&(!c||!h||u)||"split"===e&&!g){var _=/./[f],b=i(f,""[e],(function(e,t,i,n,o){return t.exec===s?m&&!o?{done:!0,value:_.call(t,i,n)}:{done:!0,value:e.call(i,t,n)}:{done:!1}}),{REPLACE_KEEPS_$0:h,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:u}),v=b[0],w=b[1];n(String.prototype,e,v),n(RegExp.prototype,f,2==t?function(e,t){return w.call(e,this,t)}:function(e){return w.call(e,this)})}d&&a(RegExp.prototype[f],"sham",!0)}},eb46:function(e,t,i){"use strict";var n=i("83ec"),o=i("370b");n({target:"Array",proto:!0,forced:[].forEach!=o},{forEach:o})},eba9:function(e,t,i){var n=i("58a5");"string"===typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);var o=i("4974").default;o("fb80cdb8",n,!0,{sourceMap:!1,shadowMode:!1})},ec23:function(e,t,i){var n=i("c401"),o=i("6e1d");e.exports=function(e,t){var i=e.exec;if("function"===typeof i){var r=i.call(e,t);if("object"!==typeof r)throw TypeError("RegExp exec method returned something other than an Object or null");return r}if("RegExp"!==n(e))throw TypeError("RegExp#exec called on incompatible receiver");return o.call(e,t)}},eca0:function(e,t,i){var n=i("53c2");t=n(!1),t.push([e.i,".monaco-editor .lines-content .cigr,.monaco-editor .lines-content .cigra{position:absolute}",""]),e.exports=t},eee7:function(e,t){e.exports=function(e){return"object"===typeof e?null!==e:"function"===typeof e}},ef61:function(e,t,i){var n=i("83ec"),o=i("c673"),r=i("3e1a"),s=i("ac97"),a=s((function(){r(1)}));n({target:"Object",stat:!0,forced:a},{keys:function(e){return r(o(e))}})},f05e:function(e,t,i){"use strict";var n=i("7d86"),o=i("fbcf"),r=i("ac97"),s=i("ff5c"),a="toString",l=RegExp.prototype,c=l[a],h=r((function(){return"/a/b"!=c.call({source:"a",flags:"b"})})),d=c.name!=a;(h||d)&&n(RegExp.prototype,a,(function(){var e=o(this),t=String(e.source),i=e.flags,n=String(void 0===i&&e instanceof RegExp&&!("flags"in l)?s.call(e):i);return"/"+t+"/"+n}),{unsafe:!0})},f0db:function(e,t){e.exports=!1},f0f1:function(e,t,i){var n=i("396d"),o=i("e629"),r=o.concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return n(e,r)}},f146:function(e,t,i){var n=i("e244"),o=i("eee7"),r=n.document,s=o(r)&&o(r.createElement);e.exports=function(e){return s?r.createElement(e):{}}},f152:function(e,t,i){var n=i("eee7"),o=i("5a43"),r=i("1810"),s=r("species");e.exports=function(e,t){var i;return o(e)&&(i=e.constructor,"function"!=typeof i||i!==Array&&!o(i.prototype)?n(i)&&(i=i[s],null===i&&(i=void 0)):i=void 0),new(void 0===i?Array:i)(0===t?0:t)}},f20c:function(e,t,i){"use strict";(function(e){
  9. /*!
  10. * The buffer module from node.js, for the browser.
  11. *
  12. * @author Feross Aboukhadijeh <http://feross.org>
  13. * @license MIT
  14. */
  15. var n=i("3ef6"),o=i("17d4"),r=i("52a2");function s(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"===typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(t){return!1}}function a(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function l(e,t){if(a()<t)throw new RangeError("Invalid typed array length");return c.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t),e.__proto__=c.prototype):(null===e&&(e=new c(t)),e.length=t),e}function c(e,t,i){if(!c.TYPED_ARRAY_SUPPORT&&!(this instanceof c))return new c(e,t,i);if("number"===typeof e){if("string"===typeof t)throw new Error("If encoding is specified then the first argument must be a string");return g(this,e)}return h(this,e,t,i)}function h(e,t,i,n){if("number"===typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!==typeof ArrayBuffer&&t instanceof ArrayBuffer?p(e,t,i,n):"string"===typeof t?f(e,t,i):_(e,t)}function d(e){if("number"!==typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function u(e,t,i,n){return d(t),t<=0?l(e,t):void 0!==i?"string"===typeof n?l(e,t).fill(i,n):l(e,t).fill(i):l(e,t)}function g(e,t){if(d(t),e=l(e,t<0?0:0|b(t)),!c.TYPED_ARRAY_SUPPORT)for(var i=0;i<t;++i)e[i]=0;return e}function f(e,t,i){if("string"===typeof i&&""!==i||(i="utf8"),!c.isEncoding(i))throw new TypeError('"encoding" must be a valid string encoding');var n=0|w(t,i);e=l(e,n);var o=e.write(t,i);return o!==n&&(e=e.slice(0,o)),e}function m(e,t){var i=t.length<0?0:0|b(t.length);e=l(e,i);for(var n=0;n<i;n+=1)e[n]=255&t[n];return e}function p(e,t,i,n){if(t.byteLength,i<0||t.byteLength<i)throw new RangeError("'offset' is out of bounds");if(t.byteLength<i+(n||0))throw new RangeError("'length' is out of bounds");return t=void 0===i&&void 0===n?new Uint8Array(t):void 0===n?new Uint8Array(t,i):new Uint8Array(t,i,n),c.TYPED_ARRAY_SUPPORT?(e=t,e.__proto__=c.prototype):e=m(e,t),e}function _(e,t){if(c.isBuffer(t)){var i=0|b(t.length);return e=l(e,i),0===e.length?e:(t.copy(e,0,0,i),e)}if(t){if("undefined"!==typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!==typeof t.length||te(t.length)?l(e,0):m(e,t);if("Buffer"===t.type&&r(t.data))return m(e,t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function b(e){if(e>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function v(e){return+e!=e&&(e=0),c.alloc(+e)}function w(e,t){if(c.isBuffer(e))return e.length;if("undefined"!==typeof ArrayBuffer&&"function"===typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!==typeof e&&(e=""+e);var i=e.length;if(0===i)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return i;case"utf8":case"utf-8":case void 0:return X(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*i;case"hex":return i>>>1;case"base64":return J(e).length;default:if(n)return X(e).length;t=(""+t).toLowerCase(),n=!0}}function C(e,t,i){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===i||i>this.length)&&(i=this.length),i<=0)return"";if(i>>>=0,t>>>=0,i<=t)return"";e||(e="utf8");while(1)switch(e){case"hex":return F(this,t,i);case"utf8":case"utf-8":return I(this,t,i);case"ascii":return R(this,t,i);case"latin1":case"binary":return P(this,t,i);case"base64":return M(this,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return W(this,t,i);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function y(e,t,i){var n=e[t];e[t]=e[i],e[i]=n}function S(e,t,i,n,o){if(0===e.length)return-1;if("string"===typeof i?(n=i,i=0):i>2147483647?i=2147483647:i<-2147483648&&(i=-2147483648),i=+i,isNaN(i)&&(i=o?0:e.length-1),i<0&&(i=e.length+i),i>=e.length){if(o)return-1;i=e.length-1}else if(i<0){if(!o)return-1;i=0}if("string"===typeof t&&(t=c.from(t,n)),c.isBuffer(t))return 0===t.length?-1:x(e,t,i,n,o);if("number"===typeof t)return t&=255,c.TYPED_ARRAY_SUPPORT&&"function"===typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,i):Uint8Array.prototype.lastIndexOf.call(e,t,i):x(e,[t],i,n,o);throw new TypeError("val must be string, number or Buffer")}function x(e,t,i,n,o){var r,s=1,a=e.length,l=t.length;if(void 0!==n&&(n=String(n).toLowerCase(),"ucs2"===n||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;s=2,a/=2,l/=2,i/=2}function c(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(o){var h=-1;for(r=i;r<a;r++)if(c(e,r)===c(t,-1===h?0:r-h)){if(-1===h&&(h=r),r-h+1===l)return h*s}else-1!==h&&(r-=r-h),h=-1}else for(i+l>a&&(i=a-l),r=i;r>=0;r--){for(var d=!0,u=0;u<l;u++)if(c(e,r+u)!==c(t,u)){d=!1;break}if(d)return r}return-1}function L(e,t,i,n){i=Number(i)||0;var o=e.length-i;n?(n=Number(n),n>o&&(n=o)):n=o;var r=t.length;if(r%2!==0)throw new TypeError("Invalid hex string");n>r/2&&(n=r/2);for(var s=0;s<n;++s){var a=parseInt(t.substr(2*s,2),16);if(isNaN(a))return s;e[i+s]=a}return s}function k(e,t,i,n){return ee(X(t,e.length-i),e,i,n)}function E(e,t,i,n){return ee(Z(t),e,i,n)}function D(e,t,i,n){return E(e,t,i,n)}function N(e,t,i,n){return ee(J(t),e,i,n)}function T(e,t,i,n){return ee(Q(t,e.length-i),e,i,n)}function M(e,t,i){return 0===t&&i===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,i))}function I(e,t,i){i=Math.min(e.length,i);var n=[],o=t;while(o<i){var r,s,a,l,c=e[o],h=null,d=c>239?4:c>223?3:c>191?2:1;if(o+d<=i)switch(d){case 1:c<128&&(h=c);break;case 2:r=e[o+1],128===(192&r)&&(l=(31&c)<<6|63&r,l>127&&(h=l));break;case 3:r=e[o+1],s=e[o+2],128===(192&r)&&128===(192&s)&&(l=(15&c)<<12|(63&r)<<6|63&s,l>2047&&(l<55296||l>57343)&&(h=l));break;case 4:r=e[o+1],s=e[o+2],a=e[o+3],128===(192&r)&&128===(192&s)&&128===(192&a)&&(l=(15&c)<<18|(63&r)<<12|(63&s)<<6|63&a,l>65535&&l<1114112&&(h=l))}null===h?(h=65533,d=1):h>65535&&(h-=65536,n.push(h>>>10&1023|55296),h=56320|1023&h),n.push(h),o+=d}return A(n)}t.Buffer=c,t.SlowBuffer=v,t.INSPECT_MAX_BYTES=50,c.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:s(),t.kMaxLength=a(),c.poolSize=8192,c._augment=function(e){return e.__proto__=c.prototype,e},c.from=function(e,t,i){return h(null,e,t,i)},c.TYPED_ARRAY_SUPPORT&&(c.prototype.__proto__=Uint8Array.prototype,c.__proto__=Uint8Array,"undefined"!==typeof Symbol&&Symbol.species&&c[Symbol.species]===c&&Object.defineProperty(c,Symbol.species,{value:null,configurable:!0})),c.alloc=function(e,t,i){return u(null,e,t,i)},c.allocUnsafe=function(e){return g(null,e)},c.allocUnsafeSlow=function(e){return g(null,e)},c.isBuffer=function(e){return!(null==e||!e._isBuffer)},c.compare=function(e,t){if(!c.isBuffer(e)||!c.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var i=e.length,n=t.length,o=0,r=Math.min(i,n);o<r;++o)if(e[o]!==t[o]){i=e[o],n=t[o];break}return i<n?-1:n<i?1:0},c.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(e,t){if(!r(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return c.alloc(0);var i;if(void 0===t)for(t=0,i=0;i<e.length;++i)t+=e[i].length;var n=c.allocUnsafe(t),o=0;for(i=0;i<e.length;++i){var s=e[i];if(!c.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(n,o),o+=s.length}return n},c.byteLength=w,c.prototype._isBuffer=!0,c.prototype.swap16=function(){var e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)y(this,t,t+1);return this},c.prototype.swap32=function(){var e=this.length;if(e%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)y(this,t,t+3),y(this,t+1,t+2);return this},c.prototype.swap64=function(){var e=this.length;if(e%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)y(this,t,t+7),y(this,t+1,t+6),y(this,t+2,t+5),y(this,t+3,t+4);return this},c.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?I(this,0,e):C.apply(this,arguments)},c.prototype.equals=function(e){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===c.compare(this,e)},c.prototype.inspect=function(){var e="",i=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,i).match(/.{2}/g).join(" "),this.length>i&&(e+=" ... ")),"<Buffer "+e+">"},c.prototype.compare=function(e,t,i,n,o){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===i&&(i=e?e.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),t<0||i>e.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&t>=i)return 0;if(n>=o)return-1;if(t>=i)return 1;if(t>>>=0,i>>>=0,n>>>=0,o>>>=0,this===e)return 0;for(var r=o-n,s=i-t,a=Math.min(r,s),l=this.slice(n,o),h=e.slice(t,i),d=0;d<a;++d)if(l[d]!==h[d]){r=l[d],s=h[d];break}return r<s?-1:s<r?1:0},c.prototype.includes=function(e,t,i){return-1!==this.indexOf(e,t,i)},c.prototype.indexOf=function(e,t,i){return S(this,e,t,i,!0)},c.prototype.lastIndexOf=function(e,t,i){return S(this,e,t,i,!1)},c.prototype.write=function(e,t,i,n){if(void 0===t)n="utf8",i=this.length,t=0;else if(void 0===i&&"string"===typeof t)n=t,i=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(i)?(i|=0,void 0===n&&(n="utf8")):(n=i,i=void 0)}var o=this.length-t;if((void 0===i||i>o)&&(i=o),e.length>0&&(i<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var r=!1;;)switch(n){case"hex":return L(this,e,t,i);case"utf8":case"utf-8":return k(this,e,t,i);case"ascii":return E(this,e,t,i);case"latin1":case"binary":return D(this,e,t,i);case"base64":return N(this,e,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,e,t,i);default:if(r)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),r=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var O=4096;function A(e){var t=e.length;if(t<=O)return String.fromCharCode.apply(String,e);var i="",n=0;while(n<t)i+=String.fromCharCode.apply(String,e.slice(n,n+=O));return i}function R(e,t,i){var n="";i=Math.min(e.length,i);for(var o=t;o<i;++o)n+=String.fromCharCode(127&e[o]);return n}function P(e,t,i){var n="";i=Math.min(e.length,i);for(var o=t;o<i;++o)n+=String.fromCharCode(e[o]);return n}function F(e,t,i){var n=e.length;(!t||t<0)&&(t=0),(!i||i<0||i>n)&&(i=n);for(var o="",r=t;r<i;++r)o+=Y(e[r]);return o}function W(e,t,i){for(var n=e.slice(t,i),o="",r=0;r<n.length;r+=2)o+=String.fromCharCode(n[r]+256*n[r+1]);return o}function B(e,t,i){if(e%1!==0||e<0)throw new RangeError("offset is not uint");if(e+t>i)throw new RangeError("Trying to access beyond buffer length")}function V(e,t,i,n,o,r){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||t<r)throw new RangeError('"value" argument is out of bounds');if(i+n>e.length)throw new RangeError("Index out of range")}function H(e,t,i,n){t<0&&(t=65535+t+1);for(var o=0,r=Math.min(e.length-i,2);o<r;++o)e[i+o]=(t&255<<8*(n?o:1-o))>>>8*(n?o:1-o)}function z(e,t,i,n){t<0&&(t=4294967295+t+1);for(var o=0,r=Math.min(e.length-i,4);o<r;++o)e[i+o]=t>>>8*(n?o:3-o)&255}function U(e,t,i,n,o,r){if(i+n>e.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("Index out of range")}function j(e,t,i,n,r){return r||U(e,t,i,4,34028234663852886e22,-34028234663852886e22),o.write(e,t,i,n,23,4),i+4}function K(e,t,i,n,r){return r||U(e,t,i,8,17976931348623157e292,-17976931348623157e292),o.write(e,t,i,n,52,8),i+8}c.prototype.slice=function(e,t){var i,n=this.length;if(e=~~e,t=void 0===t?n:~~t,e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),t<e&&(t=e),c.TYPED_ARRAY_SUPPORT)i=this.subarray(e,t),i.__proto__=c.prototype;else{var o=t-e;i=new c(o,void 0);for(var r=0;r<o;++r)i[r]=this[r+e]}return i},c.prototype.readUIntLE=function(e,t,i){e|=0,t|=0,i||B(e,t,this.length);var n=this[e],o=1,r=0;while(++r<t&&(o*=256))n+=this[e+r]*o;return n},c.prototype.readUIntBE=function(e,t,i){e|=0,t|=0,i||B(e,t,this.length);var n=this[e+--t],o=1;while(t>0&&(o*=256))n+=this[e+--t]*o;return n},c.prototype.readUInt8=function(e,t){return t||B(e,1,this.length),this[e]},c.prototype.readUInt16LE=function(e,t){return t||B(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUInt16BE=function(e,t){return t||B(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUInt32LE=function(e,t){return t||B(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUInt32BE=function(e,t){return t||B(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readIntLE=function(e,t,i){e|=0,t|=0,i||B(e,t,this.length);var n=this[e],o=1,r=0;while(++r<t&&(o*=256))n+=this[e+r]*o;return o*=128,n>=o&&(n-=Math.pow(2,8*t)),n},c.prototype.readIntBE=function(e,t,i){e|=0,t|=0,i||B(e,t,this.length);var n=t,o=1,r=this[e+--n];while(n>0&&(o*=256))r+=this[e+--n]*o;return o*=128,r>=o&&(r-=Math.pow(2,8*t)),r},c.prototype.readInt8=function(e,t){return t||B(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){t||B(e,2,this.length);var i=this[e]|this[e+1]<<8;return 32768&i?4294901760|i:i},c.prototype.readInt16BE=function(e,t){t||B(e,2,this.length);var i=this[e+1]|this[e]<<8;return 32768&i?4294901760|i:i},c.prototype.readInt32LE=function(e,t){return t||B(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return t||B(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readFloatLE=function(e,t){return t||B(e,4,this.length),o.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return t||B(e,4,this.length),o.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return t||B(e,8,this.length),o.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return t||B(e,8,this.length),o.read(this,e,!1,52,8)},c.prototype.writeUIntLE=function(e,t,i,n){if(e=+e,t|=0,i|=0,!n){var o=Math.pow(2,8*i)-1;V(this,e,t,i,o,0)}var r=1,s=0;this[t]=255&e;while(++s<i&&(r*=256))this[t+s]=e/r&255;return t+i},c.prototype.writeUIntBE=function(e,t,i,n){if(e=+e,t|=0,i|=0,!n){var o=Math.pow(2,8*i)-1;V(this,e,t,i,o,0)}var r=i-1,s=1;this[t+r]=255&e;while(--r>=0&&(s*=256))this[t+r]=e/s&255;return t+i},c.prototype.writeUInt8=function(e,t,i){return e=+e,t|=0,i||V(this,e,t,1,255,0),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},c.prototype.writeUInt16LE=function(e,t,i){return e=+e,t|=0,i||V(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):H(this,e,t,!0),t+2},c.prototype.writeUInt16BE=function(e,t,i){return e=+e,t|=0,i||V(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):H(this,e,t,!1),t+2},c.prototype.writeUInt32LE=function(e,t,i){return e=+e,t|=0,i||V(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):z(this,e,t,!0),t+4},c.prototype.writeUInt32BE=function(e,t,i){return e=+e,t|=0,i||V(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):z(this,e,t,!1),t+4},c.prototype.writeIntLE=function(e,t,i,n){if(e=+e,t|=0,!n){var o=Math.pow(2,8*i-1);V(this,e,t,i,o-1,-o)}var r=0,s=1,a=0;this[t]=255&e;while(++r<i&&(s*=256))e<0&&0===a&&0!==this[t+r-1]&&(a=1),this[t+r]=(e/s>>0)-a&255;return t+i},c.prototype.writeIntBE=function(e,t,i,n){if(e=+e,t|=0,!n){var o=Math.pow(2,8*i-1);V(this,e,t,i,o-1,-o)}var r=i-1,s=1,a=0;this[t+r]=255&e;while(--r>=0&&(s*=256))e<0&&0===a&&0!==this[t+r+1]&&(a=1),this[t+r]=(e/s>>0)-a&255;return t+i},c.prototype.writeInt8=function(e,t,i){return e=+e,t|=0,i||V(this,e,t,1,127,-128),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,i){return e=+e,t|=0,i||V(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):H(this,e,t,!0),t+2},c.prototype.writeInt16BE=function(e,t,i){return e=+e,t|=0,i||V(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):H(this,e,t,!1),t+2},c.prototype.writeInt32LE=function(e,t,i){return e=+e,t|=0,i||V(this,e,t,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):z(this,e,t,!0),t+4},c.prototype.writeInt32BE=function(e,t,i){return e=+e,t|=0,i||V(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):z(this,e,t,!1),t+4},c.prototype.writeFloatLE=function(e,t,i){return j(this,e,t,!0,i)},c.prototype.writeFloatBE=function(e,t,i){return j(this,e,t,!1,i)},c.prototype.writeDoubleLE=function(e,t,i){return K(this,e,t,!0,i)},c.prototype.writeDoubleBE=function(e,t,i){return K(this,e,t,!1,i)},c.prototype.copy=function(e,t,i,n){if(i||(i=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<i&&(n=i),n===i)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(i<0||i>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-i&&(n=e.length-t+i);var o,r=n-i;if(this===e&&i<t&&t<n)for(o=r-1;o>=0;--o)e[o+t]=this[o+i];else if(r<1e3||!c.TYPED_ARRAY_SUPPORT)for(o=0;o<r;++o)e[o+t]=this[o+i];else Uint8Array.prototype.set.call(e,this.subarray(i,i+r),t);return r},c.prototype.fill=function(e,t,i,n){if("string"===typeof e){if("string"===typeof t?(n=t,t=0,i=this.length):"string"===typeof i&&(n=i,i=this.length),1===e.length){var o=e.charCodeAt(0);o<256&&(e=o)}if(void 0!==n&&"string"!==typeof n)throw new TypeError("encoding must be a string");if("string"===typeof n&&!c.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"===typeof e&&(e&=255);if(t<0||this.length<t||this.length<i)throw new RangeError("Out of range index");if(i<=t)return this;var r;if(t>>>=0,i=void 0===i?this.length:i>>>0,e||(e=0),"number"===typeof e)for(r=t;r<i;++r)this[r]=e;else{var s=c.isBuffer(e)?e:X(new c(e,n).toString()),a=s.length;for(r=0;r<i-t;++r)this[r+t]=s[r%a]}return this};var q=/[^+\/0-9A-Za-z-_]/g;function $(e){if(e=G(e).replace(q,""),e.length<2)return"";while(e.length%4!==0)e+="=";return e}function G(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function Y(e){return e<16?"0"+e.toString(16):e.toString(16)}function X(e,t){var i;t=t||1/0;for(var n=e.length,o=null,r=[],s=0;s<n;++s){if(i=e.charCodeAt(s),i>55295&&i<57344){if(!o){if(i>56319){(t-=3)>-1&&r.push(239,191,189);continue}if(s+1===n){(t-=3)>-1&&r.push(239,191,189);continue}o=i;continue}if(i<56320){(t-=3)>-1&&r.push(239,191,189),o=i;continue}i=65536+(o-55296<<10|i-56320)}else o&&(t-=3)>-1&&r.push(239,191,189);if(o=null,i<128){if((t-=1)<0)break;r.push(i)}else if(i<2048){if((t-=2)<0)break;r.push(i>>6|192,63&i|128)}else if(i<65536){if((t-=3)<0)break;r.push(i>>12|224,i>>6&63|128,63&i|128)}else{if(!(i<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;r.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}}return r}function Z(e){for(var t=[],i=0;i<e.length;++i)t.push(255&e.charCodeAt(i));return t}function Q(e,t){for(var i,n,o,r=[],s=0;s<e.length;++s){if((t-=2)<0)break;i=e.charCodeAt(s),n=i>>8,o=i%256,r.push(o),r.push(n)}return r}function J(e){return n.toByteArray($(e))}function ee(e,t,i,n){for(var o=0;o<n;++o){if(o+i>=t.length||o>=e.length)break;t[o+i]=e[o]}return o}function te(e){return e!==e}}).call(this,i("c8ed"))},f226:function(e,t,i){var n=i("45ad"),o=i("ce47"),r=i("3352"),s=function(e){return function(t,i,s){var a,l=n(t),c=o(l.length),h=r(s,c);if(e&&i!=i){while(c>h)if(a=l[h++],a!=a)return!0}else for(;c>h;h++)if((e||h in l)&&l[h]===i)return e||h||0;return!e&&-1}};e.exports={includes:s(!0),indexOf:s(!1)}},f39a:function(e,t,i){var n=i("53c2");t=n(!1),t.push([e.i,".monaco-sash{position:absolute;z-index:35;-ms-touch-action:none;touch-action:none}.monaco-sash.disabled{pointer-events:none}.monaco-sash.mac.vertical{cursor:col-resize}.monaco-sash.vertical.minimum{cursor:e-resize}.monaco-sash.vertical.maximum{cursor:w-resize}.monaco-sash.mac.horizontal{cursor:row-resize}.monaco-sash.horizontal.minimum{cursor:s-resize}.monaco-sash.horizontal.maximum{cursor:n-resize}.monaco-sash.disabled{cursor:default!important;pointer-events:none!important}.monaco-sash.debug{background:#0ff}.monaco-sash.debug.disabled{background:rgba(0,255,255,.2)}.monaco-sash.debug:not(.disabled).orthogonal-end:after,.monaco-sash.debug:not(.disabled).orthogonal-start:before{background:red}",""]),e.exports=t},f3d6:function(e,t,i){var n=i("53c2");t=n(!1),t.push([e.i,'.monaco-editor{font-family:-apple-system,BlinkMacSystemFont,Segoe WPC,Segoe UI,HelveticaNeue-Light,system-ui,Ubuntu,Droid Sans,sans-serif;--monaco-monospace-font:"SF Mono",Monaco,Menlo,Consolas,"Ubuntu Mono","Liberation Mono","DejaVu Sans Mono","Courier New",monospace}.monaco-editor.hc-black .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label,.monaco-editor.vs-dark .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label,.monaco-menu .monaco-action-bar.vertical .action-item .action-menu-item:focus .action-label{stroke-width:1.2px}.monaco-hover p{margin:0}.monaco-editor.hc-black{-ms-high-contrast-adjust:none}@media screen and (-ms-high-contrast:active){.monaco-editor.vs-dark .view-overlays .current-line,.monaco-editor.vs .view-overlays .current-line{border-color:windowtext!important;border-left:0;border-right:0}.monaco-editor.vs-dark .cursor,.monaco-editor.vs .cursor{background-color:windowtext!important}.monaco-editor.vs-dark .dnd-target,.monaco-editor.vs .dnd-target{border-color:windowtext!important}.monaco-editor.vs-dark .selected-text,.monaco-editor.vs .selected-text{background-color:highlight!important}.monaco-editor.vs-dark .view-line,.monaco-editor.vs .view-line{-ms-high-contrast-adjust:none}.monaco-editor.vs-dark .view-line span,.monaco-editor.vs .view-line span{color:windowtext!important}.monaco-editor.vs-dark .view-line span.inline-selected-text,.monaco-editor.vs .view-line span.inline-selected-text{color:highlighttext!important}.monaco-editor.vs-dark .view-overlays,.monaco-editor.vs .view-overlays{-ms-high-contrast-adjust:none}.monaco-editor.vs-dark .reference-decoration,.monaco-editor.vs-dark .selectionHighlight,.monaco-editor.vs-dark .wordHighlight,.monaco-editor.vs-dark .wordHighlightStrong,.monaco-editor.vs .reference-decoration,.monaco-editor.vs .selectionHighlight,.monaco-editor.vs .wordHighlight,.monaco-editor.vs .wordHighlightStrong{border:2px dotted highlight!important;background:transparent!important;-webkit-box-sizing:border-box;box-sizing:border-box}.monaco-editor.vs-dark .rangeHighlight,.monaco-editor.vs .rangeHighlight{background:transparent!important;border:1px dotted activeborder!important;-webkit-box-sizing:border-box;box-sizing:border-box}.monaco-editor.vs-dark .bracket-match,.monaco-editor.vs .bracket-match{border-color:windowtext!important;background:transparent!important}.monaco-editor.vs-dark .currentFindMatch,.monaco-editor.vs-dark .findMatch,.monaco-editor.vs .currentFindMatch,.monaco-editor.vs .findMatch{border:2px dotted activeborder!important;background:transparent!important;-webkit-box-sizing:border-box;box-sizing:border-box}.monaco-editor.vs-dark .find-widget,.monaco-editor.vs .find-widget{border:1px solid windowtext}.monaco-editor.vs-dark .monaco-list .monaco-list-row,.monaco-editor.vs .monaco-list .monaco-list-row{-ms-high-contrast-adjust:none;color:windowtext!important}.monaco-editor.vs-dark .monaco-list .monaco-list-row.focused,.monaco-editor.vs .monaco-list .monaco-list-row.focused{color:highlighttext!important;background-color:highlight!important}.monaco-editor.vs-dark .monaco-list .monaco-list-row:hover,.monaco-editor.vs .monaco-list .monaco-list-row:hover{background:transparent!important;border:1px solid highlight;-webkit-box-sizing:border-box;box-sizing:border-box}.monaco-editor.vs-dark .monaco-scrollable-element>.scrollbar,.monaco-editor.vs .monaco-scrollable-element>.scrollbar{-ms-high-contrast-adjust:none;background:background!important;border:1px solid windowtext;-webkit-box-sizing:border-box;box-sizing:border-box}.monaco-editor.vs-dark .monaco-scrollable-element>.scrollbar>.slider,.monaco-editor.vs .monaco-scrollable-element>.scrollbar>.slider{background:windowtext!important}.monaco-editor.vs-dark .monaco-scrollable-element>.scrollbar>.slider.active,.monaco-editor.vs-dark .monaco-scrollable-element>.scrollbar>.slider:hover,.monaco-editor.vs .monaco-scrollable-element>.scrollbar>.slider.active,.monaco-editor.vs .monaco-scrollable-element>.scrollbar>.slider:hover{background:highlight!important}.monaco-editor.vs-dark .decorationsOverviewRuler,.monaco-editor.vs .decorationsOverviewRuler{opacity:0}.monaco-editor.vs-dark .minimap,.monaco-editor.vs .minimap{display:none}.monaco-editor.vs-dark .squiggly-d-error,.monaco-editor.vs .squiggly-d-error{background:transparent!important;border-bottom:4px double #e47777}.monaco-editor.vs-dark .squiggly-b-info,.monaco-editor.vs-dark .squiggly-c-warning,.monaco-editor.vs .squiggly-b-info,.monaco-editor.vs .squiggly-c-warning{border-bottom:4px double #71b771}.monaco-editor.vs-dark .squiggly-a-hint,.monaco-editor.vs .squiggly-a-hint{border-bottom:4px double #6c6c6c}.monaco-editor.vs-dark .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label,.monaco-editor.vs .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label{-ms-high-contrast-adjust:none;color:highlighttext!important;background-color:highlight!important}.monaco-editor.vs-dark .monaco-menu .monaco-action-bar.vertical .action-menu-item:hover .action-label,.monaco-editor.vs .monaco-menu .monaco-action-bar.vertical .action-menu-item:hover .action-label{-ms-high-contrast-adjust:none;background:transparent!important;border:1px solid highlight;-webkit-box-sizing:border-box;box-sizing:border-box}.monaco-diff-editor.vs-dark .diffOverviewRuler,.monaco-diff-editor.vs .diffOverviewRuler{display:none}.monaco-editor.vs-dark .line-delete,.monaco-editor.vs-dark .line-insert,.monaco-editor.vs .line-delete,.monaco-editor.vs .line-insert{background:transparent!important;border:1px solid highlight!important;-webkit-box-sizing:border-box;box-sizing:border-box}.monaco-editor.vs-dark .char-delete,.monaco-editor.vs-dark .char-insert,.monaco-editor.vs .char-delete,.monaco-editor.vs .char-insert{background:transparent!important}}',""]),e.exports=t},f54f:function(e,t,i){var n=i("55ab"),o=i("e244"),r=i("a056"),s=i("ca23"),a=i("b896").f,l=i("f0f1").f,c=i("7439"),h=i("ff5c"),d=i("030e"),u=i("7d86"),g=i("ac97"),f=i("35d6").set,m=i("d30c"),p=i("1810"),_=p("match"),b=o.RegExp,v=b.prototype,w=/a/g,C=/a/g,y=new b(w)!==w,S=d.UNSUPPORTED_Y,x=n&&r("RegExp",!y||S||g((function(){return C[_]=!1,b(w)!=w||b(C)==C||"/a/i"!=b(w,"i")})));if(x){var L=function(e,t){var i,n=this instanceof L,o=c(e),r=void 0===t;if(!n&&o&&e.constructor===L&&r)return e;y?o&&!r&&(e=e.source):e instanceof L&&(r&&(t=h.call(e)),e=e.source),S&&(i=!!t&&t.indexOf("y")>-1,i&&(t=t.replace(/y/g,"")));var a=s(y?new b(e,t):b(e,t),n?this:v,L);return S&&i&&f(a,{sticky:i}),a},k=function(e){e in L||a(L,e,{configurable:!0,get:function(){return b[e]},set:function(t){b[e]=t}})},E=l(b),D=0;while(E.length>D)k(E[D++]);v.constructor=L,L.prototype=v,u(o,"RegExp",L)}m("RegExp")},f5ab:function(e,t,i){var n=i("ad2f");"string"===typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);var o=i("4974").default;o("7ca26817",n,!0,{sourceMap:!1,shadowMode:!1})},f652:function(e,t,i){var n,o,r,s,a,l,c,h,d=i("e244"),u=i("42b1").f,g=i("59e5").set,f=i("4ad5"),m=i("f79e"),p=d.MutationObserver||d.WebKitMutationObserver,_=d.document,b=d.process,v=d.Promise,w=u(d,"queueMicrotask"),C=w&&w.value;C||(n=function(){var e,t;m&&(e=b.domain)&&e.exit();while(o){t=o.fn,o=o.next;try{t()}catch(i){throw o?s():r=void 0,i}}r=void 0,e&&e.enter()},!f&&!m&&p&&_?(a=!0,l=_.createTextNode(""),new p(n).observe(l,{characterData:!0}),s=function(){l.data=a=!a}):v&&v.resolve?(c=v.resolve(void 0),h=c.then,s=function(){h.call(c,n)}):s=m?function(){b.nextTick(n)}:function(){g.call(d,n)}),e.exports=C||function(e){var t={fn:e,next:void 0};r&&(r.next=t),o||(o=t,s()),r=t}},f68d:function(e,t,i){var n=i("53c2");t=n(!1),t.push([e.i,".monaco-mouse-cursor-text{cursor:text}.hc-black.mac .monaco-mouse-cursor-text,.hc-black .mac .monaco-mouse-cursor-text,.vs-dark.mac .monaco-mouse-cursor-text,.vs-dark .mac .monaco-mouse-cursor-text{cursor:-webkit-image-set(url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAAL0lEQVQoz2NgCD3x//9/BhBYBWdhgFVAiVW4JBFKGIa4AqD0//9D3pt4I4tAdAMAHTQ/j5Zom30AAAAASUVORK5CYII=) 1x,url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAQAAADZc7J/AAAAz0lEQVRIx2NgYGBY/R8I/vx5eelX3n82IJ9FxGf6tksvf/8FiTMQAcAGQMDvSwu09abffY8QYSAScNk45G198eX//yev73/4///701eh//kZSARckrNBRvz//+8+6ZohwCzjGNjdgQxkAg7B9WADeBjIBqtJCbhRA0YNoIkBSNmaPEMoNmA0FkYNoFKhapJ6FGyAH3nauaSmPfwI0v/3OukVi0CIZ+F25KrtYcx/CTIy0e+rC7R1Z4KMICVTQQ14feVXIbR695u14+Ir4gwAAD49E54wc1kWAAAAAElFTkSuQmCC) 2x) 5 8,text}",""]),e.exports=t},f743:function(e,t,i){var n=i("df3c");"string"===typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);var o=i("4974").default;o("448cf43a",n,!0,{sourceMap:!1,shadowMode:!1})},f79e:function(e,t,i){var n=i("c401"),o=i("e244");e.exports="process"==n(o.process)},f940:function(e,t,i){"use strict";(function(e){i.d(t,"a",(function(){return r})),i.d(t,"b",(function(){return s})),i.d(t,"c",(function(){return a}));var n=i("1cb4");const o="undefined"===typeof e?{cwd(){return"/"},env:Object.create(null),get platform(){return n["i"]?"win32":n["f"]?"darwin":"linux"},nextTick(e){return Object(n["j"])(e)}}:e,r=o.cwd,s=o.env,a=o.platform}).call(this,i("2552"))},f96e:function(e,t,i){var n=i("e244"),o=i("a909"),r=i("370b"),s=i("69f1");for(var a in o){var l=n[a],c=l&&l.prototype;if(c&&c.forEach!==r)try{s(c,"forEach",r)}catch(h){c.forEach=r}}},fa89:function(e,t,i){var n=i("6965"),o=i("7d86"),r=i("0da4");n||o(Object.prototype,"toString",r,{unsafe:!0})},fab5:function(e,t,i){"use strict";var n=i("2444"),o=i.n(n);o.a},fbcf:function(e,t,i){var n=i("eee7");e.exports=function(e){if(!n(e))throw TypeError(String(e)+" is not an object");return e}},fc01:function(e,t,i){"use strict";var n=i("7f17"),o=function(e){var t,i;this.promise=new e((function(e,n){if(void 0!==t||void 0!==i)throw TypeError("Bad Promise constructor");t=e,i=n})),this.resolve=n(t),this.reject=n(i)};e.exports.f=function(e){return new o(e)}},fc08:function(e,t,i){var n=function(e){"use strict";var t,i=Object.prototype,n=i.hasOwnProperty,o="function"===typeof Symbol?Symbol:{},r=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",a=o.toStringTag||"@@toStringTag";function l(e,t,i){return Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(I){l=function(e,t,i){return e[t]=i}}function c(e,t,i,n){var o=t&&t.prototype instanceof p?t:p,r=Object.create(o.prototype),s=new N(n||[]);return r._invoke=L(e,i,s),r}function h(e,t,i){try{return{type:"normal",arg:e.call(t,i)}}catch(I){return{type:"throw",arg:I}}}e.wrap=c;var d="suspendedStart",u="suspendedYield",g="executing",f="completed",m={};function p(){}function _(){}function b(){}var v={};v[r]=function(){return this};var w=Object.getPrototypeOf,C=w&&w(w(T([])));C&&C!==i&&n.call(C,r)&&(v=C);var y=b.prototype=p.prototype=Object.create(v);function S(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){function i(o,r,s,a){var l=h(e[o],e,r);if("throw"!==l.type){var c=l.arg,d=c.value;return d&&"object"===typeof d&&n.call(d,"__await")?t.resolve(d.__await).then((function(e){i("next",e,s,a)}),(function(e){i("throw",e,s,a)})):t.resolve(d).then((function(e){c.value=e,s(c)}),(function(e){return i("throw",e,s,a)}))}a(l.arg)}var o;function r(e,n){function r(){return new t((function(t,o){i(e,n,t,o)}))}return o=o?o.then(r,r):r()}this._invoke=r}function L(e,t,i){var n=d;return function(o,r){if(n===g)throw new Error("Generator is already running");if(n===f){if("throw"===o)throw r;return M()}i.method=o,i.arg=r;while(1){var s=i.delegate;if(s){var a=k(s,i);if(a){if(a===m)continue;return a}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if(n===d)throw n=f,i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);n=g;var l=h(e,t,i);if("normal"===l.type){if(n=i.done?f:u,l.arg===m)continue;return{value:l.arg,done:i.done}}"throw"===l.type&&(n=f,i.method="throw",i.arg=l.arg)}}}function k(e,i){var n=e.iterator[i.method];if(n===t){if(i.delegate=null,"throw"===i.method){if(e.iterator["return"]&&(i.method="return",i.arg=t,k(e,i),"throw"===i.method))return m;i.method="throw",i.arg=new TypeError("The iterator does not provide a 'throw' method")}return m}var o=h(n,e.iterator,i.arg);if("throw"===o.type)return i.method="throw",i.arg=o.arg,i.delegate=null,m;var r=o.arg;return r?r.done?(i[e.resultName]=r.value,i.next=e.nextLoc,"return"!==i.method&&(i.method="next",i.arg=t),i.delegate=null,m):r:(i.method="throw",i.arg=new TypeError("iterator result is not an object"),i.delegate=null,m)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function D(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function N(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function T(e){if(e){var i=e[r];if(i)return i.call(e);if("function"===typeof e.next)return e;if(!isNaN(e.length)){var o=-1,s=function i(){while(++o<e.length)if(n.call(e,o))return i.value=e[o],i.done=!1,i;return i.value=t,i.done=!0,i};return s.next=s}}return{next:M}}function M(){return{value:t,done:!0}}return _.prototype=y.constructor=b,b.constructor=_,_.displayName=l(b,a,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"===typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,l(e,a,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},S(x.prototype),x.prototype[s]=function(){return this},e.AsyncIterator=x,e.async=function(t,i,n,o,r){void 0===r&&(r=Promise);var s=new x(c(t,i,n,o),r);return e.isGeneratorFunction(i)?s:s.next().then((function(e){return e.done?e.value:s.next()}))},S(y),l(y,a,"Generator"),y[r]=function(){return this},y.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var i in e)t.push(i);return t.reverse(),function i(){while(t.length){var n=t.pop();if(n in e)return i.value=n,i.done=!1,i}return i.done=!0,i}},e.values=T,N.prototype={constructor:N,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(D),!e)for(var i in this)"t"===i.charAt(0)&&n.call(this,i)&&!isNaN(+i.slice(1))&&(this[i]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0],t=e.completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var i=this;function o(n,o){return a.type="throw",a.arg=e,i.next=n,o&&(i.method="next",i.arg=t),!!o}for(var r=this.tryEntries.length-1;r>=0;--r){var s=this.tryEntries[r],a=s.completion;if("root"===s.tryLoc)return o("end");if(s.tryLoc<=this.prev){var l=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(l&&c){if(this.prev<s.catchLoc)return o(s.catchLoc,!0);if(this.prev<s.finallyLoc)return o(s.finallyLoc)}else if(l){if(this.prev<s.catchLoc)return o(s.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return o(s.finallyLoc)}}}},abrupt:function(e,t){for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var r=o;break}}r&&("break"===e||"continue"===e)&&r.tryLoc<=t&&t<=r.finallyLoc&&(r=null);var s=r?r.completion:{};return s.type=e,s.arg=t,r?(this.method="next",this.next=r.finallyLoc,m):this.complete(s)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var i=this.tryEntries[t];if(i.finallyLoc===e)return this.complete(i.completion,i.afterLoc),D(i),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var i=this.tryEntries[t];if(i.tryLoc===e){var n=i.completion;if("throw"===n.type){var o=n.arg;D(i)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,i,n){return this.delegate={iterator:T(e),resultName:i,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}(e.exports);try{regeneratorRuntime=n}catch(o){Function("r","regeneratorRuntime = r")(n)}},fc9a:function(e,t,i){var n=i("e244");e.exports=n.Promise},fd3f:function(e,t){e.exports={}},fe32:function(e,t){var i={}.hasOwnProperty;e.exports=function(e,t){return i.call(e,t)}},ff5c:function(e,t,i){"use strict";var n=i("fbcf");e.exports=function(){var e=n(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}}})["default"]}));
  16. (("undefined"!==typeof self?self:this)["webpackJsonpAvueFormDesign"]=("undefined"!==typeof self?self:this)["webpackJsonpAvueFormDesign"]||[]).push([[1],{f8f9:function(e,t,n){"use strict";n.r(t),n.d(t,"conf",(function(){return r})),n.d(t,"language",(function(){return c}));var o=n("7f36"),i={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],onEnterRules:[{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,afterText:/^\s*\*\/$/,action:{indentAction:o["a"].IndentAction.IndentOutdent,appendText:" * "}},{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,action:{indentAction:o["a"].IndentAction.None,appendText:" * "}},{beforeText:/^(\t|(\ \ ))*\ \*(\ ([^\*]|\*(?!\/))*)?$/,action:{indentAction:o["a"].IndentAction.None,appendText:"* "}},{beforeText:/^(\t|(\ \ ))*\ \*\/\s*$/,action:{indentAction:o["a"].IndentAction.None,removeText:1}}],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]},{open:"`",close:"`",notIn:["string","comment"]},{open:"/**",close:" */",notIn:["string"]}],folding:{markers:{start:new RegExp("^\\s*//\\s*#?region\\b"),end:new RegExp("^\\s*//\\s*#?endregion\\b")}}},s={defaultToken:"invalid",tokenPostfix:".ts",keywords:["abstract","any","as","asserts","bigint","boolean","break","case","catch","class","continue","const","constructor","debugger","declare","default","delete","do","else","enum","export","extends","false","finally","for","from","function","get","if","implements","import","in","infer","instanceof","interface","is","keyof","let","module","namespace","never","new","null","number","object","package","private","protected","public","readonly","require","global","return","set","static","string","super","switch","symbol","this","throw","true","try","type","typeof","undefined","unique","unknown","var","void","while","with","yield","async","await","of"],operators:["<=",">=","==","!=","===","!==","=>","+","-","**","*","/","%","++","--","<<","</",">>",">>>","&","|","^","!","~","&&","||","??","?",":","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=","@"],symbols:/[=><!~?:&|+\-*\/\^%]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,digits:/\d+(_+\d+)*/,octaldigits:/[0-7]+(_+[0-7]+)*/,binarydigits:/[0-1]+(_+[0-1]+)*/,hexdigits:/[[0-9a-fA-F]+(_+[0-9a-fA-F]+)*/,regexpctl:/[(){}\[\]\$\^|\-*+?\.]/,regexpesc:/\\(?:[bBdDfnrstvwWn0\\\/]|@regexpctl|c[A-Z]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4})/,tokenizer:{root:[[/[{}]/,"delimiter.bracket"],{include:"common"}],common:[[/[a-z_$][\w$]*/,{cases:{"@keywords":"keyword","@default":"identifier"}}],[/[A-Z][\w\$]*/,"type.identifier"],{include:"@whitespace"},[/\/(?=([^\\\/]|\\.)+\/([gimsuy]*)(\s*)(\.|;|,|\)|\]|\}|$))/,{token:"regexp",bracket:"@open",next:"@regexp"}],[/[()\[\]]/,"@brackets"],[/[<>](?!@symbols)/,"@brackets"],[/!(?=([^=]|$))/,"delimiter"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/(@digits)[eE]([\-+]?(@digits))?/,"number.float"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?/,"number.float"],[/0[xX](@hexdigits)n?/,"number.hex"],[/0[oO]?(@octaldigits)n?/,"number.octal"],[/0[bB](@binarydigits)n?/,"number.binary"],[/(@digits)n?/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string_double"],[/'/,"string","@string_single"],[/`/,"string","@string_backtick"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@jsdoc"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],jsdoc:[[/[^\/*]+/,"comment.doc"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],regexp:[[/(\{)(\d+(?:,\d*)?)(\})/,["regexp.escape.control","regexp.escape.control","regexp.escape.control"]],[/(\[)(\^?)(?=(?:[^\]\\\/]|\\.)+)/,["regexp.escape.control",{token:"regexp.escape.control",next:"@regexrange"}]],[/(\()(\?:|\?=|\?!)/,["regexp.escape.control","regexp.escape.control"]],[/[()]/,"regexp.escape.control"],[/@regexpctl/,"regexp.escape.control"],[/[^\\\/]/,"regexp"],[/@regexpesc/,"regexp.escape"],[/\\\./,"regexp.invalid"],[/(\/)([gimsuy]*)/,[{token:"regexp",bracket:"@close",next:"@pop"},"keyword.other"]]],regexrange:[[/-/,"regexp.escape.control"],[/\^/,"regexp.invalid"],[/@regexpesc/,"regexp.escape"],[/[^\]]/,"regexp"],[/\]/,{token:"regexp.escape.control",next:"@pop",bracket:"@close"}]],string_double:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],string_single:[[/[^\\']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/'/,"string","@pop"]],string_backtick:[[/\$\{/,{token:"delimiter.bracket",next:"@bracketCounting"}],[/[^\\`$]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/`/,"string","@pop"]],bracketCounting:[[/\{/,"delimiter.bracket","@bracketCounting"],[/\}/,"delimiter.bracket","@pop"],{include:"common"}]}},r=i,c={defaultToken:"invalid",tokenPostfix:".js",keywords:["break","case","catch","class","continue","const","constructor","debugger","default","delete","do","else","export","extends","false","finally","for","from","function","get","if","import","in","instanceof","let","new","null","return","set","super","switch","symbol","this","throw","true","try","typeof","undefined","var","void","while","with","yield","async","await","of"],typeKeywords:[],operators:s.operators,symbols:s.symbols,escapes:s.escapes,digits:s.digits,octaldigits:s.octaldigits,binarydigits:s.binarydigits,hexdigits:s.hexdigits,regexpctl:s.regexpctl,regexpesc:s.regexpesc,tokenizer:s.tokenizer}}}]);